mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fixed Elixir Of Immortality giving 10 life.
This commit is contained in:
parent
fe43350815
commit
45e46d5cfa
2 changed files with 5 additions and 6 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue