mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Hunters' Feast - Fixed rule text (fixes #6878).
This commit is contained in:
parent
04176350db
commit
329352f36b
2 changed files with 10 additions and 13 deletions
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -16,8 +14,9 @@ import mage.target.TargetPlayer;
|
|||
public final class HuntersFeast extends CardImpl {
|
||||
|
||||
public HuntersFeast(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}");
|
||||
|
||||
// Any number of target players each gain 6 life.
|
||||
this.getSpellAbility().addTarget(new TargetPlayer(0, Integer.MAX_VALUE, false));
|
||||
this.getSpellAbility().addEffect(new GainLifeTargetEffect(6));
|
||||
}
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
|
||||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.constants.Outcome;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
@ -42,7 +39,7 @@ public class GainLifeTargetEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (UUID playerId: targetPointer.getTargets(game, source)) {
|
||||
for (UUID playerId : targetPointer.getTargets(game, source)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
player.gainLife(life.calculate(game, source, this), game, source);
|
||||
|
@ -59,12 +56,13 @@ public class GainLifeTargetEffect extends OneShotEffect {
|
|||
StringBuilder sb = new StringBuilder();
|
||||
String message = life.getMessage();
|
||||
|
||||
if (!mode.getTargets().isEmpty()) {
|
||||
sb.append("target ").append(mode.getTargets().get(0).getTargetName());
|
||||
if (!mode.getTargets().isEmpty() && mode.getTargets().get(0).getMaxNumberOfTargets() == Integer.MAX_VALUE) {
|
||||
sb.append("any number of target players each gain ");
|
||||
} else if (!mode.getTargets().isEmpty()) {
|
||||
sb.append("target ").append(mode.getTargets().get(0).getTargetName()).append(" gains ");
|
||||
} else {
|
||||
sb.append("that player");
|
||||
sb.append("that player gains ");
|
||||
}
|
||||
sb.append(" gains ");
|
||||
if (message.isEmpty() || !message.equals("1")) {
|
||||
sb.append(life.toString()).append(' ');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue