mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Fix Archangel of Strife
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user