Page 1 of 1

[confirmed]Shirei doesn't reanimate more than 1 &

PostPosted: 20 Feb 2020, 20:02
by drool66
Describe the Bug:
Shirei, Shizo's Caretaker 's ability has no discernible effect.

Which card did behave improperly?
Shirei, Shizo's Caretaker

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?
Crits with power <= 1 are reanimated at EOT if Shirei is still on the BF at that time

Are any other cards possibly affected by this bug?
-

Re: [confirmed]Shirei doesn't reanimate

PostPosted: 25 Mar 2020, 20:26
by drool66
Had the wrong function mapped to it (Of all cards, Zealots en-Dal was mapped to it - the other card that I've been working on). After correcting that, the dialog and legacy are created at creature death, but the creatures are still not reanimated. csvid's do seem to be correctly stored in instance->targets[i].player (through Shirei's code), just not reanimating. Problem seems to be with reanimate_csvids_at_eot_legacy (functions.c, line ~16150) Working on getting the targeting params & bracketing right; so far I have:
Code: Select all
int reanimate_csvids_at_eot_legacy(int player, int card, event_t event){

   if( eot_trigger(player, card, event) ){
      int gfc_flag = check_battlefield_for_id(ANYBODY, CARD_ID_GRAFDIGGERS_CAGE);
      card_instance_t *instance = get_card_instance(player, card);
      int i;
      for(i=2; i<18; i++){
         if( instance->targets[i].player > -1 ){
            if( ! is_what(-1, instance->targets[i].player, TYPE_CREATURE) || ! gfc_flag ){
               int result = seek_grave_for_id_to_reanimate(player, card, instance->targets[i].player, instance->targets[i].card, instance->targets[1].player);
               if( result != -1 ){
                  remove_card_from_grave(player, result);
                  int card_added = add_card_to_hand(player, instance->targets[i].player);
                  set_special_flags3(player, card_added, SF3_REANIMATED);
                  put_into_play(player, card_added);
               }
            }
            instance->targets[i].player = -1;
         }
         else{
            break;
         }
      }
      kill_card(player, card, KILL_EXILE);
   }

   return 0;
}

Re: [fixed]Shirei doesn't reanimate

PostPosted: 27 Mar 2020, 02:22
by drool66
Fixed in a1b389184 ("Fix Shirei Shizo's Caretaker...")

Re: [fixed]Shirei doesn't reanimate

PostPosted: 27 Mar 2020, 12:42
by Aswan jaguar
Now there are two remaining issues:
1- Shirei, Shizo's Caretaker triggers only for one of the creatures that die( if more than 1 with power 1 or less dies).
2- Doesn't trigger if a creature with power 1 or less dies under opponent's control.
Relevant rules for 2nd bug:
12/7/2018 Shirei’s ability triggers if a creature you own with power 1 or less dies under another player’s control.

Re: [fixed]Shirei doesn't reanimate

PostPosted: 28 Mar 2020, 20:49
by drool66
I've looked into it, but I'm not sure if either will work with the current implementation of the card. I have however fixed the annoying behavior of asking about all creatures that have died so far this turn every time another one dies.
I'm going to table these two bugs for now.