Laurent - Added "deplete" to the parser does not work for instant and sorcery at the moment (WILL NEED HELP FOR THAT)

Updated cards.dat to include the one with deplete possibility.
Also included various cards (alias from RV)
This commit is contained in:
wagic.laurent
2009-05-21 16:28:13 +00:00
parent db912f2d34
commit 37008df473
9 changed files with 88 additions and 76 deletions
+15 -1
View File
@@ -36,6 +36,20 @@ subtype=Elemental
toughness=4 toughness=4
[/card] [/card]
[card] [card]
text={3}: Target player puts the top three cards of his or her library into his or her graveyard.
id=129913
auto={3}:deplete:3 target(player)
name=Ambassador Laquatus
rarity=R
color=Blue
type=Creature
abilities=legendary
mana={1}{U}{U}
power=1
subtype=Merfolk Wizard
toughness=3
[/card]
[card]
text=First strike (This creature deals combat damage before creatures without first strike.) text=First strike (This creature deals combat damage before creatures without first strike.)
abilities=first strike abilities=first strike
id=134753 id=134753
@@ -1305,8 +1319,8 @@ toughness=1
[card] [card]
text={2}, {T}: Target player puts the top two cards of his or her library into his or her graveyard. text={2}, {T}: Target player puts the top two cards of his or her library into his or her graveyard.
id=129643 id=129643
alias=1126
name=Millstone name=Millstone
auto={2}{T}:deplete:2 target(player)
rarity=R rarity=R
color=Artifact color=Artifact
type=Artifact type=Artifact
-12
View File
@@ -29,18 +29,6 @@ type=Sorcery
mana={2}{B}{B} mana={2}{B}{B}
[/card] [/card]
[card] [card]
text={3}: Target player puts the top three cards of his or her library into his or her graveyard.
id=129913
name=Ambassador Laquatus
rarity=R
color=Blue
type=Legendary Creature
mana={1}{U}{U}
power=1
subtype=Merfolk Wizard
toughness=3
[/card]
[card]
text=Whenever a creature comes into play under your control, you gain life equal to its toughness. text=Whenever a creature comes into play under your control, you gain life equal to its toughness.
id=129710 id=129710
name=Angelic Chorus name=Angelic Chorus
+9
View File
@@ -955,6 +955,15 @@ mana={4}
type=Artifact type=Artifact
[/card] [/card]
[card] [card]
text={8}, {T}: Target player puts the top eight cards of his or her library into his or her graveyard.
id=46730
auto={8}{T}:deplete:8 target(player)
name=Tower of Murmurs
rarity=R
type=Artifact
mana={4}
[/card]
[card]
text=Haste text=Haste
id=5585 id=5585
abilities=haste abilities=haste
-32
View File
@@ -2520,38 +2520,6 @@ type=Artifact
mana={3} mana={3}
[/card] [/card]
[card] [card]
text={8}, {T}: Target creature gets +6/+6 until end of turn.
id=48155
name=Tower of Champions
rarity=R
type=Artifact
mana={4}
[/card]
[card]
text={8}, {T}: You gain 10 life.
id=48914
name=Tower of Eons
rarity=R
type=Artifact
mana={4}
[/card]
[card]
text={8}, {T}: Draw four cards.
id=35464
name=Tower of Fortunes
rarity=R
type=Artifact
mana={4}
[/card]
[card]
text={8}, {T}: Target player puts the top eight cards of his or her library into his or her graveyard.
id=46730
name=Tower of Murmurs
rarity=R
type=Artifact
mana={4}
[/card]
[card]
text=As an additional cost to play Trash for Treasure, sacrifice an artifact. Return target artifact card from your graveyard to play. text=As an additional cost to play Trash for Treasure, sacrifice an artifact. Return target artifact card from your graveyard to play.
id=48586 id=48586
name=Trash for Treasure name=Trash for Treasure
+1
View File
@@ -1394,6 +1394,7 @@ toughness=1
text={2}, {T}: Target player puts the top two cards of his or her library into his or her graveyard. text={2}, {T}: Target player puts the top two cards of his or her library into his or her graveyard.
id=1126 id=1126
name=Millstone name=Millstone
auto={2}{T}:deplete:2 target(player)
rarity=R rarity=R
type=Artifact type=Artifact
mana={2} mana={2}
+22
View File
@@ -1,4 +1,16 @@
[card] [card]
text=Whenever a player plays a white spell, you may pay {1}. If you do, you gain 1 life.
id=141929
alias=1114
name=Apothecary Initiate
rarity=C
type=Creature
mana={W}
power=1
subtype=Kithkin Cleric
toughness=1
[/card]
[card]
text=Enchant creature Enchanted creature gets +1/+1 for each Plains you control and has flying. text=Enchant creature Enchanted creature gets +1/+1 for each Plains you control and has flying.
target=creature target=creature
auto=foreach(plains|myinplay) 1/1 auto=foreach(plains|myinplay) 1/1
@@ -223,6 +235,16 @@ subtype=Elf Shaman
toughness=1 toughness=1
[/card] [/card]
[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
auto=lord(creature|opponentinplay) cantblock
auto=damage:1 all(creature[white;blue]|opponentinplay)
name=Ember Gale
rarity=C
type=Sorcery
mana={3}{R}
[/card]
[card]
text=Flying Faerie Swarm's power and toughness are each equal to the number of blue permanents you control. text=Flying Faerie Swarm's power and toughness are each equal to the number of blue permanents you control.
auto=foreach(*[blue]|myinplay) 1/1 auto=foreach(*[blue]|myinplay) 1/1
abilities=flying abilities=flying
+5 -24
View File
@@ -22,25 +22,13 @@ rarity=C
type=Instant type=Instant
mana={B} mana={B}
[/card] [/card]
[card]
text=Whenever a player plays a white spell, you may pay {1}. If you do, you gain 1 life.
id=141929
name=Apothecary Initiate
rarity=C
type=Creature
mana={W}
power=1
subtype=Kithkin Cleric
toughness=1
[/card]
[card] [card]
text=Other black creatures you control get +1/+1. Other red creatures you control get +1/+1. Whenever Ashenmoor Liege becomes the target of a spell or ability an opponent controls, that player loses 4 life. text=Other black creatures you control get +1/+1. Other red creatures you control get +1/+1. Whenever Ashenmoor Liege becomes the target of a spell or ability an opponent controls, that player loses 4 life.
id=146065 id=146065
name=Ashenmoor Liege name=Ashenmoor Liege
rarity=R rarity=R
auto=lord(creature[black]|myinplay) 1/1
auto=lord(creature[red]|myinplay) 1/1
type=Creature type=Creature
mana={1}{BR}{BR}{BR} mana={1}{BR}{BR}{BR}
power=4 power=4
@@ -58,7 +46,6 @@ power=2
subtype=Kithkin Wizard subtype=Kithkin Wizard
toughness=2 toughness=2
[/card] [/card]
[card] [card]
text=Target creature gets +2/+2 until end of turn. Conspire (As you play this spell, you may tap two untapped creatures you control that share a color with it. When you do, copy it and you may choose a new target for the copy.) text=Target creature gets +2/+2 until end of turn. Conspire (As you play this spell, you may tap two untapped creatures you control that share a color with it. When you do, copy it and you may choose a new target for the copy.)
id=158772 id=158772
@@ -344,6 +331,8 @@ mana={1}{B}
[card] [card]
text=You may put a green creature card from your hand into play. text=You may put a green creature card from your hand into play.
id=154003 id=154003
target=creature[green]|myhand
auto=moveto(inplay)
name=Dramatic Entrance name=Dramatic Entrance
rarity=R rarity=R
type=Instant type=Instant
@@ -361,6 +350,7 @@ mana={UB}
text=Drove of Elves's power and toughness are each equal to the number of green permanents you control. Drove of Elves can't be the target of spells or abilities your opponents control. text=Drove of Elves's power and toughness are each equal to the number of green permanents you control. Drove of Elves can't be the target of spells or abilities your opponents control.
id=157878 id=157878
name=Drove of Elves name=Drove of Elves
auto=foreach(*[green]|myinplay) 1/1
rarity=U rarity=U
type=Creature type=Creature
mana={3}{G} mana={3}{G}
@@ -407,15 +397,6 @@ rarity=C
type=Artifact type=Artifact
mana={2} mana={2}
[/card] [/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
name=Ember Gale
rarity=C
type=Sorcery
mana={3}{R}
[/card]
[card] [card]
text=Whenever you play a black spell, Emberstrike Duo gets +1/+1 until end of turn. Whenever you play a red spell, Emberstrike Duo gains first strike until end of turn. text=Whenever you play a black spell, Emberstrike Duo gets +1/+1 until end of turn. Whenever you play a red spell, Emberstrike Duo gains first strike until end of turn.
id=153307 id=153307
+2 -2
View File
@@ -2633,10 +2633,10 @@ class AStasis:public ActivatedAbility{
class ADeplete:public TargetAbility{ class ADeplete:public TargetAbility{
public: public:
int nbcards; int nbcards;
ADeplete(int _id, MTGCardInstance * card, ManaCost * _cost, int _nbcards,TargetChooser * _tc = NULL, int _tap = 1):TargetAbility(_id,card, _tc, _cost,0,_tap){ ADeplete(int _id, MTGCardInstance * card, ManaCost * _cost, int _nbcards = 1,TargetChooser * _tc = NULL, int _tap = 1):TargetAbility(_id,card, _tc, _cost,0,_tap){
if (!tc) tc= NEW PlayerTargetChooser(card); if (!tc) tc= NEW PlayerTargetChooser(card);
nbcards = _nbcards;
} }
int resolve(){ int resolve(){
Player * player = tc->getNextPlayerTarget(); Player * player = tc->getNextPlayerTarget();
if (!player) return 0; if (!player) return 0;
+34 -5
View File
@@ -649,6 +649,35 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
continue; continue;
} }
//Deplete
found = s.find("deplete:");
if (found != string::npos){
unsigned int start = s.find(":",found);
unsigned int end = s.find(" ",start);
int nbcards;
if (end != string::npos){
nbcards = atoi(s.substr(start+1,end-start-1).c_str());
}else{
nbcards = atoi(s.substr(start+1).c_str());
}
if (dryMode){
dryModeResult = BAKA_EFFECT_BAD;
break;
}
if (trigger){
//TODO ?
}else{
if (tc){
game->addObserver (NEW ADeplete(id,card,cost,nbcards,tc,doTap));
}else{
//todo
}
}
result++;
continue;
}
//Discard //Discard
found = s.find("discard:"); found = s.find("discard:");
if (found != string::npos){ if (found != string::npos){
@@ -1127,11 +1156,11 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
game->addObserver(NEW ARegularLifeModifierAura(_id+2, card, card, Constants::MTG_PHASE_DRAW, -1, 1)); game->addObserver(NEW ARegularLifeModifierAura(_id+2, card, card, Constants::MTG_PHASE_DRAW, -1, 1));
break; break;
} }
case 1126:// Millstone //case 1126:// Millstone
{ // {
game->addObserver( NEW AMillstone(_id ,card)); // game->addObserver( NEW AMillstone(_id ,card));
break; // break;
} // }
case 1215: //Power Leak case 1215: //Power Leak
{ {
game->addObserver( NEW APowerLeak(_id ,card, card->target)); game->addObserver( NEW APowerLeak(_id ,card, card->target));