Boss Effects fixes + BuffTip localization
This commit is contained in:
1 parent
3d4f174cb2
commit
5fb899ae10
6 files changed
+39
-31
No files matched your search
@@ -1,11 +1,14 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class Shadowflame : ModBuff
|
||||
{
|
||||
public override LocalizedText DisplayName => Language.GetOrRegister("BuffName.ShadowFlame");
|
||||
public override LocalizedText Description => Language.GetOrRegister("BuffDescription.ShadowFlame");
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
|
||||
@@ -24,14 +24,8 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
|
||||
public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(512);
|
||||
sb.Append("The nearby boss is:\n");
|
||||
if (CalamityConfig.Instance.BossZen)
|
||||
sb.Append("Greatly reducing enemy spawn rates\n");
|
||||
sb.Append("Increasing Nurse healing cost by 400%\n");
|
||||
sb.Append("Disabling Target and Super Dummy hitboxes");
|
||||
|
||||
tip = sb.ToString();
|
||||
tip = tip.Replace(":", ":\n" + this.GetLocalizedValue("ZenDescription"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,29 +32,29 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
if (player.Calamity().endoCooper)
|
||||
{
|
||||
tip = "An ascended ice construct is suppressing your true potential..";
|
||||
tip = this.GetLocalizedValue("NerfedEndo");
|
||||
}
|
||||
else if (player.Calamity().magicHat)
|
||||
{
|
||||
tip = "A magical hat overwhelms your senses, squandering your true potential..";
|
||||
tip = this.GetLocalizedValue("NerfedHat");
|
||||
}
|
||||
else
|
||||
{
|
||||
bool offense = (Main.dayTime && !player.wet) || player.lavaWet;
|
||||
bool enrage = player.statLife <= (int)(player.statLifeMax2 * 0.5);
|
||||
tip = "You are an emissary of the profaned goddess now!\n" +
|
||||
(offense ? "The " + (Main.dayTime ? "light of the sun" : "heat of the lava") + " empowers your offensive capabilities" :
|
||||
"The " + (player.wet ? (player.honeyWet ? "honey cools" : "water douses") : "darkness of night cools") + " your flames, empowering your defensive capabilities") +
|
||||
(enrage ? "\nYour weakened life force fuels your desperate attacks" : "");
|
||||
tip += "\n" + (offense ? this.GetLocalization("Offense").Format(this.GetLocalizedValue(player.lavaWet ? "Lava" : "Day"))
|
||||
: this.GetLocalization("Defense").Format(this.GetLocalizedValue(player.honeyWet ? "Honey" : (player.wet ? "Water" : "Night"))));
|
||||
|
||||
if (player.statLife <= (int)(player.statLifeMax2 * 0.5))
|
||||
tip += "\n" + this.GetLocalizedValue("Enrage");
|
||||
}
|
||||
}
|
||||
else if (DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs)
|
||||
{
|
||||
tip = "Your profaned soul is constrained by your insufficient summoning powers";
|
||||
tip = this.GetLocalizedValue("LockedSlots");
|
||||
}
|
||||
else
|
||||
{
|
||||
tip = !DownedBossSystem.downedExoMechs ? "The soul within this crystal has been defiled by overwhelming energy waves from dangerous mechanations" : "The profaned soul within has been defiled by the powerful magic of a supreme witch";
|
||||
tip = this.GetLocalizedValue(!DownedBossSystem.downedExoMechs ? "LockedExos" : "LockedSCal");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
//Main.persistentBuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -29,7 +28,7 @@ namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
Player player = Main.player[Main.myPlayer];
|
||||
if (player.Calamity().profanedCrystal && !player.Calamity().profanedCrystalBuffs)
|
||||
tip = "The Profaned Babs will accompany you!";
|
||||
tip = this.GetLocalizedValue("VanityDescription");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -188,11 +188,6 @@ SearingLava: {
|
||||
Description: The brimstone lava sears your flesh
|
||||
}
|
||||
|
||||
Shadowflame: {
|
||||
DisplayName: Shadowflame
|
||||
Description: Losing life
|
||||
}
|
||||
|
||||
ShellfishClaps: {
|
||||
DisplayName: Shellfish Claps
|
||||
Description: Clamfest
|
||||
@@ -668,7 +663,13 @@ BloodyBoost: {
|
||||
|
||||
BossEffects: {
|
||||
DisplayName: Boss Effects
|
||||
Description: This tooltip is edited in the function below
|
||||
Description:
|
||||
'''
|
||||
The nearby boss is:
|
||||
Increasing Nurse healing cost by 400%
|
||||
Disabling Target and Super Dummy hitboxes
|
||||
'''
|
||||
ZenDescription: Greatly reducing enemy spawn rates
|
||||
}
|
||||
|
||||
BrimflameFrenzyBuff: {
|
||||
@@ -783,6 +784,19 @@ PolarisBuff: {
|
||||
ProfanedCrystalBuff: {
|
||||
DisplayName: Devotion
|
||||
Description: You are an emissary of the profaned goddess now!
|
||||
Offense: The {0} empowers your offensive capabilities
|
||||
Lava: heat of the lava
|
||||
Day: light of the sun
|
||||
Defense: The {0} your flames, empowering your defensive capabilities
|
||||
Water: water douses
|
||||
Honey: honey cools
|
||||
Night: darkness of night cools
|
||||
Enrage: Your weakened life force fuels your desperate attacks
|
||||
NerfedEndo: An ascended ice construct is suppressing your true potential...
|
||||
NerfedHat: A magical hat overwhelms your senses, squandering your true potential...
|
||||
LockedSlots: Your profaned soul is constrained by your insufficient summoning powers
|
||||
LockedExos: The soul within this crystal has been defiled by overwhelming energy waves from dangerous mechanations
|
||||
LockedSCal: The profaned soul within has been defiled by the powerful magic of a supreme witch
|
||||
}
|
||||
|
||||
RageMode: {
|
||||
@@ -1305,6 +1319,7 @@ PoleWarperBuff: {
|
||||
ProfanedBabs: {
|
||||
DisplayName: The Profaned Soul
|
||||
Description: The Profaned Babs will fight for and defend you!
|
||||
VanityDescription: The Profaned Babs will accompany you!
|
||||
}
|
||||
|
||||
PuffWarriorBuff: {
|
||||
|
||||
@@ -2793,14 +2793,11 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (KillTime > 0 || npc.type == NPCType<Draedon>())
|
||||
{
|
||||
// If any boss NPC is active, apply Zen to nearby players to reduce spawn rate.
|
||||
if (CalamityConfig.Instance.BossZen)
|
||||
// Apply Boss Effects while any boss NPC is active
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < BossZenDistance)
|
||||
Main.player[Main.myPlayer].AddBuff(BuffType<BossEffects>(), 2);
|
||||
}
|
||||
if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < BossZenDistance)
|
||||
Main.player[Main.myPlayer].AddBuff(BuffType<BossEffects>(), 2);
|
||||
}
|
||||
|
||||
if (npc.type != NPCType<Draedon>())
|
||||
|
||||
Reference in new issue
Block a user