fixed last check in. Test suite passes. Added comments on possible null pointer exceptions.

Updated XCode project file to include AIPlayerBaka classes.
Added test suite to iOS build
This commit is contained in:
techdragon.nguyen@gmail.com
2011-10-09 05:51:45 +00:00
parent 2bfe76e124
commit 6f10ef8425
16 changed files with 75 additions and 60 deletions

View File

@@ -727,11 +727,17 @@ bool TargetChooser::canTarget(Targetable * target,bool withoutProtections)
tempcard = tempcard->previous;
}
}
if(source && ((source->hasSubtype(Subtypes::TYPE_AURA) || source->hasSubtype(Subtypes::TYPE_EQUIPMENT)) && source->target && source->target == card && source->target->isPhased && targetter->target == card))
return true;
{
return true;
}
//this is kinda cheating but by default we let auras and equipments always continue to target a phased creature.
else if(card->isPhased)
return false;
else if (card && card->isPhased)
{
return false;
}
if (source && targetter && card->isInPlay(observer) && !withoutProtections)
{
if (card->has(Constants::SHROUD)) return false;