public void Attack(ID <Readable_LifeTarget> targetID, Game game) { Writable_LifeTarget target = game.GetWritable(targetID); this.AddHealth(new Specific_LifeEffect(null, -1 * target.GetDamage()), game); target.AddHealth(new Specific_LifeEffect(null, -1 * this.GetDamage()), game); this.NumAttacksRemaining--; }
public override void Play(Game game) { // Put this card in play Writable_GamePlayer controller = game.GetWritable(this.ControllerID); controller.MonsterIDsInPlay.GetWritable().Add(this.GetID((Readable_MonsterCard)null)); // Pay for this card, remove it from hand, and trigger its abilities base.Play(game); }
public void Destroy(GameEffect cause, Game game) { // inform the controller Writable_GamePlayer controller = game.GetWritable(this.ControllerID); controller.MonsterIDsInPlay.GetWritable().Remove(this.GetID((Readable_MonsterCard)null)); // process any on-death effects GameTrigger_Factory.TriggerAll <GameEffect>(this.afterDeath_triggers, cause, this.ControllerID, game); }
public void NewTurn(ID <Readable_GamePlayer> playerID, Game game) { Writable_GamePlayer player = game.GetWritable(playerID); // gain 1 crystal if (player.ResourcesPerTurn.ToNumber() < 10) { player.ResourcesPerTurn = player.ResourcesPerTurn.Plus(new Resource(1)); } // replenish existing crystals player.CurrentResources = player.ResourcesPerTurn; // give one attack to each monster foreach (ID <Readable_MonsterCard> monsterId in player.MonsterIDsInPlay.GetReadable()) { Writable_MonsterCard card = game.GetWritable(monsterId); card.NumAttacksRemaining = card.NumAttacksPerTurn; } // draw a card if there's room this.AddCardToHand(player.Deck.Dequeue(), player, game); }
public virtual void Play(Game game) { // pay the resources for this card Writable_GamePlayer controller = game.GetWritable(this.ControllerID); controller.CurrentResources = controller.CurrentResources.Minus(this.cost); // remove this card from hand List <ID <ReadableCard> > hand = controller.Get_WritableHand(); hand.Remove(this.GetID((ReadableCard)null)); // Trigger anything that happens when playing this card this.AfterPlay(game); }
public override void Process(Game game) { Writable_LifeTarget attacker = game.GetWritable(this.attackerID); attacker.Attack(this.defenderID, game); }
// Make this effect happen public override void Process(Game game) { Writable_LifeTarget target = game.GetWritable(this.TargetID); target.AddHealth(this, game); }
public Writable_GamePlayer GetValue(Controlled item, Game game, Writable_GamePlayer outputType) { return(game.GetWritable(item.Get_ControllerID())); }