Card-Forge / Card-Forge/forge

AI + Ward or similar Spell Counter Trigger

Open
#170 1 comment 0 reactions 1 assignee Claimed by @Agetian View on GitHub
AI keep
Dominant language
Java
Stars
2.7k
Forks
1.1k
Avg merge
1d 1h
Merged PRs (30d)
163

Description

Example:
* AI uses Damage Spell against my Sedgemoor Witch with `Ward—Pay 3 life.`
* Now the first Ward Trigger goes on the Stack.
* AI thinks that this is threatening and cast second Damage Spell because AI can.
* Now second Ward Trigger goes on the Stack.
* AI doesn't has another damage Spell and pays for the second Ward Trigger.
* My Creature dies.
* Now on the stack are the first damage spell (which would fizzle) and the first Ward Trigger (which does nothing)
* AI still does pay for the first Ward trigger even if it shouldn't.

Now AI need some extra Logic
* Before casting the First Spell it needs to check if it can pay the Ward cost. i noticed that sometimes it tries to cast something while not be able to pay for Ward.
* Then it needs to notice that the first Ward trigger isn't threatening, that it can still pay the cost. (or that the Spell can't be countered)
* If the Spell somehow would fizzle, don't pay for the Ward trigger (as in my example above)

For Would Fizzle, Magic Stack or similar should have a check method that checks if one of the targets would be invalid without altering the Targets. This is important for Checking when the target gains hexproof but loses it again before the spell resolves

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.