It is currently 16 Apr 2024, 05:38
   
Text Size

[fixed]Avatar of Discord bad selection

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

[fixed]Avatar of Discord bad selection

Postby Aswan jaguar » 25 Aug 2016, 08:39

Describe the Bug:
I cast Avatar of Discord I discarded a card but then in hand (in panel to choose from not actual hand as the cards were in actual hand)there were missing 2 cards instead of the the 1 I discarded.Another time after the first card I discarded 3 were missing.This doesn't happen all the time as I cast it without a problem other times.

Which card did behave improperly ?
Avatar of Discord

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

What exactly should be the correct behavior/interaction ?
Avatar of Discord when you discard a card only that card gets removed from hand prompt window.

Are any other cards possibly affected by this bug ?
-
Attachments
avatar of discord discard panel after 1st pick limits.rar
(3.31 KiB) Downloaded 205 times
Last edited by Aswan jaguar on 10 Aug 2020, 17:40, edited 4 times in total.
Reason: fixed
---
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]Avatar of Discord bad selection

Postby BAgate » 25 Aug 2016, 09:26

To state more clearly, after you select a card to discard more than one disappear from the selection box. The correct cards are discarded.
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

Re: [confirmed]Avatar of Discord bad selection

Postby Gargaroz » 19 Sep 2016, 17:28

The new implementation of 'discard_card' was a bit buggy, it was recently fixed so consider also this fixed until further notice.
----
- 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: [still bug]Avatar of Discord bad selection

Postby Aswan jaguar » 20 Apr 2018, 13:46

Still the same bug. I have some more info to help this time. It seems that the 1st card you choose to be discarded, together with the 2 cards with the biggest in game ids will be removed from the selection panel when you get to choose a 2nd card to be discarded. If there is only 1 card or none card with bigger in game id then only the 1 card will be missing or none will be missing retrospectively.
The discarded cards are correct they are ones you have chosen to discard.
---
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: [still bug]Avatar of Discord bad selection

Postby FastEddie » 10 Aug 2020, 16:24

Simple issue once you got the hang of it... which took me 2 hours. The counter for player's cards was decremented inside the loop shifting the hand back one card to overwrite the removed card, effectively halving your hand after the removed card. I removed one loop shifting the hand as it is only needed after choosing the first card.

The diff looks worse than it is as I also fixed the formatting.

Code: Select all
   if( event == EVENT_ETB_ABILITY ){
      int kill_me = 1;
      if( hand_count[player] > 1 ){
         int p_hand[2][hand_count[player]];
         int pc = 0; // player cards
         int discarded[2];
         int dc = 0; // cards to discard
         int count = 0;
         while( count < active_cards_count[player] ){
            if( in_hand(player, count) ){
               p_hand[0][pc] = get_original_internal_card_id(player, count);
               p_hand[1][pc] = count;
               pc++;
            }
            count++;
         }
      
         test_definition_t this_test;
         new_default_test_definition(&this_test, TYPE_ANY, "Select a card to discard.");
         while( dc < 2 ){
            int selected = select_card_from_zone(player, player, p_hand[0], pc, 0, AI_MIN_VALUE, -1, &this_test);
            if( selected != -1 ){
               discarded[dc] = p_hand[1][selected];
               dc++;               
               // Need this only once, hand is not shown after second choice
               if (dc == 1 ) {
                  for(count = selected; count < pc; count++){
                     p_hand[0][count] = p_hand[0][count+1];
                     p_hand[1][count] = p_hand[1][count+1];
                  }
                  pc--; // <-- this was inside the loop
               }
            }
            else{
               break;
            }
         }
         if( dc == 2 ){
            discard_card(player, discarded[0]);
            discard_card(player, discarded[1]);
            kill_me = 0;
         }
      }
      if( kill_me ){
         kill_card(player, card, KILL_SACRIFICE );
      }
   }
Attachments
dissension.zip
(818 Bytes) Downloaded 128 times
---
Argivian Archaeologist in the Library of Leng studying the Spells of the Ancients
User avatar
FastEddie
 
Posts: 246
Joined: 24 Dec 2019, 10:59
Has thanked: 15 times
Been thanked: 19 times

Re: [still bug]Avatar of Discord bad selection

Postby Aswan jaguar » 10 Aug 2020, 17:40

Inserted above fix in commit 3c07db2. Thanks, FastEddie. =D>
FastEddie wrote:Simple issue once you got the hang of it... which took me 2 hours.
I totally feel you. I can't even estimate you how much time and frustration such bugs have cost me. :(
---
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 Archived Reports

Who is online

Users browsing this forum: No registered users and 96 guests


Who is online

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

Login Form