[Bug fix] API for Link Play

- Fix a bug that API for Link Play cannot work
- Add an example breached map #148
This commit is contained in:
Lost-MSth
2024-02-20 23:04:58 +08:00
parent 9d096f480b
commit 50369d1f23
5 changed files with 88 additions and 7 deletions

View File

@@ -74,7 +74,6 @@ It is just so interesting. What it can do is under exploration.
[这里 Here](https://github.com/Lost-MSth/Arcaea-server/releases)
[Arcaea-CN official](https://arcaea.lowiro.com/zh)
[Arcaea-Konmai Academy](https://616.sb)
## 更新日志 Update log

View File

@@ -936,8 +936,9 @@ class WorldLawMixin:
def _over100_step50(self) -> None:
'''PROG = OVER + STEP / 2'''
self.new_law_prog = self.character_used.overdrive_value + \
self.character_used.prog_value / 2
over = self.character_used.overdrive_value + self.over_skill_increase
prog = self.character_used.prog_value + self.prog_skill_increase
self.new_law_prog = over + prog / 2
def _frag50(self) -> None:
'''PROG x= FRAG'''
@@ -950,9 +951,10 @@ class WorldLawMixin:
def _antiheroism(self) -> None:
'''PROG = OVER - ||OVER-FRAG|-|OVER-STEP||'''
over = self.character_used.overdrive_value
over = self.character_used.overdrive_value + self.over_skill_increase
prog = self.character_used.prog_value + self.prog_skill_increase
x = abs(over - self.character_used.frag_value)
y = abs(over - self.character_used.prog_value)
y = abs(over - prog)
self.new_law_prog = over - abs(x - y)

View File

@@ -0,0 +1,80 @@
{
"map_id": "byd_inkarusi",
"is_legacy": false,
"character_affinity": [],
"affinity_multiplier": [],
"chapter": 2001,
"available_from": -1,
"available_to": 9999999999999,
"is_repeatable": false,
"require_id": "inkarusi2",
"require_type": "chart_unlock",
"is_breached": true,
"stamina_cost": 3,
"new_law": "over100_step50",
"disable_over": true,
"coordinate": "500,0",
"beyond_health": 200,
"step_count": 5,
"custom_bg": "",
"is_beyond": true,
"requires": [
{
"type": "chart_unlock",
"id": "inkarusi2"
}
],
"steps": [
{
"map_id": "byd_inkarusi",
"position": 0,
"capture": 50
},
{
"map_id": "byd_inkarusi",
"position": 1,
"capture": 50,
"items": [
{
"type": "core",
"id": "core_generic",
"amount": 2
}
]
},
{
"map_id": "byd_inkarusi",
"position": 2,
"capture": 50,
"items": [
{
"type": "fragment",
"amount": 500
}
]
},
{
"map_id": "byd_inkarusi",
"position": 3,
"capture": 50,
"items": [
{
"type": "core",
"id": "core_generic",
"amount": 2
}
]
},
{
"map_id": "byd_inkarusi",
"position": 4,
"capture": 0,
"items": [
{
"id": "inkarusi3",
"type": "world_song"
}
]
}
]
}

View File

@@ -120,7 +120,7 @@ class TCPRouter:
r = getattr(self, self.endpoint)()
except Exception as e:
logging.error(e)
return 999
return {'code': 999}
if isinstance(r, int):
return {'code': r}
return {

View File

@@ -104,7 +104,7 @@ class Room:
def to_dict(self) -> dict:
p = [i.to_dict() for i in self.players if i.player_id != 0]
for i in p:
i['is_host'] = i['player_id'] == self.host_id
i['is_host'] = i['multiplay_player_id'] == self.host_id
return {
'room_id': self.room_id,
'room_code': self.room_code,