Merge pull request #42 from WagicProject/master

getting master
This commit is contained in:
zethfoxster
2016-08-13 12:49:52 -04:00
committed by GitHub
38 changed files with 411 additions and 640 deletions
+1
View File
@@ -1505,3 +1505,4 @@ primitive=Zulaport Cutthroat
id=402101 id=402101
rarity=U rarity=U
[/card] [/card]
+1
View File
@@ -935,3 +935,4 @@ primitive=Zulaport Chainmage
id=407603 id=407603
rarity=C rarity=C
[/card] [/card]
+1
View File
@@ -1655,3 +1655,4 @@ primitive=Woodland Stream
id=410051 id=410051
rarity=U rarity=U
[/card] [/card]
@@ -318,6 +318,19 @@ mana={G}{W}
type=Instant type=Instant
[/card] [/card]
[card] [card]
name=Silvergill Adept
otherrestriction=type(*[merfolk]|myhand)~lessthan~2
other={4}{U}
restriction=type(*[merfolk]|myhand)~morethan~1
auto=draw:1
text=As an additional cost to cast Silvergill Adept, reveal a Merfolk card from your hand or pay {3}. -- When Silvergill Adept enters the battlefield, draw a card.
mana={1}{U}
type=Creature
subtype=Merfolk Wizard
power=2
toughness=1
[/card]
[card]
name=Staggershock name=Staggershock
target=creature,player target=creature,player
auto=damage:2 auto=damage:2
+116 -113
View File
@@ -2066,7 +2066,7 @@ toughness=3
[/card] [/card]
[card] [card]
name=Alabaster Leech name=Alabaster Leech
auto=lord(*[white]|myhand,mylibrary,mygraveyard,myexile) altercost(white, +1) auto=lord(*[white]|mycastingzone) altercost(white, +1)
text=White spells you cast cost {W} more to cast. text=White spells you cast cost {W} more to cast.
mana={W} mana={W}
type=Creature type=Creature
@@ -3222,7 +3222,7 @@ type=Land
[/card] [/card]
[card] [card]
name=Andradite Leech name=Andradite Leech
auto=lord(*[black]|myhand,mylibrary,mygraveyard,myexile) altercost(black,+1) auto=lord(*[black]|mycastingzone) altercost(black,+1)
auto={B}:1/1 auto={B}:1/1
text=Black spells you cast cost {B} more to cast. -- {B}: Andradite Leech gets +1/+1 until end of turn. text=Black spells you cast cost {B} more to cast. -- {B}: Andradite Leech gets +1/+1 until end of turn.
mana={2}{B} mana={2}{B}
@@ -3708,7 +3708,7 @@ subtype=Aura
name=Animar, Soul of Elements name=Animar, Soul of Elements
abilities=protection from white,protection from black abilities=protection from white,protection from black
auto=@movedTo(creature|mystack):counter(1/1,1) auto=@movedTo(creature|mystack):counter(1/1,1)
auto=thisforeach(counter{1/1,1}) lord(creature|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=thisforeach(counter{1/1,1}) lord(creature|mycastingzone) altercost(colorless, -1)
text=Protection from white and from black -- Whenever you cast a creature spell, put a +1/+1 counter on Animar, Soul of Elements. -- Creature spells you cast cost 1 less to cast for each +1/+1 counter on Animar. text=Protection from white and from black -- Whenever you cast a creature spell, put a +1/+1 counter on Animar, Soul of Elements. -- Creature spells you cast cost 1 less to cast for each +1/+1 counter on Animar.
mana={U}{R}{G} mana={U}{R}{G}
type=Legendary Creature type=Legendary Creature
@@ -4394,8 +4394,8 @@ type=Enchantment
[/card] [/card]
[card] [card]
name=Arcane Melee name=Arcane Melee
auto=lord(instant|hand,library,graveyard,exile) altercost(colorless,-2) auto=lord(instant|nonbattlezone) altercost(colorless,-2)
auto=lord(sorcery|hand,library,graveyard,exile) altercost(colorless,-2) auto=lord(sorcery|nonbattlezone) altercost(colorless,-2)
text=Instant and sorcery spells cost {2} less to cast. text=Instant and sorcery spells cost {2} less to cast.
mana={4}{U} mana={4}{U}
type=Enchantment type=Enchantment
@@ -6334,8 +6334,8 @@ subtype=Aura
[/card] [/card]
[card] [card]
name=Aura of Silence name=Aura of Silence
auto=lord(artifact|opponenthand,opponentlibrary,opponentgraveyard,opponentexile) altercost(colorless, +2) auto=lord(artifact|oppcastingzone) altercost(colorless, +2)
auto=lord(enchantment|opponenthand,opponentlibrary,opponentgraveyard,opponentexile) altercost(colorless, +2) auto=lord(enchantment|oppcastingzone) altercost(colorless, +2)
auto={S}:destroy target(artifact,enchantment) auto={S}:destroy target(artifact,enchantment)
text=Artifact and enchantment spells your opponents cast cost {2} more to cast. -- Sacrifice Aura of Silence: Destroy target artifact or enchantment. text=Artifact and enchantment spells your opponents cast cost {2} more to cast. -- Sacrifice Aura of Silence: Destroy target artifact or enchantment.
mana={1}{W}{W} mana={1}{W}{W}
@@ -7731,7 +7731,7 @@ toughness=6
name=Balefire Liege name=Balefire Liege
auto=lord(other creature[red]|myBattlefield) 1/1 auto=lord(other creature[red]|myBattlefield) 1/1
auto=lord(other creature[white]|myBattlefield) 1/1 auto=lord(other creature[white]|myBattlefield) 1/1
auto=@movedto(*[red]|mystack):damage:3 opponent auto=@movedto(*[red]|mystack):damage:3 target(player)
auto=@movedto(*[white]|mystack):life:3 controller auto=@movedto(*[white]|mystack):life:3 controller
text=Other red creatures you control get +1/+1. -- Other white creatures you control get +1/+1. -- Whenever you cast a red spell, Balefire Liege deals 3 damage to target player. -- Whenever you cast a white spell, you gain 3 life. text=Other red creatures you control get +1/+1. -- Other white creatures you control get +1/+1. -- Whenever you cast a red spell, Balefire Liege deals 3 damage to target player. -- Whenever you cast a white spell, you gain 3 life.
mana={2}{RW}{RW}{RW} mana={2}{RW}{RW}{RW}
@@ -7829,7 +7829,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Ballyrush Banneret name=Ballyrush Banneret
auto=lord(*[soldier;kithkin]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=lord(*[soldier;kithkin]|mycastingzone) altercost(colorless, -1)
text=Kithkin spells and Soldier spells you cast cost {1} less to cast. text=Kithkin spells and Soldier spells you cast cost {1} less to cast.
mana={1}{W} mana={1}{W}
type=Creature type=Creature
@@ -12990,7 +12990,7 @@ toughness=7
[/card] [/card]
[card] [card]
name=Bosk Banneret name=Bosk Banneret
auto=lord(*[treefolk;shaman]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=lord(*[treefolk;shaman]|mycastingzone) altercost(colorless, -1)
text=Treefolk spells and Shaman spells you cast cost {1} less to cast. text=Treefolk spells and Shaman spells you cast cost {1} less to cast.
mana={1}{G} mana={1}{G}
type=Creature type=Creature
@@ -13780,7 +13780,7 @@ type=Enchantment
[/card] [/card]
[card] [card]
name=Brighthearth Banneret name=Brighthearth Banneret
auto=lord(*[elemental;warrior]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=lord(*[elemental;warrior]|mycastingzone) altercost(colorless, -1)
autohand={1}{R}{discard}:counter(1/1,1) target(creature) autohand={1}{R}{discard}:counter(1/1,1) target(creature)
text=Elemental spells and Warrior spells you cast cost {1} less to cast. -- Reinforce 1 - {1}{R} ({1}{R}, Discard this card: Put a +1/+1 counter on target creature.) text=Elemental spells and Warrior spells you cast cost {1} less to cast. -- Reinforce 1 - {1}{R} ({1}{R}, Discard this card: Put a +1/+1 counter on target creature.)
mana={1}{R} mana={1}{R}
@@ -16777,7 +16777,7 @@ toughness=3
[/card] [/card]
[card] [card]
name=Centaur Omenreader name=Centaur Omenreader
auto=this(tapped) lord(*|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -2) ueot auto=this(tapped) lord(*|mycastingzone) altercost(colorless, -2) ueot
auto=@untapped(this):all(*|myhand) moveto(myhand) auto=@untapped(this):all(*|myhand) moveto(myhand)
text=As long as Centaur Omenreader is tapped, creature spells you cast cost {2} less to cast. text=As long as Centaur Omenreader is tapped, creature spells you cast cost {2} less to cast.
mana={3}{G} mana={3}{G}
@@ -17898,8 +17898,8 @@ type=Instant
[/card] [/card]
[card] [card]
name=Chill name=Chill
auto=lord(*[red]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, +2) auto=lord(*[red]|mycastingzone) altercost(colorless, +2)
auto=lord(*[red]|opponenthand,opponentlibrary,opponentgraveyard,opponentexile) altercost(colorless, +2) auto=lord(*[red]|oppcastingzone) altercost(colorless, +2)
text=Red spells cost {2} more to cast. text=Red spells cost {2} more to cast.
mana={1}{U} mana={1}{U}
type=Enchantment type=Enchantment
@@ -19258,11 +19258,11 @@ auto=choice name(Creature) counter(0/0,1,CloudKeyC) all(this)
auto=choice name(Enchantment) counter(0/0,1,CloudKeyE) all(this) auto=choice name(Enchantment) counter(0/0,1,CloudKeyE) all(this)
auto=choice name(Instant) counter(0/0,1,CloudKeyI) all(this) auto=choice name(Instant) counter(0/0,1,CloudKeyI) all(this)
auto=choice name(Sorcery) counter(0/0,1,CloudKeyS) all(this) auto=choice name(Sorcery) counter(0/0,1,CloudKeyS) all(this)
auto=this(counter{0/0.1.CloudKeyA}) lord(Artifact|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=this(counter{0/0.1.CloudKeyA}) lord(Artifact|mycastingzone) altercost(colorless,-1)
auto=this(counter{0/0.1.CloudKeyC}) lord(Creature|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=this(counter{0/0.1.CloudKeyC}) lord(Creature|mycastingzone) altercost(colorless,-1)
auto=this(counter{0/0.1.CloudKeyE}) lord(Enchantment|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=this(counter{0/0.1.CloudKeyE}) lord(Enchantment|mycastingzone) altercost(colorless,-1)
auto=this(counter{0/0.1.CloudKeyI}) lord(Instant|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=this(counter{0/0.1.CloudKeyI}) lord(Instant|mycastingzone) altercost(colorless,-1)
auto=this(counter{0/0.1.CloudKeyS}) lord(Sorcery|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=this(counter{0/0.1.CloudKeyS}) lord(Sorcery|mycastingzone) altercost(colorless,-1)
text=As Cloud Key enters the battlefield, choose artifact, creature, enchantment, instant, or sorcery. -- Spells you cast of the chosen type cost {1} less to cast. text=As Cloud Key enters the battlefield, choose artifact, creature, enchantment, instant, or sorcery. -- Spells you cast of the chosen type cost {1} less to cast.
mana={3} mana={3}
type=Artifact type=Artifact
@@ -24250,7 +24250,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Daru Warchief name=Daru Warchief
auto=lord(soldier|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=lord(soldier|mycastingzone) altercost(colorless, -1)
auto=lord(soldier|myBattlefield) 1/2 auto=lord(soldier|myBattlefield) 1/2
text=Soldier spells you cast cost {1} less to cast. -- Soldier creatures you control get +1/+2. text=Soldier spells you cast cost {1} less to cast. -- Soldier creatures you control get +1/+2.
mana={2}{W}{W} mana={2}{W}{W}
@@ -25029,8 +25029,11 @@ toughness=3
name=Deathbringer Liege name=Deathbringer Liege
auto=lord(other creature[black]|myBattlefield) 1/1 auto=lord(other creature[black]|myBattlefield) 1/1
auto=lord(other creature[white]|myBattlefield) 1/1 auto=lord(other creature[white]|myBattlefield) 1/1
auto=@movedto(*[black]|mystack):may destroy target(creature[tapped]) auto=@movedto(*[black;-white]|mystack):may destroy target(creature[tapped])
auto=@movedto(*[white]|mystack):may tap target(creature) auto=@movedto(*[white;-black]|mystack):may tap target(creature)
auto=@movedto(*[black&white]|mystack):may tap target(creature)
auto=@movedto(*[black&white]|mystack):may destroy target(creature[tapped])
auto=@movedto(*[black&white]|mystack):may name(tap & destroy) target(creature) tap && activate destroy target(creature[tapped])
text=Other white creatures you control get +1/+1. -- Other black creatures you control get +1/+1. -- Whenever you cast a white spell, you may tap target creature. -- Whenever you cast a black spell, you may destroy target creature if it's tapped. text=Other white creatures you control get +1/+1. -- Other black creatures you control get +1/+1. -- Whenever you cast a white spell, you may tap target creature. -- Whenever you cast a black spell, you may destroy target creature if it's tapped.
mana={2}{WB}{WB}{WB} mana={2}{WB}{WB}{WB}
type=Creature type=Creature
@@ -26389,7 +26392,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Derelor name=Derelor
auto=lord(*[black]|myhand,mylibrary,mygraveyard,myexile) altercost(black, +1) auto=lord(*[black]|mycastingzone) altercost(black, +1)
text=Black spells you cast cost {B} more to cast. text=Black spells you cast cost {B} more to cast.
mana={3}{B} mana={3}{B}
type=Creature type=Creature
@@ -28810,7 +28813,7 @@ toughness=5
[/card] [/card]
[card] [card]
name=Dragonlord's Servant name=Dragonlord's Servant
auto=lord(dragon|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=lord(dragon|mycastingzone) altercost(colorless, -1)
text=Dragon spells you cast cost {1} less to cast. text=Dragon spells you cast cost {1} less to cast.
mana={1}{R} mana={1}{R}
type=Creature type=Creature
@@ -28914,7 +28917,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Dragonspeaker Shaman name=Dragonspeaker Shaman
auto=lord(dragon|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=lord(dragon|mycastingzone) altercost(colorless,-2)
text=Dragon spells you cast cost {2} less to cast. text=Dragon spells you cast cost {2} less to cast.
mana={1}{R}{R} mana={1}{R}{R}
type=Creature type=Creature
@@ -31332,8 +31335,8 @@ subtype=Aura
[/card] [/card]
[card] [card]
name=Edgewalker name=Edgewalker
auto=lord(cleric|myhand,mylibrary,mygraveyard,myexile) altercost(white,-1) auto=lord(cleric|mycastingzone) altercost(white,-1)
auto=lord(cleric|myhand,mylibrary,mygraveyard,myexile) altercost(black, -1) auto=lord(cleric|mycastingzone) altercost(black, -1)
text=Cleric spells you cast cost {W}{B} less to cast. This effect reduces only the amount of colored mana you pay. (For example, if you cast a Cleric spell with mana cost {1}{W}, it costs {1} to cast.) text=Cleric spells you cast cost {W}{B} less to cast. This effect reduces only the amount of colored mana you pay. (For example, if you cast a Cleric spell with mana cost {1}{W}, it costs {1} to cast.)
mana={1}{W}{B} mana={1}{W}{B}
type=Creature type=Creature
@@ -32734,7 +32737,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Emerald Medallion name=Emerald Medallion
auto=lord(*[green]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*[green]|mycastingzone) altercost(colorless,-1)
text=Green spells you cast cost {1} less to cast. text=Green spells you cast cost {1} less to cast.
mana={2} mana={2}
type=Artifact type=Artifact
@@ -34432,7 +34435,7 @@ type=Artifact
[/card] [/card]
[card] [card]
name=Etherium Sculptor name=Etherium Sculptor
auto=lord(artifact|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(artifact|mycastingzone) altercost(colorless,-1)
text=Artifact spells you cast cost {1} less to cast. text=Artifact spells you cast cost {1} less to cast.
mana={1}{U} mana={1}{U}
type=Artifact Creature type=Artifact Creature
@@ -35219,7 +35222,7 @@ mana={3}{W}
[/card] [/card]
[card] [card]
name=Eye of Ugin name=Eye of Ugin
auto=lord(eldrazi[iscolorless]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=lord(eldrazi[colorless]|mycastingzone) altercost(colorless,-2)
auto={7}{T}:moveTo(myhand) target(creature[iscolorless]|myLibrary) auto={7}{T}:moveTo(myhand) target(creature[iscolorless]|myLibrary)
text=Colorless Eldrazi spells you cast cost {2} less to cast. -- {7}, {T}: Search your library for a colorless creature card, reveal it, and put it into your hand. Then shuffle your library. text=Colorless Eldrazi spells you cast cost {2} less to cast. -- {7}, {T}: Search your library for a colorless creature card, reveal it, and put it into your hand. Then shuffle your library.
type=Legendary Land type=Legendary Land
@@ -36736,7 +36739,7 @@ subtype=Aura
[/card] [/card]
[card] [card]
name=Feroz's Ban name=Feroz's Ban
auto=lord(creature|hand,library,graveyard,exile) altercost(colorless,+2) auto=lord(creature|nonbattlezone) altercost(colorless,+2)
text=Creature spells cost {2} more to cast. text=Creature spells cost {2} more to cast.
mana={6} mana={6}
type=Artifact type=Artifact
@@ -40117,7 +40120,7 @@ toughness=2
[card] [card]
name=Frogtosser Banneret name=Frogtosser Banneret
abilities=haste abilities=haste
auto=lord(*[goblin;rogue]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=lord(*[goblin;rogue]|mycastingzone) altercost(colorless, -1)
text=Haste -- Goblin spells and Rogue spells you cast cost {1} less to cast. text=Haste -- Goblin spells and Rogue spells you cast cost {1} less to cast.
mana={1}{B} mana={1}{B}
type=Creature type=Creature
@@ -43442,8 +43445,8 @@ toughness=3
[/card] [/card]
[card] [card]
name=Glowrider name=Glowrider
auto=lord(*[-creature]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,+1) auto=lord(*[-creature]|mycastingzone) altercost(colorless,+1)
auto=lord(*[-creature]|opponenthand,opponentlibrary,opponentgraveyard,opponentexile) altercost(colorless, +1) auto=lord(*[-creature]|oppcastingzone) altercost(colorless, +1)
text=Noncreature spells cost {1} more to cast. text=Noncreature spells cost {1} more to cast.
mana={2}{W} mana={2}{W}
type=Creature type=Creature
@@ -43919,7 +43922,7 @@ toughness=4
[/card] [/card]
[card] [card]
name=Goblin Electromancer name=Goblin Electromancer
auto=lord(*[instant;sorcery]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*[instant;sorcery]|mycastingzone) altercost(colorless,-1)
text=Instant and sorcery spells you cast cost {1} less to cast. text=Instant and sorcery spells you cast cost {1} less to cast.
mana={U}{R} mana={U}{R}
type=Creature type=Creature
@@ -44646,7 +44649,7 @@ toughness=3
[/card] [/card]
[card] [card]
name=Goblin Warchief name=Goblin Warchief
auto=lord(goblin|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(goblin|mycastingzone) altercost(colorless,-1)
auto=lord(goblin|myBattlefield) haste auto=lord(goblin|myBattlefield) haste
text=Goblin spells you cast cost {1} less to cast. -- Goblin creatures you control have haste. text=Goblin spells you cast cost {1} less to cast. -- Goblin creatures you control have haste.
mana={1}{R}{R} mana={1}{R}{R}
@@ -45392,9 +45395,9 @@ toughness=2
[/card] [/card]
[card] [card]
name=Grand Arbiter Augustin IV name=Grand Arbiter Augustin IV
auto=lord(*[white]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*[white]|mycastingzone) altercost(colorless,-1)
auto=lord(*[blue]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*[blue]|mycastingzone) altercost(colorless,-1)
auto=lord(*|opponenthand,opponentlibrary,opponentgraveyard,opponentexile) altercost( colorless,+1) auto=lord(*|oppcastingzone) altercost( colorless,+1)
text=White spells you cast cost {1} less to cast. -- Blue spells you cast cost {1} less to cast. -- Spells your opponents cast cost {1} more to cast. text=White spells you cast cost {1} less to cast. -- Blue spells you cast cost {1} less to cast. -- Spells your opponents cast cost {1} more to cast.
mana={2}{W}{U} mana={2}{W}{U}
type=Legendary Creature type=Legendary Creature
@@ -49006,7 +49009,7 @@ toughness=3
[card] [card]
name=Heartless Summoning name=Heartless Summoning
auto=lord(creature|myBattlefield) -1/-1 auto=lord(creature|myBattlefield) -1/-1
auto=lord(creature|myhand,mylibrary,mygraveyard,myexile) altercost( colorless,-2) auto=lord(creature|mycastingzone) altercost( colorless,-2)
text=Creature spells you cast cost {2} less to cast. -- Creatures you control get -1/-1 text=Creature spells you cast cost {2} less to cast. -- Creatures you control get -1/-1
mana={1}{B} mana={1}{B}
type=Enchantment type=Enchantment
@@ -49640,7 +49643,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Helm of Awakening name=Helm of Awakening
auto=lord(*|hand,library,graveyard,exile) altercost(colorless,-1) auto=lord(*|nonbattlezone) altercost(colorless,-1)
text=Spells cost {1} less to cast. text=Spells cost {1} less to cast.
mana={2} mana={2}
type=Artifact type=Artifact
@@ -49782,7 +49785,7 @@ toughness=4
[/card] [/card]
[card] [card]
name=Herald of the Pantheon name=Herald of the Pantheon
auto=lord(enchantment|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=lord(enchantment|mycastingzone) altercost(colorless, -1)
auto=@movedto(enchantment|mystack):choice life:1 controller auto=@movedto(enchantment|mystack):choice life:1 controller
text=Enchantment spells you cast cost {1} less to cast. -- Whenever you cast an enchantment spell, you gain 1 life. text=Enchantment spells you cast cost {1} less to cast. -- Whenever you cast an enchantment spell, you gain 1 life.
mana={1}{G} mana={1}{G}
@@ -49810,7 +49813,7 @@ toughness=3
name=Herald of War name=Herald of War
abilities=flying abilities=flying
auto=@combat(attacking) source(this):counter(1/1,1) auto=@combat(attacking) source(this):counter(1/1,1)
auto=thisforeach(counter{1/1,1}) lord(*[angel;human]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=thisforeach(counter{1/1,1}) lord(*[angel;human]|mycastingzone) altercost(colorless, -1)
text=Flying -- Whenever Herald of War attacks, put a +1/+1 counter on it. -- Angel spells and Human spells you cast cost {1} less to cast for each +1/+1 counter on Herald of War. text=Flying -- Whenever Herald of War attacks, put a +1/+1 counter on it. -- Angel spells and Human spells you cast cost {1} less to cast for each +1/+1 counter on Herald of War.
mana={3}{W}{W} mana={3}{W}{W}
type=Creature type=Creature
@@ -49913,7 +49916,7 @@ toughness=3
[/card] [/card]
[card] [card]
name=Hero of Iroas name=Hero of Iroas
auto=lord(aura|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(aura|mycastingzone) altercost(colorless,-1)
auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1) auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1)
text=Aura spells you cast cost 1 less to cast. -- Heroic -- Whenever you cast a spell that targets Hero of Iroas, put a +1/+1 counter on Hero of Iroas. text=Aura spells you cast cost 1 less to cast. -- Heroic -- Whenever you cast a spell that targets Hero of Iroas, put a +1/+1 counter on Hero of Iroas.
mana={1}{W} mana={1}{W}
@@ -50179,7 +50182,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=High Seas name=High Seas
auto=lord(creature[red;green]|hand,library,graveyard,exile) altercost(colorless,+1) auto=lord(creature[red;green]|nonbattlezone) altercost(colorless,+1)
text=Red creature spells and green creature spells cost {1} more to cast. text=Red creature spells and green creature spells cost {1} more to cast.
mana={2}{U} mana={2}{U}
type=Enchantment type=Enchantment
@@ -54359,7 +54362,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Irini Sengir name=Irini Sengir
auto=lord(enchantment[white;green]|hand,library,graveyard,exile) altercost(colorless,+1) auto=lord(enchantment[white;green]|nonbattlezone) altercost(colorless,+1)
text=White enchantment spells and green enchantment spells cost {2} more to cast. text=White enchantment spells and green enchantment spells cost {2} more to cast.
mana={2}{B}{B} mana={2}{B}{B}
type=Legendary Creature type=Legendary Creature
@@ -55042,7 +55045,7 @@ type=Artifact
[/card] [/card]
[card] [card]
name=Jade Leech name=Jade Leech
auto=lord(*[green]|myhand,mylibrary,mygraveyard,myexile) altercost(green,+1) auto=lord(*[green]|mycastingzone) altercost(green,+1)
text=Green spells you cast cost {G} more to cast. text=Green spells you cast cost {G} more to cast.
mana={2}{G}{G} mana={2}{G}{G}
type=Creature type=Creature
@@ -55418,7 +55421,7 @@ type=Artifact
[/card] [/card]
[card] [card]
name=Jet Medallion name=Jet Medallion
auto=lord(*[black]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*[black]|mycastingzone) altercost(colorless,-1)
text=Black spells you cast cost {1} less to cast. text=Black spells you cast cost {1} less to cast.
mana={2} mana={2}
type=Artifact type=Artifact
@@ -59520,7 +59523,7 @@ toughness=0
[/card] [/card]
[card] [card]
name=Krallenhorde Howler name=Krallenhorde Howler
auto=lord(creature|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=lord(creature|mycastingzone) altercost(colorless, -1)
auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Duskwatch Recruiter) auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Duskwatch Recruiter)
text=Creature spells you cast cost {1} less to cast. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Krallenhorde Howler. text=Creature spells you cast cost {1} less to cast. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Krallenhorde Howler.
type=Creature type=Creature
@@ -59743,7 +59746,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Krosan Drover name=Krosan Drover
auto=lord(creature[manacost>=6]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=lord(creature[manacost>=6]|mycastingzone) altercost(colorless,-2)
text=Creature spells you cast with converted mana cost 6 or more cost {2} less to cast. text=Creature spells you cast with converted mana cost 6 or more cost {2} less to cast.
mana={3}{G} mana={3}{G}
type=Creature type=Creature
@@ -59803,7 +59806,7 @@ toughness=5
[card] [card]
name=Krosan Warchief name=Krosan Warchief
auto={1}{G}:regenerate target(beast) auto={1}{G}:regenerate target(beast)
auto=lord(beast|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(beast|mycastingzone) altercost(colorless,-1)
text=Beast spells you cast cost {1} less to cast. -- {1}{G}: Regenerate target Beast. text=Beast spells you cast cost {1} less to cast. -- {1}{G}: Regenerate target Beast.
mana={2}{G} mana={2}{G}
type=Creature type=Creature
@@ -62905,7 +62908,7 @@ type=Artifact
[/card] [/card]
[card] [card]
name=Lodestone Golem name=Lodestone Golem
auto=lord(*[-artifact]|hand,library,graveyard,exile) altercost(colorless,+1) auto=lord(*[-artifact]|nonbattlezone) altercost(colorless,+1)
text=Nonartifact spells cost {1} more to cast. text=Nonartifact spells cost {1} more to cast.
mana={4} mana={4}
type=Artifact Creature type=Artifact Creature
@@ -62986,7 +62989,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Long-Forgotten Gohei name=Long-Forgotten Gohei
auto=lord(arcane|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(arcane|mycastingzone) altercost(colorless,-1)
auto=lord(spirit|myBattlefield) 1/1 auto=lord(spirit|myBattlefield) 1/1
text=Arcane spells you cast cost {1} less to cast. -- Spirit creatures you control get +1/+1. text=Arcane spells you cast cost {1} less to cast. -- Spirit creatures you control get +1/+1.
mana={3} mana={3}
@@ -65048,8 +65051,8 @@ toughness=1
[/card] [/card]
[card] [card]
name=Mana Matrix name=Mana Matrix
auto=lord(instant|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=lord(instant|mycastingzone) altercost(colorless,-2)
auto=lord(enchantment|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=lord(enchantment|mycastingzone) altercost(colorless,-2)
text=Instant and enchantment spells you cast cost up to {2} less to cast. text=Instant and enchantment spells you cast cost up to {2} less to cast.
mana={6} mana={6}
type=Artifact type=Artifact
@@ -69348,7 +69351,7 @@ toughness=4
[/card] [/card]
[card] [card]
name=Mistform Warchief name=Mistform Warchief
auto=lord(creature[share!types!]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) chooseend auto=lord(creature[share!types!]|mycastingzone) altercost(colorless,-1) chooseend
auto={T}:activatechooseatype all(this) becomes(removecreaturesubtypes) && becomes(chosentype) ueot activatechooseend auto={T}:activatechooseatype all(this) becomes(removecreaturesubtypes) && becomes(chosentype) ueot activatechooseend
text=Creature spells you cast that share a creature type with Mistform Warchief cost {1} less to cast. -- {T}: Mistform Warchief becomes the creature type of your choice until end of turn. text=Creature spells you cast that share a creature type with Mistform Warchief cost {1} less to cast. -- {T}: Mistform Warchief becomes the creature type of your choice until end of turn.
mana={2}{U} mana={2}{U}
@@ -73744,7 +73747,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Nightscape Familiar name=Nightscape Familiar
auto=lord(*[blue;red]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*[blue;red]|mycastingzone) altercost(colorless,-1)
auto={1}{B}:regenerate auto={1}{B}:regenerate
text=Blue spells and red spells you cast cost {1} less to cast. -- {1}{B}: Regenerate Nightscape Familiar. text=Blue spells and red spells you cast cost {1} less to cast. -- {1}{B}: Regenerate Nightscape Familiar.
mana={1}{B} mana={1}{B}
@@ -78498,7 +78501,7 @@ toughness=7
[/card] [/card]
[card] [card]
name=Pearl Medallion name=Pearl Medallion
auto=lord(*[white]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*[white]|mycastingzone) altercost(colorless,-1)
text=White spells you cast cost {1} less to cast. text=White spells you cast cost {1} less to cast.
mana={2} mana={2}
type=Artifact type=Artifact
@@ -78915,23 +78918,23 @@ subtype=Trap
[/card] [/card]
[card] [card]
name=Pernicious Deed name=Pernicious Deed
auto={0}{S}:name(X = 0) destroy all(*[-land;manacost=0]) auto={0}{S}:name(X = 0) destroy all(artifact,creature,enchantment[manacost=0])
auto={1}{S}:name(X = 1) destroy all(*[-land;manacost<=1]) auto={1}{S}:name(X = 1) destroy all(artifact,creature,enchantment[manacost<=1])
auto={2}{S}:name(X = 2) destroy all(*[-land;manacost<=2]) auto={2}{S}:name(X = 2) destroy all(artifact,creature,enchantment[manacost<=2])
auto={3}{S}:name(X = 3) destroy all(*[-land;manacost<=3]) auto={3}{S}:name(X = 3) destroy all(artifact,creature,enchantment[manacost<=3])
auto={4}{S}:name(X = 4) destroy all(*[-land;manacost<=4]) auto={4}{S}:name(X = 4) destroy all(artifact,creature,enchantment[manacost<=4])
auto={5}{S}:name(X = 5) destroy all(*[-land;manacost<=5]) auto={5}{S}:name(X = 5) destroy all(artifact,creature,enchantment[manacost<=5])
auto={6}{S}:name(X = 6) destroy all(*[-land;manacost<=6]) auto={6}{S}:name(X = 6) destroy all(artifact,creature,enchantment[manacost<=6])
auto={7}{S}:name(X = 7) destroy all(*[-land;manacost<=7]) auto={7}{S}:name(X = 7) destroy all(artifact,creature,enchantment[manacost<=7])
auto={8}{S}:name(X = 8) destroy all(*[-land;manacost<=8]) auto={8}{S}:name(X = 8) destroy all(artifact,creature,enchantment[manacost<=8])
auto={9}{S}:name(X = 9) destroy all(*[-land;manacost<=9]) auto={9}{S}:name(X = 9) destroy all(artifact,creature,enchantment[manacost<=9])
auto={10}{S}:name(X = 10) destroy all(*[-land;manacost<=10]) auto={10}{S}:name(X = 10) destroy all(artifact,creature,enchantment[manacost<=10])
auto={11}{S}:name(X = 11) destroy all(*[-land;manacost<=11]) auto={11}{S}:name(X = 11) destroy all(artifact,creature,enchantment[manacost<=11])
auto={12}{S}:name(X = 12) destroy all(*[-land;manacost<=12]) auto={12}{S}:name(X = 12) destroy all(artifact,creature,enchantment[manacost<=12])
auto={13}{S}:name(X = 13) destroy all(*[-land;manacost<=13]) auto={13}{S}:name(X = 13) destroy all(artifact,creature,enchantment[manacost<=13])
auto={14}{S}:name(X = 14) destroy all(*[-land;manacost<=14]) auto={14}{S}:name(X = 14) destroy all(artifact,creature,enchantment[manacost<=14])
auto={15}{S}:name(X = 15) destroy all(*[-land;manacost<=15]) auto={15}{S}:name(X = 15) destroy all(artifact,creature,enchantment[manacost<=15])
auto={16}{S}:name(X = 16) destroy all(*[-land;manacost<=16]) auto={16}{S}:name(X = 16) destroy all(artifact,creature,enchantment[manacost<=16])
text={X}, Sacrifice Pernicious Deed: Destroy each artifact, creature, and enchantment with converted mana cost X or less. text={X}, Sacrifice Pernicious Deed: Destroy each artifact, creature, and enchantment with converted mana cost X or less.
mana={1}{B}{G} mana={1}{B}{G}
type=Enchantment type=Enchantment
@@ -80722,7 +80725,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Planar Gate name=Planar Gate
auto=lord(creature|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=lord(creature|mycastingzone) altercost(colorless,-2)
text=Creature spells you cast cost up to {2} less to cast. text=Creature spells you cast cost up to {2} less to cast.
mana={6} mana={6}
type=Artifact type=Artifact
@@ -84149,8 +84152,8 @@ toughness=3
[/card] [/card]
[card] [card]
name=Ragemonger name=Ragemonger
auto=lord(minotaur|myhand,mylibrary,mygraveyard,myexile) altercost(black,-1) auto=lord(minotaur|mycastingzone) altercost(black,-1)
auto=lord(minotaur|myhand,mylibrary,mygraveyard,myexile) altercost(red,-1) auto=lord(minotaur|mycastingzone) altercost(red,-1)
text=Minotaur spells you cast cost BlackRed less to cast. This effect reduces only the amount of colored mana you pay. (For example, if you cast a Minotaur spell with mana cost 2Red, it costs 2 to cast.) text=Minotaur spells you cast cost BlackRed less to cast. This effect reduces only the amount of colored mana you pay. (For example, if you cast a Minotaur spell with mana cost 2Red, it costs 2 to cast.)
mana={1}{B}{R} mana={1}{B}{R}
type=Creature type=Creature
@@ -89753,7 +89756,7 @@ toughness=3
[card] [card]
name=Ruby Leech name=Ruby Leech
abilities=first strike abilities=first strike
auto=lord(*[red]|myhand,mylibrary,mygraveyard,myexile) altercost(red,+1) auto=lord(*[red]|mycastingzone) altercost(red,+1)
text=First strike -- Red spells you cast cost {R} more to cast. text=First strike -- Red spells you cast cost {R} more to cast.
mana={1}{R} mana={1}{R}
type=Creature type=Creature
@@ -89763,7 +89766,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Ruby Medallion name=Ruby Medallion
auto=lord(*[red]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*[red]|mycastingzone) altercost(colorless,-1)
text=Red spells you cast cost {1} less to cast. text=Red spells you cast cost {1} less to cast.
mana={2} mana={2}
type=Artifact type=Artifact
@@ -91583,7 +91586,7 @@ toughness=4
[card] [card]
name=Sapphire Leech name=Sapphire Leech
abilities=flying abilities=flying
auto=lord(*[blue]|myhand,mylibrary,mygraveyard,myexile) altercost(blue,+1) auto=lord(*[blue]|mycastingzone) altercost(blue,+1)
text=Flying -- Blue spells you cast cost {U} more to cast. text=Flying -- Blue spells you cast cost {U} more to cast.
mana={1}{U} mana={1}{U}
type=Creature type=Creature
@@ -91593,7 +91596,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Sapphire Medallion name=Sapphire Medallion
auto=lord(*[blue]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*[blue]|mycastingzone) altercost(colorless,-1)
text=Blue spells you cast cost {1} less to cast. text=Blue spells you cast cost {1} less to cast.
mana={2} mana={2}
type=Artifact type=Artifact
@@ -94515,20 +94518,20 @@ auto=choice name(Sorcery) moveTo(myexile) notatarget(sorcery|myhand) && counter(
auto=choice name(Tribal Instant) moveTo(myexile) notatarget(instant[tribal]|myhand) && counter(0/0,1,TribalInstant) all(this) auto=choice name(Tribal Instant) moveTo(myexile) notatarget(instant[tribal]|myhand) && counter(0/0,1,TribalInstant) all(this)
auto=choice name(Tribal Sorcery) moveTo(myexile) notatarget(sorcery[tribal]|myhand) && counter(0/0,1,TribalSorcery) all(this) auto=choice name(Tribal Sorcery) moveTo(myexile) notatarget(sorcery[tribal]|myhand) && counter(0/0,1,TribalSorcery) all(this)
auto=choice name(cancel) donothing auto=choice name(cancel) donothing
auto=this(counter{0/0.1.Artifact}) lord(artifact|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=this(counter{0/0.1.Artifact}) lord(artifact|mycastingzone) altercost(colorless,-2)
auto=this(counter{0/0.1.ArtifactCreature}) lord(artifact[-creature]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=this(counter{0/0.1.ArtifactCreature}) lord(artifact[-creature]|mycastingzone) altercost(colorless,-2)
auto=this(counter{0/0.1.ArtifactCreature}) lord(creature[-artifact]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=this(counter{0/0.1.ArtifactCreature}) lord(creature[-artifact]|mycastingzone) altercost(colorless,-2)
auto=this(counter{0/0.1.ArtifactCreature}) lord(creature[artifact]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2 ) auto=this(counter{0/0.1.ArtifactCreature}) lord(creature[artifact]|mycastingzone) altercost(colorless,-2 )
auto=this(counter{0/0.1.Creature}) lord(creature|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=this(counter{0/0.1.Creature}) lord(creature|mycastingzone) altercost(colorless,-2)
auto=this(counter{0/0.1.Enchantment}) lord(enchantment|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=this(counter{0/0.1.Enchantment}) lord(enchantment|mycastingzone) altercost(colorless,-2)
auto=this(counter{0/0.1.Instant}) lord(instant|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=this(counter{0/0.1.Instant}) lord(instant|mycastingzone) altercost(colorless,-2)
auto=this(counter{0/0.1.Sorcery}) lord(sorcery|myhand,mylibrary,mygraveyard,myexile) altercost( colorless, -2 ) auto=this(counter{0/0.1.Sorcery}) lord(sorcery|mycastingzone) altercost( colorless, -2 )
auto=this(counter{0/0.1.TribalInstant}) lord(tribal[-instant]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=this(counter{0/0.1.TribalInstant}) lord(tribal[-instant]|mycastingzone) altercost(colorless,-2)
auto=this(counter{0/0.1.TribalInstant}) lord(instant[-tribal]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=this(counter{0/0.1.TribalInstant}) lord(instant[-tribal]|mycastingzone) altercost(colorless,-2)
auto=this(counter{0/0.1.TribalInstant}) lord(instant[tribal]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2 ) auto=this(counter{0/0.1.TribalInstant}) lord(instant[tribal]|mycastingzone) altercost(colorless,-2 )
auto=this(counter{0/0.1.TribalSorcery}) lord(tribal[-sorcery]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=this(counter{0/0.1.TribalSorcery}) lord(tribal[-sorcery]|mycastingzone) altercost(colorless,-2)
auto=this(counter{0/0.1.TribalSorcery}) lord(sorcery[-tribal]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=this(counter{0/0.1.TribalSorcery}) lord(sorcery[-tribal]|mycastingzone) altercost(colorless,-2)
auto=this(counter{0/0.1.TribalSorcery}) lord(sorcery[tribal]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=this(counter{0/0.1.TribalSorcery}) lord(sorcery[tribal]|mycastingzone) altercost(colorless,-2)
text=Imprint - When Semblance Anvil enters the battlefield, you may exile a nonland card from your hand. -- Spells you cast that share a card type with the exiled card cost {2} less to cast. text=Imprint - When Semblance Anvil enters the battlefield, you may exile a nonland card from your hand. -- Spells you cast that share a card type with the exiled card cost {2} less to cast.
mana={3} mana={3}
type=Artifact type=Artifact
@@ -102668,7 +102671,7 @@ toughness=3
[/card] [/card]
[card] [card]
name=Sphere of Resistance name=Sphere of Resistance
auto=lord(*|hand,library,graveyard,exile) altercost(colorless,+1) auto=lord(*|nonbattlezone) altercost(colorless,+1)
text=Spells cost {1} more to cast. text=Spells cost {1} more to cast.
mana={2} mana={2}
type=Artifact type=Artifact
@@ -104129,7 +104132,7 @@ type=Artifact
[card] [card]
name=Squeeze name=Squeeze
text=Sorcery spells cost {3} more to cast. text=Sorcery spells cost {3} more to cast.
auto=lord(sorcery|hand,library,graveyard,exile) altercost(colorless,+3) auto=lord(sorcery|nonbattlezone) altercost(colorless,+3)
mana={3}{U} mana={3}{U}
type=Enchantment type=Enchantment
[/card] [/card]
@@ -105226,7 +105229,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Stinkdrinker Daredevil name=Stinkdrinker Daredevil
auto=lord(giant|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto=lord(giant|mycastingzone) altercost(colorless,-2)
text=Giant spells you cast cost {2} less to cast. text=Giant spells you cast cost {2} less to cast.
mana={2}{R} mana={2}{R}
type=Creature type=Creature
@@ -105414,7 +105417,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Stone Calendar name=Stone Calendar
auto=lord(*|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*|mycastingzone) altercost(colorless,-1)
text=Spells you cast cost up to {1} less to cast. text=Spells you cast cost up to {1} less to cast.
mana={5} mana={5}
type=Artifact type=Artifact
@@ -105741,7 +105744,7 @@ toughness=2
[card] [card]
name=Stonybrook Banneret name=Stonybrook Banneret
abilities=islandwalk abilities=islandwalk
auto=lord(*[merfolk;wizard]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=lord(*[merfolk;wizard]|mycastingzone) altercost(colorless, -1)
text=Islandwalk -- Merfolk spells and Wizard spells you cast cost {1} less to cast. text=Islandwalk -- Merfolk spells and Wizard spells you cast cost {1} less to cast.
mana={1}{U} mana={1}{U}
type=Creature type=Creature
@@ -105990,7 +105993,7 @@ toughness=1
[card] [card]
name=Stormscape Familiar name=Stormscape Familiar
abilities=flying abilities=flying
auto=lord(*[white;black]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*[white;black]|mycastingzone) altercost(colorless,-1)
text=Flying -- White spells and black spells you cast cost {1} less to cast. text=Flying -- White spells and black spells you cast cost {1} less to cast.
mana={1}{U} mana={1}{U}
type=Creature type=Creature
@@ -107376,7 +107379,7 @@ toughness=1
[card] [card]
name=Sunscape Familiar name=Sunscape Familiar
abilities=defender abilities=defender
auto=lord(*[green;blue]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*[green;blue]|mycastingzone) altercost(colorless,-1)
text=Defender (This creature can't attack.) -- Green spells and blue spells you cast cost {1} less to cast. text=Defender (This creature can't attack.) -- Green spells and blue spells you cast cost {1} less to cast.
mana={1}{W} mana={1}{W}
type=Creature type=Creature
@@ -110836,8 +110839,8 @@ toughness=2
[card] [card]
name=Thalia, Guardian of Thraben name=Thalia, Guardian of Thraben
abilities=first strike abilities=first strike
auto=lord(*[-creature]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,+1) auto=lord(*[-creature]|mycastingzone) altercost(colorless,+1)
auto=lord(*[-creature]|opponenthand,opponentlibrary,opponentgraveyard,opponentexile) altercost(colorless, +1) auto=lord(*[-creature]|oppcastingzone) altercost(colorless, +1)
text=First Strike -- Noncreature spells cost {1} more to cast. text=First Strike -- Noncreature spells cost {1} more to cast.
mana={1}{W} mana={1}{W}
type=Legendary Creature type=Legendary Creature
@@ -111413,7 +111416,7 @@ toughness=7
[/card] [/card]
[card] [card]
name=Thorn of Amethyst name=Thorn of Amethyst
auto=lord(*[-creature]|hand,library,graveyard,exile) altercost(colorless,+1) auto=lord(*[-creature]|nonbattlezone) altercost(colorless,+1)
text=Noncreature spells cost {1} more to cast. text=Noncreature spells cost {1} more to cast.
mana={2} mana={2}
type=Artifact type=Artifact
@@ -111495,7 +111498,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Thornscape Familiar name=Thornscape Familiar
auto=lord(*[red;white]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*[red;white]|mycastingzone) altercost(colorless,-1)
text=Red spells and white spells you cast cost {1} less to cast. text=Red spells and white spells you cast cost {1} less to cast.
mana={1}{G} mana={1}{G}
type=Creature type=Creature
@@ -112442,7 +112445,7 @@ toughness=1
[card] [card]
name=Thunderscape Familiar name=Thunderscape Familiar
abilities=first strike abilities=first strike
auto=lord(*[black;green]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(*[black;green]|mycastingzone) altercost(colorless,-1)
text=First strike -- Black spells and green spells you cast cost {1} less to cast. text=First strike -- Black spells and green spells you cast cost {1} less to cast.
mana={1}{R} mana={1}{R}
type=Creature type=Creature
@@ -116587,7 +116590,7 @@ toughness=2
[card] [card]
name=Undead Warchief name=Undead Warchief
auto=lord(zombie|myBattlefield) 2/1 auto=lord(zombie|myBattlefield) 2/1
auto=lord(zombie|myhand,mylibrary,mygraveyard,myexile) altercost( colorless,-1) auto=lord(zombie|mycastingzone) altercost( colorless,-1)
text=Zombie spells you cast cost {1} less to cast. -- Zombie creatures you control get +2/+1. text=Zombie spells you cast cost {1} less to cast. -- Zombie creatures you control get +2/+1.
mana={2}{B}{B} mana={2}{B}{B}
type=Creature type=Creature
@@ -117572,7 +117575,7 @@ subtype=Urza's
[/card] [/card]
[card] [card]
name=Urza's Filter name=Urza's Filter
auto=lord(*[multicolor]|hand,library,graveyard,exile) altercost(colorless,-2) auto=lord(*[multicolor]|nonbattlezone) altercost(colorless,-2)
text=Multicolored spells cost up to {2} less to cast. text=Multicolored spells cost up to {2} less to cast.
mana={4} mana={4}
type=Artifact type=Artifact
@@ -117586,7 +117589,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Urza's Incubator name=Urza's Incubator
auto=chooseatype lord(creature[chosentype]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) chooseend auto=chooseatype lord(creature[chosentype]|mycastingzone) altercost(colorless,-2) chooseend
text=As Urza's Incubator enters the battlefield, choose a creature type. -- Creature spells of the chosen type cost {2} less to cast. text=As Urza's Incubator enters the battlefield, choose a creature type. -- Creature spells of the chosen type cost {2} less to cast.
mana={3} mana={3}
type=Artifact type=Artifact
@@ -121249,7 +121252,7 @@ subtype=Vraska
[card] [card]
name=Vryn Wingmare name=Vryn Wingmare
abilities=flying abilities=flying
auto=lord(*[-creature]|hand,library,graveyard,exile) altercost(colorless, +1) auto=lord(*[-creature]|nonbattlezone) altercost(colorless, +1)
text=Flying -- Noncreature spells cost {1} more to cast. text=Flying -- Noncreature spells cost {1} more to cast.
mana={2}{W} mana={2}{W}
type=Creature type=Creature
@@ -122460,7 +122463,7 @@ toughness=2
[card] [card]
name=Warden of Evos Isle name=Warden of Evos Isle
abilities=flying abilities=flying
auto=lord(creature[flying]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=lord(creature[flying]|mycastingzone) altercost(colorless, -1)
text=Flying. -- Creature spells with flying you cast cost 1 less to cast. text=Flying. -- Creature spells with flying you cast cost 1 less to cast.
mana={2}{U} mana={2}{U}
type=Creature type=Creature
+2 -8
View File
@@ -1429,7 +1429,6 @@ public:
if (!e) return 0; if (!e) return 0;
MTGCardInstance * check = e->cardAfter; MTGCardInstance * check = e->cardAfter;
MTGGameZone * oldZone = e->cardAfter->currentZone; MTGGameZone * oldZone = e->cardAfter->currentZone;
//MTGGameZone * currZone = check->currentZone;
check->currentZone = check->previousZone; check->currentZone = check->previousZone;
if (check->next && (check->next->currentZone|| check->isToken)) if (check->next && (check->next->currentZone|| check->isToken))
{ {
@@ -1948,8 +1947,8 @@ public:
class AACopier: public ActivatedAbility class AACopier: public ActivatedAbility
{ {
public: public:
MTGAbility * andAbility;
vector<MTGAbility *> currentAbilities; vector<MTGAbility *> currentAbilities;
MTGAbility * andAbility;
AACopier(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target = NULL, ManaCost * _cost = NULL); AACopier(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target = NULL, ManaCost * _cost = NULL);
int resolve(); int resolve();
const string getMenuText(); const string getMenuText();
@@ -2270,12 +2269,7 @@ public:
assert(modifier < 2); assert(modifier < 2);
((MTGCardInstance *) target)->basicAbilities.set(ability, modifier > 0); ((MTGCardInstance *) target)->basicAbilities.set(ability, modifier > 0);
//---add or subtract so we can keep track - for future use
((MTGCardInstance *) target)->modbasicAbilities[ability] += modifier;
//---make sure no negative values
if(((MTGCardInstance *) target)->modbasicAbilities[ability] < 0)
((MTGCardInstance *) target)->modbasicAbilities[ability] = 0;
//---end add or subtract abilities
return MTGAbility::addToGame(); return MTGAbility::addToGame();
} }
+6 -6
View File
@@ -33,10 +33,10 @@ protected:
/* /*
** Tries to render the Big version of a card picture, backups to text version in case of failure ** Tries to render the Big version of a card picture, backups to text version in case of failure
*/ */
static void RenderBig(MTGCard * card, const Pos& pos, bool thumb = false, bool noborder = false, bool smallerscale = false, bool ingame = false); static void RenderBig(MTGCard * card, const Pos& pos, bool thumb = false, bool noborder = false);
static void RenderCountersBig(MTGCard * card, const Pos& pos, int drawMode = DrawMode::kNormal); static void RenderCountersBig(MTGCard * card, const Pos& pos, int drawMode = DrawMode::kNormal);
static void AlternateRender(MTGCard * card, const Pos& pos, bool noborder = false, bool smallerscale = false); static void AlternateRender(MTGCard * card, const Pos& pos);
static void TinyCropRender(MTGCard * card, const Pos& pos, JQuad * quad); static void TinyCropRender(MTGCard * card, const Pos& pos, JQuad * quad);
static string FormattedData (string data, string replace, string value); static string FormattedData (string data, string replace, string value);
static bool FilterCard (MTGCard * card,string filter); static bool FilterCard (MTGCard * card,string filter);
@@ -54,10 +54,10 @@ public:
CardGui(MTGCardInstance* card, const Pos& ref); CardGui(MTGCardInstance* card, const Pos& ref);
virtual void Render(); virtual void Render();
virtual void Update(float dt); virtual void Update(float dt);
bool isBlackBorder(string set);
void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false, bool ingame = false); void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false);
static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false, bool ingame = false); static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false);
static void DrawBorder(string setname, const Pos& inPosition, float x, bool noborder = false, bool smallscale = false);
static JQuadPtr AlternateThumbQuad(MTGCard * card); static JQuadPtr AlternateThumbQuad(MTGCard * card);
virtual ostream& toString(ostream&) const; virtual ostream& toString(ostream&) const;
}; };
-1
View File
@@ -57,7 +57,6 @@ public:
uint8_t colors; uint8_t colors;
typedef std::bitset<Constants::NB_BASIC_ABILITIES> BasicAbilitiesSet; typedef std::bitset<Constants::NB_BASIC_ABILITIES> BasicAbilitiesSet;
vector<int> modbasicAbilities;
BasicAbilitiesSet basicAbilities; BasicAbilitiesSet basicAbilities;
BasicAbilitiesSet LKIbasicAbilities; BasicAbilitiesSet LKIbasicAbilities;
+1 -1
View File
@@ -23,7 +23,7 @@ public:
void renderCard(int index) void renderCard(int index)
{ {
int alpha = (int) (255 * (mCards[index].scale + 1.0 - max_scale)); int alpha = (int) (255 * (mCards[index].scale + 1.0 - max_scale));
DeckView::renderCard(index, alpha, false, true); DeckView::renderCard(index, alpha);
} }
void Render(); void Render();
+1 -1
View File
@@ -207,7 +207,7 @@ protected:
* *
* \see mCards * \see mCards
*/ */
void renderCard(int index, int alpha, bool asThumbnail = false, bool addWHborder = false); void renderCard(int index, int alpha, bool asThumbnail = false);
/*! \brief Returns the index in mCards of the card that is nearest to the given point /*! \brief Returns the index in mCards of the card that is nearest to the given point
* *
-3
View File
@@ -125,10 +125,7 @@ class GameObserver{
void enchantmentStatus(); void enchantmentStatus();
void Affinity(); void Affinity();
bool AffinityNeedsUpdate; bool AffinityNeedsUpdate;
bool legendNeedUpdate;
void addObserver(MTGAbility * observer); void addObserver(MTGAbility * observer);
void checkLegendary(MTGCardInstance * card);
map<MTGCardInstance *,bool> cards;
bool removeObserver(ActionElement * observer); bool removeObserver(ActionElement * observer);
void startGame(GameType, Rules * rules); void startGame(GameType, Rules * rules);
void untapPhase(); void untapPhase();
+2 -2
View File
@@ -25,8 +25,8 @@ struct GuiAvatar: public GuiStatic
BOTTOM_RIGHT BOTTOM_RIGHT
} Corner; } Corner;
static const unsigned Width = 32;//35 static const unsigned Width = 35;
static const unsigned Height = 45;//50 static const unsigned Height = 50;
protected: protected:
int avatarRed; int avatarRed;
+8
View File
@@ -61,6 +61,14 @@ class ThisControllerlife:public ThisDescriptor{
ThisControllerlife * clone() const; ThisControllerlife * clone() const;
}; };
class ThisCreatureSpells:public ThisDescriptor{
public:
virtual int match(MTGCardInstance * card);
ThisCreatureSpells(int count);
ThisCreatureSpells * clone() const;
};
class ThisOpponentlife:public ThisDescriptor{ class ThisOpponentlife:public ThisDescriptor{
public: public:
virtual int match(MTGCardInstance * card); virtual int match(MTGCardInstance * card);
+1 -2
View File
@@ -184,8 +184,7 @@ struct WEventCardBlocked : public WEventCardUpdate {
//event when card is sacrificed. //event when card is sacrificed.
struct WEventCardSacrifice : public WEventCardUpdate { struct WEventCardSacrifice : public WEventCardUpdate {
MTGCardInstance * cardAfter; MTGCardInstance * cardAfter;
bool istoken; WEventCardSacrifice(MTGCardInstance * card,MTGCardInstance * afterCard);
WEventCardSacrifice(MTGCardInstance * card,MTGCardInstance * afterCard, bool token = false);
virtual Targetable * getTarget(int target); virtual Targetable * getTarget(int target);
}; };
-1
View File
@@ -80,7 +80,6 @@ public:
} }
}; };
virtual JQuadPtr RetrieveCard(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL) = 0; virtual JQuadPtr RetrieveCard(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL) = 0;
virtual JQuadPtr RetrieveCardToken(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL, int tId = 0) = 0;
virtual JSample * RetrieveSample(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL) = 0; virtual JSample * RetrieveSample(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL) = 0;
virtual JTexture * RetrieveTexture(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL) = 0; virtual JTexture * RetrieveTexture(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL) = 0;
virtual JQuadPtr RetrieveQuad(const string& filename, float offX=0.0f, float offY=0.0f, float width=0.0f, float height=0.0f, string resname="", int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL, int id = 0) = 0; virtual JQuadPtr RetrieveQuad(const string& filename, float offX=0.0f, float offY=0.0f, float width=0.0f, float height=0.0f, string resname="", int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL, int id = 0) = 0;
@@ -141,7 +141,6 @@ public:
bool IsThreaded(); bool IsThreaded();
JQuadPtr RetrieveCard(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL); JQuadPtr RetrieveCard(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL);
JQuadPtr RetrieveCardToken(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL, int tId = 0);
JSample * RetrieveSample(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL); JSample * RetrieveSample(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL);
JTexture * RetrieveTexture(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL); JTexture * RetrieveTexture(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL);
JQuadPtr RetrieveQuad(const string& filename, float offX=0.0f, float offY=0.0f, float width=0.0f, float height=0.0f, string resname="", int style = RETRIEVE_LOCK, int submode = CACHE_NORMAL, int id = 0); JQuadPtr RetrieveQuad(const string& filename, float offX=0.0f, float offY=0.0f, float width=0.0f, float height=0.0f, string resname="", int style = RETRIEVE_LOCK, int submode = CACHE_NORMAL, int id = 0);
+2 -4
View File
@@ -130,10 +130,8 @@ void Interruptible::Render(MTGCardInstance * source, JQuad * targetQuad, string
if (bigQuad) if (bigQuad)
{ {
Pos pos = Pos(CardGui::BigWidth / 2, CardGui::BigHeight / 2 - 10, 0.80f, 0.0, 220); Pos pos = Pos(CardGui::BigWidth / 2, CardGui::BigHeight / 2 - 10, 1.0, 0.0, 220);
pos.actY = 142;//adjust y a little bit CardGui::DrawCard(source, pos, observer->getCardSelector()->GetDrawMode());
bool ingame = observer?true:false;
CardGui::DrawCard(source, pos, observer->getCardSelector()->GetDrawMode(),false,false,false,ingame);
} }
if (targetQuad) if (targetQuad)
+44 -127
View File
@@ -401,8 +401,8 @@ void MTGRevealingCards::Render()
{ {
if (!revealDisplay) if (!revealDisplay)
return; return;
CheckUserInput(mEngine->ReadButton()); CheckUserInput(mEngine->ReadButton());
revealDisplay->CheckUserInput(mEngine->ReadButton()); revealDisplay->CheckUserInput(mEngine->ReadButton());
revealDisplay->Render(); revealDisplay->Render();
return; return;
} }
@@ -1459,107 +1459,51 @@ AACopier::AACopier(GameObserver* observer, int _id, MTGCardInstance * _source, M
int AACopier::resolve() int AACopier::resolve()
{ {
bool tokencopied = false; bool tokencopied = false;
AbilityFactory af(game);
MTGCardInstance * _target = (MTGCardInstance *) target; MTGCardInstance * _target = (MTGCardInstance *) target;
if (_target) if (_target)
{ {
MTGCard* clone;
AbilityFactory af(game);
if(_target->isToken || (_target->isACopier && _target->hasCopiedToken)) if(_target->isToken || (_target->isACopier && _target->hasCopiedToken))
{//fix crash when copying token
clone = _target;
tokencopied = true; tokencopied = true;
}
else
clone = MTGCollection()->getCardById(_target->copiedID);
///////////////////////////////////////////////////////////////////////
MTGCardInstance * myClone = NEW MTGCardInstance(clone, source->controller()->game);
//source->copy(myClone);
if(source->controller()->playMode != Player::MODE_TEST_SUITE)
{
source->setMTGId(myClone->getMTGId());
source->setId = myClone->setId;
source->setRarity(myClone->getRarity());
}
source->name = myClone->name;
source->setName(myClone->name);
source->getManaCost()->resetCosts();
if(myClone->getManaCost())
source->getManaCost()->copy(myClone->getManaCost());
source->colors = myClone->colors;
source->types = myClone->types;
source->text = myClone->text;
source->formattedText = myClone->formattedText;
source->basicAbilities = myClone->model->data->basicAbilities;
source->modbasicAbilities = myClone->modbasicAbilities;
for(unsigned int i = 0;i < source->cardsAbilities.size();i++)
{
MTGAbility * a = dynamic_cast<MTGAbility *>(source->cardsAbilities[i]);
if(a) game->removeObserver(a); if(tokencopied)
} source->copy(_target->clone());
source->cardsAbilities.clear(); else
source->magicText = myClone->magicText; {
af.getAbilities(&currentAbilities, NULL, source); source->copy(_target);
for (size_t i = 0; i < currentAbilities.size(); ++i) }
//abilities
for(unsigned int i = 0;i < source->cardsAbilities.size();i++)
{
MTGAbility * a = dynamic_cast<MTGAbility *>(source->cardsAbilities[i]);
if(a) game->removeObserver(a);
}
source->cardsAbilities.clear();
af.getAbilities(&currentAbilities, NULL, source);
for (size_t i = 0; i < currentAbilities.size(); ++i)
{
MTGAbility * a = currentAbilities[i];
a->source = (MTGCardInstance *) source;
if (a)
{ {
MTGAbility * a = currentAbilities[i]; if (a->oneShot)
a->source = (MTGCardInstance *) source;
if (a)
{ {
if (a->oneShot) a->resolve();
SAFE_DELETE(a);
}
else
{
a->addToGame();
MayAbility * dontAdd = dynamic_cast<MayAbility*>(a);
if(!dontAdd)
{ {
a->resolve(); source->cardsAbilities.push_back(a);
SAFE_DELETE(a);
}
else
{
a->addToGame();
MayAbility * dontAdd = dynamic_cast<MayAbility*>(a);
if(!dontAdd)
{
source->cardsAbilities.push_back(a);
}
} }
} }
} }
//power }
int powerMod = 0; //
int toughMod = 0;
bool powerlessThanOriginal = false;
bool toughLessThanOriginal = false;
if(source->power < source->origpower)
{
powerMod = source->origpower - source->power;
powerlessThanOriginal = true;
}
else
{
powerMod =source->power - source->origpower;
}
//toughness
if(source->toughness <= source->origtoughness)
{
toughMod = source->origtoughness - source->toughness;
toughLessThanOriginal = true;
}
else
{
toughMod =source->toughness - source->origtoughness;
}
if(!source->isCDA)
{
source->power = powerlessThanOriginal?myClone->power - powerMod:myClone->power + powerMod;
source->life = toughLessThanOriginal?myClone->toughness - toughMod:myClone->toughness + toughMod;
source->toughness = toughLessThanOriginal?myClone->toughness - toughMod:myClone->toughness + toughMod;
source->origpower = myClone->origpower;
source->origtoughness = myClone->origtoughness;
}
else
{//pbonus & tbonus are already computed except damage taken...
source->life -= source->damageCount;
}
SAFE_DELETE(myClone);
///////////////////////////////////////////////////////////////////////
source->isACopier = true; source->isACopier = true;
source->hasCopiedToken = tokencopied; source->hasCopiedToken = tokencopied;
source->copiedID = _target->copiedID; source->copiedID = _target->copiedID;
@@ -1604,7 +1548,7 @@ int AACopier::resolve()
andAbilityClone->addToGame(); andAbilityClone->addToGame();
} }
} }
source->mPropertiesChangedSinceLastUpdate = true; //source->mPropertiesChangedSinceLastUpdate = true;
return 1; return 1;
} }
return 0; return 0;
@@ -1727,10 +1671,8 @@ AACounter::AACounter(GameObserver* observer, int id, MTGCardInstance * source, M
{ {
MTGCardInstance * _target = (MTGCardInstance *) target; MTGCardInstance * _target = (MTGCardInstance *) target;
if(_target->isFlipped && _target->hasType(Subtypes::TYPE_PLANESWALKER))//is flipping pw if(_target->isFlipped && _target->hasType(Subtypes::TYPE_PLANESWALKER))//is flipping pw
{
this->forceDestroy = 1;
return 0; return 0;
}
AbilityFactory af(game); AbilityFactory af(game);
if(counterstring.size()) if(counterstring.size())
{ {
@@ -2847,12 +2789,10 @@ int AASacrificeCard::resolve()
{ {
Player * p = _target->controller(); Player * p = _target->controller();
MTGCardInstance * beforeCard = _target; MTGCardInstance * beforeCard = _target;
WEvent * e;
p->game->putInGraveyard(_target); p->game->putInGraveyard(_target);
while(_target->next) while(_target->next)
_target = _target->next; _target = _target->next;
bool cardIsToken = _target->isToken ? true : false; WEvent * e = NEW WEventCardSacrifice(beforeCard,_target);
e = NEW WEventCardSacrifice(beforeCard, _target, cardIsToken);
game->receiveEvent(e); game->receiveEvent(e);
if(andAbility) if(andAbility)
{ {
@@ -3293,15 +3233,10 @@ int AAFlip::resolve()
game->removeObserver(this); game->removeObserver(this);
return 0; return 0;
} }
//701.25a Only permanents represented by double-faced cards can transform.
//(See rule 711, “Double-Faced Cards.”) If a spell or ability instructs a player
//to transform any permanent that isnt represented by a double-faced card, nothing happens.
//***Copier and Tokens cannot transform but can be flip since flip cards are single sided***
MTGCardInstance * _target = (MTGCardInstance *) target; MTGCardInstance * _target = (MTGCardInstance *) target;
if (_target) if (_target)
{ {
if((_target->isACopier||_target->isToken||_target->has(Constants::CANTTRANSFORM)) && !isflipcard && !forcedcopy) if(((_target->isACopier||_target->isToken) && !isflipcard) || _target->has(Constants::CANTTRANSFORM))
{ {
game->removeObserver(this); game->removeObserver(this);
return 0; return 0;
@@ -3334,10 +3269,9 @@ int AAFlip::resolve()
_target->text = myFlip->text; _target->text = myFlip->text;
_target->formattedText = myFlip->formattedText; _target->formattedText = myFlip->formattedText;
_target->basicAbilities = myFlip->model->data->basicAbilities; _target->basicAbilities = myFlip->model->data->basicAbilities;
_target->modbasicAbilities = myFlip->modbasicAbilities;
cdaDamage = _target->damageCount; cdaDamage = _target->damageCount;
_target->copiedID = myFlip->getMTGId();//for copier _target->copiedID = myFlip->getMTGId();//for copier
if(forcedcopy && _target->owner->playMode != Player::MODE_TEST_SUITE) if(_target->owner->playMode != Player::MODE_TEST_SUITE)
{ {
_target->setMTGId(myFlip->getMTGId()); _target->setMTGId(myFlip->getMTGId());
_target->setId = myFlip->setId; _target->setId = myFlip->setId;
@@ -4064,10 +3998,10 @@ int AACloner::resolve()
} }
} }
list<int>::iterator it; list<int>::iterator it;
/*for (it = awith.begin(); it != awith.end(); it++) for (it = awith.begin(); it != awith.end(); it++)
{//there must be a layer of temporary abilities and original abilities {//there must be a layer of temporary abilities and original abilities
spell->source->basicAbilities[*it] = 1; spell->source->basicAbilities[*it] = 1;
}*/ }
for (it = colors.begin(); it != colors.end(); it++) for (it = colors.begin(); it != colors.end(); it++)
{ {
spell->source->setColor(*it); spell->source->setColor(*it);
@@ -4076,11 +4010,6 @@ int AACloner::resolve()
{ {
spell->source->addType(*it); spell->source->addType(*it);
} }
for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++)
{
if(_target->model->data->basicAbilities[k])
spell->source->basicAbilities[k] = _target->model->data->basicAbilities[k];
}
if(_target->TokenAndAbility) if(_target->TokenAndAbility)
{//the source copied a token with andAbility {//the source copied a token with andAbility
MTGAbility * andAbilityClone = _target->TokenAndAbility->clone(); MTGAbility * andAbilityClone = _target->TokenAndAbility->clone();
@@ -7804,24 +7733,12 @@ int AACastCard::resolveSpell()
if (game->targetChooser) if (game->targetChooser)
{ {
game->targetChooser->Owner = source->controller(); game->targetChooser->Owner = source->controller();
if(putinplay) spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL, 1, 0);
{
spell = NEW Spell(game, 0,copy,game->targetChooser,NULL, 1);
spell->resolve();
}
else
spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL, 1, 0);
game->targetChooser = NULL; game->targetChooser = NULL;
} }
else else
{ {
if(putinplay) spell = game->mLayers->stackLayer()->addSpell(copy, NULL, NULL, 1, 0);
{
spell = NEW Spell(game, 0,copy,NULL,NULL, 1);
spell->resolve();
}
else
spell = game->mLayers->stackLayer()->addSpell(copy, NULL, NULL, 1, 0);
} }
if (copy->has(Constants::STORM)) if (copy->has(Constants::STORM))
+5 -5
View File
@@ -263,16 +263,16 @@ void CardDisplay::Render()
{ {
mObjects[mCurr]->Render(); mObjects[mCurr]->Render();
CardGui * cardg = ((CardGui *) mObjects[mCurr]); CardGui * cardg = ((CardGui *) mObjects[mCurr]);
Pos pos = Pos((CardGui::BigWidth / 2), CardGui::BigHeight / 2 - 10, 0.80f, 0.0, 220); Pos pos = Pos(CardGui::BigWidth / 2, CardGui::BigHeight / 2 - 10, 1.0, 0.0, 220);
int drawMode = DrawMode::kNormal;//scale card display from 1.0f to 0.80f int drawMode = DrawMode::kNormal;
if (observer) if (observer)
{ {
pos.actY = 142;//reduce y a little pos.actY = 145;
if (x < (CardGui::BigWidth / 2)) pos.actX = SCREEN_WIDTH - 10 - CardGui::BigWidth / 2; if (x < (CardGui::BigWidth / 2)) pos.actX = SCREEN_WIDTH - 10 - CardGui::BigWidth / 2;
drawMode = observer->getCardSelector()->GetDrawMode(); drawMode = observer->getCardSelector()->GetDrawMode();
} }
bool ingame = observer?true:false;
cardg->DrawCard(pos, drawMode, false, false, false,ingame); cardg->DrawCard(pos, drawMode);
} }
} }
+88 -162
View File
@@ -111,20 +111,20 @@ void CardGui::Update(float dt)
PlayGuiObject::Update(dt); PlayGuiObject::Update(dt);
} }
void CardGui::DrawCard(const Pos& inPosition, int inMode, bool thumb, bool noborder, bool smallerscale, bool ingame) void CardGui::DrawCard(const Pos& inPosition, int inMode, bool thumb, bool noborder)
{ {
DrawCard(card, inPosition, inMode, thumb, noborder, smallerscale, ingame); DrawCard(card, inPosition, inMode, thumb, noborder);
} }
void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool thumb, bool noborder, bool smallerscale, bool ingame) void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool thumb, bool noborder)
{ {
switch (inMode) switch (inMode)
{ {
case DrawMode::kNormal: case DrawMode::kNormal:
RenderBig(inCard, inPosition, thumb, noborder, smallerscale, ingame); RenderBig(inCard, inPosition, thumb, noborder);
break; break;
case DrawMode::kText: case DrawMode::kText:
AlternateRender(inCard, inPosition, noborder, smallerscale); AlternateRender(inCard, inPosition);
break; break;
default: default:
break; break;
@@ -137,43 +137,29 @@ void CardGui::Render()
WFont * mFont = game?game->getResourceManager()->GetWFont(Fonts::MAIN_FONT):WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT); WFont * mFont = game?game->getResourceManager()->GetWFont(Fonts::MAIN_FONT):WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT);
JRenderer * renderer = JRenderer::GetInstance(); JRenderer * renderer = JRenderer::GetInstance();
TargetChooser * tc = NULL; TargetChooser * tc = NULL;
//fake border and mask...
JQuadPtr fakeborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white");
JQuadPtr highlightborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white");
JQuadPtr fakemask = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white");
if (game) if (game)
tc = game->getCurrentTargetChooser(); tc = game->getCurrentTargetChooser();
bool alternate = true; bool alternate = true;
JQuadPtr quad = game? game->getResourceManager()->RetrieveCard(card, CACHE_THUMB):WResourceManager::Instance()->RetrieveCard(card, CACHE_THUMB); JQuadPtr quad = game? game->getResourceManager()->RetrieveCard(card, CACHE_THUMB):WResourceManager::Instance()->RetrieveCard(card, CACHE_THUMB);
if(card && !card->hasCopiedToken && !card->isToken && card->name != card->model->data->name) if(card && !card->isToken && card->name != card->model->data->name)
{ {
MTGCard * fcard = MTGCollection()->getCardByName(card->name); MTGCard * fcard = MTGCollection()->getCardByName(card->name);
quad = game->getResourceManager()->RetrieveCard(fcard, CACHE_THUMB); quad = game->getResourceManager()->RetrieveCard(fcard, CACHE_THUMB);
} }
if (card->hasCopiedToken && !quad.get())
{
MTGCard * tcard = MTGCollection()->getCardById(abs(card->copiedID));
quad = game->getResourceManager()->RetrieveCardToken(tcard, CACHE_THUMB, 1, abs(card->copiedID));
}
if (quad.get()) if (quad.get())
alternate = false; alternate = false;
else else
quad = AlternateThumbQuad(card); quad = AlternateThumbQuad(card);
float cardScale = quad ? 37.f / quad->mHeight : 1; float cardScale = quad ? 40 / quad->mHeight : 1;
//I want the below for melded cards but I dont know how to adjust everything else //I want the below for melded cards but I dont know how to adjust everything else
//to look neat and clean. leaving this here incase someone else wants to pretty up the p/t box //to look neat and clean. leaving this here incase someone else wants to pretty up the p/t box
//and line up the position. //and line up the position.
float zz = 0.99f; /* if (card->MeldedFrom.size())
float yy = 0.0f; cardScale = cardScale + (10 / quad->mHeight);*/
if (card->MeldedFrom.size()) float scale = actZ * cardScale;
{
zz = 1.10f;
yy = 2.0f;
}
float scale = (actZ*zz) * cardScale;
JQuadPtr shadow; JQuadPtr shadow;
if (actZ > 1) if (actZ > 1)
@@ -182,7 +168,7 @@ void CardGui::Render()
if (shadow) if (shadow)
{ {
shadow->SetColor(ARGB(static_cast<unsigned char>(actA)/2,255,255,255)); shadow->SetColor(ARGB(static_cast<unsigned char>(actA)/2,255,255,255));
renderer->RenderQuad(shadow.get(), actX + ((actZ*zz) - 1) * 15, (actY-yy) + ((actZ*zz) - 1) * 15, actT, 27 * (actZ*zz) / 16, 39 * (actZ*zz) / 16); renderer->RenderQuad(shadow.get(), actX + (actZ - 1) * 15, actY + (actZ - 1) * 15, actT, 28 * actZ / 16, 40 * actZ / 16);
} }
} }
@@ -193,7 +179,7 @@ void CardGui::Render()
if (extracostshadow) if (extracostshadow)
{ {
extracostshadow->SetColor(ARGB(static_cast<unsigned char>(actA)/2,100,0,0)); extracostshadow->SetColor(ARGB(static_cast<unsigned char>(actA)/2,100,0,0));
renderer->RenderQuad(extracostshadow.get(), actX + ((actZ*zz) - 1) * 15, (actY-yy) + ((actZ*zz) - 1) * 15, actT, 27 * (actZ*zz) / 16, 39 * (actZ*zz) / 16); renderer->RenderQuad(extracostshadow.get(), actX + (actZ - 1) * 15, actY + (actZ - 1) * 15, actT, 28 * actZ / 16, 40 * actZ / 16);
} }
} }
@@ -222,7 +208,7 @@ void CardGui::Render()
if(white) if(white)
{ {
white->SetColor(ARGB(255,230,50,50)); white->SetColor(ARGB(255,230,50,50));
renderer->RenderQuad(white.get(), actX, (actY-yy), actT, 28 * (actZ*zz) / 16, 40 * (actZ*zz) / 16); renderer->RenderQuad(white.get(), actX, actY, actT, 30 * actZ / 16, 42 * actZ / 16);
} }
} }
@@ -249,22 +235,25 @@ void CardGui::Render()
if(white) if(white)
{ {
white->SetColor(ARGB(255,0,0,255)); white->SetColor(ARGB(255,0,0,255));
renderer->RenderQuad(white.get(), actX, (actY-yy), actT, 28 * (actZ*zz) / 16, 40 * (actZ*zz) / 16); renderer->RenderQuad(white.get(), actX, actY, actT, 30 * actZ / 16, 42 * actZ / 16);
} }
} }
} }
if (quad) if (quad)
{ {
quad->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255)); quad->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));
//fake border...
JQuadPtr fakeborder;
JQuadPtr highlightborder;
fakeborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white");
highlightborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white");
if(fakeborder) if(fakeborder)
{ {
int rgb = isBlackBorder(setlist[card->setId].c_str())?15:240;
if(card->has(Constants::CANPLAYFROMGRAVEYARD)||card->has(Constants::CANPLAYFROMEXILE)||card->has(Constants::PAYZERO)) if(card->has(Constants::CANPLAYFROMGRAVEYARD)||card->has(Constants::CANPLAYFROMEXILE)||card->has(Constants::PAYZERO))
fakeborder->SetColor(ARGB((int)(actA),7,235,7));//green border fakeborder->SetColor(ARGB((int)(actA),7,235,7));//green border
else else
fakeborder->SetColor(ARGB((int)(actA),rgb,rgb,rgb)); fakeborder->SetColor(ARGB((int)(actA),15,15,15));
renderer->RenderQuad(fakeborder.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16); renderer->RenderQuad(fakeborder.get(), actX, actY, actT, (29 * actZ + 1) / 16, 42 * actZ / 16);
//renderer->DrawRect(actX, (actY-yy),((28 * (actZ*zz) + 1) / 16),(40 * (actZ*zz) / 16),ARGB((int)(actA),240,240,240));
} }
//draw border for highlighting //draw border for highlighting
if (game) if (game)
@@ -272,26 +261,26 @@ void CardGui::Render()
if (card && card->isTargetted() && highlightborder) if (card && card->isTargetted() && highlightborder)
{ {
highlightborder->SetColor(ARGB(95,255,0,0)); highlightborder->SetColor(ARGB(95,255,0,0));
renderer->RenderQuad(highlightborder.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16); renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
} }
if (card && card->isTargetter() && highlightborder) if (card && card->isTargetter() && highlightborder)
{ {
highlightborder->SetColor(ARGB(95,0,245,0)); highlightborder->SetColor(ARGB(95,0,245,0));
renderer->RenderQuad(highlightborder.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16); renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
} }
if(card->myPair && card->myPair->isInPlay(game) && highlightborder) if(card->myPair && card->myPair->isInPlay(game) && highlightborder)
{ {
if(mHasFocus) if(mHasFocus)
{ {
highlightborder->SetColor(ARGB(200,7,98,248)); highlightborder->SetColor(ARGB(200,7,98,248));
renderer->RenderQuad(highlightborder.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16); renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
} }
if(CardView* cv = dynamic_cast<CardView*>(card->myPair->view)) if(CardView* cv = dynamic_cast<CardView*>(card->myPair->view))
{ {
if(cv->mHasFocus) if(cv->mHasFocus)
{ {
highlightborder->SetColor(ARGB(200,57,28,248)); highlightborder->SetColor(ARGB(200,57,28,248));
renderer->RenderQuad(highlightborder.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16); renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
} }
} }
} }
@@ -304,7 +293,7 @@ void CardGui::Render()
else else
highlightborder->SetColor(ARGB(200,57,28,248)); highlightborder->SetColor(ARGB(200,57,28,248));
renderer->RenderQuad(highlightborder.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16); renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
} }
if(CardView* cv = dynamic_cast<CardView*>(card->shackled->view)) if(CardView* cv = dynamic_cast<CardView*>(card->shackled->view))
{ {
@@ -315,20 +304,20 @@ void CardGui::Render()
else else
highlightborder->SetColor(ARGB(200,57,28,248)); highlightborder->SetColor(ARGB(200,57,28,248));
renderer->RenderQuad(highlightborder.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16); renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
} }
} }
} }
} }
//draw the card image //draw the card image
renderer->RenderQuad(quad.get(), actX, (actY-yy), actT, scale, scale); renderer->RenderQuad(quad.get(), actX, actY, actT, scale, scale);
} }
if (alternate) if (alternate)
{ {
mFont->SetColor(ARGB(static_cast<unsigned char>(actA), 0, 0, 0)); mFont->SetColor(ARGB(static_cast<unsigned char>(actA), 0, 0, 0));
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE * 0.5f * (actZ*zz)); mFont->SetScale(DEFAULT_MAIN_FONT_SCALE * 0.5f * actZ);
mFont->DrawString(_(card->getName()), actX - (actZ*zz) * Width / 2 + 1, (actY-yy) - (actZ*zz) * Height / 2 + 1); mFont->DrawString(_(card->getName()), actX - actZ * Width / 2 + 1, actY - actZ * Height / 2 + 1);
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
JQuadPtr icon; JQuadPtr icon;
@@ -345,7 +334,7 @@ void CardGui::Render()
if (icon.get()) if (icon.get())
{ {
icon->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255)); icon->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));
renderer->RenderQuad(icon.get(), actX, (actY-yy), actT); renderer->RenderQuad(icon.get(), actX, actY, actT);
icon->SetColor(ARGB(255,255,255,255)); //Putting color back as this quad is shared icon->SetColor(ARGB(255,255,255,255)); //Putting color back as this quad is shared
} }
@@ -357,7 +346,7 @@ void CardGui::Render()
if (mor && mor->mTex) { if (mor && mor->mTex) {
mor->SetHotSpot(static_cast<float> (mor->mTex->mWidth / 2), static_cast<float> (mor->mTex->mHeight / 2)); mor->SetHotSpot(static_cast<float> (mor->mTex->mWidth / 2), static_cast<float> (mor->mTex->mHeight / 2));
mor->SetColor(ARGB(255,255,255,255)); mor->SetColor(ARGB(255,255,255,255));
renderer->RenderQuad(mor.get(), actX, (actY-yy), actT,scale, scale); renderer->RenderQuad(mor.get(), actX, actY, actT,scale, scale);
} }
} }
@@ -369,24 +358,24 @@ void CardGui::Render()
if(card->isTapped()) if(card->isTapped())
{ {
if(mHasFocus) if(mHasFocus)
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-10,(actY-yy) - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,255,0,0)); renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-10,actY - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,255,0,0));
else else
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-8,(actY-yy) - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,255,0,0)); renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-8,actY - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,255,0,0));
} }
else else
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-2,(actY-yy) - (scale * quad->mHeight / 2)-2, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 1.8f,ARGB(250,255,0,0)); renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-2,actY - (scale * quad->mHeight / 2)-2, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 1.8f,ARGB(250,255,0,0));
} }
if (card && card->isTargetter()) if (card && card->isTargetter())
{ {
if(card->isTapped()) if(card->isTapped())
{ {
if(mHasFocus) if(mHasFocus)
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-10,(actY-yy) - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,0,255,0)); renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-10,actY - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,0,255,0));
else else
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-8,(actY-yy) - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,0,255,0)); renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-8,actY - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,0,255,0));
} }
else else
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-2,(actY-yy) - (scale * quad->mHeight / 2)-2, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 1.8f,ARGB(250,0,255,0)); renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-2,actY - (scale * quad->mHeight / 2)-2, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 1.8f,ARGB(250,0,255,0));
} }
} }
@@ -396,12 +385,9 @@ void CardGui::Render()
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
char buffer[200]; char buffer[200];
sprintf(buffer, "%i/%i", card->power, card->life); sprintf(buffer, "%i/%i", card->power, card->life);
//move up the p/t box by increasing ymody renderer->FillRect(actX - (13 * actZ), actY + 4 * actZ, 25.5f * actZ, 14 * actZ,
float ymody = (card->isAttacker()||card->isDefenser())&&card->isTapped()?-5.0f:0.0f;
//float ymody = (card->getObserver()->getView()->getRenderedPlayer() == card->controller() ? - mody: +mody);
renderer->FillRect(actX - (13 * (actZ*zz)), (actY-yy+ymody) + 4 * (actZ*zz), 25.5f * (actZ*zz), 14 * (actZ*zz),
ARGB(((static_cast<unsigned char>(actA))/2),0,0,0)); ARGB(((static_cast<unsigned char>(actA))/2),0,0,0));
renderer->DrawRect(actX - (13 * (actZ*zz)), (actY-yy+ymody) + 4 * (actZ*zz), 25.5f * (actZ*zz), 14 * (actZ*zz), renderer->DrawRect(actX - (13 * actZ), actY + 4 * actZ, 25.5f * actZ, 14 * actZ,
ARGB(((static_cast<unsigned char>(actA))),20,20,20)); ARGB(((static_cast<unsigned char>(actA))),20,20,20));
//damaged or buffed or powered down //damaged or buffed or powered down
if(card->wasDealtDamage && card->life <= 2) if(card->wasDealtDamage && card->life <= 2)
@@ -414,11 +400,10 @@ void CardGui::Render()
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),238,130,238));//violet legendary eldrazi mFont->SetColor(ARGB(static_cast<unsigned char>(actA),238,130,238));//violet legendary eldrazi
else else
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));//white default mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));//white default
mFont->SetScale((actZ*zz)); mFont->SetScale(actZ);
mFont->SetScale((actZ*zz)); mFont->SetScale(actZ);
//try to center p/t inside the p/t box
float halfbufferW = (mFont->GetStringWidth(buffer))/2; float halfbufferW = (mFont->GetStringWidth(buffer))/2;
mFont->DrawString(buffer, actX - (halfbufferW), (actY-yy+ymody) + 5 * (actZ*zz)); mFont->DrawString(buffer, actX - halfbufferW, actY + 7 * actZ);
mFont->SetScale(1); mFont->SetScale(1);
} }
@@ -444,15 +429,14 @@ void CardGui::Render()
else if(card->chooseacolor == 5) else if(card->chooseacolor == 5)
buff += "\n-White"; buff += "\n-White";
} }
if(!alternate && buff != "" && game->gameType() == GAME_TYPE_CLASSIC)//it seems that other game modes makes cards as tokens!!! hmmm...
if(buff != "")//enable indicator at all modes
{ {
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
char buffer[200]; char buffer[200];
sprintf(buffer, "%s", buff.c_str()); sprintf(buffer, "%s", buff.c_str());
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,215,0));//Gold indicator mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,215,0));//Gold indicator
mFont->SetScale(0.8f); mFont->SetScale(0.8f);
mFont->DrawString(buffer, actX - 10 * (actZ*zz), (actY-yy) - (16 * (actZ*zz))); mFont->DrawString(buffer, actX - 10 * actZ, actY - (16 * actZ));
mFont->SetScale(1); mFont->SetScale(1);
} }
@@ -471,8 +455,8 @@ void CardGui::Render()
char buffer[200]; char buffer[200];
sprintf(buffer, "%i", card->counters->counters[0]->nb); sprintf(buffer, "%i", card->counters->counters[0]->nb);
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255)); mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));
mFont->SetScale((actZ*zz)); mFont->SetScale(actZ);
mFont->DrawString(buffer, actX - 10 * (actZ*zz), (actY-yy) - (12 * (actZ*zz))); mFont->DrawString(buffer, actX - 10 * actZ, actY - (12 * actZ));
mFont->SetScale(1); mFont->SetScale(1);
} }
} }
@@ -484,28 +468,34 @@ void CardGui::Render()
if (shadow) if (shadow)
{ {
shadow->SetColor(ARGB(200,255,255,255)); shadow->SetColor(ARGB(200,255,255,255));
renderer->RenderQuad(shadow.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16); renderer->RenderQuad(shadow.get(), actX, actY, actT, (28 * actZ + 1) / 16, 40 * actZ / 16);
} }
} }
// Render a mask over the card, if set // Render a mask over the card, if set
if (mask && quad) if (mask && quad)
JRenderer::GetInstance()->FillRect(actX - (scale * quad->mWidth / 2),(actY-yy) - (scale * quad->mHeight / 2), scale * quad->mWidth, scale* quad->mHeight, mask); JRenderer::GetInstance()->FillRect(actX - (scale * quad->mWidth / 2),actY - (scale * quad->mHeight / 2), scale * quad->mWidth, scale* quad->mHeight, mask);
if ((tc && tc->alreadyHasTarget(card)) || (game && card == game->mLayers->actionLayer()->currentActionCard))//paint targets red. if ((tc && tc->alreadyHasTarget(card)) || (game && card == game->mLayers->actionLayer()->currentActionCard))//paint targets red.
{ {
if(fakemask) if (card->isTapped())
{ {
fakemask->SetColor(ARGB(150,255,0,0)); renderer->FillRect(actX - (scale * quad->mWidth / 2)-7,actY - (scale * quad->mHeight / 2)+7,scale* quad->mHeight,scale * quad->mWidth, ARGB(128,255,0,0));
renderer->RenderQuad(fakemask.get(), actX, (actY-yy), actT, (26 * (actZ*zz) + 1) / 16, 38 * (actZ*zz) / 16); }
else
{
renderer->FillRect(actX - (scale * quad->mWidth / 2),actY - (scale * quad->mHeight / 2), scale * quad->mWidth, scale* quad->mHeight, ARGB(128,255,0,0));
} }
} }
if(tc && tc->source && tc->source->view && tc->source->view->actZ >= 1.3 && card == tc->source)//paint the source green while infocus. if(tc && tc->source && tc->source->view && tc->source->view->actZ >= 1.3 && card == tc->source)//paint the source green while infocus.
{ {
if(fakemask) if (tc->source->isTapped())
{ {
fakemask->SetColor(ARGB(150,0,255,0)); renderer->FillRect(actX - (scale * quad->mWidth / 2)-7,actY - (scale * quad->mHeight / 2)+7,scale* quad->mHeight,scale * quad->mWidth, ARGB(128,0,255,0));
renderer->RenderQuad(fakemask.get(), actX, (actY-yy), actT, (26 * (actZ*zz) + 1) / 16, 38 * (actZ*zz) / 16); }
else
{
renderer->FillRect(tc->source->view->actX - (scale * quad->mWidth / 2),tc->source->view->actY - (scale * quad->mHeight / 2), scale*quad->mWidth, scale*quad->mHeight, ARGB(128,0,255,0));
} }
} }
@@ -535,13 +525,12 @@ JQuadPtr CardGui::AlternateThumbQuad(MTGCard * card)
return q; return q;
} }
void CardGui::AlternateRender(MTGCard * card, const Pos& pos, bool noborder, bool smallerscale) void CardGui::AlternateRender(MTGCard * card, const Pos& pos)
{ {
// Draw the "unknown" card model // Draw the "unknown" card model
JRenderer * renderer = JRenderer::GetInstance(); JRenderer * renderer = JRenderer::GetInstance();
JQuadPtr q; JQuadPtr q;
//set id
string cardsetname = setlist[card->setId].c_str();
float x = pos.actX; float x = pos.actX;
vector<ModRulesBackGroundCardGuiItem *>items = gModRules.cardgui.background; vector<ModRulesBackGroundCardGuiItem *>items = gModRules.cardgui.background;
@@ -565,10 +554,6 @@ void CardGui::AlternateRender(MTGCard * card, const Pos& pos, bool noborder, boo
float scale = pos.actZ * 250 / q->mHeight; float scale = pos.actZ * 250 / q->mHeight;
q->SetColor(ARGB((int)pos.actA,255,255,255)); q->SetColor(ARGB((int)pos.actA,255,255,255));
//Draw border
DrawBorder(cardsetname, pos, x, noborder, smallerscale);
//render alternate
renderer->RenderQuad(q.get(), x, pos.actY, pos.actT, scale, scale); renderer->RenderQuad(q.get(), x, pos.actY, pos.actT, scale, scale);
} }
@@ -1130,7 +1115,7 @@ void CardGui::TinyCropRender(MTGCard * card, const Pos& pos, JQuad * quad)
} }
//Renders a big card on screen. Defaults to the "alternate" rendering if no image is found //Renders a big card on screen. Defaults to the "alternate" rendering if no image is found
void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder, bool smallerscale, bool ingame) void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder)
{ {
JRenderer * renderer = JRenderer::GetInstance(); JRenderer * renderer = JRenderer::GetInstance();
//GameObserver * game = GameObserver::GetInstance(); //GameObserver * game = GameObserver::GetInstance();
@@ -1138,25 +1123,15 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder
// card = (MTGCard*)game->mLayers->actionLayer()->currentActionCard; // card = (MTGCard*)game->mLayers->actionLayer()->currentActionCard;
//i want this but ai targets cards so quickly that it can crash the game. //i want this but ai targets cards so quickly that it can crash the game.
float x = pos.actX; float x = pos.actX;
//init setname
string cardsetname = setlist[card->setId].c_str();
JQuadPtr quad = thumb ? WResourceManager::Instance()->RetrieveCard(card, RETRIEVE_THUMB) JQuadPtr quad = thumb ? WResourceManager::Instance()->RetrieveCard(card, RETRIEVE_THUMB)
: WResourceManager::Instance()->RetrieveCard(card); : WResourceManager::Instance()->RetrieveCard(card);
MTGCardInstance * kcard = dynamic_cast<MTGCardInstance*>(card); MTGCardInstance * kcard = dynamic_cast<MTGCardInstance*>(card);
if(kcard && !kcard->hasCopiedToken && !kcard->isToken && kcard->name != kcard->model->data->name) if(kcard && !kcard->isToken && kcard->name != kcard->model->data->name)
{ {
MTGCard * fcard = MTGCollection()->getCardByName(kcard->name); MTGCard * fcard = MTGCollection()->getCardByName(kcard->name);
quad = WResourceManager::Instance()->RetrieveCard(fcard); quad = WResourceManager::Instance()->RetrieveCard(fcard);
} }
if(ingame)
{
if (kcard->hasCopiedToken && kcard->getObserver() && !quad.get())
{
MTGCard * tcard = MTGCollection()->getCardById(abs(kcard->copiedID));
quad = thumb ? WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_THUMB, 1, abs(kcard->copiedID))
: WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_NORMAL, 1, abs(kcard->copiedID));
}
}
if (quad.get()) if (quad.get())
{ {
if (quad->mHeight < quad->mWidth) if (quad->mHeight < quad->mWidth)
@@ -1165,23 +1140,30 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder
} }
quad->SetColor(ARGB(255,255,255,255)); quad->SetColor(ARGB(255,255,255,255));
float scale = pos.actZ * 250.f / quad->mHeight; float scale = pos.actZ * 250.f / quad->mHeight;
//Draw border //init setname
DrawBorder(cardsetname, pos, x, noborder, smallerscale); string cardsetname = setlist[card->setId].c_str();
//force smaller scale on alpha beta if(!noborder)
smallerscale = cardsetname=="LEA"||cardsetname=="LEB"?true:smallerscale;
float modxscale = (cardsetname =="UNH")?0.02f:0.008f;
float modyscale = (cardsetname =="UNH")?0.015f:0.0075f;
bool unh = (cardsetname =="UNH")?true:false;
//Draw card
if(smallerscale && !unh)
renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale-0.001f, scale-0.001f);
else
{ {
if(ingame) if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale+modxscale, scale+modyscale); {
//like white border
renderer->FillRoundRect(x-92,pos.actY-130, (scale * quad->mWidth)-10, (scale * quad->mHeight)-11, 9.0f,ARGB(255,248,248,255));
//black thin line to simulate card edge
renderer->DrawRoundRect(x-92,pos.actY-130, (scale * quad->mWidth)-10, (scale * quad->mHeight)-11, 9.0f,ARGB(150,20,20,20));
}
else else
renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale+0.002f, scale+0.0015f); {
//like black border
renderer->FillRoundRect(x-92,pos.actY-130, (scale * quad->mWidth)-10, (scale * quad->mHeight)-11, 9.0f,ARGB(255,10,10,10));
//white thin line to simulate card edge
renderer->DrawRoundRect(x-92,pos.actY-130, (scale * quad->mWidth)-10, (scale * quad->mHeight)-11, 9.0f,ARGB(50,240,240,240));
}
//render card image
renderer->RenderQuad(quad.get(), x, pos.actY-2, pos.actT, scale-0.02f, scale-0.02f);
} }
else
renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale);
RenderCountersBig(card, pos); RenderCountersBig(card, pos);
return; return;
} }
@@ -1189,63 +1171,7 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder
//DebugTrace("Unable to fetch image: " << card->getImageName()); //DebugTrace("Unable to fetch image: " << card->getImageName());
// If we come here, we do not have the picture. // If we come here, we do not have the picture.
AlternateRender(card, pos, noborder, smallerscale); AlternateRender(card, pos);
}
void CardGui::DrawBorder(string cardsetname, const Pos& pos, float x, bool noborder, bool smallerscale)
{
JRenderer * renderer = JRenderer::GetInstance();
JQuadPtr alphabeta = WResourceManager::Instance()->RetrieveTempQuad("alphabeta.png");
if(!noborder)
{
if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
{//Draw white border
renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(255,248,248,255));
renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(150,20,20,20));
}
else
{
if(cardsetname == "LEA")
{//BETA HAS REGULAR BORDER
//Draw more rounder black border
renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f - 0.5f,pos.actZ * 239.4f + 8.f,10.f,ARGB(255,5,5,5));
renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f - 0.5f,pos.actZ * 239.4f + 8.f,10.f,ARGB(50,240,240,240));
}
else
{//draw black border
renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(255,5,5,5));
renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(50,240,240,240));
}
}
}
//draw inner border
if(cardsetname == "LEA"||cardsetname == "LEB")
{
if(alphabeta.get())
{
alphabeta->SetHotSpot(static_cast<float> (alphabeta->mWidth / 2), static_cast<float> (alphabeta->mHeight / 2));
float myscale = pos.actZ * 254 / alphabeta->mHeight;
alphabeta->SetColor(ARGB((int)pos.actA,255,255,255));
renderer->RenderQuad(alphabeta.get(), x, pos.actY+0.2f, pos.actT, myscale, myscale);
}
}
}
bool CardGui::isBlackBorder(string cardsetname)
{
if(cardsetname == "2ED"||
cardsetname == "RV"||
cardsetname == "4ED"||
cardsetname == "5ED"||
cardsetname == "6ED"||
cardsetname == "7ED"||
cardsetname == "8ED"||
cardsetname == "9ED"||
cardsetname == "CHR"||
cardsetname == "DM")
return false;
return true;
} }
string CardGui::FormattedData(string data, string replace, string value) string CardGui::FormattedData(string data, string replace, string value)
-5
View File
@@ -41,10 +41,6 @@ CardPrimitive::CardPrimitive(CardPrimitive * source)
if(!source) if(!source)
return; return;
basicAbilities = source->basicAbilities; basicAbilities = source->basicAbilities;
for(int k=0; k < Constants::NB_BASIC_ABILITIES; k++)
{
modbasicAbilities.push_back(source->basicAbilities[k]);
}
LKIbasicAbilities = source->basicAbilities; LKIbasicAbilities = source->basicAbilities;
for (size_t i = 0; i < source->types.size(); ++i) for (size_t i = 0; i < source->types.size(); ++i)
@@ -82,7 +78,6 @@ CardPrimitive::~CardPrimitive()
int CardPrimitive::init() int CardPrimitive::init()
{ {
basicAbilities.reset(); basicAbilities.reset();
modbasicAbilities.clear();
types.clear(); types.clear();
+1 -7
View File
@@ -340,13 +340,7 @@ void CardSelector::Render()
if (CardView* card = dynamic_cast<CardView*>(active) ) if (CardView* card = dynamic_cast<CardView*>(active) )
{ {
if(timer > 0) if(timer > 0)
{ card->DrawCard(bigpos, mDrawMode);
float modx = 14.f;
Pos npos = Pos(bigpos.x+modx,bigpos.y-4.f,bigpos.zoom-(bigpos.zoom/5),bigpos.t,bigpos.alpha);
//render card
bool ingame = observer?true:false;
card->DrawCard(npos, mDrawMode, false, false, false,ingame);
}
} }
} }
} }
+1 -1
View File
@@ -185,7 +185,7 @@ int Damage::resolve()
_target->poisonCount += damage;//this will be changed to poison counters. _target->poisonCount += damage;//this will be changed to poison counters.
_target->damageCount += damage; _target->damageCount += damage;
if(typeOfDamage == 2) if(typeOfDamage == 2)
target->nonCombatDamage += damage; _target->nonCombatDamage += damage;
if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes. if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes.
{ {
vector<string> values = MTGAllCards::getCreatureValuesById(); vector<string> values = MTGAllCards::getCreatureValuesById();
+7 -17
View File
@@ -93,7 +93,7 @@ void DeckView::reloadIndexes()
} }
} }
void DeckView::renderCard(int index, int alpha, bool asThumbnail, bool addWHborder) void DeckView::renderCard(int index, int alpha, bool asThumbnail)
{ {
WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT); WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT);
@@ -146,30 +146,20 @@ void DeckView::renderCard(int index, int alpha, bool asThumbnail, bool addWHbord
else else
{//NORMAL VIEW WITH IMAGES {//NORMAL VIEW WITH IMAGES
int mode = !options[Options::DISABLECARDS].number ? DrawMode::kNormal : DrawMode::kText; int mode = !options[Options::DISABLECARDS].number ? DrawMode::kNormal : DrawMode::kText;
float modx = addWHborder ? 2.0f:0.0f; //border for editor && others???
bool smallerscale = modx > 0.0f ? true:false;
//border for editor && others since the border in cardgui:drawcard scales larger...
string cardsetname = setlist[cardPosition.card->setId].c_str(); string cardsetname = setlist[cardPosition.card->setId].c_str();
if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM") if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
{ {
JRenderer::GetInstance()->FillRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-(5.f+modx),(cardPosition.y - cardPosition.scale * 142.5f)-(5.f+modx),cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f+modx,ARGB(255,248,248,255)); JRenderer::GetInstance()->FillRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-5.f,(cardPosition.y - cardPosition.scale * 142.5f)-5.f,cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f,ARGB(255,248,248,255));
JRenderer::GetInstance()->DrawRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-(5.f+modx),(cardPosition.y - cardPosition.scale * 142.5f)-(5.f+modx),cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f+modx,ARGB(150,20,20,20)); JRenderer::GetInstance()->DrawRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-5.f,(cardPosition.y - cardPosition.scale * 142.5f)-5.f,cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f,ARGB(150,20,20,20));
} }
else else
{ {
if (cardsetname == "LEA") JRenderer::GetInstance()->FillRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-5.f,(cardPosition.y - cardPosition.scale * 142.5f)-5.f,cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f,ARGB(255,10,10,10));
{ JRenderer::GetInstance()->DrawRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-5.f,(cardPosition.y - cardPosition.scale * 142.5f)-5.f,cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f,ARGB(50,240,240,240));
JRenderer::GetInstance()->FillRoundRect((cardPosition.x - cardPosition.scale * 96.75f)-(7.f+modx),(cardPosition.y - cardPosition.scale * 139.25f)-(7.f+modx),cardPosition.scale * 193.5f,cardPosition.scale * 278.5f,7.f+modx,ARGB(255,10,10,10));
JRenderer::GetInstance()->DrawRoundRect((cardPosition.x - cardPosition.scale * 96.75f)-(7.f+modx),(cardPosition.y - cardPosition.scale * 139.25f)-(7.f+modx),cardPosition.scale * 193.5f,cardPosition.scale * 278.5f,7.f+modx,ARGB(50,240,240,240));
}
else
{
JRenderer::GetInstance()->FillRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-(5.f+modx),(cardPosition.y - cardPosition.scale * 142.5f)-(5.f+modx),cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f+modx,ARGB(255,10,10,10));
JRenderer::GetInstance()->DrawRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-(5.f+modx),(cardPosition.y - cardPosition.scale * 142.5f)-(5.f+modx),cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f+modx,ARGB(50,240,240,240));
}
} }
Pos pos = Pos(cardPosition.x, cardPosition.y, cardPosition.scale * 285 / 250, 0.0, 255); Pos pos = Pos(cardPosition.x, cardPosition.y, cardPosition.scale * 285 / 250, 0.0, 255);
CardGui::DrawCard(cardPosition.card, pos, mode, asThumbnail, true, smallerscale); CardGui::DrawCard(cardPosition.card, pos, mode, asThumbnail, true);
} }
int quadAlpha = alpha; int quadAlpha = alpha;
if (!deck()->count(cardPosition.card)) quadAlpha /= 2; if (!deck()->count(cardPosition.card)) quadAlpha /= 2;
+1 -3
View File
@@ -1288,11 +1288,9 @@ int SacrificeCost::doPay()
{ {
MTGCardInstance * beforeCard = target; MTGCardInstance * beforeCard = target;
source->storedCard = target->createSnapShot(); source->storedCard = target->createSnapShot();
WEvent * e;
target->controller()->game->putInGraveyard(target); target->controller()->game->putInGraveyard(target);
WEvent * e = NEW WEventCardSacrifice(beforeCard,target);
GameObserver * game = target->owner->getObserver(); GameObserver * game = target->owner->getObserver();
bool cardIsToken = target->isToken ? true : false;
e = NEW WEventCardSacrifice(beforeCard, target, cardIsToken);
game->receiveEvent(e); game->receiveEvent(e);
target = NULL; target = NULL;
if (tc) if (tc)
+1 -49
View File
@@ -54,7 +54,6 @@ void GameObserver::cleanup()
gameTurn.clear(); gameTurn.clear();
OpenedDisplay = NULL; OpenedDisplay = NULL;
AffinityNeedsUpdate = false; AffinityNeedsUpdate = false;
legendNeedUpdate = false;
} }
GameObserver::~GameObserver() GameObserver::~GameObserver()
@@ -900,17 +899,7 @@ void GameObserver::gameStateBasedEffects()
int nbcards = z->nb_cards; int nbcards = z->nb_cards;
//------------------------------ //------------------------------
p->nomaxhandsize = (z->hasAbility(Constants::NOMAXHAND)); p->nomaxhandsize = (z->hasAbility(Constants::NOMAXHAND));
//legendary
if (legendNeedUpdate)
{
for (int cl = 0; cl < nbcards; cl++)
{
MTGCardInstance * c = z->cards[cl];
if (!c->isPhased && c->hasType(Subtypes::TYPE_LEGENDARY) && !c->has(Constants::NOLEGEND))
checkLegendary(c);
}
legendNeedUpdate = false;
}
///////////////////////////////////////////////// /////////////////////////////////////////////////
//handle end of turn effects while we're at it.// //handle end of turn effects while we're at it.//
///////////////////////////////////////////////// /////////////////////////////////////////////////
@@ -1030,43 +1019,6 @@ void GameObserver::gameStateBasedEffects()
} }
} }
void GameObserver::checkLegendary(MTGCardInstance * card)
{
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->controller() == card->controller() && !(comparison->getName().compare(card->getName())))
{
oldCards.push_back(comparison);
destroy = 1;
}
}
if(destroy)
{
vector<MTGAbility*>selection;
MultiAbility * multi = NEW MultiAbility(this, this->mLayers->actionLayer()->getMaxId(), card, card, NULL);
for(unsigned int i = 0;i < oldCards.size();i++)
{
AAMover *a = NEW AAMover(this, this->mLayers->actionLayer()->getMaxId(), card, oldCards[i],"ownergraveyard","Keep New");
a->oneShot = true;
multi->Add(a);
}
multi->oneShot = 1;
MTGAbility * a1 = multi;
selection.push_back(a1);
AAMover *b = NEW AAMover(this, this->mLayers->actionLayer()->getMaxId(), card, card,"ownergraveyard","Keep Old");
b->oneShot = true;
MTGAbility * b1 = b;
selection.push_back(b1);
MTGAbility * menuChoice = NEW MenuAbility(this, this->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Legendary Rule");
menuChoice->addToGame();
}
}
void GameObserver::enchantmentStatus() void GameObserver::enchantmentStatus()
{ {
for (int i = 0; i < 2; i++) for (int i = 0; i < 2; i++)
+1 -36
View File
@@ -1196,59 +1196,24 @@ void GameStateDuel::Render()
case DUEL_STATE_BACK_TO_MAIN_MENU: case DUEL_STATE_BACK_TO_MAIN_MENU:
if (game) if (game)
{ {
string gtype = "";
if(game->gameType() == GAME_TYPE_CLASSIC)
gtype = "Classic";
else if(game->gameType() == GAME_TYPE_MOMIR)
gtype = "Momir";
else if(game->gameType() == GAME_TYPE_RANDOM1 || game->gameType() == GAME_TYPE_RANDOM2)
gtype = "Random";
else if(game->gameType() == GAME_TYPE_STORY)
gtype = "Story";
else if(game->gameType() == GAME_TYPE_DEMO)
gtype = "Demo";
else if(game->gameType() == GAME_TYPE_STONEHEWER)
gtype = "Stone Hewer";
else if(game->gameType() == GAME_TYPE_HERMIT)
gtype = "Hermit Druid";
else
gtype = "Blitzkrieg";
r->FillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, ARGB(100,0,0,0)); r->FillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, ARGB(100,0,0,0));
char buffer[4096]; char buffer[4096];
sprintf(buffer, _("Turn:%i").c_str(), game->turn); sprintf(buffer, _("Turn:%i").c_str(), game->turn);
mFont->SetColor(ARGB(255,255,255,255)); mFont->SetColor(ARGB(255,255,255,255));
mFont->DrawString(buffer, SCREEN_WIDTH / 2, 0, JGETEXT_CENTER); mFont->DrawString(buffer, SCREEN_WIDTH / 2, 0, JGETEXT_CENTER);
mFont->DrawString(gtype, SCREEN_WIDTH / 2, SCREEN_HEIGHT - 15, JGETEXT_CENTER);
} }
if (menu) if (menu)
{ {
menu->Render(); menu->Render();
// display the player deck names in their respective corners // display the player deck names in their respective corners
string p0playmode = "";
if(game->players[0]->playMode == Player::MODE_TEST_SUITE)
p0playmode = "AI Testsuite";
else if(game->players[0]->playMode == Player::MODE_HUMAN)
p0playmode = "Human";
else
p0playmode = "AI";
string playerDeckName = game->players[0]->deckName; string playerDeckName = game->players[0]->deckName;
float playerDeckNamePixelLength = mFont->GetStringWidth(playerDeckName.c_str()); float playerDeckNamePixelLength = mFont->GetStringWidth(playerDeckName.c_str());
float playerModePixelLength = mFont->GetStringWidth(p0playmode.c_str());
mFont->DrawString( playerDeckName, SCREEN_WIDTH_F - playerDeckNamePixelLength, SCREEN_HEIGHT_F - 50); mFont->DrawString( playerDeckName, SCREEN_WIDTH_F - playerDeckNamePixelLength, SCREEN_HEIGHT_F - 50);
mFont->DrawString( p0playmode, SCREEN_WIDTH_F - playerModePixelLength, SCREEN_HEIGHT_F - 60);
if(game->players.size()>1) if(game->players.size()>1)
{ {
string p1playmode = "";
if(game->players[1]->playMode == Player::MODE_TEST_SUITE)
p1playmode = "AI Testsuite";
else if(game->players[1]->playMode == Player::MODE_HUMAN)
p1playmode = "Human";
else
p1playmode = "AI";
string opponentDeckName = game->players[1]->deckName; string opponentDeckName = game->players[1]->deckName;
mFont->DrawString( opponentDeckName, 0, 40); mFont->DrawString( opponentDeckName, 0, 50);
mFont->DrawString( p1playmode, 0, 50);
} }
} }
} }
+11 -11
View File
@@ -12,24 +12,24 @@ GuiAvatars::GuiAvatars(DuelLayers* duelLayers) :
{ {
Add(self = NEW GuiAvatar(SCREEN_WIDTH, SCREEN_HEIGHT, false, mpDuelLayers->getRenderedPlayer(), GuiAvatar::BOTTOM_RIGHT, this)); Add(self = NEW GuiAvatar(SCREEN_WIDTH, SCREEN_HEIGHT, false, mpDuelLayers->getRenderedPlayer(), GuiAvatar::BOTTOM_RIGHT, this));
self->zoom = 0.9f; self->zoom = 0.9f;
Add(selfGraveyard = NEW GuiGraveyard(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 7, false, mpDuelLayers->getRenderedPlayer(), this)); Add(selfGraveyard = NEW GuiGraveyard(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 1, false, mpDuelLayers->getRenderedPlayer(), this));
Add(selfLibrary = NEW GuiLibrary(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 10 + GuiGameZone::Height + 5, false, mpDuelLayers->getRenderedPlayer(), this)); Add(selfLibrary = NEW GuiLibrary(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 5 + GuiGameZone::Height + 5, false, mpDuelLayers->getRenderedPlayer(), this));
//myexile //myexile
Add(selfExile = NEW GuiExile(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 34, false, mpDuelLayers->getRenderedPlayer(), this)); Add(selfExile = NEW GuiExile(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 30, false, mpDuelLayers->getRenderedPlayer(), this));
Add(opponent = NEW GuiAvatar(0, 0, false, mpDuelLayers->getRenderedPlayerOpponent(), GuiAvatar::TOP_LEFT, this)); Add(opponent = NEW GuiAvatar(0, 0, false, mpDuelLayers->getRenderedPlayerOpponent(), GuiAvatar::TOP_LEFT, this));
opponent->zoom = 0.9f; opponent->zoom = 0.9f;
//opponentExile //opponentExile
Add(opponentExile = NEW GuiExile(-30 + GuiAvatar::Width * 1.2f - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10, Add(opponentExile = NEW GuiExile(-30 + GuiAvatar::Width * 1.2 - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10,
false, mpDuelLayers->getRenderedPlayerOpponent(), this)); false, mpDuelLayers->getRenderedPlayerOpponent(), this));
//opponentGraveyard //opponentGraveyard
Add(opponentGraveyard = NEW GuiGraveyard(5 + GuiAvatar::Width * 1.4f - GuiGameZone::Width / 2, 5, false, Add(opponentGraveyard = NEW GuiGraveyard(5 + GuiAvatar::Width * 1.4 - GuiGameZone::Width / 2, 5, false,
mpDuelLayers->getRenderedPlayerOpponent(), this)); mpDuelLayers->getRenderedPlayerOpponent(), this));
//opponentHand //opponentHand
Add(opponentHand = NEW GuiOpponentHand(-15 + GuiAvatar::Width * 1.4f - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10, false, Add(opponentHand = NEW GuiOpponentHand(-15 + GuiAvatar::Width * 1.4 - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10, false,
mpDuelLayers->getRenderedPlayerOpponent(), this)); mpDuelLayers->getRenderedPlayerOpponent(), this));
//opponentLibrary //opponentLibrary
Add(opponentLibrary = NEW GuiLibrary(5 + GuiAvatar::Width * 1.4f - GuiGameZone::Width / 2, 5 + GuiGameZone::Height + 5, false, Add(opponentLibrary = NEW GuiLibrary(5 + GuiAvatar::Width * 1.4 - GuiGameZone::Width / 2, 5 + GuiGameZone::Height + 5, false,
mpDuelLayers->getRenderedPlayerOpponent(), this)); mpDuelLayers->getRenderedPlayerOpponent(), this));
observer->getCardSelector()->Add(self); observer->getCardSelector()->Add(self);
@@ -145,12 +145,12 @@ void GuiAvatars::Update(float dt)
void GuiAvatars::Render() void GuiAvatars::Render()
{ {
JRenderer * r = JRenderer::GetInstance(); JRenderer * r = JRenderer::GetInstance();
float w = 52; float w = 54;
float h = 52; float h = 54;
if (opponent == active) if (opponent == active)
{ {
r->FillRect(opponent->actX, opponent->actY, 34 * opponent->actZ, h+22 * opponent->actZ, ARGB(200,0,0,0)); r->FillRect(opponent->actX, opponent->actY, 40 * opponent->actZ, h+20 * opponent->actZ, ARGB(200,0,0,0));
r->FillRect(opponent->actX, opponent->actY, (w * opponent->actZ)-1, (h * opponent->actZ)+2, ARGB(200,0,0,0)); r->FillRect(opponent->actX, opponent->actY, w * opponent->actZ, h * opponent->actZ, ARGB(200,0,0,0));
} }
else if (self == active) else if (self == active)
{ {
+2 -2
View File
@@ -122,9 +122,9 @@ void GuiHandSelf::Repos()
{ {
float dist = 180.0f / cards.size(); float dist = 180.0f / cards.size();
if (dist > 20) if (dist > 20)
dist = 18.0;//20.0 dist = 20.0;
else else
y = 35.0;//40.0 y = 40.0;
for (vector<CardView*>::iterator it = cards.begin(); it != cards.end(); ++it) for (vector<CardView*>::iterator it = cards.begin(); it != cards.end(); ++it)
{ {
(*it)->x = ClosedRowX; (*it)->x = ClosedRowX;
+5 -14
View File
@@ -62,20 +62,12 @@ void GuiPlay::HorzStack::Enstack(CardView* card)
{ {
card->x = x + baseX; card->x = x + baseX;
card->y = y + baseY; card->y = y + baseY;
/*if (total < 8) if (total < 8)
x += CARD_WIDTH; x += CARD_WIDTH;
else if (total < 16) else if (total < 16)
x += (SCREEN_WIDTH - 200 - baseX) / total; x += (SCREEN_WIDTH - 200 - baseX) / total;
else else
x += (SCREEN_WIDTH - 50 - baseX) / total;*/ x += (SCREEN_WIDTH - 50 - baseX) / total;
// new adjustment
if (total < 8)
x += CARD_WIDTH;
else if (total < 24)
x += (SCREEN_WIDTH - 200 - baseX) / total;
else
x += (SCREEN_WIDTH - 70 - baseX) / total;
} }
void GuiPlay::VertStack::Enstack(CardView* card) void GuiPlay::VertStack::Enstack(CardView* card)
@@ -91,10 +83,9 @@ void GuiPlay::VertStack::Enstack(CardView* card)
card->x = x + baseX; card->x = x + baseX;
card->y = y + baseY; card->y = y + baseY;
y += 9; y += 12;
if (++count == total - 1 && y == 9) if (++count == total - 1 && y == 12)
y += 9; y += 12;
//last value += 12...
} }
void GuiPlay::VertStack::Render(CardView* card, iterator begin, iterator end) void GuiPlay::VertStack::Render(CardView* card, iterator begin, iterator end)
+3 -3
View File
@@ -88,11 +88,11 @@ void GuiAvatar::Render()
} }
if (player->getObserver()->currentPlayer == player) if (player->getObserver()->currentPlayer == player)
r->DrawRect(x0 - 1, y0 - 1, (Width+1) * actZ, (Height+1) * actZ, ARGB((int)actA, 0, 255, 0)); r->DrawRect(x0 - 1, y0 - 1, 36 * actZ, 51 * actZ, ARGB((int)actA, 0, 255, 0));
else if (player->getObserver()->currentActionPlayer == player) else if (player->getObserver()->currentActionPlayer == player)
r->DrawRect(x0, y0, (Width-1) * actZ, (Height-1) * actZ, ARGB((int)actA, 0, 0, 255)); r->DrawRect(x0, y0, 34 * actZ, 49 * actZ, ARGB((int)actA, 0, 0, 255));
if (player->getObserver()->isInterrupting == player) if (player->getObserver()->isInterrupting == player)
r->DrawRect(x0, y0, (Width-1) * actZ, (Height-1) * actZ, ARGB((int)actA, 255, 0, 0)); r->DrawRect(x0, y0, 34 * actZ, 49 * actZ, ARGB((int)actA, 255, 0, 0));
//Life //Life
char buffer[10]; char buffer[10];
+20 -1
View File
@@ -2416,7 +2416,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
string tokenDesc = splitToken[1]; string tokenDesc = splitToken[1];
vector<string> tokenParameters = split(tokenDesc, ','); vector<string> tokenParameters = split(tokenDesc, ',');
//lets try finding a token by card name. //lets try finding a token by card name.
if (splitToken[1].size() && tokenParameters.size() <3) if (splitToken[1].size() && (tokenParameters.size() ==1||tokenParameters.size() ==2))
{ {
string cardName = splitToken[1]; string cardName = splitToken[1];
MTGCard * safetycard = MTGCollection()->getCardByName(cardName); MTGCard * safetycard = MTGCollection()->getCardByName(cardName);
@@ -3396,6 +3396,25 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return a; return a;
} }
//changecost - alternate for altercost
vector<string> splitChangeCost = parseBetween(s, "changecost(", ")", true);
if(splitChangeCost.size())
{
if(splitChangeCost[1].size())
{
vector<string> ccParameters = split( splitChangeCost[1], ':');
int amount = atoi(ccParameters[1].c_str());
int color = Constants::GetColorStringIndex(ccParameters[0]);
if(ccParameters[0] == "colorless")
color = 0;
if(ccParameters[0].size() && ccParameters[1].size())
{
MTGAbility * a = NEW AAlterCost(observer, id, card, target, amount, color);
return a;
}
}
}
//Change Power/Toughness //Change Power/Toughness
WParsedPT * wppt = NEW WParsedPT(s, spell, card); WParsedPT * wppt = NEW WParsedPT(s, spell, card);
bool nonstatic = false; bool nonstatic = false;
+20 -8
View File
@@ -96,10 +96,16 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
void MTGCardInstance::copy(MTGCardInstance * card) void MTGCardInstance::copy(MTGCardInstance * card)
{ {
MTGCard * source = card->model; MTGCard * source = NULL;
if(card->isToken || card->hasCopiedToken)
{
source = card;
}
else
source = MTGCollection()->getCardById(card->copiedID);
CardPrimitive * data = source->data; CardPrimitive * data = source->data;
basicAbilities = card->model->data->basicAbilities; basicAbilities = data->basicAbilities;
modbasicAbilities = card->modbasicAbilities;
for (size_t i = 0; i < data->types.size(); i++) for (size_t i = 0; i < data->types.size(); i++)
{ {
types.push_back(data->types[i]); types.push_back(data->types[i]);
@@ -121,24 +127,30 @@ void MTGCardInstance::copy(MTGCardInstance * card)
magicText = data->magicText; magicText = data->magicText;
spellTargetType = data->spellTargetType; spellTargetType = data->spellTargetType;
alias = data->alias; alias = data->alias;
copiedID = card->copiedID;
doubleFaced = data->doubleFaced;
origpower = card->origpower;//for flip
origtoughness = card->origtoughness;//for flip
//Now this is dirty... //Now this is dirty...
int backupid = mtgid; int backupid = mtgid;
int castMethodBackUP = this->castMethod; int castMethodBackUP = this->castMethod;
mtgid = source->getId(); mtgid = source->getId();
MTGCardInstance * oldStored = this->storedSourceCard; MTGCardInstance * oldStored = this->storedSourceCard;
Spell * spell = NEW Spell(observer, this); /*Spell * spell = NEW Spell(observer, this);
observer = card->observer; observer = card->observer;
AbilityFactory af(observer); AbilityFactory af(observer);
af.addAbilities(observer->mLayers->actionLayer()->getMaxId(), spell); af.addAbilities(observer->mLayers->actionLayer()->getMaxId(), spell);
delete spell; delete spell;*/
if(observer->players[1]->playMode == Player::MODE_TEST_SUITE) if(observer->players[1]->playMode == Player::MODE_TEST_SUITE)
mtgid = backupid; // there must be a way to get the token id... mtgid = backupid; // there must be a way to get the token id...
else else
{ {
mtgid = card->getMTGId(); /////////////////////////////////////////////////// mtgid = card->getMTGId(); ///////////////////////////////////////////////////
setId = card->setId; // Copier/Cloner cards produces the same token...// setId = card->setId; // Copier/Cloner cards produces the same token...//
//rarity = card->getRarity(); /////////////////////////////////////////////////// rarity = card->getRarity(); ///////////////////////////////////////////////////
setMTGId(card->copiedID); //**************sets copier image****************//
} }
castMethod = castMethodBackUP; castMethod = castMethodBackUP;
backupTargets = this->backupTargets; backupTargets = this->backupTargets;
+1 -3
View File
@@ -3233,10 +3233,8 @@ int MTGLegendRule::added(MTGCardInstance * card)
return 1; return 1;
} }
int MTGLegendRule::removed(MTGCardInstance * card) int MTGLegendRule::removed(MTGCardInstance *)
{ {
if (card->has(Constants::NOLEGENDRULE))
game->legendNeedUpdate = true;
return 0; return 0;
} }
+14
View File
@@ -202,6 +202,20 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
zones[nbzones++] = MTGGameZone::MY_EXILE; zones[nbzones++] = MTGGameZone::MY_EXILE;
zones[nbzones++] = MTGGameZone::OPPONENT_EXILE; zones[nbzones++] = MTGGameZone::OPPONENT_EXILE;
} }
else if (zoneName.compare("mycastingzone") == 0)
{
zones[nbzones++] = MTGGameZone::MY_GRAVEYARD;
zones[nbzones++] = MTGGameZone::MY_LIBRARY;
zones[nbzones++] = MTGGameZone::MY_HAND;
zones[nbzones++] = MTGGameZone::MY_EXILE;
}
else if (zoneName.compare("oppcastingzone") == 0)
{
zones[nbzones++] = MTGGameZone::OPPONENT_GRAVEYARD;
zones[nbzones++] = MTGGameZone::OPPONENT_LIBRARY;
zones[nbzones++] = MTGGameZone::OPPONENT_HAND;
zones[nbzones++] = MTGGameZone::OPPONENT_EXILE;
}
else else
{ {
int zone = MTGGameZone::zoneStringToId(zoneName); int zone = MTGGameZone::zoneStringToId(zoneName);
+29 -1
View File
@@ -293,6 +293,19 @@ ThisDescriptor * ThisDescriptorFactory::createThisDescriptor(GameObserver* obser
return NULL; return NULL;
} }
//controller creature spells - conduit of ruin
found = s.find("creaturespells");
if (found != string::npos)
{
ThisCreatureSpells * td = NEW ThisCreatureSpells(criterion);
if (td)
{
td->comparisonMode = mode;
return td;
}
return NULL;
}
//power //power
found = s.find("power"); found = s.find("power");
if (found != string::npos) if (found != string::npos)
@@ -470,6 +483,21 @@ ThisControllerlife* ThisControllerlife::clone() const
return NEW ThisControllerlife(*this); return NEW ThisControllerlife(*this);
} }
ThisCreatureSpells::ThisCreatureSpells(int count)
{
comparisonCriterion = count;
}
int ThisCreatureSpells::match(MTGCardInstance * card)
{
return matchValue(card->controller()->game->stack->seenThisTurn("creature", Constants::CAST_ALL));
}
ThisCreatureSpells* ThisCreatureSpells::clone() const
{
return NEW ThisCreatureSpells(*this);
}
ThisPower::ThisPower(int power) ThisPower::ThisPower(int power)
{ {
comparisonCriterion = power; comparisonCriterion = power;
@@ -713,4 +741,4 @@ int ThisVariable::match(MTGCardInstance * card)
ThisVariable * ThisVariable::clone() const ThisVariable * ThisVariable::clone() const
{ {
return NEW ThisVariable(*this); return NEW ThisVariable(*this);
} }
+2 -2
View File
@@ -99,8 +99,8 @@ player(player), nb_cards(nb_cards),drawAbility(cardDraw)
{ {
} }
WEventCardSacrifice::WEventCardSacrifice(MTGCardInstance * card, MTGCardInstance * after, bool token) : WEventCardSacrifice::WEventCardSacrifice(MTGCardInstance * card, MTGCardInstance * after) :
WEventCardUpdate(card),cardAfter(after),istoken(token) WEventCardUpdate(card),cardAfter(after)
{ {
} }
-40
View File
@@ -263,46 +263,6 @@ JQuadPtr ResourceManagerImpl::RetrieveCard(MTGCard * card, int style, int submod
return JQuadPtr(); return JQuadPtr();
} }
JQuadPtr ResourceManagerImpl::RetrieveCardToken(MTGCard * card, int style, int submode, int tId)
{
//Cards are never, ever resource managed, so just check cache.
if (!card || options[Options::DISABLECARDS].number) return JQuadPtr();
submode = submode | TEXTURE_SUB_CARD;
//static std::ostringstream filename;
//filename.str("");
string filename;
filename.reserve(4096);
//filename << setlist[card->setId] << "/" << card->getImageName();
filename.append(setlist[card->setId]);
filename.append("/");
int id = -card->getMTGId();
if(tId)
id = -tId;
ostringstream imagename;
imagename << "-" << id << "t.jpg";
filename.append(imagename.str());
//Aliases.
if (style == RETRIEVE_THUMB)
{
submode = submode | TEXTURE_SUB_THUMB;
style = RETRIEVE_NORMAL;
}
JQuadPtr jq = RetrieveQuad(filename, 0, 0, 0, 0, "", style, submode | TEXTURE_SUB_5551, id);
lastError = textureWCache.mError;
if (jq)
{
jq->SetHotSpot(static_cast<float> (jq->mTex->mWidth / 2), static_cast<float> (jq->mTex->mHeight / 2));
return jq;
}
return JQuadPtr();
}
int ResourceManagerImpl::AddQuadToManaged(const WManagedQuad& inQuad) int ResourceManagerImpl::AddQuadToManaged(const WManagedQuad& inQuad)
{ {
int id = mIDLookupMap.size(); int id = mIDLookupMap.size();