New game modes, bug fixes in primitives, improving AI, new planeswalkers type rule

New rules based on vanguard, 3 new random game modes, one is tribal and one uses any card in the game.

Several corrections and bugs fixes. Cards with x in their cost and that can target any player used to crash the game.

Teaching AI new things and changing values of efficiency.

You can have multiple "Jace" planeswalkers, you can't have two of the exact same name (no two Jace, the mind sculptor).
This commit is contained in:
Eduardo
2019-04-14 19:57:01 -05:00
parent 6eca5bea2f
commit ab1fbaa806
19 changed files with 623 additions and 3894 deletions

View File

@@ -1,4 +1,4 @@
name=Blitzkrieg
name=Mode Blitzkrieg
unlock=prx_geirkztilb
[INIT]
mode=mtg

View File

@@ -34,4 +34,58 @@ unlock_text=Blitzkrieg Mode Unlocked
teaser=Like to play fast? Unlock Blitzkrieg Mode :)
trophyroom_text=Won with more than 18 lands.
unlock_condition=type(land|myBattlefield)~morethan~18
[/award]
[/award]
[award]
name=Paradise
id=prx_paradise
unlock_img=
unlock_text=Birds of Paradise Mode Unlocked
teaser=Utopia! Bring me down to the Paradise City.
Lands you control have "{T}: Add one mana of any color."
trophyroom_text=Won with Birds of Paradise on the battlefield.
unlock_condition=type(Birds of Paradise|mybattlefield)~morethan~0
[/award]
[award]
name=Morinfen Mode
id=prx_morinfen
unlock_img=
unlock_text=Morinfen Mode Unlocked
teaser="I looked into its eyes, and its soul was so empty I saw no reflection, no light there." — Crovax
At the beginning of your upkeep, you lose 1 life for each permanent you control.
trophyroom_text=Won with less than 5 life.
unlock_condition=this(controllerlife<=6)
[/award]
[award]
name=Horde
id=prx_horde
unlock_img=
unlock_text=Tribal Horde Mode Unlocked
teaser="From shards and splinters I call forth my living horde." -Molimo, maro-sorcerer
trophyroom_text=Won with more than 25 life.
unlock_condition=this(controllerlife>=26)
[/award]
[award]
name=False God
id=prx_karona
unlock_img=
unlock_text=False God Mode Unlocked
teaser=At the beginning of your upkeep, exchange control of a permanent you control chosen at random and a permanent target opponent controls chosen at random.
trophyroom_text=Devotion to red more than 7.
unlock_condition=this(variable{type:manar}>7)
[/award]
[award]
name=Titania Mode
id=prx_titania
unlock_img=
unlock_text=Titania Mode Unlocked
teaser=Voice of the Argoth forest, defender of its creatures, and enforcer of its laws, Titania is literally an aspect of the forest itself.
You may play an additional land on each of your turns.
trophyroom_text=Devotion to green more than 7.
unlock_condition=this(variable{type:manag}>7)
[/award]

File diff suppressed because it is too large Load Diff

View File

@@ -1,412 +0,0 @@
[meta]
author=Wagic Team
name=Duel Decks: Speed vs. Cunning
block=Duel
year=2014
total=81
[/meta]
[card]
primitive=Act of Treason
id=386299
rarity=C
[/card]
[card]
primitive=Aquamorph Entity
id=386300
rarity=C
[/card]
[card]
primitive=Arc Trail
id=386301
rarity=U
[/card]
[card]
primitive=Arcanis the Omnipotent
id=386302
rarity=M
[/card]
[card]
primitive=Arrow Volley Trap
id=386303
rarity=U
[/card]
[card]
primitive=Banefire
id=386304
rarity=R
[/card]
[card]
primitive=Beetleback Chief
id=386305
rarity=U
[/card]
[card]
primitive=Bone Splinters
id=386306
rarity=C
[/card]
[card]
primitive=Coral Trickster
id=386307
rarity=C
[/card]
[card]
primitive=Dauntless Onslaught
id=386308
rarity=U
[/card]
[card]
primitive=Dregscape Zombie
id=386309
rarity=C
[/card]
[card]
primitive=Echo Tracer
id=386310
rarity=C
[/card]
[card]
primitive=Evolving Wilds
id=386311
rarity=C
[/card]
[card]
primitive=Faerie Impostor
id=386312
rarity=U
[/card]
[card]
primitive=Faerie Invaders
id=386313
rarity=C
[/card]
[card]
primitive=Fathom Seer
id=386314
rarity=C
[/card]
[card]
primitive=Fiery Fall
id=386315
rarity=C
[/card]
[card]
primitive=Flame-Kin Zealot
id=386316
rarity=U
[/card]
[card]
primitive=Fleeting Distraction
id=386317
rarity=C
[/card]
[card]
primitive=Fleshbag Marauder
id=386318
rarity=U
[/card]
[card]
primitive=Frenzied Goblin
id=386319
rarity=U
[/card]
[card]
primitive=Fury of the Horde
id=386320
rarity=R
[/card]
[card]
primitive=Ghitu Encampment
id=386321
rarity=U
[/card]
[card]
primitive=Goblin Bombardment
id=386323
rarity=U
[/card]
[card]
primitive=Goblin Deathraiders
id=386324
rarity=C
[/card]
[card]
primitive=Goblin Warchief
id=386325
rarity=U
[/card]
[card]
primitive=Hell's Thunder
id=386326
rarity=R
[/card]
[card]
primitive=Hellraiser Goblin
id=386327
rarity=U
[/card]
[card]
primitive=Hold the Line
id=386328
rarity=R
[/card]
[card]
primitive=Hussar Patrol
id=386329
rarity=C
[/card]
[card]
primitive=Impulse
id=386330
rarity=C
[/card]
[card]
primitive=Infantry Veteran
id=386331
rarity=C
[/card]
[card]
primitive=Inferno Trap
id=386332
rarity=U
[/card]
[card]
primitive=Island
id=386333
rarity=L
[/card]
[card]
primitive=Island
id=386334
rarity=L
[/card]
[card]
primitive=Island
id=386335
rarity=L
[/card]
[card]
primitive=Jeskai Elder
id=386336
rarity=U
[/card]
[card]
primitive=Kathari Bomber
id=386337
rarity=C
[/card]
[card]
primitive=Kor Hookmaster
id=386338
rarity=C
[/card]
[card]
primitive=Krenko's Command
id=386340
rarity=C
[/card]
[card]
primitive=Krenko, Mob Boss
id=386339
rarity=R
[/card]
[card]
primitive=Leonin Snarecaster
id=386341
rarity=C
[/card]
[card]
primitive=Lightning Angel
id=386342
rarity=R
[/card]
[card]
primitive=Lightning Helix
id=386343
rarity=U
[/card]
[card]
primitive=Lone Missionary
id=386344
rarity=C
[/card]
[card]
primitive=Mana Leak
id=386345
rarity=C
[/card]
[card]
primitive=Mardu Heart-Piercer
id=386346
rarity=U
[/card]
[card]
primitive=Master Decoy
id=386347
rarity=C
[/card]
[card]
primitive=Mountain
id=386348
rarity=L
[/card]
[card]
primitive=Mountain
id=386349
rarity=L
[/card]
[card]
primitive=Mountain
id=386350
rarity=L
[/card]
[card]
primitive=Mountain
id=386351
rarity=L
[/card]
[card]
primitive=Mystic Monastery
id=386352
rarity=U
[/card]
[card]
primitive=Nomad Outpost
id=386353
rarity=U
[/card]
[card]
primitive=Ogre Battledriver
id=386354
rarity=R
[/card]
[card]
primitive=Oni of Wild Places
id=386355
rarity=U
[/card]
[card]
primitive=Orcish Cannonade
id=386356
rarity=C
[/card]
[card]
primitive=Plains
id=386357
rarity=L
[/card]
[card]
primitive=Plains
id=386358
rarity=L
[/card]
[card]
primitive=Plains
id=386359
rarity=L
[/card]
[card]
primitive=Plains
id=386360
rarity=L
[/card]
[card]
primitive=Reckless Abandon
id=386361
rarity=C
[/card]
[card]
primitive=Repeal
id=386362
rarity=C
[/card]
[card]
primitive=Scourge Devil
id=386363
rarity=U
[/card]
[card]
primitive=Shambling Remains
id=386364
rarity=U
[/card]
[card]
primitive=Shock
id=386365
rarity=C
[/card]
[card]
primitive=Sparkmage Apprentice
id=386366
rarity=C
[/card]
[card]
primitive=Sphinx of Uthuun
id=386367
rarity=R
[/card]
[card]
primitive=Stave Off
id=386368
rarity=C
[/card]
[card]
primitive=Steam Augury
id=386369
rarity=R
[/card]
[card]
primitive=Stonecloaker
id=386370
rarity=U
[/card]
[card]
primitive=Swamp
id=386371
rarity=L
[/card]
[card]
primitive=Swamp
id=386372
rarity=L
[/card]
[card]
primitive=Swamp
id=386373
rarity=L
[/card]
[card]
primitive=Swift Justice
id=386374
rarity=C
[/card]
[card]
primitive=Terramorphic Expanse
id=386375
rarity=C
[/card]
[card]
primitive=Thousand Winds
id=386376
rarity=R
[/card]
[card]
primitive=Traumatic Visions
id=386377
rarity=C
[/card]
[card]
primitive=Whiplash Trap
id=386378
rarity=C
[/card]
[card]
primitive=Willbender
id=386379
rarity=U
[/card]
[card]
primitive=Zurgo Helmsmasher
id=386380
rarity=M
[/card]

View File

@@ -15,3 +15,11 @@
# Fabricate
#AUTO_DEFINE _FABRICATE_($c) transforms((,newability[choice counter(1/1.$c)],newability[choice create(Servo:Artifact Creature Servo:1/1)*$c])) ueot
# Scry, Evergreen
#AUTO_DEFINE _SCRY_($c) scry:$c scrycore delayed dontshow donothing scrycoreend scryend
# Amass, Set WAR
#AUTO_DEFINE _AMASS_($c) if type(army|mybattlefield)~morethan~0 then counter(1/1,$c) notATarget(army|myBattlefield) else create(Zombie Army:creature Zombie Army:0/0:black) and!(counter(1/1,$c) notATarget(army|myBattlefield))!
# Treasure token, Set XLN
#AUTO_DEFINE _TREASURE_ create(Treasure:Artifact Treasure:0/0:"{T}, Sacrifice this artifact: Add one mana of any color.") and!( transforms((,newability[{T}{S}:Add{W}],newability[{T}{S}:Add{U}],newability[{T}{S}:Add{R}],newability[{T}{S}:Add{B}],newability[{T}{S}:Add{G}])) forever )!

View File

@@ -512,8 +512,8 @@ type=Sorcery
[/card]
[card]
name=Relentless Dead
auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{B}:moveto(myhand)])) ueot
auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{X}:moveto(myhand) target(zombie[manacost=X]|mygraveyard)])) ueot
autograveyard=@movedTo(this|graveyard) from(battlefield):name(return relentless dead) pay({B}) moveTo(hand)
auto=@movedTo(this|graveyard) from(battlefield):choice name(rturn cost X) pay({1}) moveTo(battlefield) target(other zombie|mygraveyard)
text=Menace (This creature can't be blocked except by two or more creatures.) -- When Relentless Dead dies, you may pay {B}. If you do, return it to its owner's hand. -- When Relentless Dead dies, you may pay {X}. If you do, return another target Zombie creature card with converted mana cost X from your graveyard to the battlefield.
mana={B}{B}
abilities=menace
@@ -787,15 +787,6 @@ mana={2}{U}
type=Instant
[/card]
[card]
name=Villainous Wealth
#can't order stack
target=opponent
auto=moveto(exile) and!( if cantargetcard(*[-land;manacost<=castx]|*) then transforms((,newability[may activate castcard(normal)]])) ueot )! all(*[zpos<=castx]|mylibrary)
text=Target opponent exiles the top X cards of his or her library. You may cast any number of nonland cards with converted mana cost X or less from among them without paying their mana costs.
mana={X}{B}{G}{U}
type=Sorcery
[/card]
[card]
name=Watcher of the Roost
#missing reveal card
abilities=flying
@@ -810,14 +801,6 @@ power=2
toughness=1
[/card]
[card]
name=Wolfcaller's Howl
#wagic supports one opponent only
auto=@each my upkeep restriction{type(*|opponenthand)~morethan~3}:token(Wolf,Creature Wolf,2/2,green)
text=At the beginning of your upkeep, put X 2/2 green Wolf creature tokens onto the battlefield, where X is the number of your opponents with four or more cards in hand.
mana={3}{G}
type=Enchantment
[/card]
[card]
name=Wren's Run Vanquisher
otherrestriction=type(*[elf]|myhand)~lessthan~2
other={4}{G}

View File

