chuni: fix map area/unlock challenge conditions (#237)

- Document all map area/unlock challenge condition IDs
- Add conditions for missing secret maps in LUMINOUS PLUS/VERSE

Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/237
Reviewed-by: Dniel97 <dniel97@noreply.gitea.tendokyu.moe>
Co-authored-by: beerpsi <beerpsi@duck.com>
Co-committed-by: beerpsi <beerpsi@duck.com>
This commit is contained in:
beerpsi
2025-12-31 14:37:46 +00:00
committed by Dniel97
parent 5ba0c8b04c
commit 29a52d2712
4 changed files with 393 additions and 137 deletions

View File

@@ -112,30 +112,138 @@ class ChuniConstants:
return cls.VERSION_LUT.get(str(floor_to_nearest_005(ver)), None)
class MapAreaConditionType(IntEnum):
"""Condition types for the GetGameMapAreaConditionApi endpoint. Incomplete.
"""
Condition IDs for the `GetGameMapAreaConditionApi` and `GetGameUCConditionApi` requests.
For the MAP_CLEARED/MAP_AREA_CLEARED/TROPHY_OBTAINED conditions, the conditionId
is the map/map area/trophy.
For the RANK_*/ALL_JUSTICE conditions, the conditionId is songId * 100 + difficultyId.
For example, Halcyon [ULTIMA] would be 173 * 100 + 4 = 17304.
- "Item" or "locked item" refers to the map area, unlock challenge or
Linked VERSE locked using this system.
- "Chart ID" refers to musicID \\* 100 + difficulty, where difficulty is 0 for BASIC
up to 6 for WORLD'S END. For example, Halcyon ULTIMA is 17305.
"""
INVALID = 0
"""
Invalid condition type. Should cause the hidden item to be automatically unlocked,
but seemingly only works with map areas.
"""
ALWAYS_UNLOCKED = 0
MAP_CLEARED = 1
"""Finish the map with ID `conditionId`."""
MAP_AREA_CLEARED = 2
"""Finish the map area with ID `conditionId`."""
TROPHY_OBTAINED = 3
"""Unlock the trophy with ID `conditionId`."""
TROPHY_EQUIPPED = 4
"""
Equip the trophy with ID `conditionId`. The item is locked again when the trophy is
unequipped.
"""
NAMEPLATE_OBTAINED = 5
"""Unlock the nameplate with ID `conditionId`."""
NAMEPLATE_EQUIPPED = 6
"""
Equip the nameplate with ID `conditionId`. The item is locked again when the nameplate
is unequipped.
"""
CHARACTER_OBTAINED = 7
"""Unlock the character with ID `conditionId`."""
CHARACTER_EQUIPPED = 8
"""
Equip the character with ID `conditionId`. The item is locked again when the character
is unequipped.
"""
CHARACTER_TRANSFORM_EQUIPPED = 9
"""
Equip the character, with the character transform ID `conditionId`. The item is locked again
if the incorrect character is equipped, or the correct character is equipped with the wrong
transform.
"""
MUSIC_OBTAINED = 10
"""Unlock the music with ID `conditionId`."""
AVATAR_ACCESSORY_OBTAINED = 11
"""Unlock the avatar accessory with ID `conditionId`."""
AVATAR_ACCESSORY_EQUIPPED = 12
"""
Equip the avatar accessory with ID `conditionId`. The item is locked again when the avatar
accessory is unequipped.
"""
MAP_ICON_OBTAINED = 13
"""Unlock the map icon with ID `conditionId`."""
MAP_ICON_EQUIPPED = 14
"""
Equip the map icon with ID `conditionId`. The item is locked again when the map icon is
unequipped.
"""
SYSTEM_VOICE_OBTAINED = 15
"""Unlock the system voice with ID `conditionId`."""
SYSTEM_VOICE_EQUIPPED = 16
"""
Equip the system voice with ID `conditionId`. The item is locked again when the system voice
is unequipped.
"""
ALL_JUSTICE_CRITICAL = 17
"""Obtain ALL JUSTICE CRITICAL on the chart given by `conditionId`."""
RANK_SSSP = 18
"""Obtain rank SSS+ on the chart given by `conditionId`."""
RANK_SSS = 19
"""Obtain rank SSS on the chart given by `conditionId`."""
RANK_SSP = 20
"""Obtain rank SS+ on the chart given by `conditionId`."""
RANK_SS = 21
"""Obtain rank SS on the chart given by `conditionId`."""
RANK_SP = 22
"""Obtain rank S+ on the chart given by `conditionId`."""
RANK_S = 23
"""Obtain rank S on the chart given by `conditionId`."""
RANK_AAA = 24
"""Obtain rank AAA on the chart given by `conditionId`."""
RANK_AA = 25
"""Obtain rank AA on the chart given by `conditionId`."""
RANK_A = 26
"""Obtain rank A on the chart given by `conditionId`."""
MINIMUM_BEST_30_AVERAGE = 27
"""Obtain a best 30 average of at least `conditionId / 100`."""
ALL_JUSTICE = 28
"""Obtain ALL JUSTICE on the chart given by `conditionId`."""
FULL_COMBO = 29
"""Obtain FULL COMBO on the chart given by `conditionId`."""
UNLOCK_CHALLENGE_DISCOVERED = 30
"""Discover/unlock the unlock challenge with ID `conditionId`."""
UNLOCK_CHALLENGE_CLEARED = 31
"""Clear the unlock challenge with ID `conditionId`."""
MINIMUM_RATING = 32
"""Obtain a rating of at least `conditionId / 100`."""
class MapAreaConditionLogicalOperator(Enum):