This commit is contained in:
Andrew Marheine committed 2020-05-21 20:20:06 -05:00
commit 65e66ca776
474 files changed
+14136 -2065

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Cooldowns
{
public class EvasionScarfCooldown : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Evasion Scarf Cooldown");
Description.SetDefault("Your dodge is recharging");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
longerExpertDebuff = false;
canBeCleared = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().eScarfCooldown = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

+24
View File
@@ -0,0 +1,24 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Cooldowns
{
public class PrismaticCooldown : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Prismatic Cooldown");
Description.SetDefault("Your laser attack is recharging");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
longerExpertDebuff = false;
canBeCleared = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().prismaticCooldown = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 B

After

Width:  |  Height:  |  Size: 534 B

+17
View File
@@ -0,0 +1,17 @@
using CalamityMod.Items.Mounts;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Mounts
{
public class AndromedaBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Andromeda");
Description.SetDefault("You're controlling a piece of history");
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

+17
View File
@@ -0,0 +1,17 @@
using CalamityMod.Items.Mounts;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Mounts
{
public class AndromedaSmallBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Andromeda");
Description.SetDefault("You're controlling a small piece of history");
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

+23
View File
@@ -0,0 +1,23 @@
using CalamityMod.Items.Mounts;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Mounts
{
public class BumbledogeMount : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Bumbledoge");
Description.SetDefault("Wait a second. That's not right...");
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.mount.SetMount(ModContent.MountType<BUMBLEDOGE>(), player);
player.buffTime[buffIndex] = 10;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

+24
View File
@@ -0,0 +1,24 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class ShadowBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Shadow");
Description.SetDefault("You're invisible, certain rogue weapons give and gain buffs, and stealth generation is boosted.");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
longerExpertDebuff = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.invis = true;
player.Calamity().shadow = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

+23
View File
@@ -0,0 +1,23 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
{
public class EvasionScarfBoost : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Evasion Scarf Boost");
Description.SetDefault("10% increased damage, 10% increased crit chance, and 15% increased melee speed");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
longerExpertDebuff = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().eScarfBoost = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

+1 -1
View File
@@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.StatBuffs
public override void SetDefaults()
{
DisplayName.SetDefault("Scarf Boost");
Description.SetDefault("10% increased damage, 5% increased crit chance, and 10% increased melee speed");
Description.SetDefault("10% increased damage, 5% increased crit chance, and 5% increased melee speed");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
+19
View File
@@ -0,0 +1,19 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatDebuffs
{
public class AndromedaCripple : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Andromeda Cripple");
Description.SetDefault("You're slow");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
longerExpertDebuff = false;
canBeCleared = false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

+36
View File
@@ -0,0 +1,36 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class CausticStaffBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Caustic Dragon");
Description.SetDefault("A mini jungle dragon is following you");
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
CalamityPlayer modPlayer = player.Calamity();
if (player.ownedProjectileCounts[ModContent.ProjectileType<CausticStaffSummon>()] > 0)
{
modPlayer.causticDragon = true;
}
if (!modPlayer.causticDragon)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

+39
View File
@@ -0,0 +1,39 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class HowlTrio : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Howl's Heart");
Description.SetDefault("Howl protects you, Calcifer lights your way, Turnip-Head stalks you");
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
CalamityPlayer modPlayer = player.Calamity();
int howl = ModContent.ProjectileType<HowlsHeartHowl>();
int calcifer = ModContent.ProjectileType<HowlsHeartCalcifer>();
int turnip = ModContent.ProjectileType<HowlsHeartTurnipHead>();
if (player.ownedProjectileCounts[howl] > 0 || player.ownedProjectileCounts[calcifer] > 0 || player.ownedProjectileCounts[turnip] > 0)
{
modPlayer.howlTrio = true;
}
if (!modPlayer.howlTrio)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

+36
View File
@@ -0,0 +1,36 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class PlaguebringerSummonBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Lil' Plaguebringer");
Description.SetDefault("The plaguebringer will protect you");
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
CalamityPlayer modPlayer = player.Calamity();
if (player.ownedProjectileCounts[ModContent.ProjectileType<PlaguebringerSummon>()] > 0)
{
modPlayer.plaguebringerPatronSummon = true;
}
if (!modPlayer.plaguebringerPatronSummon)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 559 B

After

Width:  |  Height:  |  Size: 508 B

File diff suppressed because it is too large. Load diff
+213 -9
View File
@@ -19,6 +19,7 @@ using CalamityMod.Projectiles.Boss;
using CalamityMod.Projectiles.Enemy;
using CalamityMod.Projectiles.Environment;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
@@ -315,6 +316,43 @@ namespace CalamityMod.CalPlayer
modPlayer.stealthUIAlpha += 0.035f;
modPlayer.stealthUIAlpha = MathHelper.Clamp(modPlayer.stealthUIAlpha, 0f, 1f);
}
if (player.Calamity().andromedaState == AndromedaPlayerState.LargeRobot ||
player.ownedProjectileCounts[ModContent.ProjectileType<RelicOfDeliveranceSpear>()] > 0)
{
player.controlHook = player.releaseHook = false;
}
if (modPlayer.andromedaCripple > 0)
{
player.velocity = Vector2.Clamp(player.velocity, new Vector2(-11f, -8f), new Vector2(11f, 8f));
modPlayer.andromedaCripple--;
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<GiantIbanRobotOfDoom>()] <= 0 &&
player.Calamity().andromedaState != AndromedaPlayerState.Inactive)
{
player.Calamity().andromedaState = AndromedaPlayerState.Inactive;
}
if (player.Calamity().andromedaState == AndromedaPlayerState.LargeRobot)
{
player.width = 152;
player.height = 212;
player.position.Y -= 170;
}
else if (player.Calamity().andromedaState == AndromedaPlayerState.SpecialAttack)
{
player.width = 24;
player.height = 98;
player.position.Y -= 56;
}
else if (!player.mount.Active)
{
player.width = 20;
player.height = 42;
}
// Proficiency level ups
if (CalamityMod.CalamityConfig.ProficiencyEnabled)
modPlayer.GetExactLevelUp();
@@ -876,10 +914,12 @@ namespace CalamityMod.CalPlayer
modPlayer.nanoFlareCooldown--;
if (modPlayer.spectralVeilImmunity > 0)
modPlayer.spectralVeilImmunity--;
if (modPlayer.plaguedFuelPackCooldown > 0)
modPlayer.plaguedFuelPackCooldown--;
if (modPlayer.jetPackCooldown > 0)
modPlayer.jetPackCooldown--;
if (modPlayer.plaguedFuelPackDash > 0)
modPlayer.plaguedFuelPackDash--;
if (modPlayer.blunderBoosterDash > 0)
modPlayer.blunderBoosterDash--;
if (modPlayer.theBeeCooldown > 0)
modPlayer.theBeeCooldown--;
if (modPlayer.jellyDmg > 0f)
@@ -922,6 +962,8 @@ namespace CalamityMod.CalPlayer
modPlayer.ladHearts--;
if (modPlayer.titanBoost > 0)
modPlayer.titanBoost--;
if (modPlayer.prismaticLasers > 0)
modPlayer.prismaticLasers--;
// Silva invincibility effects
if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet)
@@ -1701,6 +1743,31 @@ namespace CalamityMod.CalPlayer
}
}
// Blunder Booster effects
if (modPlayer.blunderBoosterDash > 0)
{
int velocityMult = modPlayer.blunderBoosterDash > 1 ? 35 : 5;
player.velocity = new Vector2(modPlayer.blunderBoosterDirection, -1) * velocityMult;
int lightningCount = Main.rand.Next(2, 7);
for (int i = 0; i < lightningCount; i++)
{
Vector2 lightningVel = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1));
lightningVel.Normalize();
lightningVel *= Main.rand.NextFloat(1f, 2f);
int projectile = Projectile.NewProjectile(player.Center, lightningVel, ModContent.ProjectileType<BlunderBoosterLightning>(), (int)(30 * player.RogueDamage()), 0, player.whoAmI, Main.rand.Next(2), 0f);
Main.projectile[projectile].timeLeft = Main.rand.Next(180, 240);
}
for (int i = 0; i < 3; i++)
{
int dust = Dust.NewDust(player.Center, 1, 1, 60, player.velocity.X * -0.1f, player.velocity.Y * -0.1f, 100, default, 3.5f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 1.2f;
Main.dust[dust].velocity.Y -= 0.15f;
}
}
// Gravistar Sabaton effects
if (modPlayer.gSabaton)
{
@@ -2305,6 +2372,12 @@ namespace CalamityMod.CalPlayer
player.moveSpeed += 0.05f;
}
if (modPlayer.shadow)
{
if (player.FindBuffIndex(BuffID.Invisibility) > -1)
player.ClearBuff(BuffID.Invisibility);
}
if (modPlayer.irradiated)
{
if (modPlayer.boomerDukeLore)
@@ -2342,6 +2415,11 @@ namespace CalamityMod.CalPlayer
player.meleeDamage += 0.2f;
}
if (modPlayer.eScarfBoost)
{
player.allDamage += 0.1f;
modPlayer.AllCritBoost(10);
}
if (modPlayer.sMeleeBoost)
{
player.allDamage += 0.1f;
@@ -2661,6 +2739,12 @@ namespace CalamityMod.CalPlayer
player.wingTimeMax = (int)(player.wingTimeMax * 1.1);
}
if (modPlayer.prismaticGreaves)
{
if (player.wingTimeMax > 0)
player.wingTimeMax = (int)(player.wingTimeMax * 1.1);
}
if (modPlayer.plagueReaper)
{
if (player.wingTimeMax > 0)
@@ -3385,17 +3469,30 @@ namespace CalamityMod.CalPlayer
}
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrimstoneElementalMinion>()] > 1 || player.ownedProjectileCounts[ModContent.ProjectileType<WaterElementalMinion>()] > 1 ||
player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] > 1 || player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalMinion>()] > 1 ||
player.ownedProjectileCounts[ModContent.ProjectileType<CloudElementalMinion>()] > 1 || player.ownedProjectileCounts[ModContent.ProjectileType<FungalClumpMinion>()] > 1)
int brimmy = ModContent.ProjectileType<BrimstoneElementalMinion>();
int siren = ModContent.ProjectileType<WaterElementalMinion>();
int healer = ModContent.ProjectileType<SandElementalHealer>();
int sandy = ModContent.ProjectileType<SandElementalMinion>();
int cloudy = ModContent.ProjectileType<CloudElementalMinion>();
int fungal = ModContent.ProjectileType<FungalClumpMinion>();
int howl = ModContent.ProjectileType<HowlsHeartHowl>();
int calcifer = ModContent.ProjectileType<HowlsHeartCalcifer>();
int turnip = ModContent.ProjectileType<HowlsHeartTurnipHead>();
if (player.ownedProjectileCounts[brimmy] > 1 || player.ownedProjectileCounts[siren] > 1 ||
player.ownedProjectileCounts[healer] > 1 || player.ownedProjectileCounts[sandy] > 1 ||
player.ownedProjectileCounts[cloudy] > 1 || player.ownedProjectileCounts[fungal] > 1 ||
player.ownedProjectileCounts[howl] > 1 || player.ownedProjectileCounts[calcifer] > 1 ||
player.ownedProjectileCounts[turnip] > 1)
{
for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++)
{
if (Main.projectile[projIndex].active && Main.projectile[projIndex].owner == player.whoAmI)
{
if (Main.projectile[projIndex].type == ModContent.ProjectileType<BrimstoneElementalMinion>() || Main.projectile[projIndex].type == ModContent.ProjectileType<WaterElementalMinion>() ||
Main.projectile[projIndex].type == ModContent.ProjectileType<SandElementalHealer>() || Main.projectile[projIndex].type == ModContent.ProjectileType<SandElementalMinion>() ||
Main.projectile[projIndex].type == ModContent.ProjectileType<CloudElementalMinion>() || Main.projectile[projIndex].type == ModContent.ProjectileType<FungalClumpMinion>())
if (Main.projectile[projIndex].type == brimmy || Main.projectile[projIndex].type == siren ||
Main.projectile[projIndex].type == healer || Main.projectile[projIndex].type == sandy ||
Main.projectile[projIndex].type == cloudy || Main.projectile[projIndex].type == fungal ||
Main.projectile[projIndex].type == howl || Main.projectile[projIndex].type == calcifer ||
Main.projectile[projIndex].type == turnip)
{
Main.projectile[projIndex].Kill();
}
@@ -3403,12 +3500,35 @@ namespace CalamityMod.CalPlayer
}
}
if (modPlayer.blunderBooster)
{
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);
}
}
else if (player.ownedProjectileCounts[ModContent.ProjectileType<BlunderBoosterAura>()] != 0)
{
if (player.whoAmI == Main.myPlayer)
{
for (int i = 0; i < Main.maxProjectiles; i++)
{
if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType<BlunderBoosterAura>() && Main.projectile[i].owner == player.whoAmI)
{
Main.projectile[i].Kill();
break;
}
}
}
}
if (modPlayer.tesla)
{
if (player.whoAmI == Main.myPlayer)
{
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, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<TeslaAura>(), (int)(10 * player.AverageDamage()), 0f, player.whoAmI, 0f, 0f);
}
}
else if (player.ownedProjectileCounts[ModContent.ProjectileType<TeslaAura>()] != 0)
@@ -3426,6 +3546,90 @@ namespace CalamityMod.CalPlayer
}
}
if (modPlayer.prismaticLasers > 1800 && player.whoAmI == Main.myPlayer)
{
float shootSpeed = 18f;
int dmg = (int)(150 * player.MagicDamage());
Vector2 startPos = player.RotatedRelativePoint(player.MountedCenter, true);
Vector2 velocity = Main.MouseWorld - startPos;
if (player.gravDir == -1f)
{
velocity.Y = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - startPos.Y;
}
float travelDist = velocity.Length();
if ((float.IsNaN(velocity.X) && float.IsNaN(velocity.Y)) || (velocity.X == 0f && velocity.Y == 0f))
{
velocity.X = (float)player.direction;
velocity.Y = 0f;
travelDist = shootSpeed;
}
else
{
travelDist = shootSpeed / travelDist;
}
int laserAmt = 2;
for (int index = 0; index < laserAmt; index++)
{
startPos = new Vector2(player.Center.X + (float)(Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
startPos.X = (startPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201);
startPos.Y -= (float)(100 * index);
velocity.X = (float)Main.mouseX + Main.screenPosition.X - startPos.X;
velocity.Y = (float)Main.mouseY + Main.screenPosition.Y - startPos.Y;
if (velocity.Y < 0f)
{
velocity.Y *= -1f;
}
if (velocity.Y < 20f)
{
velocity.Y = 20f;
}
travelDist = velocity.Length();
travelDist = shootSpeed / travelDist;
velocity.X *= travelDist;
velocity.Y *= travelDist;
velocity.X += (float)Main.rand.Next(-50, 51) * 0.02f;
velocity.Y += (float)Main.rand.Next(-50, 51) * 0.02f;
Projectile.NewProjectile(startPos, velocity, ModContent.ProjectileType<MagicNebulaShot>(), dmg, 4f, player.whoAmI, 0f, (float)Main.rand.Next(10));
}
Main.PlaySound(SoundID.Item12, player.position);
}
if (modPlayer.prismaticLasers == 1800)
{
//Set the cooldown
player.AddBuff(ModContent.BuffType<PrismaticCooldown>(), CalamityUtils.SecondsToFrames(30f), true);
}
if (modPlayer.prismaticLasers == 1)
{
//Spawn some dust since you can use it again
int dustAmt = 36;
for (int dustIndex = 0; dustIndex < dustAmt; dustIndex++)
{
Color color = Utils.SelectRandom(Main.rand, new Color[]
{
new Color(255, 0, 0, 50), //Red
new Color(255, 128, 0, 50), //Orange
new Color(255, 255, 0, 50), //Yellow
new Color(128, 255, 0, 50), //Lime
new Color(0, 255, 0, 50), //Green
new Color(0, 255, 128, 50), //Turquoise
new Color(0, 255, 255, 50), //Cyan
new Color(0, 128, 255, 50), //Light Blue
new Color(0, 0, 255, 50), //Blue
new Color(128, 0, 255, 50), //Purple
new Color(255, 0, 255, 50), //Fuschia
new Color(255, 0, 128, 50) //Hot Pink
});
Vector2 vector6 = Vector2.Normalize(player.velocity) * new Vector2((float)player.width / 2f, (float)player.height) * 0.75f;
vector6 = vector6.RotatedBy((double)((float)(dustIndex - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)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);
Main.dust[dusty].noGravity = true;
Main.dust[dusty].noLight = true;
Main.dust[dusty].velocity = vector7;
}
}
if (modPlayer.theBee)
{
if (player.statLife >= player.statLifeMax2)
+16 -6
View File
@@ -65,6 +65,7 @@ using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Skies;
using CalamityMod.UI;
@@ -223,7 +224,7 @@ namespace CalamityMod
MomentumCapacitatorHotkey = RegisterHotKey("Momentom Capacitater Effect", "U");
SandCloakHotkey = RegisterHotKey("Sand Cloak Effect", "C");
SpectralVeilHotKey = RegisterHotKey("Spectral Veil Teleport", "Z");
PlaguePackHotKey = RegisterHotKey("Plagued Fuel Pack Dash", "Q");
PlaguePackHotKey = RegisterHotKey("Booster Dash", "Q");
if (!Main.dedServ)
{
@@ -258,6 +259,8 @@ namespace CalamityMod
AddEquipTexture(new SirenBodyAlt(), null, EquipType.Body, "SirenBodyAlt", "CalamityMod/Items/Accessories/SirenTransAlt_Body", "CalamityMod/Items/Accessories/SirenTransAlt_Arms");
AddEquipTexture(new SirenLegsAlt(), null, EquipType.Legs, "SirenLegAlt", "CalamityMod/Items/Accessories/SirenTransAlt_Legs");
AddEquipTexture(new AndromedaHead(), null, EquipType.Head, "NoHead", "CalamityMod/ExtraTextures/AndromedaWithout_Head");
AddEquipTexture(new PopoHead(), null, EquipType.Head, "PopoHead", "CalamityMod/Items/Accessories/Vanity/Popo_Head");
AddEquipTexture(new PopoNoselessHead(), null, EquipType.Head, "PopoNoselessHead", "CalamityMod/Items/Accessories/Vanity/PopoNoseless_Head");
AddEquipTexture(new PopoBody(), null, EquipType.Body, "PopoBody", "CalamityMod/Items/Accessories/Vanity/Popo_Body", "CalamityMod/Items/Accessories/Vanity/Popo_Arms");
@@ -624,7 +627,8 @@ namespace CalamityMod
ModContent.ProjectileType<FlurrystormCannonShooting>(),
ModContent.ProjectileType<MagnomalyBeam>(),
ModContent.ProjectileType<MagnomalyAura>(),
ModContent.ProjectileType<RainbowTrail>()
ModContent.ProjectileType<RainbowTrail>(),
ModContent.ProjectileType<PrismaticBeam>()
};
projectileDestroyExceptionList = new List<int>()
@@ -1864,7 +1868,8 @@ namespace CalamityMod
ModContent.ItemType<Shroomer>(),
ModContent.ItemType<SpectreRifle>(),
ModContent.ItemType<Svantechnical>(),
ModContent.ItemType<Skullmasher>()
ModContent.ItemType<Skullmasher>(),
ModContent.ItemType<TyrannysEnd>()
};
boomerangList = new List<int>()
@@ -2047,6 +2052,7 @@ namespace CalamityMod
ModContent.ProjectileType<LunarKunaiProj>(),
ModContent.ProjectileType<MalachiteProj>(),
ModContent.ProjectileType<MalachiteBolt>(),
ModContent.ProjectileType<MalachiteStealth>(),
ModContent.ProjectileType<MonkeyDart>(),
ModContent.ProjectileType<MycorootProj>(),
ModContent.ProjectileType<MythrilKnifeProjectile>(),
@@ -2097,7 +2103,8 @@ namespace CalamityMod
ModContent.ItemType<ContaminatedBile>(),
ModContent.ItemType<AcidicRainBarrel>(),
ModContent.ItemType<SkyfinBombers>(),
ModContent.ItemType<SpentFuelContainer>()
ModContent.ItemType<SpentFuelContainer>(),
ModContent.ItemType<SealedSingularity>()
};
flaskBombProjList = new List<int>()
@@ -2120,12 +2127,14 @@ namespace CalamityMod
ModContent.ProjectileType<MeteorFistProj>(),
ModContent.ProjectileType<CraniumSmasherProj>(),
ModContent.ProjectileType<CraniumSmasherExplosive>(),
ModContent.ProjectileType<CraniumSmasherStealth>(),
ModContent.ProjectileType<DestructionStar>(),
ModContent.ProjectileType<DestructionBolt>(),
ModContent.ProjectileType<ContaminatedBileFlask>(),
ModContent.ProjectileType<GreenDonkeyKongReference>(),
ModContent.ProjectileType<SkyfinNuke>(),
ModContent.ProjectileType<SpentFuelContainerProjectile>()
ModContent.ProjectileType<SpentFuelContainerProjectile>(),
ModContent.ProjectileType<SealedSingularityProj>()
};
spikyBallList = new List<int>()
@@ -2863,7 +2872,8 @@ namespace CalamityMod
bool acidRain = CalamityWorld.rainingAcid;
if (calamityModMusic != null)
{
string musicChoice = acidRain ? CalamityWorld.downedPolterghast ? "Sounds/Music/AcidRain1" : "Sounds/Music/AcidRain1" : "Sounds/Music/Sulphur"; //replace first acidrain1 once second theme is added.
string rainMusic = "Sounds/Music/AcidRain";
string musicChoice = acidRain ? rainMusic + (CalamityWorld.downedPolterghast ? "2" : "1") : "Sounds/Music/Sulphur"; //replace first acidrain1 once second theme is added.
music = calamityModMusic.GetSoundSlot(SoundType.Music, musicChoice);
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 185 B

+33
View File
@@ -0,0 +1,33 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Dusts
{
public class FinalFlame : ModDust
{
public override void OnSpawn(Dust dust)
{
dust.color = default;
dust.velocity *= 0.5f;
dust.noGravity = true;
dust.noLight = true;
dust.alpha = 50;
}
public override bool Update(Dust dust)
{
dust.position += dust.velocity;
dust.scale *= 0.94f;
dust.velocity *= 0.90f;
Lighting.AddLight(dust.position, 0.255f, 0.185f, 0.094f);
if (dust.scale < 0.4f)
{
dust.active = false;
}
return false;
}
public override Color? GetAlpha(Dust dust, Color lightColor) => new Color(Color.White.R, Color.White.G, Color.White.B, dust.alpha);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 B

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 909 B

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

After

Width:  |  Height:  |  Size: 565 B

+52 -45
View File
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Accessories
{
if (random == 0)
{
for (int l = 0; l < 200; l++)
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)
@@ -64,98 +64,105 @@ namespace CalamityMod.Items.Accessories
}
}
bloomCounter++;
//Flower Boots code
if (player.whoAmI == Main.myPlayer && player.velocity.Y == 0f && player.grappling[0] == -1)
{
int num4 = (int)player.Center.X / 16;
int num5 = (int)(player.position.Y + (float)player.height - 1f) / 16;
if (Main.tile[num4, num5] == null)
int x = (int)player.Center.X / 16;
int y = (int)(player.position.Y + (float)player.height - 1f) / 16;
Tile tile = Main.tile[x, y];
if (tile == null)
{
Main.tile[num4, num5] = new Tile();
tile = new Tile();
}
if (!Main.tile[num4, num5].active() && Main.tile[num4, num5].liquid == 0 && Main.tile[num4, num5 + 1] != null && WorldGen.SolidTile(num4, num5 + 1))
if (!tile.active() && tile.liquid == 0 && Main.tile[x, y + 1] != null && WorldGen.SolidTile(x, y + 1))
{
Main.tile[num4, num5].frameY = 0;
Main.tile[num4, num5].slope(0);
Main.tile[num4, num5].halfBrick(false);
if (Main.tile[num4, num5 + 1].type == 0)
tile.frameY = 0;
tile.slope(0);
tile.halfBrick(false);
//On dirt blocks, there's a small chance to grow a dye plant
if (Main.tile[x, y + 1].type == TileID.Dirt)
{
if (Main.rand.NextBool(1000))
{
Main.tile[num4, num5].active(true);
Main.tile[num4, num5].type = 227;
Main.tile[num4, num5].frameX = (short)(34 * Main.rand.Next(1, 13));
while (Main.tile[num4, num5].frameX == 144)
tile.active(true);
tile.type = TileID.DyePlants;
tile.frameX = (short)(34 * Main.rand.Next(1, 13));
while (tile.frameX == 144)
{
Main.tile[num4, num5].frameX = (short)(34 * Main.rand.Next(1, 13));
tile.frameX = (short)(34 * Main.rand.Next(1, 13));
}
}
if (Main.netMode == NetmodeID.MultiplayerClient)
{
NetMessage.SendTileSquare(-1, num4, num5, 1, TileChangeType.None);
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
}
}
if (Main.tile[num4, num5 + 1].type == 2)
//On grass, grow flowers
if (Main.tile[x, y + 1].type == TileID.Grass)
{
if (Main.rand.NextBool(2))
{
Main.tile[num4, num5].active(true);
Main.tile[num4, num5].type = 3;
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(6, 11));
while (Main.tile[num4, num5].frameX == 144)
tile.active(true);
tile.type = TileID.Plants;
tile.frameX = (short)(18 * Main.rand.Next(6, 11));
while (tile.frameX == 144)
{
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(6, 11));
tile.frameX = (short)(18 * Main.rand.Next(6, 11));
}
}
else
{
Main.tile[num4, num5].active(true);
Main.tile[num4, num5].type = 73;
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(6, 21));
while (Main.tile[num4, num5].frameX == 144)
tile.active(true);
tile.type = TileID.Plants2;
tile.frameX = (short)(18 * Main.rand.Next(6, 21));
while (tile.frameX == 144)
{
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(6, 21));
tile.frameX = (short)(18 * Main.rand.Next(6, 21));
}
}
if (Main.netMode == NetmodeID.MultiplayerClient)
{
NetMessage.SendTileSquare(-1, num4, num5, 1, TileChangeType.None);
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
}
}
else if (Main.tile[num4, num5 + 1].type == 109)
//On hallowed grass, grow hallowed flowers
else if (Main.tile[x, y + 1].type == TileID.HallowedGrass)
{
if (Main.rand.NextBool(2))
{
Main.tile[num4, num5].active(true);
Main.tile[num4, num5].type = 110;
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(4, 7));
while (Main.tile[num4, num5].frameX == 90)
tile.active(true);
tile.type = TileID.HallowedPlants;
tile.frameX = (short)(18 * Main.rand.Next(4, 7));
while (tile.frameX == 90)
{
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(4, 7));
tile.frameX = (short)(18 * Main.rand.Next(4, 7));
}
}
else
{
Main.tile[num4, num5].active(true);
Main.tile[num4, num5].type = 113;
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(2, 8));
while (Main.tile[num4, num5].frameX == 90)
tile.active(true);
tile.type = TileID.HallowedPlants2;
tile.frameX = (short)(18 * Main.rand.Next(2, 8));
while (tile.frameX == 90)
{
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(2, 8));
tile.frameX = (short)(18 * Main.rand.Next(2, 8));
}
}
if (Main.netMode == NetmodeID.MultiplayerClient)
{
NetMessage.SendTileSquare(-1, num4, num5, 1, TileChangeType.None);
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
}
}
else if (Main.tile[num4, num5 + 1].type == 60)
//On jungle grass, grow jungle flowers
else if (Main.tile[x, y + 1].type == TileID.JungleGrass)
{
Main.tile[num4, num5].active(true);
Main.tile[num4, num5].type = 74;
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(9, 17));
tile.active(true);
tile.type = TileID.JunglePlants2;
tile.frameX = (short)(18 * Main.rand.Next(9, 17));
if (Main.netMode == NetmodeID.MultiplayerClient)
{
NetMessage.SendTileSquare(-1, num4, num5, 1, TileChangeType.None);
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
}
}
}
+64
View File
@@ -0,0 +1,64 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class BlunderBooster : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Blunder Booster");
Tooltip.SetDefault("12% increased rogue damage and 15% increased rogue projectile velocity\n" +
"Summons a red lightning aura to surround the player and electrify nearby enemies\n" +
"TOOLTIP LINE HERE" +
"This effect has a 3 second cooldown before it can be used again");
}
public override void SetDefaults()
{
item.width = 30;
item.height = 38;
item.value = CalamityGlobalItem.Rarity12BuyPrice;
item.rare = 10;
item.Calamity().postMoonLordRarity = 12;
item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().hasJetpack;
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.Calamity().hasJetpack = true;
player.Calamity().throwingDamage += 0.12f;
player.Calamity().throwingVelocity += 0.15f;
player.Calamity().blunderBooster = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
string hotkey = CalamityMod.PlaguePackHotKey.TooltipHotkeyString();
foreach (TooltipLine line in list)
{
if (line.mod == "Terraria" && line.Name == "Tooltip2")
{
line.text = "Press " + hotkey + " to consume 25% of your maximum stealth to perform a swift upwards/diagonal dash which leaves a trail of lightning bolts";
}
}
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<PlaguedFuelPack>());
recipe.AddIngredient(ModContent.ItemType<EffulgentFeather>(), 8);
recipe.AddIngredient(ModContent.ItemType<UeliaceBar>(), 5);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

