It is currently 09 May 2021, 11:54
   
Text Size

[fixed]AI doesn't get that a creature can gain first strike.

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

[fixed]AI doesn't get that a creature can gain first strike.

Postby Aswan jaguar » 09 Sep 2016, 17:42

Describe the Bug:
AI doesn't get that Kessig Wolf,War-Spike Changeling,Order of the Ebon Hand,Emerald Dragonfly can gain first strike that is obvious when it decides to attack and defend,too.

Which card did behave improperly ?
AI-Kessig Wolf or AI-gain first in general

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
Manalink 2016/08/27: Eldritch Moon v2, duel

What exactly should be the correct behavior/interaction ?
AI gets that Kessig Wolf and others like it can gain first strike when there is mana to activate the ability.

Are any other cards possibly affected by this bug ?
-
Attachments
ai doesn't get kessig wolf can gain first strike.rar
(3.2 KiB) Downloaded 89 times
Last edited by Aswan jaguar on 28 Mar 2021, 18:06, edited 3 times in total.
Reason: fixed
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 7437
Joined: 13 May 2010, 12:17
Has thanked: 636 times
Been thanked: 345 times

Re: AI doesn't get that a creature can gain first strike.

Postby Korath » 09 Sep 2016, 19:22

The proper tool for this is EVENT_CHECK_ABILITIES; see comment next to it in defs.h (but be aware of Shandalar bug #826 - using this for evasion abilities is wonky).

General form is
Code: Select all
if (event == EVENT_CHECK_ABILITIES && affect_me(player, card) && generic_activated_ability(player, card, EVENT_CAN_ACTIVATE, /*costs*/))
  check_abilities_keywords |= KEYWORD_FIRST_STRIKE;
Needs two updates to setup_ai_combat_abilities() for the AI to recognize its own creatures can activate, but it's enough as-is for it to recognize that the human's can.
User avatar
Korath
DEVELOPER
 
Posts: 3520
Joined: 02 Jun 2013, 05:57
Has thanked: 490 times
Been thanked: 997 times

Re: [confi]AI doesn't get that a creature can gain first str

Postby Aswan jaguar » 28 Mar 2021, 09:25

Korath I have run some tests and noticed an issue I don't know if you are aware of it:
Let's say I have War-Spike Changeling and AI has also one or another creature with this ability and we both have mana to activate them.
If it is AI's turn and so AI attacks and has priority and I block AI will activate immediately to gain first strike.
If it is human's turn and AI blocks then human has the opportunity to activate first if I do then AI will never activate the ability in response. If I pass priority then AI will always activate the ability.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 7437
Joined: 13 May 2010, 12:17
Has thanked: 636 times
Been thanked: 345 times

Re: [confi]AI doesn't get that a creature can gain first str

Postby Aswan jaguar » 28 Mar 2021, 18:06

Fixed original bug for all these cards and all that do it for themselves in commit 613d003 ("Add EVENT_CHECK_ABILITIES for activate own first strike", 2021-03-28)
Except Stillmoon Cavalier which needs more work as it has 3 activated abilities.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 7437
Joined: 13 May 2010, 12:17
Has thanked: 636 times
Been thanked: 345 times


Return to Archived Reports

Who is online

Users browsing this forum: No registered users and 22 guests

cron

Who is online

In total there are 22 users online :: 0 registered, 0 hidden and 22 guests (based on users active over the past 10 minutes)
Most users ever online was 1371 on 09 Feb 2020, 16:22

Users browsing this forum: No registered users and 22 guests

Login Form