mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2025-12-14 08:06:23 +08:00
[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:
@@ -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)
|
||||
|
||||
|
||||
|
||||
80
latest version/database/map/byd_inkarusi.json
Normal file
80
latest version/database/map/byd_inkarusi.json
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user