@@ -4262,7 +4262,7 @@ type=Artifact
[card]
name=Ankle Shanker
abilities=haste
auto=@combat(attacking) source(this):all(creature|mybattlefield) transforms((newability[first strike ueot],newability[deathtouch ueot])) ueot
auto=@combat(attacking) source(this):all(creature|mybattlefield) transforms((,newability[first strike ueot],newability[deathtouch ueot])) ueot
text=Haste -- Whenever Ankle Shanker attacks, creatures you control gain first strike and deathtouch until end of turn.
mana={2}{R}{W}{B}
type=Creature
@@ -6189,7 +6189,7 @@ type=Sorcery
name=Artful Maneuver
target=creature
auto=2/2 ueot
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this)all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature gets +2/+2 until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={1}{W}
type=Instant
@@ -7974,7 +7974,7 @@ toughness=2
[/card]
[card]
name=Awaken the Ancient
target=mountain
target=land[mountain]
auto=transforms((Giant Creature,setpower=7,settoughness=7,red,haste))
text=Enchant Mountain -- {2}: Enchanted Mountain becomes a 7/7 red Giant creature with haste. It's still a land.
mana={1}{R}{R}{R}
@@ -8791,6 +8791,7 @@ toughness=2
[/card]
[card]
name=Balustrade Spy
abilities=flying
auto=target(player) Reveal:1 revealzone(targetedpersonslibrary) revealuntil(land|targetedpersonslibrary) optionone choice name(Look) target(*|reveal) donothing optiononeend optiontwo choice name(put in Graveyard) all(*|reveal) moveto(graveyard) optiontwoend revealend
text=Flying -- When Balustrade Spy enters the battlefield, target player reveals cards from the top of his or her library until he or she reveals a land card, then puts those cards into his or her graveyard.
mana={3}{B}
@@ -8849,10 +8850,10 @@ toughness=5
name=Bane of Progress
auto=count(type:artifact:battlefield)
auto=all(artifact|battlefield) destroy
auto=counter(1/1,1,countedamountminustype:artifact:battlefieldminusend)
auto=counter(1/1,countedamountminustype:artifact:battlefieldminusend)
auto=count(type:enchantment:battlefield)
auto=all(enchantment|battlefield) destroy
auto=counter(1/1,1,countedamountminustype:enchantment:battlefieldminusend)
auto=counter(1/1,countedamountminustype:enchantment:battlefieldminusend)
text=When Bane of Progress enters the battlefield, destroy all artifacts and enchantments. Put a +1/+1 counter on Bane of Progress for each permanent destroyed this way.
mana={4}{G}{G}
type=Creature
@@ -8992,8 +8993,8 @@ type=Instant
[card]
name=Bant Panorama
auto={T}:Add{1}
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&island;forest;plains]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&island;forest;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;island;forest;plains]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;island;forest;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Bant Panorama: Search your library for a basic Forest, Plains, or Island card and put it onto the battlefield tapped. Then shuffle your library.
type=Land
[/card]
@@ -12560,7 +12561,7 @@ toughness=1
[/card]
[card]
name=Bloodhall Priest
auto=target(creature,player) damage:2
auto=target(creature,player) damage:2 restriction{type(*|myhand)~lessthan~1}
auto=@combat(attacking) source(this) restriction{type(*|myhand)~lessthan~1}:target(creature,player) damage:2
abilities=madness
autoexile=restriction{discarded} pay({1}{b}{r}) name(pay 1BR to cast) activate name(pay 1BR to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard)
@@ -12936,8 +12937,9 @@ subtype=Aura
[/card]
[card]
name=Blue Sun's Zenith
target=player
auto=draw:X
#target=player
auto=choice name(You draw X) draw:X controller
auto=choice name(Opponent draws) draw:X target(opponent)
alias=135262
text=Target player draws X cards. Shuffle Blue Sun's Zenith into its owner's library.
mana={X}{U}{U}{U}
@@ -13796,6 +13798,7 @@ toughness=4
[/card]
[card]
name=Borborygmos Enraged
abilities=trample
auto={D(land|myhand)}:target(creature,player) damage:3
aicode=activate target(<3>*[zpos<=3]|mylibrary) name(revealed card) moveto(myhand) name(revealed card) and!(if cantargetcard(*[-land]|*) then moveto(mygraveyard))!
auto=@combatdamaged(player) from(this):reveal:3 optionone name(Reveal) target(<3>land|reveal) moveto(myhand) optiononeend optiontwo name(Send To Grave) choice all(*|reveal) moveto(mygraveyard) optiontwoend revealend
@@ -14399,8 +14402,10 @@ type=Sorcery
[/card]
[card]
name=Braingeyser
target=player
auto=draw:X
#target=player
#auto=draw:X
auto=choice name(You draw X) draw:X controller
auto=choice name(Opponent draws) draw:X target(opponent)
text=Target player draws X cards.
mana={X}{U}{U}
type=Sorcery
@@ -18237,7 +18242,7 @@ auto=choice name(red) transforms((,newability[protection from red])) ueot
auto=choice name(blue) transforms((,newability[protection from blue])) ueot
auto=choice name(black) transforms((,newability[protection from black])) ueot
auto=choice name(white) transforms((,newability[protection from white])) ueot
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature you control gains protection from the color of your choice until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={1}{W}
type=Instant
@@ -18536,7 +18541,7 @@ toughness=5
[/card]
[card]
name=Chained to the Rocks
target=mountain|mybattlefield
target=land[mountain]|mybattlefield
auto=(blink)forsrc target(creature|opponentbattlefield)
text=Enchant Mountain you control. -- When Chained to the Rocks enters the battlefield, exile target creature an opponent controls until Chained to the Rocks leaves the battlefield. That creature returns under its owner's control.)
mana={W}
@@ -19484,7 +19489,6 @@ type=Artifact
[card]
name=Chimeric Mass
auto=counter(0/0,X,Charge)
auto=counter{0%0.1.charge}/counter{0%0.1.charge} nonstatic
auto={1}:transforms((Artifact Creature Construct,setpower=counter{0%0.1.charge},settoughness=counter{0%0.1.charge})) ueot
text=Chimeric Mass enters the battlefield with X charge counters. -- {1}: Until end of turn, Chimeric Mass becomes a Construct artifact creature with "This creature's power and toughness are each equal to the number of charge counters on it."
mana={X}
@@ -19686,7 +19690,7 @@ type=Sorcery
name=Chosen by Heliod
target=creature
auto=0/2
auto=draw:1 targetcontroller
auto=draw:1 controller
text=Enchant creature. -- When Chosen by Heliod enters the battlefield, draw a card. -- Enchanted creature gets +0/+2.
mana={1}{W}
type=Enchantment
@@ -20184,10 +20188,10 @@ toughness=4
[card]
name=City of Brass
auto=@tapped(this):damage:1 controller
auto={T}:Add{U}
auto={T}:Add{R}
auto={T}:Add{W}
auto={T}:Add{U}
auto={T}:Add{B}
auto={T}:Add{R}
auto={T}:Add{G}
text=Whenever City of Brass becomes tapped, it deals 1 damage to you. -- {T}: Add one mana of any color to your mana pool.
type=Land
@@ -22224,7 +22228,7 @@ type=Instant
name=Consuming Vapors
target=player
auto=ability$! notatarget(creature|mybattlefield) dynamicability<!mytgt toughnesslifegain abilitycontroller!> sacrifice ) !$ targetedplayer
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target player sacrifices a creature. You gain life equal to that creature's toughness. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{B}
type=Sorcery
@@ -22242,7 +22246,7 @@ toughness=1
[card]
name=Contagion Clasp
auto=counter(-1/-1,1) target(creature)
auto={4}{T}:notatarget(<anyamount>*[artifact;creature;enchantment;land;planeswalker;player]) proliferate
auto={4}{T}:notatarget(<anyamount>*) propagate
text=When Contagion Clasp enters the battlefield, put a -1/-1 counter on target creature. -- {4}, Tap: Proliferate. (You choose any number of permanents and/or players with counters on them, then give each another counter of a kind already there.)
mana={2}
type=Artifact
@@ -22917,7 +22921,7 @@ text=Counter target spell if its controller is poisoned.
[/card]
[card]
name=Corrupted Roots
target=forest,plains
target=land[forest;plains]
auto=@tapped(mytgt):life:-2 targetController
text=Enchant Forest or Plains -- Whenever enchanted land becomes tapped, its controller loses 2 life.
mana={B}
@@ -23744,7 +23748,7 @@ toughness=1
[card]
name=Crimson Hellkite
abilities=flying
auto={X:red}:damage:X target(creature)
auto={X:red}{T}:damage:X target(creature)
text=Flying -- {X}, {T}: Crimson Hellkite deals X damage to target creature. Spend only red mana this way.
mana={6}{R}{R}{R}
type=Creature
@@ -25540,9 +25544,9 @@ toughness=4
[/card]
[card]
name=Damnable Pact
target=player
auto=draw:X targetedplayer
auto=life:-X targetedplayer
#target=player
auto=choice name(You draw) draw:X && life:-X controller
auto=choice name(Opponent draws) draw:X && life:-X target(opponent)
text=Target player draws X cards and loses X life.
mana={X}{B}{B}
type=Sorcery
@@ -25919,9 +25923,11 @@ type=Instant
[/card]
[card]
name=Dark Salvation
target=player
auto=token(Zombie,Creature Zombie,2/2,black)*xx targetedplayer
auto=ability$!name(Darkness) target(<upto:1>creature|Battlefield) foreach(zombie|myBattlefield) -1/-1!$ targetedplayer
#target=player
#auto=token(Zombie,Creature Zombie,2/2,black)*xx targetedplayer
#auto=ability$!name(Darkness) target(<upto:1>creature|Battlefield) foreach(zombie|myBattlefield) -1/-1!$ targetedplayer
auto=token(Zombie,Creature Zombie,2/2,black)*xx
auto=name(-X/-X) target(<upto:1>creature|Battlefield) -type:zombie:myBattlefield/-type:zombie:myBattlefield
text=Target player puts X 2/2 black Zombie creature tokens onto the battlefield, then up to one target creature gets -1/-1 until end of turn for each Zombie that player controls.
mana={X}{X}{B}
type=Sorcery
@@ -30318,7 +30324,7 @@ name=Distortion Strike
target=creature
auto=1/0 ueot
auto=unblockable ueot
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature gets +1/+0 until end of turn and is unblockable this turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={U}
type=Sorcery
@@ -30400,7 +30406,7 @@ type=Sorcery
[/card]
[card]
name=Divine Congregation
auto=choice name(target player) target(player) donothing && all(this) transforms((,newability[life:twicetype:creature:targetedpersonsbattlefield]))
auto=choice name(target player) target(player) all(this) transforms((,newability[life:twicetype:creature:targetedpersonsbattlefield]))
text=You gain 2 life for each creature target player controls. -- Suspend 5 - {1}{W} (Rather than cast this card from your hand, you may pay {1}{W} and exile it with five time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost.)
mana={3}{W}
suspend(5)={1}{w}
@@ -34183,7 +34189,7 @@ toughness=4
[/card]
[card]
name=Eight-and-a-Half-Tails
auto={1}{W}:protection from white target(creature)
auto={1}{W}:protection from white target(*|myBattlefield)
auto={1}:name(target permanent becomes white ueot) transforms((,white)) target(*) ueot
text={1}{W}: Target permanent you control gains protection from white until end of turn. -- {1}: Target spell or permanent becomes white until end of turn.
mana={W}{W}
@@ -34488,8 +34494,8 @@ type=Instant
name=Electrolyze
target=creature,player
auto=damage:1
auto=damage:1 target(creature,player)
auto=draw:1 controller
auto=damage:1 target(creature,player)
text=Electrolyze deals 2 damage divided as you choose among one or two target creatures and/or players. -- Draw a card.
mana={1}{U}{R}
type=Instant
@@ -35578,7 +35584,7 @@ auto=choice name(red) transforms((,newability[protection from red])) ueot
auto=choice name(blue) transforms((,newability[protection from blue])) ueot
auto=choice name(black) transforms((,newability[protection from black])) ueot
auto=choice name(white) transforms((,newability[protection from white])) ueot
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature you control gains protection from the color of your choice until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={W}
type=Instant
@@ -36115,7 +36121,7 @@ type=Instant
[/card]
[card]
name=Energy Bolt
auto=choice damage:X target(player)
auto=choice damage:X opponent
auto=choice life:X target(player)
text=Choose one - Energy Bolt deals X damage to target player; or target player gains X life.
mana={X}{R}{W}
@@ -36980,8 +36986,8 @@ toughness=3
[card]
name=Esper Panorama
auto={T}:Add{1}
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&swamp;island;plains]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&swamp;island;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;swamp;island;plains]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;swamp;island;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Esper Panorama: Search your library for a basic Plains, Island, or Swamp card and put it onto the battlefield tapped. Then shuffle your library.
type=Land
[/card]
@@ -39509,8 +39515,8 @@ type=Sorcery
[/card]
[card]
name=Feast of Dreams
target=creature[enchantment]
auto=destroy
auto=choice name(enchanted creature) destroy target(creature[enchanted])
auto=choice name(enchantment creature) destroy target(creature[enchantment])
text=Destroy target enchanted creature or enchantment creature.
mana={1}{B}
type=Instant
@@ -40018,7 +40024,7 @@ toughness=2
[card]
name=Fertile Ground
target=land
auto=all(this) transforms((,newability[produceextra:selectmana])) forever
auto=all(this) transforms((,newability[produceextra:selectmana] controller)) forever
text=Enchant land -- Whenever enchanted land is tapped for mana, its controller adds one mana of any color to his or her mana pool (in addition to the mana the land produces).
mana={1}{G}
type=Enchantment
@@ -41595,7 +41601,7 @@ toughness=2
[card]
name=Flayer Drone
abilities=first strike
auto=@movedto(other creature[colorless]|battlefield):target(opponent) life:-1
auto=@movedto(other creature[colorless]|mybattlefield):target(opponent) life:-1
text=Devoid (This card has no color.) -- First strike -- Whenever another colorless creature enters the battlefield under your control, target opponent loses 1 life.
mana={1}{B}{R}
abilities=devoid
@@ -44086,7 +44092,7 @@ subtype=Aura
name=Funeral Pyre
target=*|graveyard
auto=moveto(exile)
auto=token(Spirit creature,1/1,flying) targetcontroller
auto=create(Spirit:creature Spirit:1/1:white:flying) targetcontroller
text=Exile target card from a graveyard. Its owner puts a 1/1 white Spirit creature token with flying onto the battlefield.
mana={W}
type=Instant
@@ -45442,7 +45448,7 @@ toughness=4
[/card]
[card]
name=Genju of the Cedars
target=forest
target=land[forest]
auto={2}:transforms((Spirit Creature,setpower=4,settoughness=4,green)) ueot
auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this)
text=Enchant Forest -- {2}: Enchanted Forest becomes a 4/4 green Spirit creature until end of turn. It's still a land. -- When enchanted Forest is put into a graveyard, you may return Genju of the Cedars from your graveyard to your hand.
@@ -45452,7 +45458,7 @@ subtype=Aura
[/card]
[card]
name=Genju of the Falls
target=island
target=land[island]
auto={2}:transforms((Spirit Creature,setpower=3,settoughness=2,flying,blue)) ueot
auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this)
text=Enchant Island -- {2}: Enchanted Island becomes a 3/2 blue Spirit creature with flying until end of turn. It's still a land. -- When enchanted Island is put into a graveyard, you may return Genju of the Falls from your graveyard to your hand.
@@ -45462,7 +45468,7 @@ subtype=Aura
[/card]
[card]
name=Genju of the Fens
target=swamp
target=land[swamp]
auto={2}:transforms((Spirit Creature,newability[{B}:1/1],setpower=2,settoughness=2,black)) ueot
auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this)
text=Enchant Swamp -- {2}: Until end of turn, enchanted Swamp becomes a 2/2 black Spirit creature with "{B}: This creature gets +1/+1 until end of turn." It's still a land. -- When enchanted Swamp is put into a graveyard, you may return Genju of the Fens from your graveyard to your hand.
@@ -45472,7 +45478,7 @@ subtype=Aura
[/card]
[card]
name=Genju of the Fields
target=plains
target=land[plains]
auto={2}:transforms((Spirit Creature,setpower=2,settoughness=5,spiritlink,white)) ueot
auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this)
text=Enchant Plains -- {2}: Until end of turn, enchanted Plains becomes a 2/5 white Spirit creature with "Whenever this creature deals damage, its controller gains that much life." It's still a land. -- When enchanted Plains is put into a graveyard, you may return Genju of the Fields from your graveyard to your hand.
@@ -45492,7 +45498,7 @@ subtype=Aura
[/card]
[card]
name=Genju of the Spires
target=mountain
target=land[mountain]
auto={2}:transforms((Spirit Creature,setpower=6,settoughness=1,red)) ueot
auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this)
text=Enchant Mountain -- {2}: Enchanted Mountain becomes a 6/1 red Spirit creature until end of turn. It's still a land. -- When enchanted Mountain is put into a graveyard, you may return Genju of the Spires from your graveyard to your hand.
@@ -46652,11 +46658,11 @@ toughness=1
[/card]
[card]
name=Gilded Lotus
auto={T}:Add{B}{B}{B}
auto={T}:Add{G}{G}{G}
auto={T}:Add{R}{R}{R}
auto={T}:Add{U}{U}{U}
auto={T}:Add{W}{W}{W}
auto={T}:Add{U}{U}{U}
auto={T}:Add{B}{B}{B}
auto={T}:Add{R}{R}{R}
auto={T}:Add{G}{G}{G}
text={T}: Add three mana of any one color to your mana pool.
mana={5}
type=Artifact
@@ -48044,6 +48050,7 @@ type=Sorcery
[card]
name=Goblin Guide
abilities=haste
aicode=activate target(land[zpos<=1]|opponentLibrary) moveto(ownerhand)
auto=@combat(attacking) source(this):reveal:1 revealzone(opponentlibrary) optionone name(choose card) notatarget(<1>*|reveal) moveto(ownerlibrary) and!( if cantargetcard(*[land]|*) then moveto(ownerhand) )! optiononeend revealend
text=Haste -- Whenever Goblin Guide attacks, defending player reveals the top card of his or her library. If it's a land card, that player puts it into his or her hand.
mana={R}
@@ -50070,7 +50077,7 @@ toughness=3
[card]
name=Great Teacher's Decree
auto=all(creature|mybattlefield) 2/1 ueot
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Creatures you control get +2/+1 until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{W}
type=Sorcery
@@ -50847,8 +50854,8 @@ toughness=1
[card]
name=Grixis Panorama
auto={T}:Add{1}
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&mountain;island;swamp]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&mountain;island;swamp]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;mountain;island;swamp]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;mountain;island;swamp]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Grixis Panorama: Search your library for a basic Island, Swamp, or Mountain card and put it onto the battlefield tapped. Then shuffle your library.
type=Land
[/card]
@@ -55460,7 +55467,6 @@ facedown={3}
autofacedown={3}{G}{G}:morph
autofaceup=counter(1/1,5)
auto=counter(1/1,X)
auto=0/-1
auto=@movedTo(this|Graveyard) from(myBattlefield):thisforeach(counter{1/1.1}) token(Snake,Creature Snake,1/1,green)
text=Hooded Hydra enters the battlefield with X +1/+1 counters on it. -- When Hooded Hydra dies, put a 1/1 green Snake creature token onto the battlefield for each +1/+1 counter on it. -- Morph {3}G}{G}: As Hooded Hydra is turned face up, put five +1/+1 counters on it.
mana={X}{G}{G}
@@ -57662,6 +57668,7 @@ toughness=1
[/card]
[card]
name=Imposing Visage
target=creature
auto=teach(creature) menace
text=Enchant creature -- Enchanted creature can't be blocked except by two or more creatures.
mana={R}
@@ -60975,8 +60982,8 @@ toughness=1
[card]
name=Jund Panorama
auto={T}:Add{1}
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&mountain;forest;swamp]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&mountain;forest;swamp]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;mountain;forest;swamp]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;mountain;forest;swamp]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Jund Panorama: Search your library for a basic Swamp, Mountain, or Forest card and put it onto the battlefield tapped. Then shuffle your library.
type=Land
[/card]
@@ -63776,7 +63783,7 @@ toughness=2
[card]
name=Knight of the Mists
abilities=flanking
auto=pay[[{U}]] name(pay blue mana) donothing?bury
auto=pay[[{U}]] name(pay blue mana) donothing?bury target(Knight)
text=Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.) -- When Knight of the Mists enters the battlefield, you may pay {U}. If you don't, destroy target Knight and it can't be regenerated.
mana={2}{U}
type=Creature
@@ -63797,8 +63804,8 @@ toughness=2
[card]
name=Knight of the Reliquary
auto=foreach(land|mygraveyard) 1/1
aicode=activate moveTo(myBattlefield) target(land|myLibrary)
auto={T}{S(forest,plains|myBattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(land|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend
auto={T}{S(forest,plains|myBattlefield)}:moveTo(myBattlefield) target(land|myLibrary)
#auto={T}{S(forest,plains|myBattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(land|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend
text=Knight of the Reliquary gets +1/+1 for each land card in your graveyard. -- {T}, Sacrifice a Forest or Plains: Search your library for a land card, put it onto the battlefield, then shuffle your library.
mana={1}{G}{W}
type=Creature
@@ -65248,7 +65255,7 @@ subtype=Equipment
[/card]
[card]
name=Kynaios and Tiro of Meletis
auto=@each my end:draw:1 && ability$!choice draw:1 _ if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ controller && ability$!choice draw:1 _ if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ opponent
auto=@each my end:draw:1 && ability$!if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ controller && ability$!choice draw:1 _ if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ opponent
text=At the beginning of your end step, draw a card. Each player may put a land card from his or her hand onto the battlefield, then each opponent who didn't draws a card.
mana={R}{G}{W}{U}
type=Legendary Creature
@@ -68093,7 +68100,7 @@ name=Llanowar Reborn
auto=tap(noevent)
auto={T}:Add{G}
auto=counter(1/1,1)
auto=@movedto(creature|battlefield):may this(counter{1/1}) all(trigger) counter(1/1,1) && this(counter{1/1}) counter(1/1,-1)
auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
text=Llanowar Reborn enters the battlefield tapped. -- {T}: Add {G} to your mana pool. -- Graft 1 (This land enters the battlefield with a +1/+1 counter on it. Whenever a creature enters the battlefield, you may move a +1/+1 counter from this land onto it.)
type=Land
[/card]
@@ -72379,7 +72386,7 @@ toughness=3
[card]
name=Mayael the Anima
aicode=activate target(creature[power>=5;zpos<=5]|mylibrary) moveto(mybattlefield)
auto={3}{R}{G}{W}{T}:name(look) reveal:5 optionone name(Get Creature) target(creature[power >4]|reveal) moveto(mybattlefield) optiononeend optiontwo name(put on bottom) target(<5>*|reveal) bottomoflibrary optiontwoend revealend
auto={3}{R}{G}{W}{T}:name(look) reveal:5 optionone name(Get Creature) target(creature[power>=5]|reveal) moveto(mybattlefield) optiononeend optiontwo name(put on bottom) target(<5>*|reveal) bottomoflibrary optiontwoend revealend
text={3}{R}{G}{W}, {T}: Look at the top five cards of your library. You may put a creature card with power 5 or greater from among them onto the battlefield. Put the rest on the bottom of your library in any order.
mana={R}{G}{W}
type=Legendary Creature
@@ -74038,6 +74045,7 @@ type=Legendary Land
[card]
name=Mind Burst
target=player
auto=ability$!name(discard) target(*|myhand) reject!$ targetedplayer
auto=ability$!name(discard) target(<type:mind burst:graveyard>*|myhandplus1plusend) reject!$ targetedplayer
text=Target player discards X cards, where X is one plus the number of cards named Mind Burst in all graveyards.
mana={1}{B}
@@ -74687,7 +74695,7 @@ type=Instant
[/card]
[card]
name=Mirari
auto=@movedto(*[instant;sorcery]|mystack):target(trigger[to]<1>) pay[[{3}]] name(copy spell) activate name(copy spell) castcard(copied noevent)
auto=@movedto(*[instant;sorcery]|mystack):all(trigger[to]<1>) transforms((,newability[pay[[{3}]] name(copy spell) activate name(copy spell) castcard(copied noevent)])) forever
text=Whenever you cast an instant or sorcery spell, you may pay {3}. If you do, copy that spell. You may choose new targets for the copy.
mana={5}
type=Legendary Artifact
@@ -77469,7 +77477,7 @@ type=Instant
[card]
name=Murderous Redcap
abilities=persist
auto=target(creature) dynamicability<!powerstrike!>
auto=target(creature,player) dynamicability<!powerstrike!>
text=When Murderous Redcap enters the battlefield, it deals damage equal to its power to target creature or player. -- Persist (When this creature dies, if it had no -1/-1 counters on it, return it to the battlefield under its owner's control with a -1/-1 counter on it.)
mana={2}{BR}{BR}
type=Creature
@@ -78282,7 +78290,7 @@ type=Sorcery
name=Nahiri, the Harbinger
auto=counter(0/0,4,loyalty)
aicode=activate moveto(mybattlefield) notatarget(artifact,creature|mylibrary) and!( transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveTo(ownerhand)])) forever )!
auto={C(0/0,2,Loyalty)}:name(+2: Discard to draw) notatarget(*|myhand) transforms((,newability[reject and!(draw:1)!])) forever
auto={C(0/0,2,Loyalty)}:name(+2: Discard to draw)may notatarget(*|myhand) transforms((,newability[reject and!(draw:1)!])) forever
auto={C(0/0,-2,Loyalty)}:name(-2: Exile tapped Artifact or Creature) target(*[artifact;creature;tapped]) moveto(exile)
auto={C(0/0,-2,Loyalty)}:name(-2: Exile target Enchantment) target(enchantment) moveto(exile)
auto={C(0/0,-8,Loyalty)}:name(-8: Fetch) reveal:plibrarycount optionone name(choose card) target(artifact,creature|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveto(mybattlefield) and!( transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveTo(ownerhand)])) forever )!)! afterrevealedend revealend
@@ -78794,8 +78802,8 @@ toughness=1
[card]
name=Naya Panorama
auto={T}:Add{1}
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&mountain;forest;plains]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&mountain;forest;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;mountain;forest;plains]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;mountain;forest;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Naya Panorama: Search your library for a basic Mountain, Forest, or Plains card and put it onto the battlefield tapped. Then shuffle your library.
type=Land
[/card]
@@ -80930,7 +80938,7 @@ toughness=2
[card]
name=Nomads' Assembly
auto=token(Kor Soldier,Creature Kor Soldier,1/1,white)*type:creature:mybattlefield
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Put a 1/1 white Kor Soldier creature token onto the battlefield for each creature you control. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={4}{W}{W}
type=Sorcery
@@ -80959,8 +80967,8 @@ toughness=0
[/card]
[card]
name=Norin the Wary
auto=@movedTo(*|stack):(blink)ueot
auto=@combat(attacking) source(creature):(blink)ueot
auto=@movedTo(*|stack):transforms((,newability[moveto(exile)],newability[phaseactionmulti[endofturn] moveto(ownerbattlefield)]))
auto=@combat(attacking) source(creature):transforms((,newability[moveto(exile)],newability[phaseactionmulti[endofturn] moveto(ownerbattlefield)]))
text=When a player casts a spell or a creature attacks, exile Norin the Wary. Return it to the battlefield under its owner's control at the beginning of the next end step.
mana={R}
type=Legendary Creature
@@ -81639,7 +81647,7 @@ type=Enchantment
[/card]
[card]
name=Oath of Nissa
aicode=activate target(creature,land,planeswalker[zpos<=3]|mylibrary) moveto(myhand)
aicode=activate target(*[creature;land;planeswalker;zpos<=3]|mylibrary) moveto(myhand)
auto=name(look) reveal:3 optionone name(Get a card) target(<1>*[creature;land;planeswalker]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<3>*|reveal) bottomoflibrary optiontwoend revealend
auto=lord(planeswalker|mycastingzone) anytypeofmana
text=When Oath of Nissa enters the battlefield, look at the top three cards of your library. You may reveal a creature, land, or planeswalker card from among them and put it into your hand. Put the rest on the bottom of your library in any order. -- You may spend mana as though it were mana of any color to cast planeswalker spells.
@@ -82313,7 +82321,7 @@ toughness=6
name=Ojutai's Breath
target=creature
auto=freeze
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Tap target creature. It doesn't untap during its controller's next untap step. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={2}{U}
type=Instant
@@ -82321,7 +82329,7 @@ type=Instant
[card]
name=Ojutai's Summons
auto=create(Djinn Monk:Creature Djinn Monk:2/2:flying:blue)
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Put a 2/2 blue Djinn Monk creature token with flying onto the battlefield. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{U}{U}
type=Sorcery
@@ -82430,7 +82438,7 @@ toughness=2
[card]
name=Omen
aicode=name(look) activate name(look) transforms((,newability[foreach(*[zpos<=4]|mylibrary) moverandom(*[zpos<=4]) from(mylibrary) to(mylibrary)],newability[draw:1])) ueot
auto=name(Look) reveal:3 optionone name(Look) target(*|reveal) doNothing optiononeend optiontwo target(<3>*|reveal) moveto(mylibrary) optiontwoend afterrevealed transforms((,newability[choice shuffle && draw:1],newability[choice name(Cancel) draw:1])) afterrevealedend revealend
auto=name(Look) reveal:3 optionone name(Look) target(*|reveal) doNothing optiononeend optiontwo target(<3>*|reveal) moveto(mylibrary) optiontwoend afterrevealed transforms((,newability[choice shuffle && draw:1],newability[choice name(Cancel) draw:1])) afterrevealedend revealend
text=Look at the top three cards of your library, then put them back in any order. You may shuffle your library. -- Draw a card.
mana={1}{U}
type=Sorcery
@@ -82940,8 +82948,8 @@ type=Enchantment
[card]
name=Opt
aicode=activate may bottomoflibrary all(*[zpos=1]|mylibrary)
auto=name(Look) reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend
auto=draw:1
auto=name(Look) reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend
text=Look at the top card of your library. You may put that card on the bottom of your library. -- Draw a card.
mana={U}
type=Instant
@@ -83789,7 +83797,7 @@ subtype=Arcane
name=Otherworldly Outburst
target=creature
auto=1/0 ueot
auto=transforms((newability[@movedto(this|graveyard) from(battlefield):token(Eldrazi Horror)])) ueot
auto=transforms((,newability[@movedto(this|graveyard) from(battlefield):token(Eldrazi Horror)])) ueot
text=Target creature gets +1/+0 until end of turn. When that creature dies this turn, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield.
mana={R}
type=Instant
@@ -84058,8 +84066,10 @@ type=Instant
[/card]
[card]
name=Overwhelming Stampede
auto=all(creature|mybattlefield) power:highest:creature:mybattlefield/power:highest:creature:mybattlefield ueot
auto=all(creature|mybattlefield) trample ueot
auto=notatarget(creature[power=power:highest:creature:mybattlefield]|mybattlefield) transforms((,newability[all(creature|mybattlefield) dynamicability<!powerpumpboth!>,newability[all(creature|mybattlefield) trample]))
#auto=choice notatarget((creature[power=power:highest:creature:mybattlefield]|mybattlefield) transforms((,newability[all(creature)|mybattlefield] power))
#auto=all(creature|mybattlefield) /power:highest:creature:mybattlefield
#auto=all(creature|mybattlefield) trample ueot
text=Until end of turn, creatures you control gain trample and get +X/+X, where X is the greatest power among creatures you control. (If a creature you control would assign enough damage to its blockers to destroy them, you may have it assign the rest of its damage to defending player or planeswalker.)
mana={3}{G}{G}
type=Sorcery
@@ -85254,7 +85264,7 @@ type=Sorcery
[/card]
[card]
name=Peak Eruption
target=mountain
target=land[mountain]
auto=destroy
auto=Damage:3 targetController
text=Destroy target Mountain. Peak Eruption deals 3 damage to that land's controller.
@@ -88605,7 +88615,7 @@ type=Sorcery
name=Prey's Vengeance
target=creature
auto=2/2
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature gets +2/+2 until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={G}
type=Instant
@@ -89341,7 +89351,7 @@ type=Sorcery
name=Profound Journey
target=*[-instant;-sorcery]|mygraveyard
auto=moveto(ownerbattlefield)
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Return target permanent card from your graveyard to the battlefield. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={5}{W}{W}
type=Sorcery
@@ -89895,7 +89905,7 @@ type=Instant
[card]
name=Pulse of the Dross
target=player
auto=Reveal:3 revealzone(targetedpersonshand) optionone choice name(choose Discards) target(<1>*|reveal) transforms((,newability[moveto(ownerhand) and!(reject)!])) oneshot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) oneshot optiontwoend afterrevealed if type(*|myhand)~lessthan~type(*|opponenthand) then moveto(myhand) afterrevealedend revealend
auto=Reveal:3 revealzone(targetedpersonshand) optionone choice name(choose Discards) target(<1>*|reveal) transforms((,newability[moveto(ownerhand) and!(reject)!])) oneshot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) oneshot optiontwoend afterrevealed if type(*|myhand)~lessthan~type(*|opponenthand) then moveto(myhand) all(this) afterrevealedend revealend
text=Target player reveals three cards from his or her hand and you choose one of them. That player discards that card. Then if that player has more cards in hand than you, return Pulse of the Dross to its owner's hand.
mana={1}{B}{B}
type=Sorcery
@@ -91463,7 +91473,7 @@ name=Raging Ravine
auto=tap(noevent)
auto={T}:Add{R}
auto={T}:Add{G}
auto={2}{R}{G}:transforms((Elemental Creature,setpower=3,settoughness=3,red,green,newability[@combat(attacking) source(this):counter(1/1.1)])) ueot
auto={2}{R}{G}:transforms((Elemental Creature,setpower=3,settoughness=3,red,green,newability[@combat(attacking) source(this):counter(1/1.1) all(this)])) ueot
text=Raging Ravine enters the battlefield tapped. -- {T}: Add {R} or {G} to your mana pool. -- {2}{R}{G}: Until end of turn, Raging Ravine becomes a 3/3 red and green Elemental creature with "Whenever this creature attacks, put a +1/+1 counter on it." It's still a land.
type=Land
[/card]
@@ -91802,9 +91812,9 @@ toughness=6
[/card]
[card]
name=Rakdos's Return
target=opponent
auto=damage:x
auto=ability$!name(discard) target(<storedx>*|myhand) reject!$ targetedplayer
#target=opponent Game crashes when AI plays a card with cost {X} and that targets a player
auto=damage:x opponent
auto=ability$!name(discard) target(<storedx>*|myhand) reject!$ opponent
text=Rakdos's Return deals X damage to target opponent. That player discards X cards.
mana={X}{B}{R}
type=Sorcery
@@ -93060,9 +93070,9 @@ type=Sorcery
[/card]
[card]
name=Reap Intellect
target=opponent
aicode=activate notatarget(<upto:castx>*[-land]|targetedpersonshand) moveto(exile) and!( transforms((,newability[moveTo(exile) all(*[share!name!]|mygraveyard)],newability[moveTo(exile) all(*[share!name!]|myhand)],newability[moveTo(exile) and!(shuffle)! all(*[share!name!]|mylibrary)])) oneshot )!
auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) notatarget(<upto:castx>*[-land]|reveal) moveto(exile) and!( transforms((,newability[moveTo(exile) all(*[share!name!]|mygraveyard)],newability[moveTo(exile) all(*[share!name!]|myhand)],newability[moveTo(exile) and!(shuffle)! all(*[share!name!]|mylibrary)])) oneshot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend
#target=opponent Game crashes when AI plays a card with cost {X} and that targets a player
aicode=activate notatarget(<upto:castx>*[-land]|opponenthand) moveto(exile) and!( transforms((,newability[moveTo(exile) all(*[share!name!]|mygraveyard)],newability[moveTo(exile) all(*[share!name!]|myhand)],newability[moveTo(exile) and!(shuffle)! all(*[share!name!]|mylibrary)])) oneshot )!
auto=reveal:type:*:opponenthand revealzone(opponenthand) optionone name(choose card) notatarget(<upto:castx>*[-land]|reveal) moveto(exile) and!( transforms((,newability[moveTo(exile) all(*[share!name!]|mygraveyard)],newability[moveTo(exile) all(*[share!name!]|myhand)],newability[moveTo(exile) and!(shuffle)! all(*[share!name!]|mylibrary)])) oneshot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend
text=Target opponent reveals his or her hand. You choose up to X nonland cards from it and exile them. For each card exiled this way, search that player's graveyard, hand, and library for any number of cards with the same name as that card and exile them. Then that player shuffles his or her library.
mana={X}{2}{U}{B}
type=Sorcery
@@ -93555,8 +93565,8 @@ type=Instant
[card]
name=Recurring Insight
target=opponent
auto=draw:type:*:targetedpersonshand
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=draw:type:*:targetedpersonshand controller
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Draw cards equal to the number of cards in target opponent's hand. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={4}{U}{U}
type=Sorcery
@@ -101139,7 +101149,7 @@ type=Sorcery
[card]
name=Scrounging Bandar
auto=counter(1/1,2)
auto={0}{counter(1/1,-1)}:counter(1/1,1) target(creature) myUpkeepOnly
auto={0}{counter(1/1,-1)}:counter(1/1,1) target(other creature) myUpkeepOnly
text=Scrounging Bandar enters the battlefield with two +1/+1 counters on it. -- At the beginning of your upkeep, you may move any number of +1/+1 counters from Scrounging Bandar onto another target creature.
mana={1}{G}
type=Creature
@@ -101573,8 +101583,8 @@ type=Enchantment
[/card]
[card]
name=Sealed Fate
target=opponent
auto=name(Look) reveal:x revealzone(targetedpersonslibrary) optionone name(exile a card) target(*|reveal) moveto(ownerexile) optiononeend optiontwo target(<60>*|reveal) moveto(ownerlibrary) optiontwoend revealend
#target=opponent Game crashes when AI plays a card with cost {X} and that targets a player
auto=name(Look) reveal:x revealzone(opponentlibrary) optionone name(exile a card) target(<1>*|reveal) moveto(ownerexile) optiononeend optiontwo target(<60>*|reveal) moveto(ownerlibrary) optiontwoend revealend
text=Look at the top X cards of target opponent's library. Exile one of those cards and put the rest back on top of that player's library in any order.
mana={X}{U}{B}
type=Sorcery
@@ -101630,8 +101640,7 @@ toughness=1
[card]
name=Searing Blood
target=creature
auto=damage:2
auto=transforms((newability[@movedto(this|graveyard) from(battlefield):damage:3 controller])) ueot
auto=transforms((,newability[@movedto(this|graveyard) from(battlefield):damage:3 controller])) ueot && damage:2
text=Searing Blood deals 2 damage to target creature. When that creature dies this turn, Searing Blood deals 3 damage to the creature's controller.
mana={R}{R}
type=Instant
@@ -102206,6 +102215,7 @@ text=When Seismic Elemental enters the battlefield, creatures without flying can
mana={3}{R}{R}
type=Creature
subtype=Elemental
subtype=Elemental
power=4
toughness=4
[/card]
@@ -102441,8 +102451,8 @@ type=Artifact
[/card]
[card]
name=Self-Assembler
aicode=activate notatarget(creature[Assembly-Worker]|mylibrary) moveTo(ownerhand)
auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(creature[Assembly-Worker]|mylibrary) optionone name(choose card) target(creature[Assembly-Worker]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend revealend
auto=notatarget(creature[Assembly-Worker]|mylibrary) moveTo(ownerhand)
#auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(creature[Assembly-Worker]|mylibrary) optionone name(choose card) target(creature[Assembly-Worker]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend revealend
text=When Self-Assembler enters the battlefield, you may search your library for an Assembly-Worker creature card, reveal it, put it into your hand, then shuffle your library.
mana={5}
type=Artifact Creature
@@ -103568,7 +103578,7 @@ toughness=1
name=Shadowborn Demon
abilities=flying
auto=destroy target(creature[-demon])
auto=@each myupkeep:if type(creature|mygraveyard)~lessthan~6 then sacrifice
auto=@each myupkeep:if type(creature|mygraveyard)~lessthan~6 then sacrifice notatarget(creature|mybattlefield)
text=Flying -- When Shadowborn Demon enters the battlefield, destroy target non-demon creature. -- At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature.
mana={3}{B}{B}
type=Creature
@@ -105495,7 +105505,7 @@ name=Sight Beyond Sight
abilities=hiddenface
aicode=activate transforms((,newability[moveto(myhand) all(*[zpos=1]|mylibrary) && bottomoflibrary all(*[zpos=2]|mylibrary)])) ueot
auto=name(look) reveal:2 optionone name(Get a card) target(<1>*|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<2>*|reveal) bottomoflibrary optiontwoend revealend
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Look at the top two cards of your library. Put one of them into your hand and the other on the bottom of your library. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{U}
type=Sorcery
@@ -106356,7 +106366,7 @@ type=Instant
[/card]
[card]
name=Sin Collector
auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) notatarget(*[instant;sorcery]|reveal) moveto(exile) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend
auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) notatarget(<1>*[instant;sorcery]|reveal) moveto(exile) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend
text=When Sin Collector enters the battlefield target opponent reveals his or her hand. You choose an instant or a sorcery card from it and exile that card.
mana={1}{W}{B}
type=Creature
@@ -110177,7 +110187,7 @@ toughness=3
[/card]
[card]
name=Soul Tithe
target=*[-land]
target=artifact,creature,enchantment,planeswalker
auto=teach(*[manacost=1]) transforms((,newability[upcost[{1}] sacrifice]))
auto=teach(*[manacost=2]) transforms((,newability[upcost[{2}] sacrifice]))
auto=teach(*[manacost=3]) transforms((,newability[upcost[{3}] sacrifice]))
@@ -112425,7 +112435,7 @@ type=Sorcery
[/card]
[card]
name=Spreading Algae
target=swamp
target=land[swamp]
auto=@tapped(mytgt):destroy
autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(ownerhand)
text=Enchant Swamp -- When enchanted land becomes tapped, destroy it. -- When Spreading Algae is put into a graveyard from the battlefield, return Spreading Algae to its owner's hand.
@@ -112861,7 +112871,7 @@ toughness=0
name=Staggershock
target=creature,player
auto=damage:2
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Staggershock deals 2 damage to target creature or player. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={2}{R}
type=Instant
@@ -113254,7 +113264,7 @@ toughness=1
name=Stasis Cell
target=creature
text=Enchant creature -- Enchanted creature doesn't untap during its controller's untap step. -- {3}{U}: Attach Stasis Cell to target creature.
auto=doesnotuntap
auto=teach(creature) doesnotuntap
auto={3}{U}:retarget target(creature)
mana={4}{U}
type=Enchantment
@@ -113669,7 +113679,7 @@ type=Enchantment
[card]
name=Steppe Glider
abilities=flying,vigilance
auto={w}{1}:target(creature[counter{1/1.1}]) transforms((newability[flying],newability[vigilance])) ueot
auto={w}{1}:target(creature[counter{1/1.1}]) transforms((,newability[flying],newability[vigilance])) ueot
text=Flying, vigilance -- {1}{W}: Target creature with a +1/+1 counter on it gains flying and vigilance until end of turn.
mana={4}{W}
type=Creature
@@ -116049,6 +116059,7 @@ type=Enchantment
[/card]
[card]
name=Sunken Field
target=land
auto=teach(land) {T}:name(counter spell) target(*|stack) transforms((,newability[pay[[{1}]] name(pay mana) donothing?fizzle])) forever
text=Enchant land -- Enchanted land has "{T}: Counter target spell unless its controller pays {1}."
mana={1}{U}
@@ -116543,7 +116554,7 @@ toughness=1
[card]
name=Surreal Memoir
auto=moverandom(instant) from(mygraveyard) to(myhand)
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Return an instant card at random from your graveyard to your hand. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{R}
type=Sorcery
@@ -116571,7 +116582,7 @@ type=Sorcery
name=Survival Cache
auto=life:2 controller
auto=if compare(lifetotal)~morethan~compare(opponentlifetotal) then draw:1 controller
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=You gain 2 life. Then if you have more life than an opponent, draw a card. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={2}{W}
type=Sorcery
@@ -117611,7 +117622,7 @@ name=Taigam's Strike
target=creature
auto=2/0 ueot
auto=unblockable ueot
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature gets +2/+0 until end of turn and can't be blocked this turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{U}
type=Sorcery
@@ -122313,10 +122324,10 @@ type=Sorcery
[/card]
[card]
name=Timetwister
auto=moveto(opponentgraveyard) all(*|opponenthand)
auto=moveto(opponentlibrary) all(*|opponenthand)
auto=moveto(opponentlibrary) all(*|opponentgraveyard) && shuffle
auto=draw:7 opponent
auto=moveto(mygraveyard) all(*|myhand)
auto=moveto(mylibrary) all(*|myhand)
auto=moveto(mylibrary) all(*|mygraveyard) && shuffle
auto=draw:7 controller
text=Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards. (Then put Timetwister into its owner's graveyard.)
@@ -124460,8 +124471,7 @@ toughness=3
[/card]
[card]
name=Triangle of War
auto={2}{S}:name(powerstrike) target(other creature|mybattlefield) transforms((,newability[dynamicability<!powerstrike eachother!> target(creature|opponentbattlefield)])) forever
restriction=type(creature|opponentbattlefield)~morethan~0
auto={2}{S} restriction(type(creature|opponentbattlefield)~morethan~0):name(fight) target(creature|mybattlefield) transforms((,newability[dynamicability<!powerstrike eachother!> target(creature|opponentbattlefield)])) forever
text={2}, Sacrifice Triangle of War: Target creature you control fights target creature an opponent controls. (Each deals damage equal to its power to the other.)
mana={1}
type=Artifact
@@ -127278,7 +127288,7 @@ toughness=2
[/card]
[card]
name=Utopia Sprawl
target=forest
target=land[forest]
auto=choice name(green) transforms((,newability[produceextra:{g}])) forever
auto=choice name(blue) transforms((,newability[produceextra:{u}])) forever
auto=choice name(red) transforms((,newability[produceextra:{r}])) forever
@@ -129902,7 +129912,7 @@ name=Virulent Swipe
target=creature
auto=2/0 ueot
auto=deathtouch ueot
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature gets +2/+0 and gains deathtouch until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={B}
type=Instant
@@ -130484,7 +130494,7 @@ type=Sorcery
name=Void Squall
target=*[-land]
auto=moveto(ownerhand)
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Return target nonland permanent to its owner's hand. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={4}{U}
type=Sorcery
@@ -130753,7 +130763,7 @@ subtype=Aura
[/card]
[card]
name=Volrath the Fallen
auto={D(creature|myhand)}:storedmanacost/storedmanacost ueot
auto={1}{B}{D(creature|myhand)}:storedmanacost/storedmanacost ueot
text={1}{B}, Discard a creature card: Volrath the Fallen gets +X/+X until end of turn, where X is the discarded card's converted mana cost.
mana={3}{B}{B}{B}
type=Legendary Creature
@@ -133434,7 +133444,7 @@ toughness=1
[/card]
[card]
name=Weldfast Engineer
auto=@each my combatbegins:target(artifact|mybattlefield) 2/0 ueot
auto=@each my combatbegins:target(artifact[creature]|mybattlefield) 2/0 ueot
text=At the beginning of combat on your turn, target artifact creature you control gets +2/+0 until end of turn.
mana={1}{B}{R}
type=Creature
@@ -136114,7 +136124,7 @@ toughness=2
name=World at War
auto=nextphasealter(add,combatphaseswithmain,controller,after<postbattle>)
auto=untap all(creature[attacking])
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=After the first postcombat main phase this turn, there's an additional combat phase followed by an additional main phase. At the beginning of that combat, untap all creatures that attacked this turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{R}{R}
type=Sorcery

View File

@@ -15,6 +15,9 @@ typedef enum
GAME_TYPE_MOMIR,
GAME_TYPE_RANDOM1,
GAME_TYPE_RANDOM2,
GAME_TYPE_RANDOM3,
GAME_TYPE_RANDOM5,
GAME_TYPE_HORDE,
GAME_TYPE_STORY,
GAME_TYPE_DEMO,
GAME_TYPE_STONEHEWER,

View File

@@ -42,6 +42,9 @@ class Rules
protected:
Player * loadPlayerMomir(GameObserver* observer, int isAI);
Player * loadPlayerRandom(GameObserver* observer, int isAI, int mode);
Player * loadPlayerRandomThree(GameObserver* observer, int isAI);
Player * loadPlayerRandomFive(GameObserver* observer, int isAI);
Player * loadPlayerHorde(GameObserver* observer, int isAI);
Player * initPlayer(GameObserver *observer, int playerId);
MTGDeck * buildDeck(int playerId);
GameType strToGameMode(string s);

View File

@@ -12,7 +12,7 @@ Author: Michael Nguyen
/* Wagic versions */
#define WAGIC_VERSION_MAJOR 0
#define WAGIC_VERSION_MEDIUM 20
#define WAGIC_VERSION_MEDIUM 21
#define WAGIC_VERSION_MINOR 1
#define VERSION_DOT(a, b, c) a ##.## b ##.## c

View File

@@ -46,14 +46,15 @@ int OrderedAIAction::getEfficiency(AADamager * aad)
return 0;
}
if(p == target->controller())
return 0;
if(p && target)
if(p == target->controller())
return 0;
if (dTarget && aad && (aad->getDamage() >= dTarget->toughness))
return 100;
if (dTarget && dTarget->toughness)
return (50 * aad->getDamage()) / dTarget->toughness;
return (10 * aad->getDamage()) / dTarget->toughness; // Don't waste damage spells
return 0;
}
@@ -129,8 +130,12 @@ int OrderedAIAction::getEfficiency()
{
efficiency = 95;
}
//TODO If the card is the target of a damage spell
break;
//TODO If the card is the target of a damage spell
if (!coreAbilityCardTarget->regenerateTokens && (MTGCardInstance*)target == a->source)
{
efficiency = 95;
}
break;
}
case MTGAbility::STANDARD_PREVENT:
{
@@ -271,7 +276,7 @@ int OrderedAIAction::getEfficiency()
}
case MTGAbility::STANDARD_PUMP:
{
efficiency = 0;
efficiency = 0;
if(!coreAbilityCardTarget)
break;
if(!target && !dynamic_cast<ALord*> (a) && (((MTGCardInstance *)a->source)->hasSubtype(Subtypes::TYPE_AURA) || ((MTGCardInstance *)a->source)->hasSubtype(Subtypes::TYPE_EQUIPMENT)))
@@ -291,9 +296,9 @@ int OrderedAIAction::getEfficiency()
int suggestion = af.abilityEfficiency(a, p, MODE_ABILITY);
//i do not set a starting eff. on this ability, this allows Ai to sometimes randomly do it as it normally does.
int currentPhase = g->getCurrentGamePhase();
if ((currentPhase == MTG_PHASE_COMBATBLOCKERS) || (currentPhase == MTG_PHASE_COMBATATTACKERS))
if (suggestion == BAKA_EFFECT_GOOD && target->controller() == p)
{
if (suggestion == BAKA_EFFECT_GOOD && target->controller() == p)
if ((currentPhase == MTG_PHASE_COMBATBLOCKERS) || (currentPhase == MTG_PHASE_COMBATATTACKERS))
{
if(coreAbilityCardTarget->defenser || coreAbilityCardTarget->blockers.size())
{
@@ -315,6 +320,10 @@ int OrderedAIAction::getEfficiency()
efficiency -= coreAbilityCardTarget->power;//we don't need to go overboard. better to not put all your eggs in a single basket.
}
}
if (currentPhase == MTG_PHASE_FIRSTMAIN)
{
efficiency = 10;
}
}
if (suggestion == BAKA_EFFECT_BAD && target->controller() != p && target->toughness > 0)
{
@@ -326,28 +335,41 @@ int OrderedAIAction::getEfficiency()
{
if(!coreAbilityCardTarget)
break;
// It used to skip most effects, with no other condition efficiency is -1
// Becomes is generally good so setting a value, but don't want to spam it
if (coreAbilityCardTarget && !coreAbilityCardTarget->isLand())
{
// Bonus if almost no cards in hand
if (p->game->hand->nb_cards <= 1)
{
efficiency = 60;
}
else efficiency = 30;
}
//nothing huge here, just ensuring that Ai makes his noncreature becomers into creatures during first main, so it can actually use them in combat.
if (coreAbilityCardTarget && !coreAbilityCardTarget->isCreature() && currentPhase == MTG_PHASE_FIRSTMAIN)
{
efficiency = 100;
}
efficiency = 60;
}
break;
}
case MTGAbility::MANA_PRODUCER://only way to hit this condition is nested manaabilities, ai skips manaproducers by defualt when finding an ability to use.
{
AManaProducer * manamaker = dynamic_cast<AManaProducer*>(a);
GenericActivatedAbility * GAA = dynamic_cast<GenericActivatedAbility*>(ability);
AForeach * forMana = dynamic_cast<AForeach*>(GAA->ability);
if (manamaker && forMana)
{
int outPut = forMana->checkActivation();
if (ability->getCost() && outPut > int(ability->getCost()->getConvertedCost() +1) && currentPhase == MTG_PHASE_FIRSTMAIN && ability->source->controller()->game->hand->nb_cards > 1)
efficiency = 90;//might be a bit random, but better than never using them.
}
else
efficiency = 0;
break;
AManaProducer * manamaker = dynamic_cast<AManaProducer*>(a);
GenericActivatedAbility * GAA = dynamic_cast<GenericActivatedAbility*>(ability);
if(GAA)
{
AForeach * forMana = dynamic_cast<AForeach*>(GAA->ability);
if (manamaker && forMana)
{
int outPut = forMana->checkActivation();
if (ability->getCost() && outPut > int(ability->getCost()->getConvertedCost() +1) && currentPhase == MTG_PHASE_FIRSTMAIN && ability->source->controller()->game->hand->nb_cards > 1)
efficiency = 60;//might be a bit random, but better than never using them.
}
}
else
efficiency = 0;
break;
}
case MTGAbility::STANDARDABILITYGRANT:
{
@@ -426,11 +448,12 @@ int OrderedAIAction::getEfficiency()
case MTGAbility::LIFER:
{
//use life abilities whenever possible.
//use life abilities whenever possible. Well yes, but actually no
//limits mana and in case of Zuran Orb it just sacrifices all lands
AALifer * alife = (AALifer *) a;
Targetable * _t = alife->getTarget();
efficiency = 100;
efficiency = 80;
AbilityFactory af(g);
int suggestion = af.abilityEfficiency(a, p, MODE_ABILITY);
@@ -566,6 +589,12 @@ int OrderedAIAction::getEfficiency()
{
if (z == p->game->hand)
efficiency = 10 + (owner->getRandomGenerator()->random() % 10);//random chance to bounce their own card;
}
// We don't want to return cards in play to own hand, save rare combos
else if(target->currentZone == p->game->inPlay)
{
if (z == p->game->hand || z == p->game->library)
efficiency = (owner->getRandomGenerator()->random() % 10);//random chance to bounce their own card;
}
else
{
@@ -574,7 +603,11 @@ int OrderedAIAction::getEfficiency()
}
else
{
efficiency = 50;
// We don't want to return the ability source cards in play to own hand, save rare combos
// cards like Blinking Spirit use to be auto lose for AI
if(z == p->game->hand || z == p->game->library)
efficiency = 1;
else efficiency = 50;
//may abilities target the source until thier nested ability is activated, so 50% chance to use this
//mover, until we can come up with something more elegent....
}
@@ -639,7 +672,7 @@ int OrderedAIAction::getEfficiency()
{
AIPlayer * chk = (AIPlayer*)p;
if(may->ability && may->ability->getActionTc() && chk->chooseTarget(may->ability->getActionTc(),NULL,NULL,true))
efficiency = 50 + (owner->getRandomGenerator()->random() % 50);
efficiency = 80 + (owner->getRandomGenerator()->random() % 50);
}
if (p->game->hand->nb_cards == 0)
efficiency = (int) ((float) efficiency * 1.3); //increase chance of using ability if hand is empty
@@ -666,13 +699,18 @@ int OrderedAIAction::getEfficiency()
}
else if (dynamic_cast<MTGAlternativeCostRule *>(a))
{
efficiency += 55;
efficiency += 65;
}
else if (dynamic_cast<MTGSuspendRule *>(a))
{
efficiency += 55;
}
SAFE_DELETE(transAbility);
if (ability->source)
if(ability->source->hasType(Subtypes::TYPE_PLANESWALKER))
efficiency += 50;
SAFE_DELETE(transAbility);
return efficiency;
}
@@ -944,7 +982,7 @@ int OrderedAIAction::getRevealedEfficiency(MTGAbility * ability2)
//nothing huge here, just ensuring that Ai makes his noncreature becomers into creatures during first main, so it can actually use them in combat.
if (coreAbilityCardTarget && !coreAbilityCardTarget->isCreature() && currentPhase == MTG_PHASE_FIRSTMAIN)
{
eff2 = 100;
eff2 = 70;
}
break;
}
@@ -957,7 +995,7 @@ int OrderedAIAction::getRevealedEfficiency(MTGAbility * ability2)
{
int outPut = forMana->checkActivation();
if (ability2->getCost() && outPut > int(ability2->getCost()->getConvertedCost() +1) && currentPhase == MTG_PHASE_FIRSTMAIN && ability2->source->controller()->game->hand->nb_cards > 1)
eff2 = 90;//might be a bit random, but better than never using them.
eff2 = 60;//might be a bit random, but better than never using them.
}
else
eff2 = 0;
@@ -2447,11 +2485,10 @@ int AIPlayerBaka::getEfficiency(MTGAbility * ability)
int AIPlayerBaka::selectMenuOption()
{
ActionLayer * object = observer->mLayers->actionLayer();
int doThis = -1;
int doThis = 0; // The AI just passes on things if set to -1, getEfficiency should be improved
if (object->menuObject)
{
int checkedLast = 0;
if(object->abilitiesMenu->isMultipleChoice && object->currentActionCard)
{
MenuAbility * currentMenu = NULL;
@@ -2510,7 +2547,7 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
{
nextCardToPlay = comboCards.back();
gotPayments.clear();
if((!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->getKicker()))
if((!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->getKicker() || nextCardToPlay->getManaCost()->getBestow()))
gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost());
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
comboCards.pop_back();
@@ -2524,11 +2561,26 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
card = NULL;
gotPayments = vector<MTGAbility*>();
//canplayfromgraveyard
while ((card = cd.nextmatch(game->graveyard, card))&& card->has(Constants::CANPLAYFROMGRAVEYARD))
{
while ((card = cd.nextmatch(game->graveyard, card)))
{
bool hasFlashback = false;
if(card->getManaCost())
if(card->getManaCost()->getFlashback())
hasFlashback = true;
if( card->has(Constants::CANPLAYFROMGRAVEYARD) || card->has(Constants::TEMPFLASHBACK) || hasFlashback )
{
if (!CanHandleCost(card->getManaCost(),card))
continue;
if (hasFlashback && !CanHandleCost(card->getManaCost()->getFlashback(),card))
continue;
// Case were manacost is equal to flashback cost, if they are different the AI hangs
if (hasFlashback && (card->getManaCost() != card->getManaCost()->getFlashback()) )
continue;
if (card->hasType(Subtypes::TYPE_LAND))
{
if (game->playRestrictions->canPutIntoZone(card, game->inPlay) == PlayRestriction::CANT_PLAY)
@@ -2619,27 +2671,27 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
}
else
{
int shouldPlay = effectBadOrGood(card);
if (shouldPlay == BAKA_EFFECT_GOOD)
// Refactor to not check effect of lands since it always returned BAKA_EFFECT_DONTKNOW
// If it is a land, play it
if (card->isLand())
{
shouldPlayPercentage = 90;
}
else if (BAKA_EFFECT_DONTKNOW == shouldPlay)
{
//previously shouldPlayPercentage = 80;, I found this a little to high
//for cards which AI had no idea how to use.
shouldPlayPercentage = 60;
}
else if (card->isLand())
{
shouldPlayPercentage = 90;
}
else
{
// shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance.
shouldPlayPercentage = 1;
}
}
else {
int shouldPlay = effectBadOrGood(card);
if (shouldPlay == BAKA_EFFECT_GOOD) {
shouldPlayPercentage = 90;
}
else if (BAKA_EFFECT_DONTKNOW == shouldPlay) {
//previously shouldPlayPercentage = 80;, I found this a little to high
//for cards which AI had no idea how to use.
shouldPlayPercentage = 60;
}
else {
// shouldPlay == baka_effect_bad giving it a 10 for odd ball lottery chance.
shouldPlayPercentage = 10;
}
}
}
//Reduce the chances of playing a spell with X cost if available mana is low
if (hasX)
@@ -2677,6 +2729,7 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
if (hasX)
maxCost = pMana->getConvertedCost();
}
}
}
//canplayfromexile
while ((card = cd.nextmatch(game->exile, card))&& card->has(Constants::CANPLAYFROMEXILE))
@@ -2774,27 +2827,27 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
}
else
{
int shouldPlay = effectBadOrGood(card);
if (shouldPlay == BAKA_EFFECT_GOOD)
// Refactor to not check effect of lands since it always returned BAKA_EFFECT_DONTKNOW
// If it is a land, play it
if (card->isLand())
{
shouldPlayPercentage = 90;
}
else if (BAKA_EFFECT_DONTKNOW == shouldPlay)
{
//previously shouldPlayPercentage = 80;, I found this a little to high
//for cards which AI had no idea how to use.
shouldPlayPercentage = 60;
}
else if (card->isLand())
{
shouldPlayPercentage = 90;
}
else
{
// shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance.
shouldPlayPercentage = 1;
}
}
else {
int shouldPlay = effectBadOrGood(card);
if (shouldPlay == BAKA_EFFECT_GOOD) {
shouldPlayPercentage = 90;
}
else if (BAKA_EFFECT_DONTKNOW == shouldPlay) {
//previously shouldPlayPercentage = 80;, I found this a little to high
//for cards which AI had no idea how to use.
shouldPlayPercentage = 60;
}
else {
// shouldPlay == baka_effect_bad giving it a 10 for odd ball lottery chance.
shouldPlayPercentage = 10;
}
}
}
//Reduce the chances of playing a spell with X cost if available mana is low
if (hasX)
@@ -2928,27 +2981,27 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
}
else
{
int shouldPlay = effectBadOrGood(card);
if (shouldPlay == BAKA_EFFECT_GOOD)
// Refactor to not check effect of lands since it always returned BAKA_EFFECT_DONTKNOW
// If it is a land, play it
if (card->isLand())
{
shouldPlayPercentage = 90;
}
else if (BAKA_EFFECT_DONTKNOW == shouldPlay)
{
//previously shouldPlayPercentage = 80;, I found this a little to high
//for cards which AI had no idea how to use.
shouldPlayPercentage = 60;
}
else if (card->isLand())
{
shouldPlayPercentage = 90;
}
else
{
// shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance.
shouldPlayPercentage = 1;
}
}
else {
int shouldPlay = effectBadOrGood(card);
if (shouldPlay == BAKA_EFFECT_GOOD) {
shouldPlayPercentage = 90;
}
else if (BAKA_EFFECT_DONTKNOW == shouldPlay) {
//previously shouldPlayPercentage = 80;, I found this a little to high
//for cards which AI had no idea how to use.
shouldPlayPercentage = 60;
}
else {
// shouldPlay == baka_effect_bad giving it a 10 for odd ball lottery chance.
shouldPlayPercentage = 10;
}
}
}
//Reduce the chances of playing a spell with X cost if available mana is low
if (hasX)

