Skip to content

Instantly share code, notes, and snippets.

@nelsonlaquet
Created July 27, 2011 23:05
Show Gist options
  • Save nelsonlaquet/1110558 to your computer and use it in GitHub Desktop.
Save nelsonlaquet/1110558 to your computer and use it in GitHub Desktop.
class SanguineBond : CastableCard, IEnchantment, IEventHandler<PlayerLifeChanged>
{
public SanguineBond()
{
Name = "Sanguine Bond";
ManaCost = Manacost.Create(black: 4, collorless: 2);
Description = "Whenever you gain life, target opponent loses that much life.";
}
public void Handle(PlayerLifeChanged @event)
{
if (@event.Delta > 0 && @event.Player == CardOwner)
{
var target = Engine.SelectOpponent();
target.TakeDamage(@event.Delta);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment