magefree / magefree/mage

AI: add support for choosing ability to cast for free

Open
#6,168 0 comments 0 reactions 0 assignees View on GitHub
AI enhancement
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):
![shot_200110_202951](https://user-images.githubusercontent.com/8344157/72169136-f9d26a80-33e7-11ea-8a33-67c7c86f50d1.png)

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):
![shot_200110_202122](https://user-images.githubusercontent.com/8344157/72168592-e2df4880-33e6-11ea-96ae-28520e6f4812.png)

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.