Added/fixed primitives, updated the "missing_cards_by_sets" folder, improved all cards with replicate (now they use a special version of multikicker but they don't count as kicked spell), improved all cards with "fizzle" and "fizzleto" ability and improved engine for "fizzle" and "nofizzle" ability (e.g. now it's possible to grant a card the nofizzle ability on stack), added new keyword "mycolnum" to count the number colors of a card.
This commit is contained in:
@@ -1377,7 +1377,21 @@ void ActionStack::Fizzle(Interruptible * action, FizzleMode fizzleMode)
|
||||
spell->source->controller()->game->putInExile(spell->source);
|
||||
break;
|
||||
case PUT_IN_LIBRARY_TOP:
|
||||
spell->source->controller()->game->putInLibrary(spell->source);
|
||||
case PUT_IN_LIBRARY_BOTTOM:
|
||||
MTGCardInstance * _target = spell->source->controller()->game->putInLibrary(spell->source);
|
||||
if (_target && fizzleMode == PUT_IN_LIBRARY_BOTTOM){
|
||||
MTGLibrary * library = _target->owner->game->library;
|
||||
vector<MTGCardInstance *>oldOrder = library->cards;
|
||||
vector<MTGCardInstance *>newOrder;
|
||||
newOrder.push_back(_target);
|
||||
for(unsigned int k = 0;k < oldOrder.size();++k)
|
||||
{
|
||||
MTGCardInstance * rearranged = oldOrder[k];
|
||||
if(rearranged != _target)
|
||||
newOrder.push_back(rearranged);
|
||||
}
|
||||
library->cards = newOrder;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user