Skip to content

Commit 5bf39cc

Browse files
committed
update
1 parent 6b868c0 commit 5bf39cc

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

Content/ADV/Scenarios/Abysses/OldDukes/Campsites/OldDukeCampsite.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ private static bool ShouldGenerateCampsite(Player player) {
157157
return false;
158158
}
159159

160+
//检查老公爵不在的时候
161+
if (NPC.AnyNPCs(CWRID.NPC_OldDuke)) {
162+
return false;
163+
}
164+
160165
//检查是否在子世界中
161166
if (SubWorldRef.AnyActiveSubWorld()) {
162167
return false;

Content/ADV/Scenarios/Abysses/OldDukes/ModifyOldDuke.cs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ private static bool ShouldLeaveAfterCooperation(Player target) {
121121
}
122122

123123
/// <summary>
124-
/// 判断是否应该将NPC重定向到营地(消失并触发营地对话)
124+
/// 判断是否应该将NPC重定向到营地(消失并触发营地对话)
125125
/// 条件:营地已生成、不在切磋状态、当前玩家是本地玩家、不在服务端
126126
/// </summary>
127127
private static bool ShouldRedirectToCampsite(Player target) {
@@ -262,7 +262,6 @@ private static void TriggerCampsiteScenario() {
262262
public override bool AI() {
263263
canDraw = true;
264264
npc.alpha = 0;
265-
266265
//战败后的潜水离开,优先级最高,无论什么状态都要执行
267266
if (IsInLeavingDive) {
268267
State = (float)OldDukeAIState.LeavingDive;
@@ -285,7 +284,15 @@ public override bool AI() {
285284
return RunStorylineAI();
286285
}
287286

288-
//接受合作后,需要执行离开潜水动画
287+
//营地重定向必须在ShouldLeaveAfterCooperation之前检查
288+
//因为AcceptedCooperation是永久状态,如果先检查ShouldLeaveAfterCooperation,
289+
//营地建成后每次召唤老公爵都会直接进入LeavingDive消失,永远到不了营地重定向
290+
if (ShouldRedirectToCampsite(target)) {
291+
ExecuteCampsiteRedirect();
292+
return false;
293+
}
294+
295+
//接受合作后但营地尚未建立(或当前不在本地玩家视角),执行离开潜水动画
289296
if (ShouldLeaveAfterCooperation(target)) {
290297
if (State != (float)OldDukeAIState.LeavingDive) {
291298
State = (float)OldDukeAIState.LeavingDive;
@@ -295,12 +302,6 @@ public override bool AI() {
295302
return RunStorylineAI();
296303
}
297304

298-
//营地已建立的情况下,NPC实体应该消失并重定向到营地对话
299-
if (ShouldRedirectToCampsite(target)) {
300-
ExecuteCampsiteRedirect();
301-
return false;
302-
}
303-
304305
KillDukeSummonerProjectiles();
305306
//执行原版AI
306307
return true;
@@ -494,11 +495,8 @@ private void HandleLeavingDive() {
494495
}
495496
}
496497
else if (SubState == 1) {
497-
//阶段2:淡出消失
498-
npc.alpha += 15;
499-
npc.velocity *= 0.98f;
500-
501-
if (npc.alpha >= 255 || Timer > 300) {
498+
//阶段2:消失
499+
if (npc.alpha >= 255 || Timer > 120) {
502500
FinalizeDespawn();
503501
}
504502
}

build.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ sortAfter = CalamityMod, InnoVault
44
weakReferences = CalamityMod@2.1, ThoriumMod@1.7.2.4, BossChecklist@2.2.2, MagicStorage@0.7.0.11
55
homepage = https://calamity-overhaul.cc
66
author = HoCha113
7-
version = 0.8069
7+
version = 0.8071
88
includeSource = true

0 commit comments

Comments
 (0)