Fix Archangel of Strife

This commit is contained in:
tool4EvEr
2022-04-11 21:18:24 +02:00
parent ac05891bf5
commit 4c06d157bb
5 changed files with 22 additions and 14 deletions

View File

@@ -19,8 +19,8 @@ import java.util.List;
public class ChooseEntityEffect extends SpellAbilityEffect {
@Override
protected String getStackDescription(SpellAbility sa) {
return (sa.hasParam("StackDescription") ? sa.getParam("StackDescription") :
sa.getParamOrDefault("SpellDescription", "Write a Stack/SpellDescription!"));
return sa.hasParam("StackDescription") ? sa.getParam("StackDescription") :
sa.getParamOrDefault("SpellDescription", "Write a Stack/SpellDescription!");
}
@Override

View File

@@ -67,7 +67,7 @@ public class ChooseGenericEffect extends SpellAbilityEffect {
}
List<SpellAbility> chosenSAs = Lists.newArrayList();
String prompt = sa.getParamOrDefault("ChoicePrompt","Choose");
String prompt = sa.getParamOrDefault("ChoicePrompt", "Choose");
boolean random = false;
if (sa.hasParam("AtRandom")) {
random = true;

View File

@@ -42,17 +42,13 @@ public class ChoosePlayerEffect extends SpellAbilityEffect {
for (final Player p : tgtPlayers) {
if ((tgt == null) || p.canBeTargetedBy(sa)) {
// Was if (sa.getActivatingPlayer().isHuman()) but defined player was being
// overwritten by activatingPlayer (or controller if no activator was set).
// Revert if it causes issues and remove Goblin Festival from card database.
Player chosen;
if (random) {
chosen = choices.isEmpty() ? null : Aggregates.random(choices);
} else {
chosen = choices.isEmpty() ? null : p.getController().chooseSingleEntityForEffect(choices, sa, choiceDesc, null);
}
if( null != chosen ) {
if (null != chosen) {
if (sa.hasParam("Secretly")) {
card.setSecretChosenPlayer(chosen);
} else {

View File

@@ -391,7 +391,18 @@ public class PlayerProperty {
if (player.getVenturedThisTurn() < 1) {
return false;
}
}
} else if (property.startsWith("NotedFor")) {
final String key = property.substring("NotedFor".length());
for (String note : player.getNotesForName(key)) {
if (note.equals("Name:" + source.getName())) {
return true;
}
if (note.equals("Id:" + source.getId())) {
return true;
}
}
return false;
}
return true;
}