Page 1 of 1

[fixed]Hidden Horror not good prompt.

PostPosted: 24 Mar 2017, 14:51
by Aswan jaguar
Describe the Bug:
Hidden Horror 's etb prompts "Select a card."

Which card did behave improperly?
Hidden Horror

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Manalink 2016/08/27: Eldritch Moon v2, duel

What exactly should be the correct behavior/interaction?
Hidden Horror 's etb prompts "Discard a creature card." or "Select a creature card to discard."

Are any other cards possibly affected by this bug?
-

Re: [confirmed]Hidden Horror not good prompt.

PostPosted: 22 Feb 2019, 16:17
by Aswan jaguar
The card has the code for a proper prompt in it's function but doesn't use it. I can't figure out why. I already tried too much to no avail.
| Open
static int generic_creature_with_discard_type_on_cip(int player, int card, event_t event, int selected_type){

etb_ability(player, card, event, RESOLVE_TRIGGER_MANDATORY);

if( event == EVENT_ETB_ABILITY ){
int kill_me = 1;
if( hand_count[player] ){
test_definition_t test;
default_test_definition(&test, selected_type);
char ttext[100];
char msg[100];
scnprintf(msg, 100, "Select a %s card to discard.", type_text(ttext, 100, selected_type, 0));
int selected = new_select_a_card(player, player, TUTOR_FROM_HAND, 0, AI_MIN_VALUE, -1, &test);
if( selected > -1 ){
discard_card(player, selected);
kill_me = 0;
}
}
if( kill_me ){
kill_card(player, card, KILL_SACRIFICE);
}
}

if( event == EVENT_CAST_SPELL && affect_me(player, card) ){
test_definition_t test;
default_test_definition(&test, selected_type);
test.zone = TARGET_ZONE_HAND;
if( ! check_battlefield_for_special_card(player, card, player, CBFSC_CHECK_ONLY, &test) ){
ai_modifier -= 256;
}
}

return 0;
}

Re: [confirmed]Hidden Horror not good prompt.

PostPosted: 24 Feb 2019, 14:29
by Korath
Well, of course it doesn't use it. There's no mention of msg after creating a prompt in it; it's just written to and then ignored. Try scnprintf()ing directly into test.message instead. (Assuming new_select_a_card uses the message it's given instead of just throwing away like this does.)

Re: [confirmed]Hidden Horror not good prompt.

PostPosted: 24 Feb 2019, 19:11
by Aswan jaguar
Fixed in commit 392d946.