Skip to content

Improve death-drain creature evaluation#11115

Open
Rauglothgor wants to merge 2 commits into
Card-Forge:masterfrom
Rauglothgor:ai-death-trigger-target-priority-4171
Open

Improve death-drain creature evaluation#11115
Rauglothgor wants to merge 2 commits into
Card-Forge:masterfrom
Rauglothgor:ai-death-trigger-target-priority-4171

Conversation

@Rauglothgor

Copy link
Copy Markdown
Contributor

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:

  • move from battlefield to graveyard,
  • include Other in ValidCard, and
  • execute a LoseLife ability.

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 compile
  • Build succeeded with 0 checkstyle violations.

Known 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.

continue;
}
final SpellAbility ab = t.ensureAbility();
if (ab != null && ApiType.LoseLife.equals(ab.getApi())) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI would rather kill Serrated Scorpion than Zulaport Cutthroat/Blood Artist

2 participants