megamek.common.actions
Class ThrashAttackAction
java.lang.Object
megamek.common.actions.AbstractEntityAction
megamek.common.actions.AbstractAttackAction
megamek.common.actions.ThrashAttackAction
- All Implemented Interfaces:
- java.io.Serializable, AttackAction, EntityAction
public class ThrashAttackAction
- extends AbstractAttackAction
The prone attacker thrashes at the target.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThrashAttackAction
public ThrashAttackAction(int entityId,
int targetId)
ThrashAttackAction
public ThrashAttackAction(int entityId,
int targetType,
int targetId)
ThrashAttackAction
public ThrashAttackAction(int entityId,
Targetable target)
toHit
public ToHitData toHit(IGame game)
- To-hit number for thrashing attack. This attack can only be made by a
prone Mek in a clear or pavement terrain hex that contains infantry. This
attack will force a PSR check for the prone Mek; if the PSR is missed,
the Mek takes normal falling damage.
- Parameters:
game - - the IGame object containing all entities.
- Returns:
- the
ToHitData containing the target roll.
getDamageFor
public static int getDamageFor(Entity entity)
- Damage caused by a successfull thrashing attack.
- Parameters:
entity - - the Entity conducting the thrash attack.
- Returns:
- The
int amount of damage caused by this attack.