[confirmed]Display curse auras correctly see Koraths post
Report wrong Card behavior to get it fixed.
PLEASE ADD SAVEGAMES TO YOUR TOPIC !
PLEASE ADD SAVEGAMES TO YOUR TOPIC !
Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins
[confirmed]Display curse auras correctly see Koraths post
by Aswan jaguar » 10 Aug 2017, 17:04
Describe the Bug:
AI never played Reverse Damage in several games not even to save it from losing.fixed
Which card did behave improperly?
Reverse Damage AI part.
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?
Are any other cards possibly affected by this bug?
-
Which card did behave improperly?
Reverse Damage AI part.
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?
Are any other cards possibly affected by this bug?
-
Last edited by Aswan jaguar on 26 Dec 2019, 13:16, edited 3 times in total.
Reason: bug confirmed by Korath-rename to current issue
Reason: bug confirmed by Korath-rename to current issue
---
Trying to squash some bugs and playtesting.
Trying to squash some bugs and playtesting.
-
Aswan jaguar - Super Tester Elite
- Posts: 8078
- Joined: 13 May 2010, 12:17
- Has thanked: 730 times
- Been thanked: 458 times
Re: AI never plays Reverse Damage
by Korath » 11 Aug 2017, 06:30
default_target_definition() still defaults to preferring 1-who_chooses, right, Gargaroz? That'll be the problem here if so, and the same with anything else that can target damage to a player. Damage to a player is always created as controlled by that player, not by its actual controller; see whose_bf in damage_creature(). I suspect that was intentional, as a workaround for a bug that causes anything attached to a player be shown attached to the player it's controlled by, rather which player it's attached to.
Tangent:
The fix for that bug in Shandalar is in 63df3e7, as a change to functions moved out of Shandalar.exe in e4db35d. It should be sufficient to just change return_displayed_bitfield_of_1summonsick_2tapped_4attacking_8blocking_10damage_target_player_and_damage_target_card_20oublietted() directly, removing the inst->damage_target_card != -1 check in the 0x10 bit. The other functions looking at that bit are wndproc_AttackClass(), where it won't matter since players can't attack or block, and wndproc_TerritoryClass()'s WM_USER handler, which just checks the other player's territory if the card window's not found in the territory window it thinks it belongs in.
Then you can display Curse Auras as attached to players, whee. But there's still too many things that rely on damage_creature() (and so damage_player(), which just forwards to it) creating damage attached to the damaged player to safely change that.
Tangent:
The fix for that bug in Shandalar is in 63df3e7, as a change to functions moved out of Shandalar.exe in e4db35d. It should be sufficient to just change return_displayed_bitfield_of_1summonsick_2tapped_4attacking_8blocking_10damage_target_player_and_damage_target_card_20oublietted() directly, removing the inst->damage_target_card != -1 check in the 0x10 bit. The other functions looking at that bit are wndproc_AttackClass(), where it won't matter since players can't attack or block, and wndproc_TerritoryClass()'s WM_USER handler, which just checks the other player's territory if the card window's not found in the territory window it thinks it belongs in.
Then you can display Curse Auras as attached to players, whee. But there's still too many things that rely on damage_creature() (and so damage_player(), which just forwards to it) creating damage attached to the damaged player to safely change that.
-
Korath - DEVELOPER
- Posts: 3707
- Joined: 02 Jun 2013, 05:57
- Has thanked: 496 times
- Been thanked: 1106 times
Re: [confirmed]AI never plays Reverse Damage
by Korath » 17 Aug 2017, 07:52
Healer's Headdress as reported here almost certainly has the same cause.
A whole bunch of other duplicates can be found with
A whole bunch of other duplicates can be found with
- Code: Select all
git grep -PnH "\bextra\s*=\s*damage_card\b"
-
Korath - DEVELOPER
- Posts: 3707
- Joined: 02 Jun 2013, 05:57
- Has thanked: 496 times
- Been thanked: 1106 times
Re: [confirmed]AI never plays Reverse Damage
by Aswan jaguar » 25 Dec 2019, 12:00
I used force preferred_controller to ANYBODY there as I couldn't find how to use the "extra == damage_card" way you mention which I preferred to use because it seems not likely to cause issues. Please take a look I didn't mess things up. I tested the prevent damage targeting and everything seems fine with that for both AI and human but preferred_controller there is not only for prevent damage targeting right?
Fixed this in commit d12b4dde.
I will rename this and leave it open at least for the info Korath has for display Curse Auras.
Fixed this in commit d12b4dde.
I will rename this and leave it open at least for the info Korath has for display Curse Auras.
---
Trying to squash some bugs and playtesting.
Trying to squash some bugs and playtesting.
-
Aswan jaguar - Super Tester Elite
- Posts: 8078
- Joined: 13 May 2010, 12:17
- Has thanked: 730 times
- Been thanked: 458 times
Re: [confirmed]Display curse auras correctly see Koraths pos
by Aswan jaguar » 12 Jan 2020, 11:55
Well I did mess things up as I suspected i did.Aswan jaguar wrote:Please take a look I didn't mess things up. I tested the prevent damage targeting and everything seems fine with that for both AI and human but preferred_controller there is not only for prevent damage targeting right?
Fixed my screw up that made AI had no restrictions in which player it
targeted and followed better this time what Korath has suggested.
This time at least any screw up will be only in extra damage.
Committed in 4716b4ab.
---
Trying to squash some bugs and playtesting.
Trying to squash some bugs and playtesting.
-
Aswan jaguar - Super Tester Elite
- Posts: 8078
- Joined: 13 May 2010, 12:17
- Has thanked: 730 times
- Been thanked: 458 times
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 77 guests