gainLife :: PlayerID -> Int -> StateT GameState IO ()
gainLife pID amount = do
  s <- get
  triggeredAbilities <- allTriggeredAbilities
  let withCorrectTrigger =
        filter (\ (_, Triggered t _) -> t == OnLifeGain) triggeredAbilities
  playerWithID pID.hp += amount
  playerWithID pID.turnLifeGained += amount
  forM_ withCorrectTrigger $ \(cardWithAbility, Triggered _ f) ->
    f $ OnLifeGainInfo cardWithAbility pID amount
gainLife :: PlayerID -> Int -> StateT GameState IO ()
gainLife pID amount = do
  s <- get
  triggeredAbilities <- allTriggeredAbilities
  let withCorrectTrigger =
        filter (\ (_, Triggered t _) -> t == OnLifeGain) triggeredAbilities
  playerWithID pID.hp += amount
  playerWithID pID.turnLifeGained += amount
  forM_ withCorrectTrigger $ \(cardWithAbility, Triggered _ f) ->
    f $ OnLifeGainInfo cardWithAbility pID amount
gainLife pID amount = do
  s <- get
  triggeredAbilities <- allTriggeredAbilities
  let withCorrectTrigger =
        filter (\ (_, Triggered t _) -> t == OnLifeGain) triggeredAbilities
  playerWithID pID.hp += amount
  playerWithID pID.turnLifeGained += amount
  forM_ withCorrectTrigger $ \(cardWithAbility, Triggered _ f) ->
    f $ OnLifeGainInfo cardWithAbility pID amount