It's mostly what you'd expect.
- Code: Select all
int card_fastbond(int player, int card, event_t event)
{
// 0x4316C0
/* Fastbond |G
* Enchantment
* You may play any number of additional lands on each of your turns.
* Whenever you play a land, if it wasn't the first land you played this turn, ~ deals 1 damage to you. */
if (event == EVENT_CAN_CAST)
result = 1;
if (player == current_turn
&& (land_can_be_played & LCBP_LAND_HAS_BEEN_PLAYED)
&& current_phase >= PHASE_MAIN1 && current_phase <= PHASE_MAIN2)
land_can_be_played &= ~LCBP_LAND_HAS_BEEN_PLAYED;
if (trigger_condition == TRIGGER_COMES_INTO_PLAY && affect_me(player, card) && reason_for_trigger_controller == player
&& trigger_cause_controller == player && in_play(player, card)
&& lands_played >= 1 && is_what(trigger_cause_controller, trigger_cause, TYPE_LAND))
{
if (event == EVENT_TRIGGER)
event_result |= RESOLVE_TRIGGER_MANDATORY;
if (event == EVENT_RESOLVE_ACTIVATION)
damage_player(player, 1, player, card);
}
return 0;
}
TRIGGER_COMES_INTO_PLAY was surprising; I expected TRIGGER_SPELL_CAST. There's both plusses and minuses to doing it here.
The big advantage is that the land's already in play this way, which is how it's supposed to work with both the 4E wording and with modern triggers (given that playing a land doesn't use the stack). So you can, for example, use the land to activate a
Circle of Protection: Green to prevent
Fastbond's damage.
On the other hand, it can be interleaved with other enters-the-battlefield triggers.
Plus, the exe code corresponding to is_what() always returned 0 if the card being queried was no longer in play; this is what makes
Fastbond not trigger if you use a Ravnica two-mana land to bounce itself, for example. The C version will work in that case, but it could still be fooled by another enters-the-battlefield trigger that makes the land into a non-land.
Mind the odd case with
Torpor Orb and either
Dryad Arbor or continuous land-animation effects like
Living Lands that'll keep us from just using new_specific_cip(), in any case.