- Modified DeckManager class to not use a global instance anymore when used within the game engine
- Modified DuelLayers to not use a global MTGPhaseGame instance anymore - Moved the reset of currentActionCard out of the ActionLayer render function : that fixes the remaing problematic tests in the multithreaded testsuite - Added a method in ActionLayer converting a card ability into a menu index - Used this new method in the game observer to log correctly AI ability actions - Added a DumpAssert method in the game observer, it can be used to dump the game and assert in order to easy crash reproduction - Cleaned up TargetList properties access - Added an optimisation in GuiMana to not compute update code if the rendering is not used (multi-threaded mode) - Added a deadlock detection in the test AI vs AI multithreaded mode - Fixed minor bugs in test AI vs AI multithreaded mode - Added a games/second counter in the test AI vs AI rendering
This commit is contained in:
@@ -2834,7 +2834,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card, int
|
||||
a->canBeInterrupted = false;
|
||||
}
|
||||
|
||||
bool moreThanOneTarget = spell && spell->tc && spell->tc->targets.size() > 1;
|
||||
bool moreThanOneTarget = spell && spell->tc && spell->tc->getNbTargets() > 1;
|
||||
|
||||
if(moreThanOneTarget)
|
||||
a->target = spell->getNextTarget();
|
||||
@@ -2850,7 +2850,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card, int
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!aMay || (aMay && a->target == spell->tc->targets[0]))
|
||||
if(!aMay || (aMay && a->target == spell->tc->getNextTarget(0)))
|
||||
{
|
||||
MTGAbility * mClone = a->clone();
|
||||
mClone->addToGame();
|
||||
@@ -3990,7 +3990,7 @@ int TargetAbility::resolve()
|
||||
t = tc->getNextTarget(t);
|
||||
ability->target = t;
|
||||
}
|
||||
tc->targets.clear();
|
||||
tc->initTargets();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
@@ -4002,7 +4002,7 @@ int TargetAbility::resolve()
|
||||
t = tc->getNextTarget(t);
|
||||
ability->target = t;
|
||||
}
|
||||
tc->targets.clear();
|
||||
tc->initTargets();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user