forked from Dniel97/artemis
245 lines
11 KiB
Python
245 lines
11 KiB
Python
from typing import Dict
|
|
|
|
from core.config import CoreConfig
|
|
from titles.chuni.sunplus import ChuniSunPlus
|
|
from titles.chuni.const import ChuniConstants, MapAreaConditionLogicalOperator, MapAreaConditionType
|
|
from titles.chuni.config import ChuniConfig
|
|
|
|
|
|
class ChuniLuminous(ChuniSunPlus):
|
|
def __init__(self, core_cfg: CoreConfig, game_cfg: ChuniConfig) -> None:
|
|
super().__init__(core_cfg, game_cfg)
|
|
self.version = ChuniConstants.VER_CHUNITHM_LUMINOUS
|
|
|
|
async def handle_cm_get_user_preview_api_request(self, data: Dict) -> Dict:
|
|
user_data = await super().handle_cm_get_user_preview_api_request(data)
|
|
|
|
# Does CARD MAKER 1.35 work this far up?
|
|
user_data["lastDataVersion"] = "2.20.00"
|
|
return user_data
|
|
|
|
async def handle_get_user_c_mission_api_request(self, data: Dict) -> Dict:
|
|
user_id = data["userId"]
|
|
mission_id = data["missionId"]
|
|
|
|
progress_list = []
|
|
point = 0
|
|
|
|
mission_data = await self.data.item.get_cmission(user_id, mission_id)
|
|
progress_data = await self.data.item.get_cmission_progress(user_id, mission_id)
|
|
|
|
if mission_data and progress_data:
|
|
point = mission_data["point"]
|
|
|
|
for progress in progress_data:
|
|
progress_list.append(
|
|
{
|
|
"order": progress["order"],
|
|
"stage": progress["stage"],
|
|
"progress": progress["progress"],
|
|
}
|
|
)
|
|
|
|
return {
|
|
"userId": user_id,
|
|
"missionId": mission_id,
|
|
"point": point,
|
|
"userCMissionProgressList": progress_list,
|
|
}
|
|
|
|
async def handle_get_user_net_battle_ranking_info_api_request(self, data: Dict) -> Dict:
|
|
user_id = data["userId"]
|
|
|
|
net_battle = {}
|
|
net_battle_data = await self.data.profile.get_net_battle(user_id)
|
|
|
|
if net_battle_data:
|
|
net_battle = {
|
|
"isRankUpChallengeFailed": net_battle_data["isRankUpChallengeFailed"],
|
|
"highestBattleRankId": net_battle_data["highestBattleRankId"],
|
|
"battleIconId": net_battle_data["battleIconId"],
|
|
"battleIconNum": net_battle_data["battleIconNum"],
|
|
"avatarEffectPoint": net_battle_data["avatarEffectPoint"],
|
|
}
|
|
|
|
return {
|
|
"userId": user_id,
|
|
"userNetBattleData": net_battle,
|
|
}
|
|
|
|
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.
|
|
# TODO: Figure out conditions for 1UM1N0US ep.111
|
|
return {
|
|
"length": "7",
|
|
"gameMapAreaConditionList": [
|
|
# Secret AREA: MUSIC GAME
|
|
{
|
|
"mapAreaId": "2206201", # BlythE ULTIMA
|
|
"length": "1",
|
|
# Obtain the trophy "MISSION in progress", which is only available
|
|
# when running the first CHUNITHM mission
|
|
"mapAreaConditionList": [
|
|
{
|
|
"type": MapAreaConditionType.TROPHY_OBTAINED.value,
|
|
"conditionId": "6832",
|
|
"logicalOpe": MapAreaConditionLogicalOperator.AND.value,
|
|
"startDate": "2023-12-14 07:00:00.0",
|
|
"endDate": "2024-01-25 02:00:00.0",
|
|
}
|
|
],
|
|
},
|
|
{
|
|
"mapAreaId": "2206202", # PRIVATE SERVICE ULTIMA
|
|
"length": "1",
|
|
# Obtain the trophy "MISSION in progress", which is only available
|
|
# when running the first CHUNITHM mission
|
|
"mapAreaConditionList": [
|
|
{
|
|
"type": MapAreaConditionType.TROPHY_OBTAINED.value,
|
|
"conditionId": "6832",
|
|
"logicalOpe": MapAreaConditionLogicalOperator.AND.value,
|
|
"startDate": "2023-12-14 07:00:00.0",
|
|
"endDate": "2024-01-25 02:00:00.0",
|
|
}
|
|
],
|
|
},
|
|
{
|
|
"mapAreaId": "2206203", # New York Back Raise
|
|
"length": "1",
|
|
# SS NightTheater's EXPERT chart and get the title
|
|
# "今宵、劇場に映し出される景色とは――――。"
|
|
"mapAreaConditionList": [
|
|
{
|
|
"type": MapAreaConditionType.TROPHY_OBTAINED.value,
|
|
"conditionId": "6833",
|
|
"logicalOpe": MapAreaConditionLogicalOperator.AND.value,
|
|
"startDate": "2023-12-14 07:00:00.0",
|
|
"endDate": "2099-12-31 00:00:00.0",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
"mapAreaId": "2206204", # Spasmodic
|
|
"length": "2",
|
|
# - Get 1 miss on Random (any difficulty) and get the title "当たり待ち"
|
|
# - Get 1 miss on 花たちに希望を (any difficulty) and get the title "花たちに希望を"
|
|
"mapAreaConditionList": [
|
|
{
|
|
"type": MapAreaConditionType.TROPHY_OBTAINED.value,
|
|
"conditionId": "6834",
|
|
"logicalOpe": MapAreaConditionLogicalOperator.AND.value,
|
|
"startDate": "2023-12-14 07:00:00.0",
|
|
"endDate": "2099-12-31 00:00:00.0",
|
|
},
|
|
{
|
|
"type": MapAreaConditionType.TROPHY_OBTAINED.value,
|
|
"conditionId": "6835",
|
|
"logicalOpe": MapAreaConditionLogicalOperator.AND.value,
|
|
"startDate": "2023-12-14 07:00:00.0",
|
|
"endDate": "2099-12-31 00:00:00.0",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
"mapAreaId": "2206205", # ΩΩPARTS
|
|
"length": "2",
|
|
# - S Sage EXPERT to get the title "マターリ進行キボンヌ"
|
|
# - Equip this title and play cab-to-cab with another person with this title
|
|
# to get "マターリしようよ"
|
|
"mapAreaConditionList": [
|
|
{
|
|
"type": MapAreaConditionType.TROPHY_OBTAINED.value,
|
|
"conditionId": "6836",
|
|
"logicalOpe": MapAreaConditionLogicalOperator.AND.value,
|
|
"startDate": "2023-12-14 07:00:00.0",
|
|
"endDate": "2099-12-31 00:00:00.0",
|
|
},
|
|
{
|
|
"type": MapAreaConditionType.TROPHY_OBTAINED.value,
|
|
"conditionId": "6837",
|
|
"logicalOpe": MapAreaConditionLogicalOperator.AND.value,
|
|
"startDate": "2023-12-14 07:00:00.0",
|
|
"endDate": "2024-01-25 02:00:00.0",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
"mapAreaId": "2206206", # Blow My Mind
|
|
"length": "1",
|
|
# SS on CHAOS EXPERT, Hydra EXPERT, Surive EXPERT and Jakarta PROGRESSION EXPERT
|
|
# to get the title "Can you hear me?"
|
|
"mapAreaConditionList": [
|
|
{
|
|
"type": MapAreaConditionType.TROPHY_OBTAINED.value,
|
|
"conditionId": "6838",
|
|
"logicalOpe": MapAreaConditionLogicalOperator.AND.value,
|
|
"startDate": "2023-12-14 07:00:00.0",
|
|
"endDate": "2099-12-31 00:00:00.0",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
"mapAreaId": "2206207", # VALLIS-NERIA
|
|
"length": "6",
|
|
# Finish the 6 other areas
|
|
"mapAreaConditionList": [
|
|
{
|
|
"type": MapAreaConditionType.MAP_AREA_CLEARED.value,
|
|
"conditionId": str(x),
|
|
"logicalOpe": MapAreaConditionLogicalOperator.AND.value,
|
|
"startDate": "2023-12-14 07:00:00.0",
|
|
"endDate": "2099-12-31 00:00:00.0",
|
|
}
|
|
for x in range(2206201, 2206207)
|
|
],
|
|
},
|
|
# {
|
|
# "mapAreaId": "3229301", # Mystic Rainbow of LUMINOUS Area 1
|
|
# "length": "1",
|
|
# # Unlocks when any of the mainline LUMINOUS maps are completed?
|
|
# "mapAreaConditionList": [
|
|
# # TODO
|
|
# ]
|
|
# },
|
|
# {
|
|
# "mapAreaId": "3229302", # Mystic Rainbow of LUMINOUS Area 2
|
|
# "length": "5",
|
|
# # Unlocks when LUMINOUS ep. I is completed
|
|
# "mapAreaConditionList": [
|
|
# {
|
|
# "type": MapAreaConditionType.MAP_AREA_CLEARED.value,
|
|
# "conditionId": str(x),
|
|
# "logicalOpe": MapAreaConditionLogicalOperator.AND.value,
|
|
# "startDate": "2023-12-14 07:00:00.0",
|
|
# "endDate": "2099-12-31 00:00:00.0",
|
|
# }
|
|
# for x in range(3220101, 3220106)
|
|
# ]
|
|
# },
|
|
# {
|
|
# "mapAreaId": "3229303", # Mystic Rainbow of LUMINOUS Area 3
|
|
# "length": "5",
|
|
# # Unlocks when LUMINOUS ep. II is completed
|
|
# "mapAreaConditionList": [
|
|
# {
|
|
# "type": MapAreaConditionType.MAP_AREA_CLEARED.value,
|
|
# "conditionId": str(x),
|
|
# "logicalOpe": MapAreaConditionLogicalOperator.AND.value,
|
|
# "startDate": "2023-12-14 07:00:00.0",
|
|
# "endDate": "2099-12-31 00:00:00.0",
|
|
# }
|
|
# for x in range(3220201, 3220206)
|
|
# ]
|
|
# },
|
|
# {
|
|
# "mapAreaId": "3229304", # Mystic Rainbow of LUMINOUS Area 4
|
|
# "length": "5",
|
|
# # Unlocks when LUMINOUS ep. III is completed
|
|
# "mapAreaConditionList": [
|
|
|
|
# ]
|
|
# }
|
|
],
|
|
}
|