It is currently 23 Apr 2024, 08:07
   
Text Size

[confirm]AI ignores its blocking creatures' EVENT_POW_BOOST

Report wrong Card behavior to get it fixed.
PLEASE ADD SAVEGAMES TO YOUR TOPIC !

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

[confirm]AI ignores its blocking creatures' EVENT_POW_BOOST

Postby Korath » 20 Jun 2017, 09:07

Describe the bug:
The AI will not block my (4/4) Tahngarth, Talruum Hero with a Wildfire Emissary when it has four untapped Mountains (which makes the emissary report itself as pumpable to 4/4). It will block if it has no Mountains but two copies of Legion's Initiative (which make it continuously 4/4).

Which card behaved improperly?
ai_assign_blockers(), or one of its primary subfunctions: ai_speculate_on_combat() (still in the executable at 0x4af6f0), or sub_4B1A50() (also still in the executable; this function's purpose seems to be to translate the combat math from ai_speculate_on_combat() into actual blocking choices).

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Dev 4d5f02b.

What exactly should be the correct behavior/interaction?
A creature that reports itself as pumpable to a given power/toughness should have the same combat math as a creature that already has that power/toughness.

Are any other cards possibly affected by this bug?
It's not an error from the translation to C, since I first found this in Shandalar (which still uses the executable's version). And it's not a missing-but-desirable feature, since I see code that certainly tries to account for the pumpability.

I don't know if the same happens with EVENT_TOU_BOOST (as used by things like Granite Gargoyle), EVENT_CHECK_PUMP (as used by things like Stromkirk Condemned or Giant Growth), or EVENT_CHECK_ABILITIES. (That's unused in Manalink, unless release still uses the exe versions of Rainbow Knights, Emerald Dragonfly, Noble Panther, or the four Fallen Empires/Ice Age pump knights - I'm pretty sure it doesn't - and the exe cards didn't use this to report power/toughness changes anyway, despite the combat AI expecting it to.)

EVENT_TOU_BOOST is definitely broken in Shandalar, since the AI will block a (2/2) Balduvian Bears with its (2/2, pumps to 4/4) Giant Badger but not a (3/3) Hill Giant. That's not useful in Manalink, though, since its version of Giant Badger doesn't report its pump ability to the combat AI anyway.

It's not a matter of Tahngarth, Talruum Hero's activated ability, either; neither the Manalink or Shandalar versions includes that in the explicit combat math, and I didn't have mana free to activate it during my tests so there's no question of the primary AI accounting for it.
Last edited by Korath on 20 Jun 2017, 14:42, edited 2 times in total.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: confirmed]AI ignores its blocking creatures' EVENT_POW_B

Postby Aswan jaguar » 20 Jun 2017, 14:41

In your above scenario:
Magic.exe and (I guess the same goes for shandalar.exe if it checks also those values) if you insert value to ct_all "activate before blockers" then it is read by AI block computation and will happily block Tahngarth, Talruum Hero.
It will pump before it blocks.
If it isn't pumped before blockers are assigned maybe because it is tapped and then you untap it(forced by me to untap - tested also with a Twiddle in AI's hand - AI didn't untap to block then) it will not block.

About AI - Giant Badger not original moks Manalink.2.0 or later versions with all values in ct_all inserted worked for AI as I have tested in the past.If I am not wrong it didn't work for microprose original versions, too.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8078
Joined: 13 May 2010, 12:17
Has thanked: 730 times
Been thanked: 458 times

Re: confirmed]AI ignores its blocking creatures' EVENT_POW_B

Postby Korath » 20 Jun 2017, 14:46

Aswan jaguar wrote:In your above scenario:
Magic.exe and (I guess the same goes for shandalar.exe if it checks also those values) if you insert value to ct_all "activate before blockers" then it is read by AI block computation and will happily block Tahngarth, Talruum Hero.
It will pump before it blocks.
This is a variant of my test with Legion's Initiative - when the AI makes blocking choices, the creature's already 4/4. Flagging it to activate before blockers breaks its behavior while attacking. Currently, it'll happily attack with multiple pumpable creatures, and only pump the correct ones after you commit to blocking.

There's an explanation of the different AI systems in this bug. The one breaking here is the combat AI, which I describe in the second paragraph. The one you convinced to do something by changing when to consider activating the Emissary is the general AI described in the third.
Aswan jaguar wrote:About AI - Giant Badger not original moks Manalink.2.0 or later versions with all values in ct_all inserted worked for AI as I have tested in the past.If I am not wrong it didn't work for microprose original versions, too.
This is correct, the MicroProse version has no combat math either. (Maybe specifically because of this issue.) The "Inflatable Power" and "Inflatable Toughness" columns in ct_all.csv just tell the combat AI to send EVENT_POW_BOOST and EVENT_TOU_BOOST to a card; the card still has to respond to them to tell the combat AI whether it can pump and how much.

My results with Giant Badger should be duplicable in Manalink with Zof Shade.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: [confirm]AI ignores its blocking creatures' EVENT_POW_BO

Postby Aswan jaguar » 29 Mar 2021, 15:29

Korath wrote:I don't know if the same happens with EVENT_TOU_BOOST (as used by things like Granite Gargoyle),
The same for EVENT_TOU_BOOST AI ignores its blocking creatures gain that.
Korath wrote:EVENT_CHECK_PUMP (as used by things like Stromkirk Condemned or Giant Growth), or EVENT_CHECK_ABILITIES
AI takes into consideration these for its blocking creatures, too. Soul Kiss uses now EVENT_CHECK_ABILITIES in manalink3.0.

I tried with EVENT_CHECK_ABILITIES for creatures that boost own abilities and seems to work great in all cases I tested with Chub Toad. Could there be an issue my tests didn't reveal to use this instead of EVENT_POW_BOOST and EVENT_TOU_BOOST?

Code: Select all
   if( event == EVENT_CHECK_ABILITIES && affect_me(player, card) ){
       EXE_DWORD(0x739b50) += 2; // power boost
       EXE_DWORD(0x7A371C) += 2; // toughness boost
   }
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8078
Joined: 13 May 2010, 12:17
Has thanked: 730 times
Been thanked: 458 times


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 29 guests


Who is online

In total there are 29 users online :: 0 registered, 0 hidden and 29 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 29 guests

Login Form