Fixed Flamerush Rider, added battleready option to "clone with" keyword.

This commit is contained in:
Vittorio Alfieri
2021-01-28 15:56:15 +01:00
parent 024e015dfc
commit b35e503a0f
4 changed files with 13 additions and 4 deletions
+7
View File
@@ -5153,6 +5153,7 @@ AACloner::AACloner(GameObserver* observer, int _id, MTGCardInstance * _source, M
target = _target;
source = _source;
options = optionsList;
battleReady = (abilitiesStringList.find("battleready") != string::npos)?true:false;
if (abilitiesStringList.size() > 0)
{
PopulateAbilityIndexVector(awith, abilitiesStringList);
@@ -5265,6 +5266,12 @@ int AACloner::resolve()
TokenandAbilityClone->addToGame();
}
}
if(battleReady)
{
spell->source->summoningSickness = 0;
spell->source->tap();
spell->source->setAttacker(1);
}
if(andAbility)
{
MTGAbility * andAbilityClone = andAbility->clone();
+3 -3
View File
@@ -938,7 +938,7 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card)
}
}
}
else if (s.find("sametypecreatures") != string::npos)//Count the greatest number creatures that share same subtype (creatures with changeling counts as +1 for all creature types)
else if (s.find("sametypecreatures") != string::npos)//Count the greatest number creatures that share same subtype
{
intValue = 0;
bool opponent = (s.find("oppsametypecreatures")!=string::npos)?true:false;
@@ -948,13 +948,13 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card)
list.push_back(0);
if(opponent){
for (int j = card->controller()->opponent()->game->inPlay->nb_cards - 1; j >= 0; --j){
if (card->controller()->opponent()->game->inPlay->cards[j]->hasType(values[i]) || card->controller()->opponent()->game->inPlay->cards[j]->has(Constants::CHANGELING)){
if (card->controller()->opponent()->game->inPlay->cards[j]->hasType(values[i])){
list[i]++;
}
}
} else {
for (int j = card->controller()->game->inPlay->nb_cards - 1; j >= 0; --j){
if (card->controller()->game->inPlay->cards[j]->hasType(values[i]) || card->controller()->game->inPlay->cards[j]->has(Constants::CHANGELING)){
if (card->controller()->game->inPlay->cards[j]->hasType(values[i])){
list[i]++;
}
}