+2
View File
@@ -26,6 +26,8 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().dodgeScarf;
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
+52
View File
@@ -0,0 +1,52 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
[AutoloadEquip(EquipType.Neck)]
public class EvasionScarf : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Evasion Scarf");
Tooltip.SetDefault("True melee strikes deal 30% 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");
}
public override void SetDefaults()
{
item.width = 26;
item.height = 26;
item.accessory = true;
item.value = CalamityGlobalItem.Rarity5BuyPrice;
item.rare = 5;
item.Calamity().customRarity = CalamityRarity.Dedicated;
}
public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().dodgeScarf;
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.dodgeScarf = true;
modPlayer.evasionScarf = true;
modPlayer.dashMod = 1;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<CounterScarf>());
recipe.AddIngredient(ItemID.SoulofNight, 5);
recipe.AddIngredient(ItemID.SoulofLight, 5);
recipe.AddIngredient(ItemID.Silk, 15);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+59
View File
@@ -0,0 +1,59 @@
using CalamityMod.Buffs.Summon;
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.DataStructures;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Items.Accessories
{
public class HowlsHeart : ModItem
{
public const int HowlDamage = 45;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Howl's Heart");
Tooltip.SetDefault("Summons Howl to fight for you, Calcifer to light your way, and Turnip-Head to follow you around");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 4));
}
public override void SetDefaults()
{
item.width = 20;
item.height = 26;
item.value = CalamityGlobalItem.Rarity4BuyPrice;
item.rare = 4;
item.Calamity().customRarity = CalamityRarity.Dedicated;
item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().howlsHeart;
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.howlsHeart = true;
if (player.whoAmI == Main.myPlayer)
{
if (player.FindBuffIndex(BuffType<HowlTrio>()) == -1)
{
player.AddBuff(BuffType<HowlTrio>(), 3600, true);
}
if (player.ownedProjectileCounts[ProjectileType<HowlsHeartHowl>()] < 1)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ProjectileType<HowlsHeartHowl>(), (int)(HowlDamage * player.MinionDamage()), 1f, player.whoAmI, 0f, 0f);
}
if (player.ownedProjectileCounts[ProjectileType<HowlsHeartCalcifer>()] < 1)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ProjectileType<HowlsHeartCalcifer>(), 0, 0f, player.whoAmI, 0f, 0f);
}
if (player.ownedProjectileCounts[ProjectileType<HowlsHeartTurnipHead>()] < 1)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ProjectileType<HowlsHeartTurnipHead>(), 0, 0f, player.whoAmI, 0f, 0f);
}
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

