mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Fix Reflecting Pool bug, activating player wasn't being set to controller which means the second Reflecting Pool wasn't properly filtering what it could reflect
This commit is contained in:
@@ -219,13 +219,11 @@ public final class CardUtil {
|
|||||||
parents.add(card);
|
parents.add(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
final String colorOrType = sa.getParam("ColorOrType"); // currently Color
|
final String colorOrType = sa.getParam("ColorOrType");
|
||||||
// or
|
// currently Color or Type, Type is colors + colorless
|
||||||
// Type, Type is colors
|
|
||||||
// + colorless
|
|
||||||
final String validCard = sa.getParam("Valid");
|
final String validCard = sa.getParam("Valid");
|
||||||
final String reflectProperty = sa.getParam("ReflectProperty"); // Produce
|
final String reflectProperty = sa.getParam("ReflectProperty");
|
||||||
// (Reflecting Pool) or Is (Meteor Crater)
|
// Produce (Reflecting Pool) or Is (Meteor Crater)
|
||||||
|
|
||||||
int maxChoices = 5; // Color is the default colorOrType
|
int maxChoices = 5; // Color is the default colorOrType
|
||||||
if (colorOrType.equals("Type")) {
|
if (colorOrType.equals("Type")) {
|
||||||
@@ -266,6 +264,7 @@ public final class CardUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (reflectProperty.equals("Produced")) {
|
} else if (reflectProperty.equals("Produced")) {
|
||||||
|
// Why is this name so similar to the one below?
|
||||||
final String producedColors = abMana instanceof AbilitySub ? (String) abMana.getRootAbility().getTriggeringObject("Produced") : (String) abMana.getTriggeringObject("Produced");
|
final String producedColors = abMana instanceof AbilitySub ? (String) abMana.getRootAbility().getTriggeringObject("Produced") : (String) abMana.getTriggeringObject("Produced");
|
||||||
for (final String col : Constant.Color.ONLY_COLORS) {
|
for (final String col : Constant.Color.ONLY_COLORS) {
|
||||||
final String s = MagicColor.toShortString(col);
|
final String s = MagicColor.toShortString(col);
|
||||||
@@ -281,8 +280,6 @@ public final class CardUtil {
|
|||||||
for (final Card c : cards) {
|
for (final Card c : cards) {
|
||||||
abilities.addAll(c.getManaAbility());
|
abilities.addAll(c.getManaAbility());
|
||||||
}
|
}
|
||||||
// currently reflected mana will ignore other reflected mana
|
|
||||||
// abilities
|
|
||||||
|
|
||||||
final List<SpellAbility> reflectAbilities = new ArrayList<SpellAbility>();
|
final List<SpellAbility> reflectAbilities = new ArrayList<SpellAbility>();
|
||||||
|
|
||||||
@@ -293,7 +290,8 @@ public final class CardUtil {
|
|||||||
|
|
||||||
if (ab.getApi() == ApiType.ManaReflected) {
|
if (ab.getApi() == ApiType.ManaReflected) {
|
||||||
if (!parents.contains(ab.getSourceCard())) {
|
if (!parents.contains(ab.getSourceCard())) {
|
||||||
// Recursion!
|
// Recursion! Set Activator to controller for appropriate valid comparison
|
||||||
|
ab.setActivatingPlayer(ab.getSourceCard().getController());
|
||||||
reflectAbilities.add(ab);
|
reflectAbilities.add(ab);
|
||||||
parents.add(ab.getSourceCard());
|
parents.add(ab.getSourceCard());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user