public IEnumerator Panic(int player, int target, Drop drop, int cardIndex) { PlayerController pc = playerControllers[player]; PlayerController targetPc = playerControllers[target]; Card c = null; switch (drop) { case Drop.Hand: if (target == player) { c = null; } else { c = targetPc.StealCardFromHand(cardIndex); } break; case Drop.Properties: c = targetPc.UnequipProperty(cardIndex); break; case Drop.Weapon: c = targetPc.UnequipWeapon(); break; } pc.DiscardCardUsed(); if (c != null) { pc.AddCard(c); } yield return(targetPc.StolenBy(player)); }
public void StealWeapon(int player, int target) { PlayerController pc = playerControllers[player]; PlayerController targetPc = playerControllers[target]; Card c = targetPc.UnequipWeapon(); pc.AddCard(c); targetPc.StolenBy(player); }
public void StealProperty(int player, int target, int index) { PlayerController pc = playerControllers[player]; PlayerController targetPc = playerControllers[target]; Card c = targetPc.UnequipProperty(index); pc.AddCard(c); targetPc.StolenBy(player); }
public void StealIfHandNotEmpty(int player, int target) { PlayerController pc = playerControllers[player]; PlayerController targetPc = playerControllers[target]; if (targetPc.HasCards) { Card c = targetPc.StealCardFromHand(); pc.AddCard(c); } }
public void TradeTwoForOne(int player, int cardIndex, int target) { PlayerController pc = playerControllers[player]; PlayerController targetPc = playerControllers[target]; Card c = pc.UnequipHandCard(cardIndex); for (int i = 0; i < 2 && targetPc.Hand.Count > 0; i++) { Card targetCard = targetPc.GetCardFromHand(); pc.AddCard(targetCard); } targetPc.AddCard(c); }