megamek.common.actions
Class PhysicalAttackAction

java.lang.Object
  extended by megamek.common.actions.AbstractEntityAction
      extended by megamek.common.actions.AbstractAttackAction
          extended by megamek.common.actions.PhysicalAttackAction
All Implemented Interfaces:
java.io.Serializable, AttackAction, EntityAction
Direct Known Subclasses:
BreakGrappleAttackAction, ClubAttackAction, GrappleAttackAction, JumpJetAttackAction, KickAttackAction, PunchAttackAction, TripAttackAction

public class PhysicalAttackAction
extends AbstractAttackAction

See Also:
Serialized Form

Constructor Summary
PhysicalAttackAction(int entityId, int targetId)
           
PhysicalAttackAction(int entityId, int targetType, int targetId)
           
 
Method Summary
protected static void setCommonModifiers(ToHitData toHit, IGame game, Entity ae, Targetable target)
           
protected static java.lang.String toHitIsImpossible(IGame game, Entity ae, Targetable target)
          Common checking whether is it possible to physically attack the target
 
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

PhysicalAttackAction

public PhysicalAttackAction(int entityId,
                            int targetId)

PhysicalAttackAction

public PhysicalAttackAction(int entityId,
                            int targetType,
                            int targetId)
Method Detail

toHitIsImpossible

protected static java.lang.String toHitIsImpossible(IGame game,
                                                    Entity ae,
                                                    Targetable target)
Common checking whether is it possible to physically attack the target

Parameters:
game -
attackerId -
target -
Returns:
reason the attack is impossible, or null if it is possible

setCommonModifiers

protected static void setCommonModifiers(ToHitData toHit,
                                         IGame game,
                                         Entity ae,
                                         Targetable target)