mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Merge branch 'master' into 'master'
Improved CopySpellAbilityAI on spells affecting multiple cards (e.g. mass removal). See merge request core-developers/forge!1152
This commit is contained in:
@@ -69,6 +69,12 @@ public class CopySpellAbilityAi extends SpellAbilityAi {
|
||||
} else if (top.getApi() == ApiType.CopySpellAbility) {
|
||||
// Don't try to copy a copy ability, too complex for the AI to handle
|
||||
return false;
|
||||
} else if (top.getApi() == ApiType.DestroyAll || top.getApi() == ApiType.SacrificeAll || top.getApi() == ApiType.ChangeZoneAll || top.getApi() == ApiType.TapAll || top.getApi() == ApiType.UnattachAll) {
|
||||
if (!top.usesTargeting() || top.getActivatingPlayer().equals(aiPlayer)) {
|
||||
// If we activated a mass removal / mass tap / mass bounce / etc. spell, or if the opponent activated it but
|
||||
// it can't be retargeted, no reason to copy this spell since it'll probably do the same thing and is useless as a copy
|
||||
return false;
|
||||
}
|
||||
} else if (top.hasParam("ConditionManaSpent")) {
|
||||
// Mana spent is not copied, so these spells generally do nothing when copied.
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user