megamek.common.actions
Class ClubAttackAction

java.lang.Object
  extended by megamek.common.actions.AbstractEntityAction
      extended by megamek.common.actions.AbstractAttackAction
          extended by megamek.common.actions.PhysicalAttackAction
              extended by megamek.common.actions.ClubAttackAction
All Implemented Interfaces:
java.io.Serializable, AttackAction, EntityAction

public class ClubAttackAction
extends PhysicalAttackAction

The attacker makes a club attack on the target. This also covers mech melee weapons like hatchets.

Version:
Author:
Ben
See Also:
Serialized Form

Constructor Summary
ClubAttackAction(int entityId, int targetType, int targetId, Mounted club, int aimTable)
           
ClubAttackAction(int entityId, int targetId, Mounted club, int aimTable)
          Creates new ClubAttackAction
 
Method Summary
 Mounted getClub()
           
static int getDamageFor(Entity entity, Mounted club, boolean targetInfantry)
          Damage that the specified mech does with a club attack
 void setClub(Mounted club)
           
 ToHitData toHit(IGame game)
           
static ToHitData toHit(IGame game, int attackerId, Targetable target, Mounted club, int aimTable)
          To-hit number for the specified club to hit
 
Methods inherited from class megamek.common.actions.PhysicalAttackAction
setCommonModifiers, toHitIsImpossible
 
Methods inherited from class megamek.common.actions.AbstractAttackAction
getEntity, getTarget, getTargetId, getTargetType, nightModifiers, setTargetId, setTargetType
 
Methods inherited from class megamek.common.actions.AbstractEntityAction
getEntityId, setEntityId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface megamek.common.actions.EntityAction
getEntityId, setEntityId
 

Constructor Detail

ClubAttackAction

public ClubAttackAction(int entityId,
                        int targetId,
                        Mounted club,
                        int aimTable)
Creates new ClubAttackAction


ClubAttackAction

public ClubAttackAction(int entityId,
                        int targetType,
                        int targetId,
                        Mounted club,
                        int aimTable)
Method Detail

getDamageFor

public static int getDamageFor(Entity entity,
                               Mounted club,
                               boolean targetInfantry)
Damage that the specified mech does with a club attack


toHit

public ToHitData toHit(IGame game)

toHit

public static ToHitData toHit(IGame game,
                              int attackerId,
                              Targetable target,
                              Mounted club,
                              int aimTable)
To-hit number for the specified club to hit


getClub

public Mounted getClub()

setClub

public void setClub(Mounted club)