It is currently 25 Apr 2024, 07:38
   
Text Size

[fixed]Ajani's Comrade usually doesn't get counters

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

[fixed]Ajani's Comrade usually doesn't get counters

Postby Korath » 06 Sep 2020, 12:32

Describe the Bug:
Ajani's Comrade doesn't get a +1/+1 counter unless your last indexed card on the bf is an Ajani planeswalker.

Which card behaved improperly?
Ajani's Comrade.

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
ebeae86b7 - (origin/aswanjaguar_track_drool) Fix challenge Magic: The Puzzling.

What exactly should be the correct behavior/interaction?
Only break if( is_planeswalker(player, c) && has_subtype(player, c, SUBTYPE_AJANI) ), not just if( in_play(player, c) ). Indentation doesn't determine what statements are guarded by an if (or while, or for, or...); braces do.

Are any other cards possibly affected by this bug?
Not anymore; remotely-modern gcc (6+) flags misleading indentation as a warning.
Last edited by drool66 on 03 Oct 2020, 06:02, edited 2 times in total.
Reason: fixed
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: Ajani's Comrade usually doesn't get counters

Postby drool66 » 06 Sep 2020, 16:16

My fault (obviously) - I didn't mean to push this change. It got comingled with changing Improvise to not use targets[21]. But I realized that with changing PWs to the regular legendary rules there could be more than one Ajani in play and we'd need that break there and yes, I forgot the braces. :oops:

But also, Korath, can you tell me if there is a way to have something trigger "at the beginning of combat" when no creatures can attack? It's the same issue with Meandering Towershell (although that one has at least one more issue). Thanks
User avatar
drool66
Programmer
 
Posts: 1163
Joined: 25 Nov 2010, 22:38
Has thanked: 186 times
Been thanked: 267 times

Re: Ajani's Comrade usually doesn't get counters

Postby Korath » 06 Sep 2020, 18:01

Manalink's handling "beginning of combat" effects when the phase changes to PHASE_DECLARE_ATTACKERS. You'll never get there if nothing can attack.

In Shandalar, I do it at EVENT_MUST_ATTACK (to the extent that I eventually aliased EVENT_BEGIN_COMBAT to it). I don't think I had to change anything in main_phase() to support it, but if so, you're probably SOL - main_phase() is an opaque trainwreck. I don't see anything obvious skimming git log src/shandalar/main_phase.cpp, anyway. (I did remove the check against event_flags & EA_FORCE_ATTACK, so you'll need to at least set that.)

The last revision Shandalar used the original trigger mechanism for beginning-of-combat was 4745ef3fd; it's self-contained near the start of dispatch_event_raw() in engine.cpp.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: [fixed]Ajani's Comrade usually doesn't get counters

Postby drool66 » 03 Oct 2020, 06:02

Fixed in 19b2fb6
User avatar
drool66
Programmer
 
Posts: 1163
Joined: 25 Nov 2010, 22:38
Has thanked: 186 times
Been thanked: 267 times


Return to Archived Reports

Who is online

Users browsing this forum: No registered users and 50 guests


Who is online

In total there are 50 users online :: 0 registered, 0 hidden and 50 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 50 guests

Login Form