Card-Forge / forge

An unofficial rules engine for the world's greatest card game.
https://card-forge.github.io/forge/
GNU General Public License v3.0
993 stars 566 forks source link

AI prefers to attack with Stoneforge Mystic/Elvish Piper rather than activating their ability #4022

Open MorihiroS opened 1 year ago

MorihiroS commented 1 year ago

Describe the bug AI prefers to attack with creatures with activated ability "tap: put card on the battlefield" rather than activating its ability if doesn't have any big creatures on the battlefield:

To Reproduce Steps to reproduce the behavior:

  1. AI casts Stoneforge Mystic and finds Kaldra Compleat
  2. Player doesn't have any big creatures on the battlefield, he passes the turn
  3. AI attacks with its Stoneforge Mystic

and

  1. AI has Elvish Piper without summoning sickness and untapped Forest on the battlefield and Iona, Shield of Emeria in hands
  2. Player doesn't have any big creatures on the battlefield
  3. AI attacks with its Elvish Piper

Expected behavior AI should activate Stoneforge Mystic's/Elvish Piper's ability as often as possible, priority should be higher

Desktop OS: Windows 10 Java Version: 1.8.0_202-b08 Forge Version: 1.6.59-SNAPSHOT-10.28 - 1.6.64-SNAPSHOT-08.02

Screenshots

mystic1 mystic2 mystic3 mystic4 elv

MorihiroS commented 11 months ago

@Hanmac, @Agetian, still doesn't work (1.6.59-SNAPSHOT-11.25), need re-open and fix

stoneforge

github-actions[bot] commented 10 months ago

This issue has not been updated in a while and has now been marked as stale. Stale messages will be auto closed.

MorihiroS commented 3 months ago

It's just as relevant for Elvish Piper:

elv

Hanmac commented 3 months ago

@Agetian i think the crux there is that for the Activated Ability, it checks that it should activate them in MainPhase2 ? (maybe it should activate them in MainPhase1 in case the Creature might have Haste?)

And/Or we need a Check for "Should this Creature Attack?", and AI should remember "Wait, I want to Activate an Ability for This In MainPhase2" (we could use some AIMemory for this?)

Except if the Attack would be lethal of course