[fixed/closed]Malfegor
Moderators: BAgate, drool66, stassy, Aswan jaguar, gmzombie, CCGHQ Admins
[fixed/closed]Malfegor
by drool66 » 02 Aug 2013, 07:35
Describe the Bug:
Malfegor's discard ability forces you to discard even with no cards in hand
Which card did behave improperly ?
Malfegor
Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
July 2013 (EDH)
What exactly should be the correct behavior/interaction ?
You should discard until you have no cards in hand and the game should continue
Are any other cards possibly affected by this bug ?
If that part of the code was copypasted, then most likely.
Malfegor's discard ability forces you to discard even with no cards in hand
Which card did behave improperly ?
Malfegor
Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
July 2013 (EDH)
What exactly should be the correct behavior/interaction ?
You should discard until you have no cards in hand and the game should continue
Are any other cards possibly affected by this bug ?
If that part of the code was copypasted, then most likely.
Last edited by BAgate on 16 Jan 2014, 11:28, edited 4 times in total.
Reason: closed
Reason: closed
Re: Malfegor
by Gargaroz » 02 Aug 2013, 13:01
Usually, this kind of bug is linked to another card that wrongly alter the "hand_count[]" array. The code for Malfegor and "discard_all()" function seems fine. Try to reproduce the bug and keep track of the cards you played.
----
- 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
- 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: 7095
- Joined: 06 Nov 2009, 11:11
- Has thanked: 82 times
- Been thanked: 593 times
Re: [more info needed]Malfegor
by drool66 » 11 Aug 2013, 07:36
Same issue seems to come up. I've put it into play with Kaalia. Maybe it still "sees" itself in my hand since it wasn't cast?
- Attachments
-
Malfegor 2.zip- (4.6 KiB) Downloaded 80 times
Re: [more info needed]Malfegor
by Korath » 11 Aug 2013, 08:08
discard() checks for (instance->internal_card_id != -1 && !(instance->state & (STATE_INVISIBLE|STATE_IN_PLAY))) to see whether the random card it picked (from 0 to active_card_count[player]-1) is actually in player's hand. It might be feasible to add a debug option set in config.txt to do a manual count and compare that to hand_count[] periodically (every turn, every phase change, every time rules_engine() gets called) and pop up an error message if they differ.
Or we could make the rules engine card pop up each player's hand_count whenever you click on it, which might help track this and similar problems down.
Or we could make the rules engine card pop up each player's hand_count whenever you click on it, which might help track this and similar problems down.
-

Korath - DEVELOPER
- Posts: 3522
- Joined: 02 Jun 2013, 05:57
- Has thanked: 491 times
- Been thanked: 1037 times
Re: [more info needed]Malfegor
by Gargaroz » 11 Aug 2013, 12:19
Drool66, post you decklist here, I'll check the card codes.
----
- 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
- 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: 7095
- Joined: 06 Nov 2009, 11:11
- Has thanked: 82 times
- Been thanked: 593 times
Re: [more info needed]Malfegor
by drool66 » 11 Aug 2013, 19:45
Cool, thank you, Garagoz!
- Attachments
-
Kaalia's Minions.zip- (1.43 KiB) Downloaded 77 times
Re: [more info needed]Malfegor
by BAgate » 01 Dec 2013, 20:55
Korath, you did some similar work on a jace's archivist bug (http://www.slightlymagic.net/forum/viewtopic.php?f=110&t=11003&p=131399&hilit=jace#p131399). Are you still working on this, or do we consider it fixed?
Working on: housekeeping and archived reports
Re: [more info needed]Malfegor
by Korath » 02 Dec 2013, 17:53
At some point we moved nearly all the direct manipulation of hand_count[] into wrappers for the four or five functions that talk directly to the exe, instead of in the many hundreds of functions that call them (the change was committed on Sun Oct 13, so I think that makes PtT the first released patch with it); so hand_count errors should be much, much rarer now.
On the other hand, discard() could stand a bit of code to make sure there's at least one card in hand if it gets called anyway. While most things calling it from the exe check that themselves, not all do, so it wouldn't be sufficient just write it a front end for calls from C.
On yet a third hand, Malfegor itself calls discard_all() instead of discard() directly, so yes, it'll get caught by the safeguard I added for Jace's Archivist.
On the other hand, discard() could stand a bit of code to make sure there's at least one card in hand if it gets called anyway. While most things calling it from the exe check that themselves, not all do, so it wouldn't be sufficient just write it a front end for calls from C.
On yet a third hand, Malfegor itself calls discard_all() instead of discard() directly, so yes, it'll get caught by the safeguard I added for Jace's Archivist.
-

Korath - DEVELOPER
- Posts: 3522
- Joined: 02 Jun 2013, 05:57
- Has thanked: 491 times
- Been thanked: 1037 times
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: Bing [Bot] and 4 guests
