internal override ActionResult Run(Game game, IEntity source, ActionResult[] args) { ICanTarget heroPower = (ICanTarget)source; Player player = source.Controller; // Pay casting cost player.PayCost(source); #if _ACTIONS_DEBUG DebugLog.WriteLine("Game {0}: {1} is using hero power {2}", game.GameId, player.FriendlyName, heroPower.ShortDescription); #endif if (heroPower.Target != null) { heroPower[GameTag.CARD_TARGET] = heroPower.Target.Id; } game.QueueActionBlock(BlockType.POWER, source, source.Card.Behaviour.Battlecry, heroPower.Target); game.Queue(source, (Action <IEntity>)(e => { player.HeroPowerActivationsThisTurn++; // TODO: Hero power windfury etc. heroPower.IsExhausted = true; // Post-POWER block DEATHS block before triggers e.Game.RunDeathCreationStepIfNeeded(); // TODO: Attach OnHeroPower to a tag change; this is probably in the wrong place (Inspire) e.Game.ActiveTriggers.Queue(TriggerType.OnHeroPower, e); e.Game.Queue(e.Controller, (Action <IEntity>)(p => { ((Player)p).NumOptionsPlayedThisTurn++; })); })); return((Entity)source); }
public void Init(ICanTarget shooter) { this.shooter = shooter; }