Erwan
- Added Dr Solomat's TEMPEST expansion - Added Sacrifice as part of the cost of activated abilities. Making it work as an extra cost for "put in play" still requires some work though. "Render" methods need to be written correctly - Added cards with sacrifice in the existing sets. Most of them need testing...
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
OBJS = objs/ActionElement.o objs/ActionLayer.o objs/ActionStack.o objs/AIPlayer.o objs/AIStats.o objs/Blocker.o objs/CardGui.o objs/CardDescriptor.o objs/CardDisplay.o objs/ConstraintResolver.o objs/Counters.o objs/Damage.o objs/DamagerDamaged.o objs/DamageResolverLayer.o objs/DeckDataWrapper.o objs/DeckStats.o objs/DuelLayers.o objs/GameApp.o objs/GameLauncher.o objs/GameObserver.o objs/GameOptions.o objs/GameStateDuel.o objs/GameStateMenu.o objs/GameStateOptions.o objs/GameStateShop.o objs/GuiCardsController.o objs/GuiLayers.o objs/Logger.o objs/ManaCost.o objs/ManaCostHybrid.o objs/MenuItem.o objs/MTGAbility.o objs/MTGCardInstance.o objs/MTGCard.o objs/MTGDeck.o objs/MTGDefinitions.o objs/MTGGamePhase.o objs/MTGGameZones.o objs/MTGGuiHand.o objs/MTGGuiPlay.o objs/MTGRules.o objs/OptionItem.o objs/PhaseRing.o objs/Player.o objs/PlayerData.o objs/PlayGuiObjectController.o objs/PlayGuiObject.o objs/PriceList.o objs/ShopItem.o objs/SimpleMenu.o objs/SimpleMenuItem.o objs/Subtypes.o objs/TargetChooser.o objs/TargetsList.o objs/TexturesCache.o objs/Token.o objs/utils.o
|
||||
OBJS = objs/ActionElement.o objs/ActionLayer.o objs/ActionStack.o objs/AIPlayer.o objs/AIStats.o objs/Blocker.o objs/CardGui.o objs/CardDescriptor.o objs/CardDisplay.o objs/ConstraintResolver.o objs/Counters.o objs/Damage.o objs/DamagerDamaged.o objs/DamageResolverLayer.o objs/DeckDataWrapper.o objs/DeckStats.o objs/DuelLayers.o objs/ExtraCost.h objs/GameApp.o objs/GameLauncher.o objs/GameObserver.o objs/GameOptions.o objs/GameStateDuel.o objs/GameStateMenu.o objs/GameStateOptions.o objs/GameStateShop.o objs/GuiCardsController.o objs/GuiLayers.o objs/Logger.o objs/ManaCost.o objs/ManaCostHybrid.o objs/MenuItem.o objs/MTGAbility.o objs/MTGCardInstance.o objs/MTGCard.o objs/MTGDeck.o objs/MTGDefinitions.o objs/MTGGamePhase.o objs/MTGGameZones.o objs/MTGGuiHand.o objs/MTGGuiPlay.o objs/MTGRules.o objs/OptionItem.o objs/PhaseRing.o objs/Player.o objs/PlayerData.o objs/PlayGuiObjectController.o objs/PlayGuiObject.o objs/PriceList.o objs/ShopItem.o objs/SimpleMenu.o objs/SimpleMenuItem.o objs/Subtypes.o objs/TargetChooser.o objs/TargetsList.o objs/TexturesCache.o objs/Token.o objs/utils.o
|
||||
DEPS = $(patsubst objs/%.o, deps/%.d, $(OBJS))
|
||||
|
||||
RESULT = $(shell psp-config --psp-prefix 2> Makefile.cache)
|
||||
|
||||
@@ -211,6 +211,19 @@ type=Instant
|
||||
mana={U}{U}
|
||||
[/card]
|
||||
[card]
|
||||
text=Sacrifice Bottle Gnomes: You gain 3 life.
|
||||
auto={s}:life:3
|
||||
id=129495
|
||||
name=Bottle Gnomes
|
||||
rarity=U
|
||||
color=Artifact
|
||||
type=Artifact Creature
|
||||
mana={3}
|
||||
power=1
|
||||
subtype=Gnome
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
text={T}: Add {1} to your mana pool. {T}: Add {G} or {W} to your mana pool. Brushland deals 1 damage to you.
|
||||
auto={T}:Add {1}
|
||||
auto={T}:Add {G} && Damage 1 controller
|
||||
@@ -256,6 +269,19 @@ subtype=Spider
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
text=Sacrifice Composite Golem: Add {W}{U}{B}{R}{G} to your mana pool.
|
||||
auto={s}:Add {W}{U}{B}{R}{G}
|
||||
id=135275
|
||||
name=Composite Golem
|
||||
rarity=U
|
||||
color=Artifact
|
||||
type=Artifact Creature
|
||||
mana={6}
|
||||
power=4
|
||||
subtype=Golem
|
||||
toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
text=Draw two cards.
|
||||
auto=draw:2
|
||||
id=134757
|
||||
@@ -335,6 +361,19 @@ type=Instant
|
||||
mana={W}
|
||||
[/card]
|
||||
[card]
|
||||
text={B}, {T}, Sacrifice Doomed Necromancer: Return target creature card from your graveyard to play.
|
||||
auto={B},{T},{S}:moveTo(myinplay) target(creature|mygraveyard)
|
||||
id=129880
|
||||
name=Doomed Necromancer
|
||||
rarity=R
|
||||
color=Black
|
||||
type=Creature
|
||||
mana={2}{B}
|
||||
power=2
|
||||
subtype=Human Cleric Mercenary
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
text={5}{R}{R}: Put a 5/5 red Dragon creature token with flying into play. (It can't be blocked except by creatures with flying or reach.)
|
||||
auto={5}{R}{R}:token(Dragon,creature dragon, 5/5,flying red)
|
||||
id=143024
|
||||
@@ -1063,6 +1102,17 @@ type=Artifact
|
||||
mana={2}
|
||||
[/card]
|
||||
[card]
|
||||
text={T}: Add {1} to your mana pool. {1}, {T}, Sacrifice Mind Stone: Draw a card.
|
||||
auto={T}:Add{1}
|
||||
auto={1}{T}{S}:draw:1
|
||||
id=135280
|
||||
name=Mind Stone
|
||||
rarity=U
|
||||
color=Artifact
|
||||
type=Artifact
|
||||
mana={0}
|
||||
[/card]
|
||||
[card]
|
||||
text=First strike, forestwalk, vigilance (This creature deals combat damage before creatures without first strike, it's unblockable as long as defending player controls a Forest, and attacking doesn't cause this creature to tap.)
|
||||
abilities=First strike, forestwalk, vigilance, legendary
|
||||
id=106405
|
||||
@@ -1087,6 +1137,19 @@ type=Enchantment
|
||||
mana={2}{W}
|
||||
[/card]
|
||||
[card]
|
||||
text=Sacrifice Mogg Fanatic: Mogg Fanatic deals 1 damage to target creature or player.
|
||||
auto={s}:Damage:1 target(creature,player)
|
||||
id=134748
|
||||
name=Mogg Fanatic
|
||||
rarity=U
|
||||
color=Red
|
||||
type=Creature
|
||||
mana={R}
|
||||
power=1
|
||||
subtype=Goblin
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text={T}: Add {R} to your mana pool.
|
||||
auto={T}: Add {R}
|
||||
id=129652
|
||||
@@ -1127,6 +1190,19 @@ type=Basic Land
|
||||
subtype=Mountain
|
||||
[/card]
|
||||
[card]
|
||||
text=Sacrifice a creature: Nantuko Husk gets +2/+2 until end of turn.
|
||||
auto={s(creature|myinplay)}:2/2
|
||||
id=129653
|
||||
name=Nantuko Husk
|
||||
rarity=U
|
||||
color=Black
|
||||
type=Creature
|
||||
mana={2}{B}
|
||||
power=2
|
||||
subtype=Zombie Insect
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
text=Destroy target artifact or enchantment.
|
||||
target=artifact,enchantment
|
||||
id=129656
|
||||
@@ -1230,6 +1306,16 @@ subtype=Horror
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
text={2}, {T}, Sacrifice a creature: Draw a card.
|
||||
auto={2},{T},{S(creature|myinplay)}:draw:1
|
||||
id=135281
|
||||
name=Phyrexian Vault
|
||||
rarity=U
|
||||
color=Artifact
|
||||
type=Artifact
|
||||
mana={3}
|
||||
[/card]
|
||||
[card]
|
||||
text=Shroud (This creature can't be the target of spells or abilities.)
|
||||
abilities=shroud
|
||||
id=130526
|
||||
@@ -1635,6 +1721,20 @@ type=Instant
|
||||
mana={R}
|
||||
[/card]
|
||||
[card]
|
||||
text=When Siege-Gang Commander comes into play, put three 1/1 red Goblin creature tokens into play. {1}{R}, Sacrifice a Goblin: Siege-Gang Commander deals 2 damage to target creature or player.
|
||||
auto=token(Goblin,creature goblin, 1/1,red)*3
|
||||
auto={1},{R},{S(goblin|myinplay)}:Damage:2 target(creature,player)
|
||||
id=130539
|
||||
name=Siege-Gang Commander
|
||||
rarity=R
|
||||
color=Red
|
||||
type=Creature
|
||||
mana={3}{R}{R}
|
||||
power=2
|
||||
subtype=Goblin
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
text=Flying, first strike (This creature can't be blocked except by creatures with flying or reach, and it deals combat damage before creatures without first strike.)
|
||||
abilities=Flying, first strike
|
||||
id=129735
|
||||
|
||||
@@ -244,18 +244,7 @@ power=2
|
||||
subtype=Elemental Spirit
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text=Sacrifice Bottle Gnomes: You gain 3 life.
|
||||
id=129495
|
||||
name=Bottle Gnomes
|
||||
rarity=U
|
||||
color=Artifact
|
||||
type=Artifact Creature
|
||||
mana={3}
|
||||
power=1
|
||||
subtype=Gnome
|
||||
toughness=3
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=Whenever Cephalid Constable deals combat damage to a player, return up to that many target permanents that player controls to their owners' hands.
|
||||
id=135261
|
||||
@@ -386,18 +375,6 @@ type=Sorcery
|
||||
mana={G}
|
||||
[/card]
|
||||
[card]
|
||||
text=Sacrifice Composite Golem: Add {W}{U}{B}{R}{G} to your mana pool.
|
||||
id=135275
|
||||
name=Composite Golem
|
||||
rarity=U
|
||||
color=Artifact
|
||||
type=Artifact Creature
|
||||
mana={6}
|
||||
power=4
|
||||
subtype=Golem
|
||||
toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
text=Put target attacking creature on the bottom of its owner's library. Its controller gains life equal to its toughness.
|
||||
id=130528
|
||||
name=Condemn
|
||||
@@ -529,18 +506,6 @@ type=Sorcery
|
||||
mana={B}{B}
|
||||
[/card]
|
||||
[card]
|
||||
text={B}, {T}, Sacrifice Doomed Necromancer: Return target creature card from your graveyard to play.
|
||||
id=129880
|
||||
name=Doomed Necromancer
|
||||
rarity=R
|
||||
color=Black
|
||||
type=Creature
|
||||
mana={2}{B}
|
||||
power=2
|
||||
subtype=Human Cleric Mercenary
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
text={3}, {T}: Double the amount of each type of mana in your mana pool.
|
||||
id=135243
|
||||
name=Doubling Cube
|
||||
@@ -1110,28 +1075,6 @@ type=Sorcery
|
||||
mana={2}{B}
|
||||
[/card]
|
||||
[card]
|
||||
text={T}: Add {1} to your mana pool. {1}, {T}, Sacrifice Mind Stone: Draw a card.
|
||||
id=135280
|
||||
name=Mind Stone
|
||||
rarity=U
|
||||
color=Artifact
|
||||
type=Artifact
|
||||
mana={2}
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=Sacrifice Mogg Fanatic: Mogg Fanatic deals 1 damage to target creature or player.
|
||||
id=134748
|
||||
name=Mogg Fanatic
|
||||
rarity=U
|
||||
color=Red
|
||||
type=Creature
|
||||
mana={R}
|
||||
power=1
|
||||
subtype=Goblin
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text=Trample (If this creature would deal enough combat damage to its blockers to destroy them, you may have it deal the rest of its damage to defending player.) Molimo, Maro-Sorcerer's power and toughness are each equal to the number of lands you control.
|
||||
id=106368
|
||||
name=Molimo, Maro-Sorcerer
|
||||
@@ -1165,18 +1108,6 @@ subtype=Lhurgoyf
|
||||
toughness=*
|
||||
[/card]
|
||||
[card]
|
||||
text=Sacrifice a creature: Nantuko Husk gets +2/+2 until end of turn.
|
||||
id=129653
|
||||
name=Nantuko Husk
|
||||
rarity=U
|
||||
color=Black
|
||||
type=Creature
|
||||
mana={2}{B}
|
||||
power=2
|
||||
subtype=Zombie Insect
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
text=Target player gains 8 life.
|
||||
id=129655
|
||||
name=Natural Spring
|
||||
@@ -1278,15 +1209,7 @@ power=4
|
||||
subtype=Zombie Minion
|
||||
toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
text={2}, {T}, Sacrifice a creature: Draw a card.
|
||||
id=135281
|
||||
name=Phyrexian Vault
|
||||
rarity=U
|
||||
color=Artifact
|
||||
type=Artifact
|
||||
mana={3}
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=As Pithing Needle comes into play, name a card. Activated abilities of sources with the chosen name can't be played unless they're mana abilities.
|
||||
id=129526
|
||||
@@ -1607,18 +1530,7 @@ color=Red
|
||||
type=Instant
|
||||
mana={1}{R}{R}
|
||||
[/card]
|
||||
[card]
|
||||
text=When Siege-Gang Commander comes into play, put three 1/1 red Goblin creature tokens into play. {1}{R}, Sacrifice a Goblin: Siege-Gang Commander deals 2 damage to target creature or player.
|
||||
id=130539
|
||||
name=Siege-Gang Commander
|
||||
rarity=R
|
||||
color=Red
|
||||
type=Creature
|
||||
mana={3}{R}{R}
|
||||
power=2
|
||||
subtype=Goblin
|
||||
toughness=2
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=Draw three cards, then discard a card.
|
||||
id=136217
|
||||
|
||||
@@ -94,6 +94,15 @@ subtype=Drake
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
text={1}{U}, {T}, Sacrifice Courier's Capsule: Draw two cards.
|
||||
auto={1}{U}, {T}, {S}: Draw:2
|
||||
id=174800
|
||||
name=Courier's Capsule
|
||||
rarity=C
|
||||
type=Artifact
|
||||
mana={1}{U}
|
||||
[/card]
|
||||
[card]
|
||||
text=Reach (This can block creatures with flying.) Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.)
|
||||
abilities=reach,exalted
|
||||
id=174960
|
||||
@@ -162,6 +171,15 @@ subtype=Human Rogue
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text={2}{W}, {T}, Sacrifice Dispeller's Capsule: Destroy target artifact or enchantment.
|
||||
auto={2}{W},{T},{S}:destroy target(artifact,enchantment)
|
||||
id=174830
|
||||
name=Dispeller's Capsule
|
||||
rarity=C
|
||||
type=Artifact
|
||||
mana={W}
|
||||
[/card]
|
||||
[card]
|
||||
text=Put two 1/1 red Goblin creature tokens into play.
|
||||
auto=token(Goblin,creature goblin, 1/1,red)*2
|
||||
id=174936
|
||||
@@ -208,6 +226,25 @@ subtype=Elf Shaman
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text=Flash {B}, {T}, Sacrifice an artifact: Draw a card.
|
||||
abilities=flash
|
||||
auto={B},{T},{S(artifact|myinplay)}:draw:1
|
||||
id=175138
|
||||
name=Etherium Astrolabe
|
||||
rarity=U
|
||||
type=Artifact
|
||||
mana={2}{U}
|
||||
[/card]
|
||||
[card]
|
||||
text={1}{B}, {T}, Sacrifice Executioner's Capsule: Destroy target nonblack creature.
|
||||
auto={1}{B}{T}{S}:destroy target(creature[-black])
|
||||
id=174895
|
||||
name=Executioner's Capsule
|
||||
rarity=C
|
||||
type=Artifact
|
||||
mana={B}
|
||||
[/card]
|
||||
[card]
|
||||
text={2}{U}: Untap target artifact.
|
||||
auto={2}{U}:untap target(artifact)
|
||||
id=174888
|
||||
@@ -606,6 +643,15 @@ type=Basic Land
|
||||
subtype=Plains
|
||||
[/card]
|
||||
[card]
|
||||
text={4}{W}, {T}, Sacrifice Protomatter Powder: Return target artifact card from your graveyard to play.
|
||||
auto={4}{W}{T}{S}:moveTo(myInPlay) target(artifact|mygraveyard)
|
||||
id=174833
|
||||
name=Protomatter Powder
|
||||
rarity=U
|
||||
type=Artifact
|
||||
mana={2}{U}
|
||||
[/card]
|
||||
[card]
|
||||
text=Trample Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.)
|
||||
abilities=trample,exalted
|
||||
id=174959
|
||||
@@ -722,6 +768,19 @@ subtype=Human Knight
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
text=Flying {B}, Sacrifice a creature: Regenerate Skeletal Kathari.
|
||||
abilities=flying
|
||||
auto={B},{S(creature|myinplay)}:regenerate
|
||||
id=175119
|
||||
name=Skeletal Kathari
|
||||
rarity=C
|
||||
type=Creature
|
||||
mana={4}{B}
|
||||
power=3
|
||||
subtype=Bird Skeleton
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
text=Vigilance {T}: Add {G} to your mana pool.
|
||||
abilities=vigilance
|
||||
auto={T}:Add{G}
|
||||
|
||||
@@ -174,11 +174,13 @@ toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text=As an additional cost to play Bone Splinters, sacrifice a creature. Destroy target creature.
|
||||
target=creature
|
||||
auto=destroy
|
||||
id=174967
|
||||
name=Bone Splinters
|
||||
rarity=C
|
||||
type=Sorcery
|
||||
mana={B}
|
||||
mana={B},{S(creature|myinplay)}
|
||||
[/card]
|
||||
[card]
|
||||
text=Choose one or both - Branching Bolt deals 3 damage to target creature with flying; and/or Branching Bolt deals 3 damage to target creature without flying.
|
||||
@@ -266,14 +268,7 @@ power=3
|
||||
subtype=Zombie Wizard
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
text={1}{U}, {T}, Sacrifice Courier's Capsule: Draw two cards.
|
||||
id=174800
|
||||
name=Courier's Capsule
|
||||
rarity=C
|
||||
type=Artifact
|
||||
mana={1}{U}
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=Reveal the top three cards of your library. Target opponent may choose to put those cards into your hand. If he or she doesn't, put those cards into your graveyard and draw five cards.
|
||||
id=178091
|
||||
@@ -343,14 +338,7 @@ power=1
|
||||
subtype=Human Wizard
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text={2}{W}, {T}, Sacrifice Dispeller's Capsule: Destroy target artifact or enchantment.
|
||||
id=174830
|
||||
name=Dispeller's Capsule
|
||||
rarity=C
|
||||
type=Artifact
|
||||
mana={W}
|
||||
[/card]
|
||||
|
||||
|
||||
[card]
|
||||
text={2}{R}, {T}, Sacrifice a black creature, a red creature, and a green creature: Search your library for a card named Hellkite Overlord and put it into play. Then shuffle your library.
|
||||
@@ -432,14 +420,7 @@ name=Esper Panorama
|
||||
rarity=C
|
||||
type=Land
|
||||
[/card]
|
||||
[card]
|
||||
text=Flash {B}, {T}, Sacrifice an artifact: Draw a card.
|
||||
id=175138
|
||||
name=Etherium Astrolabe
|
||||
rarity=U
|
||||
type=Artifact
|
||||
mana={2}{U}
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=Artifact spells you play cost {1} less to play.
|
||||
id=176435
|
||||
@@ -471,14 +452,6 @@ type=Sorcery
|
||||
mana={2}{W}
|
||||
[/card]
|
||||
[card]
|
||||
text={1}{B}, {T}, Sacrifice Executioner's Capsule: Destroy target nonblack creature.
|
||||
id=174895
|
||||
name=Executioner's Capsule
|
||||
rarity=C
|
||||
type=Artifact
|
||||
mana={B}
|
||||
[/card]
|
||||
[card]
|
||||
text=At the end of your turn, if you control a creature with power 5 or greater, you may have Exuberant Firestoker deal 2 damage to target player. {T}: Add {1} to your mana pool.
|
||||
id=175049
|
||||
name=Exuberant Firestoker
|
||||
@@ -986,14 +959,7 @@ power=7
|
||||
subtype=Demon
|
||||
toughness=7
|
||||
[/card]
|
||||
[card]
|
||||
text={4}{W}, {T}, Sacrifice Protomatter Powder: Return target artifact card from your graveyard to play.
|
||||
id=174833
|
||||
name=Protomatter Powder
|
||||
rarity=U
|
||||
type=Artifact
|
||||
mana={2}{U}
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=Counter target spell. Its controller loses 3 life and you gain 3 life.
|
||||
id=176450
|
||||
@@ -1301,17 +1267,7 @@ type=Artifact
|
||||
mana={X}
|
||||
subtype=Equipment
|
||||
[/card]
|
||||
[card]
|
||||
text=Flying {B}, Sacrifice a creature: Regenerate Skeletal Kathari.
|
||||
id=175119
|
||||
name=Skeletal Kathari
|
||||
rarity=C
|
||||
type=Creature
|
||||
mana={4}{B}
|
||||
power=3
|
||||
subtype=Bird Skeleton
|
||||
toughness=2
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=Skeletonize deals 3 damage to target creature. When a creature dealt damage this way is put into a graveyard this turn, put a 1/1 black Skeleton creature token into play with "{B}: Regenerate this creature."
|
||||
id=175070
|
||||
|
||||
@@ -53,6 +53,18 @@ type=Sorcery
|
||||
mana={2}{BG}{BG}
|
||||
[/card]
|
||||
[card]
|
||||
text=Sacrifice Duergar Assailant: Duergar Assailant deals 1 damage to target attacking or blocking creature.
|
||||
auto={S}:damage:1 target(creature[attacking;blocking])
|
||||
id=150975
|
||||
name=Duergar Assailant
|
||||
rarity=C
|
||||
type=Creature
|
||||
mana={RW}
|
||||
power=1
|
||||
subtype=Dwarf Soldier
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text=Wither (This deals damage to creatures in the form of -1/-1 counters.) {RW}: Duergar Cave-Guard gets +1/+0 until end of turn.
|
||||
abilities=wither
|
||||
auto={RW}:1/0
|
||||
@@ -183,6 +195,19 @@ subtype=Scarecrow
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text=Flying {1}{W}, Sacrifice Kithkin Spellduster: Destroy target enchantment. Persist (When this creature is put into a graveyard from play, if it had no -1/-1 counters on it, return it to play under its owner's control with a -1/-1 counter on it.)
|
||||
abilities=flying,persist
|
||||
auto={1}{W}{S}:destroy target(enchantment)
|
||||
id=152096
|
||||
name=Kithkin Spellduster
|
||||
rarity=C
|
||||
type=Creature
|
||||
mana={4}{W}
|
||||
power=2
|
||||
subtype=Kithkin Wizard
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
text=Fear Persist (When this creature is put into a graveyard from play, if it had no -1/-1 counters on it, return it to play under its owner's control with a -1/-1 counter on it.)
|
||||
abilities=fear,persist
|
||||
id=147437
|
||||
|
||||
@@ -370,17 +370,7 @@ power=2
|
||||
subtype=Faerie Rogue
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text=Sacrifice Duergar Assailant: Duergar Assailant deals 1 damage to target attacking or blocking creature.
|
||||
id=150975
|
||||
name=Duergar Assailant
|
||||
rarity=C
|
||||
type=Creature
|
||||
mana={RW}
|
||||
power=1
|
||||
subtype=Dwarf Soldier
|
||||
toughness=1
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=When Duergar Hedge-Mage comes into play, if you control two or more Mountains, you may destroy target artifact. When Duergar Hedge-Mage comes into play, if you control two or more Plains, you may destroy target enchantment.
|
||||
id=159068
|
||||
@@ -705,18 +695,6 @@ type=Instant
|
||||
mana={3}{GU}
|
||||
[/card]
|
||||
[card]
|
||||
text=Flying {1}{W}, Sacrifice Kithkin Spellduster: Destroy target enchantment. Persist (When this creature is put into a graveyard from play, if it had no -1/-1 counters on it, return it to play under its owner's control with a -1/-1 counter on it.)
|
||||
abilities=flying
|
||||
id=152096
|
||||
name=Kithkin Spellduster
|
||||
rarity=C
|
||||
type=Creature
|
||||
mana={4}{W}
|
||||
power=2
|
||||
subtype=Kithkin Wizard
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
text=When Kithkin Zealot comes into play, you gain 1 life for each black and/or red permanent target opponent controls.
|
||||
id=154346
|
||||
name=Kithkin Zealot
|
||||
@@ -1148,6 +1126,8 @@ mana={3}{G}{G}
|
||||
[/card]
|
||||
[card]
|
||||
text={1}, Sacrifice a Scarecrow: Draw a card. {4}, {T}: Return target artifact creature card from your graveyard to play.
|
||||
auto={1}{S(scarecrow|myinplay)}:draw:1
|
||||
auto={4}{T}:moveTo(myinplay) target(artifact|mygraveyard)
|
||||
id=157979
|
||||
name=Scarecrone
|
||||
rarity=R
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#SET: ICE AGE
|
||||
#VERSION: 1.6.1
|
||||
#Number of playable cards: >132
|
||||
#Note : please try to keep cards in alphabetical order of the name if possible
|
||||
[card]
|
||||
@@ -300,6 +299,7 @@ rarity=C
|
||||
type=Instant
|
||||
mana={B}
|
||||
[/card]
|
||||
[card]
|
||||
text=Counter target spell if it is red or destroy target permanent if it is red.
|
||||
id=2508
|
||||
alias=1191
|
||||
@@ -309,6 +309,15 @@ type=Instant
|
||||
mana={U}
|
||||
[/card]
|
||||
[card]
|
||||
text={2}{T}: Sacrifice Pit Trap to bury target creature without flying that is attacking you.
|
||||
auto={2}{T}{S}:bury target(creature[-flying;attacking]|opponentinplay)
|
||||
id=2419
|
||||
name=Pit Trap
|
||||
rarity=U
|
||||
type=Artifact
|
||||
mana={2}
|
||||
[/card]
|
||||
[card]
|
||||
text=Counter target spell if it is blue or destroy target permanent if it is blue.
|
||||
id=2649
|
||||
alias=1312
|
||||
@@ -716,6 +725,21 @@ subtype=Erne
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
text={T}: Sacrifice a forest to add three mana in any combination of red and/or green to your mana pool. Play this ability as an interrupt.
|
||||
id=2646
|
||||
auto={T}{S(forest|myinplay)}: add {G}{G}{G}
|
||||
auto={T}{S(forest|myinplay)}: add {G}{G}{R}
|
||||
auto={T}{S(forest|myinplay)}: add {G}{R}{R}
|
||||
auto={T}{S(forest|myinplay)}: add {R}{R}{R}
|
||||
name=Orcish Lumberjack
|
||||
rarity=C
|
||||
type=Creature
|
||||
mana={R}
|
||||
power=1
|
||||
subtype=Orc
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text=Swampwalk
|
||||
abilities=swampwalk
|
||||
id=2581
|
||||
@@ -1189,6 +1213,15 @@ subtype=Pyknite
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text={1}{T}: Sacrifice a creature to have Skull Catapult deal 2 damage to target creature or player.
|
||||
id=2422
|
||||
name=Skull Catapult
|
||||
auto={1}{T}{S(creature|myinplay)}:Damage:2 target(creature,player)
|
||||
rarity=U
|
||||
type=Artifact
|
||||
mana={4}
|
||||
[/card]
|
||||
[card]
|
||||
text=Counts as a wall {1}: +1/+0 until end of turn {1}: +0/+1 until end of turn3: Snow Fortress deals 1 damage to target creature without flying that is attacking you.
|
||||
id=2423
|
||||
abilities=defender
|
||||
@@ -1435,3 +1468,12 @@ rarity=U
|
||||
type=Instant
|
||||
mana={R}
|
||||
[/card]
|
||||
[card]
|
||||
text={0}: Sacrifice a land to gain 2 life.
|
||||
auto={S(land|myinplay)}:life:2
|
||||
id=2436
|
||||
name=Zuran Orb
|
||||
rarity=U
|
||||
type=Artifact
|
||||
mana={0}
|
||||
[/card]
|
||||
|
||||
@@ -35,11 +35,11 @@ mana={3}
|
||||
[/card]
|
||||
[card]
|
||||
text={1}{T}: Sacrifice Barbed Sextant to add one mana of any color to your mana pool. Play this ability as an interrupt. Draw a card at the beginning of the next turn's upkeep.
|
||||
auto={1}{T}: add {G}
|
||||
auto={1}{T}: add {B}
|
||||
auto={1}{T}: add {W}
|
||||
auto={1}{T}: add {R}
|
||||
auto={1}{T}: add {U}
|
||||
auto={1}{T}{S}: add {G}
|
||||
auto={1}{T}{S}: add {B}
|
||||
auto={1}{T}{S}: add {W}
|
||||
auto={1}{T}{S}: add {R}
|
||||
auto={1}{T}{S}: add {U}
|
||||
id=2398
|
||||
name=Barbed Sextant
|
||||
rarity=C
|
||||
@@ -175,14 +175,7 @@ rarity=R
|
||||
type=Artifact
|
||||
mana={4}
|
||||
[/card]
|
||||
[card]
|
||||
text={2}{T}: Sacrifice Pit Trap to bury target creature without flying that is attacking you.
|
||||
id=2419
|
||||
name=Pit Trap
|
||||
rarity=U
|
||||
type=Artifact
|
||||
mana={2}
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=Comes into play tapped.{X}{T}: Sacrifice Runed Arch. X target creatures with power no greater than 2 cannot be blocked this turn. Other effects may later be used to increase a creature's power beyond 2.
|
||||
id=2420
|
||||
@@ -2256,40 +2249,9 @@ power=*
|
||||
subtype=Wall
|
||||
toughness=*
|
||||
[/card]
|
||||
[card]
|
||||
text={0}: Sacrifice a land to gain 2 life.
|
||||
id=2436
|
||||
name=Zuran Orb
|
||||
rarity=U
|
||||
type=Artifact
|
||||
mana={0}
|
||||
[/card]
|
||||
[card]
|
||||
text={T}: Sacrifice a forest to add three mana in any combination of red and/or green to your mana pool. Play this ability as an interrupt.
|
||||
id=2646
|
||||
auto={T}:destroy target(forest|myinplay)
|
||||
auto={T}: add {G}{G}{G}
|
||||
auto={T}: add {R}{R}{R}
|
||||
auto={T}: add {G}{R}{R}
|
||||
auto={T}: add {G}{G}{R}
|
||||
name=Orcish Lumberjack
|
||||
rarity=C
|
||||
type=Creature
|
||||
mana={R}
|
||||
power=1
|
||||
subtype=Orc
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text={1}{T}: Sacrifice a creature to have Skull Catapult deal 2 damage to target creature or player.
|
||||
id=2422
|
||||
name=Skull Catapult
|
||||
auto={1}{T}:Damage:2 target(creature,player)
|
||||
auto={1}{T}:destroy target(creature|myinplay)
|
||||
rarity=U
|
||||
type=Artifact
|
||||
mana={4}
|
||||
[/card]
|
||||
|
||||
|
||||
|
||||
[card]
|
||||
text=When Kjeldoran Dead comes into play, sacrifice a creature.{B}: Regenerate
|
||||
id=2461
|
||||
|
||||
@@ -38,6 +38,18 @@ subtype=Goblin Knight
|
||||
toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
text=Plainswalk {2}{R}, Sacrifice Boggart Arsonists: Destroy target Scarecrow or Plains.
|
||||
auto={2}{R}{S}:destroy target(scarecrow,plains)
|
||||
id=158684
|
||||
name=Boggart Arsonists
|
||||
rarity=C
|
||||
type=Creature
|
||||
mana={2}{R}
|
||||
power=2
|
||||
subtype=Goblin Rogue
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text=Haste Wither (This deals damage to creatures in the form of -1/-1 counters.)
|
||||
abilities=haste,wither
|
||||
id=153970
|
||||
@@ -87,6 +99,18 @@ subtype=Merfolk Rogue
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
text={GW}, {T}, Sacrifice Elvish Hexhunter: Destroy target enchantment.
|
||||
auto={GW}{T}{S}:destroy target(enchantment)
|
||||
id=141958
|
||||
name=Elvish Hexhunter
|
||||
rarity=C
|
||||
type=Creature
|
||||
mana={GW}
|
||||
power=1
|
||||
subtype=Elf Shaman
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text={T}: Add {1} to your mana pool. {RG}, {T}: Add {R}{R}, {R}{G}, or {G}{G} to your mana pool.
|
||||
auto={T}:Add{1}
|
||||
auto={RG}{T}:Add{R}{R}
|
||||
@@ -156,6 +180,18 @@ subtype=Treefolk Shaman
|
||||
toughness=6
|
||||
[/card]
|
||||
[card]
|
||||
text=Sacrifice Fulminator Mage: Destroy target nonbasic land.
|
||||
auto={S}:destroy target(land[-plains;-mountain;-swamp;-forest;-island])
|
||||
id=142009
|
||||
name=Fulminator Mage
|
||||
rarity=R
|
||||
type=Creature
|
||||
mana={1}{BR}{BR}
|
||||
power=2
|
||||
subtype=Elemental Shaman
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
text=Flying Other blue creatures you control get +1/+1. Other black creatures you control get +1/+1.
|
||||
abilities=flying
|
||||
auto=lord(creature[blue]|myinplay) 1/1
|
||||
@@ -193,6 +229,18 @@ rarity=R
|
||||
type=Land
|
||||
[/card]
|
||||
[card]
|
||||
text=Sacrifice Heap Doll: Remove target card in a graveyard from the game.
|
||||
auto={S}:moveTo(removedfromgame) target(*|graveyard)
|
||||
id=154395
|
||||
name=Heap Doll
|
||||
rarity=U
|
||||
type=Artifact Creature
|
||||
mana={1}
|
||||
power=1
|
||||
subtype=Scarecrow
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
text={T}: Add {U} to your mana pool.
|
||||
auto={T}:Add{U}
|
||||
id=158237
|
||||
@@ -668,6 +716,19 @@ mana={2}{UB}
|
||||
subtype=Aura
|
||||
[/card]
|
||||
[card]
|
||||
text={T}, Sacrifice a Mountain: Valleymaker deals 3 damage to target creature. {T}, Sacrifice a Forest: Choose a player. That player adds {G}{G}{G} to his or her mana pool.
|
||||
auto={T}{S(mountain|myinplay)}:Damage:3 target(creature)
|
||||
auto={T}{S(forest|myinplay)}:Add{G}{G}{G}
|
||||
id=159397
|
||||
name=Valleymaker
|
||||
rarity=R
|
||||
type=Creature
|
||||
mana={5}{RG}
|
||||
power=5
|
||||
subtype=Giant Shaman
|
||||
toughness=5
|
||||
[/card]
|
||||
[card]
|
||||
text={2}, {T}: Tap target creature.
|
||||
auto={2},[T}:tap target(creature)
|
||||
id=147420
|
||||
|
||||
@@ -181,17 +181,7 @@ rarity=U
|
||||
type=Enchantment
|
||||
mana={2}{B}
|
||||
[/card]
|
||||
[card]
|
||||
text=Plainswalk {2}{R}, Sacrifice Boggart Arsonists: Destroy target Scarecrow or Plains.
|
||||
id=158684
|
||||
name=Boggart Arsonists
|
||||
rarity=C
|
||||
type=Creature
|
||||
mana={2}{R}
|
||||
power=2
|
||||
subtype=Goblin Rogue
|
||||
toughness=1
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=If you would gain life, you gain twice that much life instead.
|
||||
id=146751
|
||||
@@ -506,17 +496,7 @@ rarity=C
|
||||
type=Artifact
|
||||
mana={2}
|
||||
[/card]
|
||||
[card]
|
||||
text={GW}, {T}, Sacrifice Elvish Hexhunter: Destroy target enchantment.
|
||||
id=141958
|
||||
name=Elvish Hexhunter
|
||||
rarity=C
|
||||
type=Creature
|
||||
mana={GW}
|
||||
power=1
|
||||
subtype=Elf Shaman
|
||||
toughness=1
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=Creatures target player controls can't block this turn. Ember Gale deals 1 damage to each white and/or blue creature that player controls.
|
||||
id=158766
|
||||
@@ -642,17 +622,7 @@ rarity=R
|
||||
type=Instant
|
||||
mana={2}{GW}{GW}{GW}
|
||||
[/card]
|
||||
[card]
|
||||
text=Sacrifice Fulminator Mage: Destroy target nonbasic land.
|
||||
id=142009
|
||||
name=Fulminator Mage
|
||||
rarity=R
|
||||
type=Creature
|
||||
mana={1}{BR}{BR}
|
||||
power=2
|
||||
subtype=Elemental Shaman
|
||||
toughness=2
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=When Furystoke Giant comes into play, other creatures you control gain "{T}: This creature deals 2 damage to target creature or player" until end of turn. Persist (When this creature is put into a graveyard from play, if it had no -1/-1 counters on it, return it to play under its owner's control with a -1/-1 counter on it.)
|
||||
id=152069
|
||||
@@ -816,17 +786,7 @@ rarity=U
|
||||
type=Instant
|
||||
mana={RG}
|
||||
[/card]
|
||||
[card]
|
||||
text=Sacrifice Heap Doll: Remove target card in a graveyard from the game.
|
||||
id=154395
|
||||
name=Heap Doll
|
||||
rarity=U
|
||||
type=Artifact Creature
|
||||
mana={1}
|
||||
power=1
|
||||
subtype=Scarecrow
|
||||
toughness=1
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=At the beginning of your upkeep, remove a -1/-1 counter from each creature you control. Persist (When this creature is put into a graveyard from play, if it had no -1/-1 counters on it, return it to play under its owner's control with a -1/-1 counter on it.)
|
||||
id=153312
|
||||
@@ -2069,17 +2029,7 @@ type=Artifact
|
||||
mana={3}
|
||||
subtype=Equipment
|
||||
[/card]
|
||||
[card]
|
||||
text={T}, Sacrifice a Mountain: Valleymaker deals 3 damage to target creature. {T}, Sacrifice a Forest: Choose a player. That player adds {G}{G}{G} to his or her mana pool.
|
||||
id=159397
|
||||
name=Valleymaker
|
||||
rarity=R
|
||||
type=Creature
|
||||
mana={5}{RG}
|
||||
power=5
|
||||
subtype=Giant Shaman
|
||||
toughness=5
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
text=Vexing Shusher can't be countered. {RG}: Target spell can't be countered by spells or abilities.
|
||||
id=146016
|
||||
|
||||
1322
projects/mtg/bin/Res/sets/TMP/_cards.dat
Normal file
1322
projects/mtg/bin/Res/sets/TMP/_cards.dat
Normal file
File diff suppressed because it is too large
Load Diff
82
projects/mtg/bin/Res/sets/TMP/todo.dat
Normal file
82
projects/mtg/bin/Res/sets/TMP/todo.dat
Normal file
@@ -0,0 +1,82 @@
|
||||
[card]
|
||||
text=Each Sliver gains,{2}:This creature gets +0/+1 until end of turn.
|
||||
auto={2}:0/1
|
||||
auto=lord(sliver) {2}:0/1
|
||||
id=4689
|
||||
name=Armor Sliver
|
||||
rarity=U
|
||||
type=Creature
|
||||
mana={2}{W}
|
||||
power=2
|
||||
subtype=Sliver
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
text=Target attacking or blocking creature gets +4/+0 until end of turn. Destroy that creature at end of turn.
|
||||
target=creature[attacking,blocking]
|
||||
auto=4/0
|
||||
auto=@next endofturn:destroy
|
||||
id=4804
|
||||
name=Blood Frenzy
|
||||
rarity=C
|
||||
color=Red
|
||||
type=Instant
|
||||
mana={1}{R}
|
||||
[/card]
|
||||
[card]
|
||||
text=When Cloudchaser Eagle comes into play, destroy target enchantment.
|
||||
target=enchantment
|
||||
auto=destroy
|
||||
id=4871
|
||||
name=Cloudchaser Eagle
|
||||
color=White
|
||||
rarity=C
|
||||
mana={2}{W}
|
||||
type=Creature
|
||||
subtype=Bird
|
||||
power=2
|
||||
toughness=2
|
||||
abilities=flying
|
||||
[/card]
|
||||
[card]
|
||||
text=Legendary Fear When Commander Greven il-Vec comes into play, sacrifice a creature.
|
||||
target=creature|myinplay
|
||||
auto=bury
|
||||
id=4643
|
||||
name=Commander Greven il-Vec
|
||||
colour=Black
|
||||
rarity=R
|
||||
mana={3}{B}{B}{B}
|
||||
type=Creature
|
||||
subtype=Human Warrior
|
||||
power=7
|
||||
toughness=5
|
||||
abilities=fear,legendary
|
||||
[/card]
|
||||
[card]
|
||||
text={R}: Flowstone Salamander deals 1 damage to target creature blocking it.
|
||||
id=4817
|
||||
name=Flowstone Salamander
|
||||
colour=Red
|
||||
rarity=U
|
||||
mana={3}{R}{R}
|
||||
type=Creature
|
||||
subtype=Salamander
|
||||
auto={R}:damage:1 target(creature[blocking])
|
||||
power=3
|
||||
toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
text=When Gravedigger comes into play, you may return target creature card from your graveyard to your hand.
|
||||
target=creature|myGraveyard
|
||||
alias=1174
|
||||
id=4665
|
||||
name=Gravedigger
|
||||
rarity=U
|
||||
colour=Black
|
||||
mana={3}{B}
|
||||
type=Creature
|
||||
subtype=Zombie
|
||||
power=2
|
||||
toughness=2
|
||||
[/card]
|
||||
@@ -145,6 +145,7 @@ class ActionStack :public GuiLayer{
|
||||
int CombatDamages();
|
||||
int CombatDamages(int firststrike);
|
||||
int has(Interruptible * action);
|
||||
int has(MTGAbility * ability);
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
void Dump();
|
||||
#endif
|
||||
|
||||
@@ -81,10 +81,15 @@ class ADrawer:public ActivatedAbility{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
const char * getMenuText(){
|
||||
return "Draw";
|
||||
}
|
||||
|
||||
~ADrawer(){
|
||||
OutputDebugString("Deleting ADrawer\n");
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -170,6 +175,17 @@ public:
|
||||
if (p){
|
||||
MTGGameZone * fromZone = _target->getCurrentZone();
|
||||
MTGGameZone * destZone = MTGGameZone::stringToZone(destinationZone, source);
|
||||
|
||||
//inplay is a special zone !
|
||||
for (int i=0; i < 2; i++){
|
||||
if (destZone == game->players[i]->game->inPlay){
|
||||
Spell * spell = NEW Spell(_target);
|
||||
game->players[i]->game->putInZone(_target, fromZone, game->players[i]->game->stack);
|
||||
spell->resolve();
|
||||
delete spell;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
p->game->putInZone(_target,fromZone,destZone);
|
||||
}
|
||||
return 1;
|
||||
|
||||
49
projects/mtg/include/ExtraCost.h
Normal file
49
projects/mtg/include/ExtraCost.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#ifndef _EXTRACOST_H_
|
||||
#define _EXTRACOST_H_
|
||||
|
||||
#include <vector>
|
||||
using std::vector;
|
||||
|
||||
class TargetChooser;
|
||||
class MTGCardInstance;
|
||||
class MTGAbility;
|
||||
|
||||
class ExtraCost{
|
||||
public:
|
||||
TargetChooser * tc;
|
||||
MTGCardInstance * source;
|
||||
ExtraCost(TargetChooser *_tc = NULL);
|
||||
virtual int setPayment(MTGCardInstance * card) = 0;
|
||||
virtual int isPaymentSet() = 0;
|
||||
virtual int doPay() = 0;
|
||||
virtual void Render(){};
|
||||
virtual int setSource(MTGCardInstance * _source);
|
||||
};
|
||||
|
||||
class ExtraCosts{
|
||||
public:
|
||||
vector<ExtraCost *>costs;
|
||||
MTGCardInstance * source;
|
||||
MTGAbility * action;
|
||||
ExtraCosts();
|
||||
void Render();
|
||||
int tryToSetPayment(MTGCardInstance * card);
|
||||
int isPaymentSet();
|
||||
int doPay();
|
||||
int reset();
|
||||
int setAction(MTGAbility * _action, MTGCardInstance * _source);
|
||||
void Dump();
|
||||
};
|
||||
|
||||
class SacrificeCost: public ExtraCost{
|
||||
public:
|
||||
MTGCardInstance * target;
|
||||
SacrificeCost(TargetChooser *_tc = NULL);
|
||||
virtual int setPayment(MTGCardInstance * card);
|
||||
virtual int isPaymentSet();
|
||||
virtual int doPay();
|
||||
virtual void Render();
|
||||
virtual int setSource(MTGCardInstance * _source);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -38,6 +38,7 @@ class GameObserver{
|
||||
PhaseRing * phaseRing;
|
||||
int cancelCurrentAction();
|
||||
int currentGamePhase;
|
||||
ExtraCosts * waitForExtraPayment;
|
||||
int oldGamePhase;
|
||||
TargetChooser * targetChooser;
|
||||
DuelLayers * mLayers;
|
||||
|
||||
@@ -6,13 +6,19 @@
|
||||
|
||||
|
||||
class ManaCostHybrid;
|
||||
class ExtraCosts;
|
||||
class ExtraCost;
|
||||
class MTGAbility;
|
||||
class MTGCardInstance;
|
||||
|
||||
class ManaCost{
|
||||
protected:
|
||||
int cost[Constants::MTG_NB_COLORS+1];
|
||||
ManaCostHybrid * hybrids[10];
|
||||
int nbhybrids;
|
||||
|
||||
public:
|
||||
ExtraCosts * extraCosts;
|
||||
static ManaCost * parseManaCost(string value, ManaCost * _manacost = NULL);
|
||||
void init();
|
||||
void x();
|
||||
@@ -21,6 +27,7 @@ class ManaCost{
|
||||
~ManaCost();
|
||||
ManaCost(ManaCost * _manaCost);
|
||||
void copy (ManaCost * _manaCost);
|
||||
int isNull();
|
||||
int getConvertedCost();
|
||||
string toString();
|
||||
int getCost(int color);
|
||||
@@ -30,6 +37,16 @@ class ManaCost{
|
||||
int hasColor(int color);
|
||||
int remove (int color, int value);
|
||||
int add(int color, int value);
|
||||
|
||||
//
|
||||
// Extra Costs (sacrifice...)
|
||||
//
|
||||
int addExtraCost(ExtraCost * _cost);
|
||||
int setExtraCostsAction(MTGAbility * action, MTGCardInstance * card);
|
||||
int isExtraPaymentSet();
|
||||
int resetExtraPayment();
|
||||
int doPayExtra();
|
||||
|
||||
int addHybrid(int c1, int v1, int c2, int v2);
|
||||
int tryToPayHybrids(ManaCostHybrid * _hybrids[], int _nbhybrids, int diff[]);
|
||||
void randomDiffHybrids(ManaCost * _cost, int diff[]);
|
||||
|
||||
@@ -274,6 +274,16 @@ ActionStack::ActionStack(int id, GameObserver* _game):GuiLayer(id, _game){
|
||||
|
||||
}
|
||||
|
||||
int ActionStack::has(MTGAbility * ability){
|
||||
for (int i = 0; i < mCount ; i++){
|
||||
if (((Interruptible *)mObjects[i])->type==ACTION_ABILITY){
|
||||
StackAbility * action = ((StackAbility *)mObjects[i]);
|
||||
if (action->state == NOT_RESOLVED && action->ability == ability) return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ActionStack::has(Interruptible * action){
|
||||
for (int i = 0; i < mCount ; i++){
|
||||
if (mObjects[i] == action) return 1;
|
||||
@@ -658,15 +668,15 @@ void ActionStack::Render(){
|
||||
for (int i=0;i<mCount ;i++){
|
||||
Interruptible * current = (Interruptible *)mObjects[i];
|
||||
if (current && current->state==NOT_RESOLVED){
|
||||
current->x = x0 + 5;
|
||||
if (i != mCount -1){
|
||||
current->y = currenty;
|
||||
currenty += current->mHeight;
|
||||
}else{
|
||||
current->y = currenty + 40 ;
|
||||
currenty += current->mHeight + 40;
|
||||
}
|
||||
current->Render();
|
||||
current->x = x0 + 5;
|
||||
if (i != mCount -1){
|
||||
current->y = currenty;
|
||||
currenty += current->mHeight;
|
||||
}else{
|
||||
current->y = currenty + 40 ;
|
||||
currenty += current->mHeight + 40;
|
||||
}
|
||||
current->Render();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -698,15 +708,15 @@ void ActionStack::Render(){
|
||||
for (int i=0;i<mCount ;i++){
|
||||
Interruptible * current = (Interruptible *)mObjects[i];
|
||||
if (mObjects[i]!=NULL && current->display){
|
||||
((Interruptible *)mObjects[i])->x = x0 + 5;
|
||||
if (i != mCount -1){
|
||||
((Interruptible *)mObjects[i])->y = currenty;
|
||||
currenty += ((Interruptible *)mObjects[i])->mHeight;
|
||||
}else{
|
||||
((Interruptible *)mObjects[i])->y = currenty + 40 ;
|
||||
currenty += ((Interruptible *)mObjects[i])->mHeight + 40;
|
||||
}
|
||||
mObjects[i]->Render();
|
||||
((Interruptible *)mObjects[i])->x = x0 + 5;
|
||||
if (i != mCount -1){
|
||||
((Interruptible *)mObjects[i])->y = currenty;
|
||||
currenty += ((Interruptible *)mObjects[i])->mHeight;
|
||||
}else{
|
||||
((Interruptible *)mObjects[i])->y = currenty + 40 ;
|
||||
currenty += ((Interruptible *)mObjects[i])->mHeight + 40;
|
||||
}
|
||||
mObjects[i]->Render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
118
projects/mtg/src/ExtraCost.cpp
Normal file
118
projects/mtg/src/ExtraCost.cpp
Normal file
@@ -0,0 +1,118 @@
|
||||
#include "../include/ExtraCost.h"
|
||||
#include "../include/TargetChooser.h"
|
||||
#include "../include/MTGCardInstance.h"
|
||||
#include <JGE.h>
|
||||
|
||||
ExtraCost::ExtraCost( TargetChooser *_tc):tc(_tc){
|
||||
|
||||
}
|
||||
|
||||
|
||||
int ExtraCost::setSource(MTGCardInstance * _source){
|
||||
source=_source;
|
||||
if (tc){ tc->source = _source;}
|
||||
return 1;
|
||||
}
|
||||
|
||||
SacrificeCost::SacrificeCost(TargetChooser *_tc):ExtraCost(_tc){
|
||||
target = NULL;
|
||||
if (!tc) OutputDebugString("Self Sacrifice\n");
|
||||
}
|
||||
|
||||
int SacrificeCost::setSource(MTGCardInstance * card){
|
||||
ExtraCost::setSource(card);
|
||||
if (!tc) target = card;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int SacrificeCost::setPayment(MTGCardInstance * card){
|
||||
if (tc) {
|
||||
int result = tc->addTarget(card);
|
||||
if (result) {
|
||||
target = card;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SacrificeCost::isPaymentSet(){
|
||||
if (target) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SacrificeCost::doPay(){
|
||||
if(target){
|
||||
target->controller()->game->putInGraveyard(target);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SacrificeCost::Render(){
|
||||
//TODO : real stuff
|
||||
JLBFont * mFont = GameApp::CommonRes->GetJLBFont(Constants::MAIN_FONT);
|
||||
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
|
||||
char buffer[200];
|
||||
sprintf(buffer, "sacrifice");
|
||||
mFont->DrawString(buffer, 20 ,20, JGETEXT_LEFT);
|
||||
}
|
||||
|
||||
//
|
||||
//Container
|
||||
//
|
||||
ExtraCosts::ExtraCosts(){
|
||||
action = NULL;
|
||||
source = NULL;
|
||||
}
|
||||
|
||||
void ExtraCosts::Render(){
|
||||
//TODO cool window and stuff...
|
||||
for (int i=0; i < costs.size(); i++){
|
||||
costs[i]->Render();
|
||||
}
|
||||
}
|
||||
|
||||
int ExtraCosts::setAction(MTGAbility * _action, MTGCardInstance * _card){
|
||||
action = _action;
|
||||
source = _card;
|
||||
for (int i=0; i < costs.size(); i++){
|
||||
costs[i]->setSource(_card);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ExtraCosts::reset(){
|
||||
action = NULL;
|
||||
source = NULL;
|
||||
//TODO set all payments to "unset"
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ExtraCosts::tryToSetPayment(MTGCardInstance * card){
|
||||
for (int i=0; i < costs.size(); i++){
|
||||
if (int result = costs[i]->setPayment(card)) return result;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ExtraCosts::isPaymentSet(){
|
||||
for (int i=0; i < costs.size(); i++){
|
||||
if (!costs[i]->isPaymentSet()) return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ExtraCosts::doPay(){
|
||||
int result = 0;
|
||||
for (int i=0; i < costs.size(); i++){
|
||||
result+=costs[i]->doPay();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
void ExtraCosts::Dump(){
|
||||
char buf[4096];
|
||||
OutputDebugString("=====\nDumping ExtraCosts=====\n");
|
||||
sprintf(buf, "NbElements : %i\n", costs.size());
|
||||
OutputDebugString(buf);
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "../include/CardGui.h"
|
||||
#include "../include/Damage.h"
|
||||
#include "../include/DamageResolverLayer.h"
|
||||
#include "../include/ExtraCost.h"
|
||||
|
||||
#include <JRenderer.h>
|
||||
|
||||
@@ -46,6 +47,7 @@ GameObserver::GameObserver(Player * _players[], int _nb_players){
|
||||
currentGamePhase = -1;
|
||||
targetChooser = NULL;
|
||||
cardWaitingForTargets = NULL;
|
||||
waitForExtraPayment = NULL;
|
||||
reaction = 0;
|
||||
gameOver = NULL;
|
||||
phaseRing = NEW PhaseRing(_players,_nb_players);
|
||||
@@ -213,6 +215,9 @@ void GameObserver::Render(){
|
||||
if (targetChooser || mLayers->actionLayer()->isWaitingForAnswer()){
|
||||
JRenderer::GetInstance()->DrawRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT,ARGB(255,255,0,0));
|
||||
}
|
||||
if (waitForExtraPayment){
|
||||
waitForExtraPayment->Render();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -275,17 +280,17 @@ void GameObserver::cardClick (MTGCardInstance * card, Targetable * object){
|
||||
int result;
|
||||
if (card) {
|
||||
if (card == cardWaitingForTargets){
|
||||
LOG("attempt to close targetting");
|
||||
int _result = targetChooser->ForceTargetListReady();
|
||||
if (_result){
|
||||
result = TARGET_OK_FULL;
|
||||
}else{
|
||||
LOG("attempt to close targetting");
|
||||
int _result = targetChooser->ForceTargetListReady();
|
||||
if (_result){
|
||||
result = TARGET_OK_FULL;
|
||||
}else{
|
||||
|
||||
LOG("...but we cant!\n");
|
||||
result = targetChooser->targetsReadyCheck();
|
||||
}
|
||||
LOG("...but we cant!\n");
|
||||
result = targetChooser->targetsReadyCheck();
|
||||
}
|
||||
}else{
|
||||
result = targetChooser->toggleTarget(card);
|
||||
result = targetChooser->toggleTarget(card);
|
||||
}
|
||||
}else{
|
||||
result = targetChooser->toggleTarget(clickedPlayer);
|
||||
@@ -297,6 +302,17 @@ void GameObserver::cardClick (MTGCardInstance * card, Targetable * object){
|
||||
}
|
||||
}
|
||||
|
||||
if (waitForExtraPayment){
|
||||
if (card){
|
||||
waitForExtraPayment->tryToSetPayment(card);
|
||||
}
|
||||
if (waitForExtraPayment->isPaymentSet()){
|
||||
waitForExtraPayment->action->reactToClick(waitForExtraPayment->source);
|
||||
waitForExtraPayment = NULL;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (card){
|
||||
reaction = mLayers->actionLayer()->isReactingToClick(card);
|
||||
if (reaction == -1) mLayers->actionLayer()->reactToClick(card);
|
||||
|
||||
@@ -118,6 +118,11 @@ void GuiLayers::Update(float dt, Player * currentPlayer){
|
||||
u32 key;
|
||||
while ((key = JGE::GetInstance()->ReadButton()))
|
||||
{
|
||||
GameObserver * game = GameObserver::GetInstance();
|
||||
if (game->waitForExtraPayment && key == PSP_CTRL_CROSS){
|
||||
game->waitForExtraPayment = NULL;
|
||||
continue;
|
||||
}
|
||||
for (i=0; i<nbitems; i++){
|
||||
if (!isAI){
|
||||
if (0 != key)
|
||||
|
||||
@@ -151,7 +151,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
|
||||
cost = ManaCost::parseManaCost(line.substr(0,delimiter+1));
|
||||
}
|
||||
OutputDebugString("Pqrsing cost\n");
|
||||
if (cost && !cost->getConvertedCost()){
|
||||
if (cost && cost->isNull()){
|
||||
OutputDebugString("Cost is null\n");
|
||||
SAFE_DELETE(cost);
|
||||
}
|
||||
@@ -1040,12 +1040,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
||||
game->addObserver(NEW APestilence(_id, card));
|
||||
break;
|
||||
}
|
||||
/*case 1173: //Plague Rats
|
||||
{
|
||||
game->addObserver(NEW APlagueRats(_id, card, "Plague Rats"));
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
case 1174: //Raise Dead
|
||||
{
|
||||
MTGPlayerCards * zones = game->currentlyActing()->game;
|
||||
@@ -1621,7 +1616,9 @@ MTGAbility::~MTGAbility(){
|
||||
|
||||
//returns 1 if this ability needs to be removed from the list of active abilities
|
||||
int MTGAbility::testDestroy(){
|
||||
if (!game->isInPlay(source)){
|
||||
if (game->mLayers->stackLayer()->has(this)) return 0;
|
||||
if (!game->isInPlay(source) ){
|
||||
OutputDebugString("Destroying Ability !!!\n");
|
||||
return 1;
|
||||
}
|
||||
if (target && !game->isInPlay((MTGCardInstance *)target)){
|
||||
@@ -1647,16 +1644,32 @@ ActivatedAbility::ActivatedAbility(int id, MTGCardInstance * card, ManaCost * _c
|
||||
int ActivatedAbility::isReactingToClick(MTGCardInstance * card){
|
||||
Player * player = game->currentPlayer;
|
||||
if (!playerturnonly) player = game->currentlyActing();
|
||||
if (card == source && (!cost || player->getManaPool()->canAfford(cost)) && source->controller()==player && (!needsTapping || (!source->isTapped() && !source->hasSummoningSickness())) && player==game->currentlyActing())
|
||||
if (card == source && source->controller()==player && player==game->currentlyActing() && (!needsTapping || (!source->isTapped() && !source->hasSummoningSickness()))){
|
||||
if (!cost) return 1;
|
||||
if (!player->getManaPool()->canAfford(cost)) return 0;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ActivatedAbility::reactToClick(MTGCardInstance * card){
|
||||
if (!isReactingToClick(card)) return 0;
|
||||
OutputDebugString("React To click 1\n");
|
||||
if (cost){
|
||||
cost->setExtraCostsAction(this, card);
|
||||
OutputDebugString("React To click 2\n");
|
||||
if (!cost->isExtraPaymentSet()){
|
||||
OutputDebugString("React To click 3\n");
|
||||
|
||||
game->waitForExtraPayment = cost->extraCosts;
|
||||
return 0;
|
||||
}
|
||||
game->currentlyActing()->getManaPool()->pay(cost);
|
||||
cost->doPayExtra();
|
||||
}
|
||||
if (needsTapping) source->tapped = 1;
|
||||
if (cost) game->currentlyActing()->getManaPool()->pay(cost);
|
||||
fireAbility();
|
||||
|
||||
return 1;
|
||||
|
||||
}
|
||||
@@ -1664,7 +1677,17 @@ int ActivatedAbility::reactToClick(MTGCardInstance * card){
|
||||
int ActivatedAbility::reactToTargetClick(Targetable * object){
|
||||
if (!isReactingToTargetClick(object)) return 0;
|
||||
if (needsTapping) source->tapped = 1;
|
||||
if (cost) game->currentlyActing()->getManaPool()->pay(cost);
|
||||
if (cost){
|
||||
if (object->typeAsTarget() == TARGET_CARD) cost->setExtraCostsAction(this, (MTGCardInstance *) object);
|
||||
OutputDebugString("React To click 2\n");
|
||||
if (!cost->isExtraPaymentSet()){
|
||||
OutputDebugString("React To click 3\n");
|
||||
game->waitForExtraPayment = cost->extraCosts;
|
||||
return 0;
|
||||
}
|
||||
game->currentlyActing()->getManaPool()->pay(cost);
|
||||
cost->doPayExtra();
|
||||
}
|
||||
fireAbility();
|
||||
return 1;
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ MTGPutInPlayRule::MTGPutInPlayRule(int _id):MTGAbility(_id, NULL){
|
||||
}
|
||||
|
||||
int MTGPutInPlayRule::isReactingToClick(MTGCardInstance * card){
|
||||
Player * player = game->currentlyActing();
|
||||
Player * currentPlayer = game->currentPlayer;
|
||||
Player * player = game->currentlyActing();
|
||||
Player * currentPlayer = game->currentPlayer;
|
||||
LOG("CANPUTINPLAY- check if card belongs to current player\n");
|
||||
if (!player->game->hand->hasCard(card)) return 0;
|
||||
LOG("CANPUTINPLAY- check if card is land or can be played\n");
|
||||
@@ -23,17 +23,7 @@ int MTGPutInPlayRule::isReactingToClick(MTGCardInstance * card){
|
||||
ManaCost * cost = card->getManaCost();
|
||||
if (playerMana->canAfford(cost)){
|
||||
LOG("CANPUTINPLAY- ManaCost ok\n");
|
||||
if (game->targetListIsSet(card)){
|
||||
#ifdef LOG
|
||||
LOG("CANPUTINPLAY- Targets chosen -> OK\n");
|
||||
#endif
|
||||
return 1;
|
||||
}else{
|
||||
#ifdef LOG
|
||||
LOG("CANPUTINPLAY- Targets not chosen yet\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -42,8 +32,20 @@ int MTGPutInPlayRule::isReactingToClick(MTGCardInstance * card){
|
||||
int MTGPutInPlayRule::reactToClick(MTGCardInstance * card){
|
||||
if (!isReactingToClick(card)) return 0;
|
||||
Player * player = game->currentlyActing();
|
||||
ManaCost * cost = card->getManaCost();
|
||||
if (cost->isExtraPaymentSet()){
|
||||
if (!game->targetListIsSet(card)){
|
||||
LOG("CANPUTINPLAY- Targets not chosen yet\n");
|
||||
return 0;
|
||||
}
|
||||
}else{
|
||||
cost->setExtraCostsAction(this, card);
|
||||
game->waitForExtraPayment = cost->extraCosts;
|
||||
return 0;
|
||||
}
|
||||
ManaCost * previousManaPool = NEW ManaCost(player->getManaPool());
|
||||
player->getManaPool()->pay(card->getManaCost());
|
||||
card->getManaCost()->doPayExtra();
|
||||
ManaCost * spellCost = previousManaPool->Diff(player->getManaPool());
|
||||
delete previousManaPool;
|
||||
if (card->hasType("land")){
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
#include "../include/Logger.h"
|
||||
#include "../include/ManaCost.h"
|
||||
#include "../include/ManaCostHybrid.h"
|
||||
#include "../include/ExtraCost.h"
|
||||
#include "../include/TargetChooser.h"
|
||||
#include "../include/Targetable.h"
|
||||
|
||||
#if defined (WIN32)
|
||||
|
||||
@@ -50,6 +53,19 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost){
|
||||
}else if (value == "x"){
|
||||
manaCost->x();
|
||||
}else if (value == "t"){
|
||||
//Tap is handled outside of Manacost
|
||||
}else if (value[0] == 's'){
|
||||
//sacrifice
|
||||
OutputDebugString("Sacrifice\n");
|
||||
TargetChooserFactory tcf;
|
||||
TargetChooser * tc = NULL;
|
||||
int target_start = value.find("(");
|
||||
int target_end = value.find(")");
|
||||
if (target_start!=string::npos && target_end!=string::npos){
|
||||
string target = value.substr(target_start+1, target_end-1 - target_start);
|
||||
tc = tcf.createTargetChooser(target,NULL);
|
||||
}
|
||||
manaCost->addExtraCost(NEW SacrificeCost(tc));
|
||||
}else{
|
||||
int intvalue = atoi(value.c_str());
|
||||
int colors[2];
|
||||
@@ -128,6 +144,7 @@ void ManaCost::init(){
|
||||
cost[i] = 0;
|
||||
}
|
||||
nbhybrids = 0;
|
||||
extraCosts = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -139,6 +156,11 @@ void ManaCost::copy(ManaCost * _manaCost){
|
||||
hybrids[i] = NEW ManaCostHybrid((*_manaCost->hybrids[i]));
|
||||
}
|
||||
nbhybrids = _manaCost->nbhybrids;
|
||||
|
||||
if (_manaCost->extraCosts){
|
||||
//TODO Deep copy ?
|
||||
extraCosts = _manaCost->extraCosts;
|
||||
}
|
||||
}
|
||||
|
||||
int ManaCost::getCost(int color){
|
||||
@@ -165,6 +187,12 @@ int ManaCost::hasColor(int color){
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ManaCost::isNull(){
|
||||
if (getConvertedCost()) return 0;
|
||||
if (extraCosts) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ManaCost::getConvertedCost(){
|
||||
int result = 0;
|
||||
for (unsigned int i = 0; i < Constants::MTG_NB_COLORS; i++){
|
||||
@@ -210,6 +238,35 @@ int ManaCost::addHybrid(int c1, int v1, int c2, int v2){
|
||||
return nbhybrids;
|
||||
}
|
||||
|
||||
int ManaCost::addExtraCost(ExtraCost * _cost){
|
||||
if (!extraCosts) extraCosts = NEW ExtraCosts();
|
||||
extraCosts->costs.push_back(_cost);
|
||||
OutputDebugString("Adding Sacrifice\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int ManaCost::isExtraPaymentSet(){
|
||||
if (!extraCosts) return 1;
|
||||
OutputDebugString("Checking costs\n");
|
||||
return extraCosts->isPaymentSet();
|
||||
}
|
||||
|
||||
int ManaCost::resetExtraPayment(){
|
||||
if (!extraCosts) return 1;
|
||||
return extraCosts->reset();
|
||||
}
|
||||
|
||||
int ManaCost::doPayExtra(){
|
||||
if (!extraCosts) return 0;
|
||||
return extraCosts->doPay(); //TODO reset ?
|
||||
}
|
||||
|
||||
int ManaCost::setExtraCostsAction(MTGAbility * action, MTGCardInstance * card){
|
||||
if (extraCosts) extraCosts->setAction(action, card);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ManaCost::pay(ManaCost * _cost){
|
||||
ManaCost * diff = Diff(_cost);
|
||||
for (int i=0; i < Constants::MTG_NB_COLORS; i++){
|
||||
|
||||
@@ -284,6 +284,10 @@
|
||||
RelativePath=".\src\DuelLayers.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\ExtraCost.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="src\GameApp.cpp"
|
||||
>
|
||||
@@ -589,6 +593,10 @@
|
||||
RelativePath=".\include\DuelLayers.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\ExtraCost.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\GameApp.h"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user