mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Merge branch 'CounterNumFix' into 'master'
CounterPut: fix with CounterNum See merge request core-developers/forge!750
This commit is contained in:
@@ -125,7 +125,7 @@ public class CountersPutAi extends SpellAbilityAi {
|
||||
CardCollection list;
|
||||
Card choice = null;
|
||||
final String type = sa.getParam("CounterType");
|
||||
final String amountStr = sa.getParam("CounterNum");
|
||||
final String amountStr = sa.getParamOrDefault("CounterNum", "1");
|
||||
final boolean divided = sa.hasParam("DividedAsYouChoose");
|
||||
final String logic = sa.getParamOrDefault("AILogic", "");
|
||||
PhaseHandler ph = ai.getGame().getPhaseHandler();
|
||||
@@ -580,7 +580,7 @@ public class CountersPutAi extends SpellAbilityAi {
|
||||
final String type = sa.getParam("CounterType");
|
||||
final String logic = sa.getParamOrDefault("AILogic", "");
|
||||
|
||||
final String amountStr = sa.getParam("CounterNum");
|
||||
final String amountStr = sa.getParamOrDefault("CounterNum", "1");
|
||||
final boolean divided = sa.hasParam("DividedAsYouChoose");
|
||||
final int amount = AbilityUtils.calculateAmount(sa.getHostCard(), amountStr, sa);
|
||||
|
||||
@@ -660,7 +660,7 @@ public class CountersPutAi extends SpellAbilityAi {
|
||||
boolean preferred = true;
|
||||
CardCollection list;
|
||||
final String type = sa.getParam("CounterType");
|
||||
final String amountStr = sa.getParam("CounterNum");
|
||||
final String amountStr = sa.getParamOrDefault("CounterNum", "1");
|
||||
final boolean divided = sa.hasParam("DividedAsYouChoose");
|
||||
final int amount = AbilityUtils.calculateAmount(sa.getHostCard(), amountStr, sa);
|
||||
int left = amount;
|
||||
@@ -803,7 +803,8 @@ public class CountersPutAi extends SpellAbilityAi {
|
||||
if (mode == PlayerActionConfirmMode.Tribute) {
|
||||
// add counter if that opponent has a giant creature
|
||||
final List<Card> creats = player.getCreaturesInPlay();
|
||||
final int tributeAmount = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("CounterNum"), sa);
|
||||
final String amountStr = sa.getParamOrDefault("CounterNum", "1");
|
||||
final int tributeAmount = AbilityUtils.calculateAmount(sa.getHostCard(), amountStr, sa);
|
||||
|
||||
final boolean isHaste = source.hasKeyword(Keyword.HASTE);
|
||||
List<Card> threatening = CardLists.filter(creats, new Predicate<Card>() {
|
||||
@@ -862,7 +863,7 @@ public class CountersPutAi extends SpellAbilityAi {
|
||||
}
|
||||
|
||||
final CounterType type = CounterType.valueOf(sa.getParam("CounterType"));
|
||||
final String amountStr = sa.getParam("CounterNum");
|
||||
final String amountStr = sa.getParamOrDefault("CounterNum", "1");
|
||||
final int amount = AbilityUtils.calculateAmount(sa.getHostCard(), amountStr, sa);
|
||||
|
||||
final boolean isCurse = sa.isCurse();
|
||||
|
||||
@@ -37,7 +37,7 @@ public class CountersPutEffect extends SpellAbilityEffect {
|
||||
final boolean dividedAsYouChoose = sa.hasParam("DividedAsYouChoose");
|
||||
|
||||
|
||||
final int amount = AbilityUtils.calculateAmount(card, sa.getParam("CounterNum"), sa);
|
||||
final int amount = AbilityUtils.calculateAmount(card, sa.getParamOrDefault("CounterNum", "1"), sa);
|
||||
if (sa.hasParam("Bolster")) {
|
||||
sb.append("Bolster ").append(amount);
|
||||
return sb.toString();
|
||||
|
||||
Reference in New Issue
Block a user