Laurent - Update to the foreach parser with "add" to be used for instant and sorcery (e.g. spoil of evil) also removed/added corresponding cards (spoil of evil, song of the damned and ancestor chosen).

Also added the ability "INDESTRUCTIBLE" did not test it yet + not sure about the ruling ...
This commit is contained in:
wagic.laurent
2009-06-30 21:29:59 +00:00
parent 6c335232c7
commit 01316167fc
7 changed files with 30 additions and 35 deletions
+3 -5
View File
@@ -3719,13 +3719,12 @@ class AAngelicChorus: public ListMaintainerAbility{
class ALifeModifierPutinplay: public ListMaintainerAbility{
public:
int init;
char type[20];
int life;
int PlayerTarget;
int AddOrRemove;
ALifeModifierPutinplay(int id, MTGCardInstance * _source,const char * _type, int _life, int _PlayerTarget, int _AddOrRemove):ListMaintainerAbility(id, _source){
sprintf(type,"%s",_type);
ALifeModifierPutinplay(int id, MTGCardInstance * _source,TargetChooser * _tc, int _life, int _PlayerTarget, int _AddOrRemove):ListMaintainerAbility(id, _source){
init = 0;
tc = _tc;
PlayerTarget = _PlayerTarget;
AddOrRemove = _AddOrRemove;
life = _life;
@@ -3737,7 +3736,7 @@ class ALifeModifierPutinplay: public ListMaintainerAbility{
}
int canBeInList(MTGCardInstance * card){
if (card->hasType(type) && game->isInPlay(card)) return 1;
if (tc->canTarget(card)) return 1;
return 0;
}
@@ -3803,7 +3802,6 @@ class ALifeModifierPutinplay: public ListMaintainerAbility{
virtual ostream& toString(ostream& out) const
{
out << "ALifeModifierPutinplay ::: init : " << init
<< " ; type : " << type
<< " ; life : " << life
<< " ; PlayerTarget : " << PlayerTarget
<< " ; AddOrRemove : " << AddOrRemove