Page 1 of 1

[fixed 1st-unsolved 2nd],Cauldron Dance

PostPosted: 09 Oct 2013, 14:06
by Aswan jaguar
Describe the Bug:
Cauldron Dance 3nd ability to put a creature from hand to battlefield doesn't force you to sacrifice the creature at the end step instead it puts it back to hand like the 2nd ability.

Which card did behave improperly ?
Cauldron Dance 3nd ability

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
ML3-Onslaught.v2

What exactly should be the correct behavior/interaction ?
Cauldron Dance 3nd ability to put a creature from hand to battlefield forces you to sacrifice the creature at the end step.

Are any other cards possibly affected by this bug ?

Re: Cauldron Dance 3nd ability

PostPosted: 09 Oct 2013, 15:09
by Aswan jaguar
Cauldron Dance has one more bug as you should be able to cast it also at the beginning of combat phase (before attackers are selected as the original card Jade Statue was activated)and so select the creatures that come in the battlefield to attack at once.

Re: Cauldron Dance 3nd ability and more

PostPosted: 09 Oct 2013, 19:19
by Gargaroz
Fixed the first bug, the second is really troublesome...

Re: Cauldron Dance 3nd ability and more

PostPosted: 09 Oct 2013, 19:34
by Aswan jaguar
Yes, I do remember we had faced this problem with other cards,too.Maybe Korath can find what the hardcoded Jade Statue uses and can be selected in fact at "Choose Attackers step" maybe because it is thought as a creature in that step?

Re: Cauldron Dance 3nd ability and more

PostPosted: 10 Oct 2013, 05:17
by Korath
Jade Statue just looks like a vanilla TRIGGER_DECLARE_ATTACK response to me.
Code: Select all
int card_jade_statue(int player, int card, event_t event)
{
  card_instance_t* instance = get_card_instance(player, card);

  if (event == EVENT_CAST_SPELL && affect_me(player, card))
    instance->dummy3 = instance->internal_card_id;

  if (event == EVENT_RESOLVE_SPELL)
    {
      instance->state |= STATE_CANNOT_ATTACK|STATE_CANNOT_BLOCK;
      instance->info_slot = -1;
    }

  if ((event == EVENT_ATTACK_LEGALITY || event == EVENT_BLOCK_LEGALITY)
      && affect_me(player, card)
      && !(instance->state & STATE_ATTACKING)
      && !has_mana(player, COLOR_ANY, 2))
    event_result = 1;

  if (((trigger_condition == TRIGGER_DECLARE_ATTACK && current_phase == PHASE_DECLARE_ATTACKERS && reason_for_trigger_controller == current_turn)
       || (trigger_condition == TRIGGER_PAY_TO_BLOCK && current_phase == PHASE_DECLARE_BLOCKERS && reason_for_trigger_controller != current_turn))
      && affect_me(player, card)
      && !instance->eot_toughness
      && !(instance->state & STATE_TAPPED)
      && trigger_cause_controller == player && trigger_cause == card)
    {
      if (!has_mana(player, COLOR_ANY, 2))
        forbid_attack = 1;
      else
        {
          if (event == EVENT_TRIGGER)
            event_result |= RESOLVE_TRIGGER_MANDATORY;
          else if (event == EVENT_RESOLVE_TRIGGER)
            {
              TENTATIVE_put_activated_ability_onto_stack(player, card, EVENT_RESOLVE_ACTIVATION, 0, 0);
              charge_mana(player, 0, 2);
              obliterate_top_card_of_stack();
              if (cancel == 1)  // cancel set by charge_mana(), not obliterate_top_card_of_stack()
                {
                  forbid_attack = 1;
                  cancel = 0;
                }
              else
                {
                  forbid_attack = 0;
                  int iid = create_a_card_type(instance->internal_card_id);
                  if (iid != -1)
                    {
                      cards_data[iid].type |= TYPE_CREATURE;
                      cards_data[iid].power = 3;
                      cards_data[iid].toughness = 6;
                      instance->dummy3 = cardtyp;
                      instance->regen_status |= KEYWORD_RECALC_CHANGE_TYPE;
                      instance->info_slot = instance->internal_card_id;
                    }
                  instance->eot_toughness = 1;
                }
            }
        }
    }

  if (event == EVENT_CHANGE_TYPE
      && !(land_can_be_played & 0x20000)        // second pass of EVENT_CHANGE_TYPE
      && affect_me(player, card)
      && in_play(player, card))
    event_result = instance->dummy3;

  if (trigger_condition == TRIGGER_END_COMBAT
      && affect_me(player, card)
      && reason_for_trigger_controller == player
      && instance->info_slot != -1)
    {
      if (event == EVENT_TRIGGER)
        event_result |= RESOLVE_TRIGGER_MANDATORY;
      else if (event == EVENT_RESOLVE_TRIGGER)
        {
          sub_4A6580(instance->dummy3);
          instance->dummy3 = instance->info_slot;
          instance->info_slot = -1;
          instance->eot_toughness = 0;
        }
    }

  return 0;
}

// releases a created card type?
void sub_4A6580(int iid)
{
  *(int *)&cards_data[iid].id = -1;     // sets ->id and ->reserved2
}

Re: Cauldron Dance 3nd ability and more

PostPosted: 10 Oct 2013, 06:14
by Aswan jaguar
- Cauldron Dance Just checked and the only other card we have that can be cast during combat phase is Savage Beating and it was the one that was reported in the past and has the same problem.