This commit is contained in:
mountaindrew10 committed 2024-08-15 20:21:24 -05:00
commit bcbf31dabe
218 files changed
+3568 -1759

No files matched your search

+68 -33
View File
@@ -3,26 +3,52 @@ using Terraria.ModLoader;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using ReLogic.Content;
using Terraria.ID;
namespace CalamityMod.Backgrounds
{
internal static class SunkenSeaBurrowsBG
public class SunkenSeaBurrowsBG : ModSystem
{
public static void Load()
public override void Load()
{
if (Main.dedServ)
{
return;
}
On_Main.DrawBackgroundBlackFill += DrawBurrowsBG;
On_Main.DrawBackgroundBlackFill += On_Main_DrawBackgroundBlackFill;
}
public static float Transparency;
/// <summary>
/// This code runs because there is a system in vanilla that causes backgrounds to not draw if lighting is too low.
/// That would be fine, the problem arises because sloped tiles still block light the same way normal tiles do.
/// Which means that the background will occasionally be blocked by slopes as though said slopes were full squares.
/// This is a hacky method that sets the light level of every sloped tile *AT LEAST* high enough to render the background while in the Burrows.
///
/// ENNWAY's note:
/// if this doesn't get fixed in 1.4.5 i am throwing really big rocks at unsuspecting re logic employees
/// </summary>
public override void PreUpdatePlayers()
{
if (!Main.dedServ && Main.LocalPlayer.InModBiome<BiomeManagers.SunkenSeaBurrowsBiome>())
{
for (int i = 0; i < Main.screenWidth / 16; i++)
{
for (int j = 0; j < Main.screenWidth / 16; j++)
{
Point pos = (Main.screenPosition / 16).ToPoint() + new Point(i, j);
public static float TransitionSpeed => 0.02f;
if (Main.tile[pos.X, pos.Y].Slope != SlopeType.Solid)
{
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.1f);
}
}
}
}
}
private static void DrawBurrowsBG(On_Main.orig_DrawBackgroundBlackFill orig, Main self)
private void On_Main_DrawBackgroundBlackFill(On_Main.orig_DrawBackgroundBlackFill orig, Main self)
{
if (Main.gameMenu || Main.screenPosition.Y + Main.screenHeight < ((int)Main.worldSurface) * 16f)
{
@@ -33,6 +59,15 @@ namespace CalamityMod.Backgrounds
orig(self);
DrawBurrowsBG();
}
public static float Transparency;
public static float TransitionSpeed => 0.02f;
private static void DrawBurrowsBG()
{
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.SunkenSeaBurrowsBiome>()))
{
Transparency += TransitionSpeed;
@@ -75,54 +110,54 @@ namespace CalamityMod.Backgrounds
switch (Layers)
{
case 0:
{
zero.Y += 800f;
break;
}
{
zero.Y += 800f;
break;
}
case 1:
{
zero.Y += 200f;
break;
}
{
zero.Y += 200f;
break;
}
case 2:
{
zero.Y += 450f;
break;
}
{
zero.Y += 450f;
break;
}
case 3:
{
zero.Y += 45f;
break;
}
{
zero.Y += 45f;
break;
}
case 4:
{
zero.Y += 45f;
break;
}
{
zero.Y += 45f;
break;
}
}
vector2 *= Scale;
zero.Y -= num;
float LoopWidth = Scale * rectangle.Width;
//float LoopHeight = Scale * rectangle.Height;
float LoopHeight = Scale * rectangle.Height;
int LoopX = (int)((vector.X * vector3.X - vector2.X + zero.X - (Main.screenWidth >> 1)) / LoopWidth);
//int LoopY = (int)((vector.Y * vector3.Y - vector2.Y + zero.Y - (Main.screenWidth >> 1)) / LoopWidth);
int LoopY = (int)((vector.Y * vector3.Y - vector2.Y + zero.Y - (Main.screenWidth >> 1)) / LoopWidth);
//for (int i = LoopY - 2; i < LoopY + 4 + (int)(Main.screenWidth / LoopHeight); i++)
//{
for (int i = LoopY - 2; i < LoopY + 4 + (int)(Main.screenWidth / LoopHeight); i++)
{
for (int j = LoopX - 2; j < LoopX + 4 + (int)(Main.screenWidth / LoopWidth); j++)
{
Vector2 drawPosition = (new Vector2(j * Scale * (rectangle.Width / vector3.X), ((Main.LocalPlayer.Center.Y / 16f) - 90) * 16f) + vector2 - vector) * vector3 + vector - Main.screenPosition - vector2 + zero;
var frame = rectangle;
var color = Color.MediumTurquoise * Transparency;
var color = Color.White * Transparency;
Main.spriteBatch.Draw(BGTexture, drawPosition, frame, color, 0f, Vector2.Zero, Scale, SpriteEffects.None, 0f);
}
//}
}
}
}
}
}
}
}
+1 -1
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Buffs.Potions
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().shadow = true;
if (player.yoraiz0rEye < 2 && CalamityConfig.Instance.StealthInvisibility)
if (player.yoraiz0rEye < 2 && CalamityClientConfig.Instance.StealthInvisibility)
player.yoraiz0rEye = 2;
}
}
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Buffs.StatBuffs
public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare)
{
if (CalamityConfig.Instance.BossZen)
if (CalamityServerConfig.Instance.BossZen)
tip = tip.Replace(":", ":\n" + this.GetLocalizedValue("ZenDescription"));
}
}
+12 -12
View File
@@ -87,7 +87,7 @@ namespace CalamityMod.CalPlayer
public const float projectileMeleeWeaponMeleeSpeedMultiplier = 0f;
public int evilSmasherBoost = 0;
public int burningSeaBurnOut = 0;
public int hellbornBoost = 0;
public int hellbornShots = 0;
public int searedPanCounter = 0;
public int searedPanTimer = 0;
public int potionTimer = 0;
@@ -2287,13 +2287,13 @@ namespace CalamityMod.CalPlayer
#region Screen Position Movements
public override void ModifyScreenPosition()
{
if (CalamityConfig.Instance.ScreenshakePower == 0)
if (CalamityClientConfig.Instance.ScreenshakePower == 0)
return;
if (GeneralScreenShakePower > 0f)
{
Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower * CalamityConfig.Instance.ScreenshakePower, GeneralScreenShakePower * CalamityConfig.Instance.ScreenshakePower);
GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityConfig.Instance.ScreenshakePower);
Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower, GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower);
GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityClientConfig.Instance.ScreenshakePower);
}
}
#endregion
@@ -2705,7 +2705,7 @@ namespace CalamityMod.CalPlayer
ascendantTrail = false;
evilSmasherBoost = 0;
burningSeaBurnOut = 0;
hellbornBoost = 0;
hellbornShots = 0;
searedPanCounter = 0;
searedPanTimer = 0;
potionTimer = 0;
@@ -2729,7 +2729,7 @@ namespace CalamityMod.CalPlayer
// Respawn the player faster
// 3 seconds normally and configurable while a boss is alive between 15 and 60 seconds
int respawnTimerSet = areThereAnyDamnBosses ? (CalamityConfig.Instance.PlayerRespawnTime_BossAlive * 60) : 180;
int respawnTimerSet = areThereAnyDamnBosses ? (CalamityServerConfig.Instance.PlayerRespawnTime_BossAlive * 60) : 180;
if (Player.respawnTimer > respawnTimerSet)
Player.respawnTimer = respawnTimerSet;
}
@@ -3401,14 +3401,14 @@ namespace CalamityMod.CalPlayer
public override void UpdateEquips()
{
// TODO -- why is boss health bar code in Player.UpdateEquips and not a ModSystem
CalamityConfig.Instance.BossHealthBarExtraInfo = shouldDrawSmallText;
CalamityClientConfig.Instance.BossHealthBarExtraInfo = shouldDrawSmallText;
// Putting this in GlobalItem will run multiple times for each slot, which this system already does, creating a slew of problems.
VanillaArmorChangeManager.ApplyPotentialEffectsTo(Player);
// If the config is enabled, vastly increase the player's base tile and wall placement speeds
// This stacks with the Brick Layer and Portable Cement Mixer
if (CalamityConfig.Instance.FasterTilePlacement)
if (CalamityServerConfig.Instance.FasterTilePlacement)
{
Player.tileSpeed += 0.5f;
Player.wallSpeed += 0.5f;
@@ -3671,7 +3671,7 @@ namespace CalamityMod.CalPlayer
#region PostUpdateBuffs
public override void PostUpdateBuffs()
{
if (Player.whoAmI == Main.myPlayer && CalamityConfig.Instance.VanillaCooldownDisplay)
if (Player.whoAmI == Main.myPlayer && CalamityClientConfig.Instance.VanillaCooldownDisplay)
{
if (Player.whoAmI == Main.myPlayer && Player.potionDelay != 0)
potionSick = true;
@@ -4942,11 +4942,11 @@ namespace CalamityMod.CalPlayer
// Enabling the config while a player is loaded will show the timer immediately.
// But it won't start running until you save and quit and re-enter a world.
if (CalamityConfig.Instance.SpeedrunTimer)
if (CalamityClientConfig.Instance.SpeedrunTimer)
CalamityMod.SpeedrunTimer.Restart();
bool showWikiMessage = CalamityConfig.Instance.WikiStatusMessage;
bool showVCMMMessage = CalamityConfig.Instance.VCMMStatusMessage && !CalamityMod.Instance.VCMMAvailable;
bool showWikiMessage = CalamityClientConfig.Instance.WikiStatusMessage;
bool showVCMMMessage = CalamityClientConfig.Instance.VCMMStatusMessage && !CalamityMod.Instance.VCMMAvailable;
bool showStartupMessages = showWikiMessage || showVCMMMessage;
// Set a random delay between 12 and 20 seconds. When this delay hits zero, startup messages display
+1 -1
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.CalPlayer
{
get
{
return (String.IsNullOrEmpty(dashID) && Player.dashType == 0 && CalamityConfig.Instance.DefaultDashEnabled) ? DefaultDash.ID : dashID; //gives default dash ONLY if no custom or vanilla dash.
return (String.IsNullOrEmpty(dashID) && Player.dashType == 0 && CalamityServerConfig.Instance.DefaultDashEnabled) ? DefaultDash.ID : dashID; //gives default dash ONLY if no custom or vanilla dash.
}
set => dashID = value;
}
+1 -1
View File
@@ -110,7 +110,7 @@ namespace CalamityMod.CalPlayer
}
// TODO -- rogue stealth visuals are an utter catastrophe and should be fully destroyed on next stealth rework
if (calamityPlayer.rogueStealth > 0f && calamityPlayer.rogueStealthMax > 0f && Player.townNPCs < 3f && CalamityConfig.Instance.StealthInvisibility)
if (calamityPlayer.rogueStealth > 0f && calamityPlayer.rogueStealthMax > 0f && Player.townNPCs < 3f && CalamityClientConfig.Instance.StealthInvisibility)
{
// A translucent orchid color, the rogue class color
float colorValue = calamityPlayer.rogueStealth / calamityPlayer.rogueStealthMax * 0.9f; //0 to 0.9
+4 -5
View File
@@ -2137,11 +2137,12 @@ namespace CalamityMod.CalPlayer
// If the player was just hit by something capable of dealing defense damage, then apply defense damage.
// Bloodflare Core makes every hit deal defense damage (to enable its function).
// Defense damage is not applied if the player has iframes.
// This function will be ignored if the player is wearing Chalice, as it handles its defense damage elsewhere.
// Defense damage is not applied if the player has iframes or godmode.
bool hitCanApplyDefenseDamage = nextHitDealsDefenseDamage || bloodflareCore;
bool defenseDamageShouldApply = hitCanApplyDefenseDamage && !hasIFrames && !Player.creativeGodMode;
if (hitCanApplyDefenseDamage && !hasIFrames && !Player.creativeGodMode)
// 15AUG2024: Ozzatron: External flag which completely disables defense damage. This overrides Bloodflare Core.
if (defenseDamageShouldApply && !CalamityMod.ExternalFlag_DisableDefenseDamage)
{
double halfDefense = Player.statDefense / 2.0;
int netMitigation = hurtInfo.SourceDamage - hurtInfo.Damage;
@@ -2293,8 +2294,6 @@ namespace CalamityMod.CalPlayer
if (evilSmasherBoost > 0)
evilSmasherBoost -= 1;
hellbornBoost = 0;
if (trinketOfChi)
chiBuffTimer = 0;
+7 -9
View File
@@ -86,7 +86,7 @@ namespace CalamityMod.CalPlayer
// Give the player a 24% jump speed boost while wings are equipped, otherwise grant 4% more jump speed so that players can jump 7 tiles high
if (Player.wingsLogic > 0)
Player.jumpSpeedBoost += 1.2f;
else if (CalamityConfig.Instance.FasterJumpSpeed)
else if (CalamityServerConfig.Instance.FasterJumpSpeed)
Player.jumpSpeedBoost += 0.2f;
// Decrease the counter on Fearmonger set turbo regeneration
@@ -1001,7 +1001,7 @@ namespace CalamityMod.CalPlayer
{
Player.buffImmune[ModContent.BuffType<FrozenLungs>()] = true;
}
if (CalamityConfig.Instance.ChilledWaterRework)
if (CalamityServerConfig.Instance.ChilledWaterRework)
{
if (Main.expertMode && Player.ZoneSnow && Player.wet && !Player.lavaWet && !Player.honeyWet)
{
@@ -1124,7 +1124,7 @@ namespace CalamityMod.CalPlayer
Player.noFallDmg = true;
}
if (CalamityConfig.Instance.FasterFallHotkey)
if (CalamityClientConfig.Instance.FasterFallHotkey)
{
// Allow the player to double their gravity (but NOT max fall speed!) by holding the down button while in midair.
bool holdingDown = Player.controlDown && !Player.controlJump;
@@ -1154,7 +1154,7 @@ namespace CalamityMod.CalPlayer
}
// Increase Rope climb velocities, if enabled
if (CalamityConfig.Instance.FasterRopeClimbSpeed)
if (CalamityServerConfig.Instance.FasterRopeClimbSpeed)
{
if (Player.pulley)
{
@@ -1553,8 +1553,6 @@ namespace CalamityMod.CalPlayer
burnOutDust.noGravity = true;
}
}
if (hellbornBoost > 0)
hellbornBoost--;
if (persecutedEnchantSummonTimer < 1800)
persecutedEnchantSummonTimer++;
else
@@ -2854,7 +2852,7 @@ namespace CalamityMod.CalPlayer
// 50% movement speed bonus so that you don't feel like a snail in the early game
// Disabled while Overhaul is enabled, because Overhaul does very similar things to make movement more snappy
if (CalamityMod.Instance.overhaul is null && CalamityConfig.Instance.FasterBaseSpeed)
if (CalamityMod.Instance.overhaul is null && CalamityServerConfig.Instance.FasterBaseSpeed)
Player.moveSpeed += BalancingConstants.DefaultMoveSpeedBoost;
// Reduce how slow Chilled makes the player, because it's cancerous right now
@@ -4301,13 +4299,13 @@ namespace CalamityMod.CalPlayer
{
if (startMessageDisplayDelay == 0)
{
if (CalamityConfig.Instance.WikiStatusMessage)
if (CalamityClientConfig.Instance.WikiStatusMessage)
{
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.WikiStatus1");
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.WikiStatus2");
}
if (CalamityConfig.Instance.VCMMStatusMessage && !CalamityMod.Instance.VCMMAvailable)
if (CalamityClientConfig.Instance.VCMMStatusMessage && !CalamityMod.Instance.VCMMAvailable)
{
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.VCMMStatus");
}
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod
// Config based conditions
//
public static readonly Condition PotionSellingConfig = Create("PotionConfig", () => CalamityConfig.Instance.PotionSelling);
public static readonly Condition PotionSellingConfig = Create("PotionConfig", () => CalamityServerConfig.Instance.PotionSelling);
//
// Player conditions
+86 -59
View File
@@ -5,25 +5,22 @@ using CalamityMod.UI.DraedonsArsenal;
using CalamityMod.UI.Rippers;
using CalamityMod.UI.SulphurousWaterMeter;
using Terraria;
using Terraria.Localization;
using Terraria.ModLoader.Config;
namespace CalamityMod
{
[BackgroundColor(49, 32, 36, 216)]
public class CalamityConfig : ModConfig
public class CalamityClientConfig : ModConfig
{
public static CalamityConfig Instance;
public static CalamityClientConfig Instance;
// TODO -- Not all Calamity config settings should be considered client side.
// There are many configs which are server side and should stay that way.
public override ConfigScope Mode => ConfigScope.ClientSide;
public override bool AcceptClientChanges(ModConfig pendingConfig, int whoAmI, ref string message) => true;
// Clamps values that would cause ugly problems if loaded directly without sanitization.
[OnDeserialized]
internal void ClampValues(StreamingContext context)
{
BossHealthBoost = Utils.Clamp(BossHealthBoost, MinBossHealthBoost, MaxBossHealthBoost);
RipperMeterShake = Utils.Clamp(RipperMeterShake, MinMeterShake, MaxMeterShake);
ParticleLimit = (int)Utils.Clamp(ParticleLimit, MinParticleLimit, MaxParticleLimit);
}
@@ -48,10 +45,6 @@ namespace CalamityMod
[DefaultValue(5000)]
public int ParticleLimit { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(false)]
public bool BossesStopWeather { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(0f, 10f)]
@@ -106,6 +99,33 @@ namespace CalamityMod
[DefaultValue(true)]
public bool StealthMeter { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
public bool ChargeMeter { get; set; }
private const float MinMeterShake = 0f;
private const float MaxMeterShake = 4f;
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(MinMeterShake, MaxMeterShake)]
[Increment(1f)]
[DrawTicks]
[DefaultValue(2f)]
public float RipperMeterShake { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(false)]
public bool SpeedrunTimer { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
public bool FlightBar { get; set; }
#endregion
#region Meter Positions
[Header("MeterPositions")]
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(0f, 100f)]
@@ -130,10 +150,6 @@ namespace CalamityMod
[DefaultValue(SulphurousWaterMeterUI.DefaultPosY)]
public float SulphuricWaterMeterPosY { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
public bool ChargeMeter { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(0f, 100f)]
@@ -147,8 +163,28 @@ namespace CalamityMod
public float ChargeMeterPosY { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(false)]
public bool SpeedrunTimer { get; set; }
[SliderColor(224, 165, 56, 128)]
[Range(0f, 100f)]
[DefaultValue(RipperUI.DefaultRagePosX)]
public float RageMeterPosX { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(0f, 100f)]
[DefaultValue(RipperUI.DefaultRagePosY)]
public float RageMeterPosY { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(0f, 100f)]
[DefaultValue(RipperUI.DefaultAdrenPosX)]
public float AdrenalineMeterPosX { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(0f, 100f)]
[DefaultValue(RipperUI.DefaultAdrenPosY)]
public float AdrenalineMeterPosY { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
@@ -162,10 +198,6 @@ namespace CalamityMod
[DefaultValue(SpeedrunTimerUI.DefaultTimerPosY)]
public float SpeedrunTimerPosY { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
public bool FlightBar { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(0f, 100f)]
@@ -206,7 +238,37 @@ namespace CalamityMod
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
public bool FasterFallHotkey { get; set; }
#endregion
}
[BackgroundColor(49, 32, 36, 216)]
public class CalamityServerConfig : ModConfig
{
public static CalamityServerConfig Instance;
public override ConfigScope Mode => ConfigScope.ServerSide;
public override bool AcceptClientChanges(ModConfig pendingConfig, int whoAmI, ref NetworkText message)
{
if (whoAmI == 0)
{
return true;
}
if (whoAmI != 0)
{
message = CalamityUtils.GetText("Configs.CalamityServerConfig.Denied").ToNetworkText();
return false;
}
return false;
}
// Clamps values that would cause ugly problems if loaded directly without sanitization.
[OnDeserialized]
internal void ClampValues(StreamingContext context)
{
BossHealthBoost = Utils.Clamp(BossHealthBoost, MinBossHealthBoost, MaxBossHealthBoost);
}
[Header("Gameplay")]
#region General Gameplay Changes
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
public bool RemoveReforgeRNG { get; set; }
@@ -257,6 +319,10 @@ namespace CalamityMod
[DrawTicks]
[DefaultValue(MinBossHealthBoost)]
public float BossHealthBoost { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(false)]
public bool BossesStopWeather { get; set; }
#endregion
#region Default Player Stat Boosts
@@ -306,44 +372,5 @@ namespace CalamityMod
[DefaultValue(false)]
public bool ForceTownSafety { get; set; }
#endregion
#region Revengeance Mode Changes
[Header("Revengeance")]
private const float MinMeterShake = 0f;
private const float MaxMeterShake = 4f;
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(MinMeterShake, MaxMeterShake)]
[Increment(1f)]
[DrawTicks]
[DefaultValue(2f)]
public float RipperMeterShake { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(0f, 100f)]
[DefaultValue(RipperUI.DefaultRagePosX)]
public float RageMeterPosX { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(0f, 100f)]
[DefaultValue(RipperUI.DefaultRagePosY)]
public float RageMeterPosY { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(0f, 100f)]
[DefaultValue(RipperUI.DefaultAdrenPosX)]
public float AdrenalineMeterPosX { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(0f, 100f)]
[DefaultValue(RipperUI.DefaultAdrenPosY)]
public float AdrenalineMeterPosY { get; set; }
#endregion
}
}
+2
View File
@@ -817,6 +817,7 @@ namespace CalamityMod
ProjectileType<TrueDecaysRetort>(),
ProjectileType<TrueGrovetendersTouch>(),
ProjectileType<HeavensMight>(),
ProjectileType<HellbornHoldout>(),
ProjectileType<ExtantAbhorrence>(),
ProjectileType<TrueBiomeBladeHoldout>(),
ProjectileType<LamentationsOfTheChained>(),
@@ -1994,6 +1995,7 @@ namespace CalamityMod
ProjectileType<GodsParanoiaProj>(),
ProjectileType<GrandDadHoldout>(),
ProjectileType<GrandGuardianHoldout>(),
ProjectileType<HellbornHoldout>(),
ProjectileType<HellkiteHoldout>(),
ProjectileType<InsidiousHarpoon>(),
ProjectileType<JawsProjectile>(),
+7 -1
View File
@@ -135,6 +135,11 @@ namespace CalamityMod
// This can be edited by other mods using reflection to prevent compatibility issues
public static bool ExternalFlag_DisableNonRevBossAI = false;
// External flag to disable Defense Damage
// This can be edited by other mods using reflection if desired
// Note that this flag trumps Bloodflare Core and will stop that accessory from working properly.
public static bool ExternalFlag_DisableDefenseDamage = false;
internal static CalamityMod Instance;
// TODO -- Mod references should be contained in a ModSystem (example name "ModLoadedChecker")
@@ -447,6 +452,7 @@ namespace CalamityMod
NPCStats.Unload();
CalamityGlobalItem.UnloadTweaks();
CalamityGlobalProjectile.UnloadTweaks();
FramedGlowMask.UnloadTexCache();
PopupGUIManager.UnloadGUIs();
InvasionProgressUIManager.UnloadGUIs();
@@ -498,7 +504,7 @@ namespace CalamityMod
#endregion Render Target Management
#region Force ModConfig save (Reflection)
internal static void SaveConfig(CalamityConfig cfg)
internal static void SaveConfig(CalamityClientConfig cfg)
{
// There is no current way to manually save a mod configuration file in tModLoader.
// The method which saves mod config files is private in ConfigManager, so reflection is used to invoke it.
+46 -1
View File
@@ -325,6 +325,47 @@ namespace CalamityMod
MusicEventSystem.ReceiveSyncResponse(reader);
break;
//
// Bandit refund syncs
//
case CalamityModMessageType.SomeoneGotScammedByTinkerer:
int scammedOne = reader.ReadByte();
int stolen = reader.Read7BitEncodedInt();
CalamityWorld.MoneyStolenByBandit += stolen;
CalamityWorld.Reforges++;
// Broadcast back for tragic event
// WorldSync DO sync the MoneyStolenByBandit and Refores variable, But spamming SyncWorld is not a ideal action
if (Main.dedServ)
{
ModPacket packet = CalamityMod.Instance.GetPacket();
packet.Write((byte)CalamityModMessageType.SomeoneGotScammedByTinkerer);
packet.Write((byte)scammedOne);
packet.Write7BitEncodedInt(stolen);
packet.Send(ignoreClient: scammedOne);
}
break;
case CalamityModMessageType.WantToRefundReforges:
int requester = reader.ReadByte();
// Only Server should handle this action!
if (!Main.dedServ)
break;
int banditIdx = NPC.FindFirstNPC(ModContent.NPCType<THIEF>());
if (banditIdx == -1)
break;
NPC bandit = Main.npc[banditIdx];
if (bandit == null || !bandit.active)
break;
THIEF.DoRefund(bandit);
break;
//
// Default case: with no idea how long the packet is, we can't safely read data.
// Throw an exception now instead of allowing the network stream to corrupt.
@@ -450,6 +491,10 @@ namespace CalamityMod
// Music events
MusicEventSyncRequest,
MusicEventSyncResponse
MusicEventSyncResponse,
// Bandit Reforge Refund
SomeoneGotScammedByTinkerer,
WantToRefundReforges
}
}
+1 -1
View File
@@ -8,7 +8,7 @@ namespace CalamityMod.Cooldowns
{
public static new string ID => "ChaosState";
public override bool ShouldDisplay => CalamityConfig.Instance.VanillaCooldownDisplay && instance.player.chaosState;
public override bool ShouldDisplay => CalamityClientConfig.Instance.VanillaCooldownDisplay && instance.player.chaosState;
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
public override string Texture => "CalamityMod/Cooldowns/ChaosState" + skinTexture;
public override Color OutlineColor => outlineColor;
+1 -1
View File
@@ -7,7 +7,7 @@ namespace CalamityMod.Cooldowns
public class PotionSickness : CooldownHandler
{
public static new string ID => "PotionSickness";
public override bool ShouldDisplay => CalamityConfig.Instance.VanillaCooldownDisplay && instance.player.potionDelay > 0;
public override bool ShouldDisplay => CalamityClientConfig.Instance.VanillaCooldownDisplay && instance.player.potionDelay > 0;
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
public override string Texture => "CalamityMod/Cooldowns/PotionSickness";
public override Color OutlineColor => new Color(255, 142, 165);
+1 -1
View File
@@ -114,7 +114,7 @@ namespace CalamityMod.ILEditing
cursor.Remove();
// Increase by 10% if the higher jump speed is enabled.
cursor.EmitDelegate<Func<float>>(() => CalamityConfig.Instance.HigherJumpHeight ? BalancingConstants.ConfigBoostedBaseJumpHeight : VanillaBaseJumpHeight);
cursor.EmitDelegate<Func<float>>(() => CalamityServerConfig.Instance.HigherJumpHeight ? BalancingConstants.ConfigBoostedBaseJumpHeight : VanillaBaseJumpHeight);
}
#endregion
+2 -2
View File
@@ -345,7 +345,7 @@ namespace CalamityMod.ILEditing
{
// A cached delegate is used here instead of direct reflection for performance reasons
// since UpdateTime is called every frame.
if (Main.dayTime || CalamityConfig.Instance.TownNPCsSpawnAtNight)
if (Main.dayTime || CalamityServerConfig.Instance.TownNPCsSpawnAtNight)
VanillaSpawnTownNPCs();
});
@@ -361,7 +361,7 @@ namespace CalamityMod.ILEditing
private static void AlterTownNPCSpawnRate(Terraria.On_Main.orig_UpdateTime_SpawnTownNPCs orig)
{
double oldWorldRate = Main.desiredWorldTilesUpdateRate;
Main.desiredWorldTilesUpdateRate *= CalamityConfig.Instance.TownNPCSpawnRateMultiplier;
Main.desiredWorldTilesUpdateRate *= CalamityServerConfig.Instance.TownNPCSpawnRateMultiplier;
orig();
Main.desiredWorldTilesUpdateRate = oldWorldRate;
}
+1 -1
View File
@@ -123,7 +123,7 @@ namespace CalamityMod.ILEditing
#region Prevention of Slime Rain Spawns When Near Bosses
private static void PreventBossSlimeRainSpawns(Terraria.On_NPC.orig_SlimeRainSpawns orig, int plr)
{
if (!Main.player[plr].Calamity().isNearbyBoss && CalamityConfig.Instance.BossZen)
if (!Main.player[plr].Calamity().isNearbyBoss && CalamityServerConfig.Instance.BossZen)
orig(plr);
}
#endregion Prevention of Slime Rain Spawns When Near Bosses
+1 -1
View File
@@ -68,7 +68,7 @@ namespace CalamityMod.ILEditing
#region Removal of Hardmode Ore Generation from Evil Altars
private static void PreventSmashAltarCode(Terraria.On_WorldGen.orig_SmashAltar orig, int i, int j)
{
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework)
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework)
return;
orig(i, j);
+12 -2
View File
@@ -1802,7 +1802,7 @@ namespace CalamityMod.Items
return keepPrefix ? prefix : 0;
}
if (!CalamityConfig.Instance.RemoveReforgeRNG || Main.gameMenu || storedPrefix == -1)
if (!CalamityServerConfig.Instance.RemoveReforgeRNG || Main.gameMenu || storedPrefix == -1)
return -1;
// Pick a prefix using the new system.
@@ -1821,11 +1821,21 @@ namespace CalamityMod.Items
ItemLoader.ReforgePrice(item, ref value, ref p.discountAvailable);
// Steal 20% of that money.
CalamityWorld.MoneyStolenByBandit += value / 5;
int stolen = value / 5;
CalamityWorld.MoneyStolenByBandit += stolen;
// Increment the reforge counter to allow the Bandit to refund
// Also triggers Tinkerer dialogue that hints to the player that money is being stolen
CalamityWorld.Reforges++;
if (Main.netMode == NetmodeID.MultiplayerClient)
{
ModPacket packet = CalamityMod.Instance.GetPacket();
packet.Write((byte)CalamityModMessageType.SomeoneGotScammedByTinkerer);
packet.Write((byte)p.whoAmI);
packet.Write7BitEncodedInt(stolen);
packet.Send();
}
}
}
#endregion
+1 -1
View File
@@ -488,7 +488,7 @@ namespace CalamityMod.Items
EditTooltipByNum(1, (line) => line.Text += ", including Mighty Wind");
// If Early Hardmode Rework is enabled: Remind users that ores will NOT spawn when an altar is smashed.
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && (item.type == ItemID.Pwnhammer || item.type == ItemID.Hammush))
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && (item.type == ItemID.Pwnhammer || item.type == ItemID.Hammush))
EditTooltipByNum(0, (line) => line.Text += "\nDemon Altars now drop Souls of Night instead of generating ores when destroyed" +
"\nHardmode ores now generate after defeating Mechanical Bosses for the first time");
+4 -4
View File
@@ -132,22 +132,22 @@ namespace CalamityMod.Items.Placeables
}
else if (val < 85.03f)
{
resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : ItemID.MythrilOre) : ItemID.MythrilOre;
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : ItemID.MythrilOre) : ItemID.MythrilOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 87.03f)
{
resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : ItemID.OrichalcumOre) : ItemID.OrichalcumOre;
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : ItemID.OrichalcumOre) : ItemID.OrichalcumOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 88.78f)
{
resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : !twoMechsDowned ? ItemID.MythrilOre : ItemID.AdamantiteOre) : ItemID.AdamantiteOre;
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : !twoMechsDowned ? ItemID.MythrilOre : ItemID.AdamantiteOre) : ItemID.AdamantiteOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 89.53f)
{
resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : !twoMechsDowned ? ItemID.OrichalcumOre : ItemID.TitaniumOre) : ItemID.TitaniumOre;
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : !twoMechsDowned ? ItemID.OrichalcumOre : ItemID.TitaniumOre) : ItemID.TitaniumOre;
resultStack = Main.rand.Next(1, 17);
}
else if (DownedBossSystem.downedAstrumDeus)
+4 -4
View File
@@ -120,22 +120,22 @@ namespace CalamityMod.Items.Placeables
}
else if (val < 83.03f)
{
resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : ItemID.MythrilOre) : ItemID.MythrilOre;
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : ItemID.MythrilOre) : ItemID.MythrilOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 85.03f)
{
resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : ItemID.OrichalcumOre) : ItemID.OrichalcumOre;
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : ItemID.OrichalcumOre) : ItemID.OrichalcumOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 86.78f)
{
resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : !twoMechsDowned ? ItemID.MythrilOre : ItemID.AdamantiteOre) : ItemID.AdamantiteOre;
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : !twoMechsDowned ? ItemID.MythrilOre : ItemID.AdamantiteOre) : ItemID.AdamantiteOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 88.53f)
{
resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : !twoMechsDowned ? ItemID.OrichalcumOre : ItemID.TitaniumOre) : ItemID.TitaniumOre;
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : !twoMechsDowned ? ItemID.OrichalcumOre : ItemID.TitaniumOre) : ItemID.TitaniumOre;
resultStack = Main.rand.Next(1, 17);
}
else if (DownedBossSystem.downedAstrumDeus)
+7 -2
View File
@@ -38,8 +38,13 @@ namespace CalamityMod.Items.SummonItems.Invasion
public override bool? UseItem(Player player)
{
AcidRainEvent.TryStartEvent(forceRain: true);
//CalamityNetcode.SyncWorld(); //TryStartEvent(forceRain: true) already sync the world data
// Only Single Player client and Server should call this!
if (Main.netMode != NetmodeID.MultiplayerClient)
{
AcidRainEvent.TryStartEvent(forceRain: true);
// TryStartEvent already syncs the world data
}
return true;
}
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
@@ -35,20 +36,38 @@ namespace CalamityMod.Items.SummonItems.Invasion
itemGroup = ContentSamples.CreativeHelper.ItemGroup.EventItem;
}
public override bool CanUseItem(Player player) => Main.invasionType == InvasionID.None;
public override bool CanUseItem(Player player)
{
// Do not start new invasion when it's already on going
if (Main.invasionType != InvasionID.None)
return false;
// This is the requirement for StartInvasion for some reason
// If this part is missing MartianRemote will show DD2 invasion GUI without any enemy spawn on MP
if (!Main.player.Any(p => p.active && p.ConsumedLifeCrystals >= 5))
return false;
return true;
}
public override bool? UseItem(Player player)
{
if (Main.netMode != NetmodeID.MultiplayerClient)
// Single Player case
if (Main.netMode == NetmodeID.SinglePlayer)
{
Main.invasionDelay = 0;
Main.StartInvasion(InvasionID.MartianMadness);
return true;
}
else
// MP case: only owner should send Spawn Message to Master
if (player.whoAmI == Main.myPlayer)
{
//-7.0 is hardcoded id for MartianMadness Event
NetMessage.SendData(MessageID.SpawnBossUseLicenseStartEvent, number: player.whoAmI, number2: -7.0f);
return true;
}
return true;
}
+11 -2
View File
@@ -1,8 +1,13 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using SandstormEvent = Terraria.GameContent.Events.Sandstorm;
namespace CalamityMod.Items.Tools.ClimateChange
{
public class AridArtifact : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Tools";
@@ -27,13 +32,17 @@ namespace CalamityMod.Items.Tools.ClimateChange
return DownedBossSystem.downedDesertScourge || Main.hardMode;
}
// this is extremely ugly and has to be fully qualified because we add an item called Sandstorm
public override bool? UseItem(Player player)
{
if (Terraria.GameContent.Events.Sandstorm.Happening)
// Only SinglePlayer and Server need to sync those parameters
if (Main.netMode == NetmodeID.MultiplayerClient)
return true;
if (SandstormEvent.Happening)
CalamityUtils.StopSandstorm();
else
CalamityUtils.StartSandstorm();
return true;
}
+3 -6
View File
@@ -32,17 +32,14 @@ namespace CalamityMod.Items.Tools.ClimateChange
itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.ToolsOther;
}
public override bool CanUseItem(Player player)
public override bool CanUseItem(Player player) => !CalamityPlayer.areThereAnyDamnBosses;
public override bool? UseItem(Player player)
{
//Only SinglePlayer or DedServ should change time to prevent unwanted race condition
if (Main.netMode == NetmodeID.MultiplayerClient)
return true;
if (CalamityPlayer.areThereAnyDamnBosses)
return false;
// Early Morning -> Noon
if (Main.dayTime && Main.time < NoonCutoff)
Main.SkipToTime(NoonCutoff, true);
+6 -3
View File
@@ -31,16 +31,19 @@ namespace CalamityMod.Items.Tools.ClimateChange
public override bool? UseItem(Player player)
{
// Only SinglePlayer and Server need to sync those parameters
if (Main.netMode == NetmodeID.MultiplayerClient)
return true;
if (!Main.raining)
{
CalamityUtils.StartRain(true);
CalamityUtils.StartRain(torrentialTear: true, worldSync: true);
}
else
{
Main.raining = false;
CalamityUtils.StopRain(clearWeather: false, worldSync: true);
}
CalamityNetcode.SyncWorld();
return true;
}
+14 -20
View File
@@ -11,43 +11,37 @@ namespace CalamityMod.Items.Weapons.Magic
public class VitriolicViper : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Magic";
public override void SetStaticDefaults()
{
Item.staff[Item.type] = true;
}
public override void SetDefaults()
{
Item.width = 60;
Item.height = 62;
Item.damage = 93;
Item.damage = 2893;
Item.DamageType = DamageClass.Magic;
Item.mana = 15;
Item.useAnimation = Item.useTime = 16;
Item.mana = 45;
Item.useTime = Item.useAnimation = 16;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 4f;
Item.UseSound = SoundID.Item46;
Item.noUseGraphic = true;
Item.channel = true;
Item.knockBack = 6.5f;
Item.UseSound = null;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<VitriolicViperSpit>();
Item.shoot = ModContent.ProjectileType<VitriolicViperHoldout>();
Item.shootSpeed = 20f;
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
Item.rare = ModContent.RarityType<PureGreen>();
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
public override void HoldItem(Player player) => player.Calamity().mouseRotationListener = true;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
for (int i = -4; i <= 4; i += 1)
{
Vector2 perturbedSpeed = velocity.RotatedBy(MathHelper.ToRadians(i));
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X * 1.65f, perturbedSpeed.Y * 1.65f, type, (int)(damage * 0.7f), knockback * 0.7f, player.whoAmI, 0f, 0f);
}
for (int j = -2; j <= 2; j += 1)
{
Vector2 perturbedSpeed2 = velocity.RotatedBy(MathHelper.ToRadians(j));
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed2.X, perturbedSpeed2.Y, ModContent.ProjectileType<VitriolicViperFang>(), damage, knockback, player.whoAmI, 0f, 0f);
}
Vector2 spawnPosition = player.RotatedRelativePoint(player.MountedCenter, true);
Projectile.NewProjectileDirect(source, spawnPosition, player.Calamity().mouseWorld - spawnPosition, type, damage, knockback, player.whoAmI);
return false;
}
}
+11 -4
View File
@@ -1,7 +1,9 @@
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Melee.Spears;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
@@ -15,21 +17,26 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 66;
Item.height = 70;
Item.damage = 198;
Item.damage = 417;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.noMelee = true;
Item.useTurn = true;
Item.noUseGraphic = true;
Item.useAnimation = Item.useTime = 20;
Item.useAnimation = Item.useTime = 13;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 8f;
Item.knockBack = 12f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<InsidiousHarpoon>();
Item.shootSpeed = 15f;
Item.shootSpeed = 18f;
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
Item.rare = ModContent.RarityType<PureGreen>();
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0, 0, 0);
return false;
}
}
}
+39 -96
View File
@@ -1,4 +1,6 @@
using Microsoft.Xna.Framework;
using System.Linq;
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
@@ -10,121 +12,62 @@ namespace CalamityMod.Items.Weapons.Ranged
public class Hellborn : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Ranged";
public const float ExplosionDamageMultiplier = 3f;
public override void SetStaticDefaults() => ItemID.Sets.IsRangedSpecialistWeapon[Type] = true;
public override void SetDefaults()
{
Item.width = 62;
Item.height = 34;
Item.damage = 20;
Item.damage = 475;
Item.DamageType = DamageClass.Ranged;
Item.useAnimation = Item.useTime = 20;
Item.useAnimation = Item.useTime = 35;
Item.useStyle = ItemUseStyleID.Shoot;
Item.knockBack = 2f;
Item.knockBack = 2.5f;
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
Item.rare = ItemRarityID.Pink;
Item.UseSound = SoundID.Item11;
Item.noMelee = true;
Item.UseSound = null;
Item.noUseGraphic = true;
Item.channel = true;
Item.autoReuse = true;
Item.shoot = ProjectileID.PurificationPowder;
Item.shoot = ModContent.ProjectileType<HellbornHoldout>();
Item.shootSpeed = 12f;
Item.useAmmo = AmmoID.Bullet;
Item.Calamity().canFirePointBlankShots = true;
}
public override float UseTimeMultiplier(Player player) => 1f - 0.5f * (player.Calamity().hellbornBoost * (1f / 600f));
public override void ModifyWeaponDamage(Player player, ref StatModifier damage) => damage *= 1f + player.Calamity().hellbornBoost * (1f / 600f);
public override void ModifyWeaponKnockback(Player player, ref StatModifier knockback) => knockback *= 1f + (player.Calamity().hellbornBoost * (1f / 600f));
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
//Custom melee hitbox
public override bool? CanHitNPC(Player player, NPC target)
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
public override bool AltFunctionUse(Player player) => true;
public override void HoldItem(Player player)
{
Rectangle targetHitbox = target.Hitbox;
if (player.whoAmI != Main.myPlayer)
return;
float collisionPoint = 0f;
float gunLength = 66f;
float gunHeight = 15;
// Right-click channeling
player.Calamity().rightClickListener = true;
return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), player.MountedCenter, player.MountedCenter + ((player.itemRotation + (player.direction < 0 ? MathHelper.Pi : 0f)).ToRotationVector2() * gunLength), gunHeight, ref collisionPoint) ? null : false;
if (player.Calamity().mouseRight && CanUseItem(player) && !Main.mapFullscreen && !Main.blockMouse)
{
// Only one out at a time
if (Main.projectile.Any(n => n.active && n.type == Item.shoot && n.owner == player.whoAmI))
return;
var source = player.GetSource_ItemUse(player.ActiveItem());
Projectile holdout = Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, Item.shoot, player.ActiveItem().damage, 0f, player.whoAmI, 0, 0, 5);
holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero);
}
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
for (int index = 0; index < 3; index++)
{
float SpeedX = velocity.X + Main.rand.Next(-15, 16) * 0.05f;
float SpeedY = velocity.Y + Main.rand.Next(-15, 16) * 0.05f;
// Only one out at a time
if (Main.projectile.Any(n => n.active && n.type == Item.shoot && n.owner == player.whoAmI))
return false;
if (type == ProjectileID.Bullet)
{
int bullet = Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, ProjectileID.ExplosiveBullet, damage, knockback, player.whoAmI);
Main.projectile[bullet].usesLocalNPCImmunity = true;
Main.projectile[bullet].localNPCHitCooldown = 10;
}
else
Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI);
}
Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, type, damage, knockback, player.whoAmI, 0, 0, 0);
// We set the rotation to the direction to the mouse so the first frame doesn't appear bugged out.
holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero);
return false;
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
player.Calamity().hellbornBoost = 600;
modifiers.SourceDamage *= ExplosionDamageMultiplier;
int touchDamage = player.CalcIntDamage<RangedDamageClass>(Item.damage);
player.ApplyDamageToNPC(target, touchDamage, 0f, 0, false);
float firstDustScale = 3.4f;
float secondDustScale = 1.6f;
float thirdDustScale = 4f;
Vector2 dustRotation = (target.rotation - MathHelper.PiOver2).ToRotationVector2();
Vector2 dustVelocity = dustRotation * target.velocity.Length();
SoundEngine.PlaySound(SoundID.Item14, target.Center);
for (int i = 0; i < 80; i++)
{
int contactDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, DustID.InfernoFork, 0f, 0f, 200, default, firstDustScale);
Dust dust = Main.dust[contactDust];
dust.position = target.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * target.width / 2f;
dust.noGravity = true;
dust.velocity.Y -= 6f;
dust.velocity *= 3f;
dust.velocity += dustVelocity * Main.rand.NextFloat();
contactDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, DustID.InfernoFork, 0f, 0f, 100, default, secondDustScale);
dust.position = target.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * target.width / 2f;
dust.velocity.Y -= 6f;
dust.velocity *= 2f;
dust.noGravity = true;
dust.fadeIn = 1f;
dust.color = Color.Crimson * 0.5f;
dust.velocity += dustVelocity * Main.rand.NextFloat();
}
for (int j = 0; j < 40; j++)
{
int contactDust2 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, DustID.InfernoFork, 0f, 0f, 0, default, thirdDustScale);
Dust dust = Main.dust[contactDust2];
dust.position = target.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(target.velocity.ToRotation()) * target.width / 3f;
dust.noGravity = true;
dust.velocity.Y -= 6f;
dust.velocity *= 0.5f;
dust.velocity += dustVelocity * (0.6f + 0.6f * Main.rand.NextFloat());
}
}
public override void ModifyHitPvp(Player player, Player target, ref Player.HurtModifiers modifiers)
{
modifiers.SourceDamage *= 10;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.OnFire3, 360);
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
target.AddBuff(BuffID.OnFire3, 360);
}
}
}
+74 -9
View File
@@ -1,40 +1,105 @@
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria.DataStructures;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using System;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Projectiles.Boss;
using Terraria.Audio;
namespace CalamityMod.Items.Weapons.Ranged
{
public class SepticSkewer : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Ranged";
public bool pulled = false;
public override void SetStaticDefaults()
{
ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true;
ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true;
}
public override void SetDefaults()
{
Item.width = 46;
Item.height = 24;
Item.damage = 272;
Item.damage = 1272;
Item.DamageType = DamageClass.Ranged;
Item.useTime = 12;
Item.useAnimation = 12;
Item.useTime = 30;
Item.useAnimation = 30;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 7.5f;
Item.UseSound = SoundID.Item10;
Item.knockBack = 3.5f;
Item.UseSound = null;
Item.autoReuse = true;
Item.shootSpeed = 20f;
Item.shootSpeed = 18f;
Item.shoot = ModContent.ProjectileType<SepticSkewerHarpoon>();
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
Item.rare = ModContent.RarityType<PureGreen>();
Item.Calamity().canFirePointBlankShots = true;
}
public override bool AltFunctionUse(Player player) => true;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
pulled = false;
if (player.altFunctionUse == 2)
{
for (int x = 0; x < Main.maxProjectiles; x++)
{
Projectile projectile = Main.projectile[x];
if (projectile.active && projectile.type == type)
{
projectile.ai[2] = 5;
pulled = true;
}
}
SoundStyle fire = new("CalamityMod/Sounds/Item/GunShotMid");
SoundEngine.PlaySound(fire with { Volume = 0.7f, Pitch = Main.rand.NextFloat(0.7f, 0.8f) }, position);
if (pulled)
player.Calamity().GeneralScreenShakePower = 5.5f;
}
else
{
SoundStyle fire = new("CalamityMod/Sounds/Item/GunShotHeavy");
SoundEngine.PlaySound(fire with { Volume = 0.45f, Pitch = Main.rand.NextFloat(0.4f, 0.65f) }, position);
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0, 0, 0);
}
return false;
}
public override void UseStyle(Player player, Rectangle heldItemFrame)
{
player.ChangeDir(Math.Sign((player.Calamity().mouseWorld - player.Center).X));
float itemRotation = player.compositeFrontArm.rotation + MathHelper.PiOver2 * player.gravDir;
float pullback = 7f;
float animProgress = 0.5f - player.itemTime / (float)player.itemTimeMax;
float rotation = (player.Center - player.Calamity().mouseWorld).ToRotation() * player.gravDir + MathHelper.PiOver2;
if (animProgress < 0.4f)
pullback -= (2.75f) * (float)Math.Pow((0.6f - animProgress) / 0.6f, 2);
Vector2 itemPosition = player.MountedCenter + itemRotation.ToRotationVector2() * pullback;
Vector2 itemSize = new Vector2(46, 24);
Vector2 itemOrigin = new Vector2(-24, 4);
CalamityUtils.CleanHoldStyle(player, itemRotation, itemPosition, itemSize, itemOrigin);
base.UseStyle(player, heldItemFrame);
}
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
public override void UseItemFrame(Player player)
{
player.ChangeDir(Math.Sign((player.Calamity().mouseWorld - player.Center).X));
float animProgress = 0.5f - player.itemTime / (float)player.itemTimeMax;
float rotation = (player.Center - player.Calamity().mouseWorld).ToRotation() * player.gravDir + MathHelper.PiOver2;
if (animProgress < 0.4f)
rotation += (player.altFunctionUse == 2 ? -0.25f : 0) * (float)Math.Pow((0.6f - animProgress) / 0.6f, 2) * player.direction;
player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, rotation);
}
}
}
+5 -6
View File
@@ -15,17 +15,16 @@ namespace CalamityMod.Items.Weapons.Rogue
{
Item.width = 106;
Item.height = 104;
Item.damage = 180;
Item.damage = 1280;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.useAnimation = 20;
Item.useTime = 20;
Item.useAnimation = 53;
Item.useTime = 53;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 4f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<ReaperProjectile>();
Item.shootSpeed = 16f;
Item.shootSpeed = 10f;
Item.DamageType = RogueDamageClass.Instance;
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
@@ -39,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Rogue
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
{
int spread = 15;
for (int i = 0; i < 3; i++)
for (int i = 0; i < 1; i++)
{
Vector2 perturbedspeed = new Vector2(velocity.X + Main.rand.Next(-2, 3), velocity.Y + Main.rand.Next(-2, 3)).RotatedBy(MathHelper.ToRadians(spread));
int proj = Projectile.NewProjectile(source, position, perturbedspeed, type, (int)(damage * 0.45), knockback, player.whoAmI);
+27 -11
View File
@@ -14,34 +14,50 @@ namespace CalamityMod.Items.Weapons.Rogue
{
Item.width = 42;
Item.height = 46;
Item.damage = 333;
Item.damage = 150;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.useAnimation = Item.useTime = 20;
Item.useAnimation = Item.useTime = 50;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 5f;
Item.knockBack = 4f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<ToxicantTwisterTwoPointZero>();
Item.shootSpeed = 18f;
Item.shoot = ModContent.ProjectileType<ToxicantTwisterProj>();
Item.shootSpeed = 20f;
Item.DamageType = RogueDamageClass.Instance;
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
Item.rare = ModContent.RarityType<PureGreen>();
}
public override float StealthDamageMultiplier => 1.3f;
public override float StealthDamageMultiplier => 0.4f;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
float angle1 = MathHelper.ToRadians(20f);
if (player.Calamity().StealthStrikeAvailable())
{
int boomer = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (boomer.WithinBounds(Main.maxProjectiles))
Main.projectile[boomer].Calamity().stealthStrike = true;
return false;
for (int i = 0; i < 2; i++)
{
int proj = Projectile.NewProjectile(source, position, velocity.RotatedBy(angle1), type, damage, knockback, player.whoAmI, 0, 0, 0 + i);
int proj2 = Projectile.NewProjectile(source, position, velocity.RotatedBy(angle1 * 0.5f) * 0.9f, type, damage, knockback, player.whoAmI, 0, 0, 2 + i);
angle1 *= -1;
if (proj.WithinBounds(Main.maxProjectiles))
Main.projectile[proj].Calamity().stealthStrike = true;
if (proj2.WithinBounds(Main.maxProjectiles))
Main.projectile[proj2].Calamity().stealthStrike = true;
}
}
return true;
else
{
for (int i = 0; i < 2; i++)
{
int proj = Projectile.NewProjectile(source, position, velocity.RotatedBy(angle1), type, damage, knockback, player.whoAmI, 0, 0, 0 + i);
int proj2 = Projectile.NewProjectile(source, position, velocity.RotatedBy(angle1 * 0.5f) * 0.9f, type, damage, knockback, player.whoAmI, 0, 0, 2 + i);
angle1 *= -1;
}
}
return false;
}
}
}
+167 -167
View File
@@ -1,14 +1,12 @@
CalamityConfig: {
DisplayName: Main Config
CalamityClientConfig: {
DisplayName: Client Config
Headers: {
ExpertMaster: Expert and Master Mode Changes
Gameplay: General Gameplay Changes
Graphics: Graphics Changes
Revengeance: Revengeance Mode Changes
UI: UI Changes
BaseBoosts: Base Stat Boosts
MusicEvents: Music Events
MeterPositions: Meter Positions
MusicEvents: In-Game Music Events
}
AdrenalineMeterPosX: {
@@ -38,15 +36,6 @@ CalamityConfig: {
'''
}
BossesStopWeather: {
Label: "[i:CalamityMod/TorrentialTear] Bosses Stop Weather"
Tooltip:
'''
When enabled, many late game bosses will stop all rain and related weather when spawned.
Enable if you have performance issues during late game boss fights.
'''
}
BossHealthBarExtraInfo: {
Label: "[i:CalamityMod/EncryptedSchematicPlanetoid] Boss Health Bar Extra Info"
Tooltip:
@@ -56,35 +45,6 @@ CalamityConfig: {
'''
}
BossHealthBoost: {
Label: "[i:LifeCrystal] Boss Health Boost Percentage"
Tooltip:
'''
Globally boosts the health of all bosses by the specified percentage.
This stacks with multiplayer boss health boosts.
Does not affect bosses that are already spawned.
'''
}
DefaultDashEnabled: {
Label: "[i:Tabi] Default Dash"
Tooltip:
'''
Gives the player a very weak dash by default that requires no equipment or items to use.
This dash will be replaced by any other available dash, including those from other mods.
'''
}
BossZen: {
Label: "[i:CalamityMod/ZenPotion] Bosses Drastically Reduce Spawn Rates"
Tooltip:
'''
All living bosses will drastically reduce the spawn rates of regular enemies.
This also prevents Slime Rain from occurring while a boss is alive.
Calamity is balanced around this setting being enabled.
'''
}
ChargeMeter: {
Label: "[i:CalamityMod/DraedonPowerCell] Display Charge Meter"
Tooltip:
@@ -112,11 +72,6 @@ CalamityConfig: {
'''
}
ChilledWaterRework: {
Label: "[i:ArcticDivingGear] Chilled Water Rework"
Tooltip: When enabled, water in the Snow and Ice biomes will rapidly drain the player's breath instead of inflicting Chilled.
}
CooldownDisplay: {
Label: "[i:CalamityMod/NebulousCore] Cooldown Rack Display Mode"
Tooltip:
@@ -136,37 +91,6 @@ CalamityConfig: {
Tooltip: Plays Calamity Mod OST - "Scourge of the Universe (Eulogy for the Ego)", after the Devourer of Gods has been defeated.
}
EarlyHardmodeProgressionRework: {
Label: "[i:Pwnhammer] Early Hardmode Progression Rework"
Tooltip:
'''
Demon Altars no longer spawn ores and crimson/corruption blocks when broken.
Wall of Flesh spawns Cobalt and Palladium ore on first kill.
The first mech boss you fight has 20% (10% in Expert and Master) less HP and damage and spawns Mythril and Orichalcum ore on first kill.
The second mech boss you fight has 10% (5% in Expert and Master) less HP and damage and spawns Adamantite and Titanium ore on first kill.
The third mech boss spawns Hallowed Ore on first kill.
'''
}
FasterBaseSpeed: {
Label: "[i:HermesBoots] Increase Base Movement Speed"
Tooltip:
'''
Increases the player's base movement speed substantially by always giving them +50% movement speed.
This setting does nothing if the mod Terraria Overhaul is loaded.
Calamity is balanced around this setting being enabled.
'''
}
FasterRopeClimbSpeed: {
Label: "[i:Rope] Increase Rope Climb Speed"
Tooltip:
'''
Increases the player's rope climb speed substantially by increasing acceleration and deceleration while on a rope.
Calamity is balanced around this setting being enabled.
'''
}
FasterFallHotkey: {
Label: "[i:CalamityMod/BallAndChain] Enable Fast Falling"
Tooltip:
@@ -177,24 +101,6 @@ CalamityConfig: {
'''
}
FasterJumpSpeed: {
Label: "[i:FrogLeg] Increase Base Jump Speed"
Tooltip:
'''
Slightly increases the player's base jump speed.
Calamity is balanced around this setting being enabled.
'''
}
FasterTilePlacement: {
Label: "[i:ArchitectGizmoPack] Increase Base Building Speed"
Tooltip:
'''
Substantially increases how rapidly the player can place tiles and walls.
This config stacks with the Brick Layer, Portable Cement Mixer and other accessories.
'''
}
FlightBar: {
Label: "[i:CalamityMod/DrewsWings] Display Flight Bar"
Tooltip:
@@ -223,24 +129,6 @@ CalamityConfig: {
'''
}
ForceTownSafety: {
Label: "[i:Sunflower] Force Town Safety"
Tooltip:
'''
Counteracts Expert and Master Mode allowing enemies to spawn near towns by vastly decreasing spawn rates.
This can have unintended side effects such as making critters difficult to find.
'''
}
HigherJumpHeight: {
Label: "[i:ShinyRedBalloon] Increase Base Jump Height"
Tooltip:
'''
Increases the player's base jump height by 10% so that they can jump 7 tiles.
Calamity is balanced around this setting being enabled.
'''
}
Interlude1: {
Label: "[i:CalamityModMusic/Interlude1MusicBox] Interlude 1"
Tooltip: Plays Calamity Mod OST - "Silence before the storms", after Calamitas Clone has been defeated.
@@ -265,24 +153,6 @@ CalamityConfig: {
'''
}
MusicModReminderMessage: {
Label: "[i:MusicBoxMartians] Music Mod Reminder Message"
Tooltip:
'''
Enable or disable the status message which reminds users to install the Calamity Music Mod.
This message plays on world entry.
'''
}
NerfExpertDebuffs: {
Label: "[i:AnkhCharm] Remove Increased Debuff Duration"
Tooltip:
'''
Disables Expert Mode doubling (and Master Mode tripling) the duration of debuffs on the player.
Calamity is balanced around this setting being enabled.
'''
}
NewVanillaTextures: {
Label: "[i:Paintbrush] New Vanilla Textures"
Tooltip:
@@ -321,20 +191,6 @@ CalamityConfig: {
'''
}
RemoveLavaDropsFromLavaSlimes: {
Label: "[i:LavaWaders] Remove Lava Drops From Lava Slimes"
Tooltip: When enabled, Lava Slimes will be replaced with a new Lava Slime that no longer drops lava.
}
RemoveReforgeRNG: {
Label: "[i:TinHammer] Remove Reforge RNG"
Tooltip:
'''
Removes randomness from the Goblin Tinkerer's reforges for both weapons and accessories.
Disable this if using mods that change reforging on their own to prevent conflicts.
'''
}
RipperMeterShake: {
Label: "[i:CalamityMod/RedLightningContainer] Rage and Adrenaline Meter Shake"
Tooltip:
@@ -442,6 +298,169 @@ CalamityConfig: {
'''
}
VanillaCooldownDisplay: {
Label: "[i:HealingPotion] Display Vanilla Cooldowns"
Tooltip:
'''
Adds the vanilla debuffs Potion Sickness and Chaos State to the Cooldown Rack.
The debuffs will still appear in the buffs array, but this may help make them more visible.
'''
}
VCMMStatusMessage: {
Label: "[i:MusicBoxMartians] VCMM Status Message"
Tooltip: Enable or disable the status message promoting the Vanilla Calamity Music Mod that plays on world entry.
}
WikiStatusMessage: {
Label: "[i:Book] Wiki Status Message"
Tooltip: Enable or disable the status message promoting the Official Calamity Wiki that plays on world entry.
}
}
CalamityServerConfig: {
DisplayName: Server Config
Denied: You have no permission to change this config
Headers: {
ExpertMaster: Expert and Master Mode Changes
Gameplay: General Gameplay Changes
BaseBoosts: Base Stat Boosts
}
BossesStopWeather: {
Label: "[i:CalamityMod/TorrentialTear] Bosses Stop Weather"
Tooltip:
'''
When enabled, many late game bosses will stop all rain and related weather when spawned.
Enable if you have performance issues during late game boss fights.
'''
}
BossHealthBoost: {
Label: "[i:LifeCrystal] Boss Health Boost Percentage"
Tooltip:
'''
Globally boosts the health of all bosses by the specified percentage.
This stacks with multiplayer boss health boosts.
Does not affect bosses that are already spawned.
'''
}
DefaultDashEnabled: {
Label: "[i:Tabi] Default Dash"
Tooltip:
'''
Gives the player a very weak dash by default that requires no equipment or items to use.
This dash will be replaced by any other available dash, including those from other mods.
'''
}
BossZen: {
Label: "[i:CalamityMod/ZenPotion] Bosses Drastically Reduce Spawn Rates"
Tooltip:
'''
All living bosses will drastically reduce the spawn rates of regular enemies.
This also prevents Slime Rain from occurring while a boss is alive.
Calamity is balanced around this setting being enabled.
'''
}
ChilledWaterRework: {
Label: "[i:ArcticDivingGear] Chilled Water Rework"
Tooltip: When enabled, water in the Snow and Ice biomes will rapidly drain the player's breath instead of inflicting Chilled.
}
EarlyHardmodeProgressionRework: {
Label: "[i:Pwnhammer] Early Hardmode Progression Rework"
Tooltip:
'''
Demon Altars no longer spawn ores and crimson/corruption blocks when broken.
Wall of Flesh spawns Cobalt and Palladium ore on first kill.
The first mech boss you fight has 20% (10% in Expert and Master) less HP and damage and spawns Mythril and Orichalcum ore on first kill.
The second mech boss you fight has 10% (5% in Expert and Master) less HP and damage and spawns Adamantite and Titanium ore on first kill.
The third mech boss spawns Hallowed Ore on first kill.
'''
}
FasterBaseSpeed: {
Label: "[i:HermesBoots] Increase Base Movement Speed"
Tooltip:
'''
Increases the player's base movement speed substantially by always giving them +50% movement speed.
This setting does nothing if the mod Terraria Overhaul is loaded.
Calamity is balanced around this setting being enabled.
'''
}
FasterRopeClimbSpeed: {
Label: "[i:Rope] Increase Rope Climb Speed"
Tooltip:
'''
Increases the player's rope climb speed substantially by increasing acceleration and deceleration while on a rope.
Calamity is balanced around this setting being enabled.
'''
}
FasterJumpSpeed: {
Label: "[i:FrogLeg] Increase Base Jump Speed"
Tooltip:
'''
Slightly increases the player's base jump speed.
Calamity is balanced around this setting being enabled.
'''
}
FasterTilePlacement: {
Label: "[i:ArchitectGizmoPack] Increase Base Building Speed"
Tooltip:
'''
Substantially increases how rapidly the player can place tiles and walls.
This config stacks with the Brick Layer, Portable Cement Mixer and other accessories.
'''
}
ForceTownSafety: {
Label: "[i:Sunflower] Force Town Safety"
Tooltip:
'''
Counteracts Expert and Master Mode allowing enemies to spawn near towns by vastly decreasing spawn rates.
This can have unintended side effects such as making critters difficult to find.
'''
}
HigherJumpHeight: {
Label: "[i:ShinyRedBalloon] Increase Base Jump Height"
Tooltip:
'''
Increases the player's base jump height by 10% so that they can jump 7 tiles.
Calamity is balanced around this setting being enabled.
'''
}
NerfExpertDebuffs: {
Label: "[i:AnkhCharm] Remove Increased Debuff Duration"
Tooltip:
'''
Disables Expert Mode doubling (and Master Mode tripling) the duration of debuffs on the player.
Calamity is balanced around this setting being enabled.
'''
}
RemoveLavaDropsFromLavaSlimes: {
Label: "[i:LavaWaders] Remove Lava Drops From Lava Slimes"
Tooltip: When enabled, Lava Slimes will be replaced with a new Lava Slime that no longer drops lava.
}
RemoveReforgeRNG: {
Label: "[i:TinHammer] Remove Reforge RNG"
Tooltip:
'''
Removes randomness from the Goblin Tinkerer's reforges for both weapons and accessories.
Disable this if using mods that change reforging on their own to prevent conflicts.
'''
}
PotionSelling: {
Label: "[i:SpelunkerPotion] Town NPC Potion Selling"
Tooltip:
@@ -477,23 +496,4 @@ CalamityConfig: {
This includes the Old Man.
'''
}
VanillaCooldownDisplay: {
Label: "[i:HealingPotion] Display Vanilla Cooldowns"
Tooltip:
'''
Adds the vanilla debuffs Potion Sickness and Chaos State to the Cooldown Rack.
The debuffs will still appear in the buffs array, but this may help make them more visible.
'''
}
VCMMStatusMessage: {
Label: "[i:MusicBoxMartians] VCMM Status Message"
Tooltip: Enable or disable the status message promoting the Vanilla Calamity Music Mod that plays on world entry.
}
WikiStatusMessage: {
Label: "[i:Book] Wiki Status Message"
Tooltip: Enable or disable the status message promoting the Official Calamity Wiki that plays on world entry.
}
}
@@ -968,7 +968,11 @@ Viscera: {
VitriolicViper: {
DisplayName: Vitriolic Viper
Tooltip: Releases a volley of venomous fangs and spit
Tooltip:
'''
Charges up and fires a slithering beam of radiation
If fully charged, instead fires a huge spread of short range fangs which quickly vanish
'''
}
VividClarity: {
@@ -729,7 +729,11 @@ IllustriousKnives: {
InsidiousImpaler: {
DisplayName: Insidious Impaler
Tooltip: Fires infected harpoons that stick to enemies and explode
Tooltip:
'''
Throws self-propelling radioactive harpoons which chase foes
Harpoons ricochet at close range for additional hits
'''
}
IridescentExcalibur: {
@@ -622,11 +622,11 @@ Hellborn: {
DisplayName: Hellborn
Tooltip:
'''
Fires a spread of 3 bullets
Enemies that touch the gun while it's being fired trigger a massive explosion
After the explosion, this gun gains a massive boost to damage, fire rate and knockback for 10 seconds
These stat bonuses slowly decay over time
Converts musket balls into explosive bullets
An ornate firearm created during the Draconic Era by Azafure's finest forgemaster
Hold <left> to twirl the gun in your hand, rapidly hitting nearby enemies
Hits with the gun itself add rounds to the gun, up to a max of 8
At the cost of one round, hold <right> to fire a giant energy sphere with potent recoil
[c/E1B65F:'Know the grace of a gun forged through beauteous inspiration']
'''
}
@@ -1087,8 +1087,12 @@ SepticSkewer: {
DisplayName: Septic Skewer
Tooltip:
'''
Launches a spiky harpoon infested with toxins
Releases bacteria when returning to the player
Launches a vile chained harpoon infested with toxins
Harpoons stick into enemies and inflict Sulphuric Poisoning for a long time
After being impaled for one second, harpoons rip themselves back out and spray damaging gores
Press <right> to manually rip out all harpoons, dealing bonus damage
Enemies close to death are dragged back with returning harpoons and executed when they reach you
Executions heal you for 25 health and launch an additional harpoon automatically
'''
}
@@ -1275,9 +1275,10 @@ TheOldReaper: {
DisplayName: The Old Reaper
Tooltip:
'''
Throws a homing reaper scythe that shreds enemies
Stealth strikes throw three at once
'Slice 'n dice'
Throws an irradiated scythe that cuts through enemies
Deposits unstable isotopes on hit, which create delayed nuclear explosions when they decay
Stealth strikes are thrown into the sky and fall upon enemies a few seconds later
On hit, stealth strikes create a focused deluge of acid rain
'''
}
@@ -1336,9 +1337,8 @@ ToxicantTwister: {
DisplayName: Toxicant Twister
Tooltip:
'''
Throws a slow moving boomerang
After a few moments, the boomerang chooses a target and rapidly homes in
Stealth strikes home in faster and rapidly release sand
Throws a fan of four spinning disks that swirl around your cursor
Stealth strikes swirl in a wider range and create a vortex of toxic raindrops that home in on enemies
'''
}
@@ -183,7 +183,7 @@ SeaDragonRocket.DisplayName: Seadragon RPG
SeasSearingBubble.DisplayName: Searing Bubble
SeasSearingSecondary.DisplayName: Hydroshower
SeasSearingSpout.DisplayName: Spout
SepticSkewerBacteria.DisplayName: Bacteria
SepticSkewerBacteria.DisplayName: Septic Gore
SepticSkewerHarpoon.DisplayName: Septic Skewer
SevensStrikerBrick.DisplayName: Brick
SevensStrikerCherry.DisplayName: Cherry
@@ -244,3 +244,5 @@ WaterSpout.DisplayName: Spout
WildfireBloomFire.DisplayName: Wildfire Fire
WildfireBloomFlare.DisplayName: Wildfire Flare
WulfrumScrapBullet.DisplayName: High Speed Scrap
HellbornProj.DisplayName: Hell-born Gunblast
HellbornShell.DisplayName: Hell's Shell
@@ -311,8 +311,8 @@ TotalityFire.DisplayName: Totality Fire
TotalityFlask.DisplayName: Totality Flask
TotalityTar.DisplayName: Totality Tar
TotalMeltdown.DisplayName: Explosion
ToxicantTwisterDust.DisplayName: Toxicant Dust
ToxicantTwisterTwoPointZero.DisplayName: Toxicant Twister
ToxicantTwisterDust.DisplayName: Toxicant Raindrop
ToxicantTwisterProj.DisplayName: Toxicant Twister
TurbulanceProjectile.DisplayName: Turbulance
TurbulanceWindSlash.DisplayName: Wind Slash
TwistingThunderProj.DisplayName: Twisting Thunder
@@ -329,3 +329,5 @@ WrathwingCinder.DisplayName: Wrathwing Eruption
WrathwingFireball.DisplayName: Wrathwing Fireball
WrathwingSpear.DisplayName: Wrathwing
WulfrumKnifeProj.DisplayName: Wulfrum Knife
RadiationBurst.DisplayName: Radiation Burst
RadiationRain.DisplayName: Radiation Rain
+1 -1
View File
@@ -2180,7 +2180,7 @@ namespace CalamityMod
case "GetBossHealthBoost":
case "BossHealthMultiplier":
case "GetBossHealthMultiplier":
return CalamityConfig.Instance.BossHealthBoost;
return CalamityServerConfig.Instance.BossHealthBoost;
case "HasPermanentPowerup":
case "GetPermanentPowerup":
+2 -2
View File
@@ -319,7 +319,7 @@ namespace CalamityMod.NPCs.AstrumAureus
if (NPC.ai[0] == 3f || NPC.ai[0] == 4f)
afterimageAmt = 10;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -349,7 +349,7 @@ namespace CalamityMod.NPCs.AstrumAureus
attackingColor = slimePhase == 0 ? Color.Violet : Color.Yellow;
}
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+2 -2
View File
@@ -244,7 +244,7 @@ namespace CalamityMod.NPCs.AstrumAureus
Color whiteColor = Color.White;
int afterimageAmt = 10;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -267,7 +267,7 @@ namespace CalamityMod.NPCs.AstrumAureus
texture2D15 = GlowTexture.Value;
Color afterimageColorLerp = Color.Lerp(Color.White, Color.Orange, 0.5f) * NPC.Opacity;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+3 -3
View File
@@ -280,7 +280,7 @@ namespace CalamityMod.NPCs.Bumblebirb
color = altColor;
}
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += afterimageIncrement)
{
@@ -333,7 +333,7 @@ namespace CalamityMod.NPCs.Bumblebirb
}
}
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 0; j < extraAfterimageAmt; j++)
{
@@ -375,7 +375,7 @@ namespace CalamityMod.NPCs.Bumblebirb
glowmaskColor *= glowmaskDampener;
}
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int k = 1; k < afterimageAmt; k += afterimageIncrement)
{
+1 -1
View File
@@ -104,7 +104,7 @@ namespace CalamityMod.NPCs.Bumblebirb
Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2);
int afterimageAmt = NPC.ai[0] == 2.1f ? 7 : 0;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
+2 -2
View File
@@ -149,7 +149,7 @@ namespace CalamityMod.NPCs.CalClone
float colorLerpAmt = 0.5f;
int afterimageAmt = 7;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -176,7 +176,7 @@ namespace CalamityMod.NPCs.CalClone
color = Color.CornflowerBlue;
}
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i++)
{
+2 -2
View File
@@ -122,7 +122,7 @@ namespace CalamityMod.NPCs.CalClone
Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
int afterimageAmt = 7;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -145,7 +145,7 @@ namespace CalamityMod.NPCs.CalClone
texture2D15 = GlowTexture.Value;
Color pinkLerp = Color.Lerp(Color.White, Color.Red, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+2 -2
View File
@@ -116,7 +116,7 @@ namespace CalamityMod.NPCs.CalClone
Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
int afterimageAmt = 7;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -139,7 +139,7 @@ namespace CalamityMod.NPCs.CalClone
texture2D15 = GlowTexture.Value;
Color pinkLerp = Color.Lerp(Color.White, Color.Red, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+2 -2
View File
@@ -194,7 +194,7 @@ namespace CalamityMod.NPCs.CalClone
float colorLerpAmt = 0.5f;
int afterImageAmt = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int a = 1; a < afterImageAmt; a += 2)
{
@@ -217,7 +217,7 @@ namespace CalamityMod.NPCs.CalClone
texture = GlowTexture.Value;
Color glow = Color.Lerp(Color.White, Color.Red, colorLerpAmt);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int a = 1; a < afterImageAmt; a++)
{
@@ -391,7 +391,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
// Destroy all Dark Energies if their total HP is below 20%
int darkEnergyMaxHP = bossRush ? DarkEnergy.MaxBossRushHP : DarkEnergy.MaxHP;
//These are still needed so that CV Dark energy despawn works properly
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01;
darkEnergyMaxHP += (int)(darkEnergyMaxHP * HPBoost);
int totalDarkEnergiesSpawned = darkEnergyAmt * 3 + 2;
@@ -69,7 +69,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
float greenLight = (phase3AI ? 1.2f : phase2AI ? 0.8f : 0.4f) * alphaScale;
Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), redLight, greenLight, 0f);
if (CalamityConfig.Instance.BossesStopWeather)
if (CalamityServerConfig.Instance.BossesStopWeather)
CalamityMod.StopRain();
else if (!Main.raining && !BossRushEvent.BossRushActive)
CalamityUtils.StartRain();
+13 -13
View File
@@ -2324,7 +2324,7 @@ namespace CalamityMod.NPCs
}
if ((npc.boss && npc.type != NPCID.MartianSaucerCore) || CalamityLists.bossHPScaleList.Contains(npc.type))
{
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)Math.Round(npc.lifeMax * HPBoost);
}
@@ -2527,7 +2527,7 @@ namespace CalamityMod.NPCs
}
// Reduce mech boss HP and damage depending on the new ore progression changes
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
{
if (!NPC.downedMechBossAny)
{
@@ -3227,7 +3227,7 @@ namespace CalamityMod.NPCs
Texture2D npcTexture = texture ?? TextureAssets.Npc[npc.type].Value;
Vector2 screenOffset = npc.IsABestiaryIconDummy ? Vector2.Zero : Main.screenPosition;
int afterimageCounter = 1;
while (afterimageCounter < NPCID.Sets.TrailCacheLength[npc.type] && CalamityConfig.Instance.Afterimages)
while (afterimageCounter < NPCID.Sets.TrailCacheLength[npc.type] && CalamityClientConfig.Instance.Afterimages)
{
Color colorToDraw = Color.Lerp(drawColor, endingColor, afterimageCounter / (float)NPCID.Sets.TrailCacheLength[npc.type]);
colorToDraw *= afterimageCounter / (float)NPCID.Sets.TrailCacheLength[npc.type];
@@ -6301,12 +6301,12 @@ namespace CalamityMod.NPCs
spawnRate = (int)(spawnRate * 1.4);
maxSpawns = (int)(maxSpawns * 0.4f);
}
if (player.Calamity().zen || (CalamityConfig.Instance.ForceTownSafety && player.townNPCs > 1f && Main.expertMode))
if (player.Calamity().zen || (CalamityServerConfig.Instance.ForceTownSafety && player.townNPCs > 1f && Main.expertMode))
{
spawnRate = (int)(spawnRate * 2.5);
maxSpawns = (int)(maxSpawns * 0.3f);
}
if (player.Calamity().isNearbyBoss && CalamityConfig.Instance.BossZen)
if (player.Calamity().isNearbyBoss && CalamityServerConfig.Instance.BossZen)
{
spawnRate *= 5;
maxSpawns = (int)(maxSpawns * 0.001f);
@@ -6424,7 +6424,7 @@ namespace CalamityMod.NPCs
}
// Replace vanilla Lava Slimes with Calamity Lava Slimes to avoid annoying lava drops
if (spawnInfo.Player.ZoneUnderworldHeight && !calamityBiomeZone && CalamityConfig.Instance.RemoveLavaDropsFromLavaSlimes && Main.expertMode)
if (spawnInfo.Player.ZoneUnderworldHeight && !calamityBiomeZone && CalamityServerConfig.Instance.RemoveLavaDropsFromLavaSlimes && Main.expertMode)
{
pool.Add(NPCType<LavaSlimeNoLavaDrop>(), SpawnCondition.Underworld.Chance);
pool.Remove(NPCID.LavaSlime);
@@ -6943,7 +6943,7 @@ namespace CalamityMod.NPCs
{
if (npc.type != NPCID.BrainofCthulhu && (npc.type != NPCID.DukeFishron || npc.ai[0] <= 9f) && npc.active)
{
if (CalamityConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type) || CalamityLists.needsDebuffIconDisplayList.Contains(npc.type)))
if (CalamityClientConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type) || CalamityLists.needsDebuffIconDisplayList.Contains(npc.type)))
{
List<Texture2D> currentDebuffs = new List<Texture2D>() { };
@@ -7459,7 +7459,7 @@ namespace CalamityMod.NPCs
}
}
Texture2D glowTexture = CalamityConfig.Instance.NewVanillaTextures ? CalamityMod.DestroyerGlowmasks[0].Value : TextureAssets.Dest[0].Value;
Texture2D glowTexture = CalamityClientConfig.Instance.NewVanillaTextures ? CalamityMod.DestroyerGlowmasks[0].Value : TextureAssets.Dest[0].Value;
switch (npc.type)
{
default:
@@ -7467,11 +7467,11 @@ namespace CalamityMod.NPCs
break;
case NPCID.TheDestroyerBody:
glowTexture = CalamityConfig.Instance.NewVanillaTextures ? CalamityMod.DestroyerGlowmasks[1].Value : TextureAssets.Dest[1].Value;
glowTexture = CalamityClientConfig.Instance.NewVanillaTextures ? CalamityMod.DestroyerGlowmasks[1].Value : TextureAssets.Dest[1].Value;
break;
case NPCID.TheDestroyerTail:
glowTexture = CalamityConfig.Instance.NewVanillaTextures ? CalamityMod.DestroyerGlowmasks[2].Value : TextureAssets.Dest[2].Value;
glowTexture = CalamityClientConfig.Instance.NewVanillaTextures ? CalamityMod.DestroyerGlowmasks[2].Value : TextureAssets.Dest[2].Value;
break;
}
@@ -7481,7 +7481,7 @@ namespace CalamityMod.NPCs
}
// Laser telegraph
else if (npc.type == NPCID.Probe && CalamityConfig.Instance.NewVanillaTextures)
else if (npc.type == NPCID.Probe && CalamityClientConfig.Instance.NewVanillaTextures)
{
float eyeTelegraphGateValue = (NPC.IsMechQueenUp ? DestroyerAI.ProbeLaserGateValue_Mechdusa : BossRushEvent.BossRushActive ? DestroyerAI.ProbeLaserGateValue_BossRush : revenge ? DestroyerAI.ProbeLaserGateValue_Rev : DestroyerAI.ProbeLaserGateValue) - DestroyerAI.ProbeLaserTelegraphTime;
Texture2D glowTexture = CalamityMod.ProbeGlowmask.Value;
@@ -7795,7 +7795,7 @@ namespace CalamityMod.NPCs
float eyeTelegraphGateValue = WallOfFleshAI.LaserShootGateValue - WallOfFleshAI.LaserShootTelegraphTime;
if (npc.localAI[1] > eyeTelegraphGateValue || npc.localAI[2] > 0f || enraged)
{
Texture2D glowTexture = CalamityConfig.Instance.NewVanillaTextures ? CalamityMod.WallOfFleshEyeGlowmask.Value : TextureAssets.Npc[npc.type].Value;
Texture2D glowTexture = CalamityClientConfig.Instance.NewVanillaTextures ? CalamityMod.WallOfFleshEyeGlowmask.Value : TextureAssets.Npc[npc.type].Value;
Vector2 halfSize = npc.frame.Size() / 2;
SpriteEffects spriteEffects = SpriteEffects.None;
if (npc.spriteDirection == 1)
@@ -7947,7 +7947,7 @@ namespace CalamityMod.NPCs
float telegraphScalar = MathHelper.Clamp((Math.Abs(PlanteraAI.StopChargeGateValue) - telegraphTimer) / Math.Abs(PlanteraAI.StopChargeGateValue), 0f, 1f);
Color telegraphColor = Color.Lerp(originalColor, newColor, telegraphScalar);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
int afterimageAmount = 10;
int afterImageIncrement = 2;
+4 -4
View File
@@ -1816,7 +1816,7 @@ DukeEditFailed:
if (!Main.hardMode && !BossRushEvent.BossRushActive)
{
// Increase altar count to allow natural mech boss spawning.
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework)
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework)
WorldGen.altarCount++;
string key2 = "Mods.CalamityMod.Status.Progression.UglyBossText";
@@ -1840,7 +1840,7 @@ DukeEditFailed:
SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType<DILF>(), ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, NPC.downedMechBoss1 || !NPC.downedMechBoss2 || !NPC.downedMechBoss3);
SetNewBossJustDowned(npc);
if (!NPC.downedMechBoss1 && CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
if (!NPC.downedMechBoss1 && CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
SpawnMechBossHardmodeOres();
break;
@@ -1852,7 +1852,7 @@ DukeEditFailed:
SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType<DILF>(), ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, !NPC.downedMechBoss1 || NPC.downedMechBoss2 || !NPC.downedMechBoss3);
SetNewBossJustDowned(npc);
if (!NPC.downedMechBoss2 && CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
if (!NPC.downedMechBoss2 && CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
SpawnMechBossHardmodeOres();
}
break;
@@ -1862,7 +1862,7 @@ DukeEditFailed:
SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType<DILF>(), ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, !NPC.downedMechBoss1 || !NPC.downedMechBoss2 || NPC.downedMechBoss3);
SetNewBossJustDowned(npc);
if (!NPC.downedMechBoss3 && CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
if (!NPC.downedMechBoss3 && CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
SpawnMechBossHardmodeOres();
break;
+1 -1
View File
@@ -681,7 +681,7 @@ namespace CalamityMod.NPCs
public void TownNPCAlertSystem(NPC npc, Mod mod, SpriteBatch spriteBatch)
{
if (CalamityConfig.Instance.ShopNewAlert && npc.townNPC)
if (CalamityClientConfig.Instance.ShopNewAlert && npc.townNPC)
{
for (int i = 0; i < npcAlertList.Count; i++)
{
+2 -2
View File
@@ -164,7 +164,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
int afterimageAmt = 7;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -187,7 +187,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
texture2D15 = GlowTexture.Value;
Color cyanLerp = Color.Lerp(Color.White, Color.Cyan, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+2 -2
View File
@@ -228,7 +228,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
drawPos -= new Vector2(mainTexture.Width, mainTexture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f;
drawPos += drawOrigin * NPC.scale + new Vector2(0f, NPC.gfxOffY);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < trailCount; i += 2)
{
@@ -251,7 +251,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
Texture2D glowTexture = GlowTexture.Value;
Color glowColor = Color.Lerp(Color.White, Color.Fuchsia, 0.5f) * NPC.Opacity;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < trailCount; i++)
{
+2 -2
View File
@@ -252,7 +252,7 @@ namespace CalamityMod.NPCs.Crags
Vector2 halfSizeTexture = new Vector2((float)(texture.Width / 2), (float)(texture.Height / 2));
int afterimageAmt = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -275,7 +275,7 @@ namespace CalamityMod.NPCs.Crags
texture = GlowTexture.Value;
Color redGlow = Color.Lerp(Color.White, Color.Red, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+1 -1
View File
@@ -263,7 +263,7 @@ namespace CalamityMod.NPCs.Cryogen
NPC.ai[2] = 0f;
}
if (CalamityConfig.Instance.BossesStopWeather)
if (CalamityServerConfig.Instance.BossesStopWeather)
CalamityMod.StopRain();
else if (!Main.raining && !BossRushEvent.BossRushActive)
CalamityUtils.StartRain();
+1 -1
View File
@@ -353,7 +353,7 @@ namespace CalamityMod.NPCs.DevourerofGods
CalamityGlobalNPC.DoGP2 = -1;
// Stop rain
if (CalamityConfig.Instance.BossesStopWeather)
if (CalamityServerConfig.Instance.BossesStopWeather)
CalamityMod.StopRain();
// Get a target (time is checked in the second check to ensure a new target isn't being set constantly)
+2 -2
View File
@@ -1529,7 +1529,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
// This is created to allow easy duplication of them when drawing the charge.
void drawInstance(Vector2 drawOffset, Color baseColor)
{
if (CalamityConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy)
if (CalamityClientConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy)
{
for (int i = 1; i < numAfterimages; i += 2)
{
@@ -1600,7 +1600,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
}
texture = GlowTexture.Value;
if (CalamityConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy)
if (CalamityClientConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy)
{
for (int i = 1; i < numAfterimages; i += 2)
{
+2 -2
View File
@@ -1242,7 +1242,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
Vector2 vector = new Vector2(NPC.width / 2, NPC.height / 2);
int numAfterimages = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < numAfterimages; i += 2)
{
@@ -1262,7 +1262,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
texture = GlowTexture.Value;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < numAfterimages; i += 2)
{
+2 -2
View File
@@ -552,7 +552,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White;
int numAfterimages = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < numAfterimages; i += 2)
{
@@ -593,7 +593,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
Texture2D glowTexture = GlowTexture.Value;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < numAfterimages; i += 2)
{
+2 -2
View File
@@ -600,7 +600,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White;
int numAfterimages = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < numAfterimages; i += 2)
{
@@ -639,7 +639,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
Texture2D glowTexture = GlowTexture.Value;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < numAfterimages; i += 2)
{
+2 -2
View File
@@ -551,7 +551,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White;
int numAfterimages = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < numAfterimages; i += 2)
{
@@ -591,7 +591,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
Texture2D glowTexture = GlowTexture.Value;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < numAfterimages; i += 2)
{
+2 -2
View File
@@ -546,7 +546,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White;
int numAfterimages = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < numAfterimages; i += 2)
{
@@ -585,7 +585,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
Texture2D glowTexture = GlowTexture.Value;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < numAfterimages; i += 2)
{
+2 -2
View File
@@ -1424,7 +1424,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
// This is created to allow easy duplication of them when drawing the charge.
void drawInstance(Vector2 drawOffset, Color baseColor)
{
if (CalamityConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy)
if (CalamityClientConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy)
{
for (int i = 1; i < numAfterimages; i += 2)
{
@@ -1495,7 +1495,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
}
texture = GlowTexture.Value;
if (CalamityConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy)
if (CalamityClientConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy)
{
for (int i = 1; i < numAfterimages; i += 2)
{
+1 -1
View File
@@ -609,7 +609,7 @@ namespace CalamityMod.NPCs.GreatSandShark
int eightConst = 8;
int afterimageInc = 2;
int afterimageCounter = 1;
while (((afterimageInc > 0 && afterimageCounter < eightConst) || (afterimageInc < 0 && afterimageCounter > eightConst)) && CalamityConfig.Instance.Afterimages)
while (((afterimageInc > 0 && afterimageCounter < eightConst) || (afterimageInc < 0 && afterimageCounter > eightConst)) && CalamityClientConfig.Instance.Afterimages)
{
Color alphaAfterimageColor = NPC.GetAlpha(extraAfterimageColor);
{
+1 -1
View File
@@ -316,7 +316,7 @@ namespace CalamityMod.NPCs.HiveMind
Color afterimageBaseColor = Color.White;
int numAfterimages = 5;
if (CalamityConfig.Instance.Afterimages && state != 0)
if (CalamityClientConfig.Instance.Afterimages && state != 0)
{
for (int i = 1; i < numAfterimages; i += 2)
{
+1 -1
View File
@@ -264,7 +264,7 @@ namespace CalamityMod.NPCs.NormalNPCs
float telegraphScalar = MathHelper.Clamp((NPC.ai[0] - ChargeTelegraphGateValue) / ChargeTelegraphGateValue, 0f, 1f);
Color telegraphColor = Color.Lerp(originalColor, newColor, telegraphScalar);
if (CalamityConfig.Instance.Afterimages && NPC.ai[1] > 0f)
if (CalamityClientConfig.Instance.Afterimages && NPC.ai[1] > 0f)
{
int afterimageAmount = 10;
int afterImageIncrement = 2;
+3 -3
View File
@@ -382,7 +382,7 @@ namespace CalamityMod.NPCs.NormalNPCs
int damage = NPC.GetProjectileDamage(type);
// Reduce mech boss projectile damage depending on the new ore progression changes
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
{
double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert;
double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert;
@@ -513,7 +513,7 @@ namespace CalamityMod.NPCs.NormalNPCs
int damage = NPC.GetProjectileDamage(type);
// Reduce mech boss projectile damage depending on the new ore progression changes
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
{
double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert;
double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert;
@@ -702,7 +702,7 @@ namespace CalamityMod.NPCs.NormalNPCs
int damage = NPC.GetProjectileDamage(type);
// Reduce mech boss projectile damage depending on the new ore progression changes
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
{
double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert;
double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert;
+1 -1
View File
@@ -342,7 +342,7 @@ namespace CalamityMod.NPCs.NormalNPCs
(MathHelper.Clamp(AITimer, 0f, TimeBeforeDash) / TimeBeforeDash);
float AfterimageFade = MathHelper.Lerp(0f, 1f, interpolant);
if (CurrentState == IceClasperAIState.Dashing && CalamityConfig.Instance.Afterimages)
if (CurrentState == IceClasperAIState.Dashing && CalamityClientConfig.Instance.Afterimages)
{
for (int i = 0; i < NPC.oldPos.Length; i++)
{
+3 -3
View File
@@ -418,7 +418,7 @@ namespace CalamityMod.NPCs.NormalNPCs
int damage = NPC.GetProjectileDamage(type);
// Reduce mech boss projectile damage depending on the new ore progression changes
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
{
double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert;
double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert;
@@ -683,7 +683,7 @@ namespace CalamityMod.NPCs.NormalNPCs
int damage = NPC.GetProjectileDamage(type);
// Reduce mech boss projectile damage depending on the new ore progression changes
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
{
double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert;
double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert;
@@ -751,7 +751,7 @@ namespace CalamityMod.NPCs.NormalNPCs
int damage = NPC.GetProjectileDamage(type);
// Reduce mech boss projectile damage depending on the new ore progression changes
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
{
double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert;
double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert;
+1 -1
View File
@@ -129,7 +129,7 @@ namespace CalamityMod.NPCs.NormalNPCs
Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2);
int afterimageAmt = NPC.ai[0] == 2.1f ? 7 : 0;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
+3 -3
View File
@@ -259,7 +259,7 @@ namespace CalamityMod.NPCs.OldDuke
color = drawColor;
}
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += afterimageIncrement)
{
@@ -310,7 +310,7 @@ namespace CalamityMod.NPCs.OldDuke
afterimageScale = 20f;
}
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 0; j < secondAfterimageAmt; j++)
{
@@ -366,7 +366,7 @@ namespace CalamityMod.NPCs.OldDuke
yellowLerpColor *= ai2Opacity;
}
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int k = 1; k < afterimageAmt; k += afterimageIncrement)
{
+1 -1
View File
@@ -243,7 +243,7 @@ namespace CalamityMod.NPCs.OldDuke
Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2);
int afterimageAmt = 10;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
+2 -2
View File
@@ -77,7 +77,7 @@ namespace CalamityMod.NPCs.PlagueEnemies
Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
int afterimageAmt = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.PlagueEnemies
texture2D15 = GlowTexture.Value;
Color redEyeColor = Color.Lerp(Color.White, Color.Red, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+2 -2
View File
@@ -72,7 +72,7 @@ namespace CalamityMod.NPCs.PlagueEnemies
Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
int afterimageAmt = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -95,7 +95,7 @@ namespace CalamityMod.NPCs.PlagueEnemies
texture2D15 = ModContent.Request<Texture2D>("CalamityMod/NPCs/PlagueEnemies/PlagueChargerGlow").Value;
Color redEyeColor = Color.Lerp(Color.White, Color.Red, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+1 -1
View File
@@ -383,7 +383,7 @@ namespace CalamityMod.NPCs.PlagueEnemies
Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value;
Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
if (NPC.ai[0] == 0f && NPC.localAI[0] == 1f)
{
@@ -176,7 +176,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
spriteBatch.Draw(texture, drawLocation + drawOffset, NPC.frame, backAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f);
}
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -198,7 +198,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
texture = GlowTexture.Value;
Color redLerpColor = Color.Lerp(Color.White, Color.Red, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
@@ -1267,7 +1267,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
Vector2 posOffset = new Vector2(charging ? 175 : 125, 0);
int chargeAfterimageAmount = 10;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
if ((NPC.ai[0] == 0f || NPC.ai[0] == 4f) && charging)
{
@@ -1292,7 +1292,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
Color redLerpColor = Color.Lerp(Color.White, Color.Red, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
if ((NPC.ai[0] == 0f || NPC.ai[0] == 4f) && charging)
{
+1 -1
View File
@@ -149,7 +149,7 @@ namespace CalamityMod.NPCs.Polterghast
Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2);
int afterimageAmt = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
+2 -2
View File
@@ -455,7 +455,7 @@ namespace CalamityMod.NPCs.Polterghast
Color lightRed = new Color(255, 100, 100, 255) * NPC.Opacity;
int afterimageAmt = 7;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -490,7 +490,7 @@ namespace CalamityMod.NPCs.Polterghast
Color blackWhiteLerp = Color.Lerp(Color.White, c, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+3 -3
View File
@@ -307,7 +307,7 @@ namespace CalamityMod.NPCs.Polterghast
}
// Stop rain
if (CalamityConfig.Instance.BossesStopWeather)
if (CalamityServerConfig.Instance.BossesStopWeather)
CalamityMod.StopRain();
// Set time left
@@ -1169,7 +1169,7 @@ namespace CalamityMod.NPCs.Polterghast
Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2);
int afterimageAmt = 7;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -1213,7 +1213,7 @@ namespace CalamityMod.NPCs.Polterghast
Color veinColor = Color.Lerp(Color.White, (NPC.ai[2] >= changeColorGateValue || NPC.Calamity().newAI[0] > changeColorGateValue) ? Color.Red : Color.Black, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+2 -2
View File
@@ -375,7 +375,7 @@ namespace CalamityMod.NPCs.Polterghast
Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2);
int afterimageAmt = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -401,7 +401,7 @@ namespace CalamityMod.NPCs.Polterghast
if (Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] > changeColorGateValue)
cyanLerp2 = Color.Lerp(cyanLerp2, lightRed, MathHelper.Clamp((Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] - changeColorGateValue) / timeToReachFullColor, 0f, 1f));
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
@@ -1017,7 +1017,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
if (NPC.ai[0] == 2f)
afterimageAmt = 10;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -1055,7 +1055,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
if (colorOverride != null)
timeBasedColorLerp = colorOverride.Value;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
@@ -737,7 +737,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
if (NPC.ai[0] == 2f)
afterimageAmt = 10;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -775,7 +775,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
if (colorOverride != null)
timeBasedGlowColor = colorOverride.Value;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
@@ -442,7 +442,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2);
int afterimageAmt = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -484,7 +484,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
overrideColor = colorOverride.Value;
}
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+2 -2
View File
@@ -118,7 +118,7 @@ namespace CalamityMod.NPCs.Providence
Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
int afterimageAmt = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -141,7 +141,7 @@ namespace CalamityMod.NPCs.Providence
texture2D15 = ProfanedGuardianDefender.Texture_Glow.Value;
Color yellowLerp = Color.Lerp(Color.White, Color.Yellow, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+2 -2
View File
@@ -118,7 +118,7 @@ namespace CalamityMod.NPCs.Providence
Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
int afterimageAmt = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -142,7 +142,7 @@ namespace CalamityMod.NPCs.Providence
Color yellowLerp = Color.Lerp(Color.White, Color.Yellow, 0.5f);
Color violetLerp = Color.Lerp(Color.White, Color.Violet, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+2 -2
View File
@@ -120,7 +120,7 @@ namespace CalamityMod.NPCs.Providence
if (NPC.ai[0] == 2f)
afterimageAmt = 10;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -143,7 +143,7 @@ namespace CalamityMod.NPCs.Providence
texture2D15 = ProfanedGuardianCommander.Texture_Glow.Value;
Color yellowLerpColor = Color.Lerp(Color.White, Color.Yellow, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+3 -3
View File
@@ -632,7 +632,7 @@ namespace CalamityMod.NPCs.Providence
NPC.chaseable = normalAttackRate;
// Prevent lag by stopping rain
if (CalamityConfig.Instance.BossesStopWeather)
if (CalamityServerConfig.Instance.BossesStopWeather)
CalamityMod.StopRain();
// Set target biome type
@@ -2220,7 +2220,7 @@ namespace CalamityMod.NPCs.Providence
float Brightness = 0.5f; // Ranges from 0 (full vibrance) to 1 (pure white)
int maxAfterimages = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < maxAfterimages; i += 2)
{
@@ -2295,7 +2295,7 @@ namespace CalamityMod.NPCs.Providence
Color GlowWingColor = ProvUtils.GetProjectileColor(NPC.GetAlpha(drawColor), true);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < maxAfterimages; j++)
{
+2 -2
View File
@@ -131,7 +131,7 @@ namespace CalamityMod.NPCs.Signus
Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
int afterimageAmt = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -154,7 +154,7 @@ namespace CalamityMod.NPCs.Signus
texture2D15 = GlowTexture.Value;
Color cyanLerp = Color.Lerp(Color.White, Color.Cyan, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+1 -1
View File
@@ -177,7 +177,7 @@ namespace CalamityMod.NPCs.Signus
Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2);
int afterimageAmt = 5;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
+2 -2
View File
@@ -852,7 +852,7 @@ namespace CalamityMod.NPCs.Signus
transparency = (100 - (stealthTimer - 300)) * 0.01f;
}
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -878,7 +878,7 @@ namespace CalamityMod.NPCs.Signus
eyeGlowColor = Color.MediumBlue;
}
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+1 -1
View File
@@ -596,7 +596,7 @@ namespace CalamityMod.NPCs.SlimeGod
spriteBatch.Draw(pog, NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY), NPC.frame, drawColorAlpha, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, spriteEffects, 0);
}
if (!Main.zenithWorld)
while (((twoConst > 0 && coreID < 8) || (twoConst < 0 && coreID > 8)) && CalamityConfig.Instance.Afterimages)
while (((twoConst > 0 && coreID < 8) || (twoConst < 0 && coreID > 8)) && CalamityClientConfig.Instance.Afterimages)
{
Color colorLightingAlpha = NPC.GetAlpha(colorLightingArea);
{
+1 -1
View File
@@ -176,7 +176,7 @@ namespace CalamityMod.NPCs.StormWeaver
bool revenge = CalamityWorld.revenge || bossRush;
bool expertMode = Main.expertMode || bossRush;
if (CalamityConfig.Instance.BossesStopWeather)
if (CalamityServerConfig.Instance.BossesStopWeather)
CalamityMod.StopRain();
else if (!Main.raining && !bossRush)
CalamityUtils.StartRain();
+1 -1
View File
@@ -406,7 +406,7 @@ namespace CalamityMod.NPCs.SunkenSea
float colorLerpAmt = 0.5f;
int afterimageAmt = 7;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
+2 -2
View File
@@ -266,7 +266,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
int afterimageAmt = 2;
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int i = 1; i < afterimageAmt; i += 2)
{
@@ -289,7 +289,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
texture2D15 = GlowTexture.Value;
Color redLerp = Color.Lerp(Color.White, Color.Red, 0.5f);
if (CalamityConfig.Instance.Afterimages)
if (CalamityClientConfig.Instance.Afterimages)
{
for (int j = 1; j < afterimageAmt; j++)
{
+2 -2
View File
@@ -456,7 +456,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
CalamityNetcode.SyncWorld();
}
if (CalamityConfig.Instance.BossesStopWeather)
if (CalamityServerConfig.Instance.BossesStopWeather)
CalamityMod.StopRain();
bool bossRush = BossRushEvent.BossRushActive;
@@ -3632,7 +3632,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
ponyPos -= new Vector2(pony.Width / 2f, pony.Height / 15) * NPC.scale / 2f;
ponyPos += ponyOrigin * NPC.scale + new Vector2(-20, NPC.gfxOffY);
if (CalamityConfig.Instance.Afterimages && !(cirrus && NPC.ai[1] == 2f))
if (CalamityClientConfig.Instance.Afterimages && !(cirrus && NPC.ai[1] == 2f))
{
for (int i = 1; i < afterimageAmt; i += 2)
{
Loaded 100 of 218 files, more files were not shown because too many files have changed in this diff. Show more