mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
AiController: checkETBEffects: make it better working with OverridingAbility (and use better getAbility function)
This commit is contained in:
@@ -247,22 +247,20 @@ public class AiController {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tr.getOverridingAbility() != null) {
|
|
||||||
// Abilities yet
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if trigger is not mandatory - no problem
|
// if trigger is not mandatory - no problem
|
||||||
if (params.get("OptionalDecider") != null && api == null) {
|
if (params.get("OptionalDecider") != null && api == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SpellAbility exSA = tr.getOverridingAbility();
|
||||||
|
|
||||||
|
if (exSA == null) {
|
||||||
// Maybe better considerations
|
// Maybe better considerations
|
||||||
final String execute = params.get("Execute");
|
if (!params.containsKey("Execute")) {
|
||||||
if (execute == null) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
final SpellAbility exSA = AbilityFactory.getAbility(card.getSVar(execute), card);
|
exSA = AbilityFactory.getAbility(card, params.get("Execute"));
|
||||||
|
}
|
||||||
|
|
||||||
if (api != null) {
|
if (api != null) {
|
||||||
if (exSA.getApi() != api) {
|
if (exSA.getApi() != api) {
|
||||||
|
|||||||
Reference in New Issue
Block a user