Page 1 of 1

[fixed]Saheeli Rai 3nd can fetch cards with same name

PostPosted: 11 Sep 2017, 21:29
by drool66
Describe the Bug:
Saheeli Rai:
  • The first ability damages her controller instead of opponent
  • When there are no vaild targets for the second ability, the first ability is unavailable (grayed out) and the second ability is available
  • The third ability can fetch artifacts with the same name, though the prompt correctly asks to find artifacts with different names

Which card did behave improperly?
Saheeli Rai

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

What exactly should be the correct behavior/interaction?
  • First ability pings opponent
  • Second ability is unavailable if there are no valid targets (ie. crit or artifact controlled by Saheeli's controller)
  • Third ability enforces "with different names"

Are any other cards possibly affected by this bug?
No

Re: [confirmed]Saheeli Rai - all abilities

PostPosted: 21 Jun 2018, 11:55
by Aswan jaguar
Another bug is that Saheeli Rai 's 3nd ability can fetch any 3 cards (lands and instants) tested but pretty sure it affects all others, too instead of only artifacts.

Re: [confirmed]Saheeli Rai - all abilities

PostPosted: 27 Jun 2019, 17:55
by Aswan jaguar
Fixed all in commit 0c80cfb7 except 3nd ability which can still fetch cards with the same name.

Re: [confirmed]Saheeli Rai 3nd can fetch cards with same nam

PostPosted: 15 Aug 2020, 15:44
by FastEddie
The 3rd ability had the same issue as Three Dreams. See this thread:

https://www.slightlymagic.net/forum/viewtopic.php?f=86&t=29382&p=244839#p244839

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.

As the attached savegame didn't work properly (lots of cards with the same name but no Saheeli Rai) I created a new one, also attached.

This is the relevant code:

Code: Select all
      if( choice == CHOICE_THREE_ARTIFACTS ){
         int chosen[3] = {-1, -1, -1};

         test_definition_t test;
         //new_default_test_definition(&test, TYPE_ARTIFACT, "Select up to three artifact cards with different names.");
         default_test_definition(&test, TYPE_ARTIFACT);
         test.value_for_special_selection_function = (int)chosen;
         test.special_selection_function = test_not_in_array3;
         test.qty = 3;
         test.no_shuffle = 1;

         int num_chosen;
         for (num_chosen = 0; num_chosen < 3; ++num_chosen)
         {
            if (ai_is_speculating != 1){
               sprintf(test.message, "Select up to three artifact 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_CMC, -1, &test);
            chosen[num_chosen] = deck_ptr[player][pos];
            if(pos == -1)
               break;
            remove_card_from_deck(player, pos);
            add_card_to_hand(player, chosen[num_chosen]);
         }
         shuffle(player);
      }

Re: [confirmed]Saheeli Rai 3nd can fetch cards with same nam

PostPosted: 16 Aug 2020, 12:19
by Aswan jaguar
Inserted above fix in commit 137ee29. Nice Job FastEddie. =D>