Added C21, STA and STX (still in progress) sets, improved Android downloader, added/fixed primitives, added a keyword to get if a card has "X" in its cost, fixed a crash while targeting a spell on stack, added a new option "nolegend" to clone keyword in order to create a token without legendary type and rule, improved "hascnt" keyword with "anycnt" option to count all counters on a card, added a new keyword "hasstorecard" to get if a card has a stored card or not(e.g. fizzlers), added a new keyword "pgmanainstantsorcery" to count the mana value of all instants and sorceries in player graveyard, added a new keyword "currentphase" to get the current game phase.
This commit is contained in:
@@ -1758,6 +1758,72 @@ public class ImgDownloader {
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/c/b/cbcb0668-e88c-4462-b079-34f140c0277e.jpg?1614969101";
|
||||
else if(id.equals("295986t"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/4/a/4a2144f2-d4be-419e-bfca-116cedfdf18b.jpg?1614968857";
|
||||
else if(id.equals("518429t"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/f/6/f62080da-a11b-4da3-bb8f-57f543bf076a.jpg?1618767682";
|
||||
else if(id.equals("513482"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/1/8/18a2bdc8-b705-4eb5-b3a5-ff2e2ab8f312.jpg?1617901976";
|
||||
else if(id.equals("513483"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/1/8/18a2bdc8-b705-4eb5-b3a5-ff2e2ab8f312.jpg?1617901976";
|
||||
else if(id.equals("513624"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/d/9/d9131fc3-018a-4975-8795-47be3956160d.jpg?1617452954";
|
||||
else if(id.equals("513625"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/d/9/d9131fc3-018a-4975-8795-47be3956160d.jpg?1617452954";
|
||||
else if(id.equals("513626"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/c/2/c204b7ca-0904-40fa-b20c-92400fae20b8.jpg?1617583842";
|
||||
else if(id.equals("513627"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/c/2/c204b7ca-0904-40fa-b20c-92400fae20b8.jpg?1617583842";
|
||||
else if(id.equals("513628"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/b/a/ba09360a-067e-48a5-bdc5-a19fd066a785.jpg?1617453022";
|
||||
else if(id.equals("513629"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/b/a/ba09360a-067e-48a5-bdc5-a19fd066a785.jpg?1617453022";
|
||||
else if(id.equals("513630"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/0/d/0dba25e3-2b4f-45d4-965f-3834bcb359ee.jpg?1617453074";
|
||||
else if(id.equals("513631"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/0/d/0dba25e3-2b4f-45d4-965f-3834bcb359ee.jpg?1617453074";
|
||||
else if(id.equals("513632"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/d/7/d7148d24-373e-4485-860b-c3429c2337f2.jpg?1618163722";
|
||||
else if(id.equals("513633"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/d/7/d7148d24-373e-4485-860b-c3429c2337f2.jpg?1618163722";
|
||||
else if(id.equals("513634"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/8/b/8b45dc40-6827-46a7-a9b7-802be698d053.jpg?1617453130";
|
||||
else if(id.equals("513635"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/8/b/8b45dc40-6827-46a7-a9b7-802be698d053.jpg?1617453130";
|
||||
else if(id.equals("513636"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/8/e/8e4e0f81-f92b-4a3a-bb29-adcc3de211b4.jpg?1617363020";
|
||||
else if(id.equals("513637"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/8/e/8e4e0f81-f92b-4a3a-bb29-adcc3de211b4.jpg?1617363020";
|
||||
else if(id.equals("513638"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/a/a/aaa1e6be-08cc-4ccc-b2de-3511613e4fd0.jpg?1617612926";
|
||||
else if(id.equals("513639"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/a/a/aaa1e6be-08cc-4ccc-b2de-3511613e4fd0.jpg?1617612926";
|
||||
else if(id.equals("513640"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/5/b/5bd9b5cf-f018-48af-a081-995ce8ecc539.jpg?1617453238";
|
||||
else if(id.equals("513641"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/5/b/5bd9b5cf-f018-48af-a081-995ce8ecc539.jpg?1617453238";
|
||||
else if(id.equals("513642"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/1/8/18c16872-3675-4a4d-962a-2e17ad6f3886.jpg?1618326108";
|
||||
else if(id.equals("513643"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/1/8/18c16872-3675-4a4d-962a-2e17ad6f3886.jpg?1618326108";
|
||||
else if(id.equals("513644"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/8/9/8982ff88-8595-4363-8cde-6e87fb57a2d8.jpg?1617400731";
|
||||
else if(id.equals("513645"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/8/9/8982ff88-8595-4363-8cde-6e87fb57a2d8.jpg?1617400731";
|
||||
else if(id.equals("513646"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/9/3/938cee8f-ac2c-49a5-9ff7-1367d0edfabe.jpg?1617453576";
|
||||
else if(id.equals("513647"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/9/3/938cee8f-ac2c-49a5-9ff7-1367d0edfabe.jpg?1617453576";
|
||||
else if(id.equals("513648"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/8/7/87463b68-3642-41c7-a11c-67d524759b60.jpg?1617453416";
|
||||
else if(id.equals("513649"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/8/7/87463b68-3642-41c7-a11c-67d524759b60.jpg?1617453416";
|
||||
else if(id.equals("513650"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/8/c/8cfd0887-0c83-4b33-a85e-8b8ec5bf758d.jpg?1617453475";
|
||||
else if(id.equals("513651"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/8/c/8cfd0887-0c83-4b33-a85e-8b8ec5bf758d.jpg?1617453475";
|
||||
else if(id.equals("513652"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/6/5/65008352-bc7e-40b2-a832-b46813e5dc4c.jpg?1617453527";
|
||||
else if(id.equals("513653"))
|
||||
cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/back/6/5/65008352-bc7e-40b2-a832-b46813e5dc4c.jpg?1617453527";
|
||||
|
||||
return cardurl;
|
||||
}
|
||||
@@ -2153,8 +2219,8 @@ public class ImgDownloader {
|
||||
tokenurl = "https://www.mtg.onl/static/8c7fed1a0b8edd97c0fb0ceab24a654f/4d406/PROXY_Goblin_Scout_R_1_1.jpg";
|
||||
else if (id.equals("24624t"))
|
||||
tokenurl = "https://www.mtg.onl/static/6d717cba653ea9e3f6bd1419741671cb/4d406/PROXY_Minion_B_1_1.jpg";
|
||||
else if (id.equals("89051t"))
|
||||
tokenurl = "https://www.mtg.onl/static/b7625a256e10bcec251a1a0abbf17bd4/4d406/PROXY_Horror_B_4_4.jpg";
|
||||
else if (id.equals("89051t") || id.equals("519129t"))
|
||||
tokenurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/a/0/a0b5e1f4-9206-40b6-9cf6-331f6a95d045.jpg?1618767339";
|
||||
else if (id.equals("72858t"))
|
||||
tokenurl = "https://www.mtg.onl/static/348314ede9097dd8f6dd018a6502d125/4d406/PROXY_Pincher_2_2.jpg";
|
||||
else if (id.equals("3113t"))
|
||||
@@ -2254,6 +2320,17 @@ public class ImgDownloader {
|
||||
tokenurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/1/1/118d0655-5719-4512-8bc1-fe759669811b.jpg?1611206824";
|
||||
else if(id.equals("295919t"))
|
||||
tokenurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/1/1/118d0655-5719-4512-8bc1-fe759669811b.jpg?1611206824";
|
||||
else if(id.equals("518457t") || id.equals("518473t") || id.equals("518468t") || id.equals("518463t") || id.equals("518460t") ||
|
||||
id.equals("518422t"))
|
||||
tokenurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/9/1/910f48ab-b04e-4874-b31d-a86a7bc5af14.jpg?1617626097";
|
||||
else if(id.equals("518467t") || id.equals("518410t") || id.equals("518436t") || id.equals("518308t"))
|
||||
tokenurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/c/9/c9deae5c-80d4-4701-b425-91853b7ee03b.jpg?1617626050";
|
||||
else if(id.equals("518461t") || id.equals("518432t"))
|
||||
tokenurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/d/0/d0ddbe3e-4a66-494d-9304-7471232549bf.jpg?1617626099";
|
||||
else if(id.equals("518310t"))
|
||||
tokenurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/3/d/3d0b9b88-705e-4df0-8a93-3e240b81355b.jpg?1617626092";
|
||||
else if(id.equals("513663t"))
|
||||
tokenurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/1/a/1a2d027f-8996-4761-a776-47cd428f6779.jpg?1618766925";
|
||||
|
||||
return tokenurl;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,322 @@
|
||||
[meta]
|
||||
author=Wagic Team
|
||||
name=Strixhaven Mystical Archive
|
||||
orderindex=EXP-ZZJ.STA
|
||||
year=2021-04-23
|
||||
total=63
|
||||
[/meta]
|
||||
[card]
|
||||
primitive=Approach of the Second Sun
|
||||
id=517551
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Day of Judgment
|
||||
id=517552
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Defiant Strike
|
||||
id=517553
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Divine Gambit
|
||||
id=517554
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Ephemerate
|
||||
id=517555
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Gift of Estates
|
||||
id=517556
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Gods Willing
|
||||
id=517557
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Mana Tithe
|
||||
id=517558
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Revitalize
|
||||
id=517559
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Swords to Plowshares
|
||||
id=517560
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Teferi's Protection
|
||||
id=517561
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Blue Sun's Zenith
|
||||
id=517562
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Brainstorm
|
||||
id=517563
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Compulsive Research
|
||||
id=517564
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Counterspell
|
||||
id=517565
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Memory Lapse
|
||||
id=517566
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Mind's Desire
|
||||
id=517567
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Negate
|
||||
id=517568
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Opt
|
||||
id=517569
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Strategic Planning
|
||||
id=517570
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Tezzeret's Gambit
|
||||
id=517571
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Time Warp
|
||||
id=517572
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Whirlwind Denial
|
||||
id=517573
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Agonizing Remorse
|
||||
id=517574
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Crux of Fate
|
||||
id=517575
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Dark Ritual
|
||||
id=517576
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Demonic Tutor
|
||||
id=517577
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Doom Blade
|
||||
id=517578
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Duress
|
||||
id=517579
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Eliminate
|
||||
id=517580
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Inquisition of Kozilek
|
||||
id=517581
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Sign in Blood
|
||||
id=517582
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Tainted Pact
|
||||
id=517583
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Tendrils of Agony
|
||||
id=517584
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Village Rites
|
||||
id=517585
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Chaos Warp
|
||||
id=517586
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Claim the Firstborn
|
||||
id=517587
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Faithless Looting
|
||||
id=517588
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Grapeshot
|
||||
id=517589
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Increasing Vengeance
|
||||
id=517590
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Infuriate
|
||||
id=517591
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Lightning Bolt
|
||||
id=517592
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Mizzix's Mastery
|
||||
id=517593
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Shock
|
||||
id=517594
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Stone Rain
|
||||
id=517595
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Thrill of Possibility
|
||||
id=517596
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Urza's Rage
|
||||
id=517597
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Abundant Harvest
|
||||
id=517598
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Adventurous Impulse
|
||||
id=517599
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Channel
|
||||
id=517600
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Cultivate
|
||||
id=517601
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Harmonize
|
||||
id=517602
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Krosan Grip
|
||||
id=517603
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Natural Order
|
||||
id=517604
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Primal Command
|
||||
id=517605
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Regrowth
|
||||
id=517606
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Snakeskin Veil
|
||||
id=517607
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Weather the Storm
|
||||
id=517608
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Despark
|
||||
id=517609
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Electrolyze
|
||||
id=517610
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Growth Spiral
|
||||
id=517611
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Lightning Helix
|
||||
id=517612
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Putrefy
|
||||
id=517613
|
||||
rarity=R
|
||||
[/card]
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -764,6 +764,13 @@ power=1
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Battlemage's Bracers
|
||||
text=Equipped creature has haste. -- Whenever an ability of equipped creature is activated, if it isn't a mana ability, you may pay {1}. If you do, copy that ability. You may choose new targets for the copy. -- Equip {2}
|
||||
mana={2}{R}
|
||||
type=Artifact
|
||||
subtype=Equipment
|
||||
[/card]
|
||||
[card]
|
||||
name=Bazaar of Wonders
|
||||
text=When Bazaar of Wonders enters the battlefield, exile all cards from all graveyards. -- Whenever a player casts a spell, counter it if a card with the same name is in a graveyard or a nontoken permanent with the same name is on the battlefield.
|
||||
mana={3}{U}{U}
|
||||
@@ -5673,6 +5680,12 @@ type=Artifact
|
||||
subtype=Contraption
|
||||
[/card]
|
||||
[card]
|
||||
name=Inkshield
|
||||
text=Prevent all combat damage that would be dealt to you this turn. For each 1 damage prevented this way, create a 2/1 white and black Inkling creature token with flying.
|
||||
mana={3}{W}{B}
|
||||
type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Ink-Treader Nephilim
|
||||
text=Whenever a player casts an instant or sorcery spell, if Ink-Treader Nephilim is the only target of that spell, copy the spell for each other creature that spell could target. Each copy targets a different one of those creatures.
|
||||
mana={R}{G}{W}{U}
|
||||
@@ -9274,6 +9287,15 @@ text=Play cards as written. Ignore all errata. -- {T}: Add {1} to your mana pool
|
||||
type=Legendary Land
|
||||
[/card]
|
||||
[card]
|
||||
name=Radiant Performer
|
||||
text=Flash -- When Radiant Performer enters the battlefield, if you cast it from your hand, choose target spell or ability that targets only a single permanent or player. Copy that spell or ability for each other permanent or player the spell or ability could target. Each copy targets a different one of those permanents and players.
|
||||
mana={3}{R}{R}
|
||||
type=Creature
|
||||
subtype=Human Wizard
|
||||
power=2
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Radiate
|
||||
text=Choose target instant or sorcery spell that targets only a single permanent or player. Copy that spell for each other permanent or player the spell could target. Each copy targets a different one of those permanents and players.
|
||||
mana={3}{R}{R}
|
||||
@@ -9866,6 +9888,15 @@ mana={G}
|
||||
type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Ruxa, Patient Professor
|
||||
text=Whenever Ruxa, Patient Professor enters the battlefield or attacks, return target creature card with no abilities from your graveyard to your hand. -- Creatures you control with no abilities get +1/+1. -- You may have creatures you control with no abilities assign their combat damage as though they weren't blocked.
|
||||
mana={2}{G}{G}
|
||||
type=Legendary Creature
|
||||
subtype=Bear Druid
|
||||
power=4
|
||||
toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
name=S.N.E.A.K. Dispatcher
|
||||
text={2}{U}, {T}: Look at the top card of target player's library. If it has an Agents of S.N.E.A.K. watermark, you may reveal it and put it into your hand. Otherwise, put it on the top or bottom of its owner's library.
|
||||
mana={1}{U}
|
||||
|
||||
@@ -47,6 +47,7 @@ class CardDescriptor: public MTGCardInstance
|
||||
int zposition;
|
||||
int hasKickerCost;
|
||||
int hasFlashbackCost;
|
||||
int hasXCost;
|
||||
int anyCounter;
|
||||
int init();
|
||||
CardDescriptor();
|
||||
|
||||
@@ -136,6 +136,7 @@ class GameObserver{
|
||||
int isInCommandZone(MTGCardInstance * card);
|
||||
int isInHand(MTGCardInstance * card);
|
||||
int isInLibrary(MTGCardInstance * card);
|
||||
int isInStack(MTGCardInstance * card);
|
||||
virtual void Update(float dt);
|
||||
void Render();
|
||||
void ButtonPressed(PlayGuiObject*);
|
||||
|
||||
@@ -262,20 +262,21 @@ void StackAbility::Render()
|
||||
Targetable * tt = ability->getActionTc()->getTargetsFrom()[i];
|
||||
if(tt)
|
||||
{
|
||||
if( ((Damageable *)(tt))->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE )
|
||||
MTGCardInstance* card = dynamic_cast<MTGCardInstance *>(tt);
|
||||
if(!card && dynamic_cast<Spell *>(tt)) card = dynamic_cast<Spell *>(tt)->source; //Fixed crash on targeting a spell on stack by correctly casting variable tt.
|
||||
if(((Damageable *)(tt))->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE)
|
||||
{
|
||||
//fill vector
|
||||
myClones.push_back(((MTGCardInstance*)(tt)));
|
||||
|
||||
if( source->has(Constants::HIDDENFACE) && !observer->isInLibrary(((MTGCardInstance *)(tt))) )
|
||||
mytargetQuads.push_back( ((Damageable *)(tt))->getIcon() );
|
||||
else if ( !source->has(Constants::HIDDENFACE) )
|
||||
mytargetQuads.push_back( ((Damageable *)(tt))->getIcon() );
|
||||
if(card)
|
||||
myClones.push_back(card); //fill vector
|
||||
if(source->has(Constants::HIDDENFACE) && card && !observer->isInLibrary(card))
|
||||
mytargetQuads.push_back(card->getIcon()); //Fixed crash on targeting a spell on stack by correctly casting variable tt.
|
||||
else if (!source->has(Constants::HIDDENFACE) && card)
|
||||
mytargetQuads.push_back(card->getIcon()); //Fixed crash on targeting a spell on stack by correctly casting variable tt.
|
||||
else
|
||||
fmLibrary++;
|
||||
}
|
||||
//else // This was crashing the game when a permanent targeted a spell in the stack
|
||||
//mytargetQuads.push_back( ((Damageable *)(tt))->getIcon() );
|
||||
else if(card)
|
||||
mytargetQuads.push_back(card->getIcon()); //Fixed crash on targeting a spell on stack by correctly casting variable tt.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3655,6 +3655,8 @@ int AAFizzler::resolve()
|
||||
}
|
||||
}
|
||||
stack->Fizzle(sTarget, fizzleMode);
|
||||
if(!source->storedCard)
|
||||
source->storedCard = sCard; // Store the fizzled card to retrive target information later (e.g. manacost for Reinterpret)
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -5243,6 +5245,9 @@ int AACloner::resolve()
|
||||
|
||||
Spell * spell = NEW Spell(game, myClone);
|
||||
spell->source->isToken = 1;
|
||||
if(spell->source->hasType(Subtypes::TYPE_LEGENDARY) && options.find("nolegend") != string::npos){ // check if the token has to be legendary or not. (e.g. Double Major)
|
||||
spell->source->removeType(Subtypes::TYPE_LEGENDARY);
|
||||
}
|
||||
spell->resolve();
|
||||
spell->source->owner = targetPlayer;
|
||||
spell->source->lastController = targetPlayer;
|
||||
|
||||
@@ -24,6 +24,7 @@ CardDescriptor::CardDescriptor()
|
||||
zposition = -1;
|
||||
hasKickerCost = 0;
|
||||
hasFlashbackCost = 0;
|
||||
hasXCost = 0;
|
||||
compareName ="";
|
||||
nameComparisonMode = COMPARISON_NONE;
|
||||
colorComparisonMode = COMPARISON_NONE;
|
||||
@@ -275,6 +276,11 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((hasXCost == -1 && card->getManaCost()->hasX()) || (hasXCost == 1 && !card->getManaCost()->hasX()))
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
if ((tapped == -1 && card->isTapped()) || (tapped == 1 && !card->isTapped()))
|
||||
{
|
||||
match = NULL;
|
||||
|
||||
@@ -1544,6 +1544,18 @@ bool CardGui::FilterCard(MTGCard * _card,string filter)
|
||||
cd.isToken = 1;
|
||||
}
|
||||
}
|
||||
//Has x in cost
|
||||
else if (attribute.find("hasx") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd.hasXCost = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd.hasXCost = 1;
|
||||
}
|
||||
}
|
||||
//put in its zone this turn
|
||||
else if (attribute.find("fresh") != string::npos)
|
||||
{
|
||||
|
||||
@@ -1684,7 +1684,6 @@ int GameObserver::isInPlay(MTGCardInstance * card)
|
||||
}
|
||||
int GameObserver::isInGrave(MTGCardInstance * card)
|
||||
{
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
MTGGameZone * graveyard = players[i]->game->graveyard;
|
||||
@@ -1695,7 +1694,6 @@ int GameObserver::isInGrave(MTGCardInstance * card)
|
||||
}
|
||||
int GameObserver::isInExile(MTGCardInstance * card)
|
||||
{
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
MTGGameZone * exile = players[i]->game->exile;
|
||||
@@ -1706,7 +1704,6 @@ int GameObserver::isInExile(MTGCardInstance * card)
|
||||
}
|
||||
int GameObserver::isInCommandZone(MTGCardInstance * card)
|
||||
{
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
MTGGameZone * commandzone = players[i]->game->commandzone;
|
||||
@@ -1717,7 +1714,6 @@ int GameObserver::isInCommandZone(MTGCardInstance * card)
|
||||
}
|
||||
int GameObserver::isInHand(MTGCardInstance * card)
|
||||
{
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
MTGGameZone * hand = players[i]->game->hand;
|
||||
@@ -1728,7 +1724,6 @@ int GameObserver::isInHand(MTGCardInstance * card)
|
||||
}
|
||||
int GameObserver::isInLibrary(MTGCardInstance * card)
|
||||
{
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
MTGGameZone * library = players[i]->game->library;
|
||||
@@ -1737,6 +1732,16 @@ int GameObserver::isInLibrary(MTGCardInstance * card)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
int GameObserver::isInStack(MTGCardInstance * card)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
MTGGameZone * stack = players[i]->game->stack;
|
||||
if (players[i]->game->isInZone(card, stack))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
void GameObserver::cleanupPhase()
|
||||
{
|
||||
currentPlayer->cleanupPhase();
|
||||
|
||||
@@ -3267,6 +3267,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
string with = "";
|
||||
string types = "";
|
||||
string options = "";
|
||||
replace(s.begin(), s.end(), '^', ','); // To allow the usage of ^ instead of , char (e.g. using clone keyword inside transforms)
|
||||
vector<string> splitWith = parseBetween(s, "with(", ")");
|
||||
if (splitWith.size())
|
||||
{
|
||||
|
||||
@@ -957,7 +957,8 @@ int MTGCardInstance::countDuplicateCardNames()
|
||||
for(int x = 0; x < nb_cards; x++)
|
||||
{
|
||||
if(controller()->game->battlefield->cards[x]->name == this->name && !(controller()->game->battlefield->cards[x]->mutation && controller()->game->battlefield->cards[x]->parentCards.size() > 0)) // Don't count Mutated down card
|
||||
count+=1;
|
||||
if(!(this->hasType(Subtypes::TYPE_LEGENDARY) && !(controller()->game->battlefield->cards[x]->hasType(Subtypes::TYPE_LEGENDARY)))) // This fix issue when cloning a card with nolegend option (e.g. Double Major)
|
||||
count+=1;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
|
||||
@@ -519,6 +519,9 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
|
||||
if (!(copy = from->removeCard(card, doCopy)))
|
||||
return NULL; //ERROR
|
||||
|
||||
if(!card->hasType(Subtypes::TYPE_LEGENDARY) && copy->hasType(Subtypes::TYPE_LEGENDARY)) // This fix issue when cloning a card with nolegend option (e.g. Double Major)
|
||||
copy->removeType(Subtypes::TYPE_LEGENDARY);
|
||||
|
||||
// Copy all the counters of the original card... (solving the bug on comparison cards with counter before zone changing events)
|
||||
if(card->counters && doCopy && !asCopy && !inplaytoinplay){
|
||||
for (unsigned int i = 0; i < card->counters->counters.size(); i++){
|
||||
|
||||
@@ -3601,7 +3601,7 @@ void MTGNewLegend::MoveLegend(MTGCardInstance * card)
|
||||
vector<MTGAbility*>selection;
|
||||
MTGCardInstance * myClone = NEW MTGCardInstance(card, card->controller()->game);
|
||||
TargetChooserFactory tfL(game);
|
||||
tcL = tfL.createTargetChooser("*[-Mutated;share!name!]|mybattlefield",myClone); // The Mutated down cards cannot be considered as Legendary card anymore
|
||||
tcL = tfL.createTargetChooser("*[-mutated;legendary;share!name!]|mybattlefield",myClone); // The Mutated down cards cannot be considered as Legendary card anymore
|
||||
tcL->targetter = NULL;
|
||||
tcL->maxtargets = 1;
|
||||
Legendrule = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), myClone, NULL,"ownergraveyard","Put in Graveyard");
|
||||
@@ -3718,7 +3718,7 @@ void MTGNewPlaneswalker::MovePW(MTGCardInstance * card)
|
||||
vector<MTGAbility*>selection;
|
||||
MTGCardInstance * myClone = NEW MTGCardInstance(card, card->controller()->game);
|
||||
TargetChooserFactory tfL(game);
|
||||
tcP = tfL.createTargetChooser("*[share!name!]|mybattlefield",myClone);
|
||||
tcP = tfL.createTargetChooser("*[-mutated;legendary;share!name!]|mybattlefield",myClone); // The Mutated down cards cannot be considered as Legendary card anymore
|
||||
tcP->targetter = NULL;
|
||||
tcP->maxtargets = 1;
|
||||
PWrule = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), myClone, NULL,"ownergraveyard","Put in Graveyard");
|
||||
|
||||
@@ -589,6 +589,18 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
cd->isToken = 1;
|
||||
}
|
||||
}
|
||||
//Has x in cost
|
||||
else if (attribute.find("hasx") != string::npos)
|
||||
{
|
||||
if (minus)
|
||||
{
|
||||
cd->hasXCost = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cd->hasXCost = 1;
|
||||
}
|
||||
}
|
||||
//put in its zone this turn
|
||||
else if (attribute.find("fresh") != string::npos)
|
||||
{
|
||||
|
||||
@@ -588,9 +588,13 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card)
|
||||
{
|
||||
intValue = (s == "pdrewcount")?target->controller()->drawCounter:target->controller()->opponent()->drawCounter;
|
||||
}
|
||||
else if (s == "epicactivated" || s == "currentturn")
|
||||
else if (s == "epicactivated" || s == "hasstorecard")
|
||||
{
|
||||
intValue = (s == "epicactivated")?target->controller()->epic:target->getObserver()->turn;
|
||||
intValue = (s == "epicactivated")?target->controller()->epic:(target->storedCard != 0);
|
||||
}
|
||||
else if (s == "currentphase" || s == "currentturn" )
|
||||
{
|
||||
intValue = (s == "currentphase")?target->getObserver()->getCurrentGamePhase():target->getObserver()->turn;
|
||||
}
|
||||
else if (s == "canforetellcast")
|
||||
{
|
||||
@@ -603,14 +607,16 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card)
|
||||
if(Constants::MTGBasicAbilities[i] == s.substr(10))
|
||||
intValue = card->basicAbilities[i];
|
||||
}
|
||||
else if (s.find("hascnt") != string::npos) //Return the amount of specific counters on card
|
||||
else if (s.find("hascnt") != string::npos) //Return the amount of specific counters on card (use "anycnt" to count all of them e.g. Nils, Discipline Enforcer)
|
||||
{
|
||||
intValue = 0;
|
||||
if (card->counters){
|
||||
Counters * counters = card->counters;
|
||||
for(size_t i = 0; i < counters->counters.size(); ++i){
|
||||
Counter * counter = counters->counters[i];
|
||||
if(counter->name == "" && (s.substr(6) == "11" || s.substr(6) == "-1-1")){
|
||||
if(s.substr(6) == "anycnt"){
|
||||
intValue += counter->nb;
|
||||
} else if(counter->name == "" && (s.substr(6) == "11" || s.substr(6) == "-1-1")){
|
||||
if((counter->power == 1 && counter->toughness == 1 && s.substr(6) == "11") || (counter->power == -1 && counter->toughness == -1 && s.substr(6) == "-1-1")){
|
||||
intValue = counter->nb;
|
||||
break;
|
||||
@@ -843,6 +849,16 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card)
|
||||
intValue += 1;
|
||||
}
|
||||
}
|
||||
else if (s == "pgmanainstantsorcery")//Inferno Project
|
||||
{
|
||||
intValue = 0;
|
||||
for (int j = card->controller()->game->graveyard->nb_cards - 1; j >= 0; --j)
|
||||
{
|
||||
if (card->controller()->game->graveyard->cards[j]->hasType(Subtypes::TYPE_INSTANT)
|
||||
||card->controller()->game->graveyard->cards[j]->hasType(Subtypes::TYPE_SORCERY))
|
||||
intValue += card->controller()->game->graveyard->cards[j]->myconvertedcost;
|
||||
}
|
||||
}
|
||||
else if (s == "gravecardtypes")//Tarmogoyf
|
||||
{
|
||||
intValue = 0;
|
||||
|
||||
Reference in New Issue
Block a user