Added / fixed primitives from NEO set, improved Android downloader, updated missing cards by sets list, added SIR and SIS sets, updated card image url links, fixed MUL dat file, fixed a possible crash on "transforms" ability, added new trigger for ninjutsu ability, added new ability readytofight to set a creature tapped and attacking without being a ninja.
This commit is contained in:
@@ -7693,8 +7693,10 @@ ATransformer::ATransformer(GameObserver* observer, int id, MTGCardInstance * sou
|
||||
|
||||
int ATransformer::addToGame()
|
||||
{
|
||||
if(UYNT || UENT)
|
||||
if(UYNT || UENT){
|
||||
myCurrentTurn = game->turn;
|
||||
controllerId = source->controller()->getId();
|
||||
}
|
||||
MTGCardInstance * _target = NULL;
|
||||
Interruptible * action = (Interruptible *) target;
|
||||
if (action && action->type == ACTION_SPELL && action->state == NOT_RESOLVED)
|
||||
@@ -7901,13 +7903,13 @@ int ATransformer::addToGame()
|
||||
{
|
||||
if(UYNT)
|
||||
{
|
||||
if(myCurrentTurn != 1000 && game->turn > myCurrentTurn && source->controller()->getId() == game->currentPlayer->getId())
|
||||
if(myCurrentTurn != 1000 && game->turn > myCurrentTurn && controllerId == game->currentPlayer->getId())
|
||||
return 1;
|
||||
return 0; // Fixed an issue when the transformation with uynt is triggered by instant/sorcery or by card that left the battlefield before the ability ending turn.
|
||||
}
|
||||
else if(UENT)
|
||||
{
|
||||
if(myCurrentTurn != 1000 && game->turn > (myCurrentTurn + 1) && source->controller()->getId() != game->currentPlayer->getId())
|
||||
if(myCurrentTurn != 1000 && game->turn > (myCurrentTurn + 1) && controllerId != game->currentPlayer->getId())
|
||||
return 1;
|
||||
return 0; // Fixed an issue when the transformation with uent is triggered by instant/sorcery or by card that left the battlefield before the ability ending turn.
|
||||
}
|
||||
@@ -7973,7 +7975,7 @@ int ATransformer::destroy()
|
||||
for (unsigned int i = 0;i < newAbilities[_target].size(); i++)
|
||||
{
|
||||
// The mutated cards probably cause a double free error and a crash in Wagic, so for now they have been exluded...
|
||||
if(newAbilities[_target].at(i) && !_target->mutation && _target->currentZone != _target->owner->game->library)
|
||||
if(newAbilities[_target].at(i) && !_target->mutation && _target->currentZone != _target->owner->game->library && source->currentZone != NULL && source->name != "")
|
||||
{
|
||||
newAbilities[_target].at(i)->forceDestroy = 1;
|
||||
newAbilities[_target].at(i)->removeFromGame();
|
||||
|
||||
@@ -1591,6 +1591,10 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell
|
||||
if (TargetChooser * tc = parseSimpleTC(s, "scryed", card))
|
||||
return NEW TrCardScryed(observer, id, card, tc, once, limitOnceATurn);
|
||||
|
||||
//Ninjutsu has been performed from a card
|
||||
if (TargetChooser * tc = parseSimpleTC(s, "ninjutsued", card))
|
||||
return NEW TrCardNinja(observer, id, card, tc, once, limitOnceATurn);
|
||||
|
||||
//Esplores has been performed from a cardr
|
||||
if (TargetChooser * tc = parseSimpleTC(s, "explored", card))
|
||||
return NEW TrCardExplored(observer, id, card, tc, once, limitOnceATurn);
|
||||
@@ -3300,7 +3304,16 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
found = s.find("ninjutsu");
|
||||
if (found != string::npos)
|
||||
{
|
||||
MTGAbility * a = NEW ANinja(observer, id, card, target);
|
||||
MTGAbility * a = NEW ANinja(observer, id, card, target, true);
|
||||
a->oneShot = 1;
|
||||
return a;
|
||||
}
|
||||
|
||||
//readytofight
|
||||
found = s.find("readytofight");
|
||||
if (found != string::npos)
|
||||
{
|
||||
MTGAbility * a = NEW ANinja(observer, id, card, target, false);
|
||||
a->oneShot = 1;
|
||||
return a;
|
||||
}
|
||||
|
||||
@@ -362,6 +362,11 @@ WEventCardScryed::WEventCardScryed(MTGCardInstance * card) :
|
||||
{
|
||||
}
|
||||
|
||||
WEventCardNinja::WEventCardNinja(MTGCardInstance * card) :
|
||||
WEventCardUpdate(card)
|
||||
{
|
||||
}
|
||||
|
||||
WEventCardExplored::WEventCardExplored(MTGCardInstance * card) :
|
||||
WEventCardUpdate(card)
|
||||
{
|
||||
@@ -651,6 +656,12 @@ Targetable * WEventCardScryed::getTarget(int target)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventCardNinja::getTarget(int target)
|
||||
{
|
||||
if (target) return card;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventCardExplored::getTarget(int target)
|
||||
{
|
||||
if (target) return card;
|
||||
|
||||
Reference in New Issue
Block a user