Card-Forge / Card-Forge/forge

Better Ai for CounterPutEffect Targets

Open
#8,783 2 comments 0 reactions 2 assignees Assigned to @Hanmac View on GitHub
AI Game Mechanics keep
Dominant language
Java
Stars
2.7k
Forks
1.1k
Avg merge
1d 1h
Merged PRs (30d)
158

Description

https://github.com/Card-Forge/forge/blob/c10b5706f1bc79a8b9475c22cd73cacd68005e5b/forge-ai/src/main/java/forge/ai/ability/CountersPutAi.java#L452-L458

Imo the Targets are calculated wrong ...

First, it should reset targets.
Then it should call: `getValidCardsToTarget` to get the base line of targets
https://github.com/Card-Forge/forge/blob/c10b5706f1bc79a8b9475c22cd73cacd68005e5b/forge-game/src/main/java/forge/game/card/CardUtil.java#L365

then it should call `ComputerUtil.filterAITgts` that should fix #8665

but only if the filterAI list is empty (or the Param doesn't exist) it should fall back to the base logic of `chooseCursedTarget` and `chooseBoonTarget`

and maybe the logic for "don't sacrifice yourself" in between

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.