mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Always use the original SA params when building a token script
This commit is contained in:
@@ -34,7 +34,7 @@ public class AmassAi extends SpellAbilityAi {
|
||||
}
|
||||
final String type = sa.getParam("Type");
|
||||
StringBuilder sb = new StringBuilder("b_0_0_");
|
||||
sb.append(type.toLowerCase()).append("_army");
|
||||
sb.append(sa.getOriginalParam("Type").toLowerCase()).append("_army");
|
||||
final String tokenScript = sb.toString();
|
||||
final int amount = AbilityUtils.calculateAmount(host, sa.getParamOrDefault("Num", "1"), sa);
|
||||
|
||||
|
||||
@@ -86,6 +86,10 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView,
|
||||
return mapParams.get(key);
|
||||
}
|
||||
|
||||
public String getOriginalParam(String key) {
|
||||
return originalMapParams.get(key);
|
||||
}
|
||||
|
||||
public boolean hasParam(String key) {
|
||||
return mapParams.containsKey(key);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class AmassEffect extends TokenEffectBase {
|
||||
MutableBoolean combatChanged = new MutableBoolean(false);
|
||||
|
||||
StringBuilder sb = new StringBuilder("b_0_0_");
|
||||
sb.append(type.toLowerCase()).append("_army");
|
||||
sb.append(sa.getOriginalParam("Type").toLowerCase()).append("_army");
|
||||
|
||||
final Card result = TokenInfo.getProtoType(sb.toString(), sa, activator, false);
|
||||
// need to alter the token to add the Type from the Parameter
|
||||
|
||||
Reference in New Issue
Block a user