Kraul Harpooner fix

This commit is contained in:
Hythonia
2021-01-06 15:07:33 +00:00
committed by Hans Mackowiak
parent d3ce61a0a4
commit c75fa0f057
5 changed files with 25 additions and 9 deletions

View File

@@ -8,8 +8,11 @@ import forge.game.ability.AbilityKey;
import forge.game.ability.AbilityUtils; import forge.game.ability.AbilityUtils;
import forge.game.card.Card; import forge.game.card.Card;
import forge.game.card.CardDamageMap; import forge.game.card.CardDamageMap;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility; import forge.game.spellability.SpellAbility;
import forge.game.trigger.TriggerType; import forge.game.trigger.TriggerType;
import forge.util.Localizer;
import forge.util.CardTranslation;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -56,6 +59,12 @@ public class FightEffect extends DamageBaseEffect {
} }
} }
Player controller = host.getController();
boolean isOptional = sa.hasParam("Optional");
if (isOptional && !controller.getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblWouldYouLikeFight", CardTranslation.getTranslatedName(fighters.get(0).getName()), CardTranslation.getTranslatedName(fighters.get(1).getName())))) {
return;
} else {
dealDamage(sa, fighters.get(0), fighters.get(1)); dealDamage(sa, fighters.get(0), fighters.get(1));
for (Card c : fighters) { for (Card c : fighters) {
@@ -68,6 +77,7 @@ public class FightEffect extends DamageBaseEffect {
runParams.put(AbilityKey.Fighters, fighters); runParams.put(AbilityKey.Fighters, fighters);
game.getTriggerHandler().runTrigger(TriggerType.FightOnce, runParams, false); game.getTriggerHandler().runTrigger(TriggerType.FightOnce, runParams, false);
} }
}
private static List<Card> getFighters(SpellAbility sa) { private static List<Card> getFighters(SpellAbility sa) {
final List<Card> fighterList = Lists.newArrayList(); final List<Card> fighterList = Lists.newArrayList();

View File

@@ -5,6 +5,6 @@ PT:3/2
K:Reach K:Reach
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPump | TriggerDescription$ When CARDNAME enters the battlefield, choose up to one target creature with flying you don't control. CARDNAME gets +X/+0 until end of turn, where X is the number of creature cards in your graveyard, then you may have CARDNAME fight that creature. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPump | TriggerDescription$ When CARDNAME enters the battlefield, choose up to one target creature with flying you don't control. CARDNAME gets +X/+0 until end of turn, where X is the number of creature cards in your graveyard, then you may have CARDNAME fight that creature.
SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ X | References$ X | SubAbility$ DBFight SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ X | References$ X | SubAbility$ DBFight
SVar:DBFight:DB$ Fight | Defined$ Self | ValidTgts$ Creature.withFlying+YouDontCtrl | TgtPrompt$ Select target creature with flying you don't control | TargetMin$ 0 | TargetMax$ 1 SVar:DBFight:DB$ Fight | Defined$ Self | ValidTgts$ Creature.withFlying+YouDontCtrl | TgtPrompt$ Select target creature with flying you don't control | TargetMin$ 0 | TargetMax$ 1 | Optional$ True
SVar:X:Count$TypeInYourYard.Creature SVar:X:Count$TypeInYourYard.Creature
Oracle:Reach\nUndergrowth — When Kraul Harpooner enters the battlefield, choose up to one target creature with flying you don't control. Kraul Harpooner gets +X/+0 until end of turn, where X is the number of creature cards in your graveyard, then you may have Kraul Harpooner fight that creature. Oracle:Reach\nUndergrowth — When Kraul Harpooner enters the battlefield, choose up to one target creature with flying you don't control. Kraul Harpooner gets +X/+0 until end of turn, where X is the number of creature cards in your graveyard, then you may have Kraul Harpooner fight that creature.

View File

@@ -1833,6 +1833,8 @@ lblDoYouWantEndTurn=Möchtest du den Zug beenden?
#ExploreEffect.java #ExploreEffect.java
lblRevealedForExplore=Zeige offen vor zum Erkunden lblRevealedForExplore=Zeige offen vor zum Erkunden
lblPutThisCardToYourGraveyard=Lege diese Karte auf deinen Friedhof? lblPutThisCardToYourGraveyard=Lege diese Karte auf deinen Friedhof?
#FightEffect.java
lblWouldYouLikeFight=Möchtest du dass {0} gegen {1} kämpfen?
#FlipCoinEffect.java #FlipCoinEffect.java
lblHeads=Kopf lblHeads=Kopf
lblTails=Zahl lblTails=Zahl

View File

@@ -1833,6 +1833,8 @@ lblDoYouWantEndTurn=Do you want to end the turn?
#ExploreEffect.java #ExploreEffect.java
lblRevealedForExplore=Revealed for Explore lblRevealedForExplore=Revealed for Explore
lblPutThisCardToYourGraveyard=Put this card in your graveyard? lblPutThisCardToYourGraveyard=Put this card in your graveyard?
#FightEffect.java
lblWouldYouLikeFight=Do you want {0} to fight {1}?
#FlipCoinEffect.java #FlipCoinEffect.java
lblHeads=heads lblHeads=heads
lblTails=tails lblTails=tails

View File

@@ -1833,6 +1833,8 @@ lblDoYouWantEndTurn=¿Quieres terminar el turno?
#ExploreEffect.java #ExploreEffect.java
lblRevealedForExplore=Revelado para Explorar lblRevealedForExplore=Revelado para Explorar
lblPutThisCardToYourGraveyard=¿Poner esta carta en tu cementerio? lblPutThisCardToYourGraveyard=¿Poner esta carta en tu cementerio?
#FightEffect.java
lblWouldYouLikeFight=¿Quieres que {0} luche contra {1}?
#FlipCoinEffect.java #FlipCoinEffect.java
lblHeads=cara lblHeads=cara
lblTails=cruz lblTails=cruz