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
[/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.)
abilities=first strike
id=134753
@@ -1305,8 +1319,8 @@ toughness=1
[card]
text={2}, {T}: Target player puts the top two cards of his or her library into his or her graveyard.
id=129643
alias=1126
name=Millstone
auto={2}{T}:deplete:2 target(player)
rarity=R
color=Artifact
type=Artifact
-12
View File
@@ -29,18 +29,6 @@ type=Sorcery
mana={2}{B}{B}
[/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.
id=129710
name=Angelic Chorus
+9
View File
@@ -955,6 +955,15 @@ mana={4}
type=Artifact
[/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
id=5585
abilities=haste
-32
View File
@@ -2520,38 +2520,6 @@ type=Artifact
mana={3}
[/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.
id=48586
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.
id=1126
name=Millstone
auto={2}{T}:deplete:2 target(player)
rarity=R
type=Artifact
mana={2}
+22
View File
@@ -1,4 +1,16 @@
[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.
target=creature
auto=foreach(plains|myinplay) 1/1
@@ -223,6 +235,16 @@ 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
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.
auto=foreach(*[blue]|myinplay) 1/1
abilities=flying
+5 -24
View File
@@ -22,25 +22,13 @@ rarity=C
type=Instant
mana={B}
[/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]
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
name=Ashenmoor Liege
rarity=R
auto=lord(creature[black]|myinplay) 1/1
auto=lord(creature[red]|myinplay) 1/1
type=Creature
mana={1}{BR}{BR}{BR}
power=4
@@ -58,7 +46,6 @@ power=2
subtype=Kithkin Wizard
toughness=2
[/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.)
id=158772
@@ -344,6 +331,8 @@ mana={1}{B}
[card]
text=You may put a green creature card from your hand into play.
id=154003
target=creature[green]|myhand
auto=moveto(inplay)
name=Dramatic Entrance
rarity=R
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.
id=157878
name=Drove of Elves
auto=foreach(*[green]|myinplay) 1/1
rarity=U
type=Creature
mana={3}{G}
@@ -407,15 +397,6 @@ rarity=C
type=Artifact
mana={2}
[/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]
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
+2 -2
View File
@@ -2633,10 +2633,10 @@ class AStasis:public ActivatedAbility{
class ADeplete:public TargetAbility{
public:
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);
nbcards = _nbcards;
}
int resolve(){
Player * player = tc->getNextPlayerTarget();
if (!player) return 0;
+34 -5
View File
@@ -649,6 +649,35 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
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
found = s.find("discard:");
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));
break;
}
case 1126:// Millstone
{
game->addObserver( NEW AMillstone(_id ,card));
break;
}
//case 1126:// Millstone
// {
// game->addObserver( NEW AMillstone(_id ,card));
// break;
// }
case 1215: //Power Leak
{
game->addObserver( NEW APowerLeak(_id ,card, card->target));