Merge branch 'master' into new-funny-sprites-branch

This commit is contained in:
termigator1359 committed 2020-07-20 18:33:44 -04:00
commit 113dd1ae99
486 files changed
+7919 -6731

No files matched your search

+21 -20
View File
@@ -1,28 +1,29 @@
using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Pets
{
public class RotomBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Electric Troublemaker");
Description.SetDefault("Lightning never strikes the same place twice");
Main.buffNoTimeDisplay[Type] = true;
Main.vanityPet[Type] = true;
}
public class RotomBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Electric Troublemaker");
Description.SetDefault("Lightning never strikes the same place twice");
Main.buffNoTimeDisplay[Type] = true;
Main.vanityPet[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.buffTime[buffIndex] = 18000;
player.Calamity().rotomPet = true;
bool PetProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType<RotomPet>()] <= 0;
if (PetProjectileNotSpawned && player.whoAmI == Main.myPlayer)
{
Projectile.NewProjectile(player.position.X + (player.width / 2), player.position.Y + (player.height / 2), 0f, 0f, ModContent.ProjectileType<RotomPet>(), 0, 0f, player.whoAmI, 50f, 0f);
}
}
}
public override void Update(Player player, ref int buffIndex)
{
player.buffTime[buffIndex] = 18000;
player.Calamity().rotomPet = true;
bool PetProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType<RotomPet>()] <= 0;
if (PetProjectileNotSpawned && player.whoAmI == Main.myPlayer)
{
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<RotomPet>(), 0, 0f, player.whoAmI);
}
}
}
}
+25
View File
@@ -0,0 +1,25 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
{
public class BloodyBoost : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Bloody Boost");
Description.SetDefault("Increased offensive and defensive stats\n" +
"Healing potions grant more health");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
longerExpertDebuff = false;
canBeCleared = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().bloodPactBoost = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

File diff suppressed because it is too large. Load diff
+12 -18
View File
@@ -168,7 +168,7 @@ namespace CalamityMod.CalPlayer
{
if (Main.rand.Next(100) < chanceForCrates)
{
if (Main.rand.NextBool(chanceForRareItems) && modPlayer.enchantedPearl && modPlayer.fishingStation && player.cratePotion)
if (Main.rand.NextBool(chanceForBiomeCrate))
{
if (modPlayer.ZoneCalamity)
caughtType = ModContent.ItemType<BrimstoneCrate>();
@@ -438,14 +438,14 @@ namespace CalamityMod.CalPlayer
}
}
if (power >= 60 && player.FindBuffIndex(BuffID.Gills) > -1 && CalamityWorld.downedCalamitas && Main.rand.NextBool(25) && power < 160)
if (player.FindBuffIndex(BuffID.Gills) > -1 && CalamityWorld.downedCalamitas && Main.rand.NextBool(25))
{
caughtType = ModContent.ItemType<Floodtide>();
}
if (junk)
{
if (canSulphurFish && power < 40)
if (canSulphurFish)
{
caughtType = ModContent.ItemType<PlantyMush>();
}
@@ -474,23 +474,17 @@ namespace CalamityMod.CalPlayer
if (canSulphurFish)
{
if (power >= 40)
if (Main.rand.NextBool(15))
{
if (Main.rand.NextBool(15) && power < 80)
caughtType = ModContent.ItemType<PlantyMush>();
}
if (Main.rand.NextFloat() < 0.08f)
{
caughtType = Utils.SelectRandom(Main.rand, new int[]
{
caughtType = ModContent.ItemType<PlantyMush>();
}
if (Main.rand.NextBool(25) && power < 160)
{
caughtType = ModContent.ItemType<AlluringBait>();
}
if (power >= 110)
{
if (Main.rand.NextBool(25) && power < 240)
{
caughtType = ModContent.ItemType<AbyssalAmulet>();
}
}
ModContent.ItemType<AlluringBait>(),
ModContent.ItemType<AbyssalAmulet>()
});
}
if (player.cratePotion && Main.rand.NextBool(5)) // 20%
{
+7 -3
View File
@@ -596,7 +596,7 @@ namespace CalamityMod.CalPlayer
if (modPlayer.absorber)
{
if (Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0)
if (player.StandingStill() && player.itemAnimation == 0)
player.lifeRegen += 2;
}
@@ -691,6 +691,10 @@ namespace CalamityMod.CalPlayer
player.lifeRegen += 2;
}
if (modPlayer.handWarmer && modPlayer.eskimoSet)
{
player.lifeRegen += 2;
}
if (modPlayer.bloodPactBoost)
{
player.lifeRegen += 2;
}
@@ -719,7 +723,7 @@ namespace CalamityMod.CalPlayer
int lifeRegenMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 1 : 4;
float lifeRegenLifeRegenTimeMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 8f : 30f;
if (Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0)
if (player.StandingStill() && player.itemAnimation == 0)
{
bool boostedRegen = false;
bool noSunlight = false;
@@ -865,7 +869,7 @@ namespace CalamityMod.CalPlayer
if (player.statLife < modPlayer.actualMaxLife)
{
bool noLifeRegenCap = (player.shinyStone || modPlayer.draedonsHeart || modPlayer.cFreeze || modPlayer.shadeRegen || modPlayer.photosynthesis || modPlayer.camper) &&
Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0;
player.StandingStill() && player.itemAnimation == 0;
if (!noLifeRegenCap)
{
+233 -232
View File
@@ -465,10 +465,10 @@ namespace CalamityMod.CalPlayer
{
if (CalamityWorld.rainingAcid && modPlayer.ZoneSulphur && !CalamityPlayer.areThereAnyDamnBosses && player.Center.Y < Main.worldSurface * 16f + 800f)
{
int acidRainDropRate = (int)(MathHelper.Clamp(Main.invasionSize * 0.4f, 13.5f, 50) * 2.25);
int slimeRainRate = (int)(MathHelper.Clamp(Main.invasionSize * 0.4f, 13.5f, 50) * 2.25);
Vector2 spawnPoint = new Vector2(player.Center.X + Main.rand.Next(-1000, 1001), player.Center.Y - Main.rand.Next(700, 801));
if (player.miscCounter % acidRainDropRate == 0f)
if (player.miscCounter % slimeRainRate == 0f)
{
if (CalamityWorld.downedAquaticScourge && !CalamityWorld.downedPolterghast && Main.rand.NextBool(12))
{
@@ -483,12 +483,12 @@ namespace CalamityMod.CalPlayer
{
if (modPlayer.hydrothermalSmoke)
{
if ((double)player.velocity.X > 0 || (double)player.velocity.Y > 0 || (double)player.velocity.X < -0.1 || (double)player.velocity.Y < -0.1)
if (Math.Abs(player.velocity.X) > 0.1f || Math.Abs(player.velocity.Y) > 0.1f)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HydrothermalSmoke>(), 0, 0f, player.whoAmI, 0f, 0f);
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<HydrothermalSmoke>(), 0, 0f, player.whoAmI);
}
}
//trying to find a workaround because apparently putting the bool in ResetEffects prevents it from working
//Trying to find a workaround because apparently putting the bool in ResetEffects prevents it from working
if (!player.armorEffectDrawOutlines)
{
modPlayer.hydrothermalSmoke = false;
@@ -556,12 +556,12 @@ namespace CalamityMod.CalPlayer
// Thorn and spike effects
// 10 = crimson/corruption thorns, 17 = jungle thorns, 40 = dungeon spikes, 60 = temple spikes
Vector2 vector;
Vector2 tileType;
if (!player.mount.Active || !player.mount.Cart)
vector = Collision.HurtTiles(player.position, player.velocity, player.width, player.height, player.fireWalk);
tileType = Collision.HurtTiles(player.position, player.velocity, player.width, player.height, player.fireWalk);
else
vector = Collision.HurtTiles(player.position, player.velocity, player.width, player.height - 16, player.fireWalk);
switch ((int)vector.Y)
tileType = Collision.HurtTiles(player.position, player.velocity, player.width, player.height - 16, player.fireWalk);
switch ((int)tileType.Y)
{
case 10:
player.AddBuff(BuffID.Weak, 300, false);
@@ -610,7 +610,7 @@ namespace CalamityMod.CalPlayer
// Ice shards, lightning and sharknadoes
bool nearPillar = player.PillarZone();
if (player.ZoneOverworldHeight && !CalamityPlayer.areThereAnyDamnBosses && Main.invasionType == InvasionID.None && NPC.MoonLordCountdown == 0 && !player.InSpace() && !DD2Event.Ongoing && !nearPillar)
if (player.ZoneOverworldHeight && !CalamityPlayer.areThereAnyDamnBosses && !CalamityPlayer.areThereAnyDamnEvents && 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)
@@ -632,7 +632,7 @@ namespace CalamityMod.CalPlayer
Vector2 velocity = new Vector2(windVelocity * 0.2f, 3f * Main.rand.NextFloat());
if (player.miscCounter % divisor == 0 && Main.rand.NextBool(3))
Projectile.NewProjectile(spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ModContent.ProjectileType<IceRain>(), 20, 0f, player.whoAmI, 2f, 0f);
Projectile.NewProjectile(spawnPoint, velocity, ModContent.ProjectileType<IceRain>(), 20, 0f, player.whoAmI, 2f, 0f);
}
}
else
@@ -643,31 +643,31 @@ namespace CalamityMod.CalPlayer
if (player.miscCounter == 280 && Main.rand.NextBool(randomFrequency) && player.ownedProjectileCounts[ProjectileID.Cthulunado] < 1)
{
Main.PlaySound(SoundID.NPCDeath19, (int)sharknadoSpawnPoint.X, (int)sharknadoSpawnPoint.Y);
int num331 = (int)(sharknadoSpawnPoint.Y / 16f);
int num332 = (int)(sharknadoSpawnPoint.X / 16f);
int num333 = 100;
if (num332 < 10)
num332 = 10;
if (num332 > Main.maxTilesX - 10)
num332 = Main.maxTilesX - 10;
if (num331 < 10)
num331 = 10;
if (num331 > Main.maxTilesY - num333 - 10)
num331 = Main.maxTilesY - num333 - 10;
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 - num331;
for (int num334 = num331; num334 < num331 + spawnAreaY; num334++)
int spawnAreaY = Main.maxTilesY - y;
for (int j = y; j < y + spawnAreaY; j++)
{
Tile tile = Main.tile[num332, num334];
Tile tile = Main.tile[x, j];
if ((tile.active() && Main.tileSolid[tile.type]) || tile.liquid >= 200)
{
num331 = num334;
y = j;
break;
}
}
int num336 = Projectile.NewProjectile(num332 * 16 + 8, num331 * 16 - 24, 0f, 0f, ProjectileID.Cthulunado, 50, 4f, player.whoAmI, 16f, 24f);
Main.projectile[num336].netUpdate = true;
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;
}
}
@@ -680,8 +680,8 @@ namespace CalamityMod.CalPlayer
{
float randomVelocity = Main.rand.NextFloat() - 0.5f;
Vector2 fireTo = new Vector2(spawnPoint.X + 100f * randomVelocity, spawnPoint.Y + 900f);
Vector2 ai0 = fireTo - spawnPoint;
Vector2 velocity = Vector2.Normalize(ai0) * 12f;
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);
}
}
@@ -693,32 +693,32 @@ namespace CalamityMod.CalPlayer
{
if (player.miscCounter == 280 && Main.rand.NextBool(10) && player.ownedProjectileCounts[ProjectileID.Sharknado] < 1)
{
Main.PlaySound(SoundID.NPCDeath19, (int)sharknadoSpawnPoint.X, (int)sharknadoSpawnPoint.Y);
int num331 = (int)(sharknadoSpawnPoint.Y / 16f);
int num332 = (int)(sharknadoSpawnPoint.X / 16f);
Main.PlaySound(SoundID.NPCDeath19, sharknadoSpawnPoint);
int y = (int)(sharknadoSpawnPoint.Y / 16f);
int x = (int)(sharknadoSpawnPoint.X / 16f);
int num333 = 100;
if (num332 < 10)
num332 = 10;
if (num332 > Main.maxTilesX - 10)
num332 = Main.maxTilesX - 10;
if (num331 < 10)
num331 = 10;
if (num331 > Main.maxTilesY - num333 - 10)
num331 = Main.maxTilesY - num333 - 10;
if (x < 10)
x = 10;
if (x > Main.maxTilesX - 10)
x = Main.maxTilesX - 10;
if (y < 10)
y = 10;
if (y > Main.maxTilesY - num333 - 10)
y = Main.maxTilesY - num333 - 10;
int spawnAreaY = Main.maxTilesY - num331;
for (int num334 = num331; num334 < num331 + spawnAreaY; num334++)
int spawnAreaY = Main.maxTilesY - y;
for (int j = y; j < y + spawnAreaY; j++)
{
Tile tile = Main.tile[num332, num334];
Tile tile = Main.tile[x, j];
if ((tile.active() && Main.tileSolid[tile.type]) || tile.liquid >= 200)
{
num331 = num334;
y = j;
break;
}
}
int num336 = Projectile.NewProjectile(num332 * 16 + 8, num331 * 16 - 24, 0.01f, 0f, ProjectileID.Sharknado, 25, 4f, player.whoAmI, 16f, 15f);
Main.projectile[num336].netUpdate = true;
int tornado = Projectile.NewProjectile(x * 16 + 8, y * 16 - 24, 0.01f, 0f, ProjectileID.Sharknado, 25, 4f, player.whoAmI, 16f, 15f);
Main.projectile[tornado].netUpdate = true;
}
}
}
@@ -825,7 +825,7 @@ namespace CalamityMod.CalPlayer
if (modPlayer.omegaBlueSet)
{
// Add tentacles
if (player.ownedProjectileCounts[ModContent.ProjectileType<OmegaBlueTentacle>()] < 6)
if (player.ownedProjectileCounts[ModContent.ProjectileType<OmegaBlueTentacle>()] < 6 && Main.myPlayer == player.whoAmI)
{
bool[] tentaclesPresent = new bool[6];
for (int i = 0; i < Main.maxProjectiles; i++)
@@ -856,7 +856,7 @@ namespace CalamityMod.CalPlayer
player.allDamage += damageUp;
modPlayer.AllCritBoost(critUp);
}
bool canProvideBuffs = player.Calamity().profanedCrystalBuffs || (!modPlayer.profanedCrystal && modPlayer.pArtifact) || (player.Calamity().profanedCrystal && CalamityWorld.downedSCal);
bool canProvideBuffs = modPlayer.profanedCrystalBuffs || (!modPlayer.profanedCrystal && modPlayer.pArtifact) || (modPlayer.profanedCrystal && CalamityWorld.downedSCal);
bool attack = player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] > 0;
// Guardian bonuses if not burnt out
if (!modPlayer.bOut && canProvideBuffs)
@@ -870,8 +870,8 @@ namespace CalamityMod.CalPlayer
if (modPlayer.healCounter <= 0)
{
bool enrage = player.statLife <= (int)((double)player.statLifeMax2 * 0.5);
modPlayer.healCounter = (!enrage && player.Calamity().profanedCrystalBuffs) ? 360 : 300;
bool enrage = player.statLife <= (int)(player.statLifeMax2 * 0.5);
modPlayer.healCounter = (!enrage && modPlayer.profanedCrystalBuffs) ? 360 : 300;
if (player.whoAmI == Main.myPlayer)
{
int healAmount = 5 +
@@ -988,6 +988,15 @@ namespace CalamityMod.CalPlayer
modPlayer.dogTextCooldown--;
if (modPlayer.titanCooldown > 0)
modPlayer.titanCooldown--;
if (modPlayer.roverDrive)
{
if (modPlayer.roverDriveTimer < CalamityUtils.SecondsToFrames(30f))
modPlayer.roverDriveTimer++;
if (modPlayer.roverDriveTimer >= CalamityUtils.SecondsToFrames(30f))
modPlayer.roverDriveTimer = 0;
}
else
modPlayer.roverDriveTimer = CalamityUtils.SecondsToFrames(10f) + 1; //Doesn't reset to zero to prevent exploits
// Silva invincibility effects
if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet)
@@ -998,19 +1007,19 @@ namespace CalamityMod.CalPlayer
player.buffImmune[ModContent.BuffType<VulnerabilityHex>()] = true;
modPlayer.silvaCountdown -= modPlayer.auricSet ? 2 : 1;
if (modPlayer.silvaCountdown <= 0)
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), (int)player.position.X, (int)player.position.Y);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), player.Center);
for (int j = 0; j < 2; j++)
{
int num = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 157, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 2f);
Main.dust[num].position.X += (float)Main.rand.Next(-20, 21);
Main.dust[num].position.Y += (float)Main.rand.Next(-20, 21);
Main.dust[num].velocity *= 0.9f;
Main.dust[num].noGravity = true;
Main.dust[num].scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
Main.dust[num].shader = GameShaders.Armor.GetSecondaryShader(player.cWaist, player);
int green = Dust.NewDust(player.position, player.width, player.height, 157, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 2f);
Main.dust[green].position.X += (float)Main.rand.Next(-20, 21);
Main.dust[green].position.Y += (float)Main.rand.Next(-20, 21);
Main.dust[green].velocity *= 0.9f;
Main.dust[green].noGravity = true;
Main.dust[green].scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
Main.dust[green].shader = GameShaders.Armor.GetSecondaryShader(player.cWaist, player);
if (Main.rand.NextBool(2))
Main.dust[num].scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
Main.dust[green].scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
}
}
@@ -1027,8 +1036,8 @@ namespace CalamityMod.CalPlayer
for (int j = 0; j < 2; j++)
{
int num = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 157, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 2f);
Dust dust = Main.dust[num];
int green = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 157, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 2f);
Dust dust = Main.dust[green];
dust.position.X += (float)Main.rand.Next(-20, 21);
dust.position.Y += (float)Main.rand.Next(-20, 21);
dust.velocity *= 0.9f;
@@ -1107,8 +1116,8 @@ namespace CalamityMod.CalPlayer
for (int j = 0; j < 2; j++)
{
int num = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, DustID.Blood, 0f, 0f, 100, default, 2f);
Dust dust = Main.dust[num];
int blood = Dust.NewDust(player.position, player.width, player.height, DustID.Blood, 0f, 0f, 100, default, 2f);
Dust dust = Main.dust[blood];
dust.position.X += (float)Main.rand.Next(-20, 21);
dust.position.Y += (float)Main.rand.Next(-20, 21);
dust.velocity *= 0.9f;
@@ -1152,6 +1161,13 @@ namespace CalamityMod.CalPlayer
player.statDefense += 20;
}
if (modPlayer.roverDriveTimer < 616)
{
player.statDefense += 10;
if (modPlayer.roverDriveTimer > 606)
player.statDefense -= modPlayer.roverDriveTimer - 606; //so it scales down when the shield dies
}
// Absorber bonus
if (modPlayer.absorber)
{
@@ -1160,7 +1176,7 @@ namespace CalamityMod.CalPlayer
player.thorns += 0.5f;
player.endurance += 0.05f;
if (Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0)
if (player.StandingStill() && player.itemAnimation == 0)
player.manaRegenBonus += 2;
}
@@ -1207,7 +1223,7 @@ namespace CalamityMod.CalPlayer
if (modPlayer.draedonsHeart)
{
player.allDamage += 0.05f;
if (Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0)
if (player.StandingStill() && player.itemAnimation == 0)
player.statDefense += 25;
}
@@ -1302,9 +1318,9 @@ namespace CalamityMod.CalPlayer
player.velocity.X = 0f;
player.velocity.Y = -0.4f; //should negate gravity
int d = Dust.NewDust(player.position, player.width, player.height, 88);
Main.dust[d].noGravity = true;
Main.dust[d].velocity *= 2f;
int ice = Dust.NewDust(player.position, player.width, player.height, 88);
Main.dust[ice].noGravity = true;
Main.dust[ice].velocity *= 2f;
player.buffImmune[BuffID.Frozen] = true;
player.buffImmune[BuffID.Chilled] = true;
@@ -1314,20 +1330,19 @@ namespace CalamityMod.CalPlayer
// Cosmic Discharge Cosmic Freeze buff, gives surrounding enemies the Glacial State debuff
if (modPlayer.cFreeze)
{
int num = ModContent.BuffType<GlacialState>();
float num2 = 200f;
int random = Main.rand.Next(5);
int buffType = ModContent.BuffType<GlacialState>();
float freezeDist = 200f;
if (player.whoAmI == Main.myPlayer)
{
if (random == 0)
if (Main.rand.NextBool(5))
{
for (int l = 0; l < Main.maxNPCs; l++)
{
NPC nPC = Main.npc[l];
if (nPC.active && !nPC.friendly && nPC.damage > 0 && !nPC.dontTakeDamage && !nPC.buffImmune[num] && Vector2.Distance(player.Center, nPC.Center) <= num2)
NPC npc = Main.npc[l];
if (npc.active && !npc.friendly && npc.damage > 0 && !npc.dontTakeDamage && !npc.buffImmune[buffType] && Vector2.Distance(player.Center, npc.Center) <= freezeDist)
{
if (nPC.FindBuffIndex(num) == -1)
nPC.AddBuff(num, 120, false);
if (npc.FindBuffIndex(buffType) == -1)
npc.AddBuff(buffType, 120, false);
}
}
}
@@ -1403,25 +1418,25 @@ namespace CalamityMod.CalPlayer
float knockBack = 1f;
if (Main.rand.NextBool(15))
{
int num = 0;
int projCount = 0;
for (int i = 0; i < Main.maxProjectiles; i++)
{
if (Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType<TheDeadlyMicrobeProjectile>())
num++;
projCount++;
}
if (Main.rand.Next(15) >= num && num < 6)
if (Main.rand.Next(15) >= projCount && projCount < 6)
{
int num2 = 50;
int loopAmt = 50;
int num3 = 24;
int num4 = 90;
for (int j = 0; j < num2; j++)
for (int j = 0; j < loopAmt; j++)
{
int num5 = Main.rand.Next(200 - j * 2, 400 + j * 2);
int sourceVariance = Main.rand.Next(200 - j * 2, 400 + j * 2);
Vector2 center = player.Center;
center.X += (float)Main.rand.Next(-num5, num5 + 1);
center.Y += (float)Main.rand.Next(-num5, num5 + 1);
center.X += (float)Main.rand.Next(-sourceVariance, sourceVariance + 1);
center.Y += (float)Main.rand.Next(-sourceVariance, sourceVariance + 1);
if (!Collision.SolidCollision(center, num3, num3) && !Collision.WetCollision(center, num3, num3))
{
@@ -1430,12 +1445,12 @@ namespace CalamityMod.CalPlayer
if (Collision.CanHit(new Vector2(player.Center.X, player.position.Y), 1, 1, center, 1, 1) || Collision.CanHit(new Vector2(player.Center.X, player.position.Y - 50f), 1, 1, center, 1, 1))
{
int num6 = (int)center.X / 16;
int num7 = (int)center.Y / 16;
bool flag = false;
int xSpawn = (int)center.X / 16;
int ySpawn = (int)center.Y / 16;
bool shouldSpawn = false;
if (Main.rand.NextBool(3) && Main.tile[num6, num7] != null && Main.tile[num6, num7].wall > 0)
flag = true;
if (Main.rand.NextBool(3) && Main.tile[xSpawn, ySpawn] != null && Main.tile[xSpawn, ySpawn].wall > 0)
shouldSpawn = true;
else
{
center.X -= (float)(num4 / 2);
@@ -1445,23 +1460,23 @@ namespace CalamityMod.CalPlayer
{
center.X += (float)(num4 / 2);
center.Y += (float)(num4 / 2);
flag = true;
shouldSpawn = true;
}
}
if (flag)
if (shouldSpawn)
{
for (int k = 0; k < Main.maxProjectiles; k++)
{
if (Main.projectile[k].active && Main.projectile[k].owner == player.whoAmI && Main.projectile[k].type == ModContent.ProjectileType<TheDeadlyMicrobeProjectile>() && (center - Main.projectile[k].Center).Length() < 48f)
{
flag = false;
shouldSpawn = false;
break;
}
}
if (flag && Main.myPlayer == player.whoAmI)
Projectile.NewProjectile(center.X, center.Y, 0f, 0f, ModContent.ProjectileType<TheDeadlyMicrobeProjectile>(), damage, knockBack, player.whoAmI, 0f, 0f);
if (shouldSpawn && Main.myPlayer == player.whoAmI)
Projectile.NewProjectile(center, Vector2.Zero, ModContent.ProjectileType<TheDeadlyMicrobeProjectile>(), damage, knockBack, player.whoAmI, 0f, 0f);
}
}
}
@@ -1518,34 +1533,36 @@ namespace CalamityMod.CalPlayer
if (player.spelunkerTimer >= 10)
{
player.spelunkerTimer = 0;
int num65 = 30;
int num66 = (int)player.Center.X / 16;
int num67 = (int)player.Center.Y / 16;
int distance = 30;
int i = (int)player.Center.X / 16;
int j = (int)player.Center.Y / 16;
for (int num68 = num66 - num65; num68 <= num66 + num65; num68++)
for (int x = i - distance; x <= i + distance; x++)
{
for (int num69 = num67 - num65; num69 <= num67 + num65; num69++)
for (int y = j - distance; y <= j + distance; y++)
{
Tile tile = Main.tile[x, y];
if (Main.rand.NextBool(4))
{
Vector2 vector = new Vector2((float)(num66 - num68), (float)(num67 - num69));
if (vector.Length() < (float)num65 && num68 > 0 && num68 < Main.maxTilesX - 1 && num69 > 0 && num69 < Main.maxTilesY - 1 && Main.tile[num68, num69] != null && Main.tile[num68, num69].active())
Vector2 vector = new Vector2((float)(i - x), (float)(j - y));
if (vector.Length() < (float)distance && x > 0 && x < Main.maxTilesX - 1 && y > 0 && y < Main.maxTilesY - 1 && tile != null && tile.active())
{
bool flag7 = false;
if (Main.tile[num68, num69].type == 185 && Main.tile[num68, num69].frameY == 18)
bool shouldSpawnDust = false;
//These checks are for money piles. They share a sheet with other background objects so it checks for frames.
if (tile.type == TileID.SmallPiles && tile.frameY == 18)
{
if (Main.tile[num68, num69].frameX >= 576 && Main.tile[num68, num69].frameX <= 882)
flag7 = true;
if (tile.frameX >= 576 && tile.frameX <= 882)
shouldSpawnDust = true;
}
else if (Main.tile[num68, num69].type == 186 && Main.tile[num68, num69].frameX >= 864 && Main.tile[num68, num69].frameX <= 1170)
flag7 = true;
else if (tile.type == TileID.LargePiles && tile.frameX >= 864 && tile.frameX <= 1170)
shouldSpawnDust = true;
if (flag7 || Main.tileSpelunker[(int)Main.tile[num68, num69].type] || (Main.tileAlch[(int)Main.tile[num68, num69].type] && Main.tile[num68, num69].type != 82))
if (shouldSpawnDust || Main.tileSpelunker[tile.type] || (Main.tileAlch[tile.type] && tile.type != TileID.ImmatureHerbs))
{
int num70 = Dust.NewDust(new Vector2((float)(num68 * 16), (float)(num69 * 16)), 16, 16, 204, 0f, 0f, 150, default, 0.3f);
Main.dust[num70].fadeIn = 0.75f;
Main.dust[num70].velocity *= 0.1f;
Main.dust[num70].noLight = true;
int sparkle = Dust.NewDust(new Vector2((x * 16f), (y * 16f)), 16, 16, 204, 0f, 0f, 150, default, 0.3f);
Main.dust[sparkle].fadeIn = 0.75f;
Main.dust[sparkle].velocity *= 0.1f;
Main.dust[sparkle].noLight = true;
}
}
}
@@ -1563,7 +1580,7 @@ namespace CalamityMod.CalPlayer
}
if (modPlayer.golemLore)
{
if (Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0)
if (player.StandingStill() && player.itemAnimation == 0)
player.statDefense += 10;
}
if (modPlayer.dukeFishronLore)
@@ -1615,59 +1632,52 @@ namespace CalamityMod.CalPlayer
{
for (int j = 0; j < Main.maxItems; j++)
{
if (Main.item[j].active && Main.item[j].noGrabDelay == 0 && Main.item[j].owner == player.whoAmI)
Item item = Main.item[j];
if (item.active && item.noGrabDelay == 0 && item.owner == player.whoAmI)
{
Main.item[j].beingGrabbed = true;
if ((double)player.position.X + (double)player.width * 0.5 > (double)Main.item[j].position.X + (double)Main.item[j].width * 0.5)
item.beingGrabbed = true;
if (player.Center.X > item.Center.X)
{
if (Main.item[j].velocity.X < 90f + player.velocity.X)
if (item.velocity.X < 90f + player.velocity.X)
{
Item item = Main.item[j];
item.velocity.X += 9f;
}
if (Main.item[j].velocity.X < 0f)
if (item.velocity.X < 0f)
{
Item item = Main.item[j];
item.velocity.X += 9f * 0.75f;
}
}
else
{
if (Main.item[j].velocity.X > -90f + player.velocity.X)
if (item.velocity.X > -90f + player.velocity.X)
{
Item item = Main.item[j];
item.velocity.X -= 9f;
}
if (Main.item[j].velocity.X > 0f)
if (item.velocity.X > 0f)
{
Item item = Main.item[j];
item.velocity.X -= 9f * 0.75f;
}
}
if ((double)player.position.Y + (double)player.height * 0.5 > (double)Main.item[j].position.Y + (double)Main.item[j].height * 0.5)
if (player.Center.Y > item.Center.Y)
{
if (Main.item[j].velocity.Y < 90f)
if (item.velocity.Y < 90f)
{
Item item = Main.item[j];
item.velocity.Y += 9f;
}
if (Main.item[j].velocity.Y < 0f)
if (item.velocity.Y < 0f)
{
Item item = Main.item[j];
item.velocity.Y += 9f * 0.75f;
}
}
else
{
if (Main.item[j].velocity.Y > -90f)
if (item.velocity.Y > -90f)
{
Item item = Main.item[j];
item.velocity.Y -= 9f;
}
if (Main.item[j].velocity.Y > 0f)
if (item.velocity.Y > 0f)
{
Item item = Main.item[j];
item.velocity.Y -= 9f * 0.75f;
}
}
@@ -1678,14 +1688,14 @@ namespace CalamityMod.CalPlayer
// Spectral Veil effects
if (modPlayer.spectralVeil && modPlayer.spectralVeilImmunity > 0)
{
Rectangle sVeilRectangle = new Rectangle((int)((double)player.position.X + (double)player.velocity.X * 0.5 - 4.0), (int)((double)player.position.Y + (double)player.velocity.Y * 0.5 - 4.0), player.width + 8, player.height + 8);
Rectangle sVeilRectangle = new Rectangle((int)(player.position.X + player.velocity.X * 0.5f - 4f), (int)(player.position.Y + player.velocity.Y * 0.5f - 4f), player.width + 8, player.height + 8);
for (int i = 0; i < Main.maxNPCs; i++)
{
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && !Main.npc[i].townNPC && Main.npc[i].immune[player.whoAmI] <= 0 && Main.npc[i].damage > 0)
NPC npc = Main.npc[i];
if (npc.active && !npc.dontTakeDamage && !npc.friendly && !npc.townNPC && npc.immune[player.whoAmI] <= 0 && npc.damage > 0)
{
NPC nPC = Main.npc[i];
Rectangle rect = nPC.getRect();
if (sVeilRectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
Rectangle rect = npc.getRect();
if (sVeilRectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc)))
{
if (player.whoAmI == Main.myPlayer)
{
@@ -1710,7 +1720,7 @@ namespace CalamityMod.CalPlayer
Main.dust[sVeilDustIndex2].noLight = false;
}
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), player.Center);
}
break;
}
@@ -1719,9 +1729,9 @@ namespace CalamityMod.CalPlayer
for (int i = 0; i < Main.maxProjectiles; i++)
{
if (Main.projectile[i].active && !Main.projectile[i].friendly && Main.projectile[i].hostile && Main.projectile[i].damage > 0)
Projectile proj = Main.projectile[i];
if (proj.active && !proj.friendly && proj.hostile && proj.damage > 0)
{
Projectile proj = Main.projectile[i];
Rectangle rect = proj.getRect();
if (sVeilRectangle.Intersects(rect))
{
@@ -1748,7 +1758,7 @@ namespace CalamityMod.CalPlayer
Main.dust[sVeilDustIndex2].noLight = false;
}
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), player.Center);
}
break;
}
@@ -1757,7 +1767,7 @@ namespace CalamityMod.CalPlayer
}
// Plagued Fuel Pack effects
if (modPlayer.plaguedFuelPackDash > 0)
if (modPlayer.plaguedFuelPackDash > 0 && player.whoAmI == Main.myPlayer)
{
int velocityMult = modPlayer.plaguedFuelPackDash > 1 ? 25 : 5;
player.velocity = new Vector2(modPlayer.plaguedFuelPackDirection, -1) * velocityMult;
@@ -1782,7 +1792,7 @@ namespace CalamityMod.CalPlayer
}
// Blunder Booster effects
if (modPlayer.blunderBoosterDash > 0)
if (modPlayer.blunderBoosterDash > 0 && player.whoAmI == Main.myPlayer)
{
int velocityMult = modPlayer.blunderBoosterDash > 1 ? 35 : 5;
player.velocity = new Vector2(modPlayer.blunderBoosterDirection, -1) * velocityMult;
@@ -1807,7 +1817,7 @@ namespace CalamityMod.CalPlayer
}
// Gravistar Sabaton effects
if (modPlayer.gSabaton)
if (modPlayer.gSabaton && player.whoAmI == Main.myPlayer)
{
if (modPlayer.gSabatonCooldown <= 0 && !player.mount.Active)
{
@@ -2133,7 +2143,7 @@ namespace CalamityMod.CalPlayer
modPlayer.chiBuffTimer = 0;
}
if (Math.Abs(player.velocity.X) < 0.1f && Math.Abs(player.velocity.Y) < 0.1f && !player.mount.Active)
if (player.StandingStill(0.1f) && !player.mount.Active)
{
if (modPlayer.chiBuffTimer < 120)
modPlayer.chiBuffTimer++;
@@ -2155,7 +2165,7 @@ namespace CalamityMod.CalPlayer
if (modPlayer.aquaticBoost > 0f)
{
modPlayer.aquaticBoost -= 0.0002f; // 0.015
if ((double)modPlayer.aquaticBoost <= 0.0)
if (modPlayer.aquaticBoost <= 0f)
{
modPlayer.aquaticBoost = 0f;
if (Main.netMode == NetmodeID.MultiplayerClient)
@@ -2184,7 +2194,7 @@ namespace CalamityMod.CalPlayer
if (player.itemAnimation > 0)
modPlayer.modStealthTimer = 5;
if (Math.Abs(player.velocity.X) < 0.1f && Math.Abs(player.velocity.Y) < 0.1f && !player.mount.Active)
if (player.StandingStill(0.1f) && !player.mount.Active)
{
if (modPlayer.modStealthTimer == 0 && modPlayer.modStealth > 0f)
{
@@ -2199,8 +2209,8 @@ namespace CalamityMod.CalPlayer
}
else
{
float num27 = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y);
modPlayer.modStealth += num27 * 0.0075f;
float playerVel = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y);
modPlayer.modStealth += playerVel * 0.0075f;
if (modPlayer.modStealth > 1f)
modPlayer.modStealth = 1f;
if (player.mount.Active)
@@ -2223,12 +2233,12 @@ namespace CalamityMod.CalPlayer
if (player.itemAnimation > 0)
modPlayer.modStealthTimer = 5;
if (Math.Abs(player.velocity.X) < 0.1f && Math.Abs(player.velocity.Y) < 0.1f && !player.mount.Active)
if (player.StandingStill(0.1f) && !player.mount.Active)
{
if (modPlayer.modStealthTimer == 0 && modPlayer.modStealth > 0f)
{
modPlayer.modStealth -= 0.015f;
if ((double)modPlayer.modStealth <= 0.0)
if (modPlayer.modStealth <= 0f)
{
modPlayer.modStealth = 0f;
if (Main.netMode == NetmodeID.MultiplayerClient)
@@ -2238,8 +2248,8 @@ namespace CalamityMod.CalPlayer
}
else
{
float num27 = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y);
modPlayer.modStealth += num27 * 0.0075f;
float playerVel = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y);
modPlayer.modStealth += playerVel * 0.0075f;
if (modPlayer.modStealth > 1f)
modPlayer.modStealth = 1f;
if (player.mount.Active)
@@ -2262,7 +2272,7 @@ namespace CalamityMod.CalPlayer
{
if (modPlayer.elysianAegis)
{
bool flag14 = false;
bool spawnDust = false;
// Activate buff
if (modPlayer.elysianGuard)
@@ -2270,14 +2280,14 @@ namespace CalamityMod.CalPlayer
if (player.whoAmI == Main.myPlayer)
player.AddBuff(ModContent.BuffType<ElysianGuard>(), 2, false);
float num29 = modPlayer.shieldInvinc;
float shieldBoostInitial = modPlayer.shieldInvinc;
modPlayer.shieldInvinc -= 0.08f;
if (modPlayer.shieldInvinc < 0f)
modPlayer.shieldInvinc = 0f;
else
flag14 = true;
spawnDust = true;
if (modPlayer.shieldInvinc == 0f && num29 != modPlayer.shieldInvinc && Main.netMode == NetmodeID.MultiplayerClient)
if (modPlayer.shieldInvinc == 0f && shieldBoostInitial != modPlayer.shieldInvinc && Main.netMode == NetmodeID.MultiplayerClient)
NetMessage.SendData(MessageID.PlayerStealth, -1, -1, null, player.whoAmI, 0f, 0f, 0f, 0, 0, 0);
float damageBoost = (5f - modPlayer.shieldInvinc) * 0.03f;
@@ -2297,38 +2307,38 @@ namespace CalamityMod.CalPlayer
// Remove buff
else
{
float num30 = modPlayer.shieldInvinc;
float shieldBoostInitial = modPlayer.shieldInvinc;
modPlayer.shieldInvinc += 0.08f;
if (modPlayer.shieldInvinc > 5f)
modPlayer.shieldInvinc = 5f;
else
flag14 = true;
spawnDust = true;
if (modPlayer.shieldInvinc == 5f && num30 != modPlayer.shieldInvinc && Main.netMode == NetmodeID.MultiplayerClient)
if (modPlayer.shieldInvinc == 5f && shieldBoostInitial != modPlayer.shieldInvinc && Main.netMode == NetmodeID.MultiplayerClient)
NetMessage.SendData(MessageID.PlayerStealth, -1, -1, null, player.whoAmI, 0f, 0f, 0f, 0, 0, 0);
}
// Emit dust
if (flag14)
if (spawnDust)
{
if (Main.rand.NextBool(2))
{
Vector2 vector = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
Vector2 vector = Vector2.UnitY.RotatedByRandom(Math.PI * 2D);
Dust dust = Main.dust[Dust.NewDust(player.Center - vector * 30f, 0, 0, (int)CalamityDusts.ProfanedFire, 0f, 0f, 0, default, 1f)];
dust.noGravity = true;
dust.position = player.Center - vector * (float)Main.rand.Next(5, 11);
dust.velocity = vector.RotatedBy(1.5707963705062866, default) * 4f;
dust.velocity = vector.RotatedBy(Math.PI / 2D, default) * 4f;
dust.scale = 0.5f + Main.rand.NextFloat();
dust.fadeIn = 0.5f;
}
if (Main.rand.NextBool(2))
{
Vector2 vector2 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
Vector2 vector2 = Vector2.UnitY.RotatedByRandom(Math.PI * 2D);
Dust dust2 = Main.dust[Dust.NewDust(player.Center - vector2 * 30f, 0, 0, 246, 0f, 0f, 0, default, 1f)];
dust2.noGravity = true;
dust2.position = player.Center - vector2 * 12f;
dust2.velocity = vector2.RotatedBy(-1.5707963705062866, default) * 2f;
dust2.velocity = vector2.RotatedBy(-Math.PI / 2D, default) * 2f;
dust2.scale = 0.5f + Main.rand.NextFloat();
dust2.fadeIn = 0.5f;
}
@@ -2516,6 +2526,15 @@ namespace CalamityMod.CalPlayer
player.magicQuiver = true;
}
if (modPlayer.bloodPactBoost)
{
player.allDamage += 0.05f;
player.statDefense += 20;
player.endurance += 0.1f;
player.longInvince = true;
player.crimsonRegen = true;
}
if (modPlayer.fabsolVodka)
{
player.allDamage += 0.08f;
@@ -2676,6 +2695,11 @@ namespace CalamityMod.CalPlayer
if (player.ActiveItem().type != ModContent.ItemType<BrimlashBuster>() && player.ActiveItem().type != ModContent.ItemType<EvilSmasher>())
modPlayer.brimlashBusterBoost = false;
}
if (modPlayer.animusBoost > 1f)
{
if (player.ActiveItem().type != ModContent.ItemType<Animus>())
modPlayer.animusBoost = 1f;
}
if (modPlayer.etherealExtorter)
{
@@ -2701,7 +2725,7 @@ namespace CalamityMod.CalPlayer
if (modPlayer.ZoneAstral)
{
if (player.wingTimeMax > 0)
player.wingTimeMax = (int)((double)player.wingTimeMax * 1.05);
player.wingTimeMax = (int)(player.wingTimeMax * 1.05);
}
if (player.ZoneJungle && CalamityMod.natureWeaponList.Contains(player.ActiveItem().type))
@@ -3085,35 +3109,10 @@ namespace CalamityMod.CalPlayer
{
player.panic = true;
player.pStone = true;
player.armorPenetration += 10;
player.armorPenetration += modPlayer.rampartOfDeities ? 20 : 10;
}
if (modPlayer.rampartOfDeities)
{
player.armorPenetration += 10;
player.noKnockback = true;
if (player.statLife > (int)(player.statLifeMax2 * 0.25))
{
player.hasPaladinShield = true;
if (player.whoAmI != Main.myPlayer && player.miscCounter % 10 == 0)
{
int myPlayer = Main.myPlayer;
if (Main.player[myPlayer].team == player.team && player.team != 0)
{
Vector2 otherPlayerPos = player.position - Main.player[myPlayer].position;
if (otherPlayerPos.Length() < 800f)
Main.player[myPlayer].AddBuff(BuffID.PaladinsShield, 20, true);
}
}
}
if (player.statLife <= (int)(player.statLifeMax2 * 0.5))
player.AddBuff(BuffID.IceBarrier, 5, true);
if (player.statLife <= (int)(player.statLifeMax2 * 0.15))
player.endurance += 0.05f;
}
else if (modPlayer.fBulwark)
if (modPlayer.fBulwark)
{
player.noKnockback = true;
if (player.statLife > (int)(player.statLifeMax2 * 0.25))
@@ -3208,7 +3207,8 @@ namespace CalamityMod.CalPlayer
if (modPlayer.reaperToothNecklace)
{
player.allDamage += 0.25f;
player.statDefense /= 2;
if (player.statDefense > 0)
player.statDefense /= 2;
}
if (modPlayer.deepDiver)
@@ -3270,12 +3270,12 @@ namespace CalamityMod.CalPlayer
for (int i = 0; i < Main.maxNPCs; ++i)
{
NPC nPC = Main.npc[i];
if (!nPC.active || nPC.friendly || nPC.damage <= 0 || nPC.dontTakeDamage)
NPC npc = Main.npc[i];
if (!npc.active || npc.friendly || npc.damage <= 0 || npc.dontTakeDamage)
continue;
if (Vector2.Distance(player.Center, nPC.Center) <= range)
Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, player.whoAmI, i);
if (Vector2.Distance(player.Center, npc.Center) <= range)
Projectile.NewProjectileDirect(npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, player.whoAmI, i);
}
}
}
@@ -3297,23 +3297,23 @@ namespace CalamityMod.CalPlayer
for (int i = 0; i < Main.maxNPCs; ++i)
{
NPC nPC = Main.npc[i];
if (!nPC.active || nPC.friendly || nPC.damage <= 0 || nPC.dontTakeDamage)
NPC npc = Main.npc[i];
if (!npc.active || npc.friendly || npc.damage <= 0 || npc.dontTakeDamage)
continue;
if (Vector2.Distance(player.Center, nPC.Center) <= range)
Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, player.whoAmI, i);
if (Vector2.Distance(player.Center, npc.Center) <= range)
Projectile.NewProjectileDirect(npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, player.whoAmI, i);
// Occasionally spawn cute sparks so it looks like an electrical aura
if (Main.rand.NextBool(10))
{
Vector2 value15 = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51));
while (value15.X == 0f && value15.Y == 0f)
value15 = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51));
Vector2 velocity = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51));
while (velocity.X == 0f && velocity.Y == 0f)
velocity = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51));
value15.Normalize();
value15 *= (float)Main.rand.Next(30, 61) * 0.1f;
int spark = Projectile.NewProjectile(nPC.Center.X, nPC.Center.Y, value15.X, value15.Y, ModContent.ProjectileType<EutrophicSpark>(), damage / 2, 0f, player.whoAmI, 0f, 0f);
velocity.Normalize();
velocity *= (float)Main.rand.Next(30, 61) * 0.1f;
int spark = Projectile.NewProjectile(npc.Center, velocity, ModContent.ProjectileType<EutrophicSpark>(), damage / 2, 0f, player.whoAmI, 0f, 0f);
Main.projectile[spark].Calamity().forceTypeless = true;
Main.projectile[spark].localNPCHitCooldown = -2;
Main.projectile[spark].penetrate = 5;
@@ -3340,15 +3340,15 @@ namespace CalamityMod.CalPlayer
for (int i = 0; i < Main.maxNPCs; ++i)
{
NPC nPC = Main.npc[i];
if (!nPC.active || nPC.friendly || nPC.damage <= 0 || nPC.dontTakeDamage)
NPC npc = Main.npc[i];
if (!npc.active || npc.friendly || npc.damage <= 0 || npc.dontTakeDamage)
continue;
if (Vector2.Distance(player.Center, nPC.Center) <= range)
if (Vector2.Distance(player.Center, npc.Center) <= range)
{
nPC.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
npc.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
if (modPlayer.brimLoreInfernoTimer == 0)
Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, player.whoAmI, i);
Projectile.NewProjectileDirect(npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, player.whoAmI, i);
}
}
}
@@ -3427,7 +3427,7 @@ namespace CalamityMod.CalPlayer
player.AddBuff(ModContent.BuffType<YharonKindleBuff>(), 3600, true);
if (player.ownedProjectileCounts[ModContent.ProjectileType<SonOfYharon>()] < 2)
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<SonOfYharon>(), (int)(232f * player.MinionDamage()), 2f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<SonOfYharon>(), (int)(232f * player.MinionDamage()), 2f, Main.myPlayer, 0f, 0f);
}
}
@@ -3439,6 +3439,8 @@ namespace CalamityMod.CalPlayer
player.AddBuff(ModContent.BuffType<ProfanedBabs>(), 3600, true);
bool crystal = modPlayer.profanedCrystal && !modPlayer.profanedCrystalForce;
bool summonSet = modPlayer.tarraSummon || modPlayer.bloodflareSummon || modPlayer.godSlayerSummon || modPlayer.silvaSummon || modPlayer.dsSetBonus || modPlayer.omegaBlueSet || modPlayer.fearmongerSet;
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] < 1)
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -6f, ModContent.ProjectileType<MiniGuardianHealer>(), 0, 0f, Main.myPlayer, 0f, 0f);
@@ -3450,7 +3452,7 @@ namespace CalamityMod.CalPlayer
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -3f, ModContent.ProjectileType<MiniGuardianDefense>(), 1, 1f, Main.myPlayer, 0f, 0f);
}
if (crystal || (modPlayer.tarraSummon || modPlayer.bloodflareSummon || modPlayer.godSlayerSummon || modPlayer.silvaSummon || modPlayer.dsSetBonus || modPlayer.omegaBlueSet || modPlayer.fearmongerSet))
if (crystal || summonSet)
{
player.Calamity().gOffense = true;
@@ -3500,10 +3502,10 @@ namespace CalamityMod.CalPlayer
bool special = player.name == "Amber" || player.name == "Nincity" || player.name == "IbanPlay" || player.name == "Chen"; //People who either helped create the item or test it.
for (int i = 0; i < 3; i++)
{
int num469 = Dust.NewDust(player.position, player.width, player.height, special ? 231 : (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, special ? Color.DarkRed : default, 1f);
Main.dust[num469].scale = special ? 1.169f : 2f;
Main.dust[num469].noGravity = true;
Main.dust[num469].velocity *= special ? 10f : 6.9f;
int fire = Dust.NewDust(player.position, player.width, player.height, special ? 231 : (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, special ? Color.DarkRed : default, 1f);
Main.dust[fire].scale = special ? 1.169f : 2f;
Main.dust[fire].noGravity = true;
Main.dust[fire].velocity *= special ? 10f : 6.9f;
}
}
}
@@ -3527,8 +3529,7 @@ namespace CalamityMod.CalPlayer
int damage = (int)(30 * player.MinionDamage());
for (int index = 0; index < beeCount; ++index)
{
int bee = Projectile.NewProjectile(player.Center.X, player.Center.Y, Main.rand.NextFloat(-35f, 35f) * 0.02f, Main.rand.NextFloat(-35f, 35f) * 0.02f, (Main.rand.NextBool(4) ? ModContent.ProjectileType<PlaguenadeBee>() : player.beeType()), damage, player.beeKB(0f), player.whoAmI, 0f, 0f);
Main.projectile[bee].Calamity().forceMinion = true;
int bee = Projectile.NewProjectile(player.Center.X, player.Center.Y, Main.rand.NextFloat(-35f, 35f) * 0.02f, Main.rand.NextFloat(-35f, 35f) * 0.02f, (Main.rand.NextBool(4) ? ModContent.ProjectileType<PlagueBeeSmall>() : player.beeType()), damage, player.beeKB(0f), player.whoAmI, 0f, 0f);
Main.projectile[bee].usesLocalNPCImmunity = true;
Main.projectile[bee].localNPCHitCooldown = 10;
Main.projectile[bee].penetrate = 2;
@@ -3573,7 +3574,7 @@ namespace CalamityMod.CalPlayer
if (player.whoAmI == Main.myPlayer)
{
if (player.ownedProjectileCounts[ModContent.ProjectileType<BlunderBoosterAura>()] < 1)
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<BlunderBoosterAura>(), (int)(30 * player.RogueDamage()), 0f, player.whoAmI, 0f, 0f);
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<BlunderBoosterAura>(), (int)(30 * player.RogueDamage()), 0f, player.whoAmI, 0f, 0f);
}
}
else if (player.ownedProjectileCounts[ModContent.ProjectileType<BlunderBoosterAura>()] != 0)
@@ -3606,7 +3607,7 @@ namespace CalamityMod.CalPlayer
}
//Summon the aura
if (player.ownedProjectileCounts[ModContent.ProjectileType<TeslaAura>()] < 1)
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<TeslaAura>(), (int)(10 * player.AverageDamage()), 0f, player.whoAmI, 0f, 0f);
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<TeslaAura>(), (int)(10 * player.AverageDamage()), 0f, player.whoAmI, 0f, 0f);
}
}
else if (player.ownedProjectileCounts[ModContent.ProjectileType<TeslaAura>()] != 0)
@@ -3668,10 +3669,10 @@ namespace CalamityMod.CalPlayer
velocity.Y *= travelDist;
velocity.X += Main.rand.Next(-50, 51) * 0.02f;
velocity.Y += Main.rand.Next(-50, 51) * 0.02f;
int laser = Projectile.NewProjectile(startPos, velocity, ModContent.ProjectileType<MagicNebulaShot>(), dmg, 4f, player.whoAmI, 0f, Main.rand.Next(10));
int laser = Projectile.NewProjectile(startPos, velocity, ModContent.ProjectileType<MagicNebulaShot>(), dmg, 4f, player.whoAmI, 0f, 0f);
Main.projectile[laser].localNPCHitCooldown = 5;
}
Main.PlaySound(SoundID.Item12, player.position);
Main.PlaySound(SoundID.Item12, player.Center);
}
if (modPlayer.prismaticLasers == 1800)
{
@@ -3699,13 +3700,13 @@ namespace CalamityMod.CalPlayer
new Color(255, 0, 255, 50), //Fuschia
new Color(255, 0, 128, 50) //Hot Pink
});
Vector2 vector6 = Vector2.Normalize(player.velocity) * new Vector2(player.width / 2f, player.height) * 0.75f;
vector6 = vector6.RotatedBy((dustIndex - (dustAmt / 2 - 1)) * MathHelper.TwoPi / dustAmt, default) + player.Center;
Vector2 vector7 = vector6 - player.Center;
int dusty = Dust.NewDust(vector6 + vector7, 0, 0, 267, vector7.X * 1f, vector7.Y * 1f, 100, color, 1f);
Vector2 source = Vector2.Normalize(player.velocity) * new Vector2(player.width / 2f, player.height) * 0.75f;
source = source.RotatedBy((dustIndex - (dustAmt / 2 - 1)) * MathHelper.TwoPi / dustAmt, default) + player.Center;
Vector2 dustVel = source - player.Center;
int dusty = Dust.NewDust(source + dustVel, 0, 0, 267, dustVel.X * 1f, dustVel.Y * 1f, 100, color, 1f);
Main.dust[dusty].noGravity = true;
Main.dust[dusty].noLight = true;
Main.dust[dusty].velocity = vector7;
Main.dust[dusty].velocity = dustVel;
}
}
+8 -6
View File
@@ -2128,7 +2128,7 @@ namespace CalamityMod
ModContent.ProjectileType<ScourgeoftheCosmosProj>(),
ModContent.ProjectileType<SpearofDestinyProjectile>(),
ModContent.ProjectileType<SpearofPaleolithProj>(),
ModContent.ProjectileType<XerocPitchforkProjectile>(),
ModContent.ProjectileType<AntumbraShardProjectile>(),
ModContent.ProjectileType<TurbulanceProjectile>(),
ModContent.ProjectileType<NightsGazeProjectile>()
};
@@ -3391,6 +3391,13 @@ namespace CalamityMod
StealthUI.Draw(Main.spriteBatch, Main.LocalPlayer);
return true;
}, InterfaceScaleType.None));
// Popup GUIs.
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Popup GUIs", () =>
{
PopupGUIManager.UpdateAndDraw(Main.spriteBatch);
return true;
}, InterfaceScaleType.None));
}
// Invasion UI (used for Acid Rain)
@@ -3406,11 +3413,6 @@ namespace CalamityMod
return true;
}, InterfaceScaleType.None));
}
layers.Add(new LegacyGameInterfaceLayer("Popup GUIs", () =>
{
PopupGUIManager.UpdateAndDraw(Main.spriteBatch);
return true;
}, InterfaceScaleType.None));
}
public static Color GetNPCColor(NPC npc, Vector2? position = null, bool effects = true, float shadowOverride = 0f)
Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B

