Fixed the "oneshot" parameter introduced in rev2155.
This commit is contained in:
@@ -434,6 +434,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
}
|
}
|
||||||
MTGAbility * result = NULL;
|
MTGAbility * result = NULL;
|
||||||
int oneShot = 0;
|
int oneShot = 0;
|
||||||
|
found = s.find(" oneshot");
|
||||||
|
if (found !=string::npos) oneShot = 1;
|
||||||
if (activated) oneShot = 1;
|
if (activated) oneShot = 1;
|
||||||
if (card->hasType("sorcery") || card->hasType("instant")) oneShot = 1;
|
if (card->hasType("sorcery") || card->hasType("instant")) oneShot = 1;
|
||||||
if (a->oneShot) oneShot = 1;
|
if (a->oneShot) oneShot = 1;
|
||||||
@@ -499,6 +501,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
}
|
}
|
||||||
MTGAbility * result = NULL;
|
MTGAbility * result = NULL;
|
||||||
int oneShot = 0;
|
int oneShot = 0;
|
||||||
|
found = s.find(" oneshot");
|
||||||
|
if (found !=string::npos) oneShot = 1;
|
||||||
if (activated) oneShot = 1;
|
if (activated) oneShot = 1;
|
||||||
if (card->hasType("sorcery") || card->hasType("instant")) oneShot = 1;
|
if (card->hasType("sorcery") || card->hasType("instant")) oneShot = 1;
|
||||||
if (i == 3) oneShot = 1;
|
if (i == 3) oneShot = 1;
|
||||||
@@ -516,9 +520,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
found = s.find(" <");
|
found = s.find(" <");
|
||||||
if (found !=string::npos) maxi = atoi(s.substr(found+2,1).c_str());
|
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){
|
switch(i){
|
||||||
case 0: result = NEW ALord(id, card, lordTargets, lordIncludeSelf, a); break;
|
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;
|
case 1: result = NEW AForeach(id, card, _target,lordTargets, lordIncludeSelf, a,mini,maxi); break;
|
||||||
|
|||||||
Reference in New Issue
Block a user