Merge branch 'bell_borca' into 'master'

CMR: Bell Borca and support

See merge request core-developers/forge!3361
This commit is contained in:
Michael Kamensky
2020-11-09 04:39:01 +00:00
2 changed files with 25 additions and 2 deletions

View File

@@ -1,10 +1,13 @@
package forge.game.ability.effects;
import forge.game.ability.AbilityKey;
import forge.game.ability.AbilityUtils;
import forge.game.ability.SpellAbilityEffect;
import forge.game.card.Card;
import forge.game.card.CardFactoryUtil;
import forge.game.spellability.SpellAbility;
import forge.game.trigger.Trigger;
import forge.game.trigger.TriggerHandler;
import forge.util.TextUtil;
public class StoreSVarEffect extends SpellAbilityEffect {
@@ -50,9 +53,11 @@ public class StoreSVarEffect extends SpellAbilityEffect {
expr = TextUtil.fastReplace(expr, exprMathVar, Integer.toString(exprMath));
}
value = CardFactoryUtil.xCount(source, "SVar$" + expr);
}
else if (type.equals("Targeted")) {
} else if (type.equals("Targeted")) {
value = CardFactoryUtil.handlePaid(sa.findTargetedCards(), expr, source);
} else if (type.equals("Triggered")) {
Card trigCard = (Card)sa.getTriggeringObject(AbilityKey.Card);
value = CardFactoryUtil.xCount(trigCard, expr);
} else if (type.equals("Calculate")) {
value = AbilityUtils.calculateAmount(source, expr, sa);
}

View File

@@ -0,0 +1,18 @@
Name:Bell Borca, Spectral Sergeant
ManaCost:2 B R
Types:Legendary Creature Spirit Soldier
PT:*/5
Text:Note the converted mana cost of each card as it's put into exile.
T:Mode$ ChangesZone | Destination$ Exile | ValidCard$ Card | TriggerZones$ Battlefield | Execute$ TrigNoteNum | Static$ True
SVar:TrigNoteNum:DB$ StoreSVar | SVar$ ExiledCMC | Type$ Triggered | Expression$ CardManaCost | ConditionCheckSVar$ X | ConditionSVarCompare$ GTExiledCMC | References$ X,ExiledCMC
SVar:ExiledCMC:Number$0
SVar:X:TriggeredCard$CardManaCost
T:Mode$ TurnBegin | Execute$ TrigReset | Static$ True
SVar:TrigReset:DB$ StoreSVar | SVar$ ExiledCMC | Type$ Number | Expression$ 0
S:Mode$ Continuous | EffectZone$ Battlefield | Affected$ Card.Self | SetPower$ ExiledCMC | References$ ExiledCMC | Description$ CARDNAME's power is equal to the greatest number noted for it this turn.
T:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ PseudoDraw | TriggerDescription$ At the beginning of your upkeep, exile the top card of your library. You may play that card this turn.
SVar:PseudoDraw:DB$ Dig | Defined$ You | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ MayPlay | SubAbility$ DBCleanup | ExileOnMoved$ Exile
SVar:MayPlay:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may play the exiled card this turn.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
Oracle:Note the converted mana cost of each card as it's put into exile.\Bell Borca, Spectral Sergeant's power is equal to the greatest number noted for it this turn.\nAt the beginning of your upkeep, exile the top card of your library. You may play that card this turn.