Page 1 of 1

[fixed]Dragon Tempest 1st no trigger for non-dragon fliers

PostPosted: 24 Jan 2018, 18:49
by Aswan jaguar
Describe the Bug:
Dragon Tempest first ability doesn't trigger for non dragon flying creatures.

Which card did behave improperly?
Dragon Tempest

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?
Dragon Tempest first ability triggers for all creatures with flying not only dragons.

Are any other cards possibly affected by this bug?
-

Re: Dragon Tempest 1st no trigger for non-dragon fliers

PostPosted: 01 May 2019, 14:12
by Aswan jaguar
Fixed in commit e25404c9.

Re: [fixed]Dragon Tempest 1st no trigger for non-dragon flie

PostPosted: 02 May 2019, 14:38
by Aswan jaguar
I bugged it differently and worse as it didn't gave haste to dragon fliers.
The original code with no haste to non dragon fliers, any tips:
| Open
Code: Select all
int card_dragon_tempest(int player, int card, event_t event)
{
   /* Dragon Tempest   |1|R   0x200db0d
    * Enchantment
    * Whenever a creature with flying enters the battlefield under your control, it gains haste until end of turn.
    * Whenever a Dragon enters the battlefield under your control, it deals X damage to any target, where X is the number of Dragons you control. */
   if( trigger_condition == TRIGGER_COMES_INTO_PLAY && affect_me(player, card) && trigger_cause_controller == player )
   {
      int mode = 0;

      test_definition_t test;
      default_test_definition(&test, TYPE_CREATURE);
      test.keyword = KEYWORD_FLYING;
      if( new_make_test_in_play(trigger_cause_controller, trigger_cause, -1, &test) ){
         mode |= 1;
      }

      default_test_definition(&test, TYPE_PERMANENT);
      test.subtype = SUBTYPE_DRAGON;
      if( new_make_test_in_play(trigger_cause_controller, trigger_cause, -1, &test) ){
         mode |= 2;
      }

      if( mode ){
         get_card_instance(player, card)->info_slot = mode;
         etb_ability_global(player, event, RESOLVE_TRIGGER_MANDATORY, 0, &test, player, card);
      }
   }
   if( event == EVENT_ETB_ABILITY ){
      card_instance_t *instance = get_card_instance(player, card);
      if( instance->info_slot & 1 ){
         pump_ability_until_eot(player, card, trigger_cause_controller, trigger_cause, 0, 0, 0, SP_KEYWORD_HASTE);
      }
      if( instance->info_slot & 2 ){
         target_definition_t td;
         default_target_definition(player, card, &td, TYPE_CREATURE|TARGET_TYPE_PLANESWALKER);
         td.zone = TARGET_ZONE_CREATURE_OR_PLAYER;

         if( can_target(&td) && pick_target(&td, "TARGET_ANY"))
         {
            damage_target0(player, card, count_subtype(player, TYPE_PERMANENT, SUBTYPE_DRAGON));
         }
         instance->number_of_targets = 0;
      }
    }
   
   return global_enchantment(player, card, event);
}

Re: Dragon Tempest 1st no trigger for non-dragon fliers

PostPosted: 15 Sep 2019, 16:44
by Aswan jaguar
Fixed correctly this time in commit b9853ada.