返回提交历史
Modified
Common/ReaperProgressionDefinitions.cs
+2
-2
Modified
Projectiles/ReaperActionControllerProjectile.cs
+33
-2
Modified
Projectiles/SickleSwingProjectile.cs
+0
-9
XFEstudio/DeathMod
优化基础收魂镰位移与初始成长门槛
e796668
代码差异
3 个文件
+35
-13
@@ -406,14 +406,14 @@ public static class ReaperDefinitions
406
406
if (node == ReaperCommonNode.Damage)
407
407
{
408
408
if (targetLevel <= 3)
409
return ReaperStage.StageI;
409
return ReaperStage.Locked;
410
410
if (targetLevel <= 7)
411
411
return ReaperStage.StageII;
412
412
return ReaperStage.StageIII;
413
413
}
414
414
415
415
if (targetLevel <= 2)
416
return ReaperStage.StageI;
416
return ReaperStage.Locked;
417
417
if (targetLevel <= 4)
418
418
return ReaperStage.StageII;
419
419
return ReaperStage.StageIII;
@@ -15,6 +15,8 @@ namespace SoulHarvest.Projectiles;
15
15
16
16
public sealed class ReaperActionControllerProjectile : ModProjectile
17
17
{
18
private const int BaseDashStartTick = 3;
19
private const int BaseDashTravelFrames = 7;
18
20
private const int VoidSpecialTeleportTick = 2;
19
21
private const int VoidUltimateBlackHoleTick = 32;
20
22
private SickleCombatSnapshot snapshot;
@@ -125,6 +127,7 @@ public sealed class ReaperActionControllerProjectile : ModProjectile
125
127
UpdateChargedSpecial(player);
126
128
else
127
129
UpdateSpecial(player);
130
ApplyBaseDisplacement(player);
128
131
ApplyInfernalDisplacement(player);
129
132
if (Projectile.active)
130
133
{
@@ -665,7 +668,7 @@ public sealed class ReaperActionControllerProjectile : ModProjectile
665
668
switch (snapshot.Form)
666
669
{
667
670
case ReaperFormId.Base:
668
if (timer == 3)
671
if (timer == BaseDashStartTick)
669
672
StartBaseDash(player);
670
673
Vector2 baseOrigin = baseDashReady ? baseDashEnd : origin;
671
674
StrikeAt(11, player, baseOrigin - aim * 18f, aim.RotatedBy(-0.48f),
@@ -1024,12 +1027,40 @@ public sealed class ReaperActionControllerProjectile : ModProjectile
1024
1027
if (Main.netMode == NetmodeID.MultiplayerClient)
1025
1028
return;
1026
1029
Vector2 direction = new Vector2(aim.X, Math.Min(-0.28f, aim.Y)).SafeNormalize(aim);
1027
float acceptedDistance = ReaperMovementHelper.MoveAlong(
1030
float acceptedDistance = ReaperMovementHelper.TraceAlong(
1028
1031
player, direction, 92f, out baseDashStart, out baseDashEnd);
1029
1032
baseDashReady = acceptedDistance > 0f;
1030
1033
Projectile.netUpdate = true;
1031
1034
}
1032
1035
1036
private void ApplyBaseDisplacement(Player player)
1037
{
1038
if (ultimate || snapshot.Form != ReaperFormId.Base || !baseDashReady
1039
|| Main.netMode == NetmodeID.MultiplayerClient
1040
&& Projectile.owner != Main.myPlayer)
1041
{
1042
return;
1043
}
1044
1045
int elapsed = timer - BaseDashStartTick;
1046
if (elapsed < 0 || elapsed > BaseDashTravelFrames)
1047
return;
1048
if (elapsed == BaseDashTravelFrames)
1049
{
1050
player.velocity = Vector2.Zero;
1051
return;
1052
}
1053
1054
Vector2 velocity = (baseDashEnd - baseDashStart) / BaseDashTravelFrames;
1055
if (!float.IsFinite(velocity.X) || !float.IsFinite(velocity.Y))
1056
return;
1057
Vector2 candidate = player.position + velocity;
1058
if (!Collision.SolidCollision(candidate, player.width, player.height))
1059
player.velocity = velocity;
1060
else
1061
player.velocity = Vector2.Zero;
1062
}
1063
1033
1064
private void StrikeInfernalPathAt(int eventTick, Player player, int phase, float width, float multiplier)
1034
1065
{
1035
1066
if (timer != eventTick || Main.netMode == NetmodeID.MultiplayerClient
@@ -576,15 +576,6 @@ public sealed class SickleSwingProjectile : ModProjectile
576
576
// apply a stale local dash several frames late.
577
577
if (timer > 4)
578
578
return;
579
if (snapshot.Form == ReaperFormId.Base && phase == 1)
580
{
581
Vector2 rising = aimRotation.ToRotationVector2();
582
rising.Y = Math.Min(-0.2f, rising.Y);
583
rising = rising.SafeNormalize(new Vector2(player.direction, -0.2f)) * 9.75f;
584
if (!Collision.SolidCollision(player.position + rising, player.width, player.height))
585
player.velocity = rising;
586
return;
587
}
588
579
if (snapshot.Form == ReaperFormId.Infernal)
589
580
{
590
581
float distance = snapshot.Stage switch