It is currently 24 Apr 2024, 08:06
   
Text Size

[fixed]Three Dreams can tutor cards with the same name

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

[fixed]Three Dreams can tutor cards with the same name

Postby drool66 » 21 Feb 2020, 21:52

Describe the Bug:
Three Dreams tutors three auras to the BF instead of to hand. Also, it does not enforce the "with different names" stipulation (although the prompt is correct).

Which card did behave improperly?
Three Dreams

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Manalink dev 0362fcdf version - duel

What exactly should be the correct behavior/interaction?
Three Dreams tutors three auras to hand instead of to the BF, and enforces that they have different names

Are any other cards possibly affected by this bug?
-
Attachments
ThreeDreams.zip
(3.13 KiB) Downloaded 251 times
Last edited by Aswan jaguar on 16 Aug 2020, 12:25, edited 2 times in total.
Reason: fixed
User avatar
drool66
Programmer
 
Posts: 1163
Joined: 25 Nov 2010, 22:38
Has thanked: 186 times
Been thanked: 267 times

Re: Three Dreams tutors to BF

Postby Aswan jaguar » 22 Feb 2020, 12:10

Fixed the tutor destination in commit 9e813f9.
The other bug is also true for Saheeli Rai posted here:
viewtopic.php?f=86&t=21113&p=237495&hilit=Saheeli+Rai#p218776
---
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]Three Dreams can tutor cards with the same na

Postby FastEddie » 15 Aug 2020, 15:41

new_global_tutor doesn't work properly when selecting same cards (or rather avoiding doing so). I have no clue why this is the case but using new_select_a_card and updating the array of chosen cards manually does the job.

I found four cards with such a mechanic, the other two worked (Gifts Ungiven and Uncage the Menagerie) because they use this workaround. To avoid further issues I added a comment to new_global_tutor just in case, diff is also attached.

This is the relevant code:

Code: Select all
   if (event == EVENT_RESOLVE_SPELL ){
      int chosen[3] = {-1, -1, -1};
      int num_chosen;

      test_definition_t test;
      default_test_definition(&test, TYPE_ENCHANTMENT);

      test.no_shuffle = 1;
      test.value_for_special_selection_function = (int)chosen;
      test.special_selection_function = test_not_in_array3;

      for (num_chosen = 0; num_chosen < 3; ++num_chosen){
         if (ai_is_speculating != 1){
            sprintf(test.message, "Select up to three Aura cards with different names. Card #%d of up to 3", num_chosen + 1);
         }
         
         int pos = new_select_a_card(player, player, TUTOR_FROM_DECK, 0, AI_MAX_VALUE, -1, &test);
         chosen[num_chosen] = deck_ptr[player][pos];
         if(pos == -1)
            break;
         chosen[num_chosen] = deck_ptr[player][pos];
         remove_card_from_deck(player, pos);
         add_card_to_hand(player, chosen[num_chosen]);
      }
      shuffle(player);

      kill_card(player, card, KILL_DESTROY);
   }
Attachments
tutors.zip
(571 Bytes) Downloaded 127 times
ravnica.zip
(831 Bytes) Downloaded 139 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: [confirmed]Three Dreams can tutor cards with the same na

Postby Aswan jaguar » 16 Aug 2020, 12:24

Inserted above fix in commit 90a088b. Thanks, FastEddie. :D
---
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 110 guests

cron

Who is online

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

Login Form