megamek.common.actions
Class DfaAttackAction

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

public class DfaAttackAction
extends DisplacementAttackAction

Version:
Author:
Ben
See Also:
Serialized Form

Constructor Summary
DfaAttackAction(int entityId, int targetId, Coords targetPos)
          Creates new DfaAttackAction
DfaAttackAction(int entityId, int targetType, int targetId, Coords targetPos)
           
 
Method Summary
static int getDamageFor(Entity entity, boolean targetInfantry)
          Damage that a mech does with a successful DFA.
static int getDamageTakenBy(Entity entity)
          Damage done to a mech after a successful DFA.
static boolean hasTalons(Entity entity)
           
 ToHitData toHit(IGame game)
           
static ToHitData toHit(IGame game, int attackerId, Targetable target, Coords src)
          To-hit number for a death from above attack, assuming that movement has been handled
static ToHitData toHit(IGame game, int attackerId, Targetable target, MovePath md)
          Checks if a death from above attack can hit the target, including movement
 
Methods inherited from class megamek.common.actions.DisplacementAttackAction
getTargetPos, setTargetPos
 
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

DfaAttackAction

public DfaAttackAction(int entityId,
                       int targetId,
                       Coords targetPos)
Creates new DfaAttackAction


DfaAttackAction

public DfaAttackAction(int entityId,
                       int targetType,
                       int targetId,
                       Coords targetPos)
Method Detail

getDamageTakenBy

public static int getDamageTakenBy(Entity entity)
Damage done to a mech after a successful DFA.


getDamageFor

public static int getDamageFor(Entity entity,
                               boolean targetInfantry)
Damage that a mech does with a successful DFA.


toHit

public static ToHitData toHit(IGame game,
                              int attackerId,
                              Targetable target,
                              MovePath md)
Checks if a death from above attack can hit the target, including movement


toHit

public ToHitData toHit(IGame game)

toHit

public static ToHitData toHit(IGame game,
                              int attackerId,
                              Targetable target,
                              Coords src)
To-hit number for a death from above attack, assuming that movement has been handled


hasTalons

public static boolean hasTalons(Entity entity)