InvestigateEffect - support Optional and RememberInvestigatingPlayers

This commit is contained in:
Northmoc
2021-10-18 10:33:21 -04:00
parent e29407d868
commit d095dc7156
7 changed files with 22 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
package forge.game.ability.effects; package forge.game.ability.effects;
import forge.util.Localizer;
import org.apache.commons.lang3.mutable.MutableBoolean; import org.apache.commons.lang3.mutable.MutableBoolean;
import forge.game.Game; import forge.game.Game;
@@ -38,6 +39,11 @@ public class InvestigateEffect extends TokenEffectBase {
// Investigate in Sequence // Investigate in Sequence
for (final Player p : getTargetPlayers(sa)) { for (final Player p : getTargetPlayers(sa)) {
for (int i = 0; i < amount; i++) { for (int i = 0; i < amount; i++) {
if (sa.hasParam("Optional") && !p.getController().confirmAction(sa, null,
Localizer.getInstance().getMessage("lblWouldYouLikeInvestigate"))) {
return;
}
CardZoneTable triggerList = new CardZoneTable(); CardZoneTable triggerList = new CardZoneTable();
MutableBoolean combatChanged = new MutableBoolean(false); MutableBoolean combatChanged = new MutableBoolean(false);
@@ -46,6 +52,10 @@ public class InvestigateEffect extends TokenEffectBase {
triggerList.triggerChangesZoneAll(game, sa); triggerList.triggerChangesZoneAll(game, sa);
p.addInvestigatedThisTurn(); p.addInvestigatedThisTurn();
if (sa.hasParam("RememberInvestigatingPlayers")) {
card.addRemembered(p);
}
game.fireEvent(new GameEventTokenCreated()); game.fireEvent(new GameEventTokenCreated());
if (combatChanged.isTrue()) { if (combatChanged.isTrue()) {

View File

@@ -1923,6 +1923,8 @@ lblTails=Zahl
lblCallCoinFlip=Kopf oder Zahl lblCallCoinFlip=Kopf oder Zahl
lblWin=Gewonnen lblWin=Gewonnen
lblLose=Verloren lblLose=Verloren
#InvestigateEffect.java
lblWouldYouLikeInvestigate=Do you want to investigate?
#LifeSetEffect.java #LifeSetEffect.java
lblLifeTotal=Lebenspunkte lblLifeTotal=Lebenspunkte
#ManaEffect.java #ManaEffect.java

View File

@@ -1924,6 +1924,8 @@ lblTails=tails
lblCallCoinFlip=Call coin flip lblCallCoinFlip=Call coin flip
lblWin=win lblWin=win
lblLose=lose lblLose=lose
#InvestigateEffect.java
lblWouldYouLikeInvestigate=Do you want to investigate?
#LifeSetEffect.java #LifeSetEffect.java
lblLifeTotal=Life Total lblLifeTotal=Life Total
#ManaEffect.java #ManaEffect.java

View File

@@ -1922,6 +1922,8 @@ lblTails=cruz
lblCallCoinFlip=Llamar al lanzamiento de la moneda lblCallCoinFlip=Llamar al lanzamiento de la moneda
lblWin=gana lblWin=gana
lblLose=pierde lblLose=pierde
#InvestigateEffect.java
lblWouldYouLikeInvestigate=¿Quieres investigar?
#LifeSetEffect.java #LifeSetEffect.java
lblLifeTotal=Vida total lblLifeTotal=Vida total
#ManaEffect.java #ManaEffect.java

View File

@@ -1921,6 +1921,8 @@ lblTails=croce
lblCallCoinFlip=Scegli testa o croce lblCallCoinFlip=Scegli testa o croce
lblWin=hai vinto lblWin=hai vinto
lblLose=hai perso lblLose=hai perso
#InvestigateEffect.java
lblWouldYouLikeInvestigate=Do you want to investigate?
#LifeSetEffect.java #LifeSetEffect.java
lblLifeTotal=Punti Vita lblLifeTotal=Punti Vita
#ManaEffect.java #ManaEffect.java

View File

@@ -1921,6 +1921,8 @@ lblTails=裏
lblCallCoinFlip=コイン投げを予想 lblCallCoinFlip=コイン投げを予想
lblWin=勝ち lblWin=勝ち
lblLose=負け lblLose=負け
#InvestigateEffect.java
lblWouldYouLikeInvestigate=Do you want to investigate?
#LifeSetEffect.java #LifeSetEffect.java
lblLifeTotal=総ライフ値 lblLifeTotal=総ライフ値
#ManaEffect.java #ManaEffect.java

View File

@@ -1925,6 +1925,8 @@ lblTails=背面
lblCallCoinFlip=掷骰子 lblCallCoinFlip=掷骰子
lblWin= lblWin=
lblLose= lblLose=
#InvestigateEffect.java
lblWouldYouLikeInvestigate=Do you want to investigate?
#LifeSetEffect.java #LifeSetEffect.java
lblLifeTotal=生命总数 lblLifeTotal=生命总数
#ManaEffect.java #ManaEffect.java