View File

@@ -463,7 +463,7 @@ void CardGui::Render()
string buff = "";
string starMark = "";
if(card->exerted)
starMark += "*";
starMark += "exerted";
if(card->isToken && !card->isACopier)
buff = "T";
if(card->isToken && card->isACopier)

View File

@@ -417,10 +417,11 @@ ManaCost* CardPrimitive::getManaCost()
bool CardPrimitive::hasType(int _type)
{
for (size_t i = 0; i < types.size(); i++)
if (types[i] == _type)
return true;
return false;
if (types.size() > 400) {return false;} // Null pointer?
for (size_t i = 0; i < types.size(); i++)
if (types[i] == _type)
return true;
return false;
}
bool CardPrimitive::hasSubtype(int _subtype)

View File

@@ -770,7 +770,10 @@ void GameStateDuel::Update(float dt)
musictrack = "ai_baka_music_momir.mp3";
else if (mParent->gameType == GAME_TYPE_RANDOM1 || mParent->gameType == GAME_TYPE_RANDOM2) musictrack
= "ai_baka_music_random.mp3";
else if (mParent->gameType == GAME_TYPE_RANDOM3 || mParent->gameType == GAME_TYPE_RANDOM5) musictrack
= "ai_baka_music_random.mp3";
else if (mParent->gameType == GAME_TYPE_HORDE) musictrack
= "ai_baka_music_momir.mp3";
if (!MusicExist(musictrack))
musictrack = "ai_baka_music.mp3";

