public override void execute(TouhouCardEngine.CardEngine engine) { card.setProp("attackTimes", PropertyChangeType.add, 1); if (card.getProp <int>("attack") > 0 && targetCard.getProp <int>("attack") > 0) { Card[] cards = new Card[2]; int[] amounts = new int[2]; if (card.id < targetCard.id) { cards[0] = card; amounts[0] = targetCard.getProp <int>("attack"); cards[1] = targetCard; amounts[1] = card.getProp <int>("attack"); } else { cards[0] = targetCard; amounts[0] = card.getProp <int>("attack"); cards[1] = card; amounts[1] = card.getProp <int>("attack"); } engine.damage(cards, amounts); } else if (card.getProp <int>("attack") > 0) { engine.damage(targetCard, card.getProp <int>("attack")); } else if (targetCard.getProp <int>("attack") > 0) { engine.damage(card, targetCard.getProp <int>("attack")); } }
public override void execute(TouhouCardEngine.CardEngine engine) { player.setProp("tired", PropertyChangeType.add, 1); engine.damage(player["Master"][0], player.getProp <int>("tired")); }