feat: Add Memorial Arena

This commit is contained in:
Naruse
2024-11-11 10:52:08 +08:00
parent a913ff0697
commit d3ed9eba65
12 changed files with 194 additions and 24 deletions

14
Battle.json Normal file
View File

@@ -0,0 +1,14 @@
{
"endless":
{
"area1":791005,
"grouplevel":8,
"dynamic":510,
"cupnum":1800
},
"memo":
{
"boss_ids": [51021,15026,18225]
}
}

View File

@@ -1,6 +0,0 @@
{
"area1":791005,
"grouplevel":8,
"dynamic":510,
"cupnum":1600
}

View File

@@ -12,6 +12,7 @@ A Server emulator for version 7.9 of a certain adventure anime game
- Universial Mirage - Universial Mirage
- Story Chapter 1 - 42 - Story Chapter 1 - 42
- Character Tutorial - Character Tutorial
- Memorial Arena
## Requirements ## Requirements
@@ -55,10 +56,15 @@ To run the project use cmd or vscode and run
```python ```python
py hi3 py hi3
``` ```
## Changing Stage in Abyss/Memorial Using JSON
## Change Stage Superstring Dimension (Abyss) - **Superstring Dimension (Abyss)**
edit `Endless.json` and set area1 to desire `SiteID` from `UltraEndlessSite.json` Open the `Battle.json` file and update `area1` to the preferred `SiteID` from `UltraEndlessSite.json`.
- **Memorial Arena**
Open the `Battle.json` file and update the `boss_ids` as needed. You can find `boss_id` values in the `BossIdList` within `ExBossMonsterSchedule.json`.
## Use Local Patch Assets ## Use Local Patch Assets
@@ -72,7 +78,7 @@ Join [Discord](https://discord.gg/MdHC4AJvec) for support
- Commands - Commands
- Memorial Arena - ~~Memorial Arena~~
- Elysian Realm - Elysian Realm

View File

@@ -0,0 +1,11 @@
import betterproto
from game_server.net.session import Session
from lib.proto import (
ExBossStageBeginReq,
ExBossStageBeginRsp
)
async def handle(session: Session, msg: ExBossStageBeginReq) -> betterproto.Message:
return ExBossStageBeginRsp(
retcode=0
)

View File

@@ -0,0 +1,13 @@
import betterproto
from game_server.net.session import Session
from lib.proto import (
ExBossStageEndReq,
ExBossStageEndRsp
)
async def handle(session: Session, msg: ExBossStageEndReq) -> betterproto.Message:
return ExBossStageEndRsp(
retcode=0,
boss_id=msg.boss_id,
end_status=msg.end_status
)

View File

@@ -1,4 +1,5 @@
import betterproto import betterproto
import json
from game_server.net.session import Session from game_server.net.session import Session
from lib.proto import ( from lib.proto import (
GetExBossInfoReq, GetExBossInfoReq,
@@ -8,22 +9,20 @@ from lib.proto import (
) )
async def handle(session: Session, msg: GetExBossInfoReq) -> betterproto.Message: async def handle(session: Session, msg: GetExBossInfoReq) -> betterproto.Message:
with open("Battle.json", "r") as file:
data = json.load(file)
return GetExBossInfoRsp( return GetExBossInfoRsp(
retcode=0, retcode=0,
boss_info=ExBossInfo( boss_info=ExBossInfo(
boss_id_list=[ boss_id_list=[
ExBossIdInfo( ExBossIdInfo(
boss_id=48016 boss_id=id
),
ExBossIdInfo(
boss_id=41021
),
ExBossIdInfo(
boss_id=13021
) )
for id in data.get("memo", {}).get("boss_ids", [])
], ],
cur_max_enter_times=714, cur_max_enter_times=18,
rank_id=104, rank_id=104,
schedule_id=10359 schedule_id=10377,
now_schedule_id=10377
) )
) )

View File

@@ -0,0 +1,32 @@
import betterproto
from game_server.net.session import Session
from lib.proto import (
GetExBossRankReq,
GetExBossRankRsp,
RankShowData,
UserRankData
)
async def handle(session: Session, msg: GetExBossRankReq) -> betterproto.Message:
return GetExBossRankRsp(
retcode=0,
rank_id=104,
rank_data=RankShowData(
my_rank=104,
my_rank_type=2,
my_score=116330,
rank_list=[
UserRankData(
avatar_id=3101,
custom_head_id=161099,
dress_id=50217,
frame_id=200080,
nick_name="Miku",
rank=1,
score=119727,
uid=1337
)
]
),
boss_id=51016
)

View File

@@ -3,4 +3,11 @@ from game_server.net.session import Session
from lib.proto import GetExBossScheduleReq, GetExBossScheduleRsp from lib.proto import GetExBossScheduleReq, GetExBossScheduleRsp
async def handle(session: Session, msg: GetExBossScheduleReq) -> betterproto.Message: async def handle(session: Session, msg: GetExBossScheduleReq) -> betterproto.Message:
return GetExBossScheduleRsp(retcode=0) return GetExBossScheduleRsp(
retcode=0,
begin_time=1730750400,
end_time=1931268799,
min_level=38,
rank_id=104,
schedule_id=10377
)

View File

@@ -0,0 +1,10 @@
import betterproto
from game_server.net.session import Session
from lib.proto import GetGodWarLobbyReq,GetGodWarLobbyRsp
async def handle(session: Session, msg: GetGodWarLobbyReq) -> betterproto.Message:
return GetGodWarLobbyRsp(
retcode=0,
god_war_id=1,
lobby_id=2
)

View File

@@ -0,0 +1,66 @@
import betterproto
import random
from game_server.net.session import Session
from lib.proto import (
GodWarEventNotify,
GodWarEventInfo
)
async def handle(session: Session, msg: GodWarEventNotify) -> betterproto.Message:
return GodWarEventNotify(
god_war_id=1,
tale_id=30,
event_list=[
GodWarEventInfo(
event_id=570018,
event_param_list=[
418,
0
],
event_type=33,
source_event_id=57000,
source_type=1
),
GodWarEventInfo(
event_id=3000045,
event_type=10,
source_event_id=5910000,
source_type=1
),
GodWarEventInfo(
event_id=5910000,
event_type=99,
source_event_id=57000,
source_type=1
),
GodWarEventInfo(
event_id=3000045,
event_type=10,
source_event_id=570000,
source_type=1
),
GodWarEventInfo(
event_id=5600145,
event_param_list=[
10,
718,
1
],
event_type=49,
source_event_id=570000,
source_type=1
),
GodWarEventInfo(
event_id=570000,
event_type=99,
source_event_id=57000,
source_type=1
),
GodWarEventInfo(
event_id=57000,
event_type=99,
source_event_id=57000,
source_type=1
)
]
)

View File

@@ -0,0 +1,17 @@
import betterproto
import random
from game_server.net.session import Session
from lib.proto import (
TriggerGodWarEventReq,
TriggerGodWarEventRsp,
GodWarEventNotify,
GodWarEventInfo
)
async def handle(session: Session, msg: TriggerGodWarEventReq) -> betterproto.Message:
return TriggerGodWarEventRsp(
retcode=0,
event_id_list=msg.event_id_list,
god_war_id=1,
tale_id=30
)

View File

@@ -13,13 +13,14 @@ from lib.proto import (
) )
async def handle(session: Session, msg: UltraEndlessGetMainDataReq) -> betterproto.Message: async def handle(session: Session, msg: UltraEndlessGetMainDataReq) -> betterproto.Message:
with open("Endless.json", "r") as file: with open("Battle.json", "r") as file:
data = json.load(file) data = json.load(file)
site = data.get("area1",781009) endless_data = data.get("endless", {})
group = data.get("grouplevel",9) site = endless_data.get("area1", 781009)
dynamic = data.get("dynamic",500) group = endless_data.get("grouplevel", 9)
cupnum = data.get("cupnum",1600) dynamic = endless_data.get("dynamic", 500)
cupnum = endless_data.get("cupnum", 1600)
return UltraEndlessGetMainDataRsp( return UltraEndlessGetMainDataRsp(
retcode=0, retcode=0,
dynamic_hard_level=dynamic, dynamic_hard_level=dynamic,