返回提交历史
Modified
Projectiles/DeathDomainHarvestSlashProjectile.cs
+13
-33
XFEstudio/DeathMod
修正领域刀光端点与遮挡层级
196120b
代码差异
1 个文件
+13
-33
@@ -140,39 +140,9 @@ public class DeathDomainHarvestSlashProjectile : ModProjectile
140
140
float width = (21f + Mastery * 13f + (IsRequiem ? 8f : 0f)) * Projectile.scale;
141
141
Vector2 center = Projectile.Center - Main.screenPosition;
142
142
143
// Three passes over one continuous high-resolution silhouette produce one
144
// integrated blade. The warning line now splits at its centre and opens
145
// toward both tips, restoring the original execution rhythm.
146
DrawTaperedBladeLayer(center, rotation, length, width * 1.52f, reveal,
147
new Color(92, 0, 22, 0) * (strength * 0.54f));
148
DrawTaperedBladeLayer(center, rotation, length, width, reveal,
149
new Color(255, 8, 48, 255) * strength);
150
DrawTaperedBladeLayer(center, rotation, length * 0.985f, width * 0.62f, reveal,
151
Color.Black * Math.Min(1f, strength * 1.32f));
152
153
Vector2 direction = rotation.ToRotationVector2();
154
Vector2 normal = direction.RotatedBy(MathHelper.PiOver2);
155
float halfRevealLength = length * reveal * 0.5f;
156
Vector2 cuttingEdgeA = center - direction * halfRevealLength;
157
Vector2 cuttingEdgeB = center + direction * halfRevealLength;
158
float spark = (8f + Mastery * 5f) * Projectile.scale * strength;
159
160
DeathDomainPrimitiveTextureSystem.DrawBlade(
161
cuttingEdgeA - normal * spark,
162
normal.ToRotation(),
163
spark * 2f,
164
1.6f + Mastery,
165
new Color(255, 12, 52, 0) * strength);
166
DeathDomainPrimitiveTextureSystem.DrawBlade(
167
cuttingEdgeB - normal * spark,
168
normal.ToRotation(),
169
spark * 2f,
170
1.6f + Mastery,
171
new Color(255, 12, 52, 0) * strength);
172
173
// A second, much longer blood-line races through the black core shortly
174
// after the main blade arrives. It gives the execution a crisp crimson
175
// centre without turning the whole strike into another thick beam.
143
// Draw the long blood-line first. The red-black execution blade is layered
144
// over it below, allowing the crimson line to extend beyond both tips while
145
// the pure-black core remains completely unbroken.
176
146
float bloodReveal = Smooth01((progress - 0.08f) / 0.34f);
177
147
float bloodFade = 1f - Smooth01((progress - 0.64f) / 0.28f);
178
148
float bloodStrength = bloodReveal * bloodFade;
@@ -191,6 +161,16 @@ public class DeathDomainHarvestSlashProjectile : ModProjectile
191
161
(2.4f + Mastery * 0.85f) * Projectile.scale,
192
162
new Color(255, 0, 38, 0) * bloodStrength,
193
163
bloodReveal);
164
165
// Three passes over one continuous high-resolution silhouette produce one
166
// integrated blade. The warning line splits at its centre and opens toward
167
// both tips. No perpendicular tip bars are drawn.
168
DrawTaperedBladeLayer(center, rotation, length, width * 1.52f, reveal,
169
new Color(92, 0, 22, 0) * (strength * 0.54f));
170
DrawTaperedBladeLayer(center, rotation, length, width, reveal,
171
new Color(255, 8, 48, 255) * strength);
172
DrawTaperedBladeLayer(center, rotation, length * 0.985f, width * 0.62f, reveal,
173
Color.Black * Math.Min(1f, strength * 1.32f));
194
174
}
195
175
196
176
private static void DrawTaperedBladeLayer(Vector2 center, float rotation, float length, float maximumWidth, float reveal, Color color)