Card-Forge / Card-Forge/forge

Trigger Warning: AI (Artificial Ignoramus)

Open
#8,906 2 comments 1 reaction 2 assignees Claimed by @Agetian View on GitHub
AI keep
Dominant language
Java
Stars
2.7k
Forks
1.1k
Avg merge
1d 1h
Merged PRs (30d)
158

Description

**Describe the bug**
AI will cast O-ring-like (Oblivion Ring being the precedent) spells heedless of wards. I've noticed the AI is pretty good about reserving the costs for wards w/ other spells, but it isn't so careful when it comes to triggered effects. I've seen this happen where the AI casts Makeshift Binding into my single disguised (undisguised??) creature; w/out 2 spare mana, the trigger of the enchant fizzles. Most recently (& which prompted me to make this issue), AI cast Stormplain Detainment & chose my Eshki Dragonclaw as the target despite my also controlling an Iceridge Serpent. The O-ring failed since AI didn't have a spare mana for the ward, but it could've chosen my unwarded Serpent & actually gotten some value for its spell.

**To Reproduce**
Carefully observe the Artificial Ignoramus in its natural habitat for an extended period of time.

**Expected behavior**
I imagine if the logic for spell targeting were copy-pasted as regards triggered effects this issue might disappear. It's probably not simply the O-ring family of spells which is affected here; I surmise this issue crops up anytime there are triggered effects needing targets & those targets having ward(s).

On further thought, the issue is probably more complicated than copy-pasting; AI needs to "look ahead" a little when casting the original spell in order to make the determination on how/whether to pay for ward(s). In the case where I have a single warded creature, the triggered targeted ability would fail if the simple copy-paste were implemented; only 1 target could be selected. In the case where I have multiple creatures, the copy-paste solution would @ least allow AI to select an unwarded creature if it can't meet the ward cost for its 1st pick.

1 other thing also occurs to me: does AI reserve ward cost(s) when casting uncounterable spells?? This isn't a completely separate issue, but it seems like something which practically never would have a thread created for it. Probably fine to leave as-is if the AI does do this but wouldn't it be nice if the AI were more ruthless (he asked as AI ["other" AI] was in the process of subsuming his culture)??

**Desktop (please complete the following information):**
- OS: Win 10
- 10.04 snap

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.