View File

@@ -312,7 +312,7 @@ void GuiPlay::Render()
MTGCardInstance * ctarget = ((MTGCardInstance *)(*it)->card->isAttacking);
if(ctarget->hasType(Subtypes::TYPE_PLANESWALKER) && observer->isInPlay(ctarget) && observer->getCurrentGamePhase() < MTG_PHASE_COMBATEND)
{
JRenderer::GetInstance()->DrawLine((*it)->actX,(*it)->actY,ctarget->view->actX,ctarget->view->actY,0.5f,ARGB(128 - wave, 255, 20, 0));
JRenderer::GetInstance()->DrawLine((*it)->actX,(*it)->actY,ctarget->view->actX,ctarget->view->actY,0.5f,ARGB(128 - wave, 255, 40, 40));
}
}
}

View File

@@ -1835,7 +1835,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
tc->targetter = NULL;
}
else
tc->targetter->bypassTC = false;
if (tc->targetter)
tc->targetter->bypassTC = false;
sWithoutTc = splitTarget[0];
sWithoutTc.append(splitTarget[2]);
}
@@ -1935,7 +1936,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
{
if (!(spell && spell->FullfilledAlternateCost(kAlternateCostIds[i])))
{
DebugTrace("INFO parseMagicLine: Alternative Cost was not fulfilled for " << s);
DebugTrace("INFO parseMagicLine: Alternative Cost was not fulfilled for " << spell << s);
SAFE_DELETE(tc);
return NULL;
}
@@ -3512,7 +3513,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
//produce additional mana when a mana is engaged
if (s.find("producecolor:") != string::npos)
{
{
return NEW AEngagedManaAbility(observer, id, card,s.substr(13));
}
@@ -4094,13 +4095,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return NEW ANewAffinity(observer, id, card, tcString, manaString);
}
//proliferate
//proliferate, rule changes in War of the Spark set
found = s.find("proliferate");
if (found != string::npos)
{
MTGAbility * a = NEW AAProliferate(observer, id, card, target);
a->oneShot = 1;
a->canBeInterrupted = false;
((AAProliferate*)a)->allcounters = true;
return a;
}
//proliferate all counters
@@ -4545,6 +4547,8 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ
return BAKA_EFFECT_BAD;
if (dynamic_cast<AManaProducer *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AARemoveAllCounter *> (a))
return BAKA_EFFECT_BAD;
// Equipment that gets immediately attached. Todo: check the abilities associated with Equip, to make sure they're good (for now it seems to be the majority of the cases)?
if (dynamic_cast<AEquip *> (a))
@@ -4568,12 +4572,12 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ
if (AAMover * aam = dynamic_cast<AAMover *>(a))
{
MTGGameZone * z = aam->destinationZone(target);
if (tc && tc->targetsZone(p->game->library))
if (tc && tc->targetsZone(p->game->library)||tc && tc->targetsZone(p->game->graveyard))
{
if (z == p->game->hand || z == p->game->inPlay)
return BAKA_EFFECT_GOOD;
}
return BAKA_EFFECT_BAD; //TODO
return BAKA_EFFECT_DONTKNOW; //TODO
}
if (dynamic_cast<AACopier *> (a))
@@ -4598,6 +4602,31 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ
return BAKA_EFFECT_GOOD;
if (dynamic_cast<ABushidoAbility *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AACascade *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AACastCard *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AAFlip *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AAImprint *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<ABestow *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AExert *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<ALoseAbilities *> (a))
return BAKA_EFFECT_BAD;
if (dynamic_cast<AModularAbility *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<APaired *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AProduceMana *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AACloner *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AAModTurn *> (a))
return BAKA_EFFECT_GOOD;
if (PTInstant * abi = dynamic_cast<PTInstant *>(a))
return (abi->wppt->power.getValue() >= 0 && abi->wppt->toughness.getValue() >= 0) ? BAKA_EFFECT_GOOD : BAKA_EFFECT_BAD;
if (APowerToughnessModifier * abi = dynamic_cast<APowerToughnessModifier *>(a))
@@ -4628,6 +4657,8 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ
badAbilities[(int)Constants::NOLIFEGAINOPPONENT] = true;
badAbilities[(int)Constants::MUSTBLOCK] = true;
badAbilities[(int)Constants::FLYERSONLY] = true;
badAbilities[(int)Constants::TREASON] = true;
badAbilities[(int)Constants::SHACKLER] = true;
if (AInstantBasicAbilityModifierUntilEOT * abi = dynamic_cast<AInstantBasicAbilityModifierUntilEOT *>(a))
{
@@ -4694,7 +4725,7 @@ int AbilityFactory::getAbilities(vector<MTGAbility *> * v, Spell * spell, MTGCar
card->exileEffects = true;
break;
}
if (dest == zones->library)
if (dest == zones->library)
{
magicText = card->magicTexts["library"];
break;
@@ -4788,7 +4819,7 @@ int AbilityFactory::getAbilities(vector<MTGAbility *> * v, Spell * spell, MTGCar
}
else
{
DebugTrace("ABILITYFACTORY ERROR: Parser returned NULL");
DebugTrace("ABILITYFACTORY ERROR: Parser returned NULL " + magicText);
}
}
return result;
@@ -4804,7 +4835,7 @@ int AbilityFactory::getAbilities(vector<MTGAbility *> * v, Spell * spell, MTGCar
* - doTap (a dirty way to know if tapping is included in the cost...
*/
int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card, int mode, TargetChooser * tc, MTGGameZone * dest)
{
{try{
int dryMode = 0;
if (!spell && !dest)
dryMode = 1;
@@ -4888,6 +4919,11 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card, int
}
return result;
}
catch(exception) {
DebugTrace("MAGIC TEST ERROR: Parser returned NULL");
}
return 0;
}
void AbilityFactory::addAbilities(int _id, Spell * spell)

View File

@@ -505,6 +505,20 @@ int MTGPutInPlayRule::reactToClick(MTGCardInstance * card)
}
delete withKickerCost;
}
if (card->getManaCost()->getBestow())
{
ManaCost * withBestowCost= NEW ManaCost(card->getManaCost());
withBestowCost->add(withBestowCost->getBestow());
DebugTrace("AltCost BESTOW " << withBestowCost);
if (previousManaPool->canAfford(withBestowCost))
{
player->getManaPool()->pay(card->getManaCost()->getBestow());
payResult = ManaCost::MANA_PAID_WITH_BESTOW;
}
delete withBestowCost;
}
card->getManaCost()->doPayExtra();
ManaCost * spellCost = previousManaPool->Diff(player->getManaPool());
@@ -652,6 +666,19 @@ int MTGKickerRule::reactToClick(MTGCardInstance * card)
payResult = ManaCost::MANA_PAID_WITH_KICKER;
}
delete withKickerCost;
}
// Handles bestow,also has to go in isExtraPaymentSet
if (card->getManaCost()->getBestow())
{
ManaCost * withBestowCost= NEW ManaCost(card->getManaCost());
withBestowCost->add(withBestowCost->getBestow());
if (previousManaPool->canAfford(withBestowCost))
{
player->getManaPool()->pay(card->getManaCost()->getBestow());
payResult = ManaCost::MANA_PAID_WITH_BESTOW;
}
delete withBestowCost;
}
card->getManaCost()->doPayExtra();
ManaCost * spellCost = previousManaPool->Diff(player->getManaPool());
@@ -3486,7 +3513,7 @@ PermanentAbility(observer, _id)
}
int MTGNewPlaneswalker::receiveEvent(WEvent * e)
{
{
if(game->getCurrentTargetChooser() || game->mLayers->actionLayer()->isWaitingForAnswer())
return 0;
if (WEventZoneChange* ev1 = dynamic_cast<WEventZoneChange*>(e))
@@ -3494,7 +3521,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
if (ev1->to == game->players[0]->game->inPlay || ev1->to == game->players[1]->game->inPlay)
{
MTGCardInstance * card = ev1->card;
if(card && card->hasType(Subtypes::TYPE_PLANESWALKER))
if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY))
{
CheckPW(card);
return 1;
@@ -3504,7 +3531,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
else if(WEventCardControllerChange* ev2 = dynamic_cast<WEventCardControllerChange*>(e))
{
MTGCardInstance * card = ev2->card;
if(card && card->hasType(Subtypes::TYPE_PLANESWALKER))
if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY))
{
CheckPW(card);
return 1;
@@ -3513,7 +3540,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
else if(WEventCardTransforms* ev3 = dynamic_cast<WEventCardTransforms*>(e))
{
MTGCardInstance * card = ev3->card;
if(card && card->hasType(Subtypes::TYPE_PLANESWALKER))
if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY))
{
CheckPW(card);
return 1;
@@ -3522,7 +3549,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
else if(WEventCardCopiedACard* ev4 = dynamic_cast<WEventCardCopiedACard*>(e))
{
MTGCardInstance * card = ev4->card;
if(card && card->hasType(Subtypes::TYPE_PLANESWALKER))
if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY))
{
CheckPW(card);
return 1;
@@ -3531,7 +3558,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
else if(WEventCardFaceUp* ev5 = dynamic_cast<WEventCardFaceUp*>(e))
{
MTGCardInstance * card = ev5->card;
if(card && card->hasType(Subtypes::TYPE_PLANESWALKER))
if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY))
{
CheckPW(card);
return 1;
@@ -3540,7 +3567,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
else if(WEventCardPhasesIn* ev6 = dynamic_cast<WEventCardPhasesIn*>(e))
{
MTGCardInstance * card = ev6->card;
if(card && card->hasType(Subtypes::TYPE_PLANESWALKER))
if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY))
{
CheckPW(card);
return 1;
@@ -3550,23 +3577,26 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
}
int MTGNewPlaneswalker::CheckPW(MTGCardInstance * card)
{
if(!card)
if(!card)
return 0;
if(card->isPhased)
return 0;
if(card->countDuplicateCardTypes() < 1)
if (card->hasType(Subtypes::TYPE_LEGENDARY) && card->controller()->game->inPlay->hasCard(card))
if(card->has(Constants::NOLEGEND)||card->controller()->opponent()->inPlay()->hasAbility(Constants::NOLEGENDRULE)||card->controller()->inPlay()->hasAbility(Constants::NOLEGENDRULE))
return 0;
if(card->countDuplicateCardNames() <= 2)
return 0;
MovePW(card);
return 1;
}
void MTGNewPlaneswalker::MovePW(MTGCardInstance * card)
{
{
game->LPWeffect = true;
vector<MTGAbility*>selection;
MTGCardInstance * myClone = NEW MTGCardInstance(card, card->controller()->game);
TargetChooserFactory tfL(game);
tcP = tfL.createTargetChooser("planeswalker[share!types!]|mybattlefield",myClone);
tcP = tfL.createTargetChooser("*[share!name!]|mybattlefield",myClone);
tcP->targetter = NULL;
tcP->maxtargets = 1;
PWrule = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), myClone, NULL,"ownergraveyard","Put in Graveyard");
@@ -3679,24 +3709,27 @@ ListMaintainerAbility(observer, _id)
int MTGPlaneWalkerRule::canBeInList(MTGCardInstance * card)
{
if(card->isPhased)
if(card->isPhased)
return 0;
if (card->hasType(Subtypes::TYPE_PLANESWALKER) && card->controller()->game->inPlay->hasCard(card))
if (card->hasType(Subtypes::TYPE_LEGENDARY) && card->controller()->game->inPlay->hasCard(card))
{
return 1;
if(card->has(Constants::NOLEGEND)||card->controller()->opponent()->inPlay()->hasAbility(Constants::NOLEGENDRULE)||card->controller()->inPlay()->hasAbility(Constants::NOLEGENDRULE))
return 0;
else
return 1;
}
return 0;
}
int MTGPlaneWalkerRule::added(MTGCardInstance * card)
{
map<MTGCardInstance *, bool>::iterator it;
map<MTGCardInstance *, bool>::iterator it;
int destroy = 0;
vector<MTGCardInstance*>oldCards;
for (it = cards.begin(); it != cards.end(); it++)
{
MTGCardInstance * comparison = (*it).first;
if (comparison != card && comparison->types == card->types && comparison->controller() == card->controller())
if (comparison != card && comparison->controller() == card->controller() && !(comparison->getName().compare(card->getName())))
if (!(game->getCurrentTargetChooser() || game->mLayers->actionLayer()->isWaitingForAnswer()))
{
oldCards.push_back(comparison);
@@ -3704,11 +3737,10 @@ int MTGPlaneWalkerRule::added(MTGCardInstance * card)
game->LPWeffect = true;
}
}
if (destroy)
if(destroy)
{
vector<MTGAbility*>selection;
MultiAbility * multi = NEW MultiAbility(game,game->mLayers->actionLayer()->getMaxId(), card, card, NULL);
MultiAbility * multi = NEW MultiAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card, NULL);
for(unsigned int i = 0;i < oldCards.size();i++)
{
AAMover *a = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), card, oldCards[i],"ownergraveyard","Keep New");
@@ -3722,7 +3754,7 @@ int MTGPlaneWalkerRule::added(MTGCardInstance * card)
b->oneShot = true;
MTGAbility * b1 = b;
selection.push_back(b1);
MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Planeswalker Rule");
MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Legendary Rule");
menuChoice->addToGame();
}
return 1;

