CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.09k stars 4.1k forks source link

[MoM] Trick of the light is fucky #75015

Open Terrorforge opened 1 month ago

Terrorforge commented 1 month ago

Describe the bug

The photokinetic power Trick of the Light (photokinetic_light_dodge) doesn't seem to be applying all of its intended effects. I've struggled to outline which ones are and aren't working since they all work on the same mechanic, but here are my observations:

  1. The UNCANNY_DODGE flag does not seem to be applied. You can tell, because when your character performs an uncanny dodge, they move to a nearby tile, and this does not happen with Trick of the Light. HOWEVER, the power probably shouldn't give Uncanny Dodge in the first place, because as I understand it Uncanny Dodge gives you a 100% chance to dodge any attack, rendering the rest of the effect moot.
  2. Enemies can still grab you despite the"blocks_effects": [ "grabbed" ] part of the effect. It appears a successful grab counts as getting hit and dispels the effect, so it's possible the grab removes the effect before the effect can remove the grab.
  3. The dodge_mod increase is not visible in the usual dodge stat tally on the character menu. This may be default behavior for non-permanent dodge boosts, but it feels confusing and makes it unclear if your dodge is actually boosted. Anecdotally, it does feel like you get increased dodge when using the power, but it's hard to tell if it's as much as it should be and which parts of the ability are actually working.

Attach save file

trivially reproducible

Steps to reproduce

  1. Cast Trick of the Light
  2. Be attacked

Expected behavior

The power has all of its intended effects

Screenshots

No response

Versions and configuration

Additional context

No response

Standing-Storm commented 1 month ago

The UNANNY_DODGE flag does not seem to be applied. You can tell, because when your character performs an uncanny dodge, they move to a nearby tile, and this does not happen with Trick of the Light.

...this makes me think the UNCANNY_DODGE flag flat-out doesn't work because that has never happened on anything I've applied UNCANNY_DODGE to.

Terrorforge commented 1 month ago

The CBM works like that, as does Magiclysm's "Mirror Displacement" mutation.

There may be problems applying through effects specifically? There's been issues with that in that past I believe.

emixa-d commented 1 month ago

The code checks directly for presence of CBM or mutation, AFAIK it doesn't look through effects (at least I noticed a piece of code apparently doing that some time ago).

You can tell, because when your character performs an uncanny dodge, they move to a nearby tile, and this does not happen with Trick of the Light.

There is some code where "uncanny dodge = do two dodge checks, pick the best result" -- I don't know if the 'move a tile' has been removed or if it still/also exists (plus the "two dodge checks").

Edit: or maybe I was misremembering HARDTOHIT, dunno.

Terrorforge commented 1 month ago

I tested it for this, so I can confirm that the CBM and mutation do in fact have you hopping around when you dodge.

Terrorforge commented 4 weeks ago

Okay I think the UNANNY_DODGE effect is actually applied, at least partially. I was doing some testing to see if I could figure out if and how much Trick of the Light and/or Blinding Radiance actually work, and I couldn't really make heads or tails of the debug messages, EXCEPT that these "Dodge roll 999999" are what should be happening when the code detects the UNCANNY_DODGE flag. It's not triggering the sidestep, though, and don't seem to cost more stamina than a regular dodge.

image

e: well now I can't replicate this. I'm not seeing dodge roll 999999 any more and the zombie can definitely hit me. so what the fuck

emixa-d commented 3 weeks ago

Those "Dodge roll 999999" can happen when `EVASION``>0, best make sure you don't have the Spacial Recalibration mutation before testing.

Terrorforge commented 3 weeks ago

I didn't, but Trick of the Light does have an Evasion component