mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
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:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
16
forge-gui/res/cardsfolder/upcoming/ogre_battlecaster.txt
Normal file
16
forge-gui/res/cardsfolder/upcoming/ogre_battlecaster.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
Name:Ogre Battlecaster
|
||||
ManaCost:2 R
|
||||
Types:Creature Ogre Shaman
|
||||
PT:3/3
|
||||
K:First Strike
|
||||
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigDT | TriggerDescription$ Whenever CARDNAME attacks, you may cast target instant or sorcery card from your graveyard by paying {R}{R} in addition to its other costs. If that spell would be put into a graveyard, exile it instead. When you cast that spell, CARDNAME gets +X/+0 until end of turn, where X is that spell's mana value.
|
||||
SVar:TrigDT:DB$ DelayedTrigger | ValidTgts$ Instant.YouOwn,Sorcery.YouOwn | TgtZone$ Graveyard | TgtPrompt$ Select target instant or sorcery card | Mode$ SpellCast | ValidCard$ Card.IsTriggerRemembered | Execute$ TrigPump | RememberObjects$ Targeted | SubAbility$ DBPlay | TriggerDescription$ When you cast that spell, CARDNAME gets +X/+0 until end of turn, where X is that spell's mana value.
|
||||
SVar:DBPlay:DB$ Play | Defined$ Targeted | ValidSA$ Spell | ReplaceGraveyard$ Exile | PlayRaiseCost$ R R | Optional$ True | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearTriggered$ True
|
||||
SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ +X
|
||||
SVar:X:TriggeredStackInstance$CardManaCostLKI
|
||||
AI:RemoveDeck:All
|
||||
SVar:HasAttackEffect:TRUE
|
||||
DeckHints:Type$Instant|Sorcery
|
||||
DeckHas:Ability$Graveyard
|
||||
Oracle:First strike\nWhenever Ogre Battlecaster attacks, you may cast target instant or sorcery card from your graveyard by paying {R}{R} in addition to its other costs. If that spell would be put into a graveyard, exile it instead. When you cast that spell, Ogre Battlecaster gets +X/+0 until end of turn, where X is that spell's mana value.
|
||||
Reference in New Issue
Block a user