Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Monsters can use multiple spells in one second

Open Standing-Storm opened this issue 6 months ago • 8 comments

Describe the bug

As title. Monster are capable of using multiple spells simultaneously even though monster spells are supposed to universally take 100 moves to use.

Attach save file

Z-MoM-Test-trimmed.tar.gz

Steps to reproduce

  1. Load game. You spawn within range of a Dr. Brain (chosen due to the high number of monster spells it has)
  2. wait one turn
  3. Dr. Brain fires off multiple monster spells in a single second

Expected behavior

Monster spells take 100 moves and a monster cannot dump every power they have available on you in a single second

Screenshots

Image

Another one showing multiple spells/attacks all happening within one second:

Image

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.26100.4061 (24H2)
  • Game Version: cdda-experimental-2025-05-26-1731 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], Slowdown Fungal Growth [no_fungal_growth], Mind Over Matter [mindovermatter] ]

Additional context

No response

Standing-Storm avatar May 27 '25 17:05 Standing-Storm

Had a question on this, I notice the first message is stunned, or thrown to the ground. Is that subtracting moves giving the illusion of one second expanse of time? Went through a lab the other day and couldn't reproduce the event.

Will do some further testing to see if I can get it to reoccur.

SittingDucken avatar Jun 02 '25 04:06 SittingDucken

Okay, I am unable to reproduce this in current experimental. May be fixed already in later experimental versions?

SittingDucken avatar Jun 02 '25 14:06 SittingDucken

Had a question on this, I notice the first message is stunned, or thrown to the ground. Is that subtracting moves giving the illusion of one second expanse of time? Went through a lab the other day and couldn't reproduce the event.

That was why I included the second screenshot--the two "the air around..." messages are both monster spells of it putting a buff on itself followed immediately by the use of a third spell. One second later, I regained control and was able to teleport using debug, so the lost control didn't use any game time (if you're stunned, you have to pass turns manually anyway, the game doesn't countdown the stun timer while you watch your character die). So that's three spells in 1 second, which should be impossible.

Okay, I am unable to reproduce this in current experimental. May be fixed already in later experimental versions?

No, it's still a problem:

Image

Screenshot taken using the above save, with the following info:

  • OS: Windows
    • OS Version: 10.0.26100.4061 (24H2)
  • Game Version: cdda-experimental-2025-06-02-1354 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], Slowdown Fungal Growth [no_fungal_growth], Mind Over Matter [mindovermatter] ]

Even assuming that being sent flying takes time, you can see that within one second it used two monster spells (The air around the Dr. Brain distorts and The air around the Dr. Brain wavers. are the messages) before using a monster smash attack.

Beyond the first encounter this doesn't seem to be as much of a problem as cooldowns stop lining up, but it gives it a tremendous advantage if it gets the drop on you.

Standing-Storm avatar Jun 03 '25 03:06 Standing-Storm

On further exploration, it seems to specifically be the self-buffs that can be used freely. Here's an unstoppable force doing the same thing as Dr. Brain:

Image

And here's a human whirlwind doing it (skin takes on a waxen appearance and begins moving much more quickly). The second is a speed buff and allows it to attack twice afterwards, but it does the two buffs in one second before applying that buff:

Image

I checked some Magiclysm monsters with a large number of offensive spells but no buffs and did not observe multiple spells in one second.

Here's the actual data for their buff special attacks: https://github.com/CleverRaven/Cataclysm-DDA/blob/23771949056e3d279f1734f8c550e2756b54a40a/data/mods/MindOverMatter/monsters/feral_lab_psychics.json#L73-L92

Maybe it's something about Cooldown: 1?

Standing-Storm avatar Jun 03 '25 03:06 Standing-Storm

Hah yeah was just going to say that those were self buffs. I hadn't even considered it an issue to be honest. Used to standard video game logic that of course the enemy autobuffs instantly. But given that dispel magic and such are also a thing in cdda, I'd say they shouldn't be able to instantly self buff except maybe on generation.

Hmm hold on lemme look at something.

SittingDucken avatar Jun 03 '25 03:06 SittingDucken

math to modify the cool down after initial cast. Then on generation self buff is instant, and subsequent casts wouldn't be.

Yeah, I should be able to do like "math": ["1 + (u_has_effect('blah blah blah') * 30)"], though don't know when the cooldown timer starts (before or after the effect is applied?) so I don't know if that would actually work. Would need some testing.

Standing-Storm avatar Jun 03 '25 03:06 Standing-Storm

Okay, I think its a priority order thing, and the bug may be with speed reduction? Dr Brain casts momentum acceleration because its first in the list. Momentum acceleration multiplies speed. Going to have to really dive on this. Will play with cool down and spell order to see if any of this pans out. Looks like the monster is doing: Moves = 100 Cast momentum acceleration. Subtract 100 moves. Multiply speed (100*1.03). Get speed result 103, set moves equal to speed. Cast inertial barrier. 3 moves left over. Cast attack.

Idk if that's the case. Setting move_cost: 103 for the spells would check out if the speed is getting bugged. And setting move_cost: 100 would see if its just buffs being weird on move cost.

Assuming base move cost for all special attacks is 100, and there's not some odd spell id base move cost of 50.

SittingDucken avatar Jun 03 '25 03:06 SittingDucken

Testing another monster (that also has speed reduction) and here's the result of waiting one turn:

Image

(This is a Speed 100 monster, so after using that first power it should have had no moves left to use the speed boost)

Standing-Storm avatar Jun 12 '25 21:06 Standing-Storm

After monattack fixes, is it still the case?

GuardianDll avatar Jun 26 '25 19:06 GuardianDll

i would assume it was fixed, so i 'll close it

GuardianDll avatar Aug 29 '25 19:08 GuardianDll