This commit is contained in:
Jeff 2017-07-24 10:09:32 -05:00
parent 2b98d51596
commit 9be76c59cc

View file

@ -48,8 +48,8 @@ import mage.target.common.TargetControlledPermanent;
*/
public class DevourFlesh extends CardImpl {
public DevourFlesh (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}");
public DevourFlesh(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
// Target player sacrifices a creature, then gains life equal to that creature's toughness.
this.getSpellAbility().addEffect(new DevourFleshSacrificeEffect());
@ -61,7 +61,7 @@ public class DevourFlesh extends CardImpl {
}
@Override
public DevourFlesh copy() {
public DevourFlesh copy() {
return new DevourFlesh(this);
}
}
@ -99,8 +99,9 @@ class DevourFleshSacrificeEffect extends OneShotEffect {
if (permanent != null) {
int gainLife = permanent.getToughness().getValue();
permanent.sacrifice(source.getSourceId(), game);
game.applyEffects();
player.gainLife(gainLife, game);
} else{
} else {
return false;
}
}