Page 1 of 1

[confirmed]Vigean Hydropon

PostPosted: 30 Jun 2022, 19:30
by Konatsu
If Vigean Hydropon loses its ability by Lignify or Oko, Thief of Crowns, etc., it cannot attack.
However, it can block.

Re: Vigean Hydropon

PostPosted: 01 Jul 2022, 14:07
by Aswan jaguar
I confirm this bug which is global.
Is the following check good enough, needs refinement or it will cause issues I can't think off? I did few basic tests without issues but maybe I didn't look at the right places for bugs. I added a check for is_humiliated() in line
Code: Select all
(!(instance->token_status & STATUS_CANT_ATTACK) || is_humiliated(player, card, AL_STATIC))
in int can_attack()
Code: Select all
int can_attack(int player, int card)
{
  //0x434c30
  card_instance_t* instance = get_card_instance(player, card);

  if (instance->internal_card_id >= 0
     && (!(instance->regen_status & KEYWORD_DEFENDER)
        || (instance->token_status & STATUS_WALL_CAN_ATTACK))
     && (is_what(player, card, TYPE_CREATURE) || (instance->state & STATE_NONCREATURE_CAN_ATTACK))
     && !(instance->state & (STATE_OUBLIETTED|STATE_SUMMON_SICK|STATE_TAPPED))
     && (!(instance->token_status & STATUS_CANT_ATTACK) || is_humiliated(player, card, AL_STATIC)) )
   {
..... rest code

Re: [confirmed]Vigean Hydropon

PostPosted: 03 Jul 2022, 07:06
by drool66
I think that would mean something like Cage of Hands or Halls of Mist wouldn't work with a Humility in play. Immovable Rod and Opportunistic Dragon wouldn't work at all. What might be the best solution is have cannot_attack() and cant_block() take the player/card arguments of the card issuing the ability and check that against is_humiliated(... AL_STATIC) in the definition of cannot_attack()/cannot_block(). I count 56 hits for cannot_attack(), at least one of which (Vent Sentinel) should probably be removed because it looks like it stands in for defender ability, and 201 hits for cannot_block(). Could probably be knocked out in under an hour.

Re: [confirmed]Vigean Hydropon

PostPosted: 03 Jul 2022, 13:20
by Aswan jaguar
drool66 wrote: cannot_block().
This seems to work fine why does it need to change?
You're right - that one's keyworded so it should probably be ok. Makes fixing this even easier.