megamek.common.actions
Class AbstractAttackAction
java.lang.Object
megamek.common.actions.AbstractEntityAction
megamek.common.actions.AbstractAttackAction
- All Implemented Interfaces:
- java.io.Serializable, AttackAction, EntityAction
- Direct Known Subclasses:
- BAVibroClawAttackAction, BrushOffAttackAction, DisplacementAttackAction, LayExplosivesAttackAction, PhysicalAttackAction, ProtomechPhysicalAttackAction, RamAttackAction, SearchlightAttackAction, TeleMissileAttackAction, ThrashAttackAction, WeaponAttackAction
public abstract class AbstractAttackAction
- extends AbstractEntityAction
- implements AttackAction
Abstract superclass for any action where an entity is attacking another
entity.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractAttackAction
public AbstractAttackAction(int entityId,
int targetId)
AbstractAttackAction
public AbstractAttackAction(int entityId,
int targetType,
int targetId)
getTargetType
public int getTargetType()
- Specified by:
getTargetType in interface AttackAction
getTargetId
public int getTargetId()
- Specified by:
getTargetId in interface AttackAction
setTargetType
public void setTargetType(int targetType)
- Specified by:
setTargetType in interface AttackAction
setTargetId
public void setTargetId(int targetId)
- Specified by:
setTargetId in interface AttackAction
getTarget
public Targetable getTarget(IGame g)
getEntity
public Entity getEntity(IGame g)
nightModifiers
public static ToHitData nightModifiers(IGame game,
Targetable target,
AmmoType atype,
Entity attacker,
boolean isWeapon)
- used by the toHit of derived classes atype may be null if not using an
ammo based weapon