mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28: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");
|
final String type = sa.getParam("Type");
|
||||||
StringBuilder sb = new StringBuilder("b_0_0_");
|
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 String tokenScript = sb.toString();
|
||||||
final int amount = AbilityUtils.calculateAmount(host, sa.getParamOrDefault("Num", "1"), sa);
|
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);
|
return mapParams.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOriginalParam(String key) {
|
||||||
|
return originalMapParams.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean hasParam(String key) {
|
public boolean hasParam(String key) {
|
||||||
return mapParams.containsKey(key);
|
return mapParams.containsKey(key);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class AmassEffect extends TokenEffectBase {
|
|||||||
MutableBoolean combatChanged = new MutableBoolean(false);
|
MutableBoolean combatChanged = new MutableBoolean(false);
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder("b_0_0_");
|
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);
|
final Card result = TokenInfo.getProtoType(sb.toString(), sa, activator, false);
|
||||||
// need to alter the token to add the Type from the Parameter
|
// need to alter the token to add the Type from the Parameter
|
||||||
|
|||||||
Reference in New Issue
Block a user