CleverRaven / Cataclysm-DDA

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

MoM Blink spell actually generates the random number instead of describing the number as random #76298

Open dev-dsp opened 1 month ago

dev-dsp commented 1 month ago

Describe the bug

cdda-2024-09-09_03.55.37.webm

Attach save file

Nairn-trimmed.tar.gz

Steps to reproduce

  1. Open spellcasting menu
  2. Scroll to Blink

Expected behavior

Good old static numbers

Screenshots

No response

Versions and configuration

Additional context

No response

Standing-Storm commented 1 month ago

Blink has RANDOM_AOE--that might be the reason for this.

db48x commented 1 month ago

Yes, the problem is that the code that generates the description of the spell actually generates the random number instead of describing the number as random. Currently the menu recreates the description on every frame, which is itself a bug (and one that will be fixed elsewhere), and thus the number changes every time the window is updated.

Since I’m already in the process of fixing the other bug, why don’t you change the title of this bug to something more specific about the spell description. Both bugs need to be fixed, and it would be a shame to forget about it once the menu no longer shows the description changing every frame.

dev-dsp commented 1 month ago

@db48x does this need confirmation label then?

db48x commented 1 month ago

The bug definitely exists, but I can’t edit labels myself or I would already have confirmed it.