public override void Use(TrustedAI ai, Player player, ref CardUseStruct use, WrappedCard card) { Room room = ai.Room; List <ScoreStruct> scores = new List <ScoreStruct>(); foreach (Player p in ai.GetEnemies(player)) { if (!p.Chained && RoomLogic.CanBeChainedBy(room, p, player)) { ScoreStruct score = ai.FindCards2Discard(player, p, string.Empty, "he", HandlingMethod.MethodDiscard); score.Players = new List <Player> { p }; scores.Add(score); } } if (scores.Count > 0) { ai.CompareByScore(ref scores); if (scores[0].Score > 0) { use.Card = card; use.To = scores[0].Players; } } }
public override void OnEffect(Room room, CardEffectStruct effect) { Player player = effect.From; if (player.Camp == effect.To.Camp && effect.To.Chained) { room.DrawCards(effect.To, new DrawCardStruct(1, player, Name)); } else if (player.Camp != effect.To.Camp && !effect.To.Chained && RoomLogic.CanBeChainedBy(room, effect.To, player)) { room.SetPlayerChained(effect.To, true); } }