- Fix a bug with Nevinyrrals Disk
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-04-05 13:22:37 +00:00
parent a68478dcca
commit a8942331eb
8 changed files with 84 additions and 17 deletions

View File

@@ -1364,17 +1364,7 @@ power=3
subtype=Lizard
toughness=3
[/card]
[card]
text=Steelclad Serpent can't attack unless you control another artifact.
id=175009
name=Steelclad Serpent
rarity=C
type=Artifact Creature
mana={5}{U}
power=4
subtype=Serpent
toughness=5
[/card]
[card]
text=Flying, vigilance Players can't untap more than one creature during their untap steps.
id=175396

View File

@@ -0,0 +1,16 @@
#Bug: Nevinyrral<61>fs Disk: Destroys creatures, enchantments and artifacts as soon as it comes into play
[INIT]
FIRSTMAIN
[PLAYER1]
hand:Nevinyrral's Disk
inplay:black vise
manapool:{4}
[PLAYER2]
[DO]
Nevinyrral's Disk
[ASSERT]
FIRSTMAIN
[PLAYER1]
inplay:black vise,Nevinyrral's Disk
[PLAYER2]
[END]

View File

@@ -0,0 +1,29 @@
#
[INIT]
FIRSTMAIN
[PLAYER1]
hand:Nevinyrral's Disk
inplay:black vise,swamp
manapool:{4}
[PLAYER2]
inplay:obsianus golem
[DO]
Nevinyrral's Disk
eot
eot
next
#upkeep
next
#draw
next
#firstmain
swamp
Nevinyrral's Disk
[ASSERT]
FIRSTMAIN
[PLAYER1]
graveyard:black vise,Nevinyrral's Disk
inplay:swamp
[PLAYER2]
graveyard:obsianus golem
[END]

View File

@@ -76,6 +76,8 @@ living_lands.txt
lord_of_the_pit.txt
lord_of_the_pit2.txt
nantuko_husk.txt
Nevinyrrals_Disk.txt
Nevinyrrals_Disk2.txt
nightmare.txt
Nyxathid.txt
orcish_lumberjack.txt

View File

@@ -292,6 +292,28 @@ class ACopier:public TargetAbility{
};
//All Destroyer. TargetAbility
class AAllDestroyer:public ActivatedAbility{
public:
int bury;
AAllDestroyer(int _id, MTGCardInstance * _source, TargetChooser * _tc, int _bury = 0, ManaCost * _cost=NULL,int doTap =1):ActivatedAbility(_id,_source,_cost,0,doTap),bury(_bury){
tc = _tc;
}
int resolve(){
AbilityFactory af;
af.destroyAllInPlay(tc,bury);
return 1;
}
const char * getMenuText(){
return "Destroy All...";
}
};
//Destroyer. TargetAbility
class ADestroyer:public TargetAbility{
public:

View File

@@ -220,13 +220,13 @@ class GenericTriggeredAbility:public TriggeredAbility{
class AbilityFactory{
private:
int countCards(TargetChooser * tc, Player * player = NULL, int option = 0);
int destroyAllInPlay(TargetChooser * tc, int bury = 0);
int putInPlayFromZone(MTGCardInstance * card, MTGGameZone * zone, Player * p);
int parsePowerToughness(string s, int *power, int *toughness);
Trigger * parseTrigger(string magicText);
Damageable * parseCollateralTarget(MTGCardInstance * card, string s);
public:
int magicText(int id, Spell * spell, MTGCardInstance * card = NULL);
int destroyAllInPlay(TargetChooser * tc, int bury = 0);
void addAbilities(int _id, Spell * spell);
};

View File

@@ -5,7 +5,7 @@
#include "../include/GameOptions.h"
#include "../include/GameApp.h"
static const char* GAME_VERSION = "WTH?! 0.5.1 - by WilLoW";
static const char* GAME_VERSION = "WTH?! 0.6.0 - by WilLoW";
#define ALPHA_WARNING 0
#define DEFAULT_ANGLE_MULTIPLIER 0.4

View File

@@ -375,8 +375,12 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
if (myNbCards < opponentNbCards || myCardsPower < opponentCardsPower) return BAKA_EFFECT_GOOD;
return BAKA_EFFECT_BAD;
}else{
this->destroyAllInPlay(targetAll,1);
delete targetAll;
if (cost){
game->addObserver(NEW AAllDestroyer(id, card,targetAll,1,cost,doTap));
}else{
this->destroyAllInPlay(targetAll,1);
delete targetAll;
}
}
}else{
if (dryMode) return BAKA_EFFECT_BAD;
@@ -410,8 +414,12 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
if (myNbCards < opponentNbCards || myCardsPower < opponentCardsPower) return BAKA_EFFECT_GOOD;
return BAKA_EFFECT_BAD;
}else{
this->destroyAllInPlay(targetAll);
delete targetAll;
if (cost){
game->addObserver(NEW AAllDestroyer(id, card,targetAll,0,cost,doTap));
}else{
this->destroyAllInPlay(targetAll);
delete targetAll;
}
}
}else{
if (dryMode) return BAKA_EFFECT_BAD;