Merge branch 'master' into ark-line-makeup-session

This commit is contained in:
IbanPlay committed 2022-02-05 17:27:07 +01:00
commit 58ae1bc7c1
110 files changed
+151 -1307

No files matched your search

-17
View File
@@ -180,29 +180,12 @@ namespace CalamityMod.Buffs
case BuffID.Warmth:
tip += ". Immunity to the Chilled, Frozen, and Glacial State debuffs";
if (CalamityWorld.death)
tip += ". Provides cold protection in Death Mode";
break;
case BuffID.Invisibility:
tip += ". Grants rogue bonuses while holding certain rogue weapons";
break;
case BuffID.ObsidianSkin:
if (CalamityWorld.death)
tip += ". Provides heat protection in Death Mode";
break;
case BuffID.Inferno:
if (CalamityWorld.death)
tip += ". Provides cold protection in Death Mode";
break;
case BuffID.Campfire:
if (CalamityWorld.death)
tip += ". Provides cold protection in Death Mode";
break;
case BuffID.Daybreak:
tip = "Incinerated by solar rays";
break;
-6
View File
@@ -20,11 +20,5 @@ namespace CalamityMod.Buffs.StatBuffs
{
player.Calamity().molten = true;
}
public override void ModifyBuffTip(ref string tip, ref int rare)
{
if (CalamityWorld.death)
tip += ". Provides cold protection in Death Mode";
}
}
}
-20
View File
@@ -95,8 +95,6 @@ namespace CalamityMod.CalPlayer
public int sCalKillCount = 0;
public int deathCount = 0;
public int actualMaxLife = 0;
public int deathModeUnderworldTime = 0;
public int deathModeBlizzardTime = 0;
public static int chaosStateDuration = 360;
public static int chaosStateDurationBoss = 600;
public bool killSpikyBalls = false;
@@ -1325,8 +1323,6 @@ namespace CalamityMod.CalPlayer
{ "rogueLevel", rogueLevel },
{ "exactRogueLevel", exactRogueLevel },
{ "deathCount", deathCount },
{ "deathModeUnderworldTime", deathModeUnderworldTime },
{ "deathModeBlizzardTime", deathModeBlizzardTime },
{ "itemTypeLastReforged", itemTypeLastReforged },
{ "reforgeTierSafety", reforgeTierSafety },
{ "moveSpeedStat", moveSpeedStat },
@@ -1419,9 +1415,6 @@ namespace CalamityMod.CalPlayer
_ = tag.GetInt("moneyStolenByBandit");
_ = tag.GetInt("reforges");
deathModeUnderworldTime = tag.GetInt("deathModeUnderworldTime");
deathModeBlizzardTime = tag.GetInt("deathModeBlizzardTime");
itemTypeLastReforged = tag.GetInt("itemTypeLastReforged");
reforgeTierSafety = tag.GetInt("reforgeTierSafety");
@@ -2211,8 +2204,6 @@ namespace CalamityMod.CalPlayer
defenseDamageRecoveryFrames = 0;
totalDefenseDamageRecoveryFrames = DefenseDamageBaseRecoveryTime;
defenseDamageDelayFrames = 0;
deathModeBlizzardTime = 0;
deathModeUnderworldTime = 0;
heldGaelsLastFrame = false;
gaelRageAttackCooldown = 0;
gaelSwipes = 0;
@@ -4152,12 +4143,6 @@ namespace CalamityMod.CalPlayer
{
runAccMult *= 0.6f;
}
if (CalamityWorld.death && deathModeBlizzardTime > 0)
{
float speedMult = (3600 - deathModeBlizzardTime) / 3600f;
runAccMult *= speedMult;
runSpeedMult *= speedMult;
}
player.runAcceleration *= runAccMult;
player.maxRunSpeed *= runSpeedMult;
@@ -7638,11 +7623,6 @@ namespace CalamityMod.CalPlayer
damageSource = PlayerDeathReason.ByCustomReason("Oxygen failed to reach " + player.name + " from the depths of the Abyss.");
}
}
else if (CalamityWorld.death && deathModeBlizzardTime > 1980)
{
deathModeBlizzardTime = 0;
damageSource = PlayerDeathReason.ByCustomReason(player.name + " was chilled to the bone by the frigid environment.");
}
else if (CalamityWorld.armageddon && areThereAnyDamnBosses)
{
damageSource = PlayerDeathReason.ByCustomReason(player.name + " failed the challenge at hand.");
-3
View File
@@ -1,6 +1,5 @@
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Dusts;
using CalamityMod.Events;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.World;
@@ -16,8 +15,6 @@ namespace CalamityMod.CalPlayer
#region Update Bad Life Regen
public override void UpdateBadLifeRegen()
{
Point point = player.Center.ToTileCoordinates();
if (player.ownedProjectileCounts[ModContent.ProjectileType<BloodBoilerFire>()] > 0)
noLifeRegen = true;
-244
View File
@@ -807,247 +807,6 @@ namespace CalamityMod.CalPlayer
default:
break;
}
// Leech bleed
if (player.ZoneJungle && player.wet && !player.lavaWet && !player.honeyWet)
{
if (player.IsUnderwater())
player.AddBuff(BuffID.Bleeding, 300, false);
}
if (!BossRushEvent.BossRushActive && !areThereAnyDamnBosses && !areThereAnyDamnEvents)
{
// Astral effects
if (ZoneAstral)
player.gravity *= 0.75f;
// Calculate underground darkness here. The effect is applied in CalamityMod.ModifyLightingBrightness.
Point point = player.Center.ToTileCoordinates();
if (point.Y > Main.worldSurface && !ZoneAbyss && !player.ZoneUnderworldHeight)
{
// Darkness strength scales smoothly with how deep you are.
double totalUndergroundDepth = Main.maxTilesY - 200D - Main.worldSurface;
double playerUndergroundDepth = point.Y - Main.worldSurface;
double depthRatio = playerUndergroundDepth / totalUndergroundDepth;
int lightStrength = GetTotalLightStrength();
// In the last 50 blocks before hell, the darkness smoothly fades away.
float FadeAwayStart = (float)(1D - 50D / totalUndergroundDepth);
float darknessStrength = (float)(depthRatio / FadeAwayStart);
if (depthRatio > FadeAwayStart)
{
// Varies from 1.0 to 0.0 as depthRatio varies from FadeAwayStart to 1.0.
darknessStrength = MathHelper.Lerp(0f, 1f, (1f - (float)depthRatio) / (1f - FadeAwayStart));
}
// Reduce the power of cave darkness based on your light level. 5+ is enough to totally eliminate it.
switch (lightStrength)
{
case 0:
darknessStrength *= 0.75f;
break;
case 1:
darknessStrength *= 0.5f;
break;
case 2:
darknessStrength *= 0.25f;
break;
case 3:
darknessStrength *= 0.15f;
break;
case 4:
darknessStrength *= 0.05f;
break;
default:
darknessStrength = 0f;
break;
}
caveDarkness = darknessStrength;
}
// Ice shards, lightning and sharknadoes
bool nearPillar = player.PillarZone();
if (player.ZoneOverworldHeight && NPC.MoonLordCountdown == 0 && !player.InSpace())
{
Vector2 sharknadoSpawnPoint = new Vector2(player.Center.X - Main.rand.Next(300, 701), player.Center.Y - Main.rand.Next(700, 801));
if (point.X > Main.maxTilesX / 2)
sharknadoSpawnPoint.X = player.Center.X + Main.rand.Next(300, 701);
if (Main.raining)
{
float frequencyMult = (1f - Main.cloudAlpha) * CalamityConfig.Instance.DeathWeatherMultiplier; // 3 to 0.055
Vector2 spawnPoint = new Vector2(player.Center.X + Main.rand.Next(-1000, 1001), player.Center.Y - Main.rand.Next(700, 801));
Tile tileSafely = Framing.GetTileSafely((int)(spawnPoint.X / 16f), (int)(spawnPoint.Y / 16f));
if (player.ZoneSnow)
{
if (!tileSafely.active())
{
int divisor = (int)((Main.hardMode ? 50f : 60f) * frequencyMult);
float windVelocity = (float)Math.Sqrt(Math.Abs(Main.windSpeed)) * Math.Sign(Main.windSpeed) * (Main.cloudAlpha + 0.5f) * 25f + Main.rand.NextFloat() * 0.2f - 0.1f;
Vector2 velocity = new Vector2(windVelocity * 0.2f, 3f * Main.rand.NextFloat());
if (player.miscCounter % divisor == 0 && Main.rand.NextBool(3))
Projectile.NewProjectile(spawnPoint, velocity, ModContent.ProjectileType<IceRain>(), 20, 0f, player.whoAmI, 2f, 0f);
}
}
else
{
if (player.ZoneBeach && !ZoneSulphur)
{
int randomFrequency = (int)(50f * frequencyMult);
if (player.miscCounter == 280 && Main.rand.NextBool(randomFrequency) && player.ownedProjectileCounts[ProjectileID.Cthulunado] < 1)
{
Main.PlaySound(SoundID.NPCDeath19, (int)sharknadoSpawnPoint.X, (int)sharknadoSpawnPoint.Y);
int y = (int)(sharknadoSpawnPoint.Y / 16f);
int x = (int)(sharknadoSpawnPoint.X / 16f);
int yAdjust = 100;
if (x < 10)
x = 10;
if (x > Main.maxTilesX - 10)
x = Main.maxTilesX - 10;
if (y < 10)
y = 10;
if (y > Main.maxTilesY - yAdjust - 10)
y = Main.maxTilesY - yAdjust - 10;
int spawnAreaY = Main.maxTilesY - y;
for (int j = y; j < y + spawnAreaY; j++)
{
Tile tile = Main.tile[x, j];
if ((tile.active() && Main.tileSolid[tile.type]) || tile.liquid >= 200)
{
y = j;
break;
}
}
int tornado = Projectile.NewProjectile(x * 16 + 8, y * 16 - 24, 0f, 0f, ProjectileID.Cthulunado, 50, 4f, player.whoAmI, 16f, 24f);
Main.projectile[tornado].netUpdate = true;
}
}
// Death Mode random lightning strikes
int randomFrequency2 = (int)(20f * frequencyMult);
if (CalamityWorld.rainingAcid && ZoneSulphur)
randomFrequency2 = (int)(randomFrequency2 * 3.75);
if (player.miscCounter % (Main.hardMode ? 90 : 120) == 0 && Main.rand.NextBool(randomFrequency2))
{
if (!tileSafely.active())
{
float randomVelocity = Main.rand.NextFloat() - 0.5f;
Vector2 fireTo = new Vector2(spawnPoint.X + 100f * randomVelocity, spawnPoint.Y + 900f);
Vector2 direction = fireTo - spawnPoint;
Vector2 velocity = Vector2.Normalize(direction) * 12f;
Projectile.NewProjectile(spawnPoint.X, spawnPoint.Y, 0f, velocity.Y, ModContent.ProjectileType<LightningMark>(), 0, 0f, player.whoAmI, 0f, 0f);
}
}
}
}
}
// Immunity bools
bool hasMoltenSet = player.head == ArmorIDs.Head.MoltenHelmet && player.body == ArmorIDs.Body.MoltenBreastplate && player.legs == ArmorIDs.Legs.MoltenGreaves;
bool immunityToHotAndCold = hasMoltenSet || player.magmaStone || player.frostArmor || fBulwark || fBarrier ||
frostFlare || rampartOfDeities || cryogenSoul || snowman || blazingCore || permafrostsConcoction || profanedCrystalBuffs || coldDivinity || eGauntlet;
bool immunityToCold = player.HasBuff(BuffID.Campfire) || Main.campfire || player.resistCold || eskimoSet || dodgeScarf || player.buffImmune[BuffID.Frozen] || aAmpoule || player.HasBuff(BuffID.Inferno) || immunityToHotAndCold || externalColdImmunity;
bool immunityToHot = player.lavaImmune || player.lavaRose || player.lavaMax > 0 || immunityToHotAndCold || externalHeatImmunity;
// Space effects
if (!player.behindBackWall && player.InSpace())
{
if (Main.dayTime)
{
if (!immunityToHot)
player.AddBuff(BuffID.Burning, 2, false);
}
else
{
if (!immunityToCold)
player.AddBuff(BuffID.Frostburn, 2, false);
}
}
// Cold timer
if (!player.behindBackWall && Main.raining && player.ZoneSnow && !immunityToCold && player.ZoneOverworldHeight)
{
bool affectedByColdWater = player.wet && !player.lavaWet && !player.honeyWet && !player.arcticDivingGear;
player.AddBuff(ModContent.BuffType<DeathModeCold>(), 2, false);
deathModeBlizzardTime++;
if (affectedByColdWater)
deathModeBlizzardTime++;
if (deathModeUnderworldTime > 0)
{
deathModeUnderworldTime--;
if (affectedByColdWater)
deathModeUnderworldTime--;
if (deathModeUnderworldTime < 0)
deathModeUnderworldTime = 0;
}
}
else if (deathModeBlizzardTime > 0)
{
deathModeBlizzardTime--;
if (immunityToCold)
deathModeBlizzardTime--;
if (deathModeBlizzardTime < 0)
deathModeBlizzardTime = 0;
}
// Hot timer
if (!player.behindBackWall && player.ZoneUnderworldHeight && !immunityToHot)
{
bool affectedByHotLava = player.lavaWet;
player.AddBuff(ModContent.BuffType<DeathModeHot>(), 2, false);
deathModeUnderworldTime++;
if (affectedByHotLava)
deathModeUnderworldTime++;
if (deathModeBlizzardTime > 0)
{
deathModeBlizzardTime--;
if (affectedByHotLava)
deathModeBlizzardTime--;
if (deathModeBlizzardTime < 0)
deathModeBlizzardTime = 0;
}
}
else if (deathModeUnderworldTime > 0)
{
deathModeUnderworldTime--;
if (immunityToHot)
deathModeUnderworldTime--;
if (deathModeUnderworldTime < 0)
deathModeUnderworldTime = 0;
}
// Cold effects
if (deathModeBlizzardTime > 1800)
player.AddBuff(BuffID.Frozen, 2, false);
if (deathModeBlizzardTime > 1980)
KillPlayer();
// Hot effects
if (deathModeUnderworldTime > 360)
player.AddBuff(BuffID.Weak, 2, false);
if (deathModeUnderworldTime > 720)
player.AddBuff(BuffID.Slow, 2, false);
if (deathModeUnderworldTime > 1080)
player.AddBuff(BuffID.OnFire, 2, false);
if (deathModeUnderworldTime > 1440)
player.AddBuff(BuffID.Confused, 2, false);
if (deathModeUnderworldTime > 1800)
player.AddBuff(BuffID.Burning, 2, false);
}
}
}
@@ -1072,9 +831,6 @@ namespace CalamityMod.CalPlayer
player.maxFallSpeed = 80f;
player.noFallDmg = true;
}
}
// Omega Blue Armor bonus
-34
View File
@@ -14,8 +14,6 @@ namespace CalamityMod.CalPlayer
{
SyncRage(false);
SyncAdrenaline(false);
SyncDeathModeUnderworldTime(false);
SyncDeathModeBlizzardTime(false);
SyncMoveSpeed(false);
SyncDefenseDamage(false);
SyncDodgeCooldown(false);
@@ -169,24 +167,6 @@ namespace CalamityMod.CalPlayer
player.SendPacket(packet, server);
}
public void SyncDeathModeUnderworldTime(bool server)
{
ModPacket packet = mod.GetPacket(256);
packet.Write((byte)CalamityModMessageType.DeathModeUnderworldTimeSync);
packet.Write(player.whoAmI);
packet.Write(deathModeUnderworldTime);
player.SendPacket(packet, server);
}
public void SyncDeathModeBlizzardTime(bool server)
{
ModPacket packet = mod.GetPacket(256);
packet.Write((byte)CalamityModMessageType.DeathModeBlizzardTimeSync);
packet.Write(player.whoAmI);
packet.Write(deathModeBlizzardTime);
player.SendPacket(packet, server);
}
public void SyncItemTypeLastReforged(bool server)
{
ModPacket packet = mod.GetPacket(256);
@@ -296,20 +276,6 @@ namespace CalamityMod.CalPlayer
SyncDeathCount(true);
}
internal void HandleDeathModeUnderworldTime(BinaryReader reader)
{
deathModeUnderworldTime = reader.ReadInt32();
if (Main.netMode == NetmodeID.Server)
SyncDeathModeUnderworldTime(true);
}
internal void HandleDeathModeBlizzardTime(BinaryReader reader)
{
deathModeBlizzardTime = reader.ReadInt32();
if (Main.netMode == NetmodeID.Server)
SyncDeathModeBlizzardTime(true);
}
internal void HandleItemTypeLastReforged(BinaryReader reader)
{
itemTypeLastReforged = reader.ReadInt32();
-3
View File
@@ -1531,7 +1531,6 @@ namespace CalamityMod
#endregion
#region Lighting
const float MaxCaveDarkness = -0.3f;
const float MaxSignusDarkness = -0.4f;
const float MaxAbyssDarkness = -0.7f;
public override void ModifyLightingBrightness(ref float scale)
@@ -1542,8 +1541,6 @@ namespace CalamityMod
if (modPlayer.ZoneAbyss)
scale += MaxAbyssDarkness * darkRatio;
else if (CalamityWorld.death)
scale += MaxCaveDarkness * darkRatio;
if (CalamityWorld.revenge || CalamityWorld.malice)
{
-7
View File
@@ -257,13 +257,6 @@ namespace CalamityMod
//
// Death Mode environmental syncs
//
case CalamityModMessageType.DeathModeUnderworldTimeSync:
Main.player[reader.ReadInt32()].Calamity().HandleDeathModeUnderworldTime(reader);
break;
case CalamityModMessageType.DeathModeBlizzardTimeSync:
Main.player[reader.ReadInt32()].Calamity().HandleDeathModeBlizzardTime(reader);
break;
case CalamityModMessageType.DeathBossSpawnCountdownSync:
int countdown4 = reader.ReadInt32();
CalamityWorld.deathBossSpawnCooldown = countdown4;
-15
View File
@@ -29,21 +29,6 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip2")
{
line2.text = "Freeze, chill and frostburn immunity\n" +
"Provides cold protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
-15
View File
@@ -32,21 +32,6 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip5")
{
line2.text = "Temporary immunity to lava\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
-15
View File
@@ -31,21 +31,6 @@ namespace CalamityMod.Items.Accessories
item.value = CalamityGlobalItem.Rarity12BuyPrice;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip5")
{
line2.text = "Provides a moderate amount of light in the Abyss\n" +
"Provides heat and cold protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
-15
View File
@@ -29,21 +29,6 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip4")
{
line2.text = "While on cooldown, Chaos State will last twice as long\n" +
"Provides cold protection in Death Mode";
}
}
}
}
public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().dodgeScarf;
public override void UpdateAccessory(Player player, bool hideVisual)
-14
View File
@@ -31,20 +31,6 @@ namespace CalamityMod.Items.Accessories
item.Calamity().customRarity = CalamityRarity.DarkBlue;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip4")
{
line2.text += "\nProvides heat and cold protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
-15
View File
@@ -30,21 +30,6 @@ namespace CalamityMod.Items.Accessories
item.Calamity().donorItem = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip4")
{
line2.text = "While on cooldown, Chaos State will be 50 percent longer\n" +
"Provides cold protection in Death Mode";
}
}
}
}
public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().dodgeScarf;
public override void UpdateAccessory(Player player, bool hideVisual)
-15
View File
@@ -28,21 +28,6 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip3")
{
line2.text = "Temporary immunity to lava\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
-15
View File
@@ -30,21 +30,6 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip4")
{
line2.text = "The shell becomes more powerful when below 15% life and reduces damage even further\n" +
"Provides heat and cold protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
-15
View File
@@ -26,21 +26,6 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "You are immune to the chilled debuff\n" +
"Provides heat and cold protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
-15
View File
@@ -30,21 +30,6 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip4")
{
line2.text = "Provides heat and cold protection in Death Mode\n" +
"Grants resistance against cold attacks";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

@@ -27,21 +27,6 @@ You are encased in an ice barrier for 3 seconds when revived");
item.rare = ItemRarityID.Pink;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip4")
{
line2.text = "You are encased in an ice barrier for 3 seconds when revived\n" +
"Provides heat and cold protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.Calamity().permafrostsConcoction = true;
-14
View File
@@ -40,7 +40,6 @@ namespace CalamityMod.Items.Accessories
"Summons and empowers the profaned babs to fight alongside you\n" +
"You are no longer affected by burn out when hit\n" +
"Provides buffs depending on the time of day\n" +
"Provides heat and cold protection in Death Mode\n" +
"Thinking back, it was a boring life\n" +
"[c/FFBF49:And so we burn it all in the name of purity]");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(8, 4));
@@ -101,19 +100,6 @@ namespace CalamityMod.Items.Accessories
}
}
}
if (scal && draedon)
{
if (!CalamityWorld.death)
{
foreach (TooltipLine line in tooltips)
{
if (line.mod == "Terraria" && line.Name == "Tooltip11")
{
line.text = "";
}
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
+1 -16
View File
@@ -20,8 +20,7 @@ namespace CalamityMod.Items.Accessories
"This effect is only active above 25% life\n" +
"Grants immunity to knockback\n" +
"Puts a shell around the owner when below 50% life that reduces damage\n" +
"The shell becomes more powerful when below 15% life and reduces damage even further\n" +
"Provides heat and cold protection in Death Mode");
"The shell becomes more powerful when below 15% life and reduces damage even further");
}
public override void SetDefaults()
@@ -34,20 +33,6 @@ namespace CalamityMod.Items.Accessories
item.Calamity().customRarity = CalamityRarity.DarkBlue;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (!CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip7")
{
line2.text = "";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
-14
View File
@@ -40,20 +40,6 @@ namespace CalamityMod.Items.Accessories
item.Calamity().customRarity = CalamityRarity.DarkBlue;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip8")
{
line2.text += "\nProvides cold protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
+1 -1
View File
@@ -134,7 +134,7 @@ namespace CalamityMod.Items.Accessories
sb.Append(" | Wing Flight Time: ").Append(wingFlightTime).Append(" seconds\n");
sb.Append("Jump Speed Boost: ").Append(jumpSpeed).Append("%");
sb.Append(" | Movement Speed Boost: ").Append(moveSpeed).Append("%\n\n");
sb.Append(CalamityWorld.death ? "Abyss/Cave Light Strength: " : "Abyss Light Strength: ").Append(lightLevel).Append("\n\n");
sb.Append("Abyss Light Strength: ").Append(lightLevel).Append("\n\n");
// Abyss stats only render if the player is in the Abyss.
if (modPlayer.ZoneAbyss)
-15
View File
@@ -37,21 +37,6 @@ namespace CalamityMod.Items.Accessories
item.defense = 10;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip5")
{
line2.text = "Provides a small amount of light in the Abyss\n" +
"Provides cold protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
-15
View File
@@ -26,21 +26,6 @@ namespace CalamityMod.Items.Accessories.Vanity
item.Calamity().devItem = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "Transforms the holder into a snowman\n" +
"Provides heat and cold protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
-15
View File
@@ -35,21 +35,6 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip4")
{
line2.text = "Temporary immunity to lava, greatly reduces lava burn damage, and 25% increased damage while in lava\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().calamityRing;
public override void AddRecipes()
@@ -40,21 +40,6 @@ namespace CalamityMod.Items.Accessories.Wings
item.Calamity().customRarity = CalamityRarity.Violet;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip10")
{
line2.text = "Being hit for over 200 damage will make you immune for an extended period of time\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (player.controlJump && player.wingTime > 0f && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
-15
View File
@@ -39,21 +39,6 @@ namespace CalamityMod.Items.Accessories.Wings
item.Calamity().customRarity = CalamityRarity.DarkBlue;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip9")
{
line2.text = "Temporary immunity to lava\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (player.controlJump && player.wingTime > 0f && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
-15
View File
@@ -31,21 +31,6 @@ namespace CalamityMod.Items.Accessories.Wings
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip5")
{
line2.text = "Temporary immunity to lava and 15% increased movement speed\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
-15
View File
@@ -38,21 +38,6 @@ namespace CalamityMod.Items.Accessories.Wings
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip9")
{
line2.text = "Temporary immunity to lava\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (player.controlJump && player.wingTime > 0f && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
-15
View File
@@ -36,21 +36,6 @@ namespace CalamityMod.Items.Accessories.Wings
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip8")
{
line2.text = "Icicles rain down as you fly\n" +
"Provides heat and cold protection in Death Mode";
}
}
}
}
public override void Update(ref float gravity, ref float maxFallSpeed)
{
float num = (float)Main.rand.Next(90, 111) * 0.01f;
-15
View File
@@ -31,21 +31,6 @@ namespace CalamityMod.Items.Accessories
item.Calamity().customRarity = CalamityRarity.Turquoise;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip6")
{
line2.text = "Increased melee knockback\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
-15
View File
@@ -27,21 +27,6 @@ namespace CalamityMod.Items.Armor
item.defense = 15; //53
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "Reduces ammo usage by 25%, temporary immunity to lava, and immunity to fire damage\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<AtaxiaArmor>() && legs.type == ModContent.ItemType<AtaxiaSubligar>();
-15
View File
@@ -29,21 +29,6 @@ namespace CalamityMod.Items.Armor
item.defense = 33; //67
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip3")
{
line2.text = "Temporary immunity to lava and immunity to fire damage\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<AtaxiaArmor>() && legs.type == ModContent.ItemType<AtaxiaSubligar>();
-15
View File
@@ -29,21 +29,6 @@ namespace CalamityMod.Items.Armor
item.defense = 6; //40
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip2")
{
line2.text = "Temporary immunity to lava and immunity to fire damage\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<AtaxiaArmor>() && legs.type == ModContent.ItemType<AtaxiaSubligar>();
-15
View File
@@ -28,21 +28,6 @@ namespace CalamityMod.Items.Armor
item.defense = 12; //49
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip2")
{
line2.text = "Temporary immunity to lava and immunity to fire damage\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<AtaxiaArmor>() && legs.type == ModContent.ItemType<AtaxiaSubligar>();
-15
View File
@@ -27,21 +27,6 @@ namespace CalamityMod.Items.Armor
item.defense = 9; //45
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "Temporary immunity to lava and immunity to fire damage\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<AtaxiaArmor>() && legs.type == ModContent.ItemType<AtaxiaSubligar>();
-15
View File
@@ -30,21 +30,6 @@ namespace CalamityMod.Items.Armor
item.Calamity().customRarity = CalamityRarity.Violet;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip2")
{
line2.text = "You will freeze enemies near you when you are struck\n" +
"Provides heat and cold protection in Death Mode";
}
}
}
}
public override void UpdateEquip(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
-15
View File
@@ -27,21 +27,6 @@ namespace CalamityMod.Items.Armor
item.Calamity().customRarity = CalamityRarity.PureGreen;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "10% increased rogue damage and critical strike chance, 15% increased movement speed\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
-15
View File
@@ -27,21 +27,6 @@ namespace CalamityMod.Items.Armor
item.Calamity().customRarity = CalamityRarity.PureGreen;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "5% increased minion damage\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
-15
View File
@@ -27,21 +27,6 @@ namespace CalamityMod.Items.Armor
item.Calamity().customRarity = CalamityRarity.PureGreen;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "10% increased ranged damage and critical strike chance\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
-15
View File
@@ -27,21 +27,6 @@ namespace CalamityMod.Items.Armor
item.Calamity().customRarity = CalamityRarity.PureGreen;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "10% increased magic damage and critical strike chance, +100 max mana, and 17% reduced mana usage\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
-15
View File
@@ -27,21 +27,6 @@ namespace CalamityMod.Items.Armor
item.Calamity().customRarity = CalamityRarity.PureGreen;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "10% increased melee damage and critical strike chance\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
+6 -19
View File
@@ -48,25 +48,12 @@ namespace CalamityMod.Items.Armor
public override void UpdateArmorSet(Player player)
{
if (CalamityWorld.death)
{
player.setBonus = @"20% increased minion damage and +2 max minions
The minion damage nerf while wielding weaponry is reduced
Immunity to all forms of frost and flame
All minion attacks grant colossal life regeneration
15% increased damage reduction during the Pumpkin and Frost Moons
This extra damage reduction ignores the soft cap
Provides cold protection in Death Mode";
}
else
{
player.setBonus = @"20% increased minion damage and +2 max minions
The minion damage nerf while wielding weaponry is reduced
Immunity to all forms of frost and flame
All minion attacks grant colossal life regeneration
15% increased damage reduction during the Pumpkin and Frost Moons
This extra damage reduction ignores the soft cap";
}
player.setBonus = @"20% increased minion damage and +2 max minions
The minion damage nerf while wielding weaponry is reduced
Immunity to all forms of frost and flame
All minion attacks grant colossal life regeneration
15% increased damage reduction during the Pumpkin and Frost Moons
This extra damage reduction ignores the soft cap";
// This bool encompasses cross-class nerf immunity, colossal life regen on minion attack, and the holiday moon DR
player.Calamity().fearmongerSet = true;
+1 -16
View File
@@ -20,8 +20,7 @@ namespace CalamityMod.Items.Armor
{
DisplayName.SetDefault("Reaver Headgear");
Tooltip.SetDefault("10% increased pick speed and 20% increased block/wall placement speed\n" +
"Temporary immunity to lava and can move freely through liquids\n" +
"Provides heat protection in Death Mode");
"Temporary immunity to lava and can move freely through liquids");
}
public override void SetDefaults()
@@ -33,20 +32,6 @@ namespace CalamityMod.Items.Armor
item.defense = 7; //40
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (!CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip2")
{
line2.text = "";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<ReaverScaleMail>() && legs.type == ModContent.ItemType<ReaverCuisses>();
-15
View File
@@ -30,21 +30,6 @@ namespace CalamityMod.Items.Armor
item.Calamity().customRarity = CalamityRarity.Turquoise;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip4")
{
line2.text = "10% increased melee damage and critical strike chance\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<TarragonBreastplate>() && legs.type == ModContent.ItemType<TarragonLeggings>();
-15
View File
@@ -29,21 +29,6 @@ namespace CalamityMod.Items.Armor
item.Calamity().customRarity = CalamityRarity.Turquoise;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip3")
{
line2.text = "5% increased damage reduction\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<TarragonBreastplate>() && legs.type == ModContent.ItemType<TarragonLeggings>();
-15
View File
@@ -28,21 +28,6 @@ namespace CalamityMod.Items.Armor
item.Calamity().customRarity = CalamityRarity.Turquoise;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip2")
{
line2.text = "5% increased damage reduction\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<TarragonBreastplate>() && legs.type == ModContent.ItemType<TarragonLeggings>();
-15
View File
@@ -29,21 +29,6 @@ namespace CalamityMod.Items.Armor
item.Calamity().customRarity = CalamityRarity.Turquoise;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip3")
{
line2.text = "5% increased damage reduction, +100 max mana, and 15% reduced mana usage\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<TarragonBreastplate>() && legs.type == ModContent.ItemType<TarragonLeggings>();
-15
View File
@@ -29,21 +29,6 @@ namespace CalamityMod.Items.Armor
item.Calamity().customRarity = CalamityRarity.Turquoise;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip3")
{
line2.text = "5% increased damage reduction\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<TarragonBreastplate>() && legs.type == ModContent.ItemType<TarragonLeggings>();
Binary file not shown.

Before

Width:  |  Height:  |  Size: 865 B

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

-15
View File
@@ -28,21 +28,6 @@ namespace CalamityMod.Items.Armor
item.defense = 20; //71
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip2")
{
line2.text = "Temporary immunity to lava\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<XerocPlateMail>() && legs.type == ModContent.ItemType<XerocCuisses>();
+1
View File
@@ -150,6 +150,7 @@ namespace CalamityMod.Items
case ItemID.MechanicalBatteryPiece:
case ItemID.MechanicalWagonPiece:
case ItemID.MechanicalWheelPiece:
case ItemID.MinecartMech:
case ItemID.SporeSac:
case ItemID.ShinyStone:
case ItemID.ShrimpyTruffle:
-29
View File
@@ -212,9 +212,6 @@ namespace CalamityMod.Items
#region Vanilla Item Tooltip Modification
public const string HeatProtectionLine = "\nProvides heat protection in Death Mode";
public const string BothProtectionLine = "\nProvides heat and cold protection in Death Mode";
// Turns a number into a string of increased mining speed.
public static string MiningSpeedString(int percent) => $"\n{percent}% increased mining speed";
@@ -285,8 +282,6 @@ namespace CalamityMod.Items
if (item.type == ItemID.WarmthPotion)
{
string immunityLine = "\nMakes you immune to the Chilled, Frozen, and Glacial State debuffs";
if (CalamityWorld.death)
immunityLine += "\nProvides cold protection in Death Mode";
EditTooltipByNum(0, (line) => line.text += immunityLine);
}
@@ -306,8 +301,6 @@ namespace CalamityMod.Items
if (item.type == ItemID.HandWarmer)
{
string extraLine = "\nProvides a regeneration boost while wearing the Eskimo armor";
if (CalamityWorld.death)
extraLine += "\nProvides cold protection in Death Mode";
EditTooltipByNum(0, (line) => line.text += extraLine);
}
@@ -615,8 +608,6 @@ namespace CalamityMod.Items
if (item.type == ItemID.FireGauntlet)
{
string extraLine = "\n10% increased true melee damage";
if (CalamityWorld.death)
extraLine += "\nProvides heat and cold protection in Death Mode";
EditTooltipByNum(1, (line) => line.text = line.text.Replace("10%", "14%") + extraLine);
}
@@ -659,14 +650,8 @@ namespace CalamityMod.Items
+ "Provides temporary immunity to lava burn damage\n"
+ "Greatly increases the speed at which lava immunity recharges\n"
+ "Reduces lava burn damage";
if (CalamityWorld.death)
lethalLavaReplacement += HeatProtectionLine;
EditTooltipByNum(0, (line) => line.text = lethalLavaReplacement);
}
// Otherwise, changes are only made on Death Mode, where heat immunity is mentioned.
else if (CalamityWorld.death)
EditTooltipByNum(0, (line) => line.text += HeatProtectionLine);
}
if (item.type == ItemID.ObsidianRose)
@@ -675,22 +660,8 @@ namespace CalamityMod.Items
// If Lethal Lava is enabled, Obsidian Rose reduces the damage from the debuff.
if (CalamityConfig.Instance.LethalLava)
sb.Append("\nGreatly reduces lava burn damage");
if (CalamityWorld.death)
sb.Append(HeatProtectionLine);
EditTooltipByNum(0, (line) => line.text += sb.ToString());
}
if (CalamityWorld.death)
{
if (item.type == ItemID.MagmaStone)
EditTooltipByNum(0, (line) => line.text += BothProtectionLine);
if (item.type == ItemID.LavaCharm)
EditTooltipByNum(0, (line) => line.text += HeatProtectionLine);
if (item.type == ItemID.LavaWaders)
EditTooltipByNum(1, (line) => line.text += HeatProtectionLine);
if (item.type == ItemID.FrostHelmet || item.type == ItemID.FrostBreastplate || item.type == ItemID.FrostLeggings)
EditTooltipByName("SetBonus", (line) => line.text += BothProtectionLine);
}
#endregion
// Add mentions of what Calamity ores vanilla pickaxes can mine
-1
View File
@@ -20,7 +20,6 @@ namespace CalamityMod.Items.DifficultyItems
// Biome effect lines
"Allows certain bosses to spawn naturally depending on what biome you're in.\n" +
"Certain biomes and events have additional weather effects.\n" +
"Lethal Lava effects are always enabled.\n" +
"Greatly boosts enemy spawn rates during the Blood Moon.\n" +
"Makes the Abyss more treacherous to navigate.\n" +
+2 -1
View File
@@ -8,7 +8,8 @@ namespace CalamityMod.Items.Placeables.Banners
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("{$CommonItemTooltip.BannerBonus}Pitbull");
DisplayName.SetDefault("Rotdog Banner");
Tooltip.SetDefault("{$CommonItemTooltip.BannerBonus}Rotdog");
}
public override void SetDefaults()
@@ -8,7 +8,7 @@ namespace CalamityMod.Items.Placeables.Banners
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("{$CommonItemTooltip.BannerBonus}Wulfrum Slime");
Tooltip.SetDefault("A purely decorative banner themed after an extinct slime species");
}
public override void SetDefaults()
+2 -12
View File
@@ -12,9 +12,7 @@ namespace CalamityMod.Items.Tools.ClimateChange
DisplayName.SetDefault("Torrential Tear");
Tooltip.SetDefault("Summons the rain.\n" +
"Rain will start some time after this item is used.\n" +
"If used while it's raining, the rain will stop some time afterward.\n" +
"In Death Mode, using this item while it's raining will reduce the amount of time the rain lingers for to one minute.\n" +
"However, this will cause the rain to turn violent for that time.");
"If used while it's raining, the rain will stop some time afterward.");
}
public override void SetDefaults()
@@ -31,7 +29,7 @@ namespace CalamityMod.Items.Tools.ClimateChange
public override bool CanUseItem(Player player)
{
return !Main.slimeRain && (Main.rainTime > 3600 || !CalamityWorld.death || !Main.raining || CalamityWorld.rainingAcid);
return !Main.slimeRain;
}
public override bool UseItem(Player player)
@@ -40,14 +38,6 @@ namespace CalamityMod.Items.Tools.ClimateChange
{
CalamityUtils.StartRain(true);
}
else if (CalamityWorld.death)
{
if (Main.rainTime > 3600)
{
Main.rainTime = 3600;
AdjustRainSeverity(true);
}
}
else
{
Main.raining = false;
@@ -27,10 +27,9 @@ namespace CalamityMod.Items.VanillaArmorChanges
public override void UpdateSetBonusText(ref string setBonusText)
{
string coldImmunity = CalamityWorld.death ? "\nProvides cold protection in Death Mode" : string.Empty;
setBonusText = "All ice-themed damage over time debuffs receive a 50% damage bonus\n" +
"Cold enemies will deal reduced contact damage to the player\n" +
"Provides immunity to the Frostburn and Glacial State debuffs" + coldImmunity;
"Provides immunity to the Frostburn and Glacial State debuffs";
}
public override void ApplyArmorSetBonus(Player player)
@@ -19,8 +19,6 @@ namespace CalamityMod.Items.VanillaArmorChanges
public override void UpdateSetBonusText(ref string setBonusText)
{
string extraLine = "\n20% extra true melee damage\nGrants immunity to fire blocks and temporary immunity to lava";
if (CalamityWorld.death)
extraLine += CalamityGlobalItem.BothProtectionLine;
setBonusText += extraLine;
}
@@ -22,14 +22,13 @@ namespace CalamityMod.Items.VanillaArmorChanges
public override void UpdateSetBonusText(ref string setBonusText)
{
string heatImmunity = CalamityWorld.death ? "\nProvides heat protection in Death Mode" : string.Empty;
setBonusText = "+2 defense\n" +
"5% increased rogue damage and critical strike chance\n" +
"Grants immunity to fire blocks and temporary immunity to lava\n" +
"Rogue stealth builds while not attacking and not moving, up to a max of 80\n" +
"Once you have built max stealth, you will be able to perform a Stealth Strike\n" +
"Rogue stealth only reduces when you attack, it does not reduce while moving\n" +
"The higher your rogue stealth the higher your rogue damage, crit, and movement speed" + heatImmunity;
"The higher your rogue stealth the higher your rogue damage, crit, and movement speed";
}
public override void ApplyHeadPieceEffect(Player player)
File renamed without changes.

Before

Width:  |  Height:  |  Size: 603 B

After

Width:  |  Height:  |  Size: 603 B

+1
View File
@@ -218,6 +218,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
player.Calamity().rightClickListener = true;
player.Calamity().mouseWorldListener = true;
if (player.velocity.Y == 0) //Reset the lunge ability on ground contact
CanLunge = 1;
@@ -264,6 +264,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void HoldItem(Player player)
{
player.Calamity().rightClickListener = true;
player.Calamity().mouseWorldListener = true;
if (CanUseItem(player))
{
+1
View File
@@ -286,6 +286,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void HoldItem(Player player)
{
player.Calamity().rightClickListener = true;
player.Calamity().mouseWorldListener = true;
//Reset the strong lunge thing just in case it didnt get caught beofre.
+4 -1
View File
@@ -27,7 +27,9 @@ namespace CalamityMod.Items.Weapons.Melee
#region stats
public static int DefaultAttunement_BaseDamage = 160;
public static int DefaultAttunement_SigilTime = 600;
public static int DefaultAttunement_SigilTime = 1200;
public static int DefaultAttunement_BeamTime = 60;
public static float DefaultAttunement_HomingAngle = MathHelper.PiOver4;
public static int EvilAttunement_BaseDamage = 320;
public static int EvilAttunement_Lifesteal = 4;
@@ -244,6 +246,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void HoldItem(Player player)
{
player.Calamity().rightClickListener = true;
player.Calamity().mouseWorldListener = true;
if (player.velocity.Y == 0) //reset the amount of lunges on ground contact
{
-15
View File
@@ -41,21 +41,6 @@ namespace CalamityMod.Items.Weapons.Summon
item.rare = ItemRarityID.Pink;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip4")
{
line2.text = "Provides heat and cold protection in Death Mode when in use\n" +
"On right click, summons a duplicate ring around the targeted enemy, which slowly converges before exploding";
}
}
}
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
float totalMinionSlots = 0f;
+8 -7
View File
@@ -5,6 +5,7 @@ using CalamityMod.Items.Accessories;
using CalamityMod.Items.Accessories.Wings;
using CalamityMod.Items.Armor.Vanity;
using CalamityMod.Items.DifficultyItems;
using CalamityMod.Items.Dyes;
using CalamityMod.Items.LoreItems;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Mounts;
@@ -315,7 +316,7 @@ namespace CalamityMod
BossDifficulty.TryGetValue("SlimeGod", out float order);
List<int> bosses = new List<int>() { NPCType<SlimeGodCore>(), NPCType<SlimeGod>(), NPCType<SlimeGodRun>() };
int summon = ItemType<OverloadedSludge>();
List<int> loot = new List<int>() { ItemType<SlimeGodBag>(), ItemID.Gel, ItemType<PurifiedGel>(), ItemType<OverloadedBlaster>(), ItemType<AbyssalTome>(), ItemType<EldritchTome>(), ItemType<CorroslimeStaff>(), ItemType<CrimslimeStaff>(), ItemType<GelDart>(), ItemType<ManaOverloader>(), ItemType<ElectrolyteGelPack>(), ItemType<PurifiedJam>(), ItemID.HealingPotion };
List<int> loot = new List<int>() { ItemType<SlimeGodBag>(), ItemID.Gel, ItemType<PurifiedGel>(), ItemType<OverloadedBlaster>(), ItemType<AbyssalTome>(), ItemType<EldritchTome>(), ItemType<CorroslimeStaff>(), ItemType<CrimslimeStaff>(), ItemType<SlimePuppetStaff>(), ItemType<ManaOverloader>(), ItemType<ElectrolyteGelPack>(), ItemType<PurifiedJam>(), ItemID.HealingPotion };
List<int> collection = new List<int>() { ItemType<SlimeGodTrophy>(), ItemType<SlimeGodMask>(), ItemType<SlimeGodMask2>(), ItemType<KnowledgeSlimeGod>() };
string instructions = $"Use an [i:{summon}]";
string despawn = CalamityUtils.ColorMessage("The gelatinous monstrosity achieved vengeance for its brethren.", new Color(0xBA, 0x55, 0x33));
@@ -327,7 +328,7 @@ namespace CalamityMod
BossDifficulty.TryGetValue("Cryogen", out float order);
int type = NPCType<Cryogen>();
int summon = ItemType<CryoKey>();
List<int> loot = new List<int>() { ItemType<CryogenBag>(), ItemType<EssenceofEleum>(), ItemType<Avalanche>(), ItemType<GlacialCrusher>(), ItemType<EffluviumBow>(), ItemType<BittercoldStaff>(), ItemType<SnowstormStaff>(), ItemType<Icebreaker>(), ItemType<IceStar>(), ItemType<ColdDivinity>(), ItemType<CryoStone>(), ItemType<SoulofCryogen>(), ItemType<FrostFlare>(), ItemID.FrozenKey, ItemID.GreaterHealingPotion };
List<int> loot = new List<int>() { ItemType<CryogenBag>(), ItemType<EssenceofEleum>(), ItemType<Avalanche>(), ItemType<GlacialCrusher>(), ItemType<EffluviumBow>(), ItemType<BittercoldStaff>(), ItemType<SnowstormStaff>(), ItemType<Icebreaker>(), ItemType<ColdDivinity>(), ItemType<CryoStone>(), ItemType<SoulofCryogen>(), ItemType<FrostFlare>(), ItemID.FrozenKey, ItemID.GreaterHealingPotion };
List<int> collection = new List<int>() { ItemType<CryogenTrophy>(), ItemType<CryogenMask>(), ItemType<KnowledgeCryogen>() };
string instructions = $"Use a [i:{summon}] in the Snow Biome";
string despawn = CalamityUtils.ColorMessage("Cryogen drifts away, carried on a freezing wind.", new Color(0x00, 0xFF, 0xFF));
@@ -481,7 +482,7 @@ namespace CalamityMod
BossDifficulty.TryGetValue("Providence", out float order);
int type = NPCType<Providence>();
int summon = ItemType<ProfanedCoreUnlimited>();
List<int> loot = new List<int>() { ItemType<ProvidenceBag>(), ItemType<UnholyEssence>(), ItemType<DivineGeode>(), ItemType<HolyCollider>(), ItemType<SolarFlare>(), ItemType<TelluricGlare>(), ItemType<BlissfulBombardier>(), ItemType<PurgeGuzzler>(), ItemType<MoltenAmputator>(), ItemType<DazzlingStabberStaff>(), ItemType<PristineFury>(), ItemType<ElysianWings>(), ItemType<ElysianAegis>(), ItemType<BlazingCore>(), ItemType<RuneofCos>(), ItemType<SupremeHealingPotion>() };
List<int> loot = new List<int>() { ItemType<ProvidenceBag>(), ItemType<UnholyEssence>(), ItemType<DivineGeode>(), ItemType<HolyCollider>(), ItemType<SolarFlare>(), ItemType<TelluricGlare>(), ItemType<BlissfulBombardier>(), ItemType<PurgeGuzzler>(), ItemType<MoltenAmputator>(), ItemType<DazzlingStabberStaff>(), ItemType<PristineFury>(), ItemType<ElysianWings>(), ItemType<ElysianAegis>(), ItemType<BlazingCore>(), ItemType<RuneofCos>(), ItemType<ProfanedMoonlightDye>(), ItemType<SupremeHealingPotion>() };
List<int> collection = new List<int>() { ItemType<ProvidenceTrophy>(), ItemType<ProvidenceMask>(), ItemType<KnowledgeProvidence>() };
string instructions = $"Use [i:{summon}] in the Hallow or Underworld Biomes";
string despawn = CalamityUtils.ColorMessage("The Profaned Goddess vanishes in a burning blaze.", new Color(0xFF, 0xA5, 0x00));
@@ -601,7 +602,7 @@ namespace CalamityMod
int altar = ItemType<SCalAltarItem>();
List<int> summons = new List<int>() { summon1, summon2 };
List<int> loot = new List<int>() { ItemType<SCalBag>(), ItemType<CalamitousEssence>(), ItemType<Vehemenc>(), ItemType<Heresy>(), ItemType<Perdition>(), ItemType<Vigilance>(), ItemType<Sacrifice>(), ItemType<Violence>(), ItemType<Condemnation>(), ItemType<GaelsGreatsword>(), ItemType<OmegaHealingPotion>() };
List<int> collection = new List<int>() { ItemType<SupremeCalamitasTrophy>(), ItemType<AshenHorns>(), ItemType<SCalMask>(), ItemType<SCalRobes>(), ItemType<SCalBoots>(), ItemType<KnowledgeCalamitas>(), ItemType<BrimstoneJewel>(), ItemType<Levi>() };
List<int> collection = new List<int>() { ItemType<SupremeCalamitasTrophy>(), ItemType<SupremeCataclysmTrophy>(), ItemType<SupremeCatastropheTrophy>(), ItemType<AshenHorns>(), ItemType<SCalMask>(), ItemType<SCalRobes>(), ItemType<SCalBoots>(), ItemType<KnowledgeCalamitas>(), ItemType<BrimstoneJewel>(), ItemType<Levi>() };
string instructions = $"Use [i:{summon1}] or a [i:{summon2}] as offering at an [i:{altar}]";
string despawn = CalamityUtils.ColorMessage("Please don't waste my time.", new Color(0xFF, 0xA5, 0x00));
string bossHeadTex = "CalamityMod/NPCs/SupremeCalamitas/HoodedHeadIcon";
@@ -629,7 +630,7 @@ namespace CalamityMod
InvasionDifficulty.TryGetValue("Acid Rain Initial", out float order);
List<int> enemies = AcidRainEvent.PossibleEnemiesPreHM.Select(enemy => enemy.Key).ToList();
int summon = ItemType<CausticTear>();
List<int> loot = new List<int>() { ItemType<SulfuricScale>(), ItemType<ParasiticSceptor>() };
List<int> loot = new List<int>() { ItemType<SulfuricScale>(), ItemType<ParasiticSceptor>(), ItemType<CausticCroakerStaff>() };
List<int> collection = new List<int>() { ItemType<RadiatingCrystal>() };
string instructions = $"Use a [i:{summon}] or wait for the invasion to occur naturally after the Eye of Cthulhu is defeated.";
string despawn = CalamityUtils.ColorMessage("The mysterious creatures of the sulphuric sea descended back into the ocean.", new Color(146, 183, 116));
@@ -644,7 +645,7 @@ namespace CalamityMod
enemies.Add(ModContent.NPCType<IrradiatedSlime>());
enemies.AddRange(AcidRainEvent.PossibleMinibossesAS.Select(miniboss => miniboss.Key));
List<int> summons = new List<int>() { ItemType<CausticTear>() };
List<int> loot = new List<int>() { ItemType<SulfuricScale>(), ItemType<CorrodedFossil>(), ItemType<LeadCore>(), ItemType<NuclearRod>(), ItemType<ParasiticSceptor>(), ItemType<FlakToxicannon>(), ItemType<OrthoceraShell>(), ItemType<SkyfinBombers>(), ItemType<SlitheringEels>(), ItemType<SpentFuelContainer>(), ItemType<SulphurousGrabber>() };
List<int> loot = new List<int>() { ItemType<SulfuricScale>(), ItemType<CorrodedFossil>(), ItemType<LeadCore>(), ItemType<NuclearRod>(), ItemType<ParasiticSceptor>(), ItemType<CausticCroakerStaff>(), ItemType<FlakToxicannon>(), ItemType<OrthoceraShell>(), ItemType<SkyfinBombers>(), ItemType<SlitheringEels>(), ItemType<SpentFuelContainer>(), ItemType<SulphurousGrabber>() };
List<int> collection = new List<int>() { ItemType<RadiatingCrystal>() };
string instructions = $"Use a [i:{ItemType<CausticTear>()}] or wait for the invasion to occur naturally after the Aquatic Scourge is defeated";
string despawn = CalamityUtils.ColorMessage("The mysterious creatures of the sulphuric sea descended back into the deep ocean.", new Color(146, 183, 116));
@@ -658,7 +659,7 @@ namespace CalamityMod
List<int> enemies = AcidRainEvent.PossibleEnemiesPolter.Select(enemy => enemy.Key).ToList();
enemies.AddRange(AcidRainEvent.PossibleMinibossesPolter.Select(miniboss => miniboss.Key));
List<int> summons = new List<int>() { ItemType<CausticTear>() };
List<int> loot = new List<int>() { ItemType<SulfuricScale>(), ItemType<CorrodedFossil>(), ItemType<LeadCore>(), ItemType<NuclearRod>(), ItemType<ParasiticSceptor>(), ItemType<FlakToxicannon>(), ItemType<OrthoceraShell>(), ItemType<SkyfinBombers>(), ItemType<SlitheringEels>(), ItemType<SpentFuelContainer>(), ItemType<SulphurousGrabber>(), ModContent.ItemType<GammaHeart>(), ModContent.ItemType<PhosphorescentGauntlet>() };
List<int> loot = new List<int>() { ItemType<SulfuricScale>(), ItemType<CorrodedFossil>(), ItemType<LeadCore>(), ItemType<NuclearRod>(), ItemType<ParasiticSceptor>(), ItemType<CausticCroakerStaff>(), ItemType<FlakToxicannon>(), ItemType<OrthoceraShell>(), ItemType<SkyfinBombers>(), ItemType<SlitheringEels>(), ItemType<SpentFuelContainer>(), ItemType<SulphurousGrabber>(), ModContent.ItemType<GammaHeart>(), ModContent.ItemType<PhosphorescentGauntlet>() };
List<int> collection = new List<int>() { ItemType<RadiatingCrystal>() };
string instructions = $"Use a [i:{ItemType<CausticTear>()}] or wait for the invasion to occur naturally after the Polterghast is defeated";
string despawn = CalamityUtils.ColorMessage("The mysterious creatures of the sulphuric sea descended back into the deep ocean.", new Color(146, 183, 116));
+2 -2
View File
@@ -87,7 +87,7 @@ namespace CalamityMod.NPCs.Abyss
{
++screamTimer;
int screamLimit = CalamityWorld.death ? 150 : 300;
int screamLimit = CalamityWorld.death ? 120 : 180;
if (screamTimer >= screamLimit)
{
if (screamTimer == screamLimit)
@@ -234,7 +234,7 @@ namespace CalamityMod.NPCs.Abyss
npc.frameCounter = 0.0;
npc.frame.Y = npc.frame.Y + frameHeight;
}
if (screamTimer <= 300)
if (screamTimer <= (CalamityWorld.death ? 120 : 180))
{
if (npc.frame.Y > frameHeight * 5)
{
-6
View File
@@ -909,11 +909,6 @@ namespace CalamityMod.NPCs
chat = "I happen to have several Angel Statues at the moment, a truely rare commodity. Want one?";
}
if (Main.rand.NextBool(7) && CalamityWorld.death)
{
chat = "The caverns have become increasingly dark as of late, so I stocked up on some special torches if you have the funds.";
}
break;
case NPCID.Mechanic:
@@ -1222,7 +1217,6 @@ namespace CalamityMod.NPCs
SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.BallOHurt : ItemID.TheRottedFork, WorldGen.shadowOrbSmashed || NPC.downedBoss2);
SetShopItem(ref shop, ref nextSlot, ItemID.MasterBait, NPC.downedPlantBoss);
SetShopItem(ref shop, ref nextSlot, ItemID.AngelStatue, NPC.FindFirstNPC(NPCType<THIEF>()) != -1, Item.buyPrice(0, 5));
SetShopItem(ref shop, ref nextSlot, ItemID.UltrabrightTorch, CalamityWorld.death);
}
if (type == NPCID.DyeTrader)
+3 -5
View File
@@ -2061,8 +2061,7 @@ namespace CalamityMod.NPCs.DevourerofGods
if (DeathAnimationTimer == 1f)
{
var soundInstance = Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/DevourerAttack"), npc.Center);
if (soundInstance != null)
soundInstance.Volume = MathHelper.Clamp(soundInstance.Volume * 1.6f, 0f, 1f);
CalamityUtils.SafeVolumeChange(ref soundInstance, 1.6f);
}
// Close the health bar, fade in, and stop doing contact damage.
@@ -2129,8 +2128,7 @@ namespace CalamityMod.NPCs.DevourerofGods
if (Main.netMode != NetmodeID.Server)
{
var soundInstance = Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/DevourerAttack"), npc.Center);
if (soundInstance != null)
soundInstance.Volume = MathHelper.Clamp(soundInstance.Volume * 1.6f, 0f, 1f);
CalamityUtils.SafeVolumeChange(ref soundInstance, 1.6f);
for (int i = 0; i < 3; i++)
{
@@ -2138,7 +2136,7 @@ namespace CalamityMod.NPCs.DevourerofGods
if (soundInstance != null)
{
soundInstance.Pitch = -MathHelper.Lerp(0.1f, 0.4f, i / 3f);
soundInstance.Volume = MathHelper.Clamp(soundInstance.Volume * 1.4f, 0f, 1f);
CalamityUtils.SafeVolumeChange(ref soundInstance, 1.4f);
}
}
}
+1 -3
View File
@@ -240,9 +240,7 @@ namespace CalamityMod.NPCs.ExoMechs
if (Main.netMode != NetmodeID.Server)
{
var sound = Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/FlareSound"), PlayerToFollow.Center);
if (sound != null)
sound.Volume = MathHelper.Clamp(sound.Volume * 1.55f, 0f, 1f);
CalamityUtils.SafeVolumeChange(ref sound, 1.55f);
}
}
-100
View File
@@ -1756,106 +1756,6 @@ namespace CalamityMod.Projectiles
}
}
if (CalamityWorld.death && !CalamityPlayer.areThereAnyDamnBosses)
{
if (projectile.type == ProjectileID.Sharknado || projectile.type == ProjectileID.Cthulunado)
{
int num520 = 10;
int num521 = 15;
float num522 = 1f;
int num523 = 150;
int num524 = 42;
if (projectile.type == ProjectileID.Cthulunado)
{
num520 = 16;
num521 = 16;
num522 = 1.5f;
}
if (projectile.velocity.X != 0f)
{
projectile.direction = projectile.spriteDirection = -Math.Sign(projectile.velocity.X);
}
projectile.frameCounter++;
if (projectile.frameCounter > 2)
{
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame >= 6)
{
projectile.frame = 0;
}
if (projectile.localAI[0] == 0f && Main.myPlayer == projectile.owner)
{
projectile.localAI[0] = 1f;
projectile.position.X += projectile.width / 2;
projectile.position.Y += projectile.height / 2;
projectile.scale = (num520 + num521 - projectile.ai[1]) * num522 / (num521 + num520);
projectile.width = (int)(num523 * projectile.scale);
projectile.height = (int)(num524 * projectile.scale);
projectile.position.X -= projectile.width / 2;
projectile.position.Y -= projectile.height / 2;
projectile.netUpdate = true;
}
if (projectile.ai[1] != -1f)
{
projectile.scale = (num520 + num521 - projectile.ai[1]) * num522 / (num521 + num520);
projectile.width = (int)(num523 * projectile.scale);
projectile.height = (int)(num524 * projectile.scale);
}
if (!Collision.SolidCollision(projectile.position, projectile.width, projectile.height))
{
projectile.alpha -= 30;
if (projectile.alpha < 60)
{
projectile.alpha = 60;
}
if (projectile.type == ProjectileID.Cthulunado && projectile.alpha < 100)
{
projectile.alpha = 100;
}
}
else
{
projectile.alpha += 30;
if (projectile.alpha > 150)
{
projectile.alpha = 150;
}
}
if (projectile.ai[0] > 0f)
{
projectile.ai[0] -= 1f;
}
if (projectile.ai[0] == 1f && projectile.ai[1] > 0f && projectile.owner == Main.myPlayer)
{
projectile.netUpdate = true;
Vector2 center2 = projectile.Center;
center2.Y -= num524 * projectile.scale / 2f;
float num525 = (num520 + num521 - projectile.ai[1] + 1f) * num522 / (num521 + num520);
center2.Y -= num524 * num525 / 2f;
center2.Y += 2f;
Projectile.NewProjectile(center2, projectile.velocity, projectile.type, projectile.damage, projectile.knockBack, projectile.owner, 10f, projectile.ai[1] - 1f);
}
if (projectile.ai[0] <= 0f)
{
float num529 = (float)Math.PI / 30f;
float num530 = projectile.width / 5f;
if (projectile.type == ProjectileID.Cthulunado)
{
num530 *= 2f;
}
float num531 = (float)(Math.Cos(num529 * (-projectile.ai[0])) - 0.5) * num530;
projectile.position.X -= num531 * (-projectile.direction);
projectile.ai[0] -= 1f;
num531 = (float)(Math.Cos(num529 * (-projectile.ai[0])) - 0.5) * num530;
projectile.position.X += num531 * (-projectile.direction);
}
return false;
}
}
return true;
}
#endregion
+1 -2
View File
@@ -52,8 +52,7 @@ namespace CalamityMod.Projectiles.Magic
if (DeployedFrames <= 0f)
{
var sound = Main.PlaySound(SoundID.DD2_DarkMageCastHeal, projectile.Center);
if (sound != null)
sound.Volume = MathHelper.Clamp(sound.Volume * 1.5f, 0f, 1f);
CalamityUtils.SafeVolumeChange(ref sound, 1.5f);
}
// Update damage based on curent magic damage stat (so Mana Sickness affects it)
@@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Melee
projectile.timeLeft = (int)MaxTime;
var sound = Main.PlaySound(Charge > 0 ? SoundID.DD2_PhantomPhoenixShot : SoundID.DD2_MonkStaffSwing, projectile.Center);
if (Charge > 0)
sound.Volume = MathHelper.Clamp(sound.Volume * 2.5f, 0f, 1f);
CalamityUtils.SafeVolumeChange(ref sound, 2.5f);
direction = projectile.velocity;
direction.Normalize();
projectile.rotation = direction.ToRotation();
@@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Melee
Lighting.AddLight(projectile.Center, new Vector3(1f, 0.56f, 0.56f) * ShredRatio);
//Manage position and rotation
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
projectile.rotation = direction.ToRotation();
projectile.Center = Owner.Center + (direction * 60);
@@ -133,8 +133,7 @@ namespace CalamityMod.Projectiles.Melee
}
//Take the direction the sword is swung. FUCK not controlling the swing direction more than just left/right :|
//The direction to mouseworld may need to be turned into the custom synced player mouse variables . not on the branch currently tho
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
projectile.rotation = direction.ToRotation();
@@ -184,7 +183,7 @@ namespace CalamityMod.Projectiles.Melee
Owner.itemRotation = rotation;
if (Owner.direction != 1)
{
Owner.itemRotation -= 3.14f;
Owner.itemRotation -= MathHelper.Pi;
}
Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation);
}
@@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Melee
{
CanBounce = 1f;
projectile.timeLeft = (int)MaxTime;
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
projectile.rotation = direction.ToRotation();
if (CanLunge == 1f)
@@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Melee
Owner.itemRotation = direction.ToRotation();
if (Owner.direction != 1)
{
Owner.itemRotation -= 3.14f;
Owner.itemRotation -= MathHelper.Pi;
}
Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation);
}
@@ -104,8 +104,8 @@ namespace CalamityMod.Projectiles.Melee
{
if (!initialized) //Initialization. create control points & shit)
{
projectile.velocity = Owner.DirectionTo(Main.MouseWorld);
Reach = MathHelper.Clamp((Owner.Center - Main.MouseWorld).Length(), MinReach, MaxReach);
projectile.velocity = Owner.DirectionTo(Owner.Calamity().mouseWorld);
Reach = MathHelper.Clamp((Owner.Center - Owner.Calamity().mouseWorld).Length(), MinReach, MaxReach);
Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center);
controlPoint1 = projectile.Center;
controlPoint2 = projectile.Center;
@@ -136,7 +136,7 @@ namespace CalamityMod.Projectiles.Melee
projectile.Center = Owner.MountedCenter + SwingPosition(ratio);
projectile.direction = projectile.spriteDirection = -Owner.direction;
Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Main.MouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0));
Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Owner.Calamity().mouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0));
}
public void HookToTile()
{
@@ -94,8 +94,7 @@ namespace CalamityMod.Projectiles.Melee
{
var dashSound = Main.PlaySound(SoundID.Item120, projectile.Center);
if (dashSound != null)
dashSound.Volume *= 0.5f;
CalamityUtils.SafeVolumeChange(ref dashSound, 0.5f);
State = 1f;
projectile.timeLeft = (7 + (int)((Charge / MaxCharge - 0.25f) * 20)) * 2; //Keep that even, if its an odd number itll fuck off and wont reset the players velocity on death
dashDuration = projectile.timeLeft;
@@ -108,7 +107,7 @@ namespace CalamityMod.Projectiles.Melee
if (State == 0f)
{
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
projectile.Center = Owner.Center + (direction * 70f * ChargeDisplacement());
@@ -229,8 +228,7 @@ namespace CalamityMod.Projectiles.Melee
SideSprouts(-1, 150f, 1f * Charge / MaxCharge);
SoundEffectInstance slamSound = Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.Center);
if (slamSound != null)
slamSound.Volume *= 1.5f;
CalamityUtils.SafeVolumeChange(ref slamSound, 1.5f);
}
public bool SideSprouts(float facing, float distance, float projSize)
+3 -4
View File
@@ -149,8 +149,7 @@ namespace CalamityMod.Projectiles.Melee
{
projectile.Center = Owner.Center;
var scream = Main.PlaySound(SoundID.Item120, projectile.Center);
if (scream != null)
scream.Volume *= 0.5f;
SafeVolumeChange(ref scream, 0.5f);
if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 3)
Main.LocalPlayer.Calamity().GeneralScreenShakePower = 3;
@@ -159,8 +158,8 @@ namespace CalamityMod.Projectiles.Melee
projectile.scale = 1f + ScaleEquation();
projectile.timeLeft = 2;
projectile.Center = Vector2.Lerp(projectile.Center, Main.MouseWorld, 0.05f * ThrowDisplace());
projectile.Center = projectile.Center.MoveTowards(Main.MouseWorld, 40f * ThrowDisplace());
projectile.Center = Vector2.Lerp(projectile.Center, Owner.Calamity().mouseWorld, 0.05f * ThrowDisplace());
projectile.Center = projectile.Center.MoveTowards(Owner.Calamity().mouseWorld, 40f * ThrowDisplace());
if ((projectile.Center - Owner.Center).Length() > FourSeasonsGalaxia.AriesAttunement_Reach)
projectile.Center = Owner.Center + Owner.DirectionTo(projectile.Center) * FourSeasonsGalaxia.AriesAttunement_Reach;
+2 -2
View File
@@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Melee
{
Main.PlaySound(SoundID.Item90, projectile.Center);
projectile.velocity = Vector2.Zero;
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
initialized = true;
}
@@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Melee
Main.LocalPlayer.Calamity().GeneralScreenShakePower = 3;
Main.PlaySound(SoundID.Item80, projectile.Center);
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
//PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES
for (int i = 0; i <= 8; i++)
{
+2 -3
View File
@@ -156,7 +156,7 @@ namespace CalamityMod.Projectiles.Melee
Shred = 0;
//Manage position and rotation
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
projectile.rotation = direction.ToRotation();
projectile.Center = Owner.Center + (direction * 60);
@@ -223,8 +223,7 @@ namespace CalamityMod.Projectiles.Melee
if (ChargeSoundCooldown <= 0)
{
SoundEffectInstance chargeSound = Main.PlaySound(SoundID.DD2_BookStaffCast);
if (chargeSound != null)
chargeSound.Volume *= 2.5f;
CalamityUtils.SafeVolumeChange(ref chargeSound, 2.5f);
ChargeSoundCooldown = 20;
}
}
+1 -1
View File
@@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Melee
Main.PlaySound(SoundID.Item90, projectile.Center);
initialized = true;
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
projectile.rotation = direction.ToRotation();
@@ -95,8 +95,7 @@ namespace CalamityMod.Projectiles.Melee
{
var dashSound = Main.PlaySound(SoundID.Item120, projectile.Center);
if (dashSound != null)
dashSound.Volume *= 0.5f;
CalamityUtils.SafeVolumeChange(ref dashSound, 0.5f);
State = 1f;
projectile.timeLeft = (7 + (int)((Charge / MaxCharge - 0.25f) * 20)) * 2; //Keep that even, if its an odd number itll fuck off and wont reset the players velocity on death
dashDuration = projectile.timeLeft;
@@ -109,7 +108,7 @@ namespace CalamityMod.Projectiles.Melee
if (State == 0f)
{
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
projectile.Center = Owner.Center + (direction * 70f * ChargeDisplacement());
@@ -187,8 +186,7 @@ namespace CalamityMod.Projectiles.Melee
public void SlamDown()
{
var slamSound = Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.Center);
if (slamSound != null)
slamSound.Volume *= 1.5f;
CalamityUtils.SafeVolumeChange(ref slamSound, 1.5f);
if (Owner.whoAmI != Main.myPlayer || Owner.velocity.Y == 0f)
return;
@@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Melee
Owner.itemRotation = direction.ToRotation();
if (Owner.direction != 1)
{
Owner.itemRotation -= 3.14f;
Owner.itemRotation -= MathHelper.Pi;
}
projectile.Center = Owner.Center + direction;
@@ -21,7 +21,6 @@ namespace CalamityMod.Projectiles.Melee
public class GestureForTheDrownedOrb : ModProjectile
{
public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned";
Vector2 direction = Vector2.Zero;
public Player Owner => Main.player[projectile.owner];
public ref float HasLanded => ref projectile.ai[0]; //Is the orb in the air or is it on the ground?
public ref float TimeSinceLanding => ref projectile.ai[1]; //How long has it been on the ground for
@@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Melee
{
Main.PlaySound(SoundID.Item90, projectile.Center);
projectile.velocity = Vector2.Zero;
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
oldDirection = direction;
initialized = true;
@@ -102,7 +102,7 @@ namespace CalamityMod.Projectiles.Melee
{
CurrentState = 1f;
Main.PlaySound(SoundID.Item80, projectile.Center);
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
//PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES
for (int i = 0; i <= 8; i++)
{
@@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Melee
Lighting.AddLight(projectile.Center, new Vector3(1f, 0.56f, 0.56f) * ShredRatio);
//Manage position and rotation
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
projectile.rotation = direction.ToRotation();
projectile.Center = Owner.Center + (direction * 60);
@@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Melee
projectile.timeLeft = (int)(30f + ShredRatio * 30f);
initialized = true;
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
projectile.rotation = direction.ToRotation();
@@ -129,9 +129,7 @@ namespace CalamityMod.Projectiles.Melee
break;
}
//Take the direction the sword is swung. FUCK not controlling the swing direction more than just left/right :|
//The direction to mouseworld may need to be turned into the custom synced player mouse variables . not on the branch currently tho
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
projectile.rotation = direction.ToRotation();
@@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Melee
{
CanBounce = 1f;
projectile.timeLeft = (int)MaxTime;
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
projectile.rotation = direction.ToRotation();
if (CanLunge == 1f && !ChargedUp)
@@ -158,8 +158,8 @@ namespace CalamityMod.Projectiles.Melee
{
if (!initialized) //Initialization. create control points & shit)
{
projectile.velocity = Owner.DirectionTo(Main.MouseWorld);
Reach = MathHelper.Clamp((Owner.Center - Main.MouseWorld).Length(), MinReach, MaxReach);
projectile.velocity = Owner.DirectionTo(Owner.Calamity().mouseWorld);
Reach = MathHelper.Clamp((Owner.Center - Owner.Calamity().mouseWorld).Length(), MinReach, MaxReach);
Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center);
controlPoint1 = projectile.Center;
controlPoint2 = projectile.Center;
@@ -192,7 +192,7 @@ namespace CalamityMod.Projectiles.Melee
//MessWithTiles();
Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Main.MouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0));
Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Owner.Calamity().mouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0));
}
public void HookToTile()
{
@@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Melee
aiType = ProjectileID.LightBeam;
projectile.friendly = true;
projectile.penetrate = 1;
projectile.timeLeft = 40;
projectile.timeLeft = TrueBiomeBlade.DefaultAttunement_BeamTime;
projectile.extraUpdates = 1;
projectile.melee = true;
projectile.tileCollide = false;
@@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Melee
}
}
}
else if ((projectile.Center - target.Center).Length() >= (projectile.Center + projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(projectile.velocity, target.Center - projectile.Center) < MathHelper.PiOver4 * 0.5f) //Home in
else if ((projectile.Center - target.Center).Length() >= (projectile.Center + projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(projectile.velocity, target.Center - projectile.Center) < TrueBiomeBlade.DefaultAttunement_HomingAngle) //Home in
{
projectile.timeLeft = 30; //Remain alive
float angularTurnSpeed = MathHelper.ToRadians(MathHelper.Lerp(12.5f, 2.5f, MathHelper.Clamp(projectile.Distance(target.Center) / 10f, 0f, 1f)));
@@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Melee
projectile.velocity = updatedDirection.ToRotationVector2() * projectile.velocity.Length();
}
if (projectile.timeLeft < 35)
if (projectile.timeLeft < TrueBiomeBlade.DefaultAttunement_BeamTime - 5f)
projectile.tileCollide = true;
Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f);
@@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Melee
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
if (projectile.timeLeft > 35)
if (projectile.timeLeft > TrueBiomeBlade.DefaultAttunement_BeamTime - 5f)
return false;
DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1);
@@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Melee
projectile.timeLeft = (int)MaxTime;
var sound = Main.PlaySound(Charge > 0 ? SoundID.DD2_PhantomPhoenixShot : SoundID.DD2_MonkStaffSwing, projectile.Center);
if (Charge > 0)
sound.Volume = MathHelper.Clamp(sound.Volume * 2.5f, 0f, 1f);
CalamityUtils.SafeVolumeChange(ref sound, 2.5f);
direction = projectile.velocity;
direction.Normalize();
projectile.rotation = direction.ToRotation();
@@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Melee
{
if (projectile.timeLeft == MaxTwirlTime)
{
projectile.velocity = Owner.DirectionTo(Main.MouseWorld);
projectile.velocity = Owner.DirectionTo(Owner.Calamity().mouseWorld);
Main.PlaySound(SoundID.Item71, projectile.Center);
for (int i = 0; i < 4; i++)
{
@@ -170,7 +170,7 @@ namespace CalamityMod.Projectiles.Melee
return;
}
projectile.velocity = Owner.DirectionTo(Main.MouseWorld);
projectile.velocity = Owner.DirectionTo(Owner.Calamity().mouseWorld);
projectile.velocity.Normalize();
projectile.rotation = projectile.velocity.ToRotation();
projectile.Center = Owner.Center + (projectile.velocity * 60);
@@ -94,8 +94,7 @@ namespace CalamityMod.Projectiles.Melee
{
var dashSound = Main.PlaySound(SoundID.Item120, projectile.Center);
if (dashSound != null)
dashSound.Volume *= 0.5f;
CalamityUtils.SafeVolumeChange(ref dashSound, 0.5f);
State = 1f;
projectile.timeLeft = (7 + (int)((Charge / MaxCharge - 0.25f) * 20)) * 2; //Keep that even, if its an odd number itll fuck off and wont reset the players velocity on death
dashDuration = projectile.timeLeft;
@@ -108,7 +107,7 @@ namespace CalamityMod.Projectiles.Melee
if (State == 0f)
{
direction = Owner.DirectionTo(Main.MouseWorld);
direction = Owner.DirectionTo(Owner.Calamity().mouseWorld);
direction.Normalize();
projectile.Center = Owner.Center + (direction * 70f * ChargeDisplacement());
@@ -187,8 +186,7 @@ namespace CalamityMod.Projectiles.Melee
public void SlamDown()
{
var slamSound = Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.Center);
if (slamSound != null)
slamSound.Volume *= 1.5f;
CalamityUtils.SafeVolumeChange(ref slamSound, 1.5f);
if (Owner.whoAmI != Main.myPlayer || Owner.velocity.Y == 0f)
return;
Loaded 100 of 110 files, more files were not shown because too many files have changed in this diff. Show more