mirror of
https://github.com/correl/mage.git
synced 2024-11-22 03:00:11 +00:00
Fix Gore Vassal
This commit is contained in:
parent
0c9361a057
commit
8d55419003
1 changed files with 23 additions and 1 deletions
|
@ -3,6 +3,7 @@ package mage.cards.g;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.common.RegenerateTargetEffect;
|
||||
|
@ -13,6 +14,8 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -34,7 +37,7 @@ public final class GoreVassal extends CardImpl {
|
|||
new AddCountersTargetEffect(CounterType.M1M1.createInstance()),
|
||||
new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.addEffect(new RegenerateTargetEffect());
|
||||
ability.addEffect(new GoreVassalEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
@ -47,3 +50,22 @@ public final class GoreVassal extends CardImpl {
|
|||
return new GoreVassal(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GoreVassalEffect extends RegenerateTargetEffect {
|
||||
|
||||
GoreVassalEffect() {
|
||||
super();
|
||||
staticText = "Then if that creature's toughness is 1 or greater, regenerate it";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Ability source, Game game) {
|
||||
Permanent creature = game.getPermanent(source.getFirstTarget());
|
||||
if (creature == null || creature.getToughness().getValue() < 1) {
|
||||
this.discard();
|
||||
return;
|
||||
}
|
||||
super.init(source, game);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue