Skip to content

Instantly share code, notes, and snippets.

@nelsonlaquet
Created July 27, 2011 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nelsonlaquet/1110565 to your computer and use it in GitHub Desktop.
Save nelsonlaquet/1110565 to your computer and use it in GitHub Desktop.
class MurasaPyromancer : CreatureCard, IAlly, IEventHandler<CreaterEntersBattlefield>
{
public MurasaPyromancer()
{
Name = "Murasa Pyromancer";
ManaCost = ManaCost.Create(red: 2, collorless: 4);
Description = "Whenever Murasa Pyromancer or another Ally enters the battlefield under your control, you may have Murasa Pyromancer deal damage to target creature equal to the number of Allies you control.";
}
public void Handle(CreaterEntersBattlefield @event)
{
var allyCount = Owner.CreaturesUnderControl.Count(c => typeof(IAlly).IsAssignableFrom(c));
var tagetCreature = Engine.TargetCreature();
targetCreature.TakeDamage(allyCount);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment