Page 1 of 1

Zealots en-Dal doesn't work correctly with colorless cards

PostPosted: 17 Mar 2020, 21:41
by Aswan jaguar
Describe the Bug:
Zealots en-Dal was gaining life at controllers upkeep without any restrictions. I have fixed the colored part so it won't trigger if controller has any colored non-land permanent card but white.
However everything I tried to make so it works also with colorless cards has failed. I can possibly make it work with non white artifacts, too but still not enough.
Current code:
Code: Select all
int card_zealots_en_dal(int player, int card, event_t event){
/*
Zealots en-Dal |3|W   0x200f516
Creature — Human Soldier 2/4
At the beginning of your upkeep, if all nonland permanents you control are white, you gain 1 life.
*/

   test_definition_t this_test;
   default_test_definition(&this_test, TYPE_LAND);
   this_test.type_flag = 1;

   test_definition_t this_test2;
   default_test_definition(&this_test2, TYPE_PERMANENT);
   this_test2.color = get_sleighted_color_test(player, card, COLOR_TEST_BLACK | COLOR_TEST_BLUE | COLOR_TEST_RED | COLOR_TEST_GREEN);

    upkeep_trigger_ability(player, card, event, player);

    if( event == EVENT_UPKEEP_TRIGGER_ABILITY ){
            if( check_battlefield_for_special_card(player, card, player, 0, &this_test) &&
                check_battlefield_for_special_card(player, card, player, 0, &this_test2)
              ){
               return 0;
            }
            else{
                 gain_life(player, 1);
            }
   }

   return 0;
}
Which card did behave improperly?
Zealots en-Dal

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

What exactly should be the correct behavior/interaction?
Zealots en-Dal triggers only if you have white non land permanents in play.

Are any other cards possibly affected by this bug?
-