Fixed the "oneshot" parameter introduced in rev2155.

This commit is contained in:
solo81@web.de
2010-08-08 22:06:46 +00:00
parent 47c9ad1b65
commit ab88dfcda9

View File

@@ -434,6 +434,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
}
MTGAbility * result = NULL;
int oneShot = 0;
found = s.find(" oneshot");
if (found !=string::npos) oneShot = 1;
if (activated) oneShot = 1;
if (card->hasType("sorcery") || card->hasType("instant")) oneShot = 1;
if (a->oneShot) oneShot = 1;
@@ -499,6 +501,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
}
MTGAbility * result = NULL;
int oneShot = 0;
found = s.find(" oneshot");
if (found !=string::npos) oneShot = 1;
if (activated) oneShot = 1;
if (card->hasType("sorcery") || card->hasType("instant")) oneShot = 1;
if (i == 3) oneShot = 1;
@@ -516,9 +520,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
found = s.find(" <");
if (found !=string::npos) maxi = atoi(s.substr(found+2,1).c_str());
found = s.find(" oneshot");
if (found !=string::npos) oneShot = 1;
switch(i){
case 0: result = NEW ALord(id, card, lordTargets, lordIncludeSelf, a); break;
case 1: result = NEW AForeach(id, card, _target,lordTargets, lordIncludeSelf, a,mini,maxi); break;