Neither the menu nor the AI's choice honor
Magical Hack, either (though the created effect should), and that "SUBTYPE_SWAMP || SUBTYPE_FOREST" doesn't do
anything at all like what you're intending - it looks for a land with SUBTYPE_ALLY. Setting that aside, you'd want something similar to
- Code: Select all
int choice = 0;
int has_BB = has_mana_for_activated_ability(player, card, MANACOST_B(2));
int has_GG = has_mana_for_activated_ability(player, card, MANACOST_G(2));
if (has_BB && has_GG)
choice = do_dialog(player, player,card, -1,-1, " Forestwalk\n Swampwalk\n Cancel",
check_battlefield_for_subtype(1-player, TYPE_LAND, SUBTYPE_SWAMP));
else if (has_BB)
choice = 0;
else if (has_GG)
choice = 1;
else
choice = 2;
Always displaying both options even if only one is pickable (and disabling the other) is a better interface, of course, and DIALOG()'s the most convenient way to do that.
pump_ability_until_eot() returns the card index of the effect card it creates, just like most other effect-creating functions in Manalink.