Improve death-drain creature evaluation#11115
Conversation
| continue; | ||
| } | ||
| final SpellAbility ab = t.ensureAbility(); | ||
| if (ab != null && ApiType.LoseLife.equals(ab.getApi())) { |
There was a problem hiding this comment.
a lot of these AI issues are lacking consideration for the bigger picture:
in this case limiting it to the one observed API seems pretty arbitrary since the same argument could easily apply to all others too
but while usually somewhat rarer those triggers could potentially also be a downside for the controller instead (at least partially) 🤔
So I'm not sure this won't lead to too many false positives...
There was a problem hiding this comment.
Good point. I narrowed this so it no longer scores every dies-triggered LoseLife ability: it now requires the repeatable Other death trigger, outward-facing life loss (Defined opponent or player/opponent target), and a GainLife subability. That keeps it limited to the Zulaport/Blood Artist/Cruel Celebrant pattern from #4171 and avoids self-loss/downside triggers. Validated with mvn -pl forge-ai -am -DskipTests compile.
Problem
When choosing creature removal targets, the AI can prefer a one-shot death trigger such as Serrated Scorpion over repeatable death-drain engines such as Zulaport Cutthroat, Blood Artist, and Cruel Celebrant.
Fixes #4171.
Minimal Fix
Creature evaluation now adds a small value bump for dies triggers that:
OtherinValidCard, andLoseLifeability.This keeps self-only death triggers such as Serrated Scorpion from receiving the same repeatable-engine value.
Validation
JAVA_HOME=/home/rauglothgor/.local/codex-tools/jdk17 /home/rauglothgor/.local/codex-tools/apache-maven-3.9.9/bin/mvn -pl forge-ai -am -DskipTests compileKnown Limits
This is not a general trigger evaluator. It only covers the narrow repeatable death-drain case described in the issue.
AI Assistance Disclosure
I used AI assistance to inspect the issue, trace the target-evaluation path, make the narrow change, and run validation. I reviewed the final diff and validation before opening this PR.