Fixed Elixir Of Immortality giving 10 life.

This commit is contained in:
magenoxx 2011-08-13 22:29:30 +04:00
parent fe43350815
commit 45e46d5cfa
2 changed files with 5 additions and 6 deletions

View file

@ -40,8 +40,6 @@ public class ElixirOfImmortality extends mage.sets.magic2011.ElixirOfImmortality
super(ownerId); super(ownerId);
this.cardNumber = 62; this.cardNumber = 62;
this.expansionSetCode = "DDF"; this.expansionSetCode = "DDF";
} }
public ElixirOfImmortality (final ElixirOfImmortality card) { public ElixirOfImmortality (final ElixirOfImmortality card) {

View file

@ -58,8 +58,7 @@ public class ElixirOfImmortality extends CardImpl<ElixirOfImmortality> {
Costs costs = new CostsImpl(); Costs costs = new CostsImpl();
costs.add(new GenericManaCost(2)); costs.add(new GenericManaCost(2));
costs.add(new TapSourceCost()); costs.add(new TapSourceCost());
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(5), costs); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ElixerOfImmortalityEffect(), costs);
ability.addEffect(new ElixerOfImmortalityEffect());
this.addAbility(ability); this.addAbility(ability);
} }
@ -89,9 +88,11 @@ class ElixerOfImmortalityEffect extends OneShotEffect<ElixerOfImmortalityEffect>
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId()); Player player = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(source.getSourceId()); Permanent permanent = game.getPermanent(source.getSourceId());
if (player != null && permanent != null) { if (player != null) {
player.gainLife(5, game); player.gainLife(5, game);
if (permanent != null) {
permanent.moveToZone(Zone.LIBRARY, source.getId(), game, true); permanent.moveToZone(Zone.LIBRARY, source.getId(), game, true);
}
player.getLibrary().addAll(player.getGraveyard().getCards(game), game); player.getLibrary().addAll(player.getGraveyard().getCards(game), game);
player.getGraveyard().clear(); player.getGraveyard().clear();
player.getLibrary().shuffle(); player.getLibrary().shuffle();