diff --git a/docs/game_specific_info.md b/docs/game_specific_info.md index 9682bb0..d0fcea3 100644 --- a/docs/game_specific_info.md +++ b/docs/game_specific_info.md @@ -232,6 +232,8 @@ Presents are items given to the user when they login, with a little animation (f | SDEZ | 22 | maimai DX BUDDiES PLUS | | SDEZ | 23 | maimai DX PRiSM | | SDEZ | 24 | maimai DX PRiSM PLUS | +| SDEZ | 25 | maimai DX CiRCLE | +| SDEZ | 26 | maimai DX CiRCLE PLUS | ### Importer diff --git a/readme.md b/readme.md index ab405ef..fc264f0 100644 --- a/readme.md +++ b/readme.md @@ -85,6 +85,7 @@ Games listed below have been tested and confirmed working. Only game versions ol + BUDDiES PLUS + PRiSM + PRiSM PLUS + + CiRCLE + O.N.G.E.K.I. + SUMMER diff --git a/titles/cm/read.py b/titles/cm/read.py index 5eb8632..fc0d7c1 100644 --- a/titles/cm/read.py +++ b/titles/cm/read.py @@ -209,7 +209,9 @@ class CardMakerReader(BaseReader): "1.40": Mai2Constants.VER_MAIMAI_DX_BUDDIES, "1.45": Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS, "1.50": Mai2Constants.VER_MAIMAI_DX_PRISM, - "1.55": Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS + "1.55": Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS, + "1.60": Mai2Constants.VER_MAIMAI_DX_CIRCLE, + "1.65": Mai2Constants.VER_MAIMAI_DX_CIRCLE_PLUS } for root, dirs, files in os.walk(base_dir): diff --git a/titles/mai2/circle.py b/titles/mai2/circle.py new file mode 100644 index 0000000..dc2b0e0 --- /dev/null +++ b/titles/mai2/circle.py @@ -0,0 +1,20 @@ +from typing import Dict + +from core.config import CoreConfig +from titles.mai2.prismplus import Mai2PrismPlus +from titles.mai2.const import Mai2Constants +from titles.mai2.config import Mai2Config + + +class Mai2Circle(Mai2PrismPlus): + def __init__(self, cfg: CoreConfig, game_cfg: Mai2Config) -> None: + super().__init__(cfg, game_cfg) + self.version = Mai2Constants.VER_MAIMAI_DX_CIRCLE + + 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) + + # hardcode lastDataVersion for CardMaker + user_data["lastDataVersion"] = "1.60.00" + return user_data + diff --git a/titles/mai2/circleplus.py b/titles/mai2/circleplus.py new file mode 100644 index 0000000..7ca3cb0 --- /dev/null +++ b/titles/mai2/circleplus.py @@ -0,0 +1,25 @@ +from typing import Dict + +from core.config import CoreConfig +from titles.mai2.circle import Mai2Circle +from titles.mai2.const import Mai2Constants +from titles.mai2.config import Mai2Config + + +class Mai2CirclePlus(Mai2Circle): + def __init__(self, cfg: CoreConfig, game_cfg: Mai2Config) -> None: + super().__init__(cfg, game_cfg) + self.version = Mai2Constants.VER_MAIMAI_DX_CIRCLE_PLUS + + 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) + + # hardcode lastDataVersion for CardMaker + user_data["lastDataVersion"] = "1.65.00" + return user_data + + async def handle_get_game_national_data_api_request(self, data: Dict) -> Dict: + return { + "nextIndex": 0, + "nationalDataList": [] + } diff --git a/titles/mai2/const.py b/titles/mai2/const.py index 117ba6f..046c619 100644 --- a/titles/mai2/const.py +++ b/titles/mai2/const.py @@ -62,6 +62,8 @@ class Mai2Constants: VER_MAIMAI_DX_BUDDIES_PLUS = 22 VER_MAIMAI_DX_PRISM = 23 VER_MAIMAI_DX_PRISM_PLUS = 24 + VER_MAIMAI_DX_CIRCLE = 25 + VER_MAIMAI_DX_CIRCLE_PLUS = 26 VERSION_STRING = ( "maimai", @@ -88,7 +90,9 @@ class Mai2Constants: "maimai DX BUDDiES", "maimai DX BUDDiES PLUS", "maimai DX PRiSM", - "maimai DX PRiSM PLUS" + "maimai DX PRiSM PLUS", + "maimai DX CiRCLE", + "maimai DX CiRCLE PLUS" ) KALEIDXSCOPE_KEY_CONDITION={ 1: [11009, 11008, 11100, 11097, 11098, 11099, 11163, 11162, 11161, 11228, 11229, 11231, 11463, 11464, 11465, 11538, 11539, 11541, 11620, 11622, 11623, 11737, 11738, 11164, 11230, 11466, 11540, 11621, 11739], @@ -140,7 +144,9 @@ class Mai2Constants: "140": VER_MAIMAI_DX_BUDDIES, "145": VER_MAIMAI_DX_BUDDIES_PLUS, "150": VER_MAIMAI_DX_PRISM, - "155": VER_MAIMAI_DX_PRISM_PLUS + "155": VER_MAIMAI_DX_PRISM_PLUS, + "160": VER_MAIMAI_DX_CIRCLE, + "165": VER_MAIMAI_DX_CIRCLE_PLUS } @classmethod diff --git a/titles/mai2/index.py b/titles/mai2/index.py index d753379..70b8226 100644 --- a/titles/mai2/index.py +++ b/titles/mai2/index.py @@ -33,6 +33,8 @@ from .buddies import Mai2Buddies from .buddiesplus import Mai2BuddiesPlus from .prism import Mai2Prism from .prismplus import Mai2PrismPlus +from .circle import Mai2Circle +from .circleplus import Mai2CirclePlus class Mai2Servlet(BaseServlet): @@ -70,7 +72,9 @@ class Mai2Servlet(BaseServlet): Mai2Buddies, Mai2BuddiesPlus, Mai2Prism, - Mai2PrismPlus + Mai2PrismPlus, + Mai2Circle, + Mai2CirclePlus ] self.logger = logging.getLogger("mai2") @@ -349,8 +353,12 @@ class Mai2Servlet(BaseServlet): internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS elif version >= 150 and version < 155: internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM - elif version >= 155: + elif version >= 155 and version < 160: internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS + elif version >= 160 and version < 165: + internal_ver = Mai2Constants.VER_MAIMAI_DX_CIRCLE + elif version >= 165: + internal_ver = Mai2Constants.VER_MAIMAI_DX_CIRCLE_PLUS elif game_code == "SDGA": # Int if version < 105: # 1.0 @@ -375,9 +383,13 @@ class Mai2Servlet(BaseServlet): internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS elif version >= 150 and version < 155: internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM - elif version >= 155: + elif version >= 155 and version < 160: internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS - + elif version >= 160 and version < 165: + internal_ver = Mai2Constants.VER_MAIMAI_DX_CIRCLE + elif version >= 165: + internal_ver = Mai2Constants.VER_MAIMAI_DX_CIRCLE_PLUS + elif game_code == "SDGB": # Chn if version < 110: # Muji internal_ver = Mai2Constants.VER_MAIMAI_DX