XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

DeathMod

【Terraria】DeathMod (now aka Soul Harvest)

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/DeathMod

解除领域武器限制并微调范围

6983378
XFE工作室室长 <mail@xfegzs.com>
提交于

代码差异

2 个文件 +3 -11
Modified Common/MyPlayer.cs +0 -9
@@ -391,9 +391,6 @@ public class MyPlayer : ModPlayer
391 391
392 392 ReceiveDeathDomainState(!DeathDomainEnabled);
393 393 DeathMod.SendDeathDomainState(Player, DeathDomainEnabled);
394 Main.NewText(Language.GetTextValue(DeathDomainEnabled
395 ? "Mods.DeathMod.Messages.DeathDomainEnabled"
396 : "Mods.DeathMod.Messages.DeathDomainDisabled"), new Color(90, 225, 240));
397 394 }
398 395
399 396 internal void SetDeathNecklace(DeathNecklace necklace)
@@ -431,12 +428,6 @@ public class MyPlayer : ModPlayer
431 428 if (Main.netMode == NetmodeID.MultiplayerClient)
432 429 return;
433 430
434 if (Player.HeldItem.ModItem is not (NormalSickle or LegacyDeath))
435 {
436 ClearDeathDomainTelegraphs();
437 return;
438 }
439
440 431 ApplyDeathDomainForces(necklace);
441 432 List<NPC> targets = FindDeathDomainTargets(necklace);
442 433 float visualMastery = MathHelper.Clamp((necklace.MasteryScore - 5f) / 65f, 0f, 1f);
Modified Items/DeathNecklace.cs +3 -2
@@ -16,6 +16,7 @@ public class DeathNecklace : ModItem, IDeathAltarUpgradeable
16 16 {
17 17 public const int MaxCoreLevel = 10;
18 18 public const int MaxVolleyLevel = 5;
19 public const float RadiusGrowthPerLevel = 33f;
19 20
20 21 private static readonly DeathAltarUpgradeType[] UpgradeTypes =
21 22 [
@@ -32,7 +33,7 @@ public class DeathNecklace : ModItem, IDeathAltarUpgradeable
32 33 public int VolleyLevel { get; private set; } = 1;
33 34 public bool SovereigntyUnlocked { get; private set; }
34 35
35 public float DomainRadius => 160f + (RadiusLevel - 1) * 32f;
36 public float DomainRadius => 160f + (RadiusLevel - 1) * RadiusGrowthPerLevel;
36 37 public float DomainAttractionRadius => DomainRadius + 320f + (RadiusLevel - 1) * 32f;
37 38 public float DomainAttractionStrength => 0.035f + (RadiusLevel - 1) * 0.0075f;
38 39 public float DomainAttractionMaximumSpeed => 0.75f + (RadiusLevel - 1) * 0.09f;
@@ -150,7 +151,7 @@ public class DeathNecklace : ModItem, IDeathAltarUpgradeable
150 151
151 152 public string GetNextUpgradeValue(DeathAltarUpgradeType type) => type switch
152 153 {
153 DeathAltarUpgradeType.NecklaceRadius => $"{(DomainRadius + 32f) / 16f:0.#} tiles",
154 DeathAltarUpgradeType.NecklaceRadius => $"{(DomainRadius + RadiusGrowthPerLevel) / 16f:0.#} tiles",
154 155 DeathAltarUpgradeType.NecklaceFrequency => $"{Math.Max(34, SpawnInterval - 7) / 60f:0.##}s",
155 156 DeathAltarUpgradeType.NecklaceDamage => FormatSlashDamage(NormalSlashLifeRatio + 0.01f, BossSlashLifeRatio + 0.0001f),
156 157 DeathAltarUpgradeType.NecklaceVolley => $"×{SlashCount + 1}",