AI: add support for choosing ability to cast for free
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
Current `chooseAbilityForCast` return default spell all the time (e.g. it try to cast basic spell, not alternative):

Example problem: `Jeleva, Nephalia's Scourge` -- it can cause infinite choose (AI chooses first spell to cast, but can't -- maybe that ability have additional cost to cast -- and repeat it again and again):

TODO:
* [ ] add support to select ability without additional cost first on "no mana";
* [ ] add support to select most valuableable ability first (with biggest playable cost?);
* [ ] AI can't play adventure spell for free too?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the AI's chooseAbilityForCast entry point and reproduce the Jeleva, Nephalia's Scourge case with no available mana. Compare the available abilities and their additional costs, then verify that the AI can choose a free or playable alternative without repeating an unplayable choice. Done means the listed no-mana and free adventure-spell cases no longer loop or fail to select an eligible ability.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100