Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
No files matched your search
@@ -2,6 +2,7 @@ using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -77,37 +78,37 @@ namespace CalamityMod.Buffs
|
||||
|
||||
public override void ModifyBuffTip(int type, ref string tip, ref int rare)
|
||||
{
|
||||
if (type == BuffID.NebulaUpDmg1)
|
||||
tip = "7.5% increased damage";
|
||||
else if (type == BuffID.NebulaUpDmg2)
|
||||
tip = "15% increased damage";
|
||||
else if (type == BuffID.NebulaUpDmg3)
|
||||
tip = "22.5% increased damage";
|
||||
else if (type == BuffID.WeaponImbueVenom || type == BuffID.WeaponImbueCursedFlames || type == BuffID.WeaponImbueFire || type == BuffID.WeaponImbueGold ||
|
||||
type == BuffID.WeaponImbueIchor || type == BuffID.WeaponImbueNanites || type == BuffID.WeaponImbuePoison)
|
||||
tip = "Rogue and " + tip;
|
||||
else if (type == BuffID.WeaponImbueConfetti)
|
||||
tip = "All attacks cause confetti to appear";
|
||||
else if (type == BuffID.IceBarrier)
|
||||
tip = "Damage taken is reduced by 15%";
|
||||
else if (type == BuffID.ChaosState)
|
||||
tip = "Rod of Discord teleports are disabled";
|
||||
else if (type == BuffID.Ichor)
|
||||
if (type == BuffID.NebulaUpDmg1)
|
||||
tip = "7.5% increased damage";
|
||||
else if (type == BuffID.NebulaUpDmg2)
|
||||
tip = "15% increased damage";
|
||||
else if (type == BuffID.NebulaUpDmg3)
|
||||
tip = "22.5% increased damage";
|
||||
else if (type == BuffID.WeaponImbueVenom || type == BuffID.WeaponImbueCursedFlames || type == BuffID.WeaponImbueFire || type == BuffID.WeaponImbueGold ||
|
||||
type == BuffID.WeaponImbueIchor || type == BuffID.WeaponImbueNanites || type == BuffID.WeaponImbuePoison)
|
||||
tip = "Rogue and " + tip;
|
||||
else if (type == BuffID.WeaponImbueConfetti)
|
||||
tip = "All attacks cause confetti to appear";
|
||||
else if (type == BuffID.IceBarrier)
|
||||
tip = "Damage taken is reduced by 15%";
|
||||
else if (type == BuffID.ChaosState)
|
||||
tip = "Rod of Discord teleports are disabled";
|
||||
else if (type == BuffID.Ichor)
|
||||
{
|
||||
tip = "Defense reduced by 20";
|
||||
if (CalamityWorld.revenge)
|
||||
tip += ". All damage taken increased by 25%";
|
||||
}
|
||||
else if (type == BuffID.CursedInferno && CalamityWorld.revenge)
|
||||
tip += ". All damage taken increased by 20%";
|
||||
else if (type == BuffID.Warmth)
|
||||
{
|
||||
tip = "Defense reduced by 20";
|
||||
if (CalamityWorld.revenge)
|
||||
tip += ". All damage taken increased by 25%";
|
||||
}
|
||||
else if (type == BuffID.CursedInferno && CalamityWorld.revenge)
|
||||
tip += ". All damage taken increased by 20%";
|
||||
else if (type == BuffID.Warmth)
|
||||
{
|
||||
tip += ". Immunity to the Chilled, Frozen, and Glacial State debuffs";
|
||||
tip += ". Immunity to the Chilled, Frozen, and Glacial State debuffs";
|
||||
if (CalamityWorld.death)
|
||||
tip += ". Provides cold protection in Death Mode";
|
||||
}
|
||||
else if (type == BuffID.Invisibility)
|
||||
tip += ". Grants rogue bonuses while holding certain rogue weapons";
|
||||
else if (type == BuffID.Invisibility)
|
||||
tip += ". Grants rogue bonuses while holding certain rogue weapons";
|
||||
else if (type == BuffID.ObsidianSkin && CalamityWorld.death)
|
||||
tip += ". Provides heat protection in Death Mode";
|
||||
else if (type == BuffID.Inferno && CalamityWorld.death)
|
||||
@@ -116,20 +117,52 @@ namespace CalamityMod.Buffs
|
||||
tip += ". Provides cold protection in Death Mode";
|
||||
else if (type == ModContent.BuffType<Molten>() && CalamityWorld.death)
|
||||
tip += ". Provides cold protection in Death Mode";
|
||||
else if (type == ModContent.BuffType<ProfanedBabs>())
|
||||
{
|
||||
Player player = Main.player[Main.myPlayer];
|
||||
bool offense = player.Calamity().gOffense;
|
||||
bool defense = player.Calamity().gDefense;
|
||||
if (offense && defense)
|
||||
{
|
||||
tip = "The Profaned Babs will fight for and defend you!";
|
||||
}
|
||||
else if (offense || defense)
|
||||
{
|
||||
tip = "The " + (offense ? "Offensive" : "Defensive") + " Duo will " + (offense ? "fight for and heal you!" : "protect and heal you!");
|
||||
}
|
||||
}
|
||||
else if (type == ModContent.BuffType<ProfanedBabs>())
|
||||
{
|
||||
Player player = Main.player[Main.myPlayer];
|
||||
bool offense = player.Calamity().gOffense;
|
||||
bool defense = player.Calamity().gDefense;
|
||||
if (player.Calamity().profanedCrystal && (!player.Calamity().profanedCrystalBuffs && !CalamityWorld.downedSCal))
|
||||
{
|
||||
tip = "The Profaned Babs will accompany you!";
|
||||
}
|
||||
else if (offense && defense)
|
||||
{
|
||||
tip = "The Profaned Babs will fight for and defend you!";
|
||||
}
|
||||
else if (offense || defense)
|
||||
{
|
||||
tip = "The " + (offense ? "Offensive" : "Defensive") + " Duo will " + (offense ? "fight for and heal you!" : "protect and heal you!");
|
||||
}
|
||||
}
|
||||
else if (type == ModContent.BuffType<ProfanedCrystalBuff>())
|
||||
{
|
||||
if (Main.player[Main.myPlayer].Calamity().profanedCrystalBuffs)
|
||||
{
|
||||
if (Main.player[Main.myPlayer].Calamity().endoCooper)
|
||||
{
|
||||
tip = "An ascended ice construct is suppressing your true potential..";
|
||||
}
|
||||
else if (Main.player[Main.myPlayer].Calamity().magicHat)
|
||||
{
|
||||
tip = "A magical hat overwhelms your senses, squandering your true potential..";
|
||||
}
|
||||
else
|
||||
{
|
||||
Player player = Main.player[Main.myPlayer];
|
||||
bool offense = (Main.dayTime && !player.wet) || player.lavaWet;
|
||||
bool enrage = player.statLife <= (int)((double)player.statLifeMax2 * 0.5);
|
||||
tip = "You are an emissary of the profaned goddess now!\n" +
|
||||
(offense ? "The " + (Main.dayTime ? "light of the sun" : "heat of the lava") + " empowers your offensive capabilities" :
|
||||
"The " + (player.wet ? (player.honeyWet ? "honey cools" : "water douses") : "darkness of night cools") + " your flames, empowering your defensive capabilities") +
|
||||
(enrage ? "\nYour weakened life force fuels your desperate attacks" : "");
|
||||
}
|
||||
}
|
||||
else if (CalamityWorld.downedSCal)
|
||||
{
|
||||
tip = "Your profaned soul is constrained by your insufficient summoning powers";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Pets
|
||||
{
|
||||
public class SparksBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Sparks");
|
||||
Description.SetDefault("Eats butterflies");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.lightPet[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
player.Calamity().sparks = true;
|
||||
bool PetProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType<Sparks>()] <= 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<Sparks>(), 0, 0f, player.whoAmI, 50f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 632 B |
@@ -0,0 +1,24 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class HallowedRuneAtkBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Hallowed Power");
|
||||
Description.SetDefault("Minion damage boosted by 15%");
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().sPower = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 604 B |
@@ -0,0 +1,24 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class HallowedRuneDefBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Hallowed Defense");
|
||||
Description.SetDefault("Defense boosted by 7 and damage reduction boosted by 7%");
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().hallowedDefense = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 651 B |
@@ -0,0 +1,24 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class HallowedRuneRegenBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Hallowed Regen");
|
||||
Description.SetDefault("Regenerating life");
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().sRegen = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 605 B |
@@ -0,0 +1,27 @@
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class ProfanedCrystalBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Devotion");
|
||||
Description.SetDefault("The profaned soul within has been defiled by the powerful magic of a supreme witch");
|
||||
Main.debuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
canBeCleared = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
if (CalamityWorld.downedSCal && (player.Calamity().minionSlotStat - player.slotsMinions) >= 10 && !player.Calamity().profanedCrystalForce)
|
||||
{
|
||||
player.Calamity().profanedCrystalBuffs = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 605 B |
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class BloodDragonsBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Skeletal Dragons");
|
||||
Description.SetDefault("Big happy family");
|
||||
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<SkeletalDragonMother>()] > 0)
|
||||
{
|
||||
modPlayer.dragonFamily = true;
|
||||
}
|
||||
if (!modPlayer.dragonFamily)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 567 B |
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class CorvidHarbringerBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Raven");
|
||||
Description.SetDefault("The powerful raven 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<PowerfulRaven>()] > 0)
|
||||
{
|
||||
modPlayer.powerfulRaven = true;
|
||||
}
|
||||
if (!modPlayer.powerfulRaven)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 540 B |
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class DazzlingStabberBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Dazzling Stabber");
|
||||
Description.SetDefault("En garde");
|
||||
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<DazzlingStabber>()] > 0)
|
||||
{
|
||||
modPlayer.providenceStabber = true;
|
||||
}
|
||||
if (!modPlayer.providenceStabber)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 602 B |
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class EndoHydraBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Endo Hydra");
|
||||
Description.SetDefault("The endo hydra will protect you... for some reason");
|
||||
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<EndoHydraBody>()] > 0)
|
||||
{
|
||||
modPlayer.endoHydra = true;
|
||||
}
|
||||
if (!modPlayer.endoHydra)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 582 B |
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class FuelCellBundleBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Mini Plaguebringer");
|
||||
Description.SetDefault("A small plague bee 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<PlaguebringerMK2>()] > 0)
|
||||
{
|
||||
modPlayer.plaguebringerMK2 = true;
|
||||
}
|
||||
if (!modPlayer.plaguebringerMK2)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 545 B |
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class IgneousExaltationBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Igneous Blade");
|
||||
Description.SetDefault("A blade is orbiting 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<IgneousBlade>()] > 0)
|
||||
{
|
||||
modPlayer.igneousExaltation = true;
|
||||
}
|
||||
if (!modPlayer.providenceStabber)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 540 B |
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class MagicHatBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Magic Hat");
|
||||
Description.SetDefault("The hat carries your soul, bound by a contract");
|
||||
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<MagicHat>()] > 0)
|
||||
{
|
||||
modPlayer.magicHat = true;
|
||||
}
|
||||
if (!modPlayer.magicHat)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 509 B |
@@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.Summon
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (!modPlayer.gHealer)
|
||||
if (!modPlayer.gHealer || modPlayer.profanedCrystalBuffs)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class RadiantResolutionBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Radiant Resolution");
|
||||
Description.SetDefault("A radiant aura protects 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<RadiantResolutionAura>()] > 0)
|
||||
{
|
||||
modPlayer.radiantResolution = true;
|
||||
}
|
||||
if (!modPlayer.radiantResolution)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 411 B |
@@ -555,7 +555,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (player.cratePotion && Main.rand.NextBool(5)) // 20%
|
||||
if (player.cratePotion && Main.rand.NextBool(5)) // 20%
|
||||
{
|
||||
caughtType = ModContent.ItemType<AbyssalCrate>();
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.lifeRegen = 0;
|
||||
|
||||
player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 30;
|
||||
lifeRegenLost += modPlayer.profanedCrystalBuffs ? 35 : 30;
|
||||
}
|
||||
|
||||
if (modPlayer.astralInfection)
|
||||
@@ -551,7 +551,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (modPlayer.sRegen)
|
||||
player.lifeRegen += 2;
|
||||
|
||||
if (modPlayer.affliction || modPlayer.afflicted)
|
||||
if (modPlayer.hallowedRegen)
|
||||
player.lifeRegen += 3;
|
||||
|
||||
if (modPlayer.affliction || modPlayer.afflicted)
|
||||
player.lifeRegen += 1;
|
||||
|
||||
if (modPlayer.absorber)
|
||||
|
||||
@@ -17,6 +17,7 @@ using CalamityMod.NPCs.NormalNPCs;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.Enemy;
|
||||
using CalamityMod.Projectiles.Environment;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
@@ -35,10 +36,10 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.CalPlayer
|
||||
{
|
||||
public class CalamityPlayerMiscEffects
|
||||
{
|
||||
#region Post Update Misc Effects
|
||||
public static void CalamityPostUpdateMiscEffects(Player player, Mod mod)
|
||||
{
|
||||
{
|
||||
#region Post Update Misc Effects
|
||||
public static void CalamityPostUpdateMiscEffects(Player player, Mod mod)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
// No category
|
||||
@@ -397,15 +398,31 @@ namespace CalamityMod.CalPlayer
|
||||
player.breath--;
|
||||
}
|
||||
}
|
||||
|
||||
//extra DoT in the lava of the crags
|
||||
if (modPlayer.ZoneCalamity && player.lavaWet)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CragsLava>(), 2, false);
|
||||
}
|
||||
|
||||
// Death Mode effects
|
||||
modPlayer.caveDarkness = 0f;
|
||||
//extra DoT in the lava of the crags
|
||||
if (modPlayer.ZoneCalamity && player.lavaWet)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CragsLava>(), 2, false);
|
||||
}
|
||||
|
||||
// Acid rain droplets
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (CalamityWorld.rainingAcid && player.Calamity().ZoneSulphur && !CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
int acidRainDropRate = (int)MathHelper.Clamp(Main.invasionSize * 0.4f, 13.5f, 50);
|
||||
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 && Main.rand.NextBool(2))
|
||||
{
|
||||
Projectile.NewProjectile(spawnPoint, Vector2.UnitY * Main.rand.NextFloat(7f, 11f),
|
||||
ModContent.ProjectileType<AcidDrop>(), 28, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Death Mode effects
|
||||
modPlayer.caveDarkness = 0f;
|
||||
if (CalamityWorld.death)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
@@ -457,7 +474,7 @@ namespace CalamityMod.CalPlayer
|
||||
bool hasMoltenSet = player.head == ArmorIDs.Head.MoltenHelmet && player.body == ArmorIDs.Body.MoltenBreastplate && player.legs == ArmorIDs.Legs.MoltenGreaves;
|
||||
|
||||
bool immunityToHotAndCold = hasMoltenSet || player.magmaStone || player.frostArmor || modPlayer.fBulwark || modPlayer.fBarrier ||
|
||||
modPlayer.frostFlare || modPlayer.rampartOfDeities || modPlayer.cryogenSoul || modPlayer.snowman || modPlayer.blazingCore || modPlayer.permafrostsConcoction;
|
||||
modPlayer.frostFlare || modPlayer.rampartOfDeities || modPlayer.cryogenSoul || modPlayer.snowman || modPlayer.blazingCore || modPlayer.permafrostsConcoction || modPlayer.profanedCrystalBuffs;
|
||||
|
||||
bool immunityToCold = player.HasBuff(BuffID.Campfire) || Main.campfire || player.resistCold || modPlayer.eskimoSet || player.buffImmune[BuffID.Frozen] ||
|
||||
player.HasBuff(BuffID.Inferno) || immunityToHotAndCold || modPlayer.externalColdImmunity;
|
||||
@@ -582,7 +599,9 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
int randomFrequency2 = (int)(20f * frequencyMult);
|
||||
if (player.miscCounter % (Main.hardMode ? 90 : 120) == 0 && Main.rand.NextBool(randomFrequency2))
|
||||
if (CalamityWorld.rainingAcid && player.Calamity().ZoneSulphur)
|
||||
randomFrequency2 = (int)(randomFrequency2 * 3.75);
|
||||
if (player.miscCounter % (Main.hardMode ? 90 : 120) == 0 && Main.rand.NextBool(randomFrequency2))
|
||||
{
|
||||
if (!tileSafely.active())
|
||||
{
|
||||
@@ -764,23 +783,27 @@ namespace CalamityMod.CalPlayer
|
||||
player.allDamage += damageUp;
|
||||
modPlayer.AllCritBoost(critUp);
|
||||
}
|
||||
|
||||
bool canProvideBuffs = player.Calamity().profanedCrystalBuffs || (!modPlayer.profanedCrystal && modPlayer.pArtifact) || (player.Calamity().profanedCrystal && CalamityWorld.downedSCal);
|
||||
bool attack = player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] > 0;
|
||||
// Guardian bonuses if not burnt out
|
||||
if (!modPlayer.bOut)
|
||||
if (!modPlayer.bOut && canProvideBuffs)
|
||||
{
|
||||
if (modPlayer.gHealer)
|
||||
bool healer = player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] > 0;
|
||||
bool defend = player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] > 0;
|
||||
if (healer)
|
||||
{
|
||||
if (modPlayer.healCounter > 0)
|
||||
modPlayer.healCounter--;
|
||||
|
||||
if (modPlayer.healCounter <= 0)
|
||||
{
|
||||
modPlayer.healCounter = 300;
|
||||
bool enrage = player.statLife <= (int)((double)player.statLifeMax2 * 0.5);
|
||||
modPlayer.healCounter = (!enrage && player.Calamity().profanedCrystalBuffs) ? 360 : 300;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
int healAmount = 5 +
|
||||
(modPlayer.gDefense ? 5 : 0) +
|
||||
(modPlayer.gOffense ? 5 : 0);
|
||||
(defend ? 5 : 0) +
|
||||
(attack ? 5 : 0);
|
||||
|
||||
player.statLife += healAmount;
|
||||
player.HealEffect(healAmount);
|
||||
@@ -788,23 +811,23 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (modPlayer.gDefense)
|
||||
if (defend)
|
||||
{
|
||||
player.moveSpeed += 0.1f +
|
||||
(modPlayer.gOffense ? 0.1f : 0f);
|
||||
(attack ? 0.1f : 0f);
|
||||
player.endurance += 0.025f +
|
||||
(modPlayer.gOffense ? 0.025f : 0f);
|
||||
(attack ? 0.025f : 0f);
|
||||
}
|
||||
|
||||
if (modPlayer.gOffense)
|
||||
if (attack)
|
||||
{
|
||||
player.minionDamage += 0.1f +
|
||||
(modPlayer.gDefense ? 0.05f : 0f);
|
||||
(defend ? 0.05f : 0f);
|
||||
}
|
||||
}
|
||||
|
||||
// You always get the max minions, even during the effect of the burnout debuff
|
||||
if (modPlayer.gOffense)
|
||||
if (attack && canProvideBuffs)
|
||||
player.maxMinions++;
|
||||
|
||||
// Cooldowns and timers
|
||||
@@ -828,8 +851,8 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.featherCrownCooldown--;
|
||||
if (modPlayer.moonCrownCooldown > 0)
|
||||
modPlayer.moonCrownCooldown--;
|
||||
if (modPlayer.nanoFlareCooldown > 0)
|
||||
modPlayer.nanoFlareCooldown--;
|
||||
if (modPlayer.nanoFlareCooldown > 0)
|
||||
modPlayer.nanoFlareCooldown--;
|
||||
if (modPlayer.spectralVeilImmunity > 0)
|
||||
modPlayer.spectralVeilImmunity--;
|
||||
if (modPlayer.plaguedFuelPackCooldown > 0)
|
||||
@@ -860,6 +883,8 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.gaelRageCooldown--;
|
||||
if (modPlayer.projRefRareLifeRegenCounter > 0)
|
||||
modPlayer.projRefRareLifeRegenCounter--;
|
||||
if (modPlayer.hurtSoundTimer > 0)
|
||||
modPlayer.hurtSoundTimer--;
|
||||
|
||||
// Silva invincibility effects
|
||||
if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet)
|
||||
@@ -1635,17 +1660,17 @@ namespace CalamityMod.CalPlayer
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X, player.velocity.Y, ModContent.ProjectileType<SabatonSlam>(), 0, 0, player.whoAmI);
|
||||
}
|
||||
}
|
||||
if (modPlayer.gSabatonCooldown == 1) //dust when ready to use again
|
||||
{
|
||||
for (int i = 0; i < 66; i++)
|
||||
{
|
||||
int d = Dust.NewDust(player.position, player.width, player.height, Main.rand.NextBool(2) ? ModContent.DustType<AstralBlue>() : ModContent.DustType<AstralOrange>(), 0, 0, 100, default, 2.6f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].noLight = true;
|
||||
Main.dust[d].fadeIn = 1f;
|
||||
Main.dust[d].velocity *= 6.6f;
|
||||
}
|
||||
}
|
||||
if (modPlayer.gSabatonCooldown == 1) //dust when ready to use again
|
||||
{
|
||||
for (int i = 0; i < 66; i++)
|
||||
{
|
||||
int d = Dust.NewDust(player.position, player.width, player.height, Main.rand.NextBool(2) ? ModContent.DustType<AstralBlue>() : ModContent.DustType<AstralOrange>(), 0, 0, 100, default, 2.6f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].noLight = true;
|
||||
Main.dust[d].fadeIn = 1f;
|
||||
Main.dust[d].velocity *= 6.6f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -3140,7 +3165,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.npcTypeNoAggro[ModContent.NPCType<WulfrumSlime>()] = true;
|
||||
}
|
||||
|
||||
/*if (modPlayer.dukeScales)
|
||||
if (modPlayer.dukeScales)
|
||||
{
|
||||
player.buffImmune[ModContent.BuffType<SulphuricPoisoning>()] = true;
|
||||
player.buffImmune[BuffID.Poisoned] = true;
|
||||
@@ -3160,7 +3185,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.allDamage += 0.1f;
|
||||
modPlayer.AllCritBoost(5);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
if (modPlayer.auricSet && modPlayer.silvaMelee)
|
||||
{
|
||||
@@ -3193,35 +3218,83 @@ namespace CalamityMod.CalPlayer
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<SonOfYharon>(), (int)(232f * (player.allDamage + player.minionDamage - 1f)), 2f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
if (modPlayer.pArtifact)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (player.FindBuffIndex(ModContent.BuffType<ProfanedBabs>()) == -1)
|
||||
if (player.FindBuffIndex(ModContent.BuffType<ProfanedBabs>()) == -1 && !player.Calamity().profanedCrystalBuffs)
|
||||
player.AddBuff(ModContent.BuffType<ProfanedBabs>(), 3600, true);
|
||||
|
||||
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);
|
||||
|
||||
float baseDamage = 100f +
|
||||
float baseDamage = (modPlayer.profanedCrystal && !modPlayer.profanedCrystalBuffs) ? 0f : 100f +
|
||||
(CalamityWorld.downedDoG ? 100f : 0f) +
|
||||
(CalamityWorld.downedYharon ? 100f : 0f);
|
||||
(CalamityWorld.downedYharon ? 100f : 0f) +
|
||||
(modPlayer.profanedCrystalBuffs ? 700f : 0f);
|
||||
|
||||
if (player.Calamity().minionSlotStat >= 10)
|
||||
if (modPlayer.profanedCrystal || player.Calamity().minionSlotStat >= 10)
|
||||
{
|
||||
player.Calamity().gDefense = true;
|
||||
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] < 1)
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -3f, ModContent.ProjectileType<MiniGuardianDefense>(), (int)(baseDamage * (player.allDamage + player.minionDamage - 1f)), 1f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -3f, ModContent.ProjectileType<MiniGuardianDefense>(), baseDamage == 0 ? 0 : (int)(baseDamage * (player.allDamage + player.minionDamage - 1f)), 1f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
|
||||
if (modPlayer.tarraSummon || modPlayer.bloodflareSummon || modPlayer.godSlayerSummon || modPlayer.silvaSummon || modPlayer.dsSetBonus || modPlayer.omegaBlueSet || modPlayer.fearmongerSet)
|
||||
if (modPlayer.profanedCrystal || (modPlayer.tarraSummon || modPlayer.bloodflareSummon || modPlayer.godSlayerSummon || modPlayer.silvaSummon || modPlayer.dsSetBonus || modPlayer.omegaBlueSet || modPlayer.fearmongerSet))
|
||||
{
|
||||
player.Calamity().gOffense = true;
|
||||
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] < 1)
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<MiniGuardianAttack>(), (int)(baseDamage * (player.allDamage + player.minionDamage - 1f)), 1f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<MiniGuardianAttack>(), baseDamage == 0 ? 0 : (int)(baseDamage * (player.allDamage + player.minionDamage - 1f)), 1f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (modPlayer.profanedCrystalBuffs && modPlayer.gOffense && modPlayer.gDefense)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.scope = false; //this is so it doesn't mess with the balance of ranged transform attacks over the others
|
||||
player.lavaImmune = true;
|
||||
player.lavaMax += 420;
|
||||
player.lavaRose = true;
|
||||
player.fireWalk = true;
|
||||
player.buffImmune[ModContent.BuffType<HolyFlames>()] = true;
|
||||
player.buffImmune[BuffID.OnFire] = true;
|
||||
player.buffImmune[BuffID.Burning] = true;
|
||||
player.buffImmune[BuffID.Daybreak] = true;
|
||||
bool offenseBuffs = (Main.dayTime && !player.wet) || player.lavaWet;
|
||||
if (offenseBuffs)
|
||||
{
|
||||
player.minionDamage += 0.15f;
|
||||
player.minionKB += 0.15f;
|
||||
player.moveSpeed += 0.25f;
|
||||
player.statDefense -= 15;
|
||||
if (!player.Calamity().yharonLore)
|
||||
player.wingTimeMax = (int)((float)player.wingTimeMax * 1.1f);
|
||||
player.ignoreWater = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.moveSpeed -= 0.15f;
|
||||
player.endurance += 0.05f;
|
||||
player.statDefense += 15;
|
||||
player.lifeRegen += 5;
|
||||
}
|
||||
bool enrage = player.statLife <= (int)((double)player.statLifeMax2 * 0.5);
|
||||
bool notRetro = Lighting.NotRetro;
|
||||
if (!modPlayer.ZoneAbyss) //No abyss memes.
|
||||
Lighting.AddLight(player.Center, enrage ? 60 : offenseBuffs ? 50 : 10, enrage ? 12 : offenseBuffs ? 10 : 2, 0);
|
||||
if (enrage)
|
||||
{
|
||||
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 : 244, 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3253,10 +3326,10 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
else if (player.ownedProjectileCounts[ModContent.ProjectileType<TeslaAura>()] != 0)
|
||||
{
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
for (int i = 0; i < 1000; i++)
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType<TeslaAura>() && Main.projectile[i].owner == player.whoAmI)
|
||||
{
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.ILEditing;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Accessories.Vanity;
|
||||
using CalamityMod.Items.Armor;
|
||||
using CalamityMod.Items.Fishing.AstralCatches;
|
||||
using CalamityMod.Items.Fishing.SunkenSeaCatches;
|
||||
using CalamityMod.Items.Fishing.FishingRods;
|
||||
using CalamityMod.Items.Fishing.SunkenSeaCatches;
|
||||
using CalamityMod.Items.LoreItems;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Tools;
|
||||
@@ -48,9 +50,8 @@ using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.NPCs.Yharon;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.Enemy;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Skies;
|
||||
@@ -75,22 +76,18 @@ using CalamityMod.UI;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Events;
|
||||
using Terraria.Graphics;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.Config;
|
||||
using Terraria.UI;
|
||||
using Terraria.UI.Chat;
|
||||
|
||||
namespace CalamityMod
|
||||
{
|
||||
@@ -200,7 +197,9 @@ namespace CalamityMod
|
||||
public static List<int> hornetList;
|
||||
public static List<int> mossHornetList;
|
||||
|
||||
private Mod thorium = null;
|
||||
// TODO -- Calamity should check for other mods existing in exactly one place
|
||||
internal Mod thorium = null;
|
||||
public bool fargosMutant = false;
|
||||
|
||||
internal static Configs CalamityConfig;
|
||||
internal static CalamityMod instance;
|
||||
@@ -232,6 +231,8 @@ namespace CalamityMod
|
||||
LoadClient();
|
||||
}
|
||||
|
||||
ILChanges.Initialize();
|
||||
|
||||
thorium = ModLoader.GetMod("ThoriumMod");
|
||||
|
||||
BossHealthBarManager.Load(this);
|
||||
@@ -264,6 +265,13 @@ namespace CalamityMod
|
||||
AddEquipTexture(new PopoBody(), null, EquipType.Body, "PopoBody", "CalamityMod/Items/Accessories/Vanity/Popo_Body", "CalamityMod/Items/Accessories/Vanity/Popo_Arms");
|
||||
AddEquipTexture(new PopoLegs(), null, EquipType.Legs, "PopoLeg", "CalamityMod/Items/Accessories/Vanity/Popo_Legs");
|
||||
|
||||
AddEquipTexture(new ProfanedCrystalHead(), null, EquipType.Head, "ProviHead", "CalamityMod/Items/Accessories/ProfanedSoulTransHead");
|
||||
AddEquipTexture(new ProfanedCrystalBody(), null, EquipType.Body, "ProviBody", "CalamityMod/Items/Accessories/ProfanedSoulTransBody", "CalamityMod/Items/Accessories/ProfanedSoulTransArms");
|
||||
AddEquipTexture(new ProfanedCrystalLegs(), null, EquipType.Legs, "ProviLegs", "CalamityMod/Items/Accessories/ProfanedSoulTransLegs");
|
||||
AddEquipTexture(new ProfanedCrystalWings(), null, EquipType.Wings, "ProviWings", "CalamityMod/Items/Accessories/Wings/ProfanedSoulTransWings");
|
||||
|
||||
AddEquipTexture(new SnowRuffianWings(), null, EquipType.Wings, "SnowRuffWings", "CalamityMod/Items/Armor/SnowRuffianWings");
|
||||
|
||||
AstralCactusTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/Tiles/AstralCactus");
|
||||
AstralCactusGlowTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/Tiles/AstralCactusGlow");
|
||||
AstralSky = ModContent.GetTexture("CalamityMod/ExtraTextures/AstralSky");
|
||||
@@ -395,6 +403,7 @@ namespace CalamityMod
|
||||
mossHornetList = null;
|
||||
|
||||
thorium = null;
|
||||
fargosMutant = false;
|
||||
|
||||
CalamityConfig = null;
|
||||
instance = null;
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
using CalamityMod.ILEditing;
|
||||
using CalamityMod.NPCs.AcidRain;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
|
||||
namespace CalamityMod.Events
|
||||
{
|
||||
public class AcidRainEvent
|
||||
{
|
||||
// Make sure this does not interfere with any vanilla values. An obscure and random number is used just in case
|
||||
// Any other mods are changing the invasion ID as well.
|
||||
public const int InvasionID = 57;
|
||||
|
||||
// A partially bright pale-ish cyan with a hint of yellow.
|
||||
public static readonly Color TextColor = new Color(115, 194, 147);
|
||||
|
||||
// Not readonly so that if anyone else wants to add stuff in here with their own mod, they can.
|
||||
// The first value is the NPC type, the second is the value they're worth in the event
|
||||
public static List<(int, int)> PossibleEnemies = new List<(int, int)>()
|
||||
{
|
||||
( ModContent.NPCType<Radiator>(), 0 ),
|
||||
( ModContent.NPCType<NuclearToad>(), 0 ),
|
||||
( ModContent.NPCType<AcidEel>(), 0 ),
|
||||
( ModContent.NPCType<Orthocera>(), 1 ),
|
||||
( ModContent.NPCType<IrradiatedSlime>(), 1 ),
|
||||
( ModContent.NPCType<WaterLeech>(), 1 ),
|
||||
( ModContent.NPCType<Skyfin>(), 1 ),
|
||||
( ModContent.NPCType<Trilobite>(), 1 )
|
||||
};
|
||||
|
||||
// Temporary variable. Remove when Old Duke is added.
|
||||
internal const bool OldDukeExists = false;
|
||||
|
||||
/// <summary>
|
||||
/// Broadcasts some text from a given localization key.
|
||||
/// </summary>
|
||||
/// <param name="localizationKey">The key to write</param>
|
||||
public static void BroadcastEventText(string localizationKey)
|
||||
{
|
||||
if (Main.netMode == NetmodeID.SinglePlayer)
|
||||
{
|
||||
Main.NewText(Language.GetTextValue(localizationKey), TextColor);
|
||||
}
|
||||
else if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
NetMessage.BroadcastChatMessage(NetworkText.FromKey(localizationKey), TextColor);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Checks if the player's screen is in the view of the invasion, based on <paramref name="rectangleCheckSize"/>.
|
||||
/// </summary>
|
||||
/// <param name="rectangleCheckSize">The area to check based on the screen.</param>
|
||||
/// <param name="iconID">The ID for the icon. For more info on how this works, check <see cref="ILChanges.Initialize"/>.</param>.
|
||||
/// <returns></returns>
|
||||
public static bool NearInvasionCheck(int rectangleCheckSize, ref int iconID)
|
||||
{
|
||||
Rectangle screen = new Rectangle((int)Main.screenPosition.X, (int)Main.screenPosition.Y, Main.screenWidth, Main.screenHeight);
|
||||
for (int i = 0; i < Main.npc.Length; i++)
|
||||
{
|
||||
if (Main.npc[i].active)
|
||||
{
|
||||
iconID = InvasionID;
|
||||
int type = Main.npc[i].type;
|
||||
for (int j = 0; j < PossibleEnemies.Count; j++)
|
||||
{
|
||||
if (PossibleEnemies.Select(enemy => enemy.Item2).Contains(type))
|
||||
{
|
||||
Rectangle invasionCheckArea = new Rectangle((int)Main.npc[i].Center.X - rectangleCheckSize / 2, (int)Main.npc[i].Center.Y - rectangleCheckSize / 2,
|
||||
rectangleCheckSize, rectangleCheckSize);
|
||||
if (screen.Intersects(invasionCheckArea))
|
||||
{
|
||||
Main.invasionProgressDisplayLeft = 480;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// Attempts to start the Acid Rain event. Will fail if there is another invasion going on.
|
||||
/// </summary>
|
||||
public static void TryStartEvent()
|
||||
{
|
||||
if (CalamityWorld.rainingAcid)
|
||||
return;
|
||||
int playerCount = 0;
|
||||
for (int i = 0; i < Main.player.Length; i++)
|
||||
{
|
||||
if (Main.player[i].active)
|
||||
{
|
||||
playerCount++;
|
||||
}
|
||||
}
|
||||
if (playerCount > 0)
|
||||
{
|
||||
// So that vanilla doesn't shit itself
|
||||
Main.invasionType = -1;
|
||||
|
||||
CalamityWorld.rainingAcid = true;
|
||||
// The E - 1 part is to ensure that we start at 1 as a multiple instead of 0
|
||||
// At a maximum of 255 players, the max multiplier is 9.98, or 998 enemies that need to be killed.
|
||||
Main.invasionSize = Main.invasionSizeStart = (int)(180 * Math.Log(playerCount + Math.E - 1));
|
||||
Main.invasionProgress = 0;
|
||||
Main.invasionProgressIcon = 3;
|
||||
Main.invasionProgressWave = 0;
|
||||
|
||||
// Make it rain normally
|
||||
Main.raining = true;
|
||||
|
||||
// If abyssSide is true, then the abyss was generated on the left side of the world.
|
||||
// If false, the right.
|
||||
Main.invasionX = CalamityWorld.abyssSide ? 0 : Main.maxTilesX;
|
||||
}
|
||||
BroadcastEventText("Mods.CalamityMod.AcidRainStart"); // A toxic downpour falls over the wasteland seas!
|
||||
}
|
||||
/// <summary>
|
||||
/// Updates the invasion, checking to see if it has ended.
|
||||
/// </summary>
|
||||
public static void UpdateInvasion()
|
||||
{
|
||||
// If the custom invasion is up
|
||||
if (CalamityWorld.rainingAcid)
|
||||
{
|
||||
foreach (Player p in Main.player)
|
||||
{
|
||||
NetMessage.SendData(MessageID.InvasionProgressReport, p.whoAmI, -1, null, Main.invasionSizeStart - Main.invasionSize, (float)Main.invasionSizeStart, (float)(Main.invasionType + 3), 0f, 0, 0, 0);
|
||||
}
|
||||
// End invasion if we've defeated all the enemies, including Old Duke
|
||||
if (Main.invasionSize <= 0)
|
||||
{
|
||||
CalamityWorld.rainingAcid = false;
|
||||
BroadcastEventText("Mods.CalamityMod.AcidRainEnd"); // The sulfuric skies begin to clear...
|
||||
Main.invasionType = 0;
|
||||
Main.invasionDelay = 0;
|
||||
Main.invasionProgressNearInvasion = false;
|
||||
Main.invasionProgressDisplayLeft = 0;
|
||||
|
||||
// Turn off the rain from the event
|
||||
Main.numCloudsTemp = Main.rand.Next(5, 20 + 1);
|
||||
Main.numClouds = Main.numCloudsTemp;
|
||||
Main.windSpeedTemp = Main.rand.NextFloat(0.04f, 0.25f);
|
||||
Main.windSpeedSet = Main.windSpeedTemp;
|
||||
Main.raining = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 804 B |
|
After Width: | Height: | Size: 498 B |
|
After Width: | Height: | Size: 709 B |
|
After Width: | Height: | Size: 642 B |
|
After Width: | Height: | Size: 511 B |
|
After Width: | Height: | Size: 329 B |
|
After Width: | Height: | Size: 347 B |
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 714 B |
|
After Width: | Height: | Size: 832 B |
|
After Width: | Height: | Size: 714 B |
|
After Width: | Height: | Size: 832 B |
|
After Width: | Height: | Size: 424 B |
|
After Width: | Height: | Size: 349 B |
|
After Width: | Height: | Size: 659 B |
|
After Width: | Height: | Size: 960 B |
|
After Width: | Height: | Size: 321 B |
|
After Width: | Height: | Size: 413 B |
@@ -0,0 +1,214 @@
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using MonoMod.Cil;
|
||||
using static Mono.Cecil.Cil.OpCodes;
|
||||
namespace CalamityMod.ILEditing
|
||||
{
|
||||
public class ILChanges
|
||||
{
|
||||
/// <summary>
|
||||
/// Loads all IL Editing changes in the mod.
|
||||
/// </summary>
|
||||
public static void Initialize()
|
||||
{
|
||||
IL.Terraria.Main.DrawInvasionProgress += (il) =>
|
||||
{
|
||||
// 201 was retrieved by searching the instructions in dnspy
|
||||
var cursor = new ILCursor(il)
|
||||
{
|
||||
Index = 201
|
||||
};
|
||||
cursor.EmitDelegate<Action>(() =>
|
||||
{
|
||||
if ((CalamityWorld.rainingAcid && !Main.LocalPlayer.Calamity().ZoneSulphur) ||
|
||||
(!CalamityWorld.rainingAcid && Main.LocalPlayer.Calamity().ZoneSulphur))
|
||||
return;
|
||||
float progressAlpha = 0.5f + Main.invasionProgressAlpha * 0.5f;
|
||||
if (CalamityWorld.rainingAcid && Main.LocalPlayer.Calamity().ZoneSulphur &&
|
||||
Main.LocalPlayer.Center.Y < (int)(Main.worldSurface * 16) + 1600)
|
||||
{
|
||||
int sizeX = (int)(200f * progressAlpha);
|
||||
int sizeY = (int)(45f * progressAlpha);
|
||||
Vector2 screenCoords = new Vector2(Main.screenWidth - 120, Main.screenHeight - 40);
|
||||
Rectangle screenCoordsRectangle = new Rectangle((int)screenCoords.X - sizeX / 2, (int)screenCoords.Y - sizeY / 2, sizeX, sizeY);
|
||||
Utils.DrawInvBG(Main.spriteBatch, screenCoordsRectangle, new Color(63, 65, 151, 255) * 0.785f);
|
||||
|
||||
float progressRatio = 1f - MathHelper.Clamp(Main.invasionSize / (float)Main.invasionSizeStart, 0f, 1f);
|
||||
string progressText = $"{((int)(100 * progressRatio)).ToString()}%";
|
||||
progressText = Language.GetTextValue("Game.WaveCleared", progressText);
|
||||
Texture2D barTexture = Main.colorBarTexture;
|
||||
Texture2D blipTexture = Main.colorBlipTexture;
|
||||
Main.spriteBatch.Draw(barTexture, screenCoords, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2(barTexture.Width / 2, 0f), progressAlpha, SpriteEffects.None, 0f);
|
||||
Vector2 textMeasurement = Main.fontMouseText.MeasureString(progressText);
|
||||
float adjustedAlpha = progressAlpha;
|
||||
if (textMeasurement.Y > 22f)
|
||||
{
|
||||
adjustedAlpha *= 22f / textMeasurement.Y;
|
||||
}
|
||||
float barDrawOffsetX = 169f * progressAlpha;
|
||||
float scaleY = 8f * progressAlpha;
|
||||
Vector2 barDrawPosition = screenCoords + Vector2.UnitY * scaleY + Vector2.UnitX * 1f;
|
||||
Utils.DrawBorderString(Main.spriteBatch, progressText, barDrawPosition + new Vector2(0f, -4f), Color.White * Main.invasionProgressAlpha, adjustedAlpha, 0.5f, 1f, -1);
|
||||
barDrawPosition += Vector2.UnitX * (progressRatio - 0.5f) * barDrawOffsetX;
|
||||
Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 241, 51) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(barDrawOffsetX * progressRatio, scaleY), SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 165, 0, 127) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(2f, scaleY), SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.Black * Main.invasionProgressAlpha, 0f, new Vector2(0f, 0.5f), new Vector2(barDrawOffsetX * (1f - progressRatio), scaleY), SpriteEffects.None, 0f);
|
||||
|
||||
string invasionNameText = "Acid Rain";
|
||||
Vector2 textMeasurement2 = Main.fontMouseText.MeasureString(invasionNameText);
|
||||
float x = 120f;
|
||||
if (textMeasurement2.X > 200f)
|
||||
{
|
||||
x += textMeasurement2.X - 200f;
|
||||
}
|
||||
Texture2D iconTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/AcidRainIcon");
|
||||
Rectangle iconRectangle = Utils.CenteredRectangle(new Vector2(Main.screenWidth - x, Main.screenHeight - 80), (textMeasurement2 + new Vector2(iconTexture.Width + 12, 6f)) * progressAlpha);
|
||||
Utils.DrawInvBG(Main.spriteBatch, iconRectangle, AcidRainEvent.TextColor * 0.5f);
|
||||
Main.spriteBatch.Draw(iconTexture, iconRectangle.Left() + Vector2.UnitX * progressAlpha * 8f, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2(0f, (float)(iconTexture.Height / 2)), progressAlpha * 0.8f, SpriteEffects.None, 0f);
|
||||
Utils.DrawBorderString(Main.spriteBatch, invasionNameText, iconRectangle.Right() + Vector2.UnitX * progressAlpha * -22f, Color.White * Main.invasionProgressAlpha, progressAlpha * 0.9f, 1f, 0.4f, -1);
|
||||
}
|
||||
// I don't have the energy to clean this up. If you want to do so, go ahead.
|
||||
else
|
||||
{
|
||||
Texture2D texture2D = Main.extraTexture[9];
|
||||
string text = "";
|
||||
Color c = Color.White;
|
||||
if (Main.invasionProgressIcon == 1)
|
||||
{
|
||||
texture2D = Main.extraTexture[8];
|
||||
text = Lang.inter[83].Value;
|
||||
c = new Color(64, 109, 164) * 0.5f;
|
||||
}
|
||||
else if (Main.invasionProgressIcon == 2)
|
||||
{
|
||||
texture2D = Main.extraTexture[12];
|
||||
text = Lang.inter[84].Value;
|
||||
c = new Color(112, 86, 114) * 0.5f;
|
||||
}
|
||||
else if (Main.invasionProgressIcon == 3)
|
||||
{
|
||||
texture2D = Main.extraTexture[79];
|
||||
text = Language.GetTextValue("DungeonDefenders2.InvasionProgressTitle");
|
||||
c = new Color(88, 0, 160) * 0.5f;
|
||||
}
|
||||
else if (Main.invasionProgressIcon == 7)
|
||||
{
|
||||
texture2D = Main.extraTexture[10];
|
||||
text = Lang.inter[85].Value;
|
||||
c = new Color(165, 160, 155) * 0.5f;
|
||||
}
|
||||
else if (Main.invasionProgressIcon == 6)
|
||||
{
|
||||
texture2D = Main.extraTexture[11];
|
||||
text = Lang.inter[86].Value;
|
||||
c = new Color(148, 122, 72) * 0.5f;
|
||||
}
|
||||
else if (Main.invasionProgressIcon == 5)
|
||||
{
|
||||
texture2D = Main.extraTexture[7];
|
||||
text = Lang.inter[87].Value;
|
||||
c = new Color(173, 135, 140) * 0.5f;
|
||||
}
|
||||
else if (Main.invasionProgressIcon == 4)
|
||||
{
|
||||
texture2D = Main.extraTexture[9];
|
||||
text = Lang.inter[88].Value;
|
||||
c = new Color(94, 72, 131) * 0.5f;
|
||||
}
|
||||
if (Main.invasionProgressWave > 0)
|
||||
{
|
||||
int num2 = (int)(200f * progressAlpha);
|
||||
int num3 = (int)(45f * progressAlpha);
|
||||
Vector2 vector = new Vector2((float)(Main.screenWidth - 120), (float)(Main.screenHeight - 40));
|
||||
Rectangle r = new Rectangle((int)vector.X - num2 / 2, (int)vector.Y - num3 / 2, num2, num3);
|
||||
Utils.DrawInvBG(Main.spriteBatch, r, new Color(63, 65, 151, 255) * 0.785f);
|
||||
string text2;
|
||||
if (Main.invasionProgressMax == 0)
|
||||
{
|
||||
text2 = Language.GetTextValue("Game.InvasionPoints", Main.invasionProgress);
|
||||
}
|
||||
else
|
||||
{
|
||||
text2 = ((int)((float)Main.invasionProgress * 100f / (float)Main.invasionProgressMax)).ToString() + "%";
|
||||
}
|
||||
text2 = Language.GetTextValue("Game.WaveMessage", Main.invasionProgressWave, text2);
|
||||
Texture2D texture2D2 = Main.colorBarTexture;
|
||||
Texture2D texture2D4 = Main.colorBlipTexture;
|
||||
float num4 = MathHelper.Clamp((float)Main.invasionProgress / (float)Main.invasionProgressMax, 0f, 1f);
|
||||
if (Main.invasionProgressMax == 0)
|
||||
{
|
||||
num4 = 1f;
|
||||
}
|
||||
float num5 = 169f * progressAlpha;
|
||||
float num6 = 8f * progressAlpha;
|
||||
Vector2 vector2 = vector + Vector2.UnitY * num6 + Vector2.UnitX * 1f;
|
||||
Utils.DrawBorderString(Main.spriteBatch, text2, vector2, Color.White * Main.invasionProgressAlpha, progressAlpha, 0.5f, 1f, -1);
|
||||
Main.spriteBatch.Draw(texture2D2, vector, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2((float)(texture2D2.Width / 2), 0f), progressAlpha, SpriteEffects.None, 0f);
|
||||
vector2 += Vector2.UnitX * (num4 - 0.5f) * num5;
|
||||
Main.spriteBatch.Draw(Main.magicPixel, vector2, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 241, 51) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(num5 * num4, num6), SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(Main.magicPixel, vector2, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 165, 0, 127) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(2f, num6), SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(Main.magicPixel, vector2, new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.Black * Main.invasionProgressAlpha, 0f, new Vector2(0f, 0.5f), new Vector2(num5 * (1f - num4), num6), SpriteEffects.None, 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
int num7 = (int)(200f * progressAlpha);
|
||||
int num8 = (int)(45f * progressAlpha);
|
||||
Vector2 vector3 = new Vector2((float)(Main.screenWidth - 120), (float)(Main.screenHeight - 40));
|
||||
Rectangle r2 = new Rectangle((int)vector3.X - num7 / 2, (int)vector3.Y - num8 / 2, num7, num8);
|
||||
Utils.DrawInvBG(Main.spriteBatch, r2, new Color(63, 65, 151, 255) * 0.785f);
|
||||
string text3;
|
||||
if (Main.invasionProgressMax == 0)
|
||||
{
|
||||
text3 = Main.invasionProgress.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
text3 = ((int)((float)Main.invasionProgress * 100f / (float)Main.invasionProgressMax)).ToString() + "%";
|
||||
}
|
||||
text3 = Language.GetTextValue("Game.WaveCleared", text3);
|
||||
Texture2D texture2D3 = Main.colorBarTexture;
|
||||
Texture2D texture2D5 = Main.colorBlipTexture;
|
||||
if (Main.invasionProgressMax != 0)
|
||||
{
|
||||
Main.spriteBatch.Draw(texture2D3, vector3, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2((float)(texture2D3.Width / 2), 0f), progressAlpha, SpriteEffects.None, 0f);
|
||||
float num9 = MathHelper.Clamp((float)Main.invasionProgress / (float)Main.invasionProgressMax, 0f, 1f);
|
||||
Vector2 vector4 = Main.fontMouseText.MeasureString(text3);
|
||||
float num10 = progressAlpha;
|
||||
if (vector4.Y > 22f)
|
||||
{
|
||||
num10 *= 22f / vector4.Y;
|
||||
}
|
||||
float num11 = 169f * progressAlpha;
|
||||
float num12 = 8f * progressAlpha;
|
||||
Vector2 vector5 = vector3 + Vector2.UnitY * num12 + Vector2.UnitX * 1f;
|
||||
Utils.DrawBorderString(Main.spriteBatch, text3, vector5 + new Vector2(0f, -4f), Color.White * Main.invasionProgressAlpha, num10, 0.5f, 1f, -1);
|
||||
vector5 += Vector2.UnitX * (num9 - 0.5f) * num11;
|
||||
Main.spriteBatch.Draw(Main.magicPixel, vector5, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 241, 51) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(num11 * num9, num12), SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(Main.magicPixel, vector5, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 165, 0, 127) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(2f, num12), SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(Main.magicPixel, vector5, new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.Black * Main.invasionProgressAlpha, 0f, new Vector2(0f, 0.5f), new Vector2(num11 * (1f - num9), num12), SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
Vector2 value = Main.fontMouseText.MeasureString(text);
|
||||
float num13 = 120f;
|
||||
if (value.X > 200f)
|
||||
{
|
||||
num13 += value.X - 200f;
|
||||
}
|
||||
Rectangle r3 = Utils.CenteredRectangle(new Vector2((float)Main.screenWidth - num13, (float)(Main.screenHeight - 80)), (value + new Vector2((float)(texture2D.Width + 12), 6f)) * progressAlpha);
|
||||
Utils.DrawInvBG(Main.spriteBatch, r3, c);
|
||||
Main.spriteBatch.Draw(texture2D, r3.Left() + Vector2.UnitX * progressAlpha * 8f, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2(0f, (float)(texture2D.Height / 2)), progressAlpha * 0.8f, SpriteEffects.None, 0f);
|
||||
Utils.DrawBorderString(Main.spriteBatch, text, r3.Right() + Vector2.UnitX * progressAlpha * -22f, Color.White * Main.invasionProgressAlpha, progressAlpha * 0.9f, 1f, 0.4f, -1);
|
||||
}
|
||||
});
|
||||
cursor.Emit(Pop);
|
||||
cursor.Emit(Ret);
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
@@ -0,0 +1,62 @@
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class CorrosiveSpine : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Corrosive Spine");
|
||||
Tooltip.SetDefault("Increased movement speed\n" +
|
||||
"All rogue weapons inflict venom and spawn clouds on enemy hits\n" +
|
||||
"You release a ton of clouds everywhere on hit");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 18;
|
||||
item.height = 46;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
item.defense = 4;
|
||||
item.accessory = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().corrosiveSpine = true;
|
||||
if (player.immune)
|
||||
{
|
||||
if (Main.rand.NextBool(9))
|
||||
{
|
||||
for (int i = 0; i < 9; i++)
|
||||
{
|
||||
int type = -1;
|
||||
switch (Main.rand.Next(3))
|
||||
{
|
||||
case 0:
|
||||
type = ModContent.ProjectileType<Corrocloud1>();
|
||||
break;
|
||||
case 1:
|
||||
type = ModContent.ProjectileType<Corrocloud2>();
|
||||
break;
|
||||
case 2:
|
||||
type = ModContent.ProjectileType<Corrocloud3>();
|
||||
break;
|
||||
}
|
||||
// Should never happen, but just in case-
|
||||
if (type != -1)
|
||||
{
|
||||
float speed = Main.rand.NextFloat(3f, 11f);
|
||||
Projectile.NewProjectile(player.Center, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * speed,
|
||||
type, 100, 0f, player.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 425 B |
@@ -0,0 +1,34 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class DukeScales : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Old Duke's Scales");
|
||||
Tooltip.SetDefault("While under the effects of a damaging debuff, you gain 10% increased damage and 5% crit\n" +
|
||||
"When below 75% life, you gain 3% increased damage and crit\n" +
|
||||
"When below 50% life, you gain an additional 5% increased damage and crit\n" +
|
||||
"Provides immunity to poisoned, venom, and sulphruic poisoning");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 26;
|
||||
item.value = Item.buyPrice(0, 60, 0, 0);
|
||||
item.accessory = true;
|
||||
item.rare = 10;
|
||||
item.Calamity().customRarity = (CalamityRarity)12;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.dukeScales = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 688 B |
@@ -0,0 +1,44 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class HallowedRune : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Hallowed Rune");
|
||||
Tooltip.SetDefault("Whenever your minions hit an enemy you will gain a random buff\n" +
|
||||
"These buffs will either boost your defense, summon damage, or life regen for a while");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 26;
|
||||
item.height = 26;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
item.accessory = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.hallowedRune = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<SpiritGenerator>());
|
||||
recipe.AddIngredient(ItemID.HallowedBar, 18);
|
||||
recipe.AddIngredient(ItemID.SoulofFright, 5);
|
||||
recipe.AddIngredient(ItemID.SoulofMight, 5);
|
||||
recipe.AddIngredient(ItemID.SoulofSight, 5);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 454 B |
@@ -0,0 +1,44 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class MutatedTruffle : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Mutated Truffle");
|
||||
Tooltip.SetDefault("Summons a small Old Duke to fight for you\n" +
|
||||
"When below 50% life, it moves much faster");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 24;
|
||||
item.height = 26;
|
||||
item.value = Item.buyPrice(2, 50, 0, 0);
|
||||
item.rare = 10;
|
||||
item.expert = true;
|
||||
item.accessory = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.miniOldDuke = true;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
const int damage = 1800;
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<YoungDuke>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero,
|
||||
ModContent.ProjectileType<YoungDuke>(),
|
||||
(int)(damage * (player.allDamage + player.minionDamage - 1f)),
|
||||
6.5f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 548 B |
@@ -32,6 +32,11 @@ namespace CalamityMod.Items.Accessories
|
||||
item.Calamity().customRarity = CalamityRarity.Dedicated;
|
||||
}
|
||||
|
||||
public override bool CanEquipAccessory(Player player, int slot)
|
||||
{
|
||||
return !player.Calamity().pArtifact;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.LoreItems;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
//Developer item, dedicatee: Mishiro Usui/Amber Sienna
|
||||
public class ProfanedSoulCrystal : ModItem
|
||||
{
|
||||
|
||||
/**
|
||||
* Notes: Drops from providence if the only damage source during the fight is from typeless damage or the profaned soul and the owners of those babs do not have profaned crystal.
|
||||
* All projectiles are in ProfanedSoulCrystalProjectiles.cs in the summon projectile directory
|
||||
* The projectiles being created/fired on click happens in CalamityGlobalItem (there's a region specially for it so ctrl + f is your friend)
|
||||
* the day/night buffs are in calamityplayermisceffects
|
||||
* the bab projectiles are the same, just refactored ai to be more adhering to DRY principle
|
||||
* 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.
|
||||
*/
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Profaned Soul Crystal");
|
||||
Tooltip.SetDefault("Transforms you into an emissary of the profaned goddess\n" +
|
||||
"Requires 10 minion slots to use in order to grant the following effects\n" +
|
||||
"All non-summon weapons are converted into powerful summon variations\n" +
|
||||
"Falling below 50% life will empower these attacks\n" +
|
||||
"[c/f05a5a:Transforms Melee attacks into a barrage of spears]\n" +
|
||||
"[c/3a83e4:Transforms Magic attacks into a powerful splitting fireball]\n" +
|
||||
"[c/85e092:Transforms Ranged attacks into a flurry of fireballs and meteors]\n" +
|
||||
"[c/e97451:Transforms Rogue attacks into a deadly crystalline spiral]\n" +
|
||||
"Summons and empowers the profaned babs to fight alongside you\n" +
|
||||
"You are no longer affected by burn out when hit\n" +
|
||||
"Provides buffs depending on the time of day\n" +
|
||||
"Provides heat and cold protection in Death Mode\n" +
|
||||
"Thinking back, it was a boring life\n" +
|
||||
"[c/FFBF49:And so we burn it all in the name of purity]");
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(8, 4));
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 40;
|
||||
item.height = 40;
|
||||
item.value = Item.buyPrice(5, 0, 0, 0);
|
||||
item.accessory = true;
|
||||
item.rare = 10;
|
||||
item.Calamity().customRarity = CalamityRarity.ItemSpecific;
|
||||
}
|
||||
|
||||
public override bool CanEquipAccessory(Player player, int slot)
|
||||
{
|
||||
return !player.Calamity().pArtifact;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
if (!CalamityWorld.downedSCal)
|
||||
{
|
||||
int index = 0;
|
||||
foreach (TooltipLine line in tooltips)
|
||||
{
|
||||
if (line.mod == "Terraria" && line.Name.StartsWith("Tooltip"))
|
||||
{
|
||||
if (line.Name == "Tooltip0")
|
||||
{
|
||||
index = tooltips.IndexOf(line);
|
||||
}
|
||||
else
|
||||
{
|
||||
line.text = "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tooltips.Insert(index+1, new TooltipLine(CalamityMod.instance, "Tooltip1", "[c/f05a5a:The soul within this crystal has been defiled by the powerful magic of a supreme witch]\nMerchants will reject a defiled soul such as this."));
|
||||
}
|
||||
else if (Main.player[Main.myPlayer].Calamity().profanedCrystalBuffs)
|
||||
{
|
||||
int manaCost = (int)((float)100 * Main.player[Main.myPlayer].manaCost);
|
||||
foreach (TooltipLine line in tooltips)
|
||||
{
|
||||
if (line.mod == "Terraria" && line.Name == "Tooltip5")
|
||||
{
|
||||
line.text = "[c/3a83e4:Transforms Magic attacks into a powerful splitting fireball for " + manaCost + " mana per cast]";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
modPlayer.pArtifact = true;
|
||||
modPlayer.profanedCrystal = true;
|
||||
|
||||
if (hideVisual)
|
||||
modPlayer.profanedCrystalHide = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
PSCRecipe recipe = new PSCRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<ShadowspecBar>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<CoreofCinder>(), 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<UeliaceBar>(), 25);
|
||||
recipe.AddIngredient(ModContent.ItemType<ProfanedSoulArtifact>());
|
||||
recipe.AddIngredient(ModContent.ItemType<DivineGeode>(), 50);
|
||||
recipe.AddIngredient(ModContent.ItemType<KnowledgeProvidence>()); //this is NOT consumed during crafting
|
||||
recipe.AddIngredient(ModContent.ItemType<UnholyEssence>(), 100);
|
||||
recipe.AddIngredient(ItemID.ObsidianRose);
|
||||
recipe.AddTile(ModContent.TileType<ProfanedBasin>());
|
||||
recipe.needLava = true;
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
|
||||
public class PSCRecipe : ModRecipe
|
||||
{
|
||||
|
||||
public PSCRecipe(Mod mod) : base(mod) { }
|
||||
|
||||
|
||||
public override int ConsumeItem(int type, int numRequired) => type == ModContent.ItemType<KnowledgeProvidence>() ? 0 : numRequired;
|
||||
|
||||
public override bool RecipeAvailable() => Main.dayTime && (Main.LocalPlayer.ZoneHoly || Main.LocalPlayer.ZoneUnderworldHeight);
|
||||
}
|
||||
|
||||
public class ProfanedCrystalHead : EquipTexture
|
||||
{
|
||||
public override bool DrawHead()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class ProfanedCrystalBody : EquipTexture
|
||||
{
|
||||
public override bool DrawBody()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class ProfanedCrystalLegs : EquipTexture
|
||||
{
|
||||
public override bool DrawLegs()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class ProfanedCrystalWings : EquipTexture
|
||||
{
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
@@ -0,0 +1,34 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class StarbusterCore : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Starbuster Core");
|
||||
Tooltip.SetDefault("Summons release an astral explosion on enemy hits\n" +
|
||||
"1 extra minion slot");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 32;
|
||||
item.value = Item.buyPrice(0, 60, 0, 0);
|
||||
item.rare = 7;
|
||||
item.accessory = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.maxMinions++;
|
||||
player.Calamity().starbusterCore = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 697 B |
|
After Width: | Height: | Size: 2.4 KiB |
@@ -45,7 +45,7 @@ namespace CalamityMod.Items.Armor
|
||||
player.setBonus = "5% increased movement speed and rogue critical strike chance\n" +
|
||||
"Taking over 25 damage in one hit will cause a spread of homing feathers to fall\n" +
|
||||
"Allows you to fall more quickly and disables fall damage\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 100\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" +
|
||||
"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";
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Armor
|
||||
"Inferno effect when below 50% life\n" +
|
||||
"Rogue weapons have a 10% chance to unleash a volley of chaos flames around the player that chase enemies when used\n" +
|
||||
"You have a 20% chance to emit a blazing explosion when you are hit\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 110\n" +
|
||||
"Rogue stealth builds while not attacking and slower while moving, up to a max of 110\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";
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Armor
|
||||
"All projectiles spawn healing auric orbs on enemy hits\n" +
|
||||
"Max run speed and acceleration boosted by 10%\n" +
|
||||
"Rogue weapon critical strikes will do 1.25 times damage while you are above 50% HP\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 130\n" +
|
||||
"Rogue stealth builds while not attacking and slower while moving, up to a max of 130\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";
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Items.Armor
|
||||
"Being over 80% life boosts your defense by 30 and rogue crit by 5%\n" +
|
||||
"Being below 80% life boosts your rogue damage by 10%\n" +
|
||||
"Rogue critical strikes have a 50% chance to heal you\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 120\n" +
|
||||
"Rogue stealth builds while not attacking and slower while moving, up to a max of 120\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";
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Items.Armor
|
||||
{
|
||||
player.setBonus = "5% increased rogue damage\n" +
|
||||
"Rogue projectiles throw out crystal shards as they travel\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 105\n" +
|
||||
"Rogue stealth builds while not attacking and slower while moving, up to a max of 105\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";
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Items.Armor
|
||||
"While the cooldown for this effect is active you gain a 10% increase to all damage\n" +
|
||||
"While at full HP all of your rogue stats are boosted by 10%\n" +
|
||||
"If you take over 80 damage in one hit you will be given extra immunity frames\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 120\n" +
|
||||
"Rogue stealth builds while not attacking and slower while moving, up to a max of 120\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";
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Armor
|
||||
modPlayer.rogueStealthMax += 1.1f;
|
||||
player.setBonus = "5% increased rogue damage\n" +
|
||||
"You emit a cloud of spores when you are hit\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 110\n" +
|
||||
"Rogue stealth builds while not attacking and slower while moving, up to a max of 110\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";
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Items.Armor
|
||||
"Your max life will return to normal if you die\n" +
|
||||
"Rogue weapons have a faster throwing rate while you are above 50% life\n" +
|
||||
"After the silva invulnerability time your rogue weapons will do 10% more damage\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 125\n" +
|
||||
"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" +
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor
|
||||
{
|
||||
[AutoloadEquip(EquipType.Body)]
|
||||
class SnowRuffianChestplate : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Snow Ruffian Chestplate");
|
||||
Tooltip.SetDefault("3% increased rogue critical strike chance");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 18;
|
||||
item.height = 18;
|
||||
item.value = Item.buyPrice(0, 0, 75, 0);
|
||||
item.rare = 1;
|
||||
item.defense = 2; //4
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingCrit += 3;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.SnowBlock, 30);
|
||||
recipe.AddIngredient(ItemID.IceBlock, 15);
|
||||
recipe.AddIngredient(ItemID.BorealWood, 45);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 603 B |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,43 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor
|
||||
{
|
||||
[AutoloadEquip(EquipType.Legs)]
|
||||
class SnowRuffianGreaves : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Snow Ruffian Greaves");
|
||||
Tooltip.SetDefault("5% increased movement speed");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 18;
|
||||
item.height = 18;
|
||||
item.value = Item.buyPrice(0, 0, 75, 0);
|
||||
item.rare = 1;
|
||||
item.defense = 1; //4
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.moveSpeed += 0.05f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.SnowBlock, 20);
|
||||
recipe.AddIngredient(ItemID.IceBlock, 10);
|
||||
recipe.AddIngredient(ItemID.BorealWood, 30);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 456 B |
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,97 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
class SnowRuffianMask : ModItem
|
||||
{
|
||||
private bool shouldBoost = false;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Snow Ruffian Mask");
|
||||
Tooltip.SetDefault("2% increased rogue damage");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 18;
|
||||
item.height = 18;
|
||||
item.value = Item.buyPrice(0, 0, 75, 0);
|
||||
item.rare = 1;
|
||||
item.defense = 1; //4
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<SnowRuffianChestplate>() && legs.type == ModContent.ItemType<SnowRuffianGreaves>();
|
||||
}
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.snowRuffianSet = true;
|
||||
modPlayer.rogueStealthMax += 0.5f;
|
||||
player.setBonus = "5% increased rogue damage\n" +
|
||||
"You can glide to negate fall damage\n" +
|
||||
"Rogue stealth builds while not attacking and slower while moving, up to a max of 50\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";
|
||||
player.Calamity().throwingDamage += 0.05f;
|
||||
player.Calamity().wearingRogueArmor = true;
|
||||
if (player.controlJump)
|
||||
{
|
||||
player.noFallDmg = true;
|
||||
player.UpdateJumpHeight();
|
||||
if (shouldBoost)
|
||||
{
|
||||
player.velocity.X *= 1.3f;
|
||||
shouldBoost = false;
|
||||
}
|
||||
|
||||
}
|
||||
else if (!shouldBoost && player.velocity.Y == 0)
|
||||
{
|
||||
shouldBoost = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.02f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.SnowBlock, 10);
|
||||
recipe.AddIngredient(ItemID.IceBlock, 5);
|
||||
recipe.AddIngredient(ItemID.BorealWood, 15);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
public class SnowRuffianWings : EquipTexture
|
||||
{
|
||||
public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
|
||||
{
|
||||
ascentWhenFalling = 0.5f;
|
||||
ascentWhenRising = 0f;
|
||||
maxCanAscendMultiplier = 0f;
|
||||
maxAscentMultiplier = 0f;
|
||||
constantAscend = 0f;
|
||||
}
|
||||
|
||||
public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration)
|
||||
{
|
||||
speed = 2f;
|
||||
acceleration *= 1.25f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 497 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor
|
||||
{
|
||||
player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" +
|
||||
"Grants an extra jump and increased jump height\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 100\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" +
|
||||
"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";
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Armor
|
||||
player.setBonus = "Attacking and being attacked by enemies inflicts poison\n" +
|
||||
"Grants a sulphurous bubble jump that applies venom on hit\n" +
|
||||
"Slightly reduces breath loss in the abyss\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 100\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" +
|
||||
"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";
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace CalamityMod.Items.Armor
|
||||
"After every 25 rogue critical hits you will gain 5 seconds of damage immunity\n" +
|
||||
"This effect can only occur once every 30 seconds\n" +
|
||||
"While under the effects of a debuff you gain 10% increased rogue damage\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 115\n" +
|
||||
"Rogue stealth builds while not attacking and slower while moving, up to a max of 115\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";
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.Armor
|
||||
player.setBonus = "Rogue weapons have a chance to create explosions on hit\n" +
|
||||
"Stealth strikes always create an explosion\n" +
|
||||
"Penumbra potions always build stealth at max effectiveness\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 110\n" +
|
||||
"Rogue stealth builds while not attacking and slower while moving, up to a max of 110\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";
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor
|
||||
"When using any weapon you have a 10% chance to throw a returning seashell projectile\n" +
|
||||
"This seashell does true damage and does not benefit from any damage class\n" +
|
||||
"Provides increased underwater mobility and slightly reduces breath loss in the abyss\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 90\n" +
|
||||
"Rogue stealth builds while not attacking and slower while moving, up to a max of 90\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";
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
player.setBonus = "+3 defense\n" +
|
||||
"+5 defense when below 50% life\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 50\n" +
|
||||
"Rogue stealth builds while not attacking and slower while moving, up to a max of 50\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";
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Items.Armor
|
||||
player.setBonus = "9% increased rogue damage and velocity\n" +
|
||||
"Rogue projectiles have special effects on enemy hits\n" +
|
||||
"Imbued with cosmic wrath and rage when you are damaged\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 115\n" +
|
||||
"Rogue stealth builds while not attacking and slower while moving, up to a max of 115\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";
|
||||
|
||||
@@ -427,10 +427,186 @@ namespace CalamityMod.Items
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Profaned Soul Crystal Attacks
|
||||
|
||||
private bool HandleAttackTransforms(Item item, Player player)
|
||||
{
|
||||
if (player.whoAmI != Main.myPlayer)
|
||||
return false;
|
||||
int weaponType = item.melee ? 1 : item.ranged ? 2 : item.magic ? 3 : item.Calamity().rogue ? 4 : -1;
|
||||
if (weaponType > 0)
|
||||
{
|
||||
if (player.Calamity().profanedSoulWeaponType != weaponType || player.Calamity().profanedSoulWeaponUsage >= 300)
|
||||
{
|
||||
player.Calamity().profanedSoulWeaponType = weaponType;
|
||||
player.Calamity().profanedSoulWeaponUsage = 0;
|
||||
}
|
||||
Vector2 correctedVelocity = Main.MouseWorld - player.Center;
|
||||
correctedVelocity.Normalize();
|
||||
bool shouldNerf = player.Calamity().endoCooper || player.Calamity().magicHat; //No bonkers damage memes thank you very much.
|
||||
bool enrage = player.statLife <= (int)((double)player.statLifeMax2 * 0.5);
|
||||
if (item.melee)
|
||||
{
|
||||
if (player.Calamity().profanedSoulWeaponUsage % (enrage ? 4 : 6) == 0)
|
||||
{
|
||||
if (player.Calamity().profanedSoulWeaponUsage > 0 && player.Calamity().profanedSoulWeaponUsage % (enrage ? 20 : 30) == 0) //every 5 shots is a shotgun spread
|
||||
{
|
||||
int numProj = 5;
|
||||
|
||||
correctedVelocity *= 12f;
|
||||
int spread = 3;
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedspeed = new Vector2(correctedVelocity.X, correctedVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread));
|
||||
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), (int)((shouldNerf ? 500 : 1750) * (player.allDamage + player.minionDamage - 1f)), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f);
|
||||
spread -= Main.rand.Next(2, 4);
|
||||
Main.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
player.Calamity().profanedSoulWeaponUsage = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.NewProjectile(player.Center, correctedVelocity * 6.9f, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), (int)((shouldNerf ? 250 : 1250) * (player.allDamage + player.minionDamage - 1f)), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f, 1f);
|
||||
Main.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
|
||||
}
|
||||
player.Calamity().profanedSoulWeaponUsage++;
|
||||
|
||||
}
|
||||
else if (item.ranged)
|
||||
{
|
||||
|
||||
if (enrage || Main.rand.NextBool(2)) //100% chance if 50% or lower, else 1 in 2 chance
|
||||
{
|
||||
correctedVelocity *= 20f;
|
||||
Vector2 perturbedspeed = new Vector2(correctedVelocity.X + Main.rand.Next(-3, 4), correctedVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(3));
|
||||
bool isSmallBoomer = Main.rand.NextDouble() <= (enrage ? 0.2 : 0.3); // 20% chance if enraged, else 30% This is intentional due to literally doubling the amount of projectiles fired.
|
||||
bool isThiccBoomer = isSmallBoomer && Main.rand.NextDouble() <= 0.05; // 5%
|
||||
int projType = isSmallBoomer ? isThiccBoomer ? 1 : 2 : 3;
|
||||
int dam = (int)((shouldNerf ? 250 : 1000) * (player.allDamage + player.minionDamage - 1f));
|
||||
switch (projType)
|
||||
{
|
||||
case 1: //big boomer
|
||||
case 2: //boomer
|
||||
int proj = Projectile.NewProjectile(player.Center, perturbedspeed, ModContent.ProjectileType<ProfanedCrystalRangedHuges>(), dam, 0f, player.whoAmI, projType == 1 ? 1f : 0f);
|
||||
Main.projectile[proj].Calamity().forceMinion = true;
|
||||
break;
|
||||
case 3: //bab boomer
|
||||
int proj2 = Projectile.NewProjectile(player.Center, perturbedspeed, ModContent.ProjectileType<ProfanedCrystalRangedSmalls>(), dam, 0f, player.whoAmI, 0f);
|
||||
Main.projectile[proj2].Calamity().forceMinion = true;
|
||||
break;
|
||||
}
|
||||
if (projType > 1)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (item.magic)
|
||||
{
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<ProfanedCrystalMageFireball>()] == 0 && player.ownedProjectileCounts[ModContent.ProjectileType<ProfanedCrystalMageFireballSplit>()] == 0)
|
||||
{
|
||||
player.Calamity().profanedSoulWeaponUsage = 0;
|
||||
}
|
||||
int manaCost = (int)((float)100 * player.manaCost);
|
||||
if (player.statMana < manaCost && player.Calamity().profanedSoulWeaponUsage == 0)
|
||||
{
|
||||
if (player.manaFlower)
|
||||
{
|
||||
player.QuickMana();
|
||||
}
|
||||
}
|
||||
if (player.statMana >= manaCost && player.Calamity().profanedSoulWeaponUsage == 0)
|
||||
{
|
||||
player.manaRegenDelay = (int)player.maxRegenDelay;
|
||||
player.statMana -= manaCost;
|
||||
correctedVelocity *= 25f;
|
||||
Main.PlaySound(SoundID.Item20, player.Center);
|
||||
int dam = (int)((shouldNerf ? 900 : 4500) * (player.allDamage + player.minionDamage - 1f));
|
||||
if (player.HasBuff(BuffID.ManaSickness))
|
||||
{
|
||||
int sickPenalty = (int)(dam * (0.05f * ((player.buffTime[player.FindBuffIndex(BuffID.ManaSickness)] + 60) / 60)));
|
||||
dam -= sickPenalty;
|
||||
}
|
||||
int proj = Projectile.NewProjectile(player.position, correctedVelocity, ModContent.ProjectileType<ProfanedCrystalMageFireball>(), dam, 1f, player.whoAmI, enrage ? 1f : 0f);
|
||||
Main.projectile[proj].Calamity().forceMinion = true;
|
||||
player.Calamity().profanedSoulWeaponUsage = enrage ? 20 : 25;
|
||||
}
|
||||
if (player.Calamity().profanedSoulWeaponUsage > 0)
|
||||
player.Calamity().profanedSoulWeaponUsage--;
|
||||
}
|
||||
else if (item.Calamity().rogue)
|
||||
{
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<ProfanedCrystalRogueShard>()] == 0)
|
||||
{
|
||||
player.Calamity().profanedSoulWeaponUsage = 0;
|
||||
}
|
||||
if (player.Calamity().profanedSoulWeaponUsage >= (enrage ? 69 : 180))
|
||||
{
|
||||
float crystalCount = 36f;
|
||||
for (float i = 0; i < crystalCount; i++)
|
||||
{
|
||||
float angle = MathHelper.TwoPi / crystalCount * i;
|
||||
int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), (int)((shouldNerf ? 169 : 880) * (player.allDamage + player.minionDamage - 1f)), 1f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[proj].Calamity().forceMinion = true;
|
||||
Main.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
player.Calamity().profanedSoulWeaponUsage = 0;
|
||||
}
|
||||
else if (player.Calamity().profanedSoulWeaponUsage % (enrage ? 5 : 10) == 0)
|
||||
{
|
||||
float angle = MathHelper.TwoPi / (enrage ? 9 : 18) * (player.Calamity().profanedSoulWeaponUsage / (enrage ? 1 : 10));
|
||||
int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), (int)((shouldNerf ? 220 : 1100) * (player.allDamage + player.minionDamage - 1f)), 1f, player.whoAmI, 1f, 0f);
|
||||
Main.projectile[proj].Calamity().forceMinion = true;
|
||||
Main.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
player.Calamity().profanedSoulWeaponUsage += enrage ? 1 : 2;
|
||||
if (!enrage && player.Calamity().profanedSoulWeaponUsage % 2 != 0)
|
||||
player.Calamity().profanedSoulWeaponUsage--;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Use Item Changes
|
||||
|
||||
public override bool AltFunctionUse(Item item, Player player)
|
||||
{
|
||||
if (player.Calamity().profanedCrystalBuffs && item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (item.Calamity().rogue || item.magic || item.ranged || item.melee))
|
||||
{
|
||||
NPC closest = Main.MouseWorld.ClosestNPCAt(1000f, true);
|
||||
if (closest != null)
|
||||
{
|
||||
player.MinionAttackTargetNPC = closest.whoAmI;
|
||||
player.UpdateMinionTarget();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return base.AltFunctionUse(item, player);
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Item item, Player player)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
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)
|
||||
{
|
||||
return HandleAttackTransforms(item, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
return AltFunctionUse(item, player);
|
||||
}
|
||||
}
|
||||
else if (modPlayer.profanedCrystalBuffs && item.summon)
|
||||
{
|
||||
|
||||
}
|
||||
if (item.type == ItemID.MonkStaffT1)
|
||||
{
|
||||
for (int i = 0; i < 1000; ++i)
|
||||
@@ -545,6 +721,8 @@ namespace CalamityMod.Items
|
||||
tt2.overrideColor = new Color(0, 0, 255);
|
||||
if (item.type == ModContent.ItemType<NanoblackReaperMelee>() || item.type == ModContent.ItemType<NanoblackReaperRogue>())
|
||||
tt2.overrideColor = new Color(0.34f, 0.34f + 0.66f * Main.DiscoG / 255f, 0.34f + 0.5f * Main.DiscoG / 255f);
|
||||
if (item.type == ModContent.ItemType<ProfanedSoulCrystal>())
|
||||
tt2.overrideColor = new Color(255 - Main.DiscoG < 80 ? 80 : Main.DiscoG < 50 ? 255 : 255 - Main.DiscoG, Main.DiscoG < 126 ? 126 : Main.DiscoG, 0); //alternates between emerald green and amber (BanditHueh)
|
||||
|
||||
// Uniquely colored legendary weapons
|
||||
if (item.type == ModContent.ItemType<AegisBlade>() || item.type == ModContent.ItemType<YharimsCrystal>())
|
||||
@@ -871,7 +1049,7 @@ namespace CalamityMod.Items
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item.type == ItemID.FlaskofNanites)
|
||||
if (item.type == ItemID.FlaskofPoison)
|
||||
{
|
||||
foreach (TooltipLine line2 in tooltips)
|
||||
{
|
||||
|
||||