mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
TokenEffect: use sa instead of root
This commit is contained in:
@@ -18,9 +18,7 @@
|
|||||||
package forge.game.ability.effects;
|
package forge.game.ability.effects;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import forge.StaticData;
|
import forge.StaticData;
|
||||||
import forge.card.MagicColor;
|
import forge.card.MagicColor;
|
||||||
@@ -281,10 +279,10 @@ public class TokenEffect extends SpellAbilityEffect {
|
|||||||
if (prototype == null) {
|
if (prototype == null) {
|
||||||
tokens = tokenInfo.makeTokenWithMultiplier(controller, finalAmount, cause != null);
|
tokens = tokenInfo.makeTokenWithMultiplier(controller, finalAmount, cause != null);
|
||||||
grantHiddenKeywords(tokens);
|
grantHiddenKeywords(tokens);
|
||||||
grantSvars(tokens, root);
|
grantSvars(tokens, sa);
|
||||||
grantAbilities(tokens, root);
|
grantAbilities(tokens, sa);
|
||||||
grantTriggers(tokens, root);
|
grantTriggers(tokens, sa);
|
||||||
grantStatics(tokens, root);
|
grantStatics(tokens, sa);
|
||||||
} else {
|
} else {
|
||||||
tokens = TokenInfo.makeTokensFromPrototype(prototype, controller, finalAmount, cause != null);
|
tokens = TokenInfo.makeTokensFromPrototype(prototype, controller, finalAmount, cause != null);
|
||||||
}
|
}
|
||||||
@@ -352,7 +350,6 @@ public class TokenEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String determineTokenColor(Card host) {
|
private String determineTokenColor(Card host) {
|
||||||
Set<String> colorSet = new HashSet<>();
|
|
||||||
final String[] substitutedColors = Arrays.copyOf(this.tokenColors, this.tokenColors.length);
|
final String[] substitutedColors = Arrays.copyOf(this.tokenColors, this.tokenColors.length);
|
||||||
for (int i = 0; i < substitutedColors.length; i++) {
|
for (int i = 0; i < substitutedColors.length; i++) {
|
||||||
if (substitutedColors[i].equals("ChosenColor")) {
|
if (substitutedColors[i].equals("ChosenColor")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user