public override EventWitness getWitness(TouhouCardEngine.CardEngine engine, Player player) { EventWitness witness = new GameEndWitness(); witness.setVar("winnerPlayersIndex", winnerPlayers.Select(p => { return(engine.getPlayerIndex(p)); }).ToArray()); return(witness); }
public override EventWitness getWitness(TouhouCardEngine.CardEngine engine, Player player) { EventWitness witness = new TimeOutWitness(); witness.setVar("playerIndex", engine.getPlayerIndex(this.player)); return(witness); }
public override EventWitness getWitness(TouhouCardEngine.CardEngine engine, Player player) { EventWitness witness = new MaxGemChangeWitness(); witness.setVar("playerIndex", engine.getPlayerIndex(this.player)); witness.setVar("value", this.player.getProp <int>("maxGem")); return(witness); }
public override EventWitness getWitness(TouhouCardEngine.CardEngine engine, Player player) { EventWitness witness = new AttackWitness(); witness.setVar("playerIndex", engine.getPlayerIndex(this.player)); witness.setVar("cardRID", card.id); witness.setVar("targetCardRID", targetCard.id); return(witness); }
public override EventWitness getWitness(TouhouCardEngine.CardEngine engine, Player player) { EventWitness witness = new SummonWitness(); witness.setVar("playerIndex", engine.getPlayerIndex(this.player)); witness.setVar("cardRID", card.id); witness.setVar("cardDID", card.define.id); witness.setVar("position", position); return(witness); }
public override EventWitness getWitness(TouhouCardEngine.CardEngine engine, Player player) { EventWitness witness = new UseWitness(); witness.setVar("playerIndex", engine.getPlayerIndex(this.player)); witness.setVar("cardRID", card.id); witness.setVar("cardDID", card.define.id); witness.setVar("targetPosition", targetPosition); witness.setVar("targetCardsRID", targetCards.Select(targetCard => { return(targetCard != null ? targetCard.id : -1); }).ToArray()); return(witness); }
public override EventWitness getWitness(TouhouCardEngine.CardEngine engine, Player player) { EventWitness witness = new DrawWitness(); witness.setVar("playerIndex", engine.getPlayerIndex(this.player)); if (player == this.player) { witness.setVar("cardDID", card.define.id); } witness.setVar("cardRID", card.id); return(witness); }
public override EventWitness getWitness(TouhouCardEngine.CardEngine engine, Player player) { EventWitness witness = new InitReplaceWitness(); witness.setVar("playerIndex", engine.getPlayerIndex(this.player)); witness.setVar("originCardsRID", originCards.Select(c => { return(c.id); }).ToArray()); if (player == this.player) { //自己 witness.setVar("replacedCardsDID", replacedCards.Select(c => { return(c.define.id); }).ToArray()); } //其他玩家 witness.setVar("replacedCardsRID", replacedCards.Select(c => { return(c.id); }).ToArray()); return(witness); }
public override EventWitness getWitness(TouhouCardEngine.CardEngine engine, Player player) { EventWitness witness = new InitWitness(); //双方玩家所使用的卡组主人公 witness.setVar("masterCardsRID", engine.getPlayers().Select(p => { return(p["Master"][0].id); }).ToArray()); witness.setVar("masterCardsDID", engine.getPlayers().Select(p => { return(p["Master"][0].define.id); }).ToArray()); //双方玩家所使用的技能 witness.setVar("skillCardsRID", engine.getPlayers().Select(p => { return(p["Skill"][0].id); }).ToArray()); witness.setVar("skillCardsDID", engine.getPlayers().Select(p => { return(p["Skill"][0].define.id); }).ToArray()); //然后是玩家的先后行动顺序 witness.setVar("sortedPlayersIndex", engine.getProp <Player[]>("sortedPlayers").Select(p => { return(engine.getPlayerIndex(p)); }).ToArray()); //接着是初始手牌 witness.setVar("initCardsRID", engine.getPlayers().Select(p => { return(p["Init"].Select(c => { return c.id; }).ToArray()); }).ToArray()); witness.setVar("initCardsDID", player["Init"].Select(e => { return(e.define.id); }).ToArray()); //剩余卡组 witness.setVar("deck", player["Deck"].OrderBy(c => { return(c.define.id); }).Select(c => { return(c.define.id); }).ToArray()); return(witness); }