Avoid AI wheel effects into draw punishers#10945
Open
Rauglothgor wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a narrow AI heuristic for voluntary wheel-style mass draw effects when an opponent already controls an active draw-punisher or draw-conversion permanent.
The change is intentionally scoped to wheel execution paths instead of the global playability chain:
DiscardAifor discard-then-draw wheels such as Wheel of Fortune style effectsChangeZoneAllAifor Timetwister-style shuffle/draw effectsComputerUtilCardhelper that estimates large self-draws and checks active battlefield draw-punisher triggersIt avoids the broader simulator/caching direction from #10559 and the high-level
AiControllerhook concern discussed on #10576.Behavior
The AI now declines large voluntary mass-draw lines when an opponent's battlefield has an active trigger that materially punishes or converts the AI drawing cards, such as damage/life-loss draw punishers or token conversion.
The AI still allows the line when the draw is small, no active opponent draw-punisher exists, or the AI's own draw-punisher damage appears immediately lethal.
Validation
Passed locally with temporary WSL Maven/JDK tooling:
Observed result:
BUILD SUCCESS, with 0 checkstyle violations.Notes
No tests are included here. This is meant to stay as a small upstream review slice after recent maintainer feedback about avoiding test-only wiring for AI heuristics unless the test catches a meaningful integration regression.