+3
View File
@@ -26,8 +26,11 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().hasJetpack;
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.Calamity().hasJetpack = true;
player.Calamity().throwingDamage += 0.05f;
player.Calamity().throwingVelocity += 0.15f;
player.Calamity().plaguedFuelPack = true;
+60
View File
@@ -0,0 +1,60 @@
using CalamityMod.Buffs.Cooldowns;
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor
{
[AutoloadEquip(EquipType.Head)]
public class DesertProwlerHat : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Desert Prowler Hat");
Tooltip.SetDefault("4% increased ranged critical strike chance and 20% chance to not consume ammo");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.value = CalamityGlobalItem.Rarity1BuyPrice;
item.rare = 1;
item.defense = 1; //6
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<DesertProwlerShirt>() && legs.type == ModContent.ItemType<DesertProwlerPants>();
}
public override void UpdateArmorSet(Player player)
{
player.setBonus = "Ranged attacks deal an extra 2 flat damage\n" +
"Ranged crits can rarely whip up a sandstorm";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.desertProwler = true;
}
public override void UpdateEquip(Player player)
{
player.rangedCrit += 4;
player.ammoCost80 = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<DesertFeather>(), 2);
recipe.AddIngredient(ItemID.Silk, 8);
recipe.AddTile(TileID.Loom);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

