Grasscutter
Grasscutter copied to clipboard
Fix and refactor (dungeon) challenges and use the DungeonChallengeConfigData to get the challenge type (can be annoying because of variable arguments)
Currently there are many challanges that don't work as expected, for example they finish after one instead of many monsters killed.
The params of calls to ScriptLib.ActiveChallenge
are different depending on the challenge type.
The first two parameters are static though.
The first one is the local challengeId.
The second parameter is the challenge Id that can be searched for in DungeonChallengeConfigData.json to get the challenge type and more. This file is also used in challenges outside of dungeons.
The challenge system needs to be reworked to improve handling of these parameters, detection of challenges and to allow simple trigger implementations.
partially done with #39
more fixes and handling for this in #59