CleverRaven / CleverRaven/Cataclysm-DDA
Monster special attacks' cooldown is randomised on first use
- Dominant language
- C++
- Stars
- 13.2k
- Forks
- 4.6k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 205
Description
### Describe the bug
When a monster is spawned in, when it first uses it's special attack, the cooldown value appears randomised between 1 and the actual cooldown value specified in the json. Every subsequent special attack is given the correct cooldown value.
### Attach save file
N/A, easily reproducible.
### Steps to reproduce
1. Use debug menu or an EOC function to spawn a monster with a defined special attack.
2. Activate debug mode filtering for MATTACK and check monster cooldown value.
### Expected behavior
The cooldown value should be respected on the first usage by that monster.
### Screenshots

### Versions and configuration
Win 10 64-bit
cdda-windows-tiles-sounds-x64-2023-04-06-1455 (tested across multiple experimentals, this is the latest I have tried)
Graphical Tiles
Default mods, clean install
### Additional context
This was tested with various different monsters with both spell and regular special attack definitions. In the attached screenshot, 9 Vigilant Amalgamations were spawned at the same time within their sight range to me, and one turn has passed. Note also the messages showing some of the monsters attempting to use the special attack multiple times at once.
Contributor guide
Research direction
Start by tracing monster special-attack cooldown handling from the debug menu or EOC spawn path, using MATTACK filtering and the JSON special-attack definitions to reproduce the first-use behavior. Compare the initial cooldown with subsequent attacks across spell and regular specials; done means the defined cooldown is respected on the first use as well as later uses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100