mirror of
https://gitea.tendokyu.moe/Hay1tsme/artemis.git
synced 2026-02-14 11:47:28 +08:00
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:
@@ -8,6 +8,7 @@ from titles.chuni.const import (
|
||||
MapAreaConditionLogicalOperator,
|
||||
MapAreaConditionType,
|
||||
)
|
||||
from titles.chuni.luminous import MysticAreaConditions
|
||||
from titles.chuni.luminousplus import ChuniLuminousPlus
|
||||
|
||||
|
||||
@@ -22,6 +23,38 @@ class ChuniVerse(ChuniLuminousPlus):
|
||||
# Does CARD MAKER 1.35 work this far up?
|
||||
user_data["lastDataVersion"] = "2.30.00"
|
||||
return user_data
|
||||
|
||||
async def handle_get_game_map_area_condition_api_request(self, data: Dict) -> Dict:
|
||||
# There is no game data for this, everything is server side.
|
||||
# However, we can selectively show/hide events as data is imported into the server.
|
||||
events = await self.data.static.get_enabled_events(self.version)
|
||||
event_by_id = {evt["eventId"]: evt for evt in events}
|
||||
conditions = []
|
||||
|
||||
mystic_conditions = MysticAreaConditions(
|
||||
event_by_id,
|
||||
3230401,
|
||||
self.date_time_format,
|
||||
)
|
||||
|
||||
# Mystic Rainbow of VERSE - VERSE ep. I
|
||||
mystic_conditions.add_condition(16006, 3020798, 3230402)
|
||||
|
||||
# Mystic Rainbow of VERSE - VERSE ep. II
|
||||
mystic_conditions.add_condition(16204, 3020799, 3230403)
|
||||
|
||||
# Mystic Rainbow of VERSE - VERSE ep. III
|
||||
mystic_conditions.add_condition(16455, 3020800, 3230404)
|
||||
|
||||
# Mystic Rainbow of VERSE - VERSE ep. IV
|
||||
mystic_conditions.add_condition(16607, 3020802, 3230405)
|
||||
|
||||
conditions += mystic_conditions.conditions
|
||||
|
||||
return {
|
||||
"length": len(conditions),
|
||||
"gameMapAreaConditionList": conditions,
|
||||
}
|
||||
|
||||
async def handle_get_game_course_level_api_request(self, data: Dict) -> Dict:
|
||||
unlock_challenges = await self.data.static.get_unlock_challenges(self.version)
|
||||
@@ -81,9 +114,10 @@ class ChuniVerse(ChuniLuminousPlus):
|
||||
|
||||
unlock_condition = conditions.get(
|
||||
unlock_challenge_id,
|
||||
# default is to unlock for players above 5.00 rating
|
||||
{
|
||||
"type": MapAreaConditionType.TROPHY_OBTAINED.value, # always unlocked
|
||||
"conditionId": 0,
|
||||
"type": MapAreaConditionType.MINIMUM_RATING.value,
|
||||
"conditionId": 500,
|
||||
},
|
||||
)
|
||||
|
||||
@@ -173,7 +207,7 @@ class ChuniVerse(ChuniLuminousPlus):
|
||||
|
||||
user_rec_music_list = [
|
||||
{
|
||||
"musicId": 1, # no idea
|
||||
"musicId": 1, # a song the player recently played
|
||||
# recMusicList is a semi colon-separated list of music IDs and their order comma separated
|
||||
# for some reason, not all music ids are shown in game?!
|
||||
"recMusicList": ";".join(
|
||||
@@ -193,7 +227,8 @@ class ChuniVerse(ChuniLuminousPlus):
|
||||
class UserRecRating:
|
||||
ratingMin: int
|
||||
ratingMax: int
|
||||
# same as recMusicList in get_user_rec_music_api_request
|
||||
# semicolon-delimited list of (musicId, level, sortingKey, score), in the
|
||||
# same format as GetUserRecMusicApi
|
||||
recMusicList: str
|
||||
|
||||
length: int
|
||||
|
||||
Reference in New Issue
Block a user