add "abilitycontroller" for dynamicability

for use inside ability$! dynamicability<who> !$ who
This commit is contained in:
Anthony Calosa
2016-08-26 11:23:52 +08:00
parent a93dd6586d
commit 2a1bacdfa4
3 changed files with 20 additions and 4 deletions
+8 -1
View File
@@ -3464,10 +3464,17 @@ int AADynamic::resolve()
tosrc = true;
break;
case DYNAMIC_ABILITY_WHO_SOURCECONTROLLER:
secondaryTarget = ((MTGCardInstance *) OriginalSrc)->controller();
secondaryTarget = OriginalSrc->controller();
break;
case DYNAMIC_ABILITY_WHO_SOURCEOPPONENT:
secondaryTarget = OriginalSrc->controller()->opponent();
case DYNAMIC_ABILITY_WHO_ABILITYCONTROLLER:
{
if(OriginalSrc->storedSourceCard)
secondaryTarget = OriginalSrc->storedSourceCard->controller();
else
secondaryTarget = OriginalSrc->controller();
}
break;
default:
break;
+2 -2
View File
@@ -77,10 +77,10 @@ const int kDynamicEffectIds[] = {
};
const string kDynamicWhoKeywords[] = {"eachother", "itself", "targetcontroller", "targetopponent", "tosrc", "srccontroller", "srcopponent" };
const string kDynamicWhoKeywords[] = {"eachother", "itself", "targetcontroller", "targetopponent", "tosrc", "srccontroller", "srcopponent" , "abilitycontroller" };
const int kDynamicWhoIds[] = {
AADynamic::DYNAMIC_ABILITY_WHO_EACHOTHER, AADynamic::DYNAMIC_ABILITY_WHO_ITSELF, AADynamic::DYNAMIC_ABILITY_WHO_TARGETCONTROLLER, AADynamic::DYNAMIC_ABILITY_WHO_TARGETOPPONENT,
AADynamic::DYNAMIC_ABILITY_WHO_TOSOURCE, AADynamic::DYNAMIC_ABILITY_WHO_SOURCECONTROLLER, AADynamic::DYNAMIC_ABILITY_WHO_SOURCEOPPONENT
AADynamic::DYNAMIC_ABILITY_WHO_TOSOURCE, AADynamic::DYNAMIC_ABILITY_WHO_SOURCECONTROLLER, AADynamic::DYNAMIC_ABILITY_WHO_SOURCEOPPONENT, AADynamic::DYNAMIC_ABILITY_WHO_ABILITYCONTROLLER
};
int MTGAbility::allowedToCast(MTGCardInstance * card,Player * player)