Card-Forge / Card-Forge/forge

AI casts Welcome the Darkness for X=1, reducing itself to 1 life

Open
#11,708 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.7k
Forks
1.1k
Avg merge
1d 1h
Merged PRs (30d)
163

Description

Describe the bug

The AI casts Welcome the Darkness at its first opportunity with X=1, even when it has substantially more than 1 life.
Welcome the Darkness is an instant that costs {X}{B} and has the following effects:
- Draw X cards.
- Create an X/X black Demon creature token with flying.
- Set your life total to X.
- You cannot gain life for the rest of the game.

When the AI chooses X=1, it draws only one card, creates only a 1/1 flying Demon, and sets its life total to 1. This is an extremely poor play that leaves the AI vulnerable to almost any source of damage and nearly guarantees a loss.

To Reproduce

Steps to reproduce the behavior:
1. Start a game against an AI opponent whose deck contains Welcome the Darkness.
2. Allow the AI to draw Welcome the Darkness.
3. Wait until the AI has at least {1}{B} available.
4. Observe the AI cast Welcome the Darkness with X=1.
5. Observe that the AI’s life total becomes 1 and it creates only a 1/1 flying Demon.

Expected behavior

The AI should account for the life-total change when deciding whether to cast Welcome the Darkness and when choosing X.

It should generally avoid casting the spell for a low value such as X=1, especially when it has more than 1 life. The AI should normally wait until it can choose a sufficiently large X to make the resulting life total, card draw, and Demon token worthwhile. Casting it for a low X may be reasonable if the AI is already at that life total or has an exceptional tactical reason.

Desktop (please complete the following information):
- OS: Windows

Contributor guide

Open the contributing guide

Research direction

Search the Java AI decision logic and card implementation for Welcome the Darkness, then trace how the AI selects X and evaluates changes to its life total, draw, and token size. Reproduce the described game state and add coverage for avoiding X=1 when the AI has substantially more life, while preserving cases where a low X is tactically justified.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.