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;
import forge.util.Localizer;
import org.apache.commons.lang3.mutable.MutableBoolean;
import forge.game.Game;
@@ -38,6 +39,11 @@ public class InvestigateEffect extends TokenEffectBase {
// Investigate in Sequence
for (final Player p : getTargetPlayers(sa)) {
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();
MutableBoolean combatChanged = new MutableBoolean(false);
@@ -46,6 +52,10 @@ public class InvestigateEffect extends TokenEffectBase {
triggerList.triggerChangesZoneAll(game, sa);
p.addInvestigatedThisTurn();
if (sa.hasParam("RememberInvestigatingPlayers")) {
card.addRemembered(p);
}
game.fireEvent(new GameEventTokenCreated());
if (combatChanged.isTrue()) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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