J22: Ogre Battlecaster (#2021)

* Mizzix and Ogre

* Delete mizzix_replica_rider.txt

* Update ogre_battlecaster.txt

* Add support

* Update ogre_battlecaster.txt

* Create ogre_battlecaster.txt

* Update ogre_battlecaster.txt

* Update ogre_battlecaster.txt

* Clean up

Co-authored-by: TRT <>
This commit is contained in:
squee1968
2022-12-16 05:54:39 -06:00
committed by GitHub
parent d649492a8d
commit a2f6936a32
4 changed files with 32 additions and 3 deletions

View File

@@ -544,6 +544,9 @@ public final class GameActionUtil {
if (sa.hasParam("ReduceCost")) {
result.putParam("ReduceCost", sa.getParam("ReduceCost"));
}
if (sa.hasParam("RaiseCost")) {
result.putParam("RaiseCost", sa.getParam("RaiseCost"));
}
for (OptionalCostValue v : list) {
result.getPayCosts().add(v.getCost());
result.addOptionalCost(v.getType());

View File

@@ -396,6 +396,10 @@ public class PlayEffect extends SpellAbilityEffect {
tgtSA.setSVar(reduce, sa.getSVar(reduce));
}
}
if (sa.hasParam("PlayRaiseCost")) {
String raise = sa.getParam("PlayRaiseCost");
tgtSA.putParam("RaiseCost", raise);
}
if (sa.hasParam("Madness")) {
tgtSA.setAlternativeCost(AlternativeCost.Madness);
@@ -509,7 +513,7 @@ public class PlayEffect extends SpellAbilityEffect {
final Card hostCard = sa.getHostCard();
final Game game = hostCard.getGame();
final Player controller = sa.getActivatingPlayer();
final String name = hostCard.getName() + "'s Effect";
final String name = hostCard + "'s Effect";
final String image = hostCard.getImageKey();
final Card eff = createEffect(sa, controller, name, image);

View File

@@ -81,8 +81,14 @@ public class CostAdjustment {
}
}
if (sa.hasParam("RaiseCost")) {
int n = AbilityUtils.calculateAmount(host, sa.getParam("RaiseCost"), sa);
result.add(new Cost(ManaCost.get(n), false));
String raise = sa.getParam("RaiseCost");
ManaCost mc;
if (StringUtils.isNumeric(raise)) {
mc = ManaCost.get(AbilityUtils.calculateAmount(host, raise, sa));
} else {
mc = new ManaCost(new ManaCostParser(raise));
}
result.add(new Cost(mc, false));
}
// Raise cost