Skip to content

Commit

Permalink
YMKM: tajic_legions_valor + support (#4898)
Browse files Browse the repository at this point in the history
  • Loading branch information
Northmoc authored Apr 2, 2024
1 parent db43f74 commit 342843f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ public void resolve(SpellAbility sa) {
}

if (!faces.isEmpty()) {
if (sa.hasParam("Filter")) {
List<ICardFace> filtered = new ArrayList<>();
for (ICardFace face : faces) {
PaperCard pc = StaticData.instance().getCommonCards().getUniqueByName(face.getName());
if (Card.fromPaperCard(pc, player).isValid(sa.getParam("Filter"), player, source, sa)) filtered.add(face);
}
faces = filtered;
if (faces.isEmpty()) continue;
}
int i = sa.hasParam("SpellbookAmount") ?
AbilityUtils.calculateAmount(source, sa.getParam("SpellbookAmount"), sa) : 1;
while (i > 0) {
Expand Down
11 changes: 5 additions & 6 deletions forge-gui/res/cardsfolder/b/brazen_boarding.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Name:Brazen Boarding
ManaCost:2 U R
Types:Sorcery
A:SP$ DealDamage | ValidTgts$ Creature,Planeswalker | TgtPrompt$ Select target creature or planeswalker | NumDmg$ 4 | ExcessSVar$ X | SubAbility$ DBConjureOne | SpellDescription$ CARDNAME deals 4 damage to target creature or planeswalker. If excess damage is dealt this way, conjure a card with mana value equal to that excess damage from CARDNAME's spellbook onto the battlefield.
SVar:DBConjureOne:DB$ MakeCard | Name$ Spyglass Siren | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ1 | Zone$ Battlefield | Conjure$ True | SubAbility$ DBConjureTwo
SVar:DBConjureTwo:DB$ MakeCard | Name$ Staunch Crewmate | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ2 | Zone$ Battlefield | Conjure$ True | SubAbility$ DBConjureThree
SVar:DBConjureThree:DB$ MakeCard | Name$ Corsair Captain | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ3 | Zone$ Battlefield | Conjure$ True | SubAbility$ DBConjureFinal
SVar:DBConjureFinal:DB$ MakeCard | Name$ Admiral Beckett Brass | ConditionCheckSVar$ X | ConditionSVarCompare$ GE4 | Zone$ Battlefield | Conjure$ True | SpellDescription$ If that excess damage is 4 or greater, instead conjure a card named Admiral Beckett Brass onto the battlefield.
A:SP$ DealDamage | ValidTgts$ Creature,Planeswalker | TgtPrompt$ Select target creature or planeswalker | NumDmg$ 4 | ExcessSVar$ X | SubAbility$ DBBranch | SpellDescription$ CARDNAME deals 4 damage to target creature or planeswalker.
SVar:DBBranch:DB$ Branch | BranchConditionSVar$ X | TrueSubAbility$ Captain | FalseSubAbility$ Crew | BranchConditionSVarCompare$ GE4 | StackDescription$ SpellDescription | SpellDescription$ If excess damage is dealt this way, conjure a card with mana value equal to that excess damage from CARDNAME's spellbook onto the battlefield. If that excess damage is 4 or greater, instead conjure a card named Admiral Beckett Brass onto the battlefield.
SVar:Crew:DB$ MakeCard | Filter$ Card.cmcEQX | Spellbook$ Spyglass Siren,Staunch Crewmate,Corsair Captain | Zone$ Battlefield | Conjure$ True
SVar:Captain:DB$ MakeCard | Name$ Admiral Beckett Brass | Zone$ Battlefield | Conjure$ True
DeckHints:Type$Pirate
DeckHas:Type$Pirate|Map|Human & Ability$Token
DeckHas:Type$Pirate|Siren|Human & Ability$Token
Oracle:Brazen Boarding deals 4 damage to target creature or planeswalker. If excess damage is dealt this way, conjure a card with mana value equal to that excess damage from Brazen Boarding's spellbook onto the battlefield. If that excess damage is 4 or greater, instead conjure a card named Admiral Beckett Brass onto the battlefield.
15 changes: 15 additions & 0 deletions forge-gui/res/cardsfolder/upcoming/tajic_legions_valor.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Name:Tajic, Legion's Valor
ManaCost:2 R W
Types:Legendary Creature Human Soldier
PT:1/1
K:Indestructible
K:Haste
T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of combat on your turn, put a +1/+1 counter on CARDNAME. Then conjure a card with mana value equal to the number of +1/+1 counters on it from CARDNAME's spellbook onto the battlefield. It gains haste until end of turn and attacks this combat if able.
SVar:TrigPutCounter:DB$ PutCounter | CounterType$ P1P1 | SubAbility$ DBConjure
SVar:DBConjure:DB$ MakeCard | Conjure$ True | Filter$ Card.cmcEQCount$CardCounters.P1P1 | Spellbook$ Aurelia; the Law Above,Boros Recruit,Skyknight Legionnaire,Spark Trooper,Swiftblade Vindicator | Zone$ Battlefield | RememberMade$ True | SubAbility$ DBPumpTurn
SVar:DBPumpTurn:DB$ Pump | Defined$ Remembered | KW$ Haste | SubAbility$ DBPumpCombat
SVar:DBPumpCombat:DB$ Animate | Defined$ Remembered | staticAbilities$ MustAttack | Duration$ UntilEndOfCombat | SubAbility$ DBCleanup
SVar:MustAttack:Mode$ MustAttack | ValidCreature$ Card.Self | Description$ This creature attacks this combat if able.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
DeckHas:Ability$Counters
Oracle:Indestructible, haste\nAt the beginning of combat on your turn, put a +1/+1 counter on Tajic, Legion's Valor. Then conjure a card with mana value equal to the number of +1/+1 counters on it from Tajic, Legion's Valor's spellbook onto the battlefield. It gains haste until end of turn and attacks this combat if able.

0 comments on commit 342843f

Please sign in to comment.