+42
View File
@@ -0,0 +1,42 @@
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor
{
[AutoloadEquip(EquipType.Legs)]
public class DesertProwlerPants : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Desert Prowler Pants");
Tooltip.SetDefault("10% increased movement speed and immunity to the Mighty Wind debuff");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.value = CalamityGlobalItem.Rarity1BuyPrice;
item.rare = 1;
item.defense = 2;
}
public override void UpdateEquip(Player player)
{
player.buffImmune[BuffID.WindPushed] = true;
player.moveSpeed += 0.1f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<DesertFeather>());
recipe.AddIngredient(ItemID.Silk, 5);
recipe.AddTile(TileID.Loom);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

+42
View File
@@ -0,0 +1,42 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.DamageOverTime;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor
{
[AutoloadEquip(EquipType.Body)]
public class DesertProwlerShirt : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Desert Prowler Shirt");
Tooltip.SetDefault("5% increased ranged critical strike chance");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.value = CalamityGlobalItem.Rarity1BuyPrice;
item.rare = 1;
item.defense = 3;
}
public override void UpdateEquip(Player player)
{
player.rangedCrit += 5;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<DesertFeather>(), 3);
recipe.AddIngredient(ItemID.Silk, 10);
recipe.AddTile(TileID.Loom);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

+51
View File
@@ -0,0 +1,51 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.CalPlayer;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor
{
[AutoloadEquip(EquipType.Body)]
public class PlaguebringerCarapace : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Plaguebringer Carapace");
Tooltip.SetDefault("Immunity to the Plague\n" +
"12% increased minion damage and +1 max minions\n" +
"Friendly bees inflict the plague");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.defense = 17;
item.value = CalamityGlobalItem.Rarity8BuyPrice;
item.Calamity().customRarity = CalamityRarity.Dedicated;
}
public override void UpdateEquip(Player player)
{
player.Calamity().plaguebringerCarapace = true;
player.maxMinions += 2;
player.minionDamage += 0.12f;
player.buffImmune[ModContent.BuffType<Plague>()] = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BeeBreastplate);
recipe.AddIngredient(ModContent.ItemType<AlchemicalFlask>(), 2);
recipe.AddIngredient(ModContent.ItemType<PlagueCellCluster>(), 7);
recipe.AddIngredient(ModContent.ItemType<InfectedArmorPlating>(), 7);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