View File

@@ -579,6 +579,8 @@ int ManaCost::hasAnotherCost()
if(kicker)
result = 1;
//kicker is the only one ai knows for now, later hasAnotherCost() can be used to determine other cost types.
if(Retrace || BuyBack || alternative || FlashBack || morph || suspend || Bestow)
result = 1;
return result;
}
@@ -730,7 +732,7 @@ int ManaCost::getCost(int color)
{
if (cost.size() <= (size_t)color)
{
DebugTrace("Seems ManaCost was not properly initialized");
DebugTrace("in GetCost Seems ManaCost was not properly initialized");
return 0;
}
return cost[color];

View File

@@ -168,6 +168,10 @@ void Rules::addExtraRules(GameObserver* g)
difficultyRating = 0;
else if(g->mRules->gamemode == GAME_TYPE_RANDOM1 || g->mRules->gamemode == GAME_TYPE_RANDOM2)
difficultyRating = 0;
else if(g->mRules->gamemode == GAME_TYPE_RANDOM3 || g->mRules->gamemode == GAME_TYPE_RANDOM5)
difficultyRating = 0;
else if(g->mRules->gamemode == GAME_TYPE_HORDE)
difficultyRating = 0;
else if (g->mRules->gamemode == GAME_TYPE_STORY)
difficultyRating = 0;
else if (a->aType == MTGAbility::STANDARD_DRAW)
@@ -196,9 +200,11 @@ void Rules::addExtraRules(GameObserver* g)
a->resolve();
else if(g->mRules->gamemode == GAME_TYPE_RANDOM1 || g->mRules->gamemode == GAME_TYPE_RANDOM2)
a->resolve();
else if(g->mRules->gamemode == GAME_TYPE_RANDOM3 || g->mRules->gamemode == GAME_TYPE_RANDOM5)
a->resolve();
else if (g->mRules->gamemode == GAME_TYPE_STORY)
a->resolve();
else//stupid protections to keep this out of mimor and other game modes.
else//stupid protections to keep this out of momir and other game modes.
{
handsize = ((AADrawer *)a)->getNumCards();
if(difficultyRating == EASY)
@@ -305,6 +311,154 @@ Player * Rules::loadPlayerRandom(GameObserver* observer, int isAI, int mode)
return player;
}
Player * Rules::loadPlayerRandomThree(GameObserver* observer, int isAI)
{
int color1 = 1 + observer->getRandomGenerator()->random() % 5;
int color2 = 1 + observer->getRandomGenerator()->random() % 5;
int color3 = 1 + observer->getRandomGenerator()->random() % 5;
int color0 = Constants::MTG_COLOR_ARTIFACT;
int colors[] = { color1, color2, color3, color0 };
int nbcolors = 4;
string lands[] = { "", "forest", "island", "mountain", "swamp", "plains", "" };
MTGDeck * tempDeck = NEW MTGDeck(MTGCollection());
tempDeck->addRandomCards(1, 0, 0, -1, lands[color1].c_str());
tempDeck->addRandomCards(1, 0, 0, -1, lands[color2].c_str());
tempDeck->addRandomCards(1, 0, 0, -1, lands[color3].c_str());
tempDeck->addRandomCards(6, 0, 0, 'R', lands[color1].c_str());
tempDeck->addRandomCards(6, 0, 0, 'R', lands[color2].c_str());
tempDeck->addRandomCards(6, 0, 0, 'R', lands[color3].c_str());
tempDeck->addRandomCards(3, 0, 0, -1, "land");
tempDeck->addRandomCards(1, 0, 0, 'U', "land");
tempDeck->addRandomCards(1, 0, 0, 'R', "land");
tempDeck->addRandomCards(18, 0, 0, -1, "creature", colors, nbcolors);
tempDeck->addRandomCards(1, 0, 0, 'R', "creature", colors, nbcolors);
tempDeck->addRandomCards(1, 0, 0, 'M', "creature", colors, nbcolors);
tempDeck->addRandomCards(3, 0, 0, -1, "sorcery", colors, nbcolors);
tempDeck->addRandomCards(3, 0, 0, -1, "enchantment", colors, nbcolors);
tempDeck->addRandomCards(3, 0, 0, -1, "instant", colors, nbcolors);
tempDeck->addRandomCards(4, 0, 0, -1, "artifact", colors, nbcolors);
tempDeck->addRandomCards(1, 0, 0, -1, "planeswalker", colors, nbcolors);
string deckFile = "random";
string deckFileSmall = "random";
Player *player = NULL;
if (!isAI) // Human Player
player = NEW HumanPlayer(observer, deckFile, deckFileSmall, false, tempDeck);
else
player = NEW AIPlayerBaka(observer, deckFile, deckFileSmall, "", tempDeck);
return player;
}
Player * Rules::loadPlayerRandomFive(GameObserver* observer, int isAI)
{
MTGDeck * tempDeck = NEW MTGDeck(MTGCollection());
tempDeck->addRandomCards(1, 0, 0, -1, "plains");
tempDeck->addRandomCards(1, 0, 0, -1, "island");
tempDeck->addRandomCards(1, 0, 0, -1, "swamp");
tempDeck->addRandomCards(1, 0, 0, -1, "mountain");
tempDeck->addRandomCards(1, 0, 0, -1, "forest");
tempDeck->addRandomCards(3, 0, 0, 'R', "plains");
tempDeck->addRandomCards(3, 0, 0, 'R', "island");
tempDeck->addRandomCards(3, 0, 0, 'R', "swamp");
tempDeck->addRandomCards(3, 0, 0, 'R', "mountain");
tempDeck->addRandomCards(3, 0, 0, 'R', "forest");
tempDeck->addRandomCards(4, 0, 0, -1, "land");
tempDeck->addRandomCards(1, 0, 0, 'U', "land");
tempDeck->addRandomCards(1, 0, 0, 'R', "land");
tempDeck->addRandomCards(18, 0, 0, -1, "creature");
tempDeck->addRandomCards(1, 0, 0, 'R', "creature");
tempDeck->addRandomCards(1, 0, 0, 'M', "creature");
tempDeck->addRandomCards(3, 0, 0, -1, "sorcery");
tempDeck->addRandomCards(3, 0, 0, -1, "enchantment");
tempDeck->addRandomCards(3, 0, 0, -1, "instant");
tempDeck->addRandomCards(4, 0, 0, -1, "artifact");
tempDeck->addRandomCards(1, 0, 0, -1, "planeswalker");
string deckFile = "random";
string deckFileSmall = "random";
Player *player = NULL;
if (!isAI) // Human Player
player = NEW HumanPlayer(observer, deckFile, deckFileSmall, false, tempDeck);
else
player = NEW AIPlayerBaka(observer, deckFile, deckFileSmall, "", tempDeck);
return player;
}
Player * Rules::loadPlayerHorde(GameObserver* observer, int isAI)
{
int nbColors = 1;
string randomTribe = "";
int tribeColor[] = { observer->getRandomGenerator()->random() % 6 };
string lands[] = { "land", "forest", "island", "mountain", "swamp", "plains" };
const char* const multicolorTribes[] = { "Ally", "Atog", "Eldrazi", "Elemental", "Human", "Knight",
"Myr", "Samurai", "Shaman", "Shapeshifter", "Sliver", "Soldier", "Spellshaper" };
const char* const whiteTribes[] = { "Angel","Cat", "Griffin", "Kithkin", "Knight", "Pegasus", "Soldier" };
const char* const blueTribes[] = { "Artificer", "Merfolk", "Drake", "Faerie", "Illusion", "Vedalken" };
const char* const blackTribes[] = { "Demon", "Faerie", "Horror", "Pirate", "Rat", "Shade", "Skeleton", "Vampire", "Zombie" };
const char* const redTribes[] = { "Barbarian", "Berserker","Cat", "Devil", "Goblin", "Minotaur", "Werewolf" };
const char* const greenTribes[] = { "Beast", "Cat", "Centaur", "Dinosaur", "Druid", "Elf", "Fungus",
"Saproling", "Spider", "Treefolk", "Werewolf" };
int multicolorTribesSize = sizeof(multicolorTribes)/sizeof(multicolorTribes[0]);
int whiteTribesSize = sizeof(whiteTribes)/sizeof(whiteTribes[0]);
int blueTribesSize = sizeof(blueTribes)/sizeof(blueTribes[0]);
int blackTribesSize = sizeof(blackTribes)/sizeof(blackTribes[0]);
int redTribesSize = sizeof(redTribes)/sizeof(redTribes[0]);
int greenTribesSize = sizeof(greenTribes)/sizeof(greenTribes[0]);
switch (tribeColor[0])
{
case Constants::MTG_COLOR_ARTIFACT :
randomTribe = multicolorTribes[observer->getRandomGenerator()->random() % multicolorTribesSize];
nbColors = 0;
break;
case Constants::MTG_COLOR_WHITE :
randomTribe = whiteTribes[observer->getRandomGenerator()->random() % whiteTribesSize];
break;
case Constants::MTG_COLOR_BLUE :
randomTribe = blueTribes[observer->getRandomGenerator()->random() % blueTribesSize];
break;
case Constants::MTG_COLOR_BLACK :
randomTribe = blackTribes[observer->getRandomGenerator()->random() % blackTribesSize];
break;
case Constants::MTG_COLOR_RED :
randomTribe = redTribes[observer->getRandomGenerator()->random() % redTribesSize];
break;
case Constants::MTG_COLOR_GREEN :
randomTribe = greenTribes[observer->getRandomGenerator()->random() % greenTribesSize];
break;
}
MTGDeck * tempDeck = NEW MTGDeck(MTGCollection());
tempDeck->addRandomCards(16, 0, 0, -1, lands[tribeColor[0]].c_str());
tempDeck->addRandomCards(4, 0, 0, 'R', lands[tribeColor[0]].c_str());
tempDeck->addRandomCards(4, 0, 0, -1, "land");
tempDeck->addRandomCards(21, 0, 0, -1, randomTribe);
tempDeck->addRandomCards(5, 0, 0, -1, "enchantment", tribeColor, nbColors);
tempDeck->addRandomCards(5, 0, 0, -1, "instant", tribeColor, nbColors);
tempDeck->addRandomCards(5, 0, 0, -1, "sorcery", tribeColor, nbColors);
string deckFile = "random";
string deckFileSmall = "random";
Player *player = NULL;
if (!isAI) // Human Player
player = NEW HumanPlayer(observer, deckFile, deckFileSmall, false, tempDeck);
else
player = NEW AIPlayerBaka(observer, deckFile, deckFileSmall, "", tempDeck);
return player;
}
Player * Rules::initPlayer(GameObserver *g, int playerId)
{
Player * p = g->players.size() > 1?g->players[playerId]:NULL;
@@ -322,6 +476,12 @@ Player * Rules::initPlayer(GameObserver *g, int playerId)
return loadPlayerRandom(g, isAI, GAME_TYPE_RANDOM1);
case GAME_TYPE_RANDOM2:
return loadPlayerRandom(g, isAI, GAME_TYPE_RANDOM2);
case GAME_TYPE_RANDOM3:
return loadPlayerRandomThree(g, isAI);
case GAME_TYPE_RANDOM5:
return loadPlayerRandomFive(g, isAI);
case GAME_TYPE_HORDE:
return loadPlayerHorde(g, isAI);
default:
return NULL;
}
@@ -627,6 +787,9 @@ GameType Rules::strToGameMode(string s)
if (s.compare("momir") == 0) return GAME_TYPE_MOMIR;
if (s.compare("random1") == 0) return GAME_TYPE_RANDOM1;
if (s.compare("random2") == 0) return GAME_TYPE_RANDOM2;
if (s.compare("random3") == 0) return GAME_TYPE_RANDOM3;
if (s.compare("random5") == 0) return GAME_TYPE_RANDOM5;
if (s.compare("horde") == 0) return GAME_TYPE_HORDE;
if (s.compare("story") == 0) return GAME_TYPE_STORY;
if (s.compare("stonehewer") == 0) return GAME_TYPE_STONEHEWER;
if (s.compare("hermit") == 0) return GAME_TYPE_HERMIT;