Page 1 of 1

[fixed/closed]Indestructible & First Strike

PostPosted: 23 Aug 2013, 03:43
by HarlequinCasts
I suspect this is known and/or hard coded but:

When an indestructible creature takes what would normally be lethal first strike damage, it is removed from combat and never deals its damage post-first-strike. A 2/2 indestructible blocked by a 2/2 first striker should still be able to kill the first striker.

Re: Indestructible & First Strike

PostPosted: 23 Aug 2013, 11:58
by Gargaroz
Hardcoded issue :(
Korath, it's possible to inject in the "kill_card" function an hack that checks if the cards is idestructible ?

Re: Indestructible & First Strike

PostPosted: 23 Aug 2013, 12:13
by Korath
Should be, but it'll be a while before I get to it, and I'm not sure that it'll be sufficient to fix this.

Re: [confirmed-wait]Indestructible & First Strike

PostPosted: 23 Aug 2013, 18:38
by HarlequinCasts
Worth noting that when I said "what would normally be lethal damage" this includes deathtouch and first strike. Glissa, the Traitor can chump block Blightsteel Colossus all day.

Re: Misc Bugs:

PostPosted: 13 Dec 2013, 22:57
by Korath
It'll be a bit before I get a chance to hook indestructible into all the right places so it just doesn't get destroyed instead of the current workarounds, but in the meantime, I think this particular aspect of it could be smoothed over by replacing the regenerate_target_exe() call with something that doesn't do all the extra stuff we don't need. Here's what it currently looks like:
Code: Select all
void
regenerate_target_exe(int player, int card)
{
  int p, c;
  for (p = 0; p <= 2; ++p)
    for (c = 0; c < active_cards_count[p]; ++c)
      if (in_play(p, c))
        {
          card_instance_t* inst = get_card_instance(p, c);
          if (inst->damage_target_player == player && inst->damage_target_card == card
              && ((inst->internal_card_id == LEGACY_EFFECT_GENERIC && (inst->token_status & STATUS_CANNOT_REGENERATE))
                  || inst->internal_card_id == LEGACY_EFFECT_DISINTEGRATE))
            return;     // can't regenerate
        }
  // We'll want to skip the above, obviously

  card_instance_t* instance = get_card_instance(player, card);
  instance->kill_code = 0;
  instance->unknown0x14 = 0;    // this stores a trigger number, looks like
  instance->damage_on_card = 0;
  tap_card(player, card);       // no need for this
  play_sound_effect(WAV_REGEN); // and this is probably inappropriate, too
  instance->token_status &= ~STATUS_DYING;

  // The rest are what's causing the reported bug
  instance->blocking = 255;

  if (current_phase == PHASE_NORMAL_COMBAT_DAMAGE || current_phase == PHASE_NORMAL_COMBAT_DAMAG2)
    {
      if (instance->state & STATE_ATTACKING)
        instance->state |= STATE_ATTACKED;

      if (instance->state & STATE_BLOCKING)
        instance->state |= STATE_BLOCKED;
    }
  instance->state &= ~(STATE_ATTACKING | STATE_BLOCKING);
}

[confirmed]Indestructible

PostPosted: 14 Dec 2013, 03:42
by BAgate
Describe the Bug:
A card with indestructible doesn't kill creatures with first strike who have enough power to kill him.

Which card did behave improperly ?
blightsteel colossus

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
16/11/2013 : Portals to Theros - DUEL

What exactly should be the correct behavior/interaction ?
the indestructible creature shouldn't die so the creatures with first strike should suffer damage and die themselves.

Are any other cards possibly affected by this bug ?
any creatures that are indestructible

this is a bug reported by jatill being broken up.

Re: [confirmed]Indestructible

PostPosted: 14 Dec 2013, 18:49
by Korath
Duplicate, please merge.

Re: [confirmed-wait]Indestructible & First Strike

PostPosted: 27 Jan 2014, 06:07
by Korath
Working in dev mostly as a side effect of other stuff, against lethal damage only. (Including from deathtouch and Phage the Untouchable 's ability.) The AI still doesn't know how to deal with it, and I'm not sure whether it'll be more or less confused by a Darksteel Sentinel with 8 damage marked on it than it was before. Other destroy effects will still take indestructible creatures out of combat. We're still a heck of a long way from just being able to slap a SP_KEYWORD_INDESTRUCTIBLE bit on something and have it Just Work like it should.

Re: [confirmed-wait]Indestructible & First Strike

PostPosted: 05 Apr 2014, 18:03
by Korath
It should Just Work like it should now.