fixed a crash witnessed when ai was trying to get the efficiency return of aamover the ai had a target, but the ability did not have a target, when "destinationZone()" was run, the game would crash due to a null pointer.
increase the "random" chance to use unknown, the old method almost always returned 0.
This commit is contained in:
@@ -1603,7 +1603,7 @@ AAMover::AAMover(int _id, MTGCardInstance * _source, MTGCardInstance * _target,
|
||||
target = _target;
|
||||
}
|
||||
|
||||
MTGGameZone * AAMover::destinationZone()
|
||||
MTGGameZone * AAMover::destinationZone(Targetable * target)
|
||||
{
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
return MTGGameZone::stringToZone(destination, source, _target);
|
||||
@@ -1619,7 +1619,7 @@ int AAMover::resolve()
|
||||
{
|
||||
GameObserver * g = GameObserver::GetInstance();
|
||||
MTGGameZone * fromZone = _target->getCurrentZone();
|
||||
MTGGameZone * destZone = destinationZone();
|
||||
MTGGameZone * destZone = destinationZone(target);
|
||||
|
||||
//inplay is a special zone !
|
||||
for (int i = 0; i < 2; i++)
|
||||
|
||||
Reference in New Issue
Block a user