+179
View File
@@ -0,0 +1,179 @@
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor
{
[AutoloadEquip(EquipType.Legs)]
public class PlaguebringerPistons : ModItem
{
public int counter = 0;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Plaguebringer Pistons");
Tooltip.SetDefault("13% increased minion damage and 15% increased movement speed\n" +
"You grow flowers on the grass beneath you, chance to grow very random dye plants on grassless dirt\n" +
"You spawn bees while sprinting or dashing");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.defense = 8;
item.value = CalamityGlobalItem.Rarity8BuyPrice;
item.Calamity().customRarity = CalamityRarity.Dedicated;
}
public override void UpdateEquip(Player player)
{
player.minionDamage += 0.13f;
player.moveSpeed += 0.15f;
//Spawn bees while sprinting or dashing
counter++;
if (counter % 12 == 0)
{
if ((Math.Abs(player.velocity.X) >= 5 || Math.Abs(player.velocity.Y) >= 5) && player.whoAmI == Main.myPlayer)
{
int beeCount = 1;
if (Main.rand.NextBool(3))
++beeCount;
if (Main.rand.NextBool(3))
++beeCount;
if (player.strongBees && Main.rand.NextBool(3))
++beeCount;
int damage = 30;
damage = (int)(damage * 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;
Main.projectile[bee].usesLocalNPCImmunity = true;
Main.projectile[bee].localNPCHitCooldown = 10;
Main.projectile[bee].penetrate = 2;
}
}
}
//Flower Boots code
if (player.whoAmI == Main.myPlayer && player.velocity.Y == 0f && player.grappling[0] == -1)
{
int x = (int)player.Center.X / 16;
int y = (int)(player.position.Y + (float)player.height - 1f) / 16;
Tile tile = Main.tile[x, y];
if (tile == null)
{
tile = new Tile();
}
if (!tile.active() && tile.liquid == 0 && Main.tile[x, y + 1] != null && WorldGen.SolidTile(x, y + 1))
{
tile.frameY = 0;
tile.slope(0);
tile.halfBrick(false);
//On dirt blocks, there's a small chance to grow a dye plant
if (Main.tile[x, y + 1].type == TileID.Dirt)
{
if (Main.rand.NextBool(1000))
{
tile.active(true);
tile.type = TileID.DyePlants;
tile.frameX = (short)(34 * Main.rand.Next(1, 13));
while (tile.frameX == 144)
{
tile.frameX = (short)(34 * Main.rand.Next(1, 13));
}
}
if (Main.netMode == NetmodeID.MultiplayerClient)
{
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
}
}
//On grass, grow flowers
if (Main.tile[x, y + 1].type == TileID.Grass)
{
if (Main.rand.NextBool(2))
{
tile.active(true);
tile.type = TileID.Plants;
tile.frameX = (short)(18 * Main.rand.Next(6, 11));
while (tile.frameX == 144)
{
tile.frameX = (short)(18 * Main.rand.Next(6, 11));
}
}
else
{
tile.active(true);
tile.type = TileID.Plants2;
tile.frameX = (short)(18 * Main.rand.Next(6, 21));
while (tile.frameX == 144)
{
tile.frameX = (short)(18 * Main.rand.Next(6, 21));
}
}
if (Main.netMode == NetmodeID.MultiplayerClient)
{
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
}
}
//On hallowed grass, grow hallowed flowers
else if (Main.tile[x, y + 1].type == TileID.HallowedGrass)
{
if (Main.rand.NextBool(2))
{
tile.active(true);
tile.type = TileID.HallowedPlants;
tile.frameX = (short)(18 * Main.rand.Next(4, 7));
while (tile.frameX == 90)
{
tile.frameX = (short)(18 * Main.rand.Next(4, 7));
}
}
else
{
tile.active(true);
tile.type = TileID.HallowedPlants2;
tile.frameX = (short)(18 * Main.rand.Next(2, 8));
while (tile.frameX == 90)
{
tile.frameX = (short)(18 * Main.rand.Next(2, 8));
}
}
if (Main.netMode == NetmodeID.MultiplayerClient)
{
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
}
}
//On jungle grass, grow jungle flowers
else if (Main.tile[x, y + 1].type == TileID.JungleGrass)
{
tile.active(true);
tile.type = TileID.JunglePlants2;
tile.frameX = (short)(18 * Main.rand.Next(9, 17));
if (Main.netMode == NetmodeID.MultiplayerClient)
{
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
}
}
}
}
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BeeGreaves);
recipe.AddIngredient(ItemID.FlowerBoots);
recipe.AddIngredient(ModContent.ItemType<PlagueCellCluster>(), 5);
recipe.AddIngredient(ModContent.ItemType<InfectedArmorPlating>(), 5);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

+81
View File
@@ -0,0 +1,81 @@
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Items.Armor.Vanity;
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor
{
[AutoloadEquip(EquipType.Head)]
public class PlaguebringerVisor : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Plaguebringer Visor");
Tooltip.SetDefault("15% increased minion damage and +2 max minions\n" +
"+20 max life");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.defense = 7; // 32 total
item.value = CalamityGlobalItem.Rarity8BuyPrice;
item.Calamity().customRarity = CalamityRarity.Dedicated;
}
public override void UpdateEquip(Player player)
{
player.maxMinions += 2;
player.minionDamage += 0.15f;
player.statLifeMax2 += 20;
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<PlaguebringerCarapace>() && legs.type == ModContent.ItemType<PlaguebringerPistons>();
}
public override void ArmorSetShadows(Player player)
{
player.armorEffectDrawShadow = true;
}
public override void UpdateArmorSet(Player player)
{
player.setBonus = "Grants a plague dash to ram enemies and afflict them with the plague\n" +
"Summons a lil' plaguebringer to protect you and empower nearby minions";
player.Calamity().plaguebringerPatronSet = true;
player.Calamity().dashMod = 8;
if (player.whoAmI == Main.myPlayer)
{
if (player.FindBuffIndex(ModContent.BuffType<PlaguebringerSummonBuff>()) == -1)
{
player.AddBuff(ModContent.BuffType<PlaguebringerSummonBuff>(), 3600, true);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<PlaguebringerSummon>()] < 1)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<PlaguebringerSummon>(), (int)(80 * player.MinionDamage()), 0f, player.whoAmI, 0f, 0f);
}
}
// Constantly emit dim green light
Lighting.AddLight(player.Center, 0f, 0.39f, 0.24f);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BeeHeadgear);
recipe.AddIngredient(ModContent.ItemType<PlagueCellCluster>(), 4);
recipe.AddIngredient(ModContent.ItemType<InfectedArmorPlating>(), 4);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

