It is currently 08 May 2024, 02:31
   
Text Size

[still bugged]Barbed Foliage vs. Jabari's Banner

Report wrong Card behavior to get it fixed.
PLEASE ADD SAVEGAMES TO YOUR TOPIC !

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

[still bugged]Barbed Foliage vs. Jabari's Banner

Postby Korath » 25 Sep 2015, 18:21

Describe the Bug:
Flanking gained by a creature after Barbed Foliage activates (like from an activation of Jabari's Banner during the Before Blockers subphase) doesn't trigger.

Which card did behave improperly ?
Pretty sure the fault lies with Barbed Foliage. Though I guess it might be in granted_flanking() (and Sidewinder Sliver).

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
FRF.

What exactly should be the correct behavior/interaction ?
Declare Attackers:
Suq'Ata Lancer attacks opponent controlling Barbed Foliage.
Before Blockers:
Barbed Foliage's trigger makes Suq'Ata Lancer lose flanking until end of turn.
Player activates Jabari's Banner targeting Suq'Ata Lancer.
Suq'Ata Lancer gains a different instance of flanking until eot.
Declare Blockers:
Wall of Air blocks Suq'Ata Lancer.
After Blockers:
Wall of Air gets -1/-1 until eot.

Are any other cards possibly affected by this bug ?
Sidewinder Sliver, both due to its current implementation, and for a Sidewinder Sliver that gets put on the battlefield after Barbed Foliage triggers for other attacking slivers. I'm not positive whether those other slivers should have flanking in this case or not, though I tend to think so. Second opinions?

The horrible hack for Cavalry Master will need attention too. It already doesn't work right with Jabari's Banner (or multiple copies of Sidewinder Sliver) as is - control Suq'Ata Lancer (one instance of flanking) and a Cavalry Master (second instance on the Lancer), activate Jabari's Banner targeting lancer (third instance), and creatures blocking the Lancer get -4/-4 instead of -3/-3. (Same story for two Sidewinder Sliver and a Cavalry Master - something blocking one of the slivers will get -4/-4 instead of -3/-3.) Fiddling with Barbed Foliage is going to complicate it even more.

It's going to be very easy for a fix for this to accidentally make that Wall of Air in the testcase above get -2/-2 instead of -1/-1. Tentative suggestions:
  1. Make SF_FLANKING_REMOVED only apply to continuous effects - creatures' static abilities and Sidewinder Sliver.
  2. Make Barbed Foliage destroy any effect cards from Jabari's Banner currently attached to creatures triggering it and remove SF_KEYWORD_FLANKING, in addition to its current addition of SF_FLANKING_REMOVED.
  3. Remove the check for Cavalry Master in granted_flanking() and card_sidewinder_sliver(). Instead, pretend Cavalry Master reads "Flanking. Whenever another creature you control with flanking becomes blocked by a creature without flanking, the blocking creature gets -1/-1 until end of turn."
  4. For Sidewinder Sliver, I'm less certain. Maybe put an effect on the bf the first time each combat that Barbed Foliage triggers, and compare the effect's timestamp to each Sidewinder Sliver's?

Alternate solution:
  1. Make Barbed Foliage attach an effect card to each attacking creature with flanking whenever it triggers instead of doing anything else except damage (so no more SF_FLANKING_REMOVED).
  2. When attaching the effect, count the current number of instances of flanking on the creature. Store it on the effect card.
  3. Barbed Foliage's effect should remove SF_KEYWORD_FLANKING from the creature it's attached to during EVENT_ABILITIES (in normal timestamp order).
  4. In granted_flanking() and card_sidewinder_sliver(), check for the presence of Barbed Foliage's effect. For each one found, remove the proper number of instances of flanking, and reset that number on the effect card to zero (so something with innate flanking and a Jabari's Banner effect that post-dates the Barbed Foliage effect doesn't apply the removals twice; but it's still removing SF_KEYWORD_FLANKING in proper timestamp order).
  5. Still redo Cavalry Master as in #3 of the first solution.

Having implemented and tested this in Shandalar now, the key ideas turn out to be step 4 in the first method and 3 in the second. Barbed Foliage's effect card (still attaching to each creature, as it currently does) removes SF_KEYWORD_FLANKING during EVENT_ABILITIES. The equivalents of granted_flanking() and card_sidewinder_sliver() check whether there's a Barbed Foliage effect card attached to the creature with flanking; if so, it compares timestamps. If (Barbed Foliage effect card)->timestamp > (card that's adding flanking)->timestamp, that instance of flanking bails out.

Flanking added by Cavalry Master is a special case. So long as the SF_KEYWORD_FLANKING bit is present, it means there's at least one effect that added flanking after Barbed Foliage's trigger resolved, so Cavalry Master's continuous effect should still work, and therefore flanking granted by the Master doesn't check for Barbed Foliage effects. (At least, that's how I think it's supposed to work. Cavalry Master has a ruling saying that it doesn't work if the creature loses flanking, but doesn't address the more complex case where a creature loses flanking but gains a separate instance, both after Cavalry Master's timestamp.)
Attachments
barbed-foliage-jabari-banner.zip
(2.16 KiB) Downloaded 126 times
Last edited by BAgate on 25 Aug 2016, 11:32, edited 3 times in total.
Reason: still bugged
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: [confirmed]Barbed Foliage vs. Jabari's Banner

Postby Gargaroz » 10 Apr 2016, 21:31

Fixed using solution 2 and made a new code for Cavalry Master in 0bc55d7.
I can't test this last code right now, but the rest seems fine.
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: [still bugged]Barbed Foliage vs. Jabari's Banner

Postby BAgate » 25 Aug 2016, 11:34

Cavelry Master fixed, but once a Barbed Foliage takes flanking away a creature can't get another instance that turn.
Working on: housekeeping and archived reports
User avatar
BAgate
Tester
 
Posts: 2444
Joined: 06 Mar 2012, 11:09
Has thanked: 117 times
Been thanked: 158 times


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 13 guests


Who is online

In total there are 13 users online :: 0 registered, 0 hidden and 13 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 13 guests

Login Form