update death

This commit is contained in:
bridge
2025-12-01 02:05:11 +08:00
parent f047251c0d
commit 39f158bbe8
18 changed files with 185 additions and 66 deletions

View File

@@ -9,6 +9,7 @@ from src.classes.battle import decide_battle, get_assassination_success_rate
from src.classes.story_teller import StoryTeller
from src.classes.normalize import normalize_avatar_name
from src.classes.death import handle_death
from src.classes.death_reason import DeathReason
from src.classes.kill_and_grab import kill_and_grab
if TYPE_CHECKING:
@@ -116,7 +117,7 @@ class Assassinate(InstantAction):
story_event = Event(self.world.month_stamp, story, related_avatars=rel_ids, is_story=True)
# 死亡清理
handle_death(self.world, target)
handle_death(self.world, target, DeathReason.BATTLE)
return [result_event, story_event]
@@ -153,7 +154,7 @@ class Assassinate(InstantAction):
story_event = Event(self.world.month_stamp, story, related_avatars=rel_ids, is_story=True)
if is_fatal:
handle_death(self.world, loser)
handle_death(self.world, loser, DeathReason.BATTLE)
return [result_event, story_event]

View File

@@ -7,6 +7,7 @@ from src.classes.battle import decide_battle, get_effective_strength_pair
from src.classes.story_teller import StoryTeller
from src.classes.normalize import normalize_avatar_name
from src.classes.death import handle_death
from src.classes.death_reason import DeathReason
from src.classes.kill_and_grab import kill_and_grab
class Attack(InstantAction):
@@ -109,6 +110,6 @@ class Attack(InstantAction):
# 如果死亡,执行死亡清理(在故事生成后,保证关系数据可用)
if is_fatal:
handle_death(self.world, loser)
handle_death(self.world, loser, DeathReason.BATTLE)
return [result_event, story_event]