+51
View File
@@ -0,0 +1,51 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor
{
[AutoloadEquip(EquipType.Legs)]
public class PrismaticGreaves : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Prismatic Greaves");
Tooltip.SetDefault("10% increased magic damage and 12% increased magic crit\n" +
"20% decreased non-magic damage\n" +
"Increases flight time and jump speed by 10%");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.defense = 21;
item.value = CalamityGlobalItem.Rarity13BuyPrice;
item.Calamity().customRarity = CalamityRarity.Dedicated;
}
public override void UpdateEquip(Player player)
{
player.Calamity().prismaticGreaves = true;
player.magicDamage += 0.1f;
player.magicCrit += 12;
player.jumpSpeedBoost += 0.1f;
player.allDamage -= 0.2f;
player.magicDamage += 0.2f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<ArmoredShell>(), 3);
recipe.AddIngredient(ModContent.ItemType<ExodiumClusterOre>(), 5);
recipe.AddIngredient(ModContent.ItemType<DivineGeode>(), 6);
recipe.AddIngredient(ItemID.Nanites, 300);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

+75
View File
@@ -0,0 +1,75 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor
{
[AutoloadEquip(EquipType.Head)]
public class PrismaticHelmet : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Prismatic Helmet");
Tooltip.SetDefault("8% increased magic damage and 12% increased magic crit\n" +
"20% decreased non-magic damage\n" +
"Enemies with less than 500 health deal no damage\n" +
"This does not occur while a boss is alive");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.defense = 18; //71
item.value = CalamityGlobalItem.Rarity13BuyPrice;
item.Calamity().customRarity = CalamityRarity.Dedicated;
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<PrismaticRegalia>() && legs.type == ModContent.ItemType<PrismaticGreaves>();
}
public override void ArmorSetShadows(Player player)
{
player.armorEffectDrawShadowSubtle = true;
player.armorEffectDrawOutlines = true;
}
public override void UpdateArmorSet(Player player)
{
player.Calamity().prismaticSet = true;
player.statManaMax2 += 40;
player.manaCost *= 0.85f;
player.manaRegenBonus += 8;
string hotkey = CalamityMod.TarraHotKey.TooltipHotkeyString();
player.setBonus = "+40 max mana and 15% reduced mana cost\n" +
"Increased mana regeneration rate\n" +
"Press " + hotkey + " to unleash a barrage of death lasers at the cursor for the next 5 seconds\n" +
"This has a 30 second cooldown";
}
public override void UpdateEquip(Player player)
{
player.Calamity().prismaticHelmet = true;
player.allDamage -= 0.2f;
player.magicDamage += 0.2f;
player.magicDamage += 0.08f;
player.magicCrit += 12;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<ArmoredShell>(), 3);
recipe.AddIngredient(ModContent.ItemType<ExodiumClusterOre>(), 5);
recipe.AddIngredient(ModContent.ItemType<DivineGeode>(), 4);
recipe.AddIngredient(ItemID.Nanites, 300);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+53
View File
@@ -0,0 +1,53 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor
{
[AutoloadEquip(EquipType.Body)]
public class PrismaticRegalia : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Prismatic Regalia");
Tooltip.SetDefault("12% increased magic damage and 15% increased magic crit\n" +
"20% decreased non-magic damage\n" +
"+20 max life and +40 max mana\n" +
"Magic attacks occasionally fire a pair of homing rockets");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.defense = 33;
item.value = CalamityGlobalItem.Rarity13BuyPrice;
item.Calamity().customRarity = CalamityRarity.Dedicated;
}
public override void UpdateEquip(Player player)
{
player.Calamity().prismaticRegalia = true;
player.statLifeMax2 += 20;
player.statManaMax2 += 40;
player.magicDamage += 0.12f;
player.magicCrit += 15;
player.allDamage -= 0.2f;
player.magicDamage += 0.2f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<ArmoredShell>(), 3);
recipe.AddIngredient(ModContent.ItemType<ExodiumClusterOre>(), 5);
recipe.AddIngredient(ModContent.ItemType<DivineGeode>(), 8);
recipe.AddIngredient(ItemID.Nanites, 300);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

