It is currently 07 Jul 2021, 11:59
   
Text Size

Shandalar - Program Bugs

Albino Troll, Lightning Dragon data conflict with echo (fix completed)

 

Echo, regenerate_self(), and mana_shade() all use info_slot; so Albino Troll can't activate to regenerate depending on who last paid its echo cost, Lightning Dragon gets -20/-0 instead of +1/+0 the first time each turn it's activated, and both need to pay echo again the next upkeep after they're activated.

Comments

Posted by Korath » 22 Nov 2015, 17:17

Truth be told, none of these three mechanics should be using info_slot.

Echo could get by with a bit for each player; they're no longer in short supply starting in AS with card_aux, and templated abilities shouldn't be using info_slot or eot_toughness anyway since it's so easy to overlook.

regenerate_self() should look for its own activations on the stack rather than keeping track in info_slot; it's plenty fast enough and countering the activated ability would make it never able to regenerate again.

powerup_via_infoslot(), as called from mana_shade() and various other places, isn't sustainable with changed types a la Mirrorweave, for the same reason using info_slot to store everything's linked abilities isn't. powerup_legacy_combine() is slower but sufficient.

Posted by Korath » 22 Feb 2016, 04:52

commit 62dea2ddbe8a9a767c5b849e32dff61fc962503e
Author: Korath <dgk@Dirge.none>
Date: Sun Feb 21 23:51:25 2016 -0500

[AS] #938: Albino Troll: suppress use of info_slot in regenerate_self() call

To avoid a data conflict with ECHO().

Posted by Korath » 22 Feb 2016, 13:16

commit f99fac36b3164f51db7d4f7c818e92c88522254c
Author: Korath <dgk@Dirge.none>
Date: Mon Feb 22 08:15:21 2016 -0500

[AS] #938: replace powerup_via_infoslot() with pump_self()

The latter of which forwards to powerup_legacy_combine(), after changing the
effect target to the source card if given an activation effect.

Primary motivation is that - especially when called through the MANA_SHADE()
family of front-ends - it's not immediately obvious that the cards make use of
info_slot, so this is begging for data conflicts. Secondarily, info_slot usage
is unsafe for any use by permanents, due to Mirrorweave-like effects; all
existing uses will eventually have to migrate to dedicated data space.

Also move essentially all cards that pump themselves from powerup_legacy() or
powerup_legacy_combine() to pump_self(); as a not-quite side effect, this
combines effect cards for all that weren't already.

Most of the ones that pump power and/or toughness won't matter in practice,
since they can't have more than one effect active at a time anyway. The ones
that don't pump power or toughness aren't listed below.

Also:
Make powerup_legacy_combine() and the various find_matching_legacy() variants
more consistent in finding the proper source for their effects (by splitting
find_source_and_csvid_for_effect() out of create_legacy_effect_backend());
powerup_legacy_combine() further declines to match if the chosen alternative
text doesn't match, or if adding or removing a protection from color or a basic
landwalk that doesn't exactly match what's already on the existing effect
(whether a different choice was made, or the source was hacked/sleighted in
between).

Lightweight conversion to |n in power/toughness effect text (i.e. by simple
text replacement, rather than changing the entire string) only replaces values
preceded by a + or -; enable the tests to ensuring that all such replacements
attempts match at least once; and add a test to check that no card's rules text
accidentally gets a |n in it.

Combine power/toughness pumping for:
Abyssal Nocturnus
Akroan Hoplite
Akroan Line Breaker
Altac Bloodseeker
Angelic Captain
Araba Mothrider
Aurochs
Avizoa
Balduvian Fallen
Baloth Woodcrasher
Battle-Mad Ronin
Benalish Veteran
Blade-Tribe Berserkers
Borderland Marauder
Boros Elite
Bramble Creeper
Brothers Yamazaki
Brushwagg
Brutal Deceiver
Bull Aurochs
Callous Deceiver
Cenn's Heir
Charging Bandits
Charging Griffin
Chub Toad
Chronatog
Cloudgoat Ranger
Cursed Ronin
Devoted Retainer
Dromosaur
Dwarven Berserker
Dwarven Soldier
Escaped Null
Feral Deceiver
Flowstone Charger
Fortress Cyclops
Giant Badger
Goblin Elite Infantry
Goblin Piledriver
Hand of Cruelty
Hand of Honor
Harsh Deceiver
Heartlash Cinder
Heir of the Wilds
Hollow Dogs
Hungry Spriggan
Ichorclaw Myr
Iizuka the Ruthless
Incursion Specialist
Indebted Samurai
Inner-Chamber Guard
Jareth, Leonine Titan
Kavu Mauler
Kiln Walker
Kitsune Blademaster
Kitsune Dawnblade
Knotvine Paladin
Konda, Lord of Eiganjo
Konda's Hatamoto
Kuro's Taken
Lurking Nightstalker
Minotaur Skullcleaver
Mortis Dogs
Mothrider Samurai
Nagao, Bound by Honor
Nav Squad Commandos
Nezumi Ronin
Putrid Cyclops
Ravenous Skirge
Ronin Cavekeeper
Ronin Cliffrider
Ronin Houndmaster
Samurai Enforcers
Samurai of the Pale Curtain
Shaleskin Bruiser
Silverstorm Samurai
Slinking Giant
Sokenzan Renegade
Soltari Trooper
Stalking Drone
Tajic, Blade of the Legion
Takeno, Samurai General
Terra Ravager
Timbermaw Larva
Viashino Firstblade
Vicious Kavu
Vile Deacon
Warmind Infantry
Wei Ambush Force

Split effect text for:
Karn, Silver Golem

Posted by Korath » 22 Feb 2016, 13:28

commit 32d7cb5e60da73ceec2668a47ff4e0c9c2ce8a2b
Author: Korath <dgk@Dirge.none>
Date: Mon Feb 22 08:27:51 2016 -0500

[AS] #938: regeneration checks stack for previous activations, not info_slot

This will need especial care if and when cards with multiple activated
abilities including a regeneration one use the normal interface, rather than
the one that just swaps between the two depending on whether it's during the
the 4E-era regeneration phase.

Affects:
regenerate_self()
regenerate_attached()
ActivateRegenerate{} - in this case, there's no stack check for cards that
regenerate something other than themselves (in particular, not for cards that
regenerate a specific other card, like the creature they're enchanting).

Support:
has_activation_on_stack()

This supercedes commit 62dea2ddbe8a9a767c5b849e32dff61fc962503e.

Posted by Korath » 22 Feb 2016, 13:36

Symptoms as reported are fixed; leaving this open to replace use of info_slot in Echo, Monstrosity, Renown, and preferably Devour.

Posted by Korath » 22 Feb 2016, 14:44

commit 26c7dbf301a642192f4d31073a27cfb474e66a6e
Author: Korath <dgk@Dirge.none>
Date: Mon Feb 22 09:44:13 2016 -0500

[AS] FIX #938: echo, renown, monstrosity use instance flags, not info_slot

Ticket details

  • Ticket ID: 938
  • Project: Shandalar
  • Status: Fix completed
  • Component: Individual Card
  • Project version: (unknown)
  • Priority: Normal
  • Severity: Normal
  • Assigned to: Korath
  • Reported by: Korath
  • Reporter's tickets: List all tickets
  • Reported on: 22 Nov 2015, 17:02
  • Last visited by Korath » 04 Mar 2016, 20:30.
 

Login Form