It is currently 25 Apr 2024, 19:26
   
Text Size

[still bugge]Dragon Broodmother crash & AI bad use of devour

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

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

[still bugge]Dragon Broodmother crash & AI bad use of devour

Postby Aswan jaguar » 17 Feb 2016, 17:03

Describe the Bug:
1- In this case AI's Dragon Broodmother in my upkeep produces dump error and then crashes to windows.(I played a lot with and against it without problems)
bad parameters | Open
get_card_instance(-1, -1)
0: 0x024294C4
1: 0x023E29B5
2: 0x023FA2CC
3: 0x02314A48
4: 0x02314BD6
5: 0x0236BC0C
6: 0x02434CD5
7: 0x023ED6CD
8: 0x023ED717
9: 0x023EDDBE
10: 0x0241AA95
11: 0x0241AB85
12: 0x0242EA89
13: 0x0201085C
14: 0x02434CD5
15: 0x023ED6CD
16: 0x023EDC2F
17: 0x0240B7BE
18: 0x0240B80E
19: 0x0201080A
20: 0x02434CD5
21: 0x023ED6CD
22: 0x023EE1DE
23: 0x023EE491
24: 0x004367C3
25: 0x023EE6EA
26: 0x004766DC
27: 0x023ED8EB
28: 0x023EDFB7
29: 0x023E942A

2016-02-14_133312dragonmothr.jpg

2- AI seems to be compelled to use devour and so when it has only 1 creature the Dragon Broodmother itself devours it to feed the token which is 99,9 times bad move.
Which card did behave improperly ?
Dragon Broodmother

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
Manalink 2016/01/15: Battle For Zendikar v2,duel

What exactly should be the correct behavior/interaction ?


Are any other cards possibly affected by this bug ?
-
Attachments
dra.rar
(7.29 KiB) Downloaded 200 times
Last edited by BAgate on 19 Aug 2016, 10:14, edited 3 times in total.
Reason: still bugged
---
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: Dragon Broodmother crash & AI bad use of devour

Postby Aswan jaguar » 17 Feb 2016, 17:18

Another bug is that Dragon Broodmother 's token enters as a 5/5 before devour triggers and so it triggers Elemental Bond.The same bug happens for Dragon Egg token but not for Brood Keeper dragon token.
Attachments
elemental bond-token of dragon broodmother.rar
(2.58 KiB) Downloaded 210 times
---
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]Dragon Broodmother crash & AI bad use of devo

Postby Gargaroz » 18 Apr 2016, 14:44

Don't know about the first bug (too much time has passed), but the second is due to bad data in "ct_all.csv": all tokens should have their P/T set to "16384" AKA "asterisk / variable P/T". Fixed in dev.
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: [confirmed]Dragon Broodmother crash & AI bad use of devo

Postby Korath » 18 Apr 2016, 18:23

Now anything making a dragon token immediately crashes, because card_dragon_token doesn't verify that it has a valid card instance or a relevant event before invoking its devour or pump hacks, and neither are true when computing variable power and toughness.

Even if it didn't, though, I'd expect that to just make all the Dragon tokens with power 3 or greater not trigger Elemental Bond. Sarkhan Unbroken would be a handy example. Plus, everything that relied on Dragon token's default power and toughness being 5 is broken: Look Skyward and Despair, Death by Dragons, Dragon Roost, Shiv, Sarkhan the Mad, Day of the Dragons, Dragonmaster Outcast that I can find.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: [confirmed]Dragon Broodmother crash & AI bad use of devo

Postby Gargaroz » 18 Apr 2016, 19:29

I remember having a part of the code that prevent these kind of problems by presuming a set of "classic" characteristics for each type of tokens (Dragon was 5/5, flying and red). I can't find it now, why it was removed? I know each card should be fixed individually, but in the meantime...
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: [confirmed]Dragon Broodmother crash & AI bad use of devo

Postby Korath » 18 Apr 2016, 19:49

Because it caused more problems than it fixed, and once the actual problem that it was put in to work around was fixed properly in commit 4561b71, all of the hardcoded values became redundant.

Also, if you change the power/toughness at runtime, then having the default at */* doesn't change anything. Elemental Bond is still triggering for the 1/1 dragon tokens here.
Last edited by Korath on 18 Apr 2016, 20:11, 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]Dragon Broodmother crash & AI bad use of devo

Postby Gargaroz » 18 Apr 2016, 20:10

Oh, I see, so how should I fix the interaction with Elemental Bond?

In the meantime, fixed the Devour problem you mentioned for Broodmother Dragon and the "undefinition" problems for: Look Skyward and Despair (into "set_scheme_in_motion"), Dragon Roost, Shiv (plane), Sarkhan the Mad and Dragonmaster Outcast, which were the only remained that used the old "generate_token_by_id" with only CARD_ID_DRAGON.
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: [confirmed]Dragon Broodmother crash & AI bad use of devo

Postby Korath » 18 Apr 2016, 20:12

What's happening is that Elemental Bond is seeing the unaltered values for power - previously 5, now 16384. I suspect it's because the power's getting recomputed while the token's flagged as phased-out, and it isn't reflagged KEYWORD_RECALC_POWER between when it phases in and when TRIGGER_COMES_INTO_PLAY is run.

Probably all the KEYWORD_RECALC_* bits should be set immediately before etb triggers are run. I'll experiment some.

---

Yup, get_card_instance(player, card)->regen_status |= KEYWORD_RECALC_ALL; before both dispatches of TRIGGER_COMES_INTO_PLAY (in engine.c and play_spell_for_free.c) fixes it. I'll check whether the executable still dispatches this trigger later tonight, though I think they've all been moved into C.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: [confirmed]Dragon Broodmother crash & AI bad use of devo

Postby Korath » 21 Apr 2016, 00:56

And committed in fc9eb02.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: [still bugge]Dragon Broodmother crash & AI bad use of de

Postby BAgate » 19 Aug 2016, 10:15

No crash, and good interaction with Elemental Bond, but AI still will devour Dragon Broodmother itself if that is the only creature.
Working on: housekeeping and archived reports
User avatar
BAgate
Tester
 
Posts: 2444
Joined: 06 Mar 2012, 11:09
Has thanked: 117 times
Been thanked: 158 times


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 62 guests


Who is online

In total there are 62 users online :: 0 registered, 0 hidden and 62 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 62 guests

Login Form