Page 1 of 1

[fixed]Teferi's Care wrong prompt

PostPosted: 29 Jun 2018, 15:24
by Aswan jaguar
Describe the Bug:
1- Teferi's Care 1st ability's prompt when you pay the cost is wrong "Select a card."
2- Teferi's Care 1st ability targets players and not enchantments (finds enchantments "illegal target (spell)." fixed
Which card did behave improperly?
Teferi's Care

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?
1- Teferi's Care 1st ability's prompt when you pay the cost should be "Select an enchantment card." or "Select an enchantment card to sacrifice."
2- Teferi's Care 1st ability targets players and not enchantments (finds enchantments "illegal target (spell)."
Are any other cards possibly affected by this bug?
-

Re: Teferi's Care wrong prompt & targets players

PostPosted: 29 Jun 2019, 13:33
by Aswan jaguar
Fixed only the targeting bug. I can't figure out how to fix the prompt-(sacrifice one) bug. I tried a couple of ways with no success.
Code from Arenson's Aura that Teferi's Care shares:
Code: Select all
int card_arensons_aura(int player, int card, event_t event){ //share code with Teferi's Care.
   /* Arenson's Aura   |2|W   0x2002D98
    * Enchantment
    * |W, Sacrifice an enchantment: Destroy target enchantment.
    * |3|U|U: Counter target enchantment spell. */

   if( ! IS_GAA_EVENT(event) ){
      return global_enchantment(player, card, event);
   }

   card_instance_t *instance = get_card_instance(player, card);

   target_definition_t td;
   counterspell_target_definition(player, card, &td, TYPE_ENCHANTMENT );

   target_definition_t td1;
   default_target_definition(player, card, &td1, TYPE_ENCHANTMENT );

   enum{
      CHOICE_SAC_AND_KILL_ENCHANTMENT = 1,
      CHOICE_COUNTER_ENCHANTMENT_SPELL
   };

   if(event == EVENT_CAN_ACTIVATE ){
      if( generic_activated_ability(player, card, event, GAA_SPELL_ON_STACK, MANACOST_XU(3, 2), 0, &td, NULL) ){
         return 99;
      }
      return generic_activated_ability_with_sacrifice_as_cost(player, card, event, GAA_CAN_TARGET, MANACOST_W(1), 0, &td1, NULL,
                                                TYPE_ENCHANTMENT, NULL, 0);
   }

   if(event == EVENT_ACTIVATE ){
      instance->info_slot = CHOICE_SAC_AND_KILL_ENCHANTMENT;
      if( generic_activated_ability(player, card, EVENT_CAN_ACTIVATE, GAA_SPELL_ON_STACK, MANACOST_XU(3, 2), 0, &td, NULL) ){
         instance->info_slot = CHOICE_COUNTER_ENCHANTMENT_SPELL;
         return generic_activated_ability(player, card, event, GAA_SPELL_ON_STACK, MANACOST_XU(3, 2), 0, &td, NULL);
      }
      return generic_activated_ability_with_sacrifice_as_cost(player, card, event, GAA_CAN_TARGET, MANACOST_W(1), 0, &td1, "TARGET_ENCHANTMENT",
                                                TYPE_ENCHANTMENT, NULL, 0);
   }

   if( event == EVENT_RESOLVE_ACTIVATION){
      if( instance->info_slot == CHOICE_SAC_AND_KILL_ENCHANTMENT && valid_target(&td1) ){
         kill_card(instance->targets[0].player, instance->targets[0].card, KILL_DESTROY);
      }
      if( instance->info_slot == CHOICE_COUNTER_ENCHANTMENT_SPELL ){
         if( counterspell_validate(player, card, &td, 0) ){
            real_counter_a_spell(instance->parent_controller, instance->parent_card,
                           instance->targets[0].player, instance->targets[0].card);
         }
      }
   }

   return 0;
}

Re: Teferi's Care wrong prompt

PostPosted: 03 Sep 2019, 06:47
by Aswan jaguar
Fixed in commit 36cf7b7c.