public override void execute(TouhouCardEngine.CardEngine engine) { Thread.Sleep((int)time * 1000); //强制结束回合 engine.doEvent(new TimeOutEvent(player)); engine.turnEnd(player); }
public override void execute(TouhouCardEngine.CardEngine engine) { //造成伤害 List <Card> deathList = new List <Card>(); for (int i = 0; i < cards.Length; i++) { if (amounts[i] > cards[i].getProp <int>("life")) { amounts[i] = cards[i].getProp <int>("life"); } cards[i].setProp("life", PropertyChangeType.add, -amounts[i]); if (cards[i].getProp <int>("life") <= 0) { deathList.Add(cards[i]); } } if (deathList.Count > 0) { engine.doEvent(new DeathEvent(deathList.ToArray())); } }
public static void use(this TouhouCardEngine.CardEngine engine, Player player, Card card, int position, Card[] targetCards) { engine.doEvent(new UseEvent(player, card, position, targetCards)); }
public static void turnStart(this TouhouCardEngine.CardEngine engine, Player player) { engine.doEvent(new TurnStartEvent(player)); }
public static void initReplace(this TouhouCardEngine.CardEngine engine, Player player, Card[] cards) { engine.doEvent(new InitReplaceEvent(player, cards)); }
public static void attack(this TouhouCardEngine.CardEngine engine, Player player, Card card, Card targetCard) { engine.doEvent(new AttackEvent(player, card, targetCard)); }
public static void start(this TouhouCardEngine.CardEngine engine) { engine.doEvent(new StartEvent()); }
public static void init(this TouhouCardEngine.CardEngine engine) { engine.doEvent(new InitEvent()); }