+2 -20
View File
@@ -38,26 +38,8 @@ namespace CalamityMod.Items.Accessories
{
if (player.whoAmI == Main.myPlayer)
{
for (int l = 0; l < 1; l++)
{
float x = player.position.X + (float)Main.rand.Next(-400, 400);
float y = player.position.Y - (float)Main.rand.Next(500, 800);
Vector2 vector = new Vector2(x, y);
float num15 = player.position.X + (float)(player.width / 2) - vector.X;
float num16 = player.position.Y + (float)(player.height / 2) - vector.Y;
num15 += (float)Main.rand.Next(-100, 101);
int num17 = 22;
float num18 = (float)Math.Sqrt((double)(num15 * num15 + num16 * num16));
num18 = (float)num17 / num18;
num15 *= num18;
num16 *= num18;
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<AuraRain>(), (int)(60 * player.AverageDamage()), 2f, player.whoAmI, 0f, 0f);
Main.projectile[num19].ai[1] = player.position.Y;
Main.projectile[num19].tileCollide = false;
Main.projectile[num19].usesLocalNPCImmunity = true;
Main.projectile[num19].localNPCHitCooldown = 10;
Main.projectile[num19].Calamity().forceTypeless = true;
}
Projectile rain = CalamityUtils.ProjectileRain(player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<AuraRain>(), (int)(60 * player.AverageDamage()), 2f, player.whoAmI, 6, 1);
rain.tileCollide = false;
}
}
}
+18 -3
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -16,8 +18,7 @@ namespace CalamityMod.Items.Accessories
"5% increased damage reduction and increased life regen\n" +
"Poison, Freeze, Chill, Frostburn, and Venom immunity\n" +
"Honey-like life regen with no speed penalty\n" +
"Most bee/hornet enemies and projectiles do 75% damage to you\n" +
"Provides cold protection in Death Mode");
"Most bee/hornet enemies and projectiles do 75% damage to you");
}
public override void SetDefaults()
@@ -30,12 +31,26 @@ 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 = "Most bee/hornet enemies and projectiles do 75% damage to you\n" +
"Provides cold protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.beeResist = true;
modPlayer.aAmpoule = true;
}
public override void AddRecipes()
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -17,8 +19,7 @@ namespace CalamityMod.Items.Accessories
"Increased flight time\n" +
"Greater mobility on ice\n" +
"Water and lava walking\n" +
"Temporary immunity to lava\n" +
"Provides heat protection in Death Mode");
"Temporary immunity to lava");
}
public override void SetDefaults()
@@ -30,6 +31,21 @@ 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();
+18 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.CalPlayer;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.DataStructures;
using Terraria.ModLoader;
@@ -15,8 +17,7 @@ namespace CalamityMod.Items.Accessories
"Being hit creates a miniature sun that lingers, dealing damage to nearby enemies\n" +
"The sun will slowly drag enemies into it\n" +
"Only one sun can be active at once\n" +
"Provides a moderate amount of light in the Abyss\n" +
"Provides heat and cold protection in Death Mode");
"Provides a moderate amount of light in the Abyss");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 6));
}
@@ -30,6 +31,21 @@ 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();
+3 -1
View File
@@ -10,7 +10,9 @@ namespace CalamityMod.Items.Accessories
{
DisplayName.SetDefault("Blood Pact");
Tooltip.SetDefault("Doubles your max HP\n" +
"Allows you to be critically hit 25% of the time");
"Allows you to be critically hit 25% of the time\n" +
"After a critical hit, you gain various buffs for ten seconds\n" +
"Any healing potions consumed during this time period heal 50 percent more health");
}
public override void SetDefaults()
+1 -12
View File
@@ -41,18 +41,7 @@ namespace CalamityMod.Items.Accessories
{
if (Main.rand.NextBool(10))
{
float x = player.position.X + (float)Main.rand.Next(-400, 400);
float y = player.position.Y - (float)Main.rand.Next(500, 800);
Vector2 source = new Vector2(x, y);
Vector2 velocity = player.Center - source;
velocity.X += (float)Main.rand.Next(-100, 101);
float speed = 22f;
float targetDist = velocity.Length();
targetDist = speed / targetDist;
velocity.X *= targetDist;
velocity.Y *= targetDist;
int fire = Projectile.NewProjectile(source, velocity, ModContent.ProjectileType<StandingFire>(), (int)(30 * player.AverageDamage()), 5f, player.whoAmI, 0f, 0f);
Main.projectile[fire].ai[1] = player.position.Y;
CalamityUtils.ProjectileRain(player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<StandingFire>(), (int)(30 * player.AverageDamage()), 5f, player.whoAmI);
}
}
}
+18 -2
View File
@@ -1,6 +1,8 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -18,8 +20,7 @@ namespace CalamityMod.Items.Accessories
"Increased invincibility after taking damage\n" +
"Temporary immunity to lava\n" +
"Increased melee knockback\n" +
"Melee attacks have a chance to instantly kill normal enemies\n" +
"Provides heat and cold protection in Death Mode");
"Melee attacks have a chance to instantly kill normal enemies");
}
public override void SetDefaults()
@@ -31,6 +32,21 @@ 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 == "Tooltip6")
{
line2.text = "Melee attacks have a chance to instantly kill normal enemies\n" +
"Provides heat and cold protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
+1 -1
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Accessories
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Evasion Scarf");
Tooltip.SetDefault("True melee strikes deal 30% more damage\n" +
Tooltip.SetDefault("True melee strikes deal 25% more damage\n" +
"Grants the ability to dash; dashing into an attack will cause you to dodge it\n" +
"After a dodge you will be granted a buff to all damage, melee speed, and all crit chance for a short time\n" +
"After a successful dodge you must wait 13 seconds before you can dodge again\n" +
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -15,8 +17,7 @@ namespace CalamityMod.Items.Accessories
"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()
@@ -29,6 +30,21 @@ 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();
+18 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.CalPlayer;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,8 +13,7 @@ namespace CalamityMod.Items.Accessories
{
DisplayName.SetDefault("Frost Barrier");
Tooltip.SetDefault("You will freeze enemies near you when you are struck\n" +
"You are immune to the chilled debuff\n" +
"Provides heat and cold protection in Death Mode");
"You are immune to the chilled debuff");
}
public override void SetDefaults()
@@ -25,6 +26,21 @@ 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();
+18 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.CalPlayer;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.DataStructures;
using Terraria.ModLoader;
@@ -15,8 +17,7 @@ namespace CalamityMod.Items.Accessories
"Resistant to cold attacks and +1 life regen\n" +
"Being above 75% life grants the player 10% increased damage\n" +
"Being below 25% life grants the player 10 defense and 15% increased max movement speed and acceleration\n" +
"Provides heat and cold protection in Death Mode\n" +
"Revengeance drop");
"Revengeance drop");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 4));
}
@@ -30,6 +31,21 @@ 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 = "Provides heat and cold protection in Death Mode\n" +
"Revengeance drop";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
+1 -1
View File
@@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.giantPearl = true;
Lighting.AddLight((int)(player.position.X + (float)(player.width / 2)) / 16, (int)(player.position.Y + (float)(player.height / 2)) / 16, 0.45f, 0.8f, 0.8f);
Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, 0.45f, 0.8f, 0.8f);
}
}
}
+18 -2
View File
@@ -1,3 +1,5 @@
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
@@ -12,8 +14,7 @@ namespace CalamityMod.Items.Accessories
Increases life regen as life decreases
Increases life regen when afflicted with Poison, On Fire, or Brimstone Flames
You will survive fatal damage and revive with 30% life on a 3 minute cooldown
You are encased in an ice barrier for 3 seconds when revived
Provides heat and cold protection in Death Mode");
You are encased in an ice barrier for 3 seconds when revived");
}
public override void SetDefaults()
@@ -25,6 +26,21 @@ Provides heat and cold protection in Death Mode");
item.rare = 5;
}
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;
+25 -4
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories
* bab spears being fired happens at the bottom of calplayer
* Animation of legs is postupdate, animation of wings is frameeffects.
* Projectiles transformed are ONLY affected by alldamage and summon damage bonuses, likewise the weapon's base damage/usetime is NOT taken into account.
* You enrage below below or at 50% hp.
* You enrage below or at 50% hp.
*/
public override void SetStaticDefaults()
{
@@ -39,9 +39,7 @@ 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]");
"This line is modified below");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(8, 4));
}
@@ -97,6 +95,29 @@ namespace CalamityMod.Items.Accessories
line.text = "[c/3a83e4:Transforms Magic attacks into a powerful splitting fireball for " + manaCost + " mana per cast]";
}
}
if (CalamityWorld.death)
{
foreach (TooltipLine line in tooltips)
{
if (line.mod == "Terraria" && line.Name == "Tooltip11")
{
line.text = "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]";
}
}
}
else
{
foreach (TooltipLine line in tooltips)
{
if (line.mod == "Terraria" && line.Name == "Tooltip11")
{
line.text = "Thinking back, it was a boring life\n" +
"[c/FFBF49:And so we burn it all in the name of purity]";
}
}
}
}
}
+19 -2
View File
@@ -1,6 +1,8 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
@@ -19,8 +21,7 @@ namespace CalamityMod.Items.Accessories
"Only active above 25% life\n" +
"Grants immunity to knockback and reduces the cooldown of healing potions\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()
@@ -33,11 +34,27 @@ 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 = "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();
modPlayer.dAmulet = true;
modPlayer.rampartOfDeities = true;
modPlayer.fBulwark = true;
modPlayer.jellyfishNecklace = true;
}
+2 -20
View File
@@ -33,26 +33,8 @@ namespace CalamityMod.Items.Accessories
{
if (player.whoAmI == Main.myPlayer)
{
for (int l = 0; l < 1; l++)
{
float x = player.position.X + (float)Main.rand.Next(-400, 400);
float y = player.position.Y - (float)Main.rand.Next(500, 800);
Vector2 vector = new Vector2(x, y);
float num15 = player.position.X + (float)(player.width / 2) - vector.X;
float num16 = player.position.Y + (float)(player.height / 2) - vector.Y;
num15 += (float)Main.rand.Next(-100, 101);
int num17 = 22;
float num18 = (float)Math.Sqrt((double)(num15 * num15 + num16 * num16));
num18 = (float)num17 / num18;
num15 *= num18;
num16 *= num18;
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<AuraRain>(), (int)(18 * player.AverageDamage()), 2f, player.whoAmI, 0f, 0f);
Main.projectile[num19].ai[1] = player.position.Y;
Main.projectile[num19].tileCollide = false;
Main.projectile[num19].usesLocalNPCImmunity = true;
Main.projectile[num19].localNPCHitCooldown = 10;
Main.projectile[num19].Calamity().forceTypeless = true;
}
Projectile rain = CalamityUtils.ProjectileRain(player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<AuraRain>(), (int)(18 * player.AverageDamage()), 2f, player.whoAmI, 6, 1);
rain.tileCollide = false;
}
}
}
+32
View File
@@ -0,0 +1,32 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class RoverDrive : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Rover Drive");
Tooltip.SetDefault("Activates a protective shield that grants 10 defense for 10 seconds\n" +
//Actually 10.1 seconds at full power with a dissipation across 0.1666 seconds but whatever
"The shield then dissipates and recharges for 20 seconds before being reactivated");
}
public override void SetDefaults()
{
item.width = 38;
item.height = 26;
item.value = CalamityGlobalItem.Rarity1BuyPrice;
item.rare = 1;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.roverDrive = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

+18 -2
View File
@@ -1,9 +1,11 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.DataStructures;
using Terraria.ModLoader;
@@ -30,8 +32,7 @@ namespace CalamityMod.Items.Accessories
"Enemies take damage when they hit you\n" +
"Taking a hit will make you move very fast for a short time\n" +
"You emit a mushroom spore and spark explosion when you are hit\n" +
"Enemy attacks will have part of their damage absorbed and used to heal you\n" +
"Provides cold protection in Death Mode");
"Enemy attacks will have part of their damage absorbed and used to heal you");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 30));
}
@@ -45,6 +46,21 @@ 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 == "Tooltip12")
{
line2.text = "Enemy attacks will have part of their damage absorbed and used to heal you\n" +
"Provides cold protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
+2
View File
@@ -55,6 +55,7 @@ namespace CalamityMod.Items.Accessories
recipe.AddIngredient(ModContent.ItemType<FungalCarapace>());
recipe.AddIngredient(ModContent.ItemType<GiantTortoiseShell>());
recipe.AddIngredient(ModContent.ItemType<AmidiasSpark>());
recipe.AddIngredient(ModContent.ItemType<RoverDrive>());
recipe.AddIngredient(ModContent.ItemType<DepthCells>(), 15);
recipe.AddIngredient(ModContent.ItemType<Lumenite>(), 15);
recipe.AddIngredient(ModContent.ItemType<Tenebris>(), 5);
@@ -68,6 +69,7 @@ namespace CalamityMod.Items.Accessories
recipe.AddIngredient(ModContent.ItemType<GiantShell>());
recipe.AddIngredient(ModContent.ItemType<GiantTortoiseShell>());
recipe.AddIngredient(ModContent.ItemType<AmidiasSpark>());
recipe.AddIngredient(ModContent.ItemType<RoverDrive>());
recipe.AddIngredient(ModContent.ItemType<DepthCells>(), 15);
recipe.AddIngredient(ModContent.ItemType<Lumenite>(), 15);
recipe.AddIngredient(ModContent.ItemType<Tenebris>(), 5);
+21 -21
View File
@@ -5,7 +5,9 @@ using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
@@ -35,8 +37,7 @@ namespace CalamityMod.Items.Accessories
"75% increased movement speed, 10% increase to all damage, and plus 40 defense while submerged in any liquid\n" +
"The above bonuses also apply when passing through the clump's poisonous seawater\n" +
"Temporary immunity to lava, greatly reduces lava burn damage, and 15% increased damage while in lava\n" +
"You have a damaging aura that envenoms nearby enemies and increased movement in liquids\n" +
"Provides heat protection in Death Mode");
"You have a damaging aura that envenoms nearby enemies and increased movement in liquids");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(9, 6));
}
@@ -50,6 +51,21 @@ 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 == "Tooltip8")
{
line2.text = "You have a damaging aura that envenoms nearby enemies and increased movement in liquids\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().fungalClump;
public override void UpdateAccessory(Player player, bool hideVisual)
@@ -115,26 +131,10 @@ namespace CalamityMod.Items.Accessories
{
if (player.whoAmI == Main.myPlayer)
{
float x = player.position.X + Main.rand.NextFloat(-400, 400);
float y = player.position.Y - Main.rand.NextFloat(500, 800);
Vector2 projOrigin = new Vector2(x, y);
float xDist = player.Center.X - projOrigin.X;
float yDist = player.Center.Y - projOrigin.Y;
xDist += Main.rand.NextFloat(-100, 100);
float speed = 22f;
Vector2 playerVector = new Vector2(xDist, yDist);
float playerDist = playerVector.Length();
playerDist = speed / playerDist;
playerVector.X *= playerDist;
playerVector.Y *= playerDist;
int type = Main.rand.NextBool(2) ? ProjectileType<AuraRain>() : ProjectileType<StandingFire>();
int rain = Projectile.NewProjectile(projOrigin, playerVector, type, (int)(ProjectileDamage * player.AverageDamage()), 1f, player.whoAmI, 0f, 0f);
Projectile proj = Main.projectile[rain];
proj.tileCollide = false;
proj.usesLocalNPCImmunity = true;
proj.localNPCHitCooldown = 10;
proj.usesIDStaticNPCImmunity = false;
proj.Calamity().forceTypeless = true;
Projectile rain = CalamityUtils.ProjectileRain(player.Center, 400f, 100f, 500f, 800f, 22f, type, (int)(ProjectileDamage * player.AverageDamage()), 5f, player.whoAmI, 6, 1);
if (type == ProjectileType<AuraRain>())
rain.tileCollide = false;
}
}
}
+20 -4
View File
@@ -1,7 +1,9 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -17,13 +19,12 @@ namespace CalamityMod.Items.Accessories
public override void SetStaticDefaults()
{
DisplayName.SetDefault("The Camper");
Tooltip.SetDefault("You deal no damage unless stationary\n" +
Tooltip.SetDefault("In rest may we find victory.\n" +
"You deal no damage unless stationary\n" +
"Standing still grants buff(s) dependent on what weapon you're holding\n" +
"Standing still provides a damaging aura around you\n" +
"While moving, you regenerate health as if standing still\n" +
"Provides a small amount of light in the Abyss\n" +
"Provides cold protection in Death Mode\n" +
"In rest may we find victory.");
"Provides a small amount of light in the Abyss");
}
public override void SetDefaults()
@@ -36,6 +37,21 @@ 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();
+18 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.CalPlayer;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
@@ -10,8 +12,7 @@ namespace CalamityMod.Items.Accessories.Vanity
{
DisplayName.SetDefault("Magic Scarf and Hat");
Tooltip.SetDefault("Don't let the demons steal your nose\n" +
"Transforms the holder into a snowman\n" +
"Provides heat and cold protection in Death Mode");
"Transforms the holder into a snowman");
}
public override void SetDefaults()
@@ -23,6 +24,21 @@ namespace CalamityMod.Items.Accessories.Vanity
item.rare = 5;
}
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();
+19 -17
View File
@@ -1,8 +1,10 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -22,8 +24,7 @@ namespace CalamityMod.Items.Accessories
"Drops brimstone fireballs from the sky occasionally\n" +
"15% increase to all damage\n" +
"Brimstone fire rains down while invincibility is active\n" +
"Temporary immunity to lava, greatly reduces lava burn damage, and 25% increased damage while in lava\n" +
"Provides heat protection in Death Mode");
"Temporary immunity to lava, greatly reduces lava burn damage, and 25% increased damage while in lava");
}
public override void SetDefaults()
@@ -36,6 +37,21 @@ 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()
@@ -69,21 +85,7 @@ namespace CalamityMod.Items.Accessories
{
if (player.whoAmI == Main.myPlayer)
{
float x = player.position.X + (float)Main.rand.Next(-400, 400);
float y = player.position.Y - (float)Main.rand.Next(500, 800);
Vector2 source = new Vector2(x, y);
Vector2 velocity = player.Center - source;
velocity.X += (float)Main.rand.Next(-100, 101);
float speed = 22f;
float targetDist = velocity.Length();
targetDist = speed / targetDist;
velocity.X *= targetDist;
velocity.Y *= targetDist;
int fire = Projectile.NewProjectile(source, velocity, ModContent.ProjectileType<StandingFire>(), (int)(30 * player.AverageDamage()), 5f, player.whoAmI, 0f, 0f);
Main.projectile[fire].ai[1] = player.position.Y;
Main.projectile[fire].usesLocalNPCImmunity = true;
Main.projectile[fire].localNPCHitCooldown = 60;
Main.projectile[fire].usesIDStaticNPCImmunity = false;
CalamityUtils.ProjectileRain(player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<StandingFire>(), (int)(30 * player.AverageDamage()), 5f, player.whoAmI, 0, 1, 60);
}
}
}
+18 -2
View File
@@ -1,7 +1,9 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ModLoader;
@@ -24,8 +26,7 @@ namespace CalamityMod.Items.Accessories.Wings
"Greater mobility on ice\n" +
"Water and lava walking\n" +
"Temporary immunity to lava\n" +
"Being hit for over 200 damage will make you immune for an extended period of time\n" +
"Provides heat protection in Death Mode");
"Being hit for over 200 damage will make you immune for an extended period of time");
}
public override void SetDefaults()
@@ -37,6 +38,21 @@ 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)
+2 -2
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories.Wings
"Acceleration multiplier: 1.5\n" +
"Average vertical speed\n" +
"Flight time: 180\n" +
"10% increased damage while wearing the Hydrothermic Armor");
"5% increased damage while wearing the Hydrothermic Armor");
}
public override void SetDefaults()
@@ -38,7 +38,7 @@ namespace CalamityMod.Items.Accessories.Wings
player.armor[0].type == ModContent.ItemType<AtaxiaMask>()) &&
player.armor[1].type == ModContent.ItemType<AtaxiaArmor>() && player.armor[2].type == ModContent.ItemType<AtaxiaSubligar>())
{
player.allDamage += 0.1f;
player.allDamage += 0.05f;
}
if (player.controlJump && player.wingTime > 0f && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
+18 -2
View File
@@ -1,6 +1,8 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ID;
@@ -23,8 +25,7 @@ namespace CalamityMod.Items.Accessories.Wings
"36% increased running acceleration\n" +
"Greater mobility on ice\n" +
"Water and lava walking\n" +
"Temporary immunity to lava\n" +
"Provides heat protection in Death Mode");
"Temporary immunity to lava");
}
public override void SetDefaults()
@@ -36,6 +37,21 @@ 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)
+18 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.CalPlayer;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
@@ -15,8 +17,7 @@ namespace CalamityMod.Items.Accessories.Wings
"Acceleration multiplier: 2.7\n" +
"Great vertical speed\n" +
"Flight time: 200\n" +
"Temporary immunity to lava and 40% increased movement speed\n" +
"Provides heat protection in Death Mode");
"Temporary immunity to lava and 40% increased movement speed");
}
public override void SetDefaults()
@@ -29,6 +30,21 @@ 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 40% increased movement speed\n" +
"Provides heat protection in Death Mode";
}
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
+18 -2
View File
@@ -1,6 +1,8 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ID;
@@ -23,8 +25,7 @@ namespace CalamityMod.Items.Accessories.Wings
"24% increased running acceleration\n" +
"Greater mobility on ice\n" +
"Water and lava walking\n" +
"Temporary immunity to lava\n" +
"Provides heat protection in Death Mode");
"Temporary immunity to lava");
}
public override void SetDefaults()
@@ -36,6 +37,21 @@ namespace CalamityMod.Items.Accessories.Wings
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 == "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)
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.DataStructures;
using Terraria.ModLoader;
@@ -20,8 +22,7 @@ namespace CalamityMod.Items.Accessories.Wings
"Flight time: 120\n" +
"7% increase to all damage\n" +
"All melee attacks and projectiles inflict frostburn\n" +
"Icicles rain down as you fly\n" +
"Provides heat and cold protection in Death Mode");
"Icicles rain down as you fly");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 3));
}
@@ -35,6 +36,21 @@ 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;
+7 -7
View File
@@ -41,19 +41,19 @@ namespace CalamityMod.Items.Accessories.Wings
if (player.controlJump && player.wingTime > 0f && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
{
int num59 = 4;
float xOffset = 4f;
if (player.direction == 1)
{
num59 = -40;
xOffset = -40f;
}
int num60 = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)num59, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, 242, 0f, 0f, 100, default, 2.4f);
Main.dust[num60].noGravity = true;
Main.dust[num60].velocity *= 0.3f;
int index = Dust.NewDust(new Vector2(player.Center.X + xOffset, player.Center.Y - 15f), 30, 30, 62, 0f, 0f, 100, default, 2.4f);
Main.dust[index].noGravity = true;
Main.dust[index].velocity *= 0.3f;
if (Main.rand.NextBool(10))
{
Main.dust[num60].fadeIn = 2f;
Main.dust[index].fadeIn = 2f;
}
Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player);
Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player);
}
player.wingTimeMax = 180;
player.noFallDmg = true;
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -17,8 +19,7 @@ namespace CalamityMod.Items.Accessories
"Melee attacks and melee projectiles inflict holy fire\n" +
"Increased invincibility after taking damage\n" +
"Temporary immunity to lava\n" +
"Increased melee knockback\n" +
"Provides heat protection in Death Mode");
"Increased melee knockback");
}
public override void SetDefaults()
@@ -30,6 +31,21 @@ 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();
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,8 +15,7 @@ namespace CalamityMod.Items.Armor
{
DisplayName.SetDefault("Hydrothermic Headgear");
Tooltip.SetDefault("12% increased ranged damage and 10% increased ranged critical strike chance\n" +
"Reduces ammo usage by 25%, temporary immunity to lava, and immunity to fire damage\n" +
"Provides heat protection in Death Mode");
"Reduces ammo usage by 25%, temporary immunity to lava, and immunity to fire damage");
}
public override void SetDefaults()
@@ -26,6 +27,21 @@ 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>();
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -15,8 +17,7 @@ namespace CalamityMod.Items.Armor
Tooltip.SetDefault("12% increased melee damage and 10% increased melee critical strike chance\n" +
"12% increased melee and movement speed\n" +
"Melee attacks and melee projectiles inflict on fire\n" +
"Temporary immunity to lava and immunity to fire damage\n" +
"Provides heat protection in Death Mode");
"Temporary immunity to lava and immunity to fire damage");
}
public override void SetDefaults()
@@ -28,6 +29,21 @@ namespace CalamityMod.Items.Armor
item.defense = 25; //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>();
+18 -2
View File
@@ -2,6 +2,8 @@ using CalamityMod.Buffs.Summon;
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -16,8 +18,7 @@ namespace CalamityMod.Items.Armor
DisplayName.SetDefault("Hydrothermic Helmet");
Tooltip.SetDefault("5% increased minion damage and increased minion knockback\n" +
"+2 max minions\n" +
"Temporary immunity to lava and immunity to fire damage\n" +
"Provides heat protection in Death Mode");
"Temporary immunity to lava and immunity to fire damage");
}
public override void SetDefaults()
@@ -29,6 +30,21 @@ 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>();
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -14,8 +16,7 @@ namespace CalamityMod.Items.Armor
DisplayName.SetDefault("Hydrothermic Hood");
Tooltip.SetDefault("12% increased rogue damage and 10% increased rogue critical strike chance\n" +
"50% chance to not consume rogue items and 15% increased movement speed\n" +
"Temporary immunity to lava and immunity to fire damage\n" +
"Provides heat protection in Death Mode");
"Temporary immunity to lava and immunity to fire damage");
}
public override void SetDefaults()
@@ -27,6 +28,21 @@ 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>();
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,8 +15,7 @@ namespace CalamityMod.Items.Armor
{
DisplayName.SetDefault("Hydrothermic Mask");
Tooltip.SetDefault("12% increased magic damage, reduces mana usage by 15%, and 10% increased magic critical strike chance\n" +
"+100 max mana, temporary immunity to lava, and immunity to fire damage\n" +
"Provides heat protection in Death Mode");
"+100 max mana, temporary immunity to lava, and immunity to fire damage");
}
public override void SetDefaults()
@@ -26,6 +27,21 @@ 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>();
+18 -2
View File
@@ -2,6 +2,8 @@ using CalamityMod.CalPlayer;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
@@ -17,8 +19,7 @@ namespace CalamityMod.Items.Armor
"25% increased movement speed\n" +
"Attacks have a 2% chance to do no damage to you\n" +
"8% increased damage and 5% increased critical strike chance\n" +
"You will freeze enemies near you when you are struck\n" +
"Provides heat and cold protection in Death Mode");
"You will freeze enemies near you when you are struck");
}
public override void SetDefaults()
@@ -30,6 +31,21 @@ 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 == "Tooltip4")
{
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();
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,8 +15,7 @@ namespace CalamityMod.Items.Armor
{
DisplayName.SetDefault("Bloodflare Imp Mask");
Tooltip.SetDefault("You can move freely through liquids and have temporary immunity to lava\n" +
"10% increased rogue damage and critical strike chance, 15% increased movement speed\n" +
"Provides heat protection in Death Mode");
"10% increased rogue damage and critical strike chance, 15% increased movement speed");
}
public override void SetDefaults()
@@ -26,6 +27,21 @@ 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>();
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,8 +15,7 @@ namespace CalamityMod.Items.Armor
{
DisplayName.SetDefault("Bloodflare Wyvern Helm");
Tooltip.SetDefault("You can move freely through liquids and have temporary immunity to lava\n" +
"+3 max minions\n" +
"Provides heat protection in Death Mode");
"+3 max minions");
}
public override void SetDefaults()
@@ -26,6 +27,21 @@ 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 = "+3 max minions\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>();
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,8 +15,7 @@ namespace CalamityMod.Items.Armor
{
DisplayName.SetDefault("Bloodflare Horned Helm");
Tooltip.SetDefault("You can move freely through liquids and have temporary immunity to lava\n" +
"10% increased ranged damage and critical strike chance\n" +
"Provides heat protection in Death Mode");
"10% increased ranged damage and critical strike chance");
}
public override void SetDefaults()
@@ -26,6 +27,21 @@ 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>();
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,8 +15,7 @@ namespace CalamityMod.Items.Armor
{
DisplayName.SetDefault("Bloodflare Hydra Hood");
Tooltip.SetDefault("You can move freely through liquids and have temporary immunity to lava\n" +
"10% increased magic damage and critical strike chance, +100 max mana, and 17% reduced mana usage\n" +
"Provides heat protection in Death Mode");
"10% increased magic damage and critical strike chance, +100 max mana, and 17% reduced mana usage");
}
public override void SetDefaults()
@@ -26,6 +27,21 @@ 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>();
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,8 +15,7 @@ namespace CalamityMod.Items.Armor
{
DisplayName.SetDefault("Bloodflare Ram Mask");
Tooltip.SetDefault("You can move freely through liquids and have temporary immunity to lava\n" +
"10% increased melee damage and critical strike chance\n" +
"Provides heat protection in Death Mode");
"10% increased melee damage and critical strike chance");
}
public override void SetDefaults()
@@ -26,6 +27,21 @@ 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>();
+14 -1
View File
@@ -2,6 +2,7 @@ using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.World;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -52,13 +53,25 @@ namespace CalamityMod.Items.Armor
public override void UpdateArmorSet(Player player)
{
player.setBonus = @"30% increased minion damage
if (CalamityWorld.death)
{
player.setBonus = @"30% increased minion damage
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 = @"30% increased minion damage
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;
+2 -3
View File
@@ -8,8 +8,8 @@ namespace CalamityMod.Items.Armor
[AutoloadEquip(EquipType.Head)]
public class ForbiddenCirclet : ModItem
{
public const int manaCost = 50;
public const int tornadoBaseDmg = 100;
public const int manaCost = 60;
public const int tornadoBaseDmg = 80;
public const float tornadoBaseKB = 1f;
public override void SetStaticDefaults()
@@ -48,7 +48,6 @@ namespace CalamityMod.Items.Armor
player.setBonus = "Press " + hotkey + " to call an ancient storm to the cursor location\n" +
"The ancient storm costs " + stormMana + " mana and benefits from both summon and rogue bonuses\n" +
"Rogue stealth strikes spawn homing eaters on enemy hits\n" +
"The minion damage nerf is reduced while wielding rogue weapons\n" +
"Rogue and summon attacks will scale off of the stat with a higher boost\n" +
"Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" +
"Once you have built max stealth, you will be able to perform a Stealth Strike\n" +
+1 -17
View File
@@ -82,23 +82,7 @@ namespace CalamityMod.Items.Armor
{
if (Main.rand.NextBool(10))
{
for (int l = 0; l < 1; l++)
{
float x = player.position.X + (float)Main.rand.Next(-400, 400);
float y = player.position.Y - (float)Main.rand.Next(500, 800);
Vector2 vector = new Vector2(x, y);
float num15 = player.position.X + (float)(player.width / 2) - vector.X;
float num16 = player.position.Y + (float)(player.height / 2) - vector.Y;
num15 += (float)Main.rand.Next(-100, 101);
int num17 = 22;
float num18 = (float)Math.Sqrt((double)(num15 * num15 + num16 * num16));
num18 = (float)num17 / num18;
num15 *= num18;
num16 *= num18;
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<TheSyringeCinder>(), (int)(40 * player.RangedDamage()),4f, player.whoAmI, 0f, 0f);
Main.projectile[num19].Calamity().rogue = false;
Main.projectile[num19].ai[1] = player.position.Y;
}
CalamityUtils.ProjectileRain(player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<TheSyringeCinder>(), (int)(40 * player.RangedDamage()), 4f, player.whoAmI, 6);
}
}
}
+1 -2
View File
@@ -48,8 +48,7 @@ namespace CalamityMod.Items.Armor
"Your max life will return to normal if you die\n" +
"True melee strikes have a 25% chance to do five times damage\n" +
"After the silva invincibility is over you will take 20% less contact damage\n" +
"Melee projectiles have a 25% chance to stun enemies for a very brief moment\n" +
"Provides cold protection in Death Mode";
"Melee projectiles have a 25% chance to stun enemies for a very brief moment";
}
public override void UpdateEquip(Player player)
+1 -2
View File
@@ -50,8 +50,7 @@ namespace CalamityMod.Items.Armor
"This effect only triggers once per life and if you are reduced to 400 max life the invincibility effect will stop\n" +
"Your max life will return to normal if you die\n" +
"Summons an ancient leaf prism to blast your enemies with life energy\n" +
"After the silva invulnerability time your minions will deal 10% more damage and you will gain +2 max minions\n" +
"Provides cold protection in Death Mode";
"After the silva invulnerability time your minions will deal 10% more damage and you will gain +2 max minions";
if (player.whoAmI == Main.myPlayer)
{
if (player.FindBuffIndex(ModContent.BuffType<SilvaSummonSetBuff>()) == -1)
+1 -2
View File
@@ -47,8 +47,7 @@ namespace CalamityMod.Items.Armor
"This effect only triggers once per life and if you are reduced to 400 max life the invincibility effect will stop\n" +
"Your max life will return to normal if you die\n" +
"Increases your rate of fire with all ranged weapons\n" +
"During the silva invulnerability time your ranged weapons will do 40% more damage\n" +
"Provides cold protection in Death Mode";
"During the silva invulnerability time your ranged weapons will do 40% more damage";
}
public override void UpdateEquip(Player player)
+1 -2
View File
@@ -53,8 +53,7 @@ namespace CalamityMod.Items.Armor
"Rogue stealth builds while not attacking and slower while moving, up to a max of 125\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\n" +
"Provides cold protection in Death Mode";
"The higher your rogue stealth the higher your rogue damage, crit, and movement speed";
}
public override void UpdateEquip(Player player)
+1 -2
View File
@@ -48,8 +48,7 @@ namespace CalamityMod.Items.Armor
"This effect only triggers once per life and if you are reduced to 400 max life the invincibility effect will stop\n" +
"Your max life will return to normal if you die\n" +
"Magic projectiles have a 10% chance to cause a massive explosion on enemy hits\n" +
"After the silva invulnerability time your magic weapons will do 10% more damage\n" +
"Provides cold protection in Death Mode";
"After the silva invulnerability time your magic weapons will do 10% more damage";
}
public override void UpdateEquip(Player player)
+3 -3
View File
@@ -11,9 +11,9 @@ namespace CalamityMod.Items.Armor
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Tarragon Breastplate");
Tooltip.SetDefault("10% increased damage and 5% increased critical strike chance\n" +
"+2 life regen and +40 max life\n" +
"Breastplate of the exiler");
Tooltip.SetDefault("Breastplate of the exiler\n" +
"10% increased damage and 5% increased critical strike chance\n" +
"+2 life regen and +40 max life");
}
public override void SetDefaults()
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -16,8 +18,7 @@ namespace CalamityMod.Items.Armor
"Temporary immunity to lava\n" +
"Can move freely through liquids\n" +
"5% increased damage reduction\n" +
"10% increased melee damage and critical strike chance\n" +
"Provides heat protection in Death Mode");
"10% increased melee damage and critical strike chance");
}
public override void SetDefaults()
@@ -29,6 +30,21 @@ 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>();
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -15,8 +17,7 @@ namespace CalamityMod.Items.Armor
Tooltip.SetDefault("Temporary immunity to lava\n" +
"Can move freely through liquids and 12% increased movement speed\n" +
"10% increased rogue damage and critical strike chance\n" +
"5% increased damage reduction\n" +
"Provides heat protection in Death Mode");
"5% increased damage reduction");
}
public override void SetDefaults()
@@ -28,6 +29,21 @@ 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>();
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -14,8 +16,7 @@ namespace CalamityMod.Items.Armor
DisplayName.SetDefault("Tarragon Horned Helm");
Tooltip.SetDefault("Temporary immunity to lava\n" +
"Can move freely through liquids\n" +
"5% increased damage reduction and +3 max minions\n" +
"Provides heat protection in Death Mode");
"5% increased damage reduction and +3 max minions");
}
public override void SetDefaults()
@@ -27,6 +28,21 @@ 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 and +3 max minions\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>();
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -15,8 +17,7 @@ namespace CalamityMod.Items.Armor
Tooltip.SetDefault("Temporary immunity to lava\n" +
"Can move freely through liquids\n" +
"10% increased magic damage and critical strike chance\n" +
"5% increased damage reduction, +100 max mana, and 15% reduced mana usage\n" +
"Provides heat protection in Death Mode");
"5% increased damage reduction, +100 max mana, and 15% reduced mana usage");
}
public override void SetDefaults()
@@ -28,6 +29,21 @@ 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>();
+18 -2
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -15,8 +17,7 @@ namespace CalamityMod.Items.Armor
Tooltip.SetDefault("Temporary immunity to lava\n" +
"Can move freely through liquids\n" +
"10% increased ranged damage and critical strike chance\n" +
"5% increased damage reduction\n" +
"Provides heat protection in Death Mode");
"5% increased damage reduction");
}
public override void SetDefaults()
@@ -28,6 +29,21 @@ 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>();
+2 -1
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Armor
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Titan Heart Boots");
Tooltip.SetDefault("10% increased rogue velocity and 5% boosted rogue knockback");
Tooltip.SetDefault("4% increased rogue damage, 10% increased rogue velocity, and 5% increased rogue knockback");
}
public override void SetDefaults()
@@ -28,6 +28,7 @@ namespace CalamityMod.Items.Armor
{
player.Calamity().titanHeartBoots = true;
player.Calamity().throwingVelocity += 0.1f;
player.Calamity().throwingDamage += 0.04f;
}
public override void AddRecipes()
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Armor
{
DisplayName.SetDefault("Titan Heart Mantle");
Tooltip.SetDefault("45% chance to not consume rogue items\n" +
"5% boosted rogue knockback but 20% lowered rogue shoot speed");
"5% boosted rogue knockback but 15% lowered rogue shoot speed");
}
public override void SetDefaults()
+2 -1
View File
@@ -13,7 +13,8 @@ namespace CalamityMod.Items.Armor
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Titan Heart Mask");
Tooltip.SetDefault("5% increased rogue damage and knockback");
Tooltip.SetDefault("5% increased rogue damage and knockback\n" +
"Rogue weapons spread the astral infection");
}
public override void SetDefaults()
+1
View File
@@ -32,6 +32,7 @@ namespace CalamityMod.Items.Armor
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<WulfrumShard>(), 12);
recipe.AddIngredient(ModContent.ItemType<EnergyCore>());
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
+1
View File
@@ -48,6 +48,7 @@ namespace CalamityMod.Items.Armor
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<WulfrumShard>(), 5);
recipe.AddIngredient(ModContent.ItemType<EnergyCore>());
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
+1
View File
@@ -48,6 +48,7 @@ namespace CalamityMod.Items.Armor
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<WulfrumShard>(), 5);
recipe.AddIngredient(ModContent.ItemType<EnergyCore>());
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
+1
View File
@@ -49,6 +49,7 @@ namespace CalamityMod.Items.Armor
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<WulfrumShard>(), 5);
recipe.AddIngredient(ModContent.ItemType<EnergyCore>());
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
+1
View File
@@ -48,6 +48,7 @@ namespace CalamityMod.Items.Armor
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<WulfrumShard>(), 5);
recipe.AddIngredient(ModContent.ItemType<EnergyCore>());
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
+1
View File
@@ -32,6 +32,7 @@ namespace CalamityMod.Items.Armor
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<WulfrumShard>(), 8);
recipe.AddIngredient(ModContent.ItemType<EnergyCore>());
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
+1
View File
@@ -56,6 +56,7 @@ namespace CalamityMod.Items.Armor
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<WulfrumShard>(), 5);
recipe.AddIngredient(ModContent.ItemType<EnergyCore>());
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
+3 -3
View File
@@ -11,9 +11,9 @@ namespace CalamityMod.Items.Armor
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Empyrean Cuisses");
Tooltip.SetDefault("5% increased rogue damage and critical strike chance\n" +
"20% increased movement speed\n" +
"Speed of the cosmos");
Tooltip.SetDefault("Speed of the cosmos\n" +
"5% increased rogue damage and critical strike chance\n" +
"20% increased movement speed");
}
public override void SetDefaults()
+20 -4
View File
@@ -1,5 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -12,10 +14,9 @@ namespace CalamityMod.Items.Armor
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Empyrean Mask");
Tooltip.SetDefault("11% increased rogue damage and critical strike chance, 22% increased movement speed\n" +
"Temporary immunity to lava\n" +
"Provides heat protection in Death Mode\n" +
"Wrath of the cosmos");
Tooltip.SetDefault("Wrath of the cosmos\n" +
"11% increased rogue damage and critical strike chance, 22% increased movement speed\n" +
"Temporary immunity to lava");
}
public override void SetDefaults()
@@ -27,6 +28,21 @@ 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>();
+3 -3
View File
@@ -11,10 +11,10 @@ namespace CalamityMod.Items.Armor
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Empyrean Cloak");
Tooltip.SetDefault("+20 max life\n" +
Tooltip.SetDefault("Armor of the cosmos\n" +
"+20 max life\n" +
"6% increased movement speed\n" +
"7% increased rogue damage and critical strike chance\n" +
"Armor of the cosmos");
"7% increased rogue damage and critical strike chance");
}
public override void SetDefaults()
+164 -70
View File
@@ -1355,14 +1355,27 @@ namespace CalamityMod.Items
}
if (item.type == ItemID.WarmthPotion)
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip0")
{
line2.text += "\nMakes you immune to the Chilled, Frozen, and Glacial State debuffs\n" +
"Provides cold protection in Death Mode";
}
}
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip0")
{
line2.text += "\nMakes you immune to the Chilled, Frozen, and Glacial State debuffs\n" +
"Provides cold protection in Death Mode";
}
}
}
else
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip0")
{
line2.text += "\nMakes you immune to the Chilled, Frozen, and Glacial State debuffs";
}
}
}
}
if (item.type == ItemID.FlaskofVenom)
{
@@ -1486,15 +1499,29 @@ namespace CalamityMod.Items
}
if (item.type == ItemID.FireGauntlet)
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "14% increased melee damage and speed\n" +
"10% increased true melee damage\n" +
"Provides heat and cold protection in Death Mode";
}
}
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "14% increased melee damage and speed\n" +
"10% increased true melee damage\n" +
"Provides heat and cold protection in Death Mode";
}
}
}
else
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "14% increased melee damage and speed\n" +
"10% increased true melee damage";
}
}
}
}
if (item.type == ItemID.SpectreHood)
{
@@ -1508,41 +1535,69 @@ namespace CalamityMod.Items
}
if (item.type == ItemID.ObsidianSkinPotion)
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip0")
{
line2.text = "Provides immunity to direct damage from touching lava\n" +
"Provides temporary immunity to lava burn damage\n" +
"Reduces lava burn damage\n" +
"Provides heat protection in Death Mode";
}
}
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip0")
{
line2.text = "Provides immunity to direct damage from touching lava\n" +
"Provides temporary immunity to lava burn damage\n" +
"Reduces lava burn damage\n" +
"Provides heat protection in Death Mode";
}
}
}
else
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip0")
{
line2.text = "Provides immunity to direct damage from touching lava\n" +
"Provides temporary immunity to lava burn damage\n" +
"Reduces lava burn damage";
}
}
}
}
if (item.type == ItemID.ObsidianRose)
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip0")
{
line2.text = "Reduced direct damage from touching lava\n" +
"Greatly reduces lava burn damage\n" +
"Provides heat protection in Death Mode";
}
}
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip0")
{
line2.text = "Reduced direct damage from touching lava\n" +
"Greatly reduces lava burn damage\n" +
"Provides heat protection in Death Mode";
}
}
}
else
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip0")
{
line2.text = "Reduced direct damage from touching lava\n" +
"Greatly reduces lava burn damage";
}
}
}
}
if (item.type == ItemID.MagmaStone)
if (item.type == ItemID.MagmaStone && CalamityWorld.death)
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip0")
{
line2.text = "Inflicts fire damage on attack\n" +
"Provides heat and cold protection in Death Mode";
line2.text += "\nProvides heat and cold protection in Death Mode";
}
}
}
if (item.type == ItemID.LavaCharm)
if (item.type == ItemID.LavaCharm && CalamityWorld.death)
{
foreach (TooltipLine line2 in tooltips)
{
@@ -1552,7 +1607,7 @@ namespace CalamityMod.Items
}
}
}
if (item.type == ItemID.LavaWaders)
if (item.type == ItemID.LavaWaders && CalamityWorld.death)
{
foreach (TooltipLine line2 in tooltips)
{
@@ -1825,27 +1880,44 @@ namespace CalamityMod.Items
}
if (item.type == ItemID.MoltenHelmet || item.type == ItemID.MoltenBreastplate || item.type == ItemID.MoltenGreaves)
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "SetBonus")
{
line2.text = @"Set Bonus: 17% extra melee damage
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "SetBonus")
{
line2.text = @"Set Bonus: 17% extra melee damage
20% extra true melee damage
Grants immunity to fire blocks, and temporary immunity to lava
Provides heat and cold protection in Death Mode";
}
}
}
}
else
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "SetBonus")
{
line2.text = @"Set Bonus: 17% extra melee damage
20% extra true melee damage
Grants immunity to fire blocks, and temporary immunity to lava";
}
}
}
}
if (item.type == ItemID.FrostHelmet || item.type == ItemID.FrostBreastplate || item.type == ItemID.FrostLeggings)
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "SetBonus")
{
line2.text = @"Set Bonus: Melee and ranged attacks cause frostburn
Provides heat and cold protection in Death Mode";
}
}
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in tooltips)
{
if (line2.mod == "Terraria" && line2.Name == "SetBonus")
{
line2.text += "\nProvides heat and cold protection in Death Mode";
}
}
}
}
if (item.type == ItemID.MagicQuiver)
{
@@ -2238,7 +2310,7 @@ Provides heat and cold protection in Death Mode";
"Acceleration multiplier: 0\n" +
"Average vertical speed\n" +
"Flight time: 160\n" +
"+5 defense, 5% increased damage, " +
"+5 defense, 5% increased damage,\n" +
"10% increased movement speed and 24% increased jump speed";
}
}
@@ -2990,14 +3062,27 @@ Provides heat and cold protection in Death Mode";
player.statDefense += 2;
player.fireWalk = true;
player.lavaMax += 180;
player.setBonus = "+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\n" +
"Provides heat protection in Death Mode";
if (CalamityWorld.death)
{
player.setBonus = "+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\n" +
"Provides heat protection in Death Mode";
}
else
{
player.setBonus = "+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";
}
}
else if (set == "Molten")
{
@@ -3009,10 +3094,19 @@ Provides heat and cold protection in Death Mode";
modPlayer.eskimoSet = true;
player.buffImmune[BuffID.Frostburn] = true;
player.buffImmune[ModContent.BuffType<GlacialState>()] = true;
player.setBonus = "All ice-themed weapons receive a 10% damage bonus\n" +
"Cold enemies will deal reduced contact damage to the player\n" +
"Provides immunity to the Frostburn and Glacial State debuffs\n" +
"Provides cold immunity in Death Mode";
if (CalamityWorld.death)
{
player.setBonus = "All ice-themed weapons receive a 10% damage bonus\n" +
"Cold enemies will deal reduced contact damage to the player\n" +
"Provides immunity to the Frostburn and Glacial State debuffs\n" +
"Provides cold immunity in Death Mode";
}
else
{
player.setBonus = "All ice-themed weapons receive a 10% damage bonus\n" +
"Cold enemies will deal reduced contact damage to the player\n" +
"Provides immunity to the Frostburn and Glacial State debuffs";
}
}
else if (set == "Meteor")
{
@@ -3487,7 +3581,7 @@ Provides heat and cold protection in Death Mode";
for (int i = 54; i < Main.maxInventory; i++)
{
if (player.inventory[i].ammo == item.useAmmo && player.inventory[i].stack >= ammoConsumed)
if (player.inventory[i].ammo == item.useAmmo && (player.inventory[i].stack >= ammoConsumed || !player.inventory[i].consumable))
{
itemAmmo = player.inventory[i];
flag = true;
@@ -3499,7 +3593,7 @@ Provides heat and cold protection in Death Mode";
{
for (int j = 0; j < 54; j++)
{
if (player.inventory[j].ammo == item.useAmmo && player.inventory[j].stack >= ammoConsumed)
if (player.inventory[j].ammo == item.useAmmo && (player.inventory[j].stack >= ammoConsumed || !player.inventory[j].consumable))
{
itemAmmo = player.inventory[j];
break;
@@ -40,6 +40,8 @@ The life regen boost is stronger if below 75% health");
public override void OnConsumeItem(Player player)
{
int healAmt = CalamityWorld.ironHeart ? 0 : 240;
if (player.Calamity().bloodPactBoost)
healAmt = (int)(healAmt * 1.5);
player.statLife += healAmt;
if (player.statLife > player.statLifeMax2)
{
@@ -66,7 +68,10 @@ The life regen boost is stronger if below 75% health");
// Forces the "Restores X life" tooltip to display the actual life restored instead of zero (due to the previous function).
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
tooltips.Find(line => line.Name == "HealLife").text = "Restores " + (CalamityWorld.ironHeart ? 0 : item.healLife) + " life";
float healMult = 1f;
if (Main.player[Main.myPlayer].Calamity().bloodPactBoost)
healMult = 1.5f;
tooltips.Find(line => line.Name == "HealLife").text = "Restores " + (CalamityWorld.ironHeart ? 0 : (int)(item.healLife * healMult)) + " life";
}
}
}
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
}
// Weapons
DropHelper.DropItemFromSetCondition(player, CalamityWorld.downedCLAM && Main.hardMode, 0.2f,
DropHelper.DropItemFromSetCondition(player, CalamityWorld.downedCLAMHardMode, 0.2f,
ModContent.ItemType<ShellfishStaff>(),
ModContent.ItemType<ClamCrusher>(),
ModContent.ItemType<Poseidon>(),
+1 -1
View File
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.LoreItems
modPlayer.slimeGodLoreProcessed = true;
if (player.dashDelay < 0)
if (player.dashDelay < 0 || (player.velocity.Length() >= 11f && CalamityPlayer.areThereAnyDamnBosses)) //If you go over 52.8 mph
player.velocity.X *= 0.9f;
player.slippy2 = true;
+22
View File
@@ -0,0 +1,22 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Items.Materials
{
public class EnergyCore : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Energy Core");
Tooltip.SetDefault("It pulses with energy");
}
public override void SetDefaults()
{
item.width = item.height = 22;
item.maxStack = 999;
item.value = Item.sellPrice(copper: 80);
item.rare = 1;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

+1
View File
@@ -8,6 +8,7 @@ namespace CalamityMod.Items.Materials
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Titan Heart");
Tooltip.SetDefault("Also used at the Astral Beacon");
}
public override void SetDefaults()
+40 -40
View File
@@ -10,39 +10,39 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Pets
{
public class RotomRemote : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Triboluminescent Etomer");
Tooltip.SetDefault("Summons an electric troublemaker\n" +
public class RotomRemote : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Triboluminescent Etomer");
Tooltip.SetDefault("Summons an electric troublemaker\n" +
"A little note is attached:\n" +
"Thank you, Aloe! Very much appreciated from Ben");
}
}
public override void SetDefaults()
{
item.damage = 0;
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = ItemUseStyleID.SwingThrow;
item.noMelee = true;
item.width = 30;
item.height = 34;
item.value = Item.buyPrice(0, 4, 0, 0);
item.UseSound = SoundID.Item113;
item.shoot = ModContent.ProjectileType<RotomPet>();
item.buffType = ModContent.BuffType<RotomBuff>();
item.rare = 3;
}
public override void SetDefaults()
{
item.damage = 0;
item.useTime = item.useAnimation = 20;
item.shoot = ModContent.ProjectileType<RotomPet>();
item.buffType = ModContent.BuffType<RotomBuff>();
public override void UseStyle(Player player)
{
if (player.whoAmI == Main.myPlayer && player.itemTime == 0)
{
player.AddBuff(item.buffType, 3600, true);
}
}
item.width = 30;
item.height = 34;
item.useStyle = ItemUseStyleID.SwingThrow;
item.noMelee = true;
item.UseSound = SoundID.Item113;
item.value = Item.buyPrice(0, 4, 0, 0);
item.rare = 3;
}
public override void UseStyle(Player player)
{
if (player.whoAmI == Main.myPlayer && player.itemTime == 0)
{
player.AddBuff(item.buffType, 3600, true);
}
}
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
@@ -51,15 +51,15 @@ namespace CalamityMod.Items.Pets
spriteBatch.Draw(texture, item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<PrismShard>(), 5);
recipe.AddRecipeGroup("AnyGoldBar", 8);
recipe.AddIngredient(ModContent.ItemType<DemonicBoneAsh>());
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<PrismShard>(), 5);
recipe.AddRecipeGroup("AnyGoldBar", 8);
recipe.AddIngredient(ModContent.ItemType<DemonicBoneAsh>());
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 385 B

@@ -0,0 +1,26 @@
using CalamityMod.Tiles;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Banners
{
public class WulfrumGyratorBanner : ModItem
{
public override void SetDefaults()
{
item.width = 10;
item.height = 24;
item.maxStack = 99;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = ItemUseStyleID.SwingThrow;
item.consumable = true;
item.rare = 1;
item.value = Item.buyPrice(0, 0, 10, 0);
item.createTile = ModContent.TileType<MonsterBanner>();
item.placeStyle = 123;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

@@ -0,0 +1,26 @@
using CalamityMod.Tiles;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Banners
{
public class WulfrumHovercraftBanner : ModItem
{
public override void SetDefaults()
{
item.width = 10;
item.height = 24;
item.maxStack = 99;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = ItemUseStyleID.SwingThrow;
item.consumable = true;
item.rare = 1;
item.value = Item.buyPrice(0, 0, 10, 0);
item.createTile = ModContent.TileType<MonsterBanner>();
item.placeStyle = 124;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

@@ -0,0 +1,26 @@
using CalamityMod.Tiles;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Banners
{
public class WulfrumPylonBanner : ModItem
{
public override void SetDefaults()
{
item.width = 10;
item.height = 24;
item.maxStack = 99;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = ItemUseStyleID.SwingThrow;
item.consumable = true;
item.rare = 1;
item.value = Item.buyPrice(0, 0, 10, 0);
item.createTile = ModContent.TileType<MonsterBanner>();
item.placeStyle = 126;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

@@ -0,0 +1,26 @@
using CalamityMod.Tiles;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Banners
{
public class WulfrumRoverBanner : ModItem
{
public override void SetDefaults()
{
item.width = 10;
item.height = 24;
item.maxStack = 99;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = ItemUseStyleID.SwingThrow;
item.consumable = true;
item.rare = 1;
item.value = Item.buyPrice(0, 0, 10, 0);
item.createTile = ModContent.TileType<MonsterBanner>();
item.placeStyle = 125;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

+6 -1
View File
@@ -42,6 +42,8 @@ Reduces defense by 2 and movement speed by 5%");
public override void OnConsumeItem(Player player)
{
int healAmt = CalamityWorld.ironHeart ? 0 : 100;
if (player.Calamity().bloodPactBoost)
healAmt = (int)(healAmt * 1.5);
player.statLife += healAmt;
player.statMana += 100;
if (player.statLife > player.statLifeMax2)
@@ -71,7 +73,10 @@ Reduces defense by 2 and movement speed by 5%");
// Forces the "Restores X life" tooltip to display the actual life restored instead of zero (due to the previous function).
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
tooltips.Find(line => line.Name == "HealLife").text = "Restores " + (CalamityWorld.ironHeart ? 0 : item.healLife) + " life";
float healMult = 1f;
if (Main.player[Main.myPlayer].Calamity().bloodPactBoost)
healMult = 1.5f;
tooltips.Find(line => line.Name == "HealLife").text = "Restores " + (CalamityWorld.ironHeart ? 0 : (int)(item.healLife * healMult)) + " life";
}
}
}
+6 -1
View File
@@ -45,6 +45,8 @@ Reduces defense by 6 and life regen by 1");
public override void OnConsumeItem(Player player)
{
int healAmt = CalamityWorld.ironHeart ? 0 : 200;
if (player.Calamity().bloodPactBoost)
healAmt = (int)(healAmt * 1.5);
player.statLife += healAmt;
player.statMana += 200;
if (player.statLife > player.statLifeMax2)
@@ -74,7 +76,10 @@ Reduces defense by 6 and life regen by 1");
// Forces the "Restores X life" tooltip to display the actual life restored instead of zero (due to the previous function).
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
tooltips.Find(line => line.Name == "HealLife").text = "Restores " + (CalamityWorld.ironHeart ? 0 : item.healLife) + " life";
float healMult = 1f;
if (Main.player[Main.myPlayer].Calamity().bloodPactBoost)
healMult = 1.5f;
tooltips.Find(line => line.Name == "HealLife").text = "Restores " + (CalamityWorld.ironHeart ? 0 : (int)(item.healLife * healMult)) + " life";
}
}
}
Loaded 100 of 486 files, more files were not shown because too many files have changed in this diff. Show more