mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Merge branch 'fixCountersAddedThisTurn' into 'master'
Enable Trigger/Replacements to use CountersAddedThisTurn See merge request core-developers/forge!3821
This commit is contained in:
@@ -18,6 +18,7 @@ import forge.game.CardTraitBase;
|
|||||||
import forge.game.Game;
|
import forge.game.Game;
|
||||||
import forge.game.GameEntity;
|
import forge.game.GameEntity;
|
||||||
import forge.game.GameObject;
|
import forge.game.GameObject;
|
||||||
|
import forge.game.TriggerReplacementBase;
|
||||||
import forge.game.ability.AbilityFactory.AbilityRecordType;
|
import forge.game.ability.AbilityFactory.AbilityRecordType;
|
||||||
import forge.game.card.*;
|
import forge.game.card.*;
|
||||||
import forge.game.cost.Cost;
|
import forge.game.cost.Cost;
|
||||||
@@ -1799,6 +1800,14 @@ public class AbilityUtils {
|
|||||||
return CardFactoryUtil.doXMath(v, expr, c);
|
return CardFactoryUtil.doXMath(v, expr, c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (ctb instanceof TriggerReplacementBase) {
|
||||||
|
if (l[0].startsWith("CountersAddedThisTurn")) {
|
||||||
|
final String[] parts = l[0].split(" ");
|
||||||
|
CounterType cType = CounterType.getType(parts[1]);
|
||||||
|
|
||||||
|
return CardFactoryUtil.doXMath(game.getCounterAddedThisTurn(cType, parts[2], parts[3], c, ctb.getHostCard().getController(), null), expr, c);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return CardFactoryUtil.xCount(c, s2);
|
return CardFactoryUtil.xCount(c, s2);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user