+152 -1
View File
@@ -354,6 +354,23 @@ namespace CalamityMod.Items
}
}
}
if (modPlayer.prismaticRegalia) //0 - 99
{
if (item.magic && Main.rand.Next(0, 100) >= 90)
{
if (player.whoAmI == Main.myPlayer)
{
for (int i = -5; i <= 5; i += 5)
{
if (i != 0)
{
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(i));
Projectile.NewProjectile(position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType<MiniRocket>(), (int)(damage * 1.3), 2f, player.whoAmI, 0f, 0f);
}
}
}
}
}
if (modPlayer.harpyWingBoost && modPlayer.harpyRing)
{
if (Main.rand.NextBool(5))
@@ -636,6 +653,97 @@ namespace CalamityMod.Items
#endregion
#region Andromeda Dev Item Attacks
private bool PerformAndromedaAttacks(Item item, Player player)
{
if (player.whoAmI != Main.myPlayer)
return false;
int robotIndex = -1;
for (int i = 0; i < Main.projectile.Length; i++)
{
if (Main.projectile[i].active &&
Main.projectile[i].type == ModContent.ProjectileType<GiantIbanRobotOfDoom>() &&
Main.projectile[i].owner == player.whoAmI)
{
robotIndex = i;
break;
}
}
if (robotIndex != -1)
{
Projectile robot = Main.projectile[robotIndex];
GiantIbanRobotOfDoom robotModProjectile = ((GiantIbanRobotOfDoom)robot.modProjectile);
if (player.ownedProjectileCounts[ModContent.ProjectileType<AndromedaRegislash>()] <= 0 &&
robotModProjectile.TopIconActive &&
(robotModProjectile.RightIconCooldown <= GiantIbanRobotOfDoom.RightIconAttackTime ||
!robotModProjectile.RightIconActive)) // "Melee" attack
{
int damage = player.Calamity().andromedaState == AndromedaPlayerState.SmallRobot ? GiantIbanRobotOfDoom.RegicideBaseDamageSmall : GiantIbanRobotOfDoom.RegicideBaseDamageLarge;
if (item.Calamity().rogue)
{
damage = (int)(damage * player.RogueDamage());
}
if (item.melee)
{
damage = (int)(damage * player.MeleeDamage());
}
if (item.ranged)
{
damage = (int)(damage * player.RangedDamage());
}
if (item.magic)
{
damage = (int)(damage * player.MagicDamage());
}
if (item.summon)
{
damage = (int)(damage * player.MinionDamage());
}
Projectile blade = Projectile.NewProjectileDirect(robot.Center + (robot.spriteDirection > 0).ToDirectionInt() * robot.width / 2 * Vector2.UnitX,
Vector2.Zero, ModContent.ProjectileType<AndromedaRegislash>(), damage, 15f, player.whoAmI, Projectile.GetByUUID(robot.owner, robot.whoAmI));
if (item.Calamity().rogue)
{
blade.Calamity().forceRogue = true;
}
if (item.melee)
{
blade.Calamity().forceMelee = true;
}
if (item.ranged)
{
blade.Calamity().forceRanged = true;
}
if (item.magic)
{
blade.Calamity().forceMagic = true;
}
if (item.summon)
{
blade.Calamity().forceMinion = true;
}
}
if (!robotModProjectile.TopIconActive &&
(robotModProjectile.LeftBracketActive || robotModProjectile.RightBracketActive) &&
!robotModProjectile.BottomBracketActive &&
robotModProjectile.LaserCooldown <= 0 &&
(robotModProjectile.RightIconCooldown <= GiantIbanRobotOfDoom.RightIconAttackTime ||
!robotModProjectile.RightIconActive)) // "Ranged" attack
{
robotModProjectile.LaserCooldown = AndromedaDeathRay.TrueTimeLeft * 2;
if (player.Calamity().andromedaState == AndromedaPlayerState.SmallRobot)
{
robotModProjectile.LaserCooldown = AndromedaDeathRay.TrueTimeLeft + 1;
}
}
}
return false;
}
#endregion
#region Use Item Changes
public override bool AltFunctionUse(Item item, Player player)
@@ -743,6 +851,26 @@ namespace CalamityMod.Items
{
return false; // Don't use weapons if you're charging with a spear
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<GiantIbanRobotOfDoom>()] > 0 &&
item.fishingPole > 0)
{
return false;
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<GiantIbanRobotOfDoom>()] > 0 &&
item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (item.Calamity().rogue || item.magic || item.ranged || item.melee))
{
if (player.altFunctionUse == 0)
{
return PerformAndromedaAttacks(item, player);
}
else
{
return AltFunctionUse(item, player);
}
}
if (modPlayer.profanedCrystalBuffs && item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (item.Calamity().rogue || item.magic || item.ranged || item.melee))
{
if (player.altFunctionUse == 0)
@@ -769,6 +897,10 @@ namespace CalamityMod.Items
}
return true;
}
if (item.type == ItemID.InvisibilityPotion && player.FindBuffIndex(ModContent.BuffType<ShadowBuff>()) > -1)
{
return false;
}
if ((item.type == ItemID.RegenerationPotion || item.type == ItemID.LifeforcePotion) && player.FindBuffIndex(ModContent.BuffType<Cadence>()) > -1)
{
return false;
@@ -817,7 +949,9 @@ namespace CalamityMod.Items
{
if (!Collision.SolidCollision(teleportLocation, player.width, player.height))
{
if (modPlayer.scarfCooldown)
if (modPlayer.eScarfCooldown)
player.AddBuff(BuffID.ChaosState, (int)(CalamityPlayer.chaosStateDuration * 1.5), true);
else if (modPlayer.scarfCooldown)
player.AddBuff(BuffID.ChaosState, CalamityPlayer.chaosStateDuration * 2, true);
else
player.AddBuff(BuffID.ChaosState, CalamityPlayer.chaosStateDuration, true);
@@ -912,6 +1046,21 @@ namespace CalamityMod.Items
tt2.overrideColor = new Color(129, 29, 149);
if (item.type == ModContent.ItemType<Svantechnical>())
tt2.overrideColor = new Color(220, 20, 60);
if (item.type == ModContent.ItemType<PrototypeAndromechaRing>())
{
if (Main.GlobalTime % 1f < 0.6f)
{
tt2.overrideColor = new Color(89, 229, 255);
}
else if (Main.GlobalTime % 1f < 0.8f)
{
tt2.overrideColor = Color.Lerp(new Color(89, 229, 255), Color.White, (Main.GlobalTime % 1f - 0.6f) / 0.2f);
}
else
{
tt2.overrideColor = Color.Lerp(Color.White, new Color(89, 229, 255), (Main.GlobalTime % 1f - 0.8f) / 0.2f);
}
}
// Uniquely colored legendary weapons and Yharim's Crystal
if (item.type == ModContent.ItemType<AegisBlade>() || item.type == ModContent.ItemType<YharimsCrystal>())
@@ -932,6 +1081,8 @@ namespace CalamityMod.Items
tt2.overrideColor = new Color(255, Main.DiscoG, 0);
if (item.type == ModContent.ItemType<PristineFury>())
tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f);
if (item.type == ModContent.ItemType<LeonidProgenitor>())
tt2.overrideColor = CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 3f);
break;
}
}
+22
View File
@@ -0,0 +1,22 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Items.Materials
{
public class InfectedArmorPlating : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Infected Armor Plating"); //haha recycled and recolored Corroded Metal Plating from T2 Acid Rain
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.maxStack = 999;
item.value = Item.buyPrice(0, 5, 0, 0);
item.rare = 8;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

+82
View File
@@ -0,0 +1,82 @@
using CalamityMod.Buffs.Mounts;
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Mounts
{
public class BUMBLEDOGE : ModMountData
{
public override void SetDefaults()
{
mountData.spawnDust = 60;
mountData.spawnDustNoGravity = true;
mountData.buff = ModContent.BuffType<BumbledogeMount>();
mountData.flightTimeMax = 600;
mountData.fatigueMax = 0;
mountData.fallDamage = 0f;
mountData.runSpeed = 12f;
mountData.dashSpeed = 12f;
mountData.heightBoost = 44;
mountData.acceleration = 0.2f;
mountData.jumpHeight = 10;
mountData.jumpSpeed = 4f;
mountData.blockExtraJumps = false;
mountData.totalFrames = 12;
mountData.constantJump = false;
int[] array = new int[mountData.totalFrames];
for (int i = 0; i < array.Length; i++)
{
array[i] = 30;
}
mountData.playerYOffsets = array;
mountData.playerHeadOffset = mountData.heightBoost;
mountData.xOffset = 1;
mountData.bodyFrame = 3;
mountData.yOffset = 0;
mountData.standingFrameCount = 1;
mountData.standingFrameDelay = 12;
mountData.standingFrameStart = 0;
mountData.runningFrameCount = 5;
mountData.runningFrameDelay = 20;
mountData.runningFrameStart = 1;
mountData.flyingFrameCount = 4;
mountData.flyingFrameDelay = 7;
mountData.flyingFrameStart = 7;
mountData.inAirFrameCount = 1;
mountData.inAirFrameDelay = 11;
mountData.inAirFrameStart = 8;
mountData.idleFrameCount = 1;
mountData.idleFrameDelay = 10;
mountData.idleFrameStart = 0;
mountData.idleFrameLoop = true;
mountData.swimFrameCount = mountData.inAirFrameCount;
mountData.swimFrameDelay = mountData.inAirFrameDelay;
mountData.swimFrameStart = mountData.inAirFrameStart;
mountData.dashSpeed = 25f;
mountData.dashingFrameCount = mountData.flyingFrameCount;
mountData.dashingFrameDelay = 5;
mountData.dashingFrameStart = mountData.flyingFrameStart;
if (Main.netMode != NetmodeID.Server)
{
mountData.textureWidth = mountData.backTexture.Width;
mountData.textureHeight = mountData.backTexture.Height;
}
}
public override void UpdateEffects(Player player)
{
if (Main.rand.NextBool(260) && Main.myPlayer == player.whoAmI)
{
Projectile.NewProjectileDirect(player.Center + Main.rand.NextVector2Circular(45f, 45f),
Main.rand.NextVector2Circular(15f, 15f),
ModContent.ProjectileType<Minibirb>(),
(int)(180 * player.AverageDamage()),
1f,
player.whoAmI).Calamity().forceTypeless = true;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+30
View File
@@ -0,0 +1,30 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Mounts
{
public class BirdSeed : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Bird Seed");
Tooltip.SetDefault("Summons a monstrosity");
}
public override void SetDefaults()
{
item.width = 34;
item.height = 36;
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.value = Item.sellPrice(0, 20, 0, 0);
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.Dedicated;
item.UseSound = SoundID.NPCHit51;
item.noMelee = true;
item.mountType = ModContent.MountType<BUMBLEDOGE>();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

+7
View File
@@ -44,6 +44,13 @@ namespace CalamityMod.Items.Pets
}
}
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Pets/RotomRemoteGlow");
Vector2 origin = new Vector2(texture.Width / 2f, texture.Height / 2f - 2f);
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);
Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

+45
View File
@@ -0,0 +1,45 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.FurnitureBotanic;
using CalamityMod.Items.Placeables.FurnitureCosmilite;
using CalamityMod.Items.Placeables.FurnitureSilva;
using CalamityMod.Tiles.Furniture;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Furniture
{
public class AuricToilet : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Auric Toilet");
Tooltip.SetDefault("This was used by the gods");
}
public override void SetDefaults()
{
item.width = 12;
item.height = 30;
item.maxStack = 99;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.createTile = ModContent.TileType<AuricToiletTile>();
item.Calamity().postMoonLordRarity = 15;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<BotanicChair>());
recipe.AddIngredient(ModContent.ItemType<CosmiliteChair>());
recipe.AddIngredient(ModContent.ItemType<SilvaChair>());
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 4);
recipe.SetResult(this);
recipe.AddTile(ModContent.TileType<DraedonsForge>());
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

+55
View File
@@ -0,0 +1,55 @@
using CalamityMod.Buffs.Potions;
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions
{
public class ShadowPotion : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Shadow Potion");
Tooltip.SetDefault("Causes the player to disappear while not attacking\n" +
"Holding different types of rogue weapons give the player boosts\n" +
"Different types of rogue weapons spawn different projectiles on hit\n" +
"Stealth generation is increased by 10%");
}
public override void SetDefaults()
{
item.width = 28;
item.height = 18;
item.useTurn = true;
item.maxStack = 30;
item.rare = 3;
item.useAnimation = 17;
item.useTime = 17;
item.useStyle = 2;
item.UseSound = SoundID.Item3;
item.consumable = true;
item.buffType = ModContent.BuffType<ShadowBuff>();
item.buffTime = 18000; //5 minutes
item.value = Item.buyPrice(0, 2, 0, 0);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<Shadowfish>());
recipe.AddIngredient(ItemID.InvisibilityPotion);
recipe.AddIngredient(ItemID.AlchemyTable);
recipe.AddTile(TileID.Bottles);
recipe.SetResult(this, 2);
recipe.AddRecipe();
recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<BloodOrb>(), 10);
recipe.AddIngredient(ItemID.InvisibilityPotion);
recipe.AddTile(TileID.AlchemyTable);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

+7 -4
View File
@@ -5,7 +5,10 @@ using CalamityMod.Items.Mounts;
using CalamityMod.Items.PermanentBoosters;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.NPCs.AstrumAureus;
using CalamityMod.World;
using Terraria;
@@ -34,10 +37,7 @@ namespace CalamityMod.Items.TreasureBags
item.rare = 9;
}
public override bool CanRightClick()
{
return true;
}
public override bool CanRightClick() => true;
public override void OpenBossBag(Player player)
{
@@ -50,7 +50,10 @@ namespace CalamityMod.Items.TreasureBags
// Weapons
DropHelper.DropItemChance(player, ModContent.ItemType<Nebulash>(), 3);
DropHelper.DropItemChance(player, ModContent.ItemType<AuroraBlazer>(), 3);
DropHelper.DropItemChance(player, ModContent.ItemType<AlulaAustralis>(), 3);
DropHelper.DropItemChance(player, ModContent.ItemType<BorealisBomber>(), 3);
DropHelper.DropItemChance(player, ModContent.ItemType<AuroradicalThrow>(), 3);
// Equipment
DropHelper.DropItemCondition(player, ModContent.ItemType<SquishyBeanMount>(), CalamityWorld.revenge && NPC.downedMoonlord);
+3 -4
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Mounts;
using CalamityMod.Items.PermanentBoosters;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Melee;
@@ -32,10 +33,7 @@ namespace CalamityMod.Items.TreasureBags
item.rare = 9;
}
public override bool CanRightClick()
{
return true;
}
public override bool CanRightClick() => true;
public override void OpenBossBag(Player player)
{
@@ -52,6 +50,7 @@ namespace CalamityMod.Items.TreasureBags
// Equipment
DropHelper.DropItem(player, ModContent.ItemType<DynamoStemCells>());
DropHelper.DropItemChance(player, ModContent.ItemType<BirdSeed>(), 3);
DropHelper.DropItemCondition(player, ModContent.ItemType<RedLightningContainer>(), CalamityWorld.revenge && !player.Calamity().rageBoostThree);
// Vanity
Loaded 100 of 474 files, more files were not shown because too many files have changed in this diff. Show more