damageCreature :: (CardID, CardID) -> StateT GameState IO ()
damageCreature (blocker, attacker) = do
  s <- get
  aPower <- use (card attacker.stats._1)
  bPower <- use (card blocker.stats._1)
  let aDmg = s^.card attacker.damage
      bDmg = s^.card blocker.damage
      attackerID = s^.currentPlayerID
      defender = 1 - attackerID
  when (Lifelink `elem` (s^.card attacker.attributes)) $
    gainLife attackerID aPower
  when (Lifelink `elem` (s^.card blocker.attributes)) $
    gainLife defender bPower
  when (s^.card attacker.takesCombatDamage && s^.card blocker.dealsCombatDamage) $
    damageCard attacker bPower
  when (s^.card blocker.takesCombatDamage && s^.card attacker.dealsCombatDamage) $
    damageCard blocker aPower
  -- Kinda hackish, there's conditions where this won't work.
  when (Deathtouch `elem` (s^.card attacker.attributes) &&
       s^.card blocker.damage > 0)
    (killCard blocker)
  when (Deathtouch `elem` (s^.card blocker.attributes) &&
       s^.card attacker.damage > 0)
    (killCard attacker)
damageCreature :: (CardID, CardID) -> StateT GameState IO ()
damageCreature (blocker, attacker) = do
  s <- get
  aPower <- use (card attacker.stats._1)
  bPower <- use (card blocker.stats._1)
  let aDmg = s^.card attacker.damage
      bDmg = s^.card blocker.damage
      attackerID = s^.currentPlayerID
      defender = 1 - attackerID
  when (Lifelink `elem` (s^.card attacker.attributes)) $
    gainLife attackerID aPower
  when (Lifelink `elem` (s^.card blocker.attributes)) $
    gainLife defender bPower
  when (s^.card attacker.takesCombatDamage && s^.card blocker.dealsCombatDamage) $
    damageCard attacker bPower
  when (s^.card blocker.takesCombatDamage && s^.card attacker.dealsCombatDamage) $
    damageCard blocker aPower
  -- Kinda hackish, there's conditions where this won't work.
  when (Deathtouch `elem` (s^.card attacker.attributes) &&
       s^.card blocker.damage > 0)
    (killCard blocker)
  when (Deathtouch `elem` (s^.card blocker.attributes) &&
       s^.card attacker.damage > 0)
    (killCard attacker)
damageCreature (blocker, attacker) = do
  s <- get
  aPower <- use (card attacker.stats._1)
  bPower <- use (card blocker.stats._1)
  let aDmg = s^.card attacker.damage
      bDmg = s^.card blocker.damage
      attackerID = s^.currentPlayerID
      defender = 1 - attackerID
  when (Lifelink `elem` (s^.card attacker.attributes)) $
    gainLife attackerID aPower
  when (Lifelink `elem` (s^.card blocker.attributes)) $
    gainLife defender bPower
  when (s^.card attacker.takesCombatDamage && s^.card blocker.dealsCombatDamage) $
    damageCard attacker bPower
  when (s^.card blocker.takesCombatDamage && s^.card attacker.dealsCombatDamage) $
    damageCard blocker aPower
  -- Kinda hackish, there's conditions where this won't work.
  when (Deathtouch `elem` (s^.card attacker.attributes) &&
       s^.card blocker.damage > 0)
    (killCard blocker)
  when (Deathtouch `elem` (s^.card blocker.attributes) &&
       s^.card attacker.damage > 0)
    (killCard attacker)