Page 1 of 1

[fixed/closed]Fastbond

PostPosted: 26 Mar 2014, 06:58
by BAgate
Describe the Bug:
If Fastbond is in play you suffer damage when additional lands get put in play by other effects.

Which card did behave improperly ?
Fastbond

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
2014/02/18: Born of the Gods v2 - DUEL

What exactly should be the correct behavior/interaction ?
You should only suffer damage for cards you play beyond the 1st.

Are any other cards possibly affected by this bug ?
-

Re: Fastbond

PostPosted: 27 Mar 2014, 15:10
by Gargaroz
Well, this could be fixed checking the Special Flags, but I need a decode of the ASM card.
Korath, could you do that ?

Re: Fastbond

PostPosted: 27 Mar 2014, 16:59
by Korath
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.

Re: Fastbond

PostPosted: 28 Mar 2014, 23:04
by Gargaroz
New code inserted in 1438703