mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-10 18:07:28 +08:00
[Enhance] Support 'skill_hikari_vanessa'
- Add support for the skill 'skill_hikari_vanessa' - For Arcaea 4.6.0
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from .config_manager import Config
|
||||
|
||||
ARCAEA_SERVER_VERSION = 'v2.11.2.1'
|
||||
ARCAEA_SERVER_VERSION = 'v2.11.2.2'
|
||||
ARCAEA_LOG_DATBASE_VERSION = 'v1.1'
|
||||
|
||||
|
||||
|
||||
@@ -223,8 +223,9 @@ class UserPlay(UserScore):
|
||||
self.course_play: 'CoursePlay' = None
|
||||
|
||||
self.combo_interval_bonus: int = None # 不能给 None 以外的默认值
|
||||
self.skill_ilith_ivy_flag: str = None
|
||||
self.skill_cytusii_flag: str = None
|
||||
self.highest_health: int = None
|
||||
self.lowest_health: int = None
|
||||
|
||||
def to_dict(self) -> dict:
|
||||
# 不能super
|
||||
@@ -302,17 +303,17 @@ class UserPlay(UserScore):
|
||||
self.fragment_multiply = int(x[9])
|
||||
self.prog_boost_multiply = int(x[10])
|
||||
self.beyond_boost_gauge_usage = int(x[11])
|
||||
self.skill_ilith_ivy_flag = x[12]
|
||||
self.skill_cytusii_flag = x[12]
|
||||
self.is_world_mode = True
|
||||
self.course_play_state = -1
|
||||
|
||||
def set_play_state_for_world(self, stamina_multiply: int = 1, fragment_multiply: int = 100, prog_boost_multiply: int = 0, beyond_boost_gauge_usage: int = 0, skill_ilith_ivy_flag: str = None) -> None:
|
||||
def set_play_state_for_world(self, stamina_multiply: int = 1, fragment_multiply: int = 100, prog_boost_multiply: int = 0, beyond_boost_gauge_usage: int = 0, skill_cytusii_flag: str = None) -> None:
|
||||
self.song_token = b64encode(urandom(64)).decode()
|
||||
self.stamina_multiply = int(stamina_multiply)
|
||||
self.fragment_multiply = int(fragment_multiply)
|
||||
self.prog_boost_multiply = int(prog_boost_multiply)
|
||||
self.beyond_boost_gauge_usage = int(beyond_boost_gauge_usage)
|
||||
self.skill_ilith_ivy_flag = skill_ilith_ivy_flag
|
||||
self.skill_cytusii_flag = skill_cytusii_flag
|
||||
if self.prog_boost_multiply != 0 or self.beyond_boost_gauge_usage != 0:
|
||||
self.c.execute('''select prog_boost, beyond_boost_gauge from user where user_id=:a''', {
|
||||
'a': self.user.user_id})
|
||||
@@ -325,7 +326,7 @@ class UserPlay(UserScore):
|
||||
|
||||
self.clear_play_state()
|
||||
self.c.execute('''insert into songplay_token values(:t,:a,:b,:c,'',-1,0,0,:d,:e,:f,:g,:h)''', {
|
||||
'a': self.user.user_id, 'b': self.song.song_id, 'c': self.song.difficulty, 'd': self.stamina_multiply, 'e': self.fragment_multiply, 'f': self.prog_boost_multiply, 'g': self.beyond_boost_gauge_usage, 'h': self.skill_ilith_ivy_flag, 't': self.song_token})
|
||||
'a': self.user.user_id, 'b': self.song.song_id, 'c': self.song.difficulty, 'd': self.stamina_multiply, 'e': self.fragment_multiply, 'f': self.prog_boost_multiply, 'g': self.beyond_boost_gauge_usage, 'h': self.skill_cytusii_flag, 't': self.song_token})
|
||||
|
||||
self.user.select_user_about_current_map()
|
||||
self.user.current_map.select_map_info()
|
||||
|
||||
@@ -653,20 +653,13 @@ class WorldPlay:
|
||||
self.user.current_map.update()
|
||||
|
||||
def before_calculate(self) -> None:
|
||||
if self.user_play.beyond_gauge == 0:
|
||||
if self.character_used.character_id == 35 and self.character_used.skill_id_displayed:
|
||||
self._special_tempest()
|
||||
elif self.character_used.skill_id_displayed == 'ilith_awakened_skill':
|
||||
self._ilith_awakened_skill()
|
||||
elif self.character_used.skill_id_displayed == 'skill_mithra':
|
||||
self._skill_mithra()
|
||||
else:
|
||||
if self.character_used.skill_id_displayed == 'skill_vita':
|
||||
self._skill_vita()
|
||||
if self.character_used.skill_id_displayed == 'skill_mika':
|
||||
self._skill_mika()
|
||||
elif self.character_used.skill_id_displayed == 'skill_ilith_ivy':
|
||||
self._skill_ilith_ivy()
|
||||
factory_dict = {'skill_vita': self._skill_vita, 'skill_mika': self._skill_mika, 'skill_ilith_ivy': self._skill_ilith_ivy,
|
||||
'skill_mithra': self._skill_mithra, 'ilith_awakened_skill': self._ilith_awakened_skill, 'skill_hikari_vanessa': self._skill_hikari_vanessa}
|
||||
if self.user_play.beyond_gauge == 0 and self.character_used.character_id == 35 and self.character_used.skill_id_displayed:
|
||||
self._special_tempest()
|
||||
|
||||
if self.character_used.skill_id_displayed in factory_dict:
|
||||
factory_dict[self.character_used.skill_id_displayed]()
|
||||
|
||||
def after_climb(self) -> None:
|
||||
factory_dict = {'eto_uncap': self._eto_uncap, 'ayu_uncap': self._ayu_uncap,
|
||||
@@ -781,11 +774,22 @@ class WorldPlay:
|
||||
|
||||
def _skill_ilith_ivy(self) -> None:
|
||||
'''
|
||||
ilith & ivy 技能,根据 skill_ilith_ivy_flag 来增加三个数值,最高生命每过 20 就对应数值 +10
|
||||
ilith & ivy 技能,根据 skill_cytusii_flag 来增加三个数值,最高生命每过 20 就对应数值 +10
|
||||
'''
|
||||
if not self.user_play.skill_ilith_ivy_flag:
|
||||
if not self.user_play.skill_cytusii_flag:
|
||||
return
|
||||
x = self.user_play.skill_ilith_ivy_flag[:
|
||||
self.user_play.highest_health // 20]
|
||||
x = self.user_play.skill_cytusii_flag[:
|
||||
self.user_play.highest_health // 20]
|
||||
self.over_skill_increase = x.count('2') * 10
|
||||
self.prog_skill_increase = x.count('1') * 10
|
||||
|
||||
def _skill_hikari_vanessa(self) -> None:
|
||||
'''
|
||||
hikari & vanessa 技能,根据 skill_cytusii_flag 来减少三个数值,最高生命每过 20 就对应数值 -10
|
||||
'''
|
||||
if not self.user_play.skill_cytusii_flag:
|
||||
return
|
||||
x = self.user_play.skill_cytusii_flag[:5 -
|
||||
self.user_play.lowest_health // 20]
|
||||
self.over_skill_increase = -x.count('2') * 10
|
||||
self.prog_skill_increase = -x.count('1') * 10
|
||||
|
||||
Reference in New Issue
Block a user