59 lines
1.4 KiB
Haskell
59 lines
1.4 KiB
Haskell
module Units.Carcass
|
|
( gunwight
|
|
)
|
|
where
|
|
|
|
import GameModel
|
|
( adjacentAllies
|
|
, Armor(..)
|
|
, BaseStats(..)
|
|
, BoardState
|
|
, CharacterIdentifier
|
|
, Choice
|
|
, DamageType(..)
|
|
, Effect(..)
|
|
, Stat(..)
|
|
, Token(..)
|
|
, Trigger(..)
|
|
)
|
|
import Units
|
|
( AttackT(..)
|
|
, anyTarget
|
|
, buildAttack
|
|
)
|
|
|
|
gunwight :: BaseStats
|
|
gunwight = BaseStats
|
|
{ name = "Gunwight"
|
|
, hp = 2
|
|
, mov = 2
|
|
, df = 4
|
|
, arm = NoArmor
|
|
, hooks = gunwightHooks
|
|
, actions = gunwightActions
|
|
, statBonus = gunwightStatBonuses
|
|
}
|
|
|
|
gunwightHooks :: BoardState -> CharacterIdentifier -> Trigger -> [Effect]
|
|
gunwightHooks board cid TurnStart = []
|
|
gunwightHooks board cid (TookDamage _) = []
|
|
gunwightHooks board cid (Died _ _) = []
|
|
gunwightHooks board cid (EndMove _) = []
|
|
|
|
gunwightActions :: [CharacterIdentifier -> Choice]
|
|
gunwightActions =
|
|
[ buildAttack $ AttackT
|
|
{ tName = "OL45"
|
|
, tRange = (2, 3)
|
|
, tValidTargets = anyTarget
|
|
, tMelee = False
|
|
, tDamageType = Unblockable
|
|
, tDamageAmount = 2
|
|
, tHeadshotEffects = [InflictTokens VitalVulnr (-1)]
|
|
, tStandardEffects = []
|
|
}
|
|
]
|
|
|
|
gunwightStatBonuses :: BoardState -> CharacterIdentifier -> Stat a -> a
|
|
gunwightStatBonuses board cid AttackDice = if adjacentAllies board cid /= Just [] then 1 else 0
|
|
gunwightStatBonuses _ _ DefenseDice = 0 |