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 doesn't cast Invert Polarity #5897

Open MorihiroS opened 2 months ago

MorihiroS commented 2 months ago

Describe the bug AI doesn't cast Invert Polarity even if its single card, it has enough mana and player casts something

To Reproduce Steps to reproduce the behavior:

  1. AI has 2 untapped Islands and 2 untapped Mountains
  2. AI has only Invert Polarity in hands
  3. Player casts a creature with cmc 4
  4. AI doesn't cast Invert Polarity

Expected behavior AI should cast Invert Polarity for spells with 3+ cmc

Desktop OS: Windows 10 Java Version: 1.8.0_202-b08 Forge Version: 1.6.64-SNAPSHOT-08.04

Screenshots

inv2

MorihiroS commented 2 months ago

@Hanmac, need AI label, keep label and assign someone, please

Hanmac commented 2 months ago

@Agetian imo this one is a bit tricky, I mean, what would be the best target for this? Mostly Opponents Spells?

i think AI in general has problems with "assign new targets" spells

Agetian commented 2 months ago

Hmm yeah, most likely would need custom logic, prolly should check the SA for playability (if it's willing to play that spell and would have appropriate targets for it) and go for it if it wants to play the spell :)