Class ClubAttackAction

All Implemented Interfaces:
Serializable, AttackAction, EntityAction

public class ClubAttackAction extends PhysicalAttackAction
The attacker makes a club attack on the target. This also covers mek melee weapons like hatchets.
Since:
April 3, 2002, 2:37 PM
See Also:
  • Constructor Details

    • ClubAttackAction

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

      public ClubAttackAction(int entityId, int targetType, int targetId, MiscMounted club, int aimTable, boolean zweihandering)
      Creates a new club attack
      Parameters:
      entityId - - id of entity performing the attack
      targetType - - type of target
      targetId - - id of target
      club - - The Mounted of the weapon doing the attack
      zweihandering - - a boolean indicating whether the attacker is zweihandering (using both hands)
  • Method Details

    • getDamageFor

      public static int getDamageFor(Entity entity, MiscMounted club, boolean targetInfantry, boolean zweihandering)
      Damage for the club attack
      Parameters:
      entity - - the entity performing the attack
      club - - The Mounted of the weapon doing the attack
      targetInfantry - - whether this attack targets infantry
      zweihandering - - a boolean indicating whether the attacker is zweihandering (using both hands)
      Returns:
      an integer of the damage dealt
    • getHitModFor

      public static int getHitModFor(MiscType clubType)
      Modifiers to the to-hit roll for specific weapons
      Parameters:
      clubType - A physical weapon
      Returns:
      The modifier to hit with the weapon
    • isZweihandering

      public boolean isZweihandering()
      Returns:
      true if the entity is zweihandering (attacking with both hands)
    • toHit

      public ToHitData toHit(Game game)
    • toHit

      public static ToHitData toHit(Game game, int attackerId, Targetable target, Mounted<?> club, int aimTable, boolean zweihandering)
      To-hit number for the specified club to hit
      Parameters:
      game - The current Game
      attackerId - - attacker id
      target - Targetable of the target
      club - - Mounted of the weapon
      zweihandering - - a boolean indicating whether the attacker is zweihandering (using both hands)
    • getClub

      public MiscMounted getClub()
    • setClub

      public void setClub(MiscMounted club)
    • toSummaryString

      public String toSummaryString(Game game)
      Description copied from interface: EntityAction
      Returns a short one-line description of the action that is used in the UI, e.g. on attack arrows in the BoardView and in the action summary in TurnDetailsOverlay.
      Parameters:
      game - The game object to get information from
      Returns:
      A short String describing the action
      See Also: