AI sacrifices a creature by triggering the Birthing Ritual and puts a legendary creature in play that was already on the battlefield

Open
#12,968 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
54/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
ai, game-dev

Research direction

Start by tracing the AI choice for Birthing Ritual: find where it evaluates eligible creatures among the top seven cards and checks legendary permanents already on the battlefield. Reproduce the reported end step with Ocelot Pride, Phelia, Exuberant Shepherd, and Birthing Ritual; done when the AI no longer chooses a second Phelia already represented on the battlefield.

Written by the indexing model from the issue text.

Description

Describe the bug
When the Birthing Ritual trigger resolves, the AI sacrifices a creature for 1 mana, looks 7 cards from the top of the deck, finds Phelia, Exuberant Shepherd, and puts it into play, even though it already had Phelia, Exuberant Shepherd on the battlefield.

To Reproduce
Steps to reproduce the behavior:

  1. AI has Ocelot Pride, Phelia, Exuberant Shepherd and Birthing Ritual on the battlefield.
  2. At the beginning of AI's end step Birthing Ritual triggers.
  3. AI looks at the top seven cards of your library and finds Phelia, Exuberant Shepherd.
  4. AI sacrifices Ocelot Pride and puts Phelia, Exuberant Shepherd on the battlefield.
  5. AI sacrifices old Phelia, Exuberant Shepherd

Expected behavior
AI shouldn't put another copy of a legendary creature that's already on the battlefield

Additional context
Actual for:

  • AI with FlatMC
  • AI without FlatMC

Desktop

  • OS: Windows 10
  • Version: 2.0.16-SNAPSHOT-11.18

Screenshots

AI with FlatMC

Ritual (FlatMC)

AI without FlatMC

Ritual (classic)
Dominant language
Java
Stars
2.7k
Forks
1.1k
Avg merge
19h 28m
Merged PRs (30d)
316

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Card-Forge/forge

All issues in Card-Forge/forge

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.