Merge branch 'lucrecia-rework' of https://github.com/CalamityTeam/CalamityMod into lucrecia-rework
No files matched your search
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 71 KiB |
@@ -7,5 +7,6 @@ namespace CalamityMod.BiomeManagers.BestiaryCategories
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralCaveDesertIcon";
|
||||
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
}
|
||||
}
|
||||
@@ -7,5 +7,6 @@ namespace CalamityMod.BiomeManagers.BestiaryCategories
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralDesertIcon";
|
||||
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
}
|
||||
}
|
||||
@@ -7,5 +7,6 @@ namespace CalamityMod.BiomeManagers.BestiaryCategories
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/UndergroundAstralIcon";
|
||||
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
}
|
||||
}
|
||||
@@ -90,6 +90,14 @@ namespace CalamityMod.Buffs
|
||||
player.Calamity().shine = true;
|
||||
}
|
||||
|
||||
// Star in a Bottle provides Mana Regeneration Potion effect and cancels out the usual effect if you don't have it
|
||||
else if (type == BuffID.StarInBottle && !player.manaRegenBuff)
|
||||
{
|
||||
player.manaRegenBuff = true;
|
||||
player.manaRegenDelayBonus -= 0.5f;
|
||||
player.manaRegenBonus -= 10;
|
||||
}
|
||||
|
||||
// Beetle Shell DR is a full compensation, as the vanilla multiplicative DR is removed entirely.
|
||||
else if (type >= BuffID.BeetleEndurance1 && type <= BuffID.BeetleEndurance3 && player.beetleDefense)
|
||||
{
|
||||
@@ -200,10 +208,6 @@ namespace CalamityMod.Buffs
|
||||
tip = tip.Replace("25", "15");
|
||||
break;
|
||||
|
||||
case BuffID.LeafCrystal:
|
||||
tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.LeafCrystal");
|
||||
break;
|
||||
|
||||
case BuffID.MagicPower:
|
||||
tip = tip.Replace("20", "10");
|
||||
break;
|
||||
@@ -249,10 +253,6 @@ namespace CalamityMod.Buffs
|
||||
tip = tip.Replace("25", "15");
|
||||
break;
|
||||
|
||||
case BuffID.Warmth:
|
||||
tip += "\n" + CalamityUtils.GetTextValue("Vanilla.BuffDescription.WarmthExtra");
|
||||
break;
|
||||
|
||||
case BuffID.WeaponImbueConfetti:
|
||||
tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.WeaponImbueConfetti");
|
||||
break;
|
||||
|
||||
@@ -26,13 +26,13 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
player.Calamity().daybroken = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo, bool reducedEffects)
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
{
|
||||
Player Player = drawInfo.drawPlayer;
|
||||
|
||||
if (Main.rand.Next(reducedEffects ? 8 : 4) < 3)
|
||||
if (Main.rand.Next(4) < 3)
|
||||
{
|
||||
Dust solarDust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.OrangeTorch, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, reducedEffects ? 175 : 100, default, reducedEffects ? 2f : 3f);
|
||||
Dust solarDust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.OrangeTorch, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 3f);
|
||||
solarDust.noGravity = true;
|
||||
solarDust.velocity *= 2.8f;
|
||||
solarDust.velocity.Y -= 0.5f;
|
||||
|
||||
@@ -34,23 +34,23 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
npc.Calamity().nightwither = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
{
|
||||
Player Player = drawInfo.drawPlayer;
|
||||
|
||||
if (Main.rand.NextBool(hasDebuffResistance ? 4 : 2))
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Vector2 Vect = new Vector2(0f, Main.rand.NextBool(4) ? -5f : -9f).RotatedByRandom(MathHelper.ToRadians(25f)) * Main.rand.NextFloat(0.1f, 1.9f);
|
||||
CritSpark spark = new CritSpark(Player.Calamity().RandomDebuffVisualSpot, Vect, Main.rand.NextBool() ? Color.Cyan : Color.Turquoise, Color.PaleTurquoise, (hasDebuffResistance ? 0.4f : 0.8f), 15, 2f, 1.9f);
|
||||
CritSpark spark = new CritSpark(Player.Calamity().RandomDebuffVisualSpot, Vect, Main.rand.NextBool() ? Color.Cyan : Color.Turquoise, Color.PaleTurquoise, 0.8f, 15, 2f, 1.9f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
for (int i = 0; i < (hasDebuffResistance ? 1 : 2); i++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Vector2 dustCorner = Player.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = Player.velocity + new Vector2(0f, Main.rand.NextFloat(-11f, -2f));
|
||||
Dust moonDust = Dust.NewDustDirect(dustCorner, Player.width + 4, Player.height + 4, Main.rand.NextBool(4) ? 300 : 323, dustVel.X, dustVel.Y);
|
||||
moonDust.noGravity = true;
|
||||
moonDust.scale = hasDebuffResistance ? Main.rand.NextFloat(0.3f, 0.3f) : Main.rand.NextFloat(0.5f, 0.5f);
|
||||
moonDust.scale = Main.rand.NextFloat(0.5f, 0.5f);
|
||||
moonDust.alpha = 235;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Pets
|
||||
{
|
||||
public class ReaverOrbBuff : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
//Main.persistentBuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<ReaverOrb>()] > 0)
|
||||
{
|
||||
modPlayer.rOrb = true;
|
||||
}
|
||||
if (!modPlayer.rOrb)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 738 B |
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Armor.Tarragon;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
@@ -7,8 +8,7 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class TarragonCloak : ModBuff
|
||||
{
|
||||
public static double ContactDamageReduction = 0.5D;
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(ContactDamageReduction.ToPercent());
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(TarragonHeadMelee.CloakContactDamageReduction.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class AqueousHunterDroneBuff : BaseSummonBuff
|
||||
{
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<AqueousHunterDroneSummon>();
|
||||
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.aqueousHunterDrone;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 803 B |
@@ -27,8 +27,10 @@ using CalamityMod.Items.Armor.Empyrean;
|
||||
using CalamityMod.Items.Armor.LunicCorps;
|
||||
using CalamityMod.Items.Armor.OmegaBlue;
|
||||
using CalamityMod.Items.Armor.PlagueReaper;
|
||||
using CalamityMod.Items.Armor.Prismatic;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
using CalamityMod.Items.Armor.SnowRuffian;
|
||||
using CalamityMod.Items.Armor.Tarragon;
|
||||
using CalamityMod.Items.Armor.TitanHeart;
|
||||
using CalamityMod.Items.Armor.Victide;
|
||||
using CalamityMod.Items.Armor.Wulfrum;
|
||||
@@ -40,6 +42,7 @@ using CalamityMod.Items.PermanentBoosters;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using CalamityMod.Items.Tools.ClimateChange;
|
||||
using CalamityMod.Items.TreasureBags.MiscGrabBags;
|
||||
using CalamityMod.Items.VanillaArmorChanges;
|
||||
using CalamityMod.Items.Weapons.DraedonsArsenal;
|
||||
@@ -68,12 +71,16 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.Creative;
|
||||
using Terraria.GameContent.NetModules;
|
||||
using Terraria.GameInput;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.Net;
|
||||
using static Terraria.Main;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
@@ -88,10 +95,6 @@ namespace CalamityMod.CalPlayer
|
||||
/// <summary> If true, there is an event actively occuring near the player. Solely used for preventing Silva Revive's cooldown from decreasing. </summary>
|
||||
public static bool areThereAnyDamnEvents = false;
|
||||
public float calamityBonusLuck = 0f;
|
||||
/// <summary> Custom variable for tracking if the player has Potion Sickness. Used for adding Potion Sickness to the Cooldown Rack. </summary>
|
||||
public bool potionSick = false;
|
||||
/// <summary> Custom variable for tracking how long the player has had Potion Sickness. Solely used for triggering the aura effects of Life Jelly and its upgrades. </summary>
|
||||
public int timePotionSick;
|
||||
public bool drawBossHPBar = true;
|
||||
public float stealthUIAlpha = 1f;
|
||||
public float SulphWaterUIOpacity = 1f;
|
||||
@@ -113,6 +116,7 @@ namespace CalamityMod.CalPlayer
|
||||
public double contactDamageReduction = 0D;
|
||||
public double projectileDamageReduction = 0D;
|
||||
public int hellbornShots = 0;
|
||||
public int garandShots = 0;
|
||||
public int searedPanCounter = 0;
|
||||
public int searedPanTimer = 0;
|
||||
/// <summary> Used to get around the hardcoded Potion Sickness duration to allow Hadal Stew's reduced duration. </summary>
|
||||
@@ -123,8 +127,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool resetHeightandWidth = false;
|
||||
/// <summary> If set to true, completely disables ALL life regeneration effects. Used by Omega Blue armor. </summary>
|
||||
public bool noLifeRegen = false;
|
||||
public bool reducedDaybrokenDamage = false;
|
||||
public bool reducedNightwitherDamage = false;
|
||||
public float ammoCost = 1f;
|
||||
public float healingPotionMultiplier = 1f;
|
||||
/// <summary>
|
||||
@@ -262,8 +264,8 @@ namespace CalamityMod.CalPlayer
|
||||
public int arsenalCooldown = 0;
|
||||
public int killModeCooldown = 0;
|
||||
public bool demonSwordKillMode = false;
|
||||
public bool exaltedKillMode => (demonSwordKillMode && Player.ActiveItem().type == ModContent.ItemType<ExaltedOathblade>());
|
||||
public bool devilsDevastationKillMode => (demonSwordKillMode && Player.ActiveItem().type == ModContent.ItemType<DevilsDevastation>());
|
||||
public bool exaltedKillMode => (demonSwordKillMode && Player.ActiveItem().type == ItemType<ExaltedOathblade>());
|
||||
public bool devilsDevastationKillMode => (demonSwordKillMode && Player.ActiveItem().type == ItemType<DevilsDevastation>());
|
||||
/// <summary>
|
||||
/// Tracks Dragoon Drizzlefish's "gel feed" mechanic in Get fixed boi.<br/>
|
||||
/// Consuming Gel adds 1 to this counter, up to a maximum of 6, and using the weapon has a random chance to decrement the counter.<br/>
|
||||
@@ -398,6 +400,9 @@ namespace CalamityMod.CalPlayer
|
||||
public bool canFireGodSlayerRangedProjectile = false;
|
||||
public bool canFireBloodflareMageProjectile = false;
|
||||
public bool canFireBloodflareRangedProjectile = false;
|
||||
|
||||
public float WeakTimeFreezeUseTimer = 0;
|
||||
public bool WeakTimeFreezeInUse = false;
|
||||
#endregion
|
||||
|
||||
#region Sound
|
||||
@@ -658,6 +663,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
public bool roverDrive = false;
|
||||
public bool roverDriveShieldVisible = false;
|
||||
internal float roverDriveShieldPartialRechargeProgress = 0f;
|
||||
internal bool playedRoverDriveShieldSound = false;
|
||||
|
||||
// Lunic Corps shield is controlled by its armor set bool
|
||||
// Lunic Corps shield comes from an armor set and its visibility is non optional
|
||||
@@ -826,9 +833,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool lAmbergrisVisual = false;
|
||||
public bool tortShell = false;
|
||||
public bool absorber = false;
|
||||
public bool alwaysHoneyRegen = false;
|
||||
public float alwaysHoneyRegenAmount = 0;
|
||||
public bool honeyTurboRegen = false;
|
||||
public bool honeyDewHalveDebuffs = false;
|
||||
public bool livingDewHalveDebuffs = false;
|
||||
public int jewelBonusDefense = 0;
|
||||
@@ -845,7 +849,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool aAmpoule = false;
|
||||
public bool rOoze = false;
|
||||
public float radiantOozeRegen = 0;
|
||||
public float ambrosialAmpouleRegen = 0;
|
||||
public float purityRegen = 0;
|
||||
public bool fBarrier = false;
|
||||
public bool aBrain = false;
|
||||
@@ -882,6 +885,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool cleansingjelly = false;
|
||||
public bool GrandGelatin = false;
|
||||
public int CleansingEffect = 0;
|
||||
public bool spawnedJellyAura = false;
|
||||
public bool community = false;
|
||||
public bool shatteredCommunity = false;
|
||||
public bool fleshTotem = false;
|
||||
@@ -1147,7 +1151,6 @@ namespace CalamityMod.CalPlayer
|
||||
/// <summary> Demonshade Greaves' movement speed boost. </summary>
|
||||
public bool shadowSpeed = false;
|
||||
public bool dsSetBonus = false;
|
||||
public bool auricBoost = false;
|
||||
public bool auricSetMelee = false;
|
||||
public bool daedalusReflect = false;
|
||||
public bool daedalusSplit = false;
|
||||
@@ -1191,9 +1194,7 @@ namespace CalamityMod.CalPlayer
|
||||
public int silvaMageCooldown = 0;
|
||||
public bool silvaSummon = false;
|
||||
public bool hasSilvaEffect = false;
|
||||
/// <summary> Constant variable representing the duration of Silva armor's revive, in frames. </summary>
|
||||
public const int SilvaReviveDuration = 300;
|
||||
public int silvaCountdown = SilvaReviveDuration;
|
||||
public int silvaCountdown = SilvaArmor.ReviveDuration;
|
||||
public bool auricSet = false;
|
||||
public bool omegaBlueChestplate = false;
|
||||
public bool omegaBlueSet = false;
|
||||
@@ -1485,8 +1486,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool victideSnail = false;
|
||||
/// <summary> Hydrothermic armor's Vent. </summary>
|
||||
public bool cSpirit = false;
|
||||
/// <summary> Reaver armor's Reaver Orb. </summary>
|
||||
public bool rOrb = false;
|
||||
/// <summary> Daedalus armor's Daedalus Crystal. </summary>
|
||||
public bool dCrystal = false;
|
||||
public bool endoHydra = false;
|
||||
@@ -1521,6 +1520,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool starSwallowerPetFroge = false;
|
||||
public bool snakeEyes = false;
|
||||
public bool poleWarper = false;
|
||||
public bool aqueousHunterDrone = false;
|
||||
public bool causticDragon = false;
|
||||
public bool plaguebringerPatronSummon = false;
|
||||
public bool howlTrio = false;
|
||||
@@ -2122,7 +2122,6 @@ namespace CalamityMod.CalPlayer
|
||||
silvaSummon = false;
|
||||
|
||||
auricSet = false;
|
||||
auricBoost = false;
|
||||
auricSetMelee = false;
|
||||
|
||||
GemTechSet = false;
|
||||
@@ -2203,15 +2202,11 @@ namespace CalamityMod.CalPlayer
|
||||
lAmbergris = false;
|
||||
tortShell = false;
|
||||
absorber = false;
|
||||
alwaysHoneyRegen = false;
|
||||
alwaysHoneyRegenAmount = 0;
|
||||
honeyTurboRegen = false;
|
||||
honeyDewHalveDebuffs = false;
|
||||
livingDewHalveDebuffs = false;
|
||||
aAmpoule = false;
|
||||
rOoze = false;
|
||||
radiantOozeRegen = 0;
|
||||
ambrosialAmpouleRegen = 0;
|
||||
purityRegen = 0;
|
||||
fBarrier = false;
|
||||
aBrain = false;
|
||||
@@ -2249,6 +2244,7 @@ namespace CalamityMod.CalPlayer
|
||||
lifejelly = false;
|
||||
GrandGelatin = false;
|
||||
cleansingjelly = false;
|
||||
spawnedJellyAura = false;
|
||||
community = false;
|
||||
shatteredCommunity = false;
|
||||
stressPills = false;
|
||||
@@ -2317,8 +2313,6 @@ namespace CalamityMod.CalPlayer
|
||||
CryoStoneVanity = false;
|
||||
voidField = false;
|
||||
copyrightInfringementShield = false;
|
||||
reducedDaybrokenDamage = false;
|
||||
reducedNightwitherDamage = false;
|
||||
|
||||
daedalusReflect = false;
|
||||
daedalusSplit = false;
|
||||
@@ -2623,7 +2617,6 @@ namespace CalamityMod.CalPlayer
|
||||
astralProbe = false;
|
||||
victideSnail = false;
|
||||
cSpirit = false;
|
||||
rOrb = false;
|
||||
dCrystal = false;
|
||||
MutatedTruffleBool = false;
|
||||
sandElemental = false;
|
||||
@@ -2677,6 +2670,7 @@ namespace CalamityMod.CalPlayer
|
||||
starSwallowerPetFroge = false;
|
||||
snakeEyes = false;
|
||||
poleWarper = false;
|
||||
aqueousHunterDrone = false;
|
||||
causticDragon = false;
|
||||
plaguebringerPatronSummon = false;
|
||||
howlTrio = false;
|
||||
@@ -3096,13 +3090,12 @@ namespace CalamityMod.CalPlayer
|
||||
godSlayerThrowing = false;
|
||||
godSlayerDashHotKeyPressed = false;
|
||||
SpeedBlasterDashStarted = false;
|
||||
auricBoost = false;
|
||||
auricSetMelee = false;
|
||||
silvaSet = false;
|
||||
silvaMage = false;
|
||||
silvaSummon = false;
|
||||
hasSilvaEffect = false;
|
||||
silvaCountdown = SilvaReviveDuration;
|
||||
silvaCountdown = SilvaArmor.ReviveDuration;
|
||||
auricSet = false;
|
||||
GemTechSet = false;
|
||||
CobaltSet = false;
|
||||
@@ -3226,6 +3219,7 @@ namespace CalamityMod.CalPlayer
|
||||
flareGunOverheat = 0;
|
||||
hellbornShots = 0;
|
||||
lucreciaEnergy = 0;
|
||||
garandShots = 0;
|
||||
searedPanCounter = 0;
|
||||
searedPanTimer = 0;
|
||||
potionTimer = 0;
|
||||
@@ -3297,7 +3291,7 @@ namespace CalamityMod.CalPlayer
|
||||
ascendantInsigniaBuffTime = 240; //4 seconds
|
||||
}
|
||||
|
||||
int numOfBlobs = Player.ownedProjectileCounts[ModContent.ProjectileType<TransformerBlob>()];
|
||||
int numOfBlobs = Player.ownedProjectileCounts[ProjectileType<TransformerBlob>()];
|
||||
if (transformer && numOfBlobs > 0 && Main.myPlayer == Player.whoAmI && CalamityKeybinds.TransformerHotKey.JustPressed && transformerCooldown <= 0 && true) // Add check if projectiles are active
|
||||
{
|
||||
// Go fire all the blobs
|
||||
@@ -3308,7 +3302,7 @@ namespace CalamityMod.CalPlayer
|
||||
for (int x = 0; x < Main.maxProjectiles; x++)
|
||||
{
|
||||
Projectile projectile = Main.projectile[x];
|
||||
if (projectile.active && projectile.type == ModContent.ProjectileType<TransformerBlob>())
|
||||
if (projectile.active && projectile.type == ProjectileType<TransformerBlob>())
|
||||
{
|
||||
projectile.localAI[0] = 5;
|
||||
}
|
||||
@@ -3622,7 +3616,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Gael's Greatsword replaces Rage Mode with an uber skull attack
|
||||
if (!(Player.HasCooldown(Cooldowns.GaelsRage.ID)) && Player.ActiveItem().type == ItemType<GaelsGreatsword>() && rage > 0f)
|
||||
{
|
||||
SoundEngine.PlaySound(SilvaHeadSummon.DispelSound, Player.Center);
|
||||
SoundEngine.PlaySound(SilvaArmor.DispelSound, Player.Center);
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
Dust.NewDust(Player.position, 120, 120, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1.5f);
|
||||
@@ -3823,13 +3817,13 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Player.AddBuff(BuffType<Buffs.StatBuffs.TarragonCloak>(), 602, false);
|
||||
Player.AddBuff(BuffType<Buffs.StatBuffs.TarragonCloak>(), TarragonHeadMelee.CloakDuration, false);
|
||||
}
|
||||
}
|
||||
if (bloodflareRanged && !Player.HasCooldown(BloodflareRangedSet.ID))
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
Player.AddCooldown(BloodflareRangedSet.ID, 1800);
|
||||
Player.AddCooldown(BloodflareRangedSet.ID, BloodflareHeadRanged.SoulCooldown);
|
||||
|
||||
SoundEngine.PlaySound(BloodflareHeadRanged.ActivationSound, Player.Center);
|
||||
for (int d = 0; d < 64; d++)
|
||||
@@ -3853,8 +3847,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
var source = Player.GetSource_Misc("1");
|
||||
int damage = (int)(Player.GetTotalDamage<RangedDamageClass>().ApplyTo(300f));
|
||||
for (int i = 0; i < 16; i++)
|
||||
int damage = (int)(Player.GetTotalDamage<RangedDamageClass>().ApplyTo(BloodflareHeadRanged.SoulDamage));
|
||||
for (int i = 0; i < BloodflareHeadRanged.SoulAmount; i++)
|
||||
{
|
||||
float ai1 = Main.rand.NextFloat() + 0.5f;
|
||||
Vector2 circleVel = (MathHelper.TwoPi * i / 16f).ToRotationVector2() * Main.rand.NextFloat(5f, 8f);
|
||||
@@ -3868,9 +3862,9 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Player.AddBuff(BuffType<AbyssalMadness>(), 300, false);
|
||||
Player.AddBuff(BuffType<AbyssalMadness>(), OmegaBlueHelmet.MadnessDuration, false);
|
||||
}
|
||||
Player.AddCooldown(OmegaBlue.ID, 1800);
|
||||
Player.AddCooldown(OmegaBlue.ID, OmegaBlueHelmet.MadnessDuration + OmegaBlueHelmet.MadnessCooldown);
|
||||
SoundEngine.PlaySound(OmegaBlueHelmet.ActivationSound, Player.Center);
|
||||
for (int i = 0; i < 66; i++)
|
||||
{
|
||||
@@ -3903,23 +3897,23 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Player.AddBuff(BuffType<Enraged>(), 600, false);
|
||||
Player.AddBuff(BuffType<Enraged>(), DemonshadeHelm.EnrageDuration, false);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
if (!npc.friendly && !npc.dontTakeDamage && Vector2.Distance(Player.Center, npc.Center) <= 3000f)
|
||||
npc.AddBuff(BuffType<Enraged>(), 600, false);
|
||||
npc.AddBuff(BuffType<Enraged>(), DemonshadeHelm.EnrageDuration, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (plagueReaper && !Player.HasCooldown(PlagueBlackout.ID))
|
||||
{
|
||||
SoundEngine.PlaySound(PlagueReaperMask.ActivationSound, Player.Center);
|
||||
Player.AddCooldown(PlagueBlackout.ID, 1800);
|
||||
Player.AddCooldown(PlagueBlackout.ID, PlagueReaperMask.BlackoutDuration + PlagueReaperMask.BlackoutCooldown);
|
||||
}
|
||||
if (forbiddenCirclet && Player.ownedProjectileCounts[ModContent.ProjectileType<CircletTornado>()] < 2)
|
||||
if (forbiddenCirclet && Player.ownedProjectileCounts[ProjectileType<CircletTornado>()] < 2)
|
||||
{
|
||||
forbiddenCooldown = ForbiddenCirclet.StormCooldown;
|
||||
int stormMana = (int)(ForbiddenCirclet.StormManaCost * Player.manaCost);
|
||||
@@ -3984,7 +3978,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
if (prismaticSet && !Player.HasCooldown(PrismaticLaser.ID) && prismaticLasers <= 0)
|
||||
prismaticLasers = CalamityUtils.SecondsToFrames(35f);
|
||||
prismaticLasers = PrismaticHelmet.LaserDuration + PrismaticHelmet.LaserCooldown;
|
||||
if (WulfrumHat.HasArmorSet(Player))
|
||||
{
|
||||
//Only activate if no cooldown & available scrap.
|
||||
@@ -4137,23 +4131,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.accRunSpeed < accRunSpeedMin)
|
||||
Player.accRunSpeed = accRunSpeedMin;
|
||||
|
||||
// Life Jelly regen aura spawn when using a healing potion
|
||||
if (timePotionSick == 1 && Player.whoAmI == Main.myPlayer && lifejelly && !GrandGelatin)
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ProjectileType<PinkJellyAura>(), 0, 0, Player.whoAmI);
|
||||
|
||||
// Cleansing Jelly cleansing aura spawn when using a healing potion
|
||||
if (timePotionSick == 1 && Player.whoAmI == Main.myPlayer && cleansingjelly && !GrandGelatin)
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ProjectileType<BlueJellyAura>(), 0, 0, Player.whoAmI);
|
||||
|
||||
// Grand Gellatin regen and cleansing aura spawn when using a healing potion
|
||||
if (timePotionSick == 1 && Player.whoAmI == Main.myPlayer && GrandGelatin && !absorber)
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ProjectileType<GreenJellyAura>(), 0, 0, Player.whoAmI);
|
||||
|
||||
// Absorber's regen, cleansing, and buffing aura spawn when using a healing potion
|
||||
if (timePotionSick == 1 && Player.whoAmI == Main.myPlayer && absorber)
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ProjectileType<AbsorberAura>(), 0, 0, Player.whoAmI);
|
||||
|
||||
if (Player.Transformation().Type == ModContent.ItemType<Popo>())
|
||||
if (Player.Transformation().Type == ItemType<Popo>())
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer && !snowmanNoseless)
|
||||
Player.AddBuff(BuffType<PopoBuff>(), 60, true);
|
||||
@@ -4342,9 +4320,9 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (Player.statMana < 0)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<ManaBurn>(), 10);
|
||||
} else if (Player.HasBuff(ModContent.BuffType<ManaBurn>())) {
|
||||
Player.ClearBuff(ModContent.BuffType<ManaBurn>());
|
||||
Player.AddBuff(BuffType<ManaBurn>(), 10);
|
||||
} else if (Player.HasBuff(BuffType<ManaBurn>())) {
|
||||
Player.ClearBuff(BuffType<ManaBurn>());
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -4393,20 +4371,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer && CalamityClientConfig.Instance.VanillaCooldownDisplay)
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer && Player.potionDelay != 0)
|
||||
potionSick = true;
|
||||
else
|
||||
potionSick = false;
|
||||
|
||||
if (!potionSick)
|
||||
timePotionSick = 0;
|
||||
else
|
||||
timePotionSick++;
|
||||
|
||||
// Add a cooldown display for potion sickness if the player has the vanilla counter ticking
|
||||
if (potionSick && !Player.HasCooldown(PotionSickness.ID))
|
||||
Player.AddCooldown(PotionSickness.ID, Player.potionDelay, false);
|
||||
|
||||
if (cooldowns.TryGetValue(PotionSickness.ID, out CooldownInstance cd))
|
||||
{
|
||||
if (Player.potionDelay != cd.timeLeft && cd.timeLeft > 0)
|
||||
@@ -4415,6 +4379,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (cd.timeLeft > cd.duration)
|
||||
cd.duration = cd.timeLeft; // If the new cooldown is larger than the full duration, update, else keep it the same.
|
||||
}
|
||||
else if (Player.whoAmI == Main.myPlayer && Player.potionDelay > 0)
|
||||
Player.AddCooldown(PotionSickness.ID, Player.potionDelay, false);
|
||||
|
||||
// Add a cooldown display for chaos state if the player has the vanilla counter ticking
|
||||
// This will make the cooldown look like vanilla Rod of Discord, as it wasn't applied by either Normality Relocator or Spectral Veil
|
||||
@@ -4446,17 +4412,6 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
//Star in a Bottle gives Mana Regeneration instead of it's usual effect when you don't already have Mana Regeneration
|
||||
if (!Player.manaRegenBuff && Player.HasBuff(BuffID.StarInBottle))
|
||||
{
|
||||
//Cancel out Star In A Bottle's normal effect
|
||||
Player.manaRegenDelayBonus -= 0.5f;
|
||||
Player.manaRegenBonus -= 10;
|
||||
//Apply Mana Regen Potion effect
|
||||
Player.manaRegenBuff = true;
|
||||
|
||||
}
|
||||
|
||||
ForceVariousEffects();
|
||||
}
|
||||
#endregion
|
||||
@@ -4521,6 +4476,47 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
#endregion
|
||||
|
||||
public override void PostUpdate()
|
||||
{
|
||||
#region Managing time control
|
||||
if (Main.netMode != NetmodeID.Server && Player == Main.LocalPlayer)
|
||||
{
|
||||
var power = CreativePowerManager.Instance.GetPower<CreativePowers.FreezeTime>();
|
||||
double dayrate = CreativePowerManager.Instance.GetPower<CreativePowers.ModifyTimeRate>().TargetTimeRate;
|
||||
if (CurrentFrameFlags.SleepingPlayersCount == CurrentFrameFlags.ActivePlayersCount && CurrentFrameFlags.SleepingPlayersCount > 0)
|
||||
dayrate *= 5;
|
||||
if (Main.IsFastForwardingTime())
|
||||
dayrate = 60;
|
||||
double tileUpdate = 1;
|
||||
double eventUpdate = 1;
|
||||
SystemLoader.ModifyTimeRate(ref dayrate, ref tileUpdate, ref eventUpdate);
|
||||
if (WeakTimeFreezeInUse)
|
||||
{
|
||||
if (!power.Enabled)
|
||||
WeakTimeFreezeInUse = false;
|
||||
else
|
||||
{
|
||||
if (WeakTimeFreezeUseTimer >= Bakidon.FreezeTime / Bakidon.RechargeMultiplier || Main.bloodMoon || Main.eclipse || Main.pumpkinMoon || Main.snowMoon)
|
||||
{
|
||||
|
||||
NetPacket packet = NetCreativePowersModule.PreparePacket(power.PowerId, 1);
|
||||
packet.Writer.Write(false);
|
||||
NetManager.Instance.SendToServerOrLoopback(packet);
|
||||
WeakTimeFreezeInUse = false;
|
||||
}
|
||||
WeakTimeFreezeUseTimer += 1 * (float)dayrate;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (WeakTimeFreezeUseTimer > 0)
|
||||
WeakTimeFreezeUseTimer -= 1 * (float)dayrate;
|
||||
else
|
||||
WeakTimeFreezeUseTimer = 0;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
public override void PostUpdateRunSpeeds()
|
||||
{
|
||||
#region SpeedBoosts
|
||||
@@ -4529,7 +4525,7 @@ namespace CalamityMod.CalPlayer
|
||||
float runAccMult = 1f +
|
||||
(victideBurrowHead ? VictideHeadBurrow.MoveSpeedAccelerationBoost : 0f) +
|
||||
(lunicCorpsLegs ? LunicCorpsBoots.MoveSpeedAccelerationBoost : 0f) +
|
||||
(shadowSpeed ? 0.5f : 0f) +
|
||||
(shadowSpeed ? DemonshadeGreaves.AccelerationBoost : 0f) +
|
||||
(stressPills ? 0.05f : 0f) +
|
||||
((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) +
|
||||
(aquaticHeartWaterBuff ? AquaticHeart.WaterSpeedBoost : 0f) +
|
||||
@@ -4537,7 +4533,7 @@ namespace CalamityMod.CalPlayer
|
||||
((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 0.15f : 0f) +
|
||||
(dragonScales ? 0.1f : 0f) +
|
||||
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
|
||||
(silvaSet ? 0.05f : 0f) +
|
||||
(silvaSet ? SilvaArmor.AccelerationBoost : 0f) +
|
||||
(getSandCloakAccelBoost ? 0.75f : 0f) +
|
||||
(nimbleBounderBoost ? NimbleBounder.AccelerationBoost : 0f) +
|
||||
(ascendantInsignia ? 0.25f : 0f ) + // Added to Soaring Insignia's 1.25x multiplier to get 1.5x
|
||||
@@ -4551,14 +4547,14 @@ namespace CalamityMod.CalPlayer
|
||||
float runSpeedMult = 1f +
|
||||
(victideBurrowHead ? VictideHeadBurrow.MoveSpeedAccelerationBoost : 0f) +
|
||||
(lunicCorpsLegs ? LunicCorpsBoots.MoveSpeedAccelerationBoost : 0f) +
|
||||
(shadowSpeed ? 0.5f : 0f) +
|
||||
(shadowSpeed ? DemonshadeGreaves.AccelerationBoost : 0f) +
|
||||
(stressPills ? 0.05f : 0f) +
|
||||
((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) +
|
||||
(aquaticHeartWaterBuff ? AquaticHeart.WaterSpeedBoost : 0f) +
|
||||
((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 0.15f : 0f) +
|
||||
(dragonScales ? 0.1f : 0f) +
|
||||
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
|
||||
(silvaSet ? 0.05f : 0f) +
|
||||
(silvaSet ? SilvaArmor.AccelerationBoost : 0f) +
|
||||
(nimbleBounderBoost ? NimbleBounder.AccelerationBoost : 0f) +
|
||||
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
|
||||
//(exaltedKillMode ? 0.4f : devilsDevastationKillMode ? 0.7f : 0) +
|
||||
@@ -4610,7 +4606,7 @@ namespace CalamityMod.CalPlayer
|
||||
ModDashMovement();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Player.oldVelocity = Player.velocity; // Apparently this value is not updated on its own, so we do it
|
||||
}
|
||||
#endregion
|
||||
@@ -4939,25 +4935,25 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.isDisplayDollOrInanimate)
|
||||
{
|
||||
// Body
|
||||
if (Player.armor[1].type == ModContent.ItemType<AuricTeslaBodyArmor>())
|
||||
if (Player.armor[1].type == ItemType<AuricTeslaBodyArmor>())
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "AuricTeslaBodyArmor", EquipType.Body);
|
||||
else if (Player.armor[1].type == ModContent.ItemType<DaedalusBreastplate>())
|
||||
else if (Player.armor[1].type == ItemType<DaedalusBreastplate>())
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "DaedalusBreastplate", EquipType.Body);
|
||||
else if (Player.armor[1].type == ModContent.ItemType<EmpyreanCloak>())
|
||||
else if (Player.armor[1].type == ItemType<EmpyreanCloak>())
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "EmpyreanCloak", EquipType.Body);
|
||||
else if (Player.armor[1].type == ModContent.ItemType<SnowRuffianChestplate>())
|
||||
else if (Player.armor[1].type == ItemType<SnowRuffianChestplate>())
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "SnowRuffianChestplate", EquipType.Body);
|
||||
else if (Player.armor[1].type == ModContent.ItemType<VictideBreastplate>())
|
||||
else if (Player.armor[1].type == ItemType<VictideBreastplate>())
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "VictideBreastplate", EquipType.Body);
|
||||
|
||||
// Legs
|
||||
if (Player.armor[2].type == ModContent.ItemType<VictideGreaves>())
|
||||
if (Player.armor[2].type == ItemType<VictideGreaves>())
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, "VictideGreaves", EquipType.Legs);
|
||||
|
||||
// Set Bonus
|
||||
if (Player.armor[0].type == ModContent.ItemType<SnowRuffianMask>()
|
||||
&& Player.armor[1].type == ModContent.ItemType<SnowRuffianChestplate>()
|
||||
&& Player.armor[2].type == ModContent.ItemType<SnowRuffianGreaves>())
|
||||
if (Player.armor[0].type == ItemType<SnowRuffianMask>()
|
||||
&& Player.armor[1].type == ItemType<SnowRuffianChestplate>()
|
||||
&& Player.armor[2].type == ItemType<SnowRuffianGreaves>())
|
||||
snowRuffianSet = true;
|
||||
}
|
||||
|
||||
@@ -5371,11 +5367,11 @@ namespace CalamityMod.CalPlayer
|
||||
playerUsingWeapon = false;
|
||||
|
||||
// Molten Amputator consumes stealth in a special way
|
||||
if (it.type == ModContent.ItemType<MoltenAmputator>())
|
||||
if (it.type == ItemType<MoltenAmputator>())
|
||||
playerUsingWeapon = false;
|
||||
|
||||
// Shock Grenade consumes stealth in a special way
|
||||
if (it.type == ModContent.ItemType<DoomsdayDevice>())
|
||||
if (it.type == ItemType<DoomsdayDevice>())
|
||||
playerUsingWeapon = false;
|
||||
|
||||
// Animation check depends on whether the item is "clockwork", like Clockwork Assault Rifle.
|
||||
|
||||
@@ -240,9 +240,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (calamityPlayer.crushDepth && drawInfo.shadow == 0f)
|
||||
CrushDepth.DrawEffects(drawInfo);
|
||||
|
||||
// Daybroken's visual effects are reduced if the player resists it
|
||||
if (calamityPlayer.daybroken && drawInfo.shadow == 0f)
|
||||
Daybroken.DrawEffects(drawInfo, reducedDaybrokenDamage);
|
||||
Daybroken.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.demonicFlames && drawInfo.shadow == 0f)
|
||||
DemonicFlames.DrawEffects(drawInfo);
|
||||
@@ -283,8 +282,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (calamityPlayer.mushy && drawInfo.shadow == 0f)
|
||||
Mushy.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.nightwither && drawInfo.shadow == 0f) // Looks weaker if you have Moon Stone equipped
|
||||
Nightwither.DrawEffects(drawInfo, reducedNightwitherDamage);
|
||||
if (calamityPlayer.nightwither && drawInfo.shadow == 0f)
|
||||
Nightwither.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.plague && drawInfo.shadow == 0f)
|
||||
Plague.DrawEffects(drawInfo);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Buffs.Cooldowns;
|
||||
@@ -14,11 +14,17 @@ using CalamityMod.Events;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Accessories.Vanity;
|
||||
using CalamityMod.Items.Armor.Aerospec;
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.Daedalus;
|
||||
using CalamityMod.Items.Armor.Demonshade;
|
||||
using CalamityMod.Items.Armor.Empyrean;
|
||||
using CalamityMod.Items.Armor.GodSlayer;
|
||||
using CalamityMod.Items.Armor.Hydrothermic;
|
||||
using CalamityMod.Items.Armor.LunicCorps;
|
||||
using CalamityMod.Items.Armor.Reaver;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
using CalamityMod.Items.Armor.Sulphurous;
|
||||
using CalamityMod.Items.Armor.Tarragon;
|
||||
using CalamityMod.Items.Armor.Victide;
|
||||
using CalamityMod.Items.Armor.Wulfrum;
|
||||
using CalamityMod.Items.Mounts;
|
||||
@@ -80,7 +86,7 @@ namespace CalamityMod.CalPlayer
|
||||
sVeilDust2.noLight = false;
|
||||
}
|
||||
|
||||
SoundEngine.PlaySound(SilvaHeadSummon.DispelSound, Player.Center);
|
||||
SoundEngine.PlaySound(SilvaArmor.DispelSound, Player.Center);
|
||||
|
||||
NetMessage.SendData(MessageID.Dodge, -1, -1, null, Player.whoAmI, 1f, 0f, 0f, 0, 0, 0);
|
||||
}
|
||||
@@ -159,7 +165,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.GiveUniversalIFrames(abyssalMirrorDodgeIFrames, true);
|
||||
|
||||
rogueStealth += 0.5f;
|
||||
SoundEngine.PlaySound(SilvaHeadSummon.ActivationSound, Player.Center);
|
||||
SoundEngine.PlaySound(SilvaArmor.ActivationSound, Player.Center);
|
||||
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<AbyssalMirror>()));
|
||||
for (int i = 0; i < 10; i++)
|
||||
@@ -296,10 +302,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (silvaSet && silvaCountdown > 0)
|
||||
{
|
||||
if (silvaCountdown == SilvaReviveDuration && !hasSilvaEffect)
|
||||
if (silvaCountdown == SilvaArmor.ReviveDuration && !hasSilvaEffect)
|
||||
{
|
||||
SoundEngine.PlaySound(SilvaHeadSummon.ActivationSound, Player.Center);
|
||||
Player.AddBuff(ModContent.BuffType<SilvaRevival>(), SilvaReviveDuration);
|
||||
SoundEngine.PlaySound(SilvaArmor.ActivationSound, Player.Center);
|
||||
Player.AddBuff(ModContent.BuffType<SilvaRevival>(), SilvaArmor.ReviveDuration);
|
||||
}
|
||||
|
||||
hasSilvaEffect = true;
|
||||
@@ -810,10 +816,10 @@ namespace CalamityMod.CalPlayer
|
||||
contactDamageReduction += 0.5;
|
||||
|
||||
if (tarragonCloak && tarraMelee && !Player.HasCooldown(Cooldowns.TarragonCloak.ID))
|
||||
contactDamageReduction += Buffs.StatBuffs.TarragonCloak.ContactDamageReduction;
|
||||
contactDamageReduction += TarragonHeadMelee.CloakContactDamageReduction;
|
||||
|
||||
if (bloodflareMelee && bloodflareFrenzy && !Player.HasCooldown(BloodflareFrenzy.ID))
|
||||
contactDamageReduction += 0.5;
|
||||
contactDamageReduction += BloodflareHeadMelee.FrenzyContactDamageReduction;
|
||||
|
||||
if (npc.Calamity().temporalSadness)
|
||||
contactDamageReduction += 0.5;
|
||||
@@ -827,11 +833,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (trinketOfChiBuff)
|
||||
contactDamageReduction += 0.08;
|
||||
|
||||
// Fearmonger set provides 15% multiplicative DR that ignores caps during the Holiday Moons.
|
||||
// To prevent abuse, this effect does not work if there are any bosses alive.
|
||||
if (fearmongerSet && !areThereAnyDamnBosses && (Main.pumpkinMoon || Main.snowMoon))
|
||||
contactDamageReduction += 0.15;
|
||||
|
||||
if (abyssalDivingSuitPlates)
|
||||
contactDamageReduction += AbyssalDivingSuit.PlatesAllDamageReduction - abyssalDivingSuitPlateHits * AbyssalDivingSuit.PlatesHitDecay;
|
||||
|
||||
@@ -1076,11 +1077,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (trinketOfChiBuff)
|
||||
projectileDamageReduction += 0.08;
|
||||
|
||||
// Fearmonger set provides 15% multiplicative DR that ignores caps during the Holiday Moons.
|
||||
// To prevent abuse, this effect does not work if there are any bosses alive.
|
||||
if (fearmongerSet && !areThereAnyDamnBosses && (Main.pumpkinMoon || Main.snowMoon))
|
||||
projectileDamageReduction += 0.15;
|
||||
|
||||
if (abyssalDivingSuitPlates)
|
||||
projectileDamageReduction += AbyssalDivingSuit.PlatesAllDamageReduction - abyssalDivingSuitPlateHits * AbyssalDivingSuit.PlatesHitDecay;
|
||||
|
||||
@@ -1204,7 +1200,7 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 pushVel = Utils.DirectionTo(Player.Center, npc.Center) * 7;
|
||||
if (!npc.dontTakeDamage)
|
||||
{
|
||||
int onHitDamage = (int)Player.GetBestClassDamage().ApplyTo(40);
|
||||
int onHitDamage = (int)Player.GetBestClassDamage().ApplyTo(CrawCarapace.ThornsDamage);
|
||||
Projectile revenge = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), onHitDamage, 0f, Player.whoAmI, npc.whoAmI, pushVel.X, pushVel.Y);
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.NPCHit33 with { Volume = 0.5f }, Player.Center);
|
||||
@@ -1229,7 +1225,7 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 pushVel = Utils.DirectionTo(Player.Center, npc.Center) * 15;
|
||||
if (!npc.dontTakeDamage)
|
||||
{
|
||||
int onHitDamage = (int)Player.GetBestClassDamage().ApplyTo(250);
|
||||
int onHitDamage = (int)Player.GetBestClassDamage().ApplyTo(Baroclaw.ThornsDamage);
|
||||
Projectile revenge = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), onHitDamage, -1f, Player.whoAmI, npc.whoAmI, pushVel.X, pushVel.Y);
|
||||
|
||||
npc.AddBuff(ModContent.BuffType<ArmorCrunch>(), 900);
|
||||
@@ -1264,8 +1260,8 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 pushVel = Utils.DirectionTo(Player.Center, npc.Center) * 22;
|
||||
if (!npc.dontTakeDamage)
|
||||
{
|
||||
int onHitDamage = (int)Player.GetBestClassDamage().ApplyTo(350);
|
||||
Projectile revenge = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), onHitDamage, -1, Player.whoAmI, npc.whoAmI, pushVel.X, pushVel.Y);
|
||||
int onHitDamage = (int)Player.GetBestClassDamage().ApplyTo(TheAbsorber.ThornsDamage);
|
||||
Projectile revenge = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), onHitDamage, -1f, Player.whoAmI, npc.whoAmI, pushVel.X, pushVel.Y);
|
||||
|
||||
npc.AddBuff(ModContent.BuffType<AbsorberAffliction>(), 900);
|
||||
}
|
||||
@@ -2058,10 +2054,9 @@ namespace CalamityMod.CalPlayer
|
||||
// Regardless of whether shields took damage, iterate over and stall all shield regen on ANY hit.
|
||||
// This applies even if you are hit while shields are fully down, or if you unequip any of the relevant items.
|
||||
{
|
||||
// Rover Drive does not recharge while partially full, only when broken.
|
||||
// If you are hit when recharging, though, that timer gets reset.
|
||||
if (cooldowns.TryGetValue(WulfrumRoverDriveRecharge.ID, out var roverDriveRechargeCD))
|
||||
roverDriveRechargeCD.timeLeft = RoverDrive.ShieldRechargeTime;
|
||||
// Set Rover Drive's recharge delay to full. Override any existing cooldown instance.
|
||||
if (roverDrive)
|
||||
Player.AddCooldown(WulfrumRoverDriveRecharge.ID, RoverDrive.ShieldRechargeDelay, true);
|
||||
|
||||
// Set the Lunic Corps Armor's recharge delay to full. Override any existing cooldown instance.
|
||||
if (lunicCorpsSet)
|
||||
@@ -2405,15 +2400,15 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (tarraMelee)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<TarraLifeRegen>(), 120);
|
||||
Player.AddBuff(ModContent.BuffType<TarraLifeRegen>(), TarragonHeadMelee.TarraLifeDuration);
|
||||
}
|
||||
else if (xerocSet)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<EmpyreanWrath>(), 180);
|
||||
Player.AddBuff(ModContent.BuffType<EmpyreanWrath>(), EmpyreanMask.WrathDuration);
|
||||
}
|
||||
else if (reaverDefense)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<ReaverRage>(), 180);
|
||||
Player.AddBuff(ModContent.BuffType<ReaverRage>(), ReaverHeadTank.ReaverRageDuration);
|
||||
}
|
||||
|
||||
if (fBarrier || (aquaticHeart && NPC.downedBoss3))
|
||||
@@ -2536,10 +2531,9 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
|
||||
var source = Player.GetSource_OnHurt(hurtInfo.DamageSource, AerospecBreastplate.FeatherEntitySourceContext);
|
||||
int featherDamage = (int)Player.GetBestClassDamage().ApplyTo(AerospecBreastplate.SetBonusFeatherDamage);
|
||||
for (int n = 0; n < 4; n++)
|
||||
{
|
||||
int featherDamage = (int)Player.GetBestClassDamage().ApplyTo(AerospecBreastplate.SetBonusFeatherDamage);
|
||||
|
||||
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 20f, ModContent.ProjectileType<StickyFeatherAero>(), featherDamage, 1f, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
@@ -2548,14 +2542,8 @@ namespace CalamityMod.CalPlayer
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<HideofAstrumDeus>()));
|
||||
SoundEngine.PlaySound(SoundID.Item74, Player.Center);
|
||||
|
||||
int blazeDamage = (int)Player.GetBestClassDamage().ApplyTo(25);
|
||||
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(320);
|
||||
|
||||
int blazeDamage = (int)Player.GetBestClassDamage().ApplyTo(HideofAstrumDeus.BlazeDamage);
|
||||
Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, 0f, ModContent.ProjectileType<HideOfAstrumDeusExplosion>(), blazeDamage, 5f, Player.whoAmI, 0f, 1f);
|
||||
for (int n = 0; n < 12; n++)
|
||||
{
|
||||
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ModContent.ProjectileType<AstralStar>(), astralStarDamage, 5f, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
// TODO -- Make Deific Amulet and Rampart of Deities' retaliation effects way cooler
|
||||
// In the meantime, gave them homing astral bombers instead of the lame falling stars
|
||||
@@ -2565,8 +2553,7 @@ namespace CalamityMod.CalPlayer
|
||||
int projAmount = (rampartOfDeities ? 12 : 6);
|
||||
for (int n = 0; n < projAmount; n++)
|
||||
{
|
||||
int baseDamage = 130 * (Main.masterMode ? 3 : Main.expertMode ? 2 : 1);
|
||||
int deificProjDamage = (int)Player.GetBestClassDamage().ApplyTo(baseDamage);
|
||||
int deificProjDamage = (int)Player.GetBestClassDamage().ApplyTo(DeificAmulet.StarDamage);
|
||||
|
||||
Projectile onHitProj = Main.projectile[Projectile.NewProjectile(source, Player.Center, new Vector2(0,-15).RotatedBy(MathHelper.TwoPi/projAmount*n), ModContent.ProjectileType<AstralStar>(), deificProjDamage, 4f, Player.whoAmI)];
|
||||
if (onHitProj.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
@@ -2603,7 +2590,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<RottenBrain>()));
|
||||
int effectStrength = amalgam ? 3 : aBrain ? 2 : 1;
|
||||
int effectDamage = amalgam ? 400 : aBrain ? 35 : 15;
|
||||
int effectDamage = amalgam ? TheAmalgam.NimbusDamage : aBrain ? AmalgamatedBrain.NimbusDamage : RottenBrain.NimbusDamage;
|
||||
effectDamage = (int)Player.GetBestClassDamage().ApplyTo(effectDamage);
|
||||
|
||||
Vector2 spawnerVelocity = -Vector2.UnitY.RotatedByRandom(MathHelper.Pi / 40f) * 12.5f;
|
||||
@@ -2637,7 +2624,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (hurtInfo.Damage > 0)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item74, Player.Center);
|
||||
int eDamage = (int)Player.GetBestClassDamage().ApplyTo(230);
|
||||
int eDamage = (int)Player.GetBestClassDamage().ApplyTo(HydrothermicArmor.BlazeDamage);
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
Projectile.NewProjectile(fuckYouBitch, Player.Center, Vector2.Zero, ModContent.ProjectileType<DeepseaBlaze>(), eDamage, 1f, Player.whoAmI, 0f, 0f);
|
||||
@@ -2664,28 +2651,17 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (reaverDefense) //Defense and DR Helm
|
||||
{
|
||||
var source = Player.GetSource_Misc("23");
|
||||
if (hurtInfo.Damage > 0)
|
||||
{
|
||||
int rDamage = (int)Player.GetBestClassDamage().ApplyTo(240);
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
Projectile.NewProjectile(source, Player.Center.X, Player.position.Y + 36f, 0f, -18f, ModContent.ProjectileType<ReaverThornBase>(), rDamage, 0f, Player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
else if (godSlayerDamage) //god slayer melee helm
|
||||
{
|
||||
var source = Player.GetSource_Misc("24");
|
||||
if (hurtInfo.Damage > 80)
|
||||
if (hurtInfo.Damage > GodSlayerHeadMelee.SetBonusHurtDamageThreshold)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item73, Player.Center);
|
||||
float spread = 45f * 0.0174f;
|
||||
double startAngle = Math.Atan2(Player.velocity.X, Player.velocity.Y) - spread / 2;
|
||||
double deltaAngle = spread / 8f;
|
||||
double offsetAngle;
|
||||
int shrapnelDamage = Player.CalcIntDamage<MeleeDamageClass>(675);
|
||||
int shrapnelDamage = Player.CalcIntDamage<MeleeDamageClass>(GodSlayerHeadMelee.DartDamage);
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
@@ -2705,7 +2681,7 @@ namespace CalamityMod.CalPlayer
|
||||
var source = Player.GetSource_OnHurt(hurtInfo.DamageSource, DemonshadeHelm.ShadowScytheEntitySourceContext);
|
||||
for (int l = 0; l < 2; l++)
|
||||
{
|
||||
int shadowbeamDamage = (int)Player.GetBestClassDamage().ApplyTo(300);
|
||||
int shadowbeamDamage = (int)Player.GetBestClassDamage().ApplyTo(DemonshadeHelm.BeamDamage);
|
||||
|
||||
Projectile beam = CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 22f, ProjectileID.ShadowBeamFriendly, shadowbeamDamage, 7f, Player.whoAmI);
|
||||
if (beam.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
@@ -2717,7 +2693,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
for (int l = 0; l < 5; l++)
|
||||
{
|
||||
int scytheDamage = (int)Player.GetBestClassDamage().ApplyTo(500);
|
||||
int scytheDamage = (int)Player.GetBestClassDamage().ApplyTo(DemonshadeHelm.ScytheDamage);
|
||||
|
||||
Projectile scythe = CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 22f, ProjectileID.DemonScythe, scytheDamage, 7f, Player.whoAmI);
|
||||
if (scythe.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
|
||||
@@ -9,6 +9,10 @@ using CalamityMod.Cooldowns;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Accessories.Wings;
|
||||
using CalamityMod.Items.Armor.Fearmonger;
|
||||
using CalamityMod.Items.Armor.Reaver;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
using CalamityMod.Items.Armor.Tarragon;
|
||||
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Items.Potions;
|
||||
@@ -119,8 +123,8 @@ namespace CalamityMod.CalPlayer
|
||||
ApplyDoTDebuff(searingLava, 30);
|
||||
ApplyDoTDebuff(demonicFlames, 33, purity); // Never inflicted on the player
|
||||
ApplyDoTDebuff(laceration, 36, purity);
|
||||
ApplyDoTDebuff(daybroken, reducedDaybrokenDamage ? 20 : 40, purity);
|
||||
ApplyDoTDebuff(nightwither, reducedNightwitherDamage ? 20 : 40, purity);
|
||||
ApplyDoTDebuff(daybroken, 40, purity);
|
||||
ApplyDoTDebuff(nightwither, 40, purity);
|
||||
ApplyDoTDebuff(holyFlames, 40, purity);
|
||||
ApplyDoTDebuff(voidfrost, 40, purity);
|
||||
ApplyDoTDebuff(hadopelagicPressure, 40, purity);
|
||||
@@ -289,34 +293,11 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// At the last second, Reaver defense helm reduces DoT debuffs by 20%
|
||||
if (reaverDefense)
|
||||
totalNegativeLifeRegen = (int)(0.8f * totalNegativeLifeRegen);
|
||||
totalNegativeLifeRegen -= (int)(totalNegativeLifeRegen * ReaverHeadTank.SetBonusDebuffDamageReduction);
|
||||
|
||||
Player.lifeRegen -= (int)totalNegativeLifeRegen;
|
||||
|
||||
#region Life Regen That Works Even During DoT Debuffs
|
||||
|
||||
// Honey Dew (and upgrades)
|
||||
if (alwaysHoneyRegen)
|
||||
{
|
||||
// Exact copy of vanilla Honey behavior, but does not stack with actually standing in Honey
|
||||
if (!Player.honey)
|
||||
{
|
||||
alwaysHoneyRegenAmount += 1;
|
||||
Player.lifeRegen += 2;
|
||||
Player.lifeRegenTime += 1;
|
||||
|
||||
// Grants +2 life regen if negative life regen would otherwise occur.
|
||||
// However, this can't bring regen into the positives.
|
||||
if (Player.lifeRegen < 0)
|
||||
{
|
||||
alwaysHoneyRegenAmount += Math.Min(1f, 0 - Player.lifeRegen/2f);
|
||||
Player.lifeRegen += 2;
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (honeyDewHalveDebuffs)
|
||||
{
|
||||
// Tick down all sickness debuffs; this makes them expire 2x faster
|
||||
@@ -386,11 +367,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (rOoze || aAmpoule || purity)
|
||||
{
|
||||
float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / (float)Player.statLifeMax2;
|
||||
//Ambrosial Ampule and ooze give between 2 and 6 hp/s
|
||||
int lifeRegenToGive = (int)Math.Round(MathHelper.Lerp((purity || aAmpoule? 2f : 4f), (purity || aAmpoule ? 10f : 12f), missingLifeRatio));//Rounding is needed for it to ever actually give +6 hp/s, as the integer conversion would otherwise floor it.
|
||||
//Ambrosial Ampule and ooze give between 2 and 5 hp/s
|
||||
int lifeRegenToGive = (int)Math.Round(MathHelper.Lerp(4f, 10f, missingLifeRatio));//Rounding is needed for it to ever actually give +5 hp/s, as the integer conversion would otherwise floor it.
|
||||
Player.lifeRegen += lifeRegenToGive;
|
||||
radiantOozeRegen += lifeRegenToGive / 2f;
|
||||
ambrosialAmpouleRegen += lifeRegenToGive / 2f;
|
||||
purityRegen += lifeRegenToGive / 2f;
|
||||
}
|
||||
|
||||
@@ -414,9 +394,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.miscCounter % healFrameCadence == healFrameCadence - 1)
|
||||
Player.Heal(1);
|
||||
|
||||
if (Player.lifeRegenTime < 900)
|
||||
Player.lifeRegenTime = 900;
|
||||
|
||||
intendedPurityDefense = 15 + (currentDebuffs - 1) * 5;
|
||||
if (jewelBonusDefense < intendedPurityDefense)
|
||||
jewelBonusDefense = intendedPurityDefense;
|
||||
@@ -456,8 +433,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (currentDebuffs > 0)
|
||||
{
|
||||
Player.lifeRegen += 4;
|
||||
if (Player.lifeRegenTime < 900)
|
||||
Player.lifeRegenTime = 900;
|
||||
|
||||
intendedJewelDefense = 12 + (currentDebuffs - 1) * 4;
|
||||
if (jewelBonusDefense < intendedJewelDefense)
|
||||
@@ -478,13 +453,9 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Player.lifeRegen += 2;
|
||||
|
||||
// If any debuff is detected, provide even more life regen and massively accelerate it
|
||||
// If any debuff is detected, provide even more life regen
|
||||
if (Player.buffType.Any(i => CalamityBuffSets.IsDebuff[i]))
|
||||
{
|
||||
Player.lifeRegen += 3;
|
||||
if (Player.lifeRegenTime < 900)
|
||||
Player.lifeRegenTime = 900;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -585,7 +556,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
if (tRegen)
|
||||
Player.lifeRegen += 3;
|
||||
Player.lifeRegen += TarragonHeadMelee.TarraLifeRegenBoost;
|
||||
|
||||
if (sRegen)
|
||||
Player.lifeRegen += SpiritGlyph.RegenBoost;
|
||||
@@ -621,7 +592,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
if (silvaSet)
|
||||
Player.lifeRegen += 6;
|
||||
Player.lifeRegen += SilvaArmor.SetBonusRegenBoost;
|
||||
|
||||
if (phantomicHeartRegen <= 720 && phantomicHeartRegen >= 600)
|
||||
{
|
||||
@@ -661,20 +632,13 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeRegen += 4;
|
||||
}
|
||||
|
||||
if (bloodflareSummon)
|
||||
{
|
||||
if (Player.statLife <= (int)(actualMaxLife * 0.5))
|
||||
Player.lifeRegen += 2;
|
||||
}
|
||||
|
||||
if (fearmongerSet && fearmongerRegenFrames > 0)
|
||||
{
|
||||
Player.lifeRegen += 7;
|
||||
if (Player.lifeRegenTime < FearmongerGreathelm.MinionRegenTimeFloor)
|
||||
Player.lifeRegenTime = FearmongerGreathelm.MinionRegenTimeFloor;
|
||||
|
||||
if (Player.lifeRegenTime < 900)
|
||||
Player.lifeRegenTime = 900;
|
||||
|
||||
Player.lifeRegenTime += 4;
|
||||
Player.lifeRegen += FearmongerGreathelm.MinionRegenBoost;
|
||||
Player.lifeRegenTime += FearmongerGreathelm.MinionRegenTimeBoost;
|
||||
}
|
||||
|
||||
if (pinkCandle && !noLifeRegen)
|
||||
@@ -699,63 +663,51 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
#region Standing Still Life Regen
|
||||
// Standing still healing bonuses (all are exclusive with vanilla Shiny Stone, but all function similarly)
|
||||
if (!Player.shinyStone && Player.StandingStill() && Player.velocity.Y == 0 && Player.itemAnimation == 0)
|
||||
if (!Player.shinyStone && Player.StandingStill() && Player.velocity.Y == 0 && Player.itemAnimation == 0 && (shadeRegen || cFreeze))
|
||||
{
|
||||
bool honeyDewWorking = honeyTurboRegen && Player.honeyWet;
|
||||
bool anyStandingStillLifeRegen = shadeRegen || cFreeze || honeyDewWorking || aAmpoule || purity;
|
||||
|
||||
// Divides all negative life regen by two before applying any other effects.
|
||||
if (anyStandingStillLifeRegen && Player.lifeRegen < 0)
|
||||
if (Player.lifeRegen < 0)
|
||||
Player.lifeRegen /= 2;
|
||||
|
||||
// Spawn dust of some flavor while actually regenerating, aAmpule and purity have a slightly different looking style
|
||||
// Spawn dust of some flavor while actually regenerating
|
||||
if (Player.lifeRegen > 0 && Player.statLife < actualMaxLife)
|
||||
{
|
||||
int dustType = shadeRegen ? 173 : cFreeze ? 67 : honeyDewWorking ? DustID.Honey2 : aAmpoule ? 228 : purity ? 187 : -1;
|
||||
bool dustSpawnRolled = Main.rand.Next(30000) < Player.lifeRegenTime || purity ? Main.rand.NextBool() : aAmpoule ? Main.rand.NextBool(4) : Main.rand.NextBool(30);
|
||||
int dustType = shadeRegen ? 173 : 67;
|
||||
bool dustSpawnRolled = Main.rand.Next(30000) < Player.lifeRegenTime ? Main.rand.NextBool() : Main.rand.NextBool(30);
|
||||
if (dustType != -1 && dustSpawnRolled)
|
||||
{
|
||||
Dust regen = Dust.NewDustDirect(Player.position, Player.width, Player.height, dustType, 0f, 0f, purity || aAmpoule ? 80 : 200, default, purity || aAmpoule ? 0.5f : 1f);
|
||||
Dust regen = Dust.NewDustDirect(Player.position, Player.width, Player.height, dustType, 0f, 0f, 200, default, 1f);
|
||||
regen.noGravity = true;
|
||||
regen.fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
regen.velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= purity || aAmpoule ? 55f : 34f;
|
||||
regen.position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
|
||||
// Actually apply "standing still" regeneration (the stats are granted even at full health)
|
||||
float regenTimeNeededForTurboRegen = shadeRegen ? 40f : cFreeze ? 60f : honeyDewWorking ? 90f : aAmpoule ? 90f : purity ? 60f : -1f;
|
||||
float regenTimeNeededForTurboRegen = shadeRegen ? 40f : 60f;
|
||||
|
||||
// 4 = vanilla Shiny Stone
|
||||
int turboRegenPower = shadeRegen || cFreeze || purity ? 4 : honeyDewWorking || aAmpoule ? 3 : -1;
|
||||
// After a brief delay determined by your form of standing still regen, min-cap life regen time at 900 / 3600.
|
||||
if (Player.lifeRegenTime > regenTimeNeededForTurboRegen && Player.lifeRegenTime < 900f)
|
||||
Player.lifeRegenTime = 900f;
|
||||
|
||||
if (turboRegenPower > 0)
|
||||
{
|
||||
// After a brief delay determined by your form of standing still regen, min-cap life regen time at 900 / 3600.
|
||||
if (Player.lifeRegenTime > regenTimeNeededForTurboRegen && Player.lifeRegenTime < 900f)
|
||||
Player.lifeRegenTime = 900f;
|
||||
|
||||
Player.lifeRegen += turboRegenPower;
|
||||
Player.lifeRegenTime += turboRegenPower;
|
||||
purityRegen += turboRegenPower / 2f;
|
||||
if (!shadeRegen || cFreeze || purity) ambrosialAmpouleRegen += turboRegenPower / 2f;
|
||||
}
|
||||
Player.lifeRegen += 4;
|
||||
Player.lifeRegenTime += 4;
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (regenerator) // Gives special regen of it's own, but disables all regular life regen
|
||||
{
|
||||
if (Player.miscCounter % 7 == 0 && Player.statLife < (int)(Player.statLifeMax2 * 0.5f))
|
||||
if (Player.miscCounter % Regenerator.FramesPerHeal == 0 && Player.statLife < (int)(Player.statLifeMax2 * 0.5f))
|
||||
Player.HealPlayer(1, HealTextType.None);
|
||||
|
||||
// Boost life regen time quite a bit.
|
||||
// This is so that in events and such where small hits are common, your damage boost isn't completley negated
|
||||
if (Player.lifeRegenTime < 3600)
|
||||
Player.lifeRegenTime += 10;
|
||||
Player.lifeRegenTime += Regenerator.RegenTimeBoost;
|
||||
}
|
||||
else
|
||||
regeneratorDamage = 0;
|
||||
@@ -824,7 +776,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.palladiumRegen)
|
||||
finalRegen += 4;
|
||||
|
||||
regeneratorDamage = (finalRegen * 1.75f) * 0.01f;
|
||||
regeneratorDamage = finalRegen * Regenerator.RegenToDamageRatio;
|
||||
Player.GetDamage<GenericDamageClass>() += regeneratorDamage;
|
||||
|
||||
if (Player.lifeRegen > 0)
|
||||
@@ -834,11 +786,11 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.lifeRegenCount > 0)
|
||||
Player.lifeRegenCount = 0;
|
||||
|
||||
//Hard-lock the player's health to 50%.
|
||||
//Hard-lock the player's health to a certain ratio.
|
||||
//No lifesteal, no regen, no healing pots
|
||||
if (Player.statLife >= (int)(Player.statLifeMax2 * 0.5f))
|
||||
if (Player.statLife >= (int)(Player.statLifeMax2 * Regenerator.HealthRatioCap))
|
||||
{
|
||||
Player.statLife = (int)(Player.statLifeMax2 * 0.5f);
|
||||
Player.statLife = (int)(Player.statLifeMax2 * Regenerator.HealthRatioCap);
|
||||
Player.moonLeech = true;
|
||||
healingPotionMultiplier = 0;
|
||||
}
|
||||
|
||||
@@ -18,12 +18,16 @@ using CalamityMod.Items;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Ammo;
|
||||
using CalamityMod.Items.Armor.Aerospec;
|
||||
using CalamityMod.Items.Armor.Auric;
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.Brimflame;
|
||||
using CalamityMod.Items.Armor.DesertProwler;
|
||||
using CalamityMod.Items.Armor.Empyrean;
|
||||
using CalamityMod.Items.Armor.GodSlayer;
|
||||
using CalamityMod.Items.Armor.Hydrothermic;
|
||||
using CalamityMod.Items.Armor.LunicCorps;
|
||||
using CalamityMod.Items.Armor.OmegaBlue;
|
||||
using CalamityMod.Items.Armor.PlagueReaper;
|
||||
using CalamityMod.Items.Armor.Prismatic;
|
||||
using CalamityMod.Items.Armor.Reaver;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
@@ -1490,7 +1494,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (!tentaclesPresent[i])
|
||||
{
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(350);
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(OmegaBlueHelmet.TentacleDamage);
|
||||
|
||||
var source = Player.GetSource_FromThis(OmegaBlueHelmet.TentacleEntitySourceContext);
|
||||
Vector2 vel = new Vector2(Main.rand.Next(-13, 14), Main.rand.Next(-13, 14)) * 0.25f;
|
||||
@@ -1499,15 +1503,11 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
float damageUp = 0.1f;
|
||||
int critUp = 10;
|
||||
if (omegaBlueAbyssalMadness)
|
||||
{
|
||||
damageUp += 0.1f;
|
||||
critUp += 10;
|
||||
Player.GetDamage<GenericDamageClass>() += OmegaBlueHelmet.MadnessDamageBoost;
|
||||
Player.GetCritChance<GenericDamageClass>() += OmegaBlueHelmet.MadnessCritBoost;
|
||||
}
|
||||
Player.GetDamage<GenericDamageClass>() += damageUp;
|
||||
Player.GetCritChance<GenericDamageClass>() += critUp;
|
||||
}
|
||||
|
||||
// Rain armor set effects
|
||||
@@ -2289,13 +2289,13 @@ namespace CalamityMod.CalPlayer
|
||||
canFireAtaxiaRangedProjectile = true;
|
||||
if (Player.miscCounter % HydrothermicHeadRogue.VolleyCooldown == 0)
|
||||
canFireAtaxiaRogueProjectile = true;
|
||||
if (Player.miscCounter % 100 == 0)
|
||||
if (Player.miscCounter % BloodflareHeadMagic.GhostBoltCooldown == 0)
|
||||
canFireBloodflareMageProjectile = true;
|
||||
if (Player.miscCounter % 150 == 0)
|
||||
{
|
||||
canFireGodSlayerRangedProjectile = true;
|
||||
if (Player.miscCounter % BloodflareHeadRanged.BloodBombCooldown == 0)
|
||||
canFireBloodflareRangedProjectile = true;
|
||||
}
|
||||
if (Player.miscCounter % GodSlayerHeadRanged.ShrapnelRoundCooldown == 0)
|
||||
canFireGodSlayerRangedProjectile = true;
|
||||
|
||||
if (auralisAurora > 0)
|
||||
auralisAurora--;
|
||||
if (auralisAuroraCooldown > 0)
|
||||
@@ -2470,8 +2470,8 @@ namespace CalamityMod.CalPlayer
|
||||
silvaCountdown -= 1;
|
||||
if (silvaCountdown <= 0)
|
||||
{
|
||||
SoundEngine.PlaySound(SilvaHeadSummon.DispelSound, Player.Center);
|
||||
Player.AddCooldown(SilvaRevive.ID, CalamityUtils.SecondsToFrames(5 * 60));
|
||||
SoundEngine.PlaySound(SilvaArmor.DispelSound, Player.Center);
|
||||
Player.AddCooldown(SilvaRevive.ID, SilvaArmor.ReviveCooldown);
|
||||
}
|
||||
|
||||
for (int j = 0; j < 2; j++)
|
||||
@@ -2489,7 +2489,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (!Player.HasCooldown(SilvaRevive.ID) && hasSilvaEffect && silvaCountdown <= 0 && !areThereAnyDamnBosses && !areThereAnyDamnEvents)
|
||||
{
|
||||
silvaCountdown = 480;
|
||||
silvaCountdown = SilvaArmor.ReviveDuration;
|
||||
hasSilvaEffect = false;
|
||||
}
|
||||
|
||||
@@ -2501,7 +2501,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
tarraDefenseTime = 600;
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
Player.AddCooldown(Cooldowns.TarragonCloak.ID, CalamityUtils.SecondsToFrames(30));
|
||||
Player.AddCooldown(Cooldowns.TarragonCloak.ID, TarragonHeadMelee.CloakCooldown);
|
||||
}
|
||||
|
||||
for (int j = 0; j < 2; j++)
|
||||
@@ -2527,11 +2527,11 @@ namespace CalamityMod.CalPlayer
|
||||
if (tarragonImmunity && !disableAllDodges)
|
||||
Player.GiveUniversalIFrames(2, true);
|
||||
|
||||
if (tarraThrowingCrits >= 50)
|
||||
if (tarraThrowingCrits >= TarragonHeadRogue.CritsToActivateImmunity)
|
||||
{
|
||||
tarraThrowingCrits = 0;
|
||||
if (Player.whoAmI == Main.myPlayer && !disableAllDodges)
|
||||
Player.AddBuff(ModContent.BuffType<Buffs.StatBuffs.TarragonImmunity>(), 150, false);
|
||||
Player.AddBuff(ModContent.BuffType<Buffs.StatBuffs.TarragonImmunity>(), TarragonHeadRogue.ImmunityDuration, false);
|
||||
}
|
||||
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
@@ -2539,10 +2539,10 @@ namespace CalamityMod.CalPlayer
|
||||
int buffID = Player.buffType[l];
|
||||
if (Player.buffTime[l] <= 2 && buffID == ModContent.BuffType<Buffs.StatBuffs.TarragonImmunity>())
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
Player.AddCooldown(Cooldowns.TarragonImmunity.ID, CalamityUtils.SecondsToFrames(25));
|
||||
Player.AddCooldown(Cooldowns.TarragonImmunity.ID, TarragonHeadRogue.ImmunityCooldown);
|
||||
|
||||
if (CalamityBuffSets.IsDebuff[buffID])
|
||||
Player.GetDamage<RogueDamageClass>() += 0.1f;
|
||||
Player.GetDamage<RogueDamageClass>() += TarragonHeadRogue.RogueDamageBoostWhileDebuffed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2560,7 +2560,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
bloodflareMeleeHits = 0;
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
Player.AddBuff(ModContent.BuffType<BloodflareBloodFrenzy>(), 302, false);
|
||||
Player.AddBuff(ModContent.BuffType<BloodflareBloodFrenzy>(), BloodflareHeadMelee.FrenzyDuration, false);
|
||||
}
|
||||
|
||||
if (bloodflareFrenzy)
|
||||
@@ -2569,11 +2569,11 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
int hasBuff = Player.buffType[l];
|
||||
if (Player.buffTime[l] <= 2 && hasBuff == ModContent.BuffType<BloodflareBloodFrenzy>() && Player.whoAmI == Main.myPlayer)
|
||||
Player.AddCooldown(BloodflareFrenzy.ID, CalamityUtils.SecondsToFrames(30));
|
||||
Player.AddCooldown(BloodflareFrenzy.ID, BloodflareHeadMelee.FrenzyCooldown);
|
||||
}
|
||||
|
||||
Player.GetCritChance<MeleeDamageClass>() += 25;
|
||||
Player.GetDamage<MeleeDamageClass>() += 0.25f;
|
||||
Player.GetCritChance<MeleeDamageClass>() += BloodflareHeadMelee.FrenzyMeleeCritBoost;
|
||||
Player.GetDamage<MeleeDamageClass>() += BloodflareHeadMelee.FrenzyMeleeDamageBoost;
|
||||
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
@@ -2630,7 +2630,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Player.moveSpeed += TheAbsorber.MoveSpeedBoost;
|
||||
Player.jumpSpeedBoost += TheAbsorber.JumpSpeedBoost;
|
||||
Player.thorns += TheAbsorber.ThornsBoost;
|
||||
}
|
||||
|
||||
// Nimble Bounder bonus
|
||||
@@ -2880,26 +2879,26 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
bloodflareFrenzy = false;
|
||||
Player.ClearBuff(ModContent.BuffType<BloodflareBloodFrenzy>());
|
||||
Player.AddCooldown(BloodflareFrenzy.ID, CalamityUtils.SecondsToFrames(30));
|
||||
Player.AddCooldown(BloodflareFrenzy.ID, BloodflareHeadMelee.FrenzyCooldown);
|
||||
}
|
||||
if (!tarraMelee && tarragonCloak)
|
||||
{
|
||||
tarragonCloak = false;
|
||||
Player.ClearBuff(ModContent.BuffType<Buffs.StatBuffs.TarragonCloak>());
|
||||
Player.AddCooldown(Cooldowns.TarragonCloak.ID, CalamityUtils.SecondsToFrames(30));
|
||||
Player.AddCooldown(Cooldowns.TarragonCloak.ID, TarragonHeadMelee.CloakCooldown);
|
||||
}
|
||||
if (!tarraThrowing && tarragonImmunity)
|
||||
{
|
||||
tarragonImmunity = false;
|
||||
Player.ClearBuff(ModContent.BuffType<Buffs.StatBuffs.TarragonImmunity>());
|
||||
Player.AddCooldown(Cooldowns.TarragonImmunity.ID, CalamityUtils.SecondsToFrames(25));
|
||||
Player.AddCooldown(Cooldowns.TarragonImmunity.ID, TarragonHeadRogue.ImmunityCooldown);
|
||||
}
|
||||
|
||||
bool hasOmegaBlueCooldown = cooldowns.TryGetValue(OmegaBlue.ID, out CooldownInstance omegaBlueCD);
|
||||
if (!omegaBlueSet && hasOmegaBlueCooldown && omegaBlueCD.timeLeft > 1500)
|
||||
if (!omegaBlueSet && hasOmegaBlueCooldown && omegaBlueCD.timeLeft > OmegaBlueHelmet.MadnessCooldown)
|
||||
{
|
||||
Player.ClearBuff(ModContent.BuffType<AbyssalMadness>());
|
||||
omegaBlueCD.timeLeft = 1500;
|
||||
omegaBlueCD.timeLeft = OmegaBlueHelmet.MadnessCooldown;
|
||||
}
|
||||
|
||||
bool hasKillMode = cooldowns.TryGetValue(KillMode.ID, out CooldownInstance killModeCD);
|
||||
@@ -2911,13 +2910,13 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
bool hasPlagueBlackoutCD = cooldowns.TryGetValue(PlagueBlackout.ID, out CooldownInstance plagueBlackoutCD);
|
||||
if (!plagueReaper && hasPlagueBlackoutCD && plagueBlackoutCD.timeLeft > 1500)
|
||||
plagueBlackoutCD.timeLeft = 1500;
|
||||
if (!plagueReaper && hasPlagueBlackoutCD && plagueBlackoutCD.timeLeft > PlagueReaperMask.BlackoutCooldown)
|
||||
plagueBlackoutCD.timeLeft = PlagueReaperMask.BlackoutCooldown;
|
||||
|
||||
if (!prismaticSet && prismaticLasers > 1800)
|
||||
if (!prismaticSet && prismaticLasers > PrismaticHelmet.LaserCooldown)
|
||||
{
|
||||
prismaticLasers = 1800;
|
||||
Player.AddCooldown(PrismaticLaser.ID, 1800);
|
||||
prismaticLasers = PrismaticHelmet.LaserCooldown;
|
||||
Player.AddCooldown(PrismaticLaser.ID, PrismaticHelmet.LaserCooldown);
|
||||
}
|
||||
if (!angelicAlliance && divineBless)
|
||||
{
|
||||
@@ -3143,7 +3142,7 @@ namespace CalamityMod.CalPlayer
|
||||
abyssDeath = false;
|
||||
|
||||
// Signus headcrab darkness
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
if (CalamityGlobalNPC.signus != -1)
|
||||
{
|
||||
@@ -3389,21 +3388,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (AdamantiteSet)
|
||||
Player.statDefense += AdamantiteSetDefenseBoost;
|
||||
|
||||
// Warmth makes Chilled and Frozen tick down 3x as fast
|
||||
if (Player.HasBuff(BuffID.Warmth))
|
||||
{
|
||||
for (int b = 0; b < Player.MaxBuffs; b++)
|
||||
{
|
||||
if (Player.buffType[b] == BuffID.Chilled || Player.buffType[b] == BuffID.Frozen)
|
||||
{
|
||||
if (Player.buffTime[b] > 3)
|
||||
{
|
||||
Player.buffTime[b] -= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (astralInjection)
|
||||
{
|
||||
if (Player.statMana < Player.statManaMax2)
|
||||
@@ -3423,8 +3407,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (xWrath)
|
||||
{
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
Player.GetCritChance<RogueDamageClass>() += 5;
|
||||
Player.GetDamage<ThrowingDamageClass>() += EmpyreanMask.WrathRogueDamageBoost;
|
||||
Player.GetCritChance<RogueDamageClass>() += EmpyreanMask.WrathRogueCritBoost;
|
||||
}
|
||||
|
||||
if (graxDefense)
|
||||
@@ -3676,12 +3660,12 @@ namespace CalamityMod.CalPlayer
|
||||
// Flight time boosts
|
||||
double flightTimeMult = 1D +
|
||||
(harpyRing ? 0.2 : 0D) +
|
||||
(reaverSpeed ? 0.1 : 0D) +
|
||||
(angelTreads ? 0.1 : 0D) +
|
||||
(reaverSpeed ? ReaverHeadMobility.SetBonusFlightBoost : 0D) +
|
||||
(angelTreads ? AngelTreads.FlightTimeBoost : 0D) +
|
||||
(blueCandle ? WeightlessCandle.WingTimeBoost : 0D) +
|
||||
(soaring ? SoaringPotion.FlightBoost : 0D) +
|
||||
(prismaticGreaves ? 0.1 : 0D) +
|
||||
(plagueReaper ? 0.05 : 0D) +
|
||||
(prismaticGreaves ? PrismaticGreaves.FlightTimeBoost : 0D) +
|
||||
(plagueReaper ? PlagueReaperMask.SetBonusFlightTimeBoost : 0D) +
|
||||
(ascendantInsignia ? 0.17 : 0D) + // Added to soaring insignia's flight to get 50%
|
||||
(Player.empressBrooch ? 0.33 : 0D) +
|
||||
externalFlightTimeMultBoost;
|
||||
@@ -3702,7 +3686,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Reaver Tank set nuke flight time
|
||||
if (reaverDefense)
|
||||
flightTimeMult -= 0.3f;
|
||||
flightTimeMult -= ReaverHeadTank.SetBonusMobilityReduction;
|
||||
|
||||
// Increase wing time
|
||||
if (Player.wingTimeMax > 0)
|
||||
@@ -3873,41 +3857,34 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (bloodflareThrowing)
|
||||
{
|
||||
if (Player.statLife > (int)(Player.statLifeMax2 * 0.8))
|
||||
{
|
||||
Player.GetCritChance<RogueDamageClass>() += 5;
|
||||
Player.statDefense += 30;
|
||||
}
|
||||
else
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
if (Player.statLife > (int)(Player.statLifeMax2 * BloodflareHeadRogue.DefenseBoostHealthThreshold))
|
||||
Player.statDefense += BloodflareHeadRogue.DefenseBoostAboveHealthThreshold;
|
||||
}
|
||||
|
||||
if (bloodflareSummon)
|
||||
{
|
||||
if (Player.statLife >= (int)(Player.statLifeMax2 * 0.9))
|
||||
Player.GetDamage<SummonDamageClass>() += 0.1f;
|
||||
else if (Player.statLife <= (int)(Player.statLifeMax2 * 0.5))
|
||||
Player.statDefense += 20;
|
||||
if (Player.statLife <= (int)(Player.statLifeMax2 * BloodflareHeadSummon.DefenseBoostHealthThreshold))
|
||||
Player.statDefense += BloodflareHeadSummon.DefenseBoostBelowHealthThreshold;
|
||||
|
||||
if (bloodflareSummonTimer > 0)
|
||||
bloodflareSummonTimer--;
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer && bloodflareSummonTimer <= 0)
|
||||
{
|
||||
bloodflareSummonTimer = 900;
|
||||
bloodflareSummonTimer = BloodflareHeadSummon.MineCooldown;
|
||||
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
|
||||
var source = Player.GetSource_FromThis(BloodflareHeadSummon.GhostMineEntitySourceContext);
|
||||
for (int I = 0; I < 3; I++)
|
||||
{
|
||||
float ai1 = I * 120;
|
||||
|
||||
int damage = (int)Player.CalcIntDamage<SummonDamageClass>(3750);
|
||||
int damage = (int)Player.CalcIntDamage<SummonDamageClass>(BloodflareHeadSummon.MineDamage);
|
||||
|
||||
int projectile = Projectile.NewProjectile(source, Player.Center.X + (float)(Math.Sin(I * 120) * 550), Player.Center.Y + (float)(Math.Cos(I * 120) * 550), 0f, 0f,
|
||||
ModContent.ProjectileType<GhostlyMine>(), damage, 1f, Player.whoAmI, ai1, 0f);
|
||||
if (projectile.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[projectile].originalDamage = 3750;
|
||||
Main.projectile[projectile].originalDamage = BloodflareHeadSummon.MineDamage;
|
||||
Main.projectile[projectile].DamageType = DamageClass.Generic;
|
||||
}
|
||||
}
|
||||
@@ -3923,7 +3900,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<SilvaCrystal>()] < 1)
|
||||
{
|
||||
int baseDmg = auricSet ? 500 : 380;
|
||||
int baseDmg = auricSet ? AuricTeslaHeadSummon.CrystalDamage : SilvaHeadSummon.CrystalDamage;
|
||||
int damage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDmg);
|
||||
|
||||
var p = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -1f, ModContent.ProjectileType<SilvaCrystal>(), damage, 0f, Main.myPlayer, -20f, 0f);
|
||||
@@ -3951,9 +3928,9 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Player.statLife >= Player.statLifeMax2)
|
||||
{
|
||||
Player.GetCritChance<RogueDamageClass>() += 10;
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
rogueVelocity += 0.1f;
|
||||
Player.GetDamage<ThrowingDamageClass>() += GodSlayerHeadRogue.RogueDamageBoostAtFullHealth;
|
||||
Player.GetCritChance<RogueDamageClass>() += GodSlayerHeadRogue.RogueCritBoostAtFullHealth;
|
||||
rogueVelocity += GodSlayerHeadRogue.RogueVelocityBoostAtFullHealth;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3969,7 +3946,7 @@ namespace CalamityMod.CalPlayer
|
||||
// If the timer rolls over, it's time to deal damage. Only run this code for the client which is wearing the armor.
|
||||
if (tarraLifeAuraTimer == 0 && Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
int damage = (int)Player.CalcDamage<SummonDamageClass>(120);
|
||||
int damage = (int)Player.CalcDamage<SummonDamageClass>(TarragonHeadSummon.AuraDamage);
|
||||
|
||||
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
|
||||
var source = Player.GetSource_FromThis(TarragonHeadSummon.LifeAuraEntitySourceContext);
|
||||
@@ -4288,66 +4265,27 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (prismaticLasers > 1800 && Player.whoAmI == Main.myPlayer)
|
||||
if (prismaticLasers > PrismaticHelmet.LaserCooldown && Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
float shootSpeed = 18f;
|
||||
int dmg = (int)Player.GetTotalDamage<MagicDamageClass>().ApplyTo(30);
|
||||
|
||||
Vector2 startPos = Player.RotatedRelativePoint(Player.MountedCenter, true);
|
||||
|
||||
// 14NOV2024: Ozzatron: clamped mouse position is inappropriate to apply here due to excessive use of decompiled vanilla shitcode
|
||||
Vector2 velocity = Main.MouseWorld - startPos;
|
||||
if (Player.gravDir == -1f)
|
||||
{
|
||||
velocity.Y = Main.screenPosition.Y + Main.screenHeight - Main.mouseY - startPos.Y;
|
||||
}
|
||||
float travelDist = velocity.Length();
|
||||
if ((float.IsNaN(velocity.X) && float.IsNaN(velocity.Y)) || (velocity.X == 0f && velocity.Y == 0f))
|
||||
{
|
||||
velocity.X = Player.direction;
|
||||
velocity.Y = 0f;
|
||||
travelDist = shootSpeed;
|
||||
}
|
||||
else
|
||||
{
|
||||
travelDist = shootSpeed / travelDist;
|
||||
}
|
||||
int dmg = (int)Player.GetTotalDamage<MagicDamageClass>().ApplyTo(PrismaticHelmet.LaserDamage);
|
||||
|
||||
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
|
||||
var source = Player.GetSource_FromThis(PrismaticHelmet.LaserEntitySourceContext);
|
||||
int laserAmt = Main.rand.Next(2);
|
||||
for (int index = 0; index < laserAmt; index++)
|
||||
{
|
||||
startPos = new Vector2(Player.Center.X + (Main.rand.Next(201) * -(float)Player.direction) + (Main.mouseX + Main.screenPosition.X - Player.position.X), Player.MountedCenter.Y - 600f);
|
||||
startPos.X = (startPos.X + Player.Center.X) / 2f + Main.rand.Next(-200, 201);
|
||||
startPos.Y -= 100 * index;
|
||||
velocity.X = Main.mouseX + Main.screenPosition.X - startPos.X;
|
||||
velocity.Y = Main.mouseY + Main.screenPosition.Y - startPos.Y;
|
||||
if (velocity.Y < 0f)
|
||||
{
|
||||
velocity.Y *= -1f;
|
||||
}
|
||||
if (velocity.Y < 20f)
|
||||
{
|
||||
velocity.Y = 20f;
|
||||
}
|
||||
travelDist = velocity.Length();
|
||||
travelDist = shootSpeed / travelDist;
|
||||
velocity.X *= travelDist;
|
||||
velocity.Y *= travelDist;
|
||||
velocity.X += Main.rand.Next(-50, 51) * 0.02f;
|
||||
velocity.Y += Main.rand.Next(-50, 51) * 0.02f;
|
||||
int laser = Projectile.NewProjectile(source, startPos, velocity, ModContent.ProjectileType<DeathhailBeam>(), dmg, 4f, Player.whoAmI, 0f, 0f);
|
||||
Main.projectile[laser].localNPCHitCooldown = 5;
|
||||
if (laser.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[laser].DamageType = DamageClass.Generic;
|
||||
Vector2 newPos = new Vector2(Player.ClampedMouseWorld().X + Main.rand.NextFloat(-240f, 240f), Player.MountedCenter.Y - 960f);
|
||||
Vector2 newVel = (Player.ClampedMouseWorld() + Main.rand.NextVector2CircularEdge(24f, 24f) - newPos).SafeNormalize(Vector2.Zero) * 18f;
|
||||
Projectile laser = Projectile.NewProjectileDirect(source, newPos, newVel, ModContent.ProjectileType<DeathhailBeam>(), dmg, 4f, Player.whoAmI);
|
||||
laser.localNPCHitCooldown = 5;
|
||||
laser.DamageType = DamageClass.Generic;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item12, Player.Center);
|
||||
}
|
||||
if (prismaticLasers == 1800)
|
||||
if (prismaticLasers == PrismaticHelmet.LaserCooldown)
|
||||
{
|
||||
// At the exact moment the lasers stop, set the cooldown to appear
|
||||
Player.AddCooldown(PrismaticLaser.ID, 1800);
|
||||
Player.AddCooldown(PrismaticLaser.ID, PrismaticHelmet.LaserCooldown);
|
||||
}
|
||||
if (prismaticLasers == 1)
|
||||
{
|
||||
@@ -4789,7 +4727,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (cooldowns.TryGetValue(WulfrumRoverDriveDurability.ID, out var cdDurability))
|
||||
cdDurability.timeLeft = 0;
|
||||
// if (cooldowns.TryGetValue(WulfrumRoverDriveRecharge.ID, out var cdRecharge)) cdRecharge.timeLeft = 0;
|
||||
|
||||
// As Rover Drive's shield can be left in a partially recharged state, this is for safety.
|
||||
// If the player does not have the accessory equipped for even one frame, discharge all shields.
|
||||
RoverDriveShieldDurability = 0;
|
||||
}
|
||||
|
||||
// Stuff to do if the Rover Drive is equipped
|
||||
@@ -4797,16 +4738,38 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
// If the Rover Drive shield is discharged and hasn't started its recharge delay, start that.
|
||||
if (RoverDriveShieldDurability == 0 && !cooldowns.ContainsKey(WulfrumRoverDriveRecharge.ID))
|
||||
Player.AddCooldown(WulfrumRoverDriveRecharge.ID, RoverDrive.ShieldRechargeTime);
|
||||
Player.AddCooldown(WulfrumRoverDriveRecharge.ID, RoverDrive.ShieldRechargeDelay);
|
||||
|
||||
// If the shield has greater than zero durability but that durability is not on the cooldown rack,
|
||||
// add it to the cooldown rack and play a sound of the shield turning on.
|
||||
// If the shield has greater than zero durability but that durability is not on the cooldown rack, add it to the cooldown rack.
|
||||
if (RoverDriveShieldDurability > 0 && !cooldowns.ContainsKey(WulfrumRoverDriveDurability.ID))
|
||||
{
|
||||
CooldownInstance durabilityCooldown = Player.AddCooldown(WulfrumRoverDriveDurability.ID, RoverDrive.ShieldDurabilityMax);
|
||||
durabilityCooldown.timeLeft = RoverDriveShieldDurability;
|
||||
}
|
||||
|
||||
// If the shield has greater than zero durability and isn't in its recharge delay, actively replenish shield points.
|
||||
// Play a sound on the first frame this occurs.
|
||||
if (RoverDriveShieldDurability > 0 && !cooldowns.ContainsKey(WulfrumRoverDriveRecharge.ID))
|
||||
{
|
||||
if (!playedRoverDriveShieldSound)
|
||||
SoundEngine.PlaySound(RoverDrive.ActivationSound, Player.Center);
|
||||
playedRoverDriveShieldSound = true;
|
||||
|
||||
// This number is not an integer, and stores exact per-frame recharge progress.
|
||||
roverDriveShieldPartialRechargeProgress += RoverDrive.ShieldDurabilityMax / (float)RoverDrive.TotalShieldRechargeTime;
|
||||
|
||||
// Floor the value to get whole number of shield points recharged this frame.
|
||||
int pointsActuallyRecharged = (int)MathF.Floor(roverDriveShieldPartialRechargeProgress);
|
||||
|
||||
// Give those points to the real shield durability, capping the result. Then remove them from recharge progress.
|
||||
RoverDriveShieldDurability = Math.Min(RoverDriveShieldDurability + pointsActuallyRecharged, RoverDrive.ShieldDurabilityMax);
|
||||
roverDriveShieldPartialRechargeProgress -= pointsActuallyRecharged;
|
||||
|
||||
// Update the cooldown rack's durability indicator.
|
||||
if (cooldowns.TryGetValue(WulfrumRoverDriveDurability.ID, out var cdDurability))
|
||||
cdDurability.timeLeft = RoverDriveShieldDurability;
|
||||
}
|
||||
|
||||
// Add light if this shield is currently active
|
||||
if (RoverDriveShieldDurability > 0 && !shieldAddedLight)
|
||||
{
|
||||
|
||||
@@ -11,10 +11,15 @@ using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor;
|
||||
using CalamityMod.Items.Armor.Astral;
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.Fearmonger;
|
||||
using CalamityMod.Items.Armor.Hydrothermic;
|
||||
using CalamityMod.Items.Armor.Plaguebringer;
|
||||
using CalamityMod.Items.Armor.Reaver;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
using CalamityMod.Items.Armor.SnowRuffian;
|
||||
using CalamityMod.Items.Armor.Sulphurous;
|
||||
using CalamityMod.Items.Armor.Tarragon;
|
||||
using CalamityMod.Items.Armor.TitanHeart;
|
||||
using CalamityMod.Items.Armor.Umbraphile;
|
||||
using CalamityMod.Items.Fishing.AstralCatches;
|
||||
@@ -415,8 +420,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (!proj.npcProj && !proj.trap && proj.friendly)
|
||||
{
|
||||
if (plaguebringerCarapace && CalamityProjectileSets.IsFriendlyBeeProjectile[proj.type])
|
||||
target.AddBuff(BuffType<Plague>(), 300);
|
||||
if (plaguebringerPatronSet && CalamityProjectileSets.IsFriendlyBeeProjectile[proj.type])
|
||||
target.AddBuff(BuffType<Plague>(), PlaguebringerVisor.BeePlagueDuration);
|
||||
|
||||
// All projectiles fired from Soma Prime are marked using CalamityGlobalProjectile
|
||||
CalamityGlobalProjectile cgp = proj.Calamity();
|
||||
@@ -623,7 +628,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (item.CountsAsClass<MeleeDamageClass>() && hideOfDeus && hideOfDeusTimer == 0)
|
||||
{
|
||||
hideOfDeusTimer = 10;
|
||||
int bulwarkStarDamage = (int)Player.GetTotalDamage<MeleeDamageClass>().ApplyTo(320);
|
||||
int bulwarkStarDamage = (int)Player.GetTotalDamage<MeleeDamageClass>().ApplyTo(HideofAstrumDeus.StarDamage);
|
||||
|
||||
for (int n = 0; n < 3; n++)
|
||||
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileType<AstralStar>(), bulwarkStarDamage, 5f, Player.whoAmI);
|
||||
@@ -660,7 +665,7 @@ namespace CalamityMod.CalPlayer
|
||||
Projectile.NewProjectile(source, position, Vector2.Zero, ProjectileType<ChaoticGeyser>(), geyserDamage, 2f, Player.whoAmI);
|
||||
}
|
||||
|
||||
if (bloodflareMelee && item.CountsAsClass<MeleeDamageClass>() && bloodflareMeleeHits < 15 && !bloodflareFrenzy && !Player.HasCooldown(BloodflareFrenzy.ID))
|
||||
if (bloodflareMelee && item.CountsAsClass<MeleeDamageClass>() && bloodflareMeleeHits < BloodflareHeadMelee.HitsToActivateFrenzy && !bloodflareFrenzy && !Player.HasCooldown(BloodflareFrenzy.ID))
|
||||
bloodflareMeleeHits++;
|
||||
}
|
||||
}
|
||||
@@ -780,7 +785,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType<ChaoticGeyser>(), geyserDamage, 0f, Player.whoAmI, 0f, 0f);
|
||||
}
|
||||
if (bloodflareMelee && proj.IsTrueMelee() && bloodflareMeleeHits < 15 && !bloodflareFrenzy && !Player.HasCooldown(BloodflareFrenzy.ID))
|
||||
if (bloodflareMelee && proj.IsTrueMelee() && bloodflareMeleeHits < BloodflareHeadMelee.HitsToActivateFrenzy && !bloodflareFrenzy && !Player.HasCooldown(BloodflareFrenzy.ID))
|
||||
bloodflareMeleeHits++;
|
||||
}
|
||||
}
|
||||
@@ -795,11 +800,11 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (tarraRanged && proj.CountsAsClass<RangedDamageClass>() && tarraRangedCooldown <= 0)
|
||||
{
|
||||
tarraRangedCooldown = 60;
|
||||
tarraRangedCooldown = TarragonHeadRanged.OnHitEffectCooldown;
|
||||
for (int l = 0; l < 2; l++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
int leafDamage = CalamityUtils.DamageSoftCap((int)(0.25f * proj.damage), 150);
|
||||
int leafDamage = CalamityUtils.DamageSoftCap((int)(proj.damage * TarragonHeadRanged.LeafDamageRatio), TarragonHeadRanged.LeafDamageSoftcap);
|
||||
int leaf = Projectile.NewProjectile(source, position, velocity, ProjectileID.Leaf, leafDamage, 0f, Player.whoAmI);
|
||||
if (leaf.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
@@ -812,7 +817,7 @@ namespace CalamityMod.CalPlayer
|
||||
for (int projCount = 0; projCount < 2; projCount++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
int energyDamage = CalamityUtils.DamageSoftCap((int)(0.33f * proj.damage), 200);
|
||||
int energyDamage = CalamityUtils.DamageSoftCap((int)(proj.damage * TarragonHeadRanged.EnergyDamageRatio), TarragonHeadRanged.EnergyDamageSoftcap);
|
||||
Projectile.NewProjectile(source, proj.Center, velocity, ProjectileType<TarraEnergy>(), energyDamage, 0f, proj.owner);
|
||||
}
|
||||
}
|
||||
@@ -850,9 +855,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (bloodflareMage && bloodflareMageCooldown <= 0 && crit)
|
||||
{
|
||||
bloodflareMageCooldown = 120;
|
||||
// Bloodflare Mage Explosion: 50%, softcap starts at 500 base damage to not overly punish slow weapons
|
||||
int bloodflareFireballDamage = CalamityUtils.DamageSoftCap(proj.damage * 0.5, 250);
|
||||
bloodflareMageCooldown = BloodflareHeadMagic.BloodsplosionCooldown;
|
||||
int bloodflareFireballDamage = CalamityUtils.DamageSoftCap(proj.damage * BloodflareHeadMagic.BloodsplosionDamageRatio, BloodflareHeadMagic.BloodsplosionDamageSoftcap);
|
||||
|
||||
int fire = Projectile.NewProjectile(source, position, Vector2.Zero, ProjectileType<BloodBombExplosion>(), bloodflareFireballDamage, 0f, Player.whoAmI, 0f, 0f, 1f);
|
||||
if (fire.WithinBounds(Main.maxProjectiles))
|
||||
@@ -864,10 +868,9 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (silvaMage && silvaMageCooldown <= 0 && (proj.penetrate == 1 || proj.timeLeft <= 5))
|
||||
{
|
||||
silvaMageCooldown = 300;
|
||||
silvaMageCooldown = SilvaHeadMagic.BurstCooldown;
|
||||
SoundEngine.PlaySound(SoundID.Zombie103, proj.Center); //So scuffed, just because zombie sounds werent ported normally
|
||||
// Silva Mage Blasts: 800 + 60%, softcap on the whole combined thing starts at 1400
|
||||
int silvaBurstDamage = CalamityUtils.DamageSoftCap(800.0 + 0.6 * proj.damage, 1400);
|
||||
int silvaBurstDamage = CalamityUtils.DamageSoftCap(SilvaHeadMagic.BurstDamage + proj.damage * SilvaHeadMagic.BurstDamageRatio, SilvaHeadMagic.BurstDamageSoftcap);
|
||||
Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType<SilvaBurst>(), silvaBurstDamage, 8f, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
@@ -938,12 +941,12 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
// Fearmonger set gains +10 frames (max 90) of regen when any minion lands any hit
|
||||
// Fearmonger set gains regen duration when any minion lands any hit
|
||||
if (fearmongerSet)
|
||||
{
|
||||
fearmongerRegenFrames += 10;
|
||||
if (fearmongerRegenFrames > 90)
|
||||
fearmongerRegenFrames = 90;
|
||||
fearmongerRegenFrames += FearmongerGreathelm.RegenBoostDurationPerHit;
|
||||
if (fearmongerRegenFrames > FearmongerGreathelm.RegenBoostDurationLimit)
|
||||
fearmongerRegenFrames = FearmongerGreathelm.RegenBoostDurationLimit;
|
||||
}
|
||||
|
||||
//Priorities: Nucleogenesis => Starbuster Core => Nuclear Rod => Jelly-Charged Battery
|
||||
|
||||
@@ -18,8 +18,6 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
{
|
||||
public static new string ID => "Godslayer Armor";
|
||||
|
||||
public static int GodslayerCooldown = 45;
|
||||
|
||||
public SlotId GSDashSlot;
|
||||
|
||||
public static readonly SoundStyle Impact = new("CalamityMod/Sounds/NPCKilled/DevourerDeathImpact") { Volume = 0.5f };
|
||||
@@ -113,7 +111,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
runSpeedDecelerationFactor = 0.8f;
|
||||
|
||||
// Cooldown for God Slayer Armor dash.
|
||||
player.AddCooldown(Cooldowns.GodSlayerDash.ID, CalamityUtils.SecondsToFrames(GodslayerCooldown));
|
||||
player.AddCooldown(Cooldowns.GodSlayerDash.ID, GodSlayerChestplate.DashCooldown);
|
||||
player.Calamity().godSlayerDashHotKeyPressed = false;
|
||||
}
|
||||
|
||||
@@ -140,14 +138,14 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
|
||||
// Define damage parameters.
|
||||
hitContext.damageClass = player.GetBestClass();
|
||||
hitContext.BaseDamage = 3000;
|
||||
hitContext.BaseKnockback = 15f;
|
||||
hitContext.BaseDamage = GodSlayerChestplate.DashDamage;
|
||||
hitContext.BaseKnockback = GodSlayerChestplate.DashKnockback;
|
||||
|
||||
// God Slayer Dash intentionally does not use the vanilla function for collision attack iframes.
|
||||
// This is because its immunity is meant to be completely consistent and not subject to vanilla anticheese.
|
||||
hitContext.PlayerImmunityFrames = GodSlayerChestplate.DashIFrames;
|
||||
|
||||
npc.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
|
||||
npc.AddBuff(ModContent.BuffType<GodSlayerInferno>(), GodSlayerChestplate.DashGodSlayerInfernoDuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor.Plaguebringer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -61,12 +61,12 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
if (player.velocity.X != 0f)
|
||||
hitDirection = Math.Sign(player.velocity.X);
|
||||
hitContext.HitDirection = hitDirection;
|
||||
hitContext.PlayerImmunityFrames = AsgardsValor.ShieldSlamIFrames;
|
||||
hitContext.PlayerImmunityFrames = PlaguebringerVisor.PlagueDashIFrames;
|
||||
|
||||
// Define damage parameters.
|
||||
hitContext.damageClass = DamageClass.Summon;
|
||||
hitContext.BaseDamage = 50;
|
||||
hitContext.BaseKnockback = 3f;
|
||||
hitContext.BaseDamage = PlaguebringerVisor.PlagueDashDamage;
|
||||
hitContext.BaseKnockback = PlaguebringerVisor.PlagueDashKnockback;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Localization;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class M1GarandShots : CooldownHandler
|
||||
{
|
||||
public float CompletionPercentage => MathF.Round(instance.Completion * 100);
|
||||
private bool IsEmpty => CompletionPercentage == 100;
|
||||
private float TextXOffset => -5.4f;
|
||||
private Vector2 TextPosition => new(TextXOffset, 15);
|
||||
private Color TextColor => Color.Silver;
|
||||
private Color TextBorderColor = Color.DarkGoldenrod;
|
||||
|
||||
public static new string ID => "M1GarandShots";
|
||||
public override bool CanTickDown => false;
|
||||
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
|
||||
public override bool ShouldDisplay => instance.player.HeldItem.type == ItemType<M1Garand>();
|
||||
public override string Texture => "CalamityMod/Cooldowns/" + ID;
|
||||
|
||||
public override Color CooldownStartColor => IsEmpty ? Color.DimGray : Color.Lerp(Color.DarkGoldenrod, Color.SlateGray, instance.Completion);
|
||||
public override Color CooldownEndColor => IsEmpty ? Color.DimGray : Color.Lerp(Color.LightGoldenrodYellow, Color.SlateGray, instance.Completion);
|
||||
|
||||
public override void DrawExpanded(SpriteBatch spriteBatch, Vector2 position, float opacity, float scale)
|
||||
{
|
||||
base.DrawExpanded(spriteBatch, position, opacity, scale);
|
||||
|
||||
CalamityUtils.DrawBorderStringEightWay(spriteBatch, FontAssets.MouseText.Value, instance.player.Calamity().garandShots.ToString(), position + TextPosition, TextColor, TextBorderColor);
|
||||
}
|
||||
|
||||
public override void DrawCompact(SpriteBatch spriteBatch, Vector2 position, float opacity, float scale)
|
||||
{
|
||||
base.DrawCompact(spriteBatch, position, opacity, scale);
|
||||
|
||||
CalamityUtils.DrawBorderStringEightWay(spriteBatch, FontAssets.MouseText.Value, instance.player.Calamity().garandShots.ToString(), position + TextPosition, TextColor, TextBorderColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 273 B |
|
After Width: | Height: | Size: 144 B |
|
After Width: | Height: | Size: 115 B |
@@ -91,12 +91,14 @@ namespace CalamityMod.Cooldowns
|
||||
public override Color CooldownStartColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
|
||||
public override void Tick() => instance.player.Calamity().playedRoverDriveShieldSound = false;
|
||||
|
||||
// Rover Drive shields are recharged as a side effect of the cooldown completing client side
|
||||
public override void OnCompleted()
|
||||
{
|
||||
CalamityPlayer modPlayer = instance.player.Calamity();
|
||||
if (modPlayer.roverDrive)
|
||||
modPlayer.RoverDriveShieldDurability = RoverDrive.ShieldDurabilityMax;
|
||||
if (modPlayer.RoverDriveShieldDurability <= 0)
|
||||
modPlayer.RoverDriveShieldDurability = 1;
|
||||
}
|
||||
public override SoundStyle? EndSound => RoverDrive.ActivationSound;
|
||||
public override bool ShouldPlayEndSound => instance.player.Calamity().roverDrive;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Diagnostics;
|
||||
using System.Security.Cryptography;
|
||||
using CalamityMod.NPCs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
@@ -184,6 +185,21 @@ namespace CalamityMod.DataStructures
|
||||
output.Flat = Modifer.Flat * scaling;
|
||||
return output;
|
||||
}
|
||||
/// <summary>
|
||||
/// Applies a scaling amount to a StatModifier but ensures all changes end up positive
|
||||
/// </summary>
|
||||
/// <param name="Modifer"></param>
|
||||
/// <param name="scaling"></param>
|
||||
/// <returns></returns>
|
||||
public static StatModifier ForceModifierPositiveWithScaling(StatModifier Modifer, float scaling)
|
||||
{
|
||||
StatModifier output = new();
|
||||
output += MathHelper.Max((Modifer.Additive - 1) * scaling,0);
|
||||
output *= MathHelper.Max(1 + (Modifer.Multiplicative - 1) * scaling,1);
|
||||
output.Base = MathHelper.Max(Modifer.Base * scaling,0);
|
||||
output.Flat = MathHelper.Max(Modifer.Flat * scaling, 0);
|
||||
return output;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UNIMPLEMENTED. WILL BE IN A FUTURE PR
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Effects
|
||||
|
||||
// Plasma
|
||||
public static int ArsenalPlasmaDust = ModContent.DustType<SquashDustTileTouch>();
|
||||
public static Color ArsenalPlasmaColor = Color.Lerp(Color.Green, Color.Chartreuse, 0.45f);
|
||||
public static Color ArsenalPlasmaColor = new Color(154, 255, 0);
|
||||
// Laser
|
||||
public static int ArsenalLaserDust = ModContent.DustType<DiamondDust>();
|
||||
public static Color ArsenalLaserColor = Color.Lerp(Color.Crimson, Color.Red, 0.45f);
|
||||
|
||||
@@ -7,6 +7,7 @@ using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.UI.DraedonSummoning;
|
||||
using ReLogic.Content;
|
||||
using ReLogic.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -24,6 +25,9 @@ namespace CalamityMod.Fonts
|
||||
|
||||
public override void OnModLoad()
|
||||
{
|
||||
if (Main.dedServ)
|
||||
return;
|
||||
|
||||
AddFont("Wingdings", CalamityMod.Instance.Assets.Request<DynamicSpriteFont>("Fonts/Wingdings", AssetRequestMode.ImmediateLoad).Value); //Intentionally does not have a fallback due to it already having null checks where it is utilized to prevent them from appearing
|
||||
AddFont("CodebreakerDialog", CalamityMod.Instance.Assets.Request<DynamicSpriteFont>("Fonts/CodebreakerDialog", AssetRequestMode.ImmediateLoad).Value, FontAssets.MouseText.Value);
|
||||
AddFont("Impact", CalamityMod.Instance.Assets.Request<DynamicSpriteFont>("Fonts/Impact", AssetRequestMode.ImmediateLoad).Value, FontAssets.CombatText[1].Value);
|
||||
|
||||
@@ -66,6 +66,7 @@ namespace CalamityMod.ILEditing
|
||||
IL_Main.UpdateTime += PermitNighttimeTownNPCSpawning;
|
||||
On_Main.UpdateTime_SpawnTownNPCs += AlterTownNPCSpawnRate;
|
||||
IL_NPC.DoDeathEvents += PreventVanillaBossDeathsInBossRush;
|
||||
On_NPC.NPCLoot += PreventDiabolistLootLogic;
|
||||
IL_Player.CollectTaxes += MakeTaxCollectorUseful;
|
||||
|
||||
// Mechanics / features
|
||||
@@ -201,7 +202,6 @@ namespace CalamityMod.ILEditing
|
||||
On_Player.ItemCheck_CheckFishingBobbers += PreventVictideBobberFromJamming;
|
||||
|
||||
IL_Projectile.CanExplodeTile += MakeMeteoriteExplodable;
|
||||
IL_Main.UpdateWindyDayState += MakeWindyDayMusicPlayLessOften;
|
||||
IL_Main.UpdateTime_StartNight += BloodMoonsRequire200MaxLife;
|
||||
IL_WorldGen.AttemptFossilShattering += PreventFossilShattering;
|
||||
On_Player.GetPickaxeDamage += RemoveHellforgePickaxeRequirement;
|
||||
|
||||
@@ -379,6 +379,15 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Prevent Diabolists from Dropping Stuff in GFB Before Plantera
|
||||
private static void PreventDiabolistLootLogic(On_NPC.orig_NPCLoot orig, NPC self)
|
||||
{
|
||||
if (self.type == NPCID.DiabolistWhite && Main.getGoodWorld && !NPC.downedPlantBoss)
|
||||
return;
|
||||
orig(self);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Town NPC Spawning Improvements
|
||||
private static void PermitNighttimeTownNPCSpawning(ILContext il)
|
||||
{
|
||||
|
||||
@@ -241,34 +241,6 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Make Windy Day Music Play Less Often
|
||||
private static void MakeWindyDayMusicPlayLessOften(ILContext il)
|
||||
{
|
||||
// Make windy day theme only play when the wind speed is over 0.5f instead of 0.4f and make it stop when the wind dies down to below 0.44f instead of 0.34f.
|
||||
var cursor = new ILCursor(il);
|
||||
|
||||
FieldInfo _minWindField = typeof(Main).GetField("_minWind", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdsfld(_minWindField))) // The min wind speed check that stops the windy day theme when the wind dies down enough.
|
||||
{
|
||||
LogFailure("Make Windy Day Music Play Less Often", "Could not locate the _minWind variable.");
|
||||
return;
|
||||
}
|
||||
cursor.Remove();
|
||||
cursor.Emit(OpCodes.Ldc_R4, 0.44f); // Change to 0.44f.
|
||||
|
||||
FieldInfo _maxWindField = typeof(Main).GetField("_maxWind", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdsfld(_maxWindField))) // The max wind speed check that causes the windy day theme to play.
|
||||
{
|
||||
LogFailure("Make Windy Day Music Play Less Often", "Could not locate the _maxWind variable.");
|
||||
return;
|
||||
}
|
||||
cursor.Remove();
|
||||
cursor.Emit(OpCodes.Ldc_R4, 0.5f); // Change to 0.5f.
|
||||
}
|
||||
#endregion Make Windy Day Music Play Less Often
|
||||
|
||||
#region Change Blood Moon Max HP Requirements
|
||||
private static void BloodMoonsRequire200MaxLife(ILContext il)
|
||||
{
|
||||
|
||||
@@ -11,6 +11,9 @@ namespace CalamityMod.Items.Accessories
|
||||
public class AmalgamatedBrain : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int NimbusDamage => CalamityUtils.ScaleWithDifficulty(18);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 34;
|
||||
|
||||
@@ -24,12 +24,13 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
player.statLifeMax2 += 50;
|
||||
if (!player.HasBuff(BuffID.Honey))
|
||||
player.AddBuff(BuffID.Honey, 2);
|
||||
|
||||
// bool left in for abyss light purposes and life regen effects
|
||||
modPlayer.aAmpoule = true;
|
||||
|
||||
// Inherits all effects of Honey Dew and Living Dew (except standing regen is not honey exclusive anymore)
|
||||
modPlayer.alwaysHoneyRegen = true;
|
||||
// Inherits all effects of Honey Dew and Living Dew
|
||||
modPlayer.honeyDewHalveDebuffs = true;
|
||||
modPlayer.livingDewHalveDebuffs = true;
|
||||
|
||||
@@ -43,7 +44,7 @@ namespace CalamityMod.Items.Accessories
|
||||
var player = Main.LocalPlayer;
|
||||
if (player != null)
|
||||
{
|
||||
list.FindAndReplace("[REGEN]", (player.Calamity().ambrosialAmpouleRegen + player.Calamity().alwaysHoneyRegenAmount).ToString("0.##"));
|
||||
list.FindAndReplace("[REGEN]", player.Calamity().radiantOozeRegen.ToString("0.##"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
@@ -10,6 +11,13 @@ namespace CalamityMod.Items.Accessories
|
||||
public class AngelTreads : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static float RunningSpeed = 7.5f; // 6.75 from Lightning-Terraspark
|
||||
public static float MoveSpeedBoost = 0.12f;
|
||||
public static float FlightTimeBoost = 0.1f;
|
||||
public static int LavaImmunityTime = 420; // Identical to Terraspark Boots and upgrades prior
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent(), FlightTimeBoost.ToPercent(), LavaImmunityTime.FramesToSeconds());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 32;
|
||||
@@ -23,14 +31,14 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.angelTreads = true;
|
||||
player.accRunSpeed = 7.5f;
|
||||
player.accRunSpeed = RunningSpeed;
|
||||
player.rocketBoots = player.vanityRocketBoots = 3;
|
||||
player.moveSpeed += 0.12f;
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
player.iceSkate = true;
|
||||
player.waterWalk = true;
|
||||
player.fireWalk = true;
|
||||
player.lavaMax += 240;
|
||||
player.buffImmune[BuffID.OnFire] = true;
|
||||
player.lavaMax += LavaImmunityTime;
|
||||
player.lavaRose = true;
|
||||
}
|
||||
|
||||
public override void UpdateVanity(Player player)
|
||||
|
||||
@@ -9,6 +9,9 @@ namespace CalamityMod.Items.Accessories
|
||||
public class Baroclaw : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int ThornsDamage => CalamityUtils.ScaleWithDifficulty(150);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 40;
|
||||
@@ -22,7 +25,6 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.baroclaw = true;
|
||||
player.thorns += 2.5f;
|
||||
}
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -8,6 +8,9 @@ namespace CalamityMod.Items.Accessories
|
||||
public class CrawCarapace : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int ThornsDamage => CalamityUtils.ScaleWithDifficulty(20);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 28;
|
||||
@@ -21,7 +24,6 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.crawCarapace = true;
|
||||
player.thorns += 0.25f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static readonly int MaxBonusIFrames = 30;
|
||||
public static int StarDamage => CalamityUtils.ScaleWithDifficulty(130);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public static float MoveSpeedBoost = 0.12f;
|
||||
public static float JumpSpeedBoost = 0.6f; // Both 12% so we only need just one in the tooltip
|
||||
public static int AuraLifetime = 1800;
|
||||
public static int AuraRegenBoost = 6;
|
||||
public static int AuraRegenBoost = 4;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent(), AuraLifetime.FramesToSeconds(), AuraRegenBoost.ToRegenPerSecond());
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -9,6 +9,10 @@ namespace CalamityMod.Items.Accessories
|
||||
public class HideofAstrumDeus : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int BlazeDamage => CalamityUtils.ScaleWithDifficulty(50);
|
||||
public static int StarDamage => 75;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 26;
|
||||
@@ -24,7 +28,6 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.hideOfDeus = true;
|
||||
if (modPlayer.hideOfDeusMeleeBoostTimer > 0)
|
||||
player.GetDamage<TrueMeleeDamageClass>() += 0.3f;
|
||||
player.thorns += 0.75f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,17 +13,17 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
Item.width = 20;
|
||||
Item.height = 20;
|
||||
Item.value = CalamityGlobalItem.RarityGreenBuyPrice;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.statLifeMax2 += 10;
|
||||
if (!player.HasBuff(BuffID.Honey))
|
||||
player.AddBuff(BuffID.Honey, 2);
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.alwaysHoneyRegen = true;
|
||||
modPlayer.honeyTurboRegen = true;
|
||||
modPlayer.honeyDewHalveDebuffs = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ namespace CalamityMod.Items.Accessories
|
||||
public class InkBomb : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int InkDamage => CalamityUtils.ScaleWithDifficulty(16);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 22;
|
||||
@@ -21,9 +24,8 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.inkBomb = true;
|
||||
modPlayer.rogueStealthMax += 0.1f;
|
||||
player.Calamity().stealthGenStandstill += 0.07f;
|
||||
player.Calamity().stealthGenMoving += 0.07f;
|
||||
modPlayer.stealthGenStandstill += 0.07f;
|
||||
modPlayer.stealthGenMoving += 0.07f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,11 +21,11 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.statLifeMax2 += 25;
|
||||
if (!player.HasBuff(BuffID.Honey))
|
||||
player.AddBuff(BuffID.Honey, 2);
|
||||
|
||||
// Inherits all effects of Honey Dew
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.alwaysHoneyRegen = true;
|
||||
modPlayer.honeyTurboRegen = true;
|
||||
modPlayer.honeyDewHalveDebuffs = true;
|
||||
modPlayer.livingDewHalveDebuffs = true;
|
||||
}
|
||||
|
||||
@@ -35,12 +35,13 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
player.statLifeMax2 += 70;
|
||||
if (!player.HasBuff(BuffID.Honey))
|
||||
player.AddBuff(BuffID.Honey, 2);
|
||||
|
||||
// Abyss light, debuff near-immunity, life regen effects, and massively enhances debuff halving
|
||||
modPlayer.purity = true;
|
||||
|
||||
// Inherits effects from Honey Dew and Living Dew
|
||||
modPlayer.alwaysHoneyRegen = true;
|
||||
modPlayer.honeyDewHalveDebuffs = true;
|
||||
modPlayer.livingDewHalveDebuffs = true;
|
||||
|
||||
@@ -55,7 +56,7 @@ namespace CalamityMod.Items.Accessories
|
||||
var player = Main.LocalPlayer;
|
||||
if (player != null)
|
||||
{
|
||||
list.FindAndReplace("[REGEN]", (player.Calamity().purityRegen + player.Calamity().alwaysHoneyRegenAmount).ToString("0.##"));
|
||||
list.FindAndReplace("[REGEN]", player.Calamity().purityRegen.ToString("0.##"));
|
||||
list.FindAndReplace("[DEFENSE]", player.Calamity().jewelBonusDefense.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.Localization;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
@@ -13,6 +13,13 @@ namespace CalamityMod.Items.Accessories
|
||||
public class Regenerator : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static float HealthRatioCap = 0.5f;
|
||||
public static int FramesPerHeal = 8;
|
||||
public static int RegenTimeBoost = 4; // on top of +1/s regular increment
|
||||
public static float RegenToDamageRatio = 0.015f; // per regen point
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(HealthRatioCap.ToPercent(), (60 / (float)FramesPerHeal).Round());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 34;
|
||||
|
||||
@@ -9,6 +9,9 @@ namespace CalamityMod.Items.Accessories
|
||||
public class RottenBrain : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int NimbusDamage => CalamityUtils.ScaleWithDifficulty(8);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 34;
|
||||
|
||||
@@ -11,6 +11,7 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
@@ -25,7 +26,9 @@ namespace CalamityMod.Items.Accessories
|
||||
public static readonly SoundStyle BreakSound = new("CalamityMod/Sounds/Custom/RoverDriveBreak") { Volume = 0.75f };
|
||||
|
||||
public static int ShieldDurabilityMax = 20;
|
||||
public static int ShieldRechargeTime = CalamityUtils.SecondsToFrames(10);
|
||||
public static int ShieldRechargeDelay = CalamityUtils.SecondsToFrames(10);
|
||||
public static int TotalShieldRechargeTime = CalamityUtils.SecondsToFrames(5);
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ShieldDurabilityMax, ShieldRechargeDelay.FramesToSeconds(), TotalShieldRechargeTime.FramesToSeconds());
|
||||
|
||||
// Interface stuff.
|
||||
public int OwnerPlayer { get; set; }
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Vector2 shoveVelocity = Utils.DirectionTo(player.Center, npc.Center) * (Main.zenithWorld ? 35f : 12.5f) - Vector2.UnitY * 6f;
|
||||
npc.MoveNPC(Vector2.Normalize(shoveVelocity), shoveVelocity.Length(), true);
|
||||
|
||||
int scaledFallDamage = ShoveFallBaseDamage * (Main.masterMode ? 3 : Main.expertMode ? 2 : 1) * (Main.zenithWorld ? 10 : 1);
|
||||
int scaledFallDamage = CalamityUtils.ScaleWithDifficulty(ShoveFallBaseDamage) * (Main.zenithWorld ? 10 : 1);
|
||||
if (empowered)
|
||||
npc.FlungNPC().ApplyCollisionDamage(npc, player, scaledFallDamage, shoveVelocity * 0.5f, 5f, true);
|
||||
else
|
||||
@@ -103,7 +103,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
if (empowered)
|
||||
{
|
||||
int scaledImmuneDamage = ImmuneToShoveBaseDamage * (Main.masterMode ? 3 : Main.expertMode ? 2 : 1) * (Main.zenithWorld ? 10 : 1);
|
||||
int scaledImmuneDamage = CalamityUtils.ScaleWithDifficulty(ImmuneToShoveBaseDamage) * (Main.zenithWorld ? 10 : 1);
|
||||
Projectile.NewProjectile(player.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), scaledImmuneDamage, 0f, player.whoAmI, npc.whoAmI);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public static float MoveSpeedBoost = 0.12f;
|
||||
public static float JumpSpeedBoost = 0.6f; // Both 12% so we only need just one in the tooltip
|
||||
public static float ThornsBoost = 3.5f;
|
||||
public static int ThornsDamage => CalamityUtils.ScaleWithDifficulty(200);
|
||||
public static int AuraLifetime = 1800;
|
||||
public static int AuraRegenBoost = 6;
|
||||
public static int AuraRegenBoost = 4;
|
||||
public static float AuraDamageBoost = 0.08f;
|
||||
public static float AuraDamageReductionBoost = 0.05f;
|
||||
public static float DamageTakenHealedPercent = 0.05f;
|
||||
|
||||
@@ -16,6 +16,9 @@ namespace CalamityMod.Items.Accessories
|
||||
public class TheAmalgam : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int NimbusDamage => CalamityUtils.ScaleWithDifficulty(200);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(9, 6));
|
||||
|
||||
@@ -15,6 +15,7 @@ using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
@@ -33,11 +34,10 @@ namespace CalamityMod.Items.Accessories
|
||||
public static readonly SoundStyle BreakSound = new("CalamityMod/Sounds/Custom/RoverDriveBreak") { Volume = 0.75f };
|
||||
|
||||
public static int ShieldDurabilityMax = 120;
|
||||
public static float ShieldActiveDamageReduction = 0.1f;
|
||||
public static int ShieldRechargeDelay = CalamityUtils.SecondsToFrames(8); // Was 6, then was 9
|
||||
public static int TotalShieldRechargeTime = CalamityUtils.SecondsToFrames(10); // Was 6
|
||||
|
||||
// While active, The Sponge gives 10% DR
|
||||
public static float ShieldActiveDamageReduction = 0.1f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ShieldDurabilityMax, ShieldActiveDamageReduction.ToPercent(), ShieldRechargeDelay.FramesToSeconds(), TotalShieldRechargeTime.FramesToSeconds());
|
||||
|
||||
public int OwnerPlayer { get; set; }
|
||||
public float RenderDepth => IDyeableShaderRenderer.SpongeShieldDepth;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Armor.Aerospec
|
||||
|
||||
// Common Set Bonus
|
||||
public static int SetBonusHurtDamageThreshold = 25;
|
||||
public static int SetBonusFeatherDamage = 30;
|
||||
public static int SetBonusFeatherDamage => CalamityUtils.ScaleWithDifficulty(15);
|
||||
public static float SetBonusFallSpeed = 15f;
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -31,20 +31,13 @@ namespace CalamityMod.Items.Armor.Aerospec
|
||||
Item.defense = 3; //15
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<AerospecBreastplate>() && legs.type == ModContent.ItemType<AerospecLeggings>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<AerospecBreastplate>() && legs.type == ModContent.ItemType<AerospecLeggings>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawShadow = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadow = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusManaCostReduction.ToPercent(), SetBonusMoveSpeedBoost.ToPercent())
|
||||
+ "\n" + CalamityUtils.GetTextFromModItem<AerospecBreastplate>("CommonSetBonus").Format(AerospecBreastplate.SetBonusHurtDamageThreshold);
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusManaCostReduction.ToPercent(), SetBonusMoveSpeedBoost.ToPercent(), AerospecBreastplate.SetBonusHurtDamageThreshold);
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.aeroSet = true;
|
||||
player.noFallDmg = true;
|
||||
|
||||
@@ -30,20 +30,13 @@ namespace CalamityMod.Items.Armor.Aerospec
|
||||
Item.defense = 7; //20
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<AerospecBreastplate>() && legs.type == ModContent.ItemType<AerospecLeggings>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<AerospecBreastplate>() && legs.type == ModContent.ItemType<AerospecLeggings>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawShadow = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadow = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMoveSpeedBoost.ToPercent())
|
||||
+ "\n" + CalamityUtils.GetTextFromModItem<AerospecBreastplate>("CommonSetBonus").Format(AerospecBreastplate.SetBonusHurtDamageThreshold);
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMoveSpeedBoost.ToPercent(), AerospecBreastplate.SetBonusHurtDamageThreshold);
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.aeroSet = true;
|
||||
player.noFallDmg = true;
|
||||
|
||||
@@ -29,20 +29,13 @@ namespace CalamityMod.Items.Armor.Aerospec
|
||||
Item.defense = 5; //18
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<AerospecBreastplate>() && legs.type == ModContent.ItemType<AerospecLeggings>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<AerospecBreastplate>() && legs.type == ModContent.ItemType<AerospecLeggings>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawShadow = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadow = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMoveSpeedBoost.ToPercent())
|
||||
+ "\n" + CalamityUtils.GetTextFromModItem<AerospecBreastplate>("CommonSetBonus").Format(AerospecBreastplate.SetBonusHurtDamageThreshold);
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMoveSpeedBoost.ToPercent(), AerospecBreastplate.SetBonusHurtDamageThreshold);
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.aeroSet = true;
|
||||
player.noFallDmg = true;
|
||||
|
||||
@@ -37,20 +37,13 @@ namespace CalamityMod.Items.Armor.Aerospec
|
||||
Item.defense = 4; //17
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<AerospecBreastplate>() && legs.type == ModContent.ItemType<AerospecLeggings>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<AerospecBreastplate>() && legs.type == ModContent.ItemType<AerospecLeggings>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawShadow = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadow = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), SetBonusMoveSpeedBoost.ToPercent())
|
||||
+ "\n" + CalamityUtils.GetTextFromModItem<AerospecBreastplate>("CommonSetBonus").Format(AerospecBreastplate.SetBonusHurtDamageThreshold);
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), SetBonusMoveSpeedBoost.ToPercent(), AerospecBreastplate.SetBonusHurtDamageThreshold);
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.aeroSet = true;
|
||||
modPlayer.rogueStealthMax += SetBonusRogueStealth;
|
||||
|
||||
@@ -34,20 +34,13 @@ namespace CalamityMod.Items.Armor.Aerospec
|
||||
Item.defense = 2; //13
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<AerospecBreastplate>() && legs.type == ModContent.ItemType<AerospecLeggings>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<AerospecBreastplate>() && legs.type == ModContent.ItemType<AerospecLeggings>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawShadow = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadow = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost, SetBonusSummonDamageBoost.ToPercent())
|
||||
+ "\n" + CalamityUtils.GetTextFromModItem<AerospecBreastplate>("CommonSetBonus").Format(AerospecBreastplate.SetBonusHurtDamageThreshold);
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost, SetBonusSummonDamageBoost.ToPercent(), AerospecBreastplate.SetBonusHurtDamageThreshold);
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.valkyrie = true;
|
||||
modPlayer.aeroSet = true;
|
||||
|
||||
@@ -10,6 +10,7 @@ using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Auric
|
||||
@@ -17,7 +18,6 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
[AutoloadEquip(EquipType.Body)]
|
||||
public class AuricTeslaBodyArmor : ModItem, ILocalizedModType
|
||||
{
|
||||
|
||||
public static int setBonusTooltipNumber = 0; //Set this to zero so the first Shift pressed will increment it to 1.
|
||||
public static bool holdingShift = false;
|
||||
public static Color tooltipTarragonColor = new(194, 255, 194);
|
||||
@@ -25,6 +25,11 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
public static Color tooltipSilvaColor = new(246, 255, 194);
|
||||
public static Color tooltipGodslayerColor = new(204, 194, 255);
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float DamageBoost = 0.16f;
|
||||
public static int CritBoost = 10;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), CritBoost);
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
// All code below runs only if we're not loading on a server
|
||||
@@ -40,17 +45,16 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
Item.width = 38;
|
||||
Item.height = 34;
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
Item.defense = 48;
|
||||
Item.defense = 44;
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
player.statLifeMax2 += 50;
|
||||
player.GetDamage<GenericDamageClass>() += 0.08f;
|
||||
player.GetCritChance<GenericDamageClass>() += 5;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
//This just runs the ModifyTooltips for whatever helmet is equipped if a full auric set is equipped; but runs it on this item's tooltips.
|
||||
|
||||
@@ -8,6 +8,7 @@ using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Auric
|
||||
@@ -16,22 +17,29 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
public class AuricTeslaCuisses : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float DamageBoost = 0.12f;
|
||||
public static int CritBoost = 10;
|
||||
public static float MoveSpeedBoost = 0.1f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), CritBoost, MoveSpeedBoost.ToPercent());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
Item.defense = 44;
|
||||
Item.defense = 42;
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.moveSpeed += 0.1f;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
player.carpet = true;
|
||||
player.GetDamage<GenericDamageClass>() += 0.12f;
|
||||
player.GetCritChance<GenericDamageClass>() += 5;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
//This just runs the ModifyTooltips for whatever helmet is equipped if a full auric set is equipped; but runs it on this item's tooltips.
|
||||
|
||||
@@ -7,7 +7,10 @@ using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using static CalamityMod.Items.Armor.Bloodflare.BloodflareHeadMagic;
|
||||
using static CalamityMod.Items.Armor.Silva.SilvaArmor;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
@@ -16,24 +19,25 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
public class AuricTeslaHeadMagic : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static int MaxManaBoost = 100;
|
||||
public static float ManaCostReduction = 0.2f;
|
||||
public static float MagicDamageBoost = 0.22f;
|
||||
public static int MagicCritBoost = 10;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, ManaCostReduction.ToPercent(), MagicDamageBoost.ToPercent(), MagicCritBoost);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
Item.defense = 24; //132
|
||||
Item.defense = 24; // 110
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<AuricTeslaBodyArmor>() && legs.type == ModContent.ItemType<AuricTeslaCuisses>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<AuricTeslaBodyArmor>() && legs.type == ModContent.ItemType<AuricTeslaCuisses>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawOutlines = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawOutlines = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
@@ -46,9 +50,7 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
modPlayer.silvaSet = true;
|
||||
modPlayer.silvaMage = true;
|
||||
modPlayer.auricSet = true;
|
||||
player.thorns += 3f;
|
||||
player.ignoreWater = true;
|
||||
player.crimsonRegen = true;
|
||||
player.crimsonRegen = true; // Inherited from Bloodflare
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
@@ -68,7 +70,10 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
if (line.Name == "SetBonus")
|
||||
{
|
||||
Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipSilvaColor };
|
||||
line.Text = this.GetLocalizedValue($"SetBonus{setBonusTooltipNumber}");
|
||||
var LocalizedText = this.GetLocalization($"SetBonus{setBonusTooltipNumber}");
|
||||
line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(SetBonusRegenBoost.ToRegenPerSecond(), AccelerationBoost.ToPercent(), ReviveDuration.FramesToSeconds(), (ReviveCooldown / 60).FramesToSeconds())
|
||||
: setBonusTooltipNumber == 2 ? LocalizedText.Format(GhostBoltCooldown.FramesToSeconds(), BloodsplosionCooldown.FramesToSeconds())
|
||||
: LocalizedText.Format());
|
||||
line.OverrideColor = armorColors[setBonusTooltipNumber - 1];
|
||||
}
|
||||
}
|
||||
@@ -80,12 +85,10 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
}
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.auricBoost = true;
|
||||
player.manaCost -= 0.2f;
|
||||
player.GetDamage<MagicDamageClass>() += 0.3f;
|
||||
player.GetCritChance<MagicDamageClass>() += 20;
|
||||
player.statManaMax2 += 100;
|
||||
player.statManaMax2 += MaxManaBoost;
|
||||
player.manaCost -= ManaCostReduction;
|
||||
player.GetDamage<MagicDamageClass>() += MagicDamageBoost;
|
||||
player.GetCritChance<MagicDamageClass>() += MagicCritBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -10,6 +10,9 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using static CalamityMod.Items.Armor.Bloodflare.BloodflareHeadMelee;
|
||||
using static CalamityMod.Items.Armor.GodSlayer.GodSlayerHeadMelee;
|
||||
using static CalamityMod.Items.Armor.Tarragon.TarragonHeadMelee;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
@@ -19,30 +22,31 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
public class AuricTeslaHeadMelee : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float MeleeDamageBoost = 0.12f;
|
||||
public static float MeleeSpeedBoost = 0.28f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MeleeDamageBoost.ToPercent(), MeleeSpeedBoost.ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static int SetBonusAggroBoost = 1200;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
Item.defense = 54; //132
|
||||
Item.defense = 54; // 140
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<AuricTeslaBodyArmor>() && legs.type == ModContent.ItemType<AuricTeslaCuisses>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<AuricTeslaBodyArmor>() && legs.type == ModContent.ItemType<AuricTeslaCuisses>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawOutlines = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawOutlines = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus");
|
||||
var modPlayer = player.Calamity();
|
||||
player.GetAttackSpeed<MeleeDamageClass>() += 0.28f;
|
||||
modPlayer.tarraSet = true;
|
||||
modPlayer.tarraMelee = true;
|
||||
modPlayer.bloodflareSet = true;
|
||||
@@ -51,10 +55,8 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
modPlayer.godSlayerDamage = true;
|
||||
modPlayer.auricSet = true;
|
||||
modPlayer.auricSetMelee = true;
|
||||
player.thorns += 3f;
|
||||
player.ignoreWater = true;
|
||||
player.crimsonRegen = true;
|
||||
player.aggro += 1200;
|
||||
player.crimsonRegen = true; // Inherited from Bloodflare
|
||||
player.aggro += SetBonusAggroBoost;
|
||||
|
||||
if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID))
|
||||
modPlayer.DeferredDashID = GodslayerArmorDash.ID;
|
||||
@@ -62,11 +64,10 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.auricBoost = true;
|
||||
player.GetDamage<MeleeDamageClass>() += 0.2f;
|
||||
player.GetCritChance<MeleeDamageClass>() += 10;
|
||||
player.GetDamage<MeleeDamageClass>() += MeleeDamageBoost;
|
||||
player.GetAttackSpeed<MeleeDamageClass>() += MeleeSpeedBoost;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift;
|
||||
@@ -85,7 +86,9 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipGodslayerColor };
|
||||
var LocalizedText = CalamityUtils.GetTextFromModItem(Type, $"SetBonus{setBonusTooltipNumber}");
|
||||
line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodslayerArmorDash.GodslayerCooldown) : setBonusTooltipNumber == 2 ? LocalizedText.Format() : LocalizedText.Format(CalamityUtils.GetArmorSetBonusKey()));
|
||||
line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(SetBonusHurtDamageThreshold, CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodSlayerChestplate.DashCooldown.FramesToSeconds())
|
||||
: setBonusTooltipNumber == 2 ? LocalizedText.Format(HitsToActivateFrenzy, FrenzyDuration.FramesToSeconds(), FrenzyMeleeDamageBoost.ToPercent(), FrenzyContactDamageReduction.ToPercent(), FrenzyCooldown.FramesToSeconds())
|
||||
: LocalizedText.Format(TarraLifeRegenBoost.ToRegenPerSecond(), CalamityUtils.GetArmorSetBonusKey(), CloakDuration.FramesToSeconds(), CloakCooldown.FramesToSeconds()));
|
||||
line.OverrideColor = armorColors[setBonusTooltipNumber - 1];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,10 @@ using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using static CalamityMod.Items.Armor.Bloodflare.BloodflareHeadRanged;
|
||||
using static CalamityMod.Items.Armor.GodSlayer.GodSlayerHeadRanged;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
@@ -17,24 +20,23 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
public class AuricTeslaHeadRanged : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float RangedDamageBoost = 0.22f;
|
||||
public static int RangedCritBoost = 20;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
Item.defense = 40; //132
|
||||
Item.defense = 39; // 125
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<AuricTeslaBodyArmor>() && legs.type == ModContent.ItemType<AuricTeslaCuisses>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<AuricTeslaBodyArmor>() && legs.type == ModContent.ItemType<AuricTeslaCuisses>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawOutlines = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawOutlines = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
@@ -47,9 +49,7 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
modPlayer.godSlayer = true;
|
||||
modPlayer.godSlayerRanged = true;
|
||||
modPlayer.auricSet = true;
|
||||
player.thorns += 3f;
|
||||
player.ignoreWater = true;
|
||||
player.crimsonRegen = true;
|
||||
player.crimsonRegen = true; // Inherited from Bloodflare
|
||||
|
||||
if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID))
|
||||
modPlayer.DeferredDashID = GodslayerArmorDash.ID;
|
||||
@@ -57,11 +57,10 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.auricBoost = true;
|
||||
player.GetDamage<RangedDamageClass>() += 0.3f;
|
||||
player.GetCritChance<RangedDamageClass>() += 30;
|
||||
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
|
||||
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift;
|
||||
@@ -80,7 +79,9 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipGodslayerColor };
|
||||
var LocalizedText = CalamityUtils.GetTextFromModItem(Type, $"SetBonus{setBonusTooltipNumber}");
|
||||
line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodslayerArmorDash.GodslayerCooldown) : setBonusTooltipNumber == 2 ? LocalizedText.Format(CalamityUtils.GetArmorSetBonusKey()) : LocalizedText.Format());
|
||||
line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(ShrapnelRoundCooldown.FramesToSeconds(), CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodSlayerChestplate.DashCooldown.FramesToSeconds())
|
||||
: setBonusTooltipNumber == 2 ? LocalizedText.Format(CalamityUtils.GetArmorSetBonusKey(), SoulCooldown.FramesToSeconds(), BloodBombCooldown.FramesToSeconds())
|
||||
: LocalizedText.Format());
|
||||
line.OverrideColor = armorColors[setBonusTooltipNumber - 1];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,11 @@ using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using static CalamityMod.Items.Armor.Bloodflare.BloodflareHeadRogue;
|
||||
using static CalamityMod.Items.Armor.GodSlayer.GodSlayerHeadRogue;
|
||||
using static CalamityMod.Items.Armor.Tarragon.TarragonHeadRogue;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
@@ -17,28 +21,31 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
public class AuricTeslaHeadRogue : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float RogueDamageBoost = 0.17f;
|
||||
public static int RogueCritBoost = 10;
|
||||
public static float MoveSpeedBoost = 0.05f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), RogueCritBoost, MoveSpeedBoost.ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static float SetBonusRogueStealth = 1.3f;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
Item.defense = 34; //132
|
||||
Item.defense = 34; // 120
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<AuricTeslaBodyArmor>() && legs.type == ModContent.ItemType<AuricTeslaCuisses>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<AuricTeslaBodyArmor>() && legs.type == ModContent.ItemType<AuricTeslaCuisses>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawOutlines = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawOutlines = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus");
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth());
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.tarraSet = true;
|
||||
modPlayer.tarraThrowing = true;
|
||||
@@ -47,11 +54,9 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
modPlayer.godSlayer = true;
|
||||
modPlayer.godSlayerThrowing = true;
|
||||
modPlayer.auricSet = true;
|
||||
modPlayer.rogueStealthMax += 1.3f;
|
||||
modPlayer.rogueStealthMax += SetBonusRogueStealth;
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
player.thorns += 3f;
|
||||
player.ignoreWater = true;
|
||||
player.crimsonRegen = true;
|
||||
player.crimsonRegen = true; // Inherited from Bloodflare
|
||||
|
||||
if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID))
|
||||
modPlayer.DeferredDashID = GodslayerArmorDash.ID;
|
||||
@@ -59,12 +64,11 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.auricBoost = true;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.2f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 20;
|
||||
player.moveSpeed += 0.05f;
|
||||
player.GetDamage<ThrowingDamageClass>() += RogueDamageBoost;
|
||||
player.GetCritChance<ThrowingDamageClass>() += RogueCritBoost;
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift;
|
||||
@@ -83,7 +87,9 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipGodslayerColor };
|
||||
var LocalizedText = CalamityUtils.GetTextFromModItem(Type, $"SetBonus{setBonusTooltipNumber}");
|
||||
line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodslayerArmorDash.GodslayerCooldown) : setBonusTooltipNumber == 2 ? LocalizedText.Format() : LocalizedText.Format());
|
||||
line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(RogueDamageBoostAtFullHealth.ToPercent(), SetBonusHurtDamageThreshold, CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodSlayerChestplate.DashCooldown.FramesToSeconds())
|
||||
: setBonusTooltipNumber == 2 ? LocalizedText.Format(DefenseBoostAboveHealthThreshold, DefenseBoostHealthThreshold.ToPercent())
|
||||
: LocalizedText.Format(CritsToActivateImmunity, ImmunityDuration.FramesToSeconds(), ImmunityCooldown.FramesToSeconds(), RogueDamageBoostWhileDebuffed.ToPercent()));
|
||||
line.OverrideColor = armorColors[setBonusTooltipNumber - 1];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,10 @@ using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using static CalamityMod.Items.Armor.Bloodflare.BloodflareHeadSummon;
|
||||
using static CalamityMod.Items.Armor.Silva.SilvaArmor;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
@@ -16,28 +19,32 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
public class AuricTeslaHeadSummon : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static int MinionSlotBoost = 2;
|
||||
public static float SummonDamageBoost = 0.32f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinionSlotBoost, SummonDamageBoost.ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static int SetBonusMinionSlotBoost = 4;
|
||||
public static float SetBonusSummonDamageBoost = 0.55f;
|
||||
public static int CrystalDamage = 500;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
Item.defense = 12; //132
|
||||
Item.defense = 18; // 104
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<AuricTeslaBodyArmor>() && legs.type == ModContent.ItemType<AuricTeslaCuisses>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<AuricTeslaBodyArmor>() && legs.type == ModContent.ItemType<AuricTeslaCuisses>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawOutlines = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawOutlines = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus");
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost, SetBonusSummonDamageBoost.ToPercent());
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.tarraSet = true;
|
||||
modPlayer.tarraSummon = true;
|
||||
@@ -47,19 +54,17 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
modPlayer.silvaSummon = true;
|
||||
modPlayer.auricSet = true;
|
||||
modPlayer.WearingPostMLSummonerSet = true;
|
||||
player.thorns += 3f;
|
||||
player.ignoreWater = true;
|
||||
player.crimsonRegen = true;
|
||||
player.GetDamage<SummonDamageClass>() += 0.75f;
|
||||
player.maxMinions += 6;
|
||||
player.crimsonRegen = true; // Inherited from Bloodflare
|
||||
player.maxMinions += SetBonusMinionSlotBoost;
|
||||
player.GetDamage<SummonDamageClass>() += SetBonusSummonDamageBoost;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.auricBoost = true;
|
||||
player.GetDamage<SummonDamageClass>() += 0.15f;
|
||||
player.maxMinions += MinionSlotBoost;
|
||||
player.GetDamage<SummonDamageClass>() += SummonDamageBoost;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift;
|
||||
@@ -77,7 +82,10 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
if (line.Name == "SetBonus")
|
||||
{
|
||||
Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipSilvaColor };
|
||||
line.Text = this.GetLocalizedValue($"SetBonus{setBonusTooltipNumber}");
|
||||
var LocalizedText = this.GetLocalization($"SetBonus{setBonusTooltipNumber}");
|
||||
line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(SetBonusRegenBoost.ToRegenPerSecond(), AccelerationBoost.ToPercent(), ReviveDuration.FramesToSeconds(), (ReviveCooldown / 60).FramesToSeconds())
|
||||
: setBonusTooltipNumber == 2 ? LocalizedText.Format(DefenseBoostBelowHealthThreshold, DefenseBoostHealthThreshold.ToPercent())
|
||||
: LocalizedText.Format());
|
||||
line.OverrideColor = armorColors[setBonusTooltipNumber - 1];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.Rarities;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Bloodflare
|
||||
@@ -10,20 +11,24 @@ namespace CalamityMod.Items.Armor.Bloodflare
|
||||
public class BloodflareBodyArmor : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float DamageBoost = 0.12f;
|
||||
public static int CritBoost = 8;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), CritBoost);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
|
||||
Item.defense = 35;
|
||||
Item.defense = 36;
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.statLifeMax2 += 25;
|
||||
player.GetDamage<GenericDamageClass>() += 0.12f;
|
||||
player.GetCritChance<GenericDamageClass>() += 8;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.Rarities;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Bloodflare
|
||||
@@ -10,20 +11,26 @@ namespace CalamityMod.Items.Armor.Bloodflare
|
||||
public class BloodflareCuisses : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float DamageBoost = 0.1f;
|
||||
public static int CritBoost = 7;
|
||||
public static float MoveSpeedBoost = 0.17f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), CritBoost, MoveSpeedBoost.ToPercent());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
|
||||
Item.defense = 29;
|
||||
Item.defense = 28;
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.moveSpeed += 0.17f;
|
||||
player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
player.GetCritChance<GenericDamageClass>() += 7;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Bloodflare
|
||||
@@ -12,40 +13,49 @@ namespace CalamityMod.Items.Armor.Bloodflare
|
||||
public class BloodflareHeadMagic : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static int MaxManaBoost = 100;
|
||||
public static float ManaCostReduction = 0.17f;
|
||||
public static float MagicDamageBoost = 0.2f;
|
||||
public static int MagicCritBoost = 10;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, ManaCostReduction.ToPercent(), MagicDamageBoost.ToPercent(), MagicCritBoost);
|
||||
|
||||
// Set Bonus
|
||||
public static int GhostBoltCooldown = CalamityUtils.SecondsToFrames(1.67f);
|
||||
public static double GhostBoltDamageRatio = 1.3D;
|
||||
public static int GhostBoltonDamageSoftcap = 2600;
|
||||
public static int BloodsplosionCooldown = CalamityUtils.SecondsToFrames(2);
|
||||
public static double BloodsplosionDamageRatio = 0.5D;
|
||||
public static int BloodsplosionDamageSoftcap = 250;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
|
||||
Item.defense = 22; //85
|
||||
Item.defense = 18; // 82
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawShadowSubtle = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadowSubtle = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.bloodflareSet = true;
|
||||
modPlayer.bloodflareMage = true;
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextValueFromModItem<BloodflareBodyArmor>("CommonSetBonus");
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(GhostBoltCooldown.FramesToSeconds(), BloodsplosionCooldown.FramesToSeconds());
|
||||
player.crimsonRegen = true;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.manaCost -= 0.17f;
|
||||
player.GetDamage<MagicDamageClass>() += 0.2f;
|
||||
player.GetCritChance<MagicDamageClass>() += 10;
|
||||
player.statManaMax2 += 100;
|
||||
player.statManaMax2 += MaxManaBoost;
|
||||
player.manaCost -= ManaCostReduction;
|
||||
player.GetDamage<MagicDamageClass>() += MagicDamageBoost;
|
||||
player.GetCritChance<MagicDamageClass>() += MagicCritBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Bloodflare
|
||||
@@ -12,40 +13,49 @@ namespace CalamityMod.Items.Armor.Bloodflare
|
||||
public class BloodflareHeadMelee : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float MeleeDamageBoost = 0.1f;
|
||||
public static int MeleeCritBoost = 5;
|
||||
public static float MeleeSpeedBoost = 0.18f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MeleeDamageBoost.ToPercent(), MeleeCritBoost, MeleeSpeedBoost.ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static int SetBonusAggroBoost = 900;
|
||||
public static int HitsToActivateFrenzy = 15;
|
||||
public static float FrenzyMeleeDamageBoost = 0.25f;
|
||||
public static int FrenzyMeleeCritBoost = 25; // NOTE: Tooltip shares this number with damage % as they're equal
|
||||
public static double FrenzyContactDamageReduction = 0.5D;
|
||||
public static int FrenzyDuration = CalamityUtils.SecondsToFrames(5);
|
||||
public static int FrenzyCooldown = CalamityUtils.SecondsToFrames(30);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
|
||||
Item.defense = 49; //85
|
||||
Item.defense = 44; // 108
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawShadowSubtle = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadowSubtle = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
player.GetAttackSpeed<MeleeDamageClass>() += 0.18f;
|
||||
modPlayer.bloodflareSet = true;
|
||||
modPlayer.bloodflareMelee = true;
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextValueFromModItem<BloodflareBodyArmor>("CommonSetBonus");
|
||||
player.aggro += SetBonusAggroBoost;
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(HitsToActivateFrenzy, FrenzyDuration.FramesToSeconds(), FrenzyMeleeDamageBoost.ToPercent(), FrenzyContactDamageReduction.ToPercent(), FrenzyCooldown.FramesToSeconds());
|
||||
player.crimsonRegen = true;
|
||||
player.aggro += 900;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<MeleeDamageClass>() += 0.1f;
|
||||
player.GetCritChance<MeleeDamageClass>() += 5;
|
||||
player.GetDamage<MeleeDamageClass>() += MeleeDamageBoost;
|
||||
player.GetCritChance<MeleeDamageClass>() += MeleeCritBoost;
|
||||
player.GetAttackSpeed<MeleeDamageClass>() += MeleeSpeedBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -4,6 +4,7 @@ using CalamityMod.Rarities;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Bloodflare
|
||||
@@ -15,38 +16,44 @@ namespace CalamityMod.Items.Armor.Bloodflare
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
public static readonly SoundStyle ActivationSound = new("CalamityMod/Sounds/Custom/AbilitySounds/BloodflareRangerActivation");
|
||||
|
||||
public static float RangedDamageBoost = 0.1f;
|
||||
public static int RangedCritBoost = 10; // NOTE: Tooltip shares this number with damage % as they're equal
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static int SoulCooldown = CalamityUtils.SecondsToFrames(30);
|
||||
public static int SoulDamage = 300;
|
||||
public static int SoulAmount = 16;
|
||||
public static int BloodBombCooldown = CalamityUtils.SecondsToFrames(2.5f);
|
||||
public static double BloodBombDamageRatio = 0.8D;
|
||||
public static int BloodBombDamageSoftcap = 120;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
|
||||
Item.defense = 34; //85
|
||||
Item.defense = 30; // 94
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawShadowSubtle = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadowSubtle = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.bloodflareSet = true;
|
||||
modPlayer.bloodflareRanged = true;
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(CalamityUtils.GetArmorSetBonusKey()) + "\n" + CalamityUtils.GetTextValueFromModItem<BloodflareBodyArmor>("CommonSetBonus");
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(CalamityUtils.GetArmorSetBonusKey(), SoulCooldown.FramesToSeconds(), BloodBombCooldown.FramesToSeconds());
|
||||
player.crimsonRegen = true;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<RangedDamageClass>() += 0.1f;
|
||||
player.GetCritChance<RangedDamageClass>() += 10;
|
||||
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
|
||||
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Bloodflare
|
||||
@@ -12,41 +13,46 @@ namespace CalamityMod.Items.Armor.Bloodflare
|
||||
public class BloodflareHeadRogue : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float RogueDamageBoost = 0.15f;
|
||||
public static int RogueCritBoost = 10;
|
||||
public static float MoveSpeedBoost = 0.05f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), RogueCritBoost, MoveSpeedBoost.ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static float SetBonusRogueStealth = 1.2f;
|
||||
public static int DefenseBoostAboveHealthThreshold = 30;
|
||||
public static float DefenseBoostHealthThreshold = 0.8f;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
|
||||
Item.defense = 28; //85
|
||||
Item.defense = 26; // 90
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawShadowSubtle = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadowSubtle = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.bloodflareSet = true;
|
||||
modPlayer.bloodflareThrowing = true;
|
||||
modPlayer.rogueStealthMax += 1.2f;
|
||||
modPlayer.rogueStealthMax += SetBonusRogueStealth;
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextValueFromModItem<BloodflareBodyArmor>("CommonSetBonus");
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), DefenseBoostAboveHealthThreshold, DefenseBoostHealthThreshold.ToPercent());
|
||||
player.crimsonRegen = true;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 10;
|
||||
player.moveSpeed += 0.05f;
|
||||
player.GetDamage<ThrowingDamageClass>() += RogueDamageBoost;
|
||||
player.GetCritChance<ThrowingDamageClass>() += RogueCritBoost;
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Bloodflare
|
||||
@@ -14,24 +15,30 @@ namespace CalamityMod.Items.Armor.Bloodflare
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
internal static string GhostMineEntitySourceContext => "SetBonus_Calamity_BloodflareSummon";
|
||||
|
||||
public static int MinionSlotBoost = 1;
|
||||
public static float SummonDamageBoost = 0.3f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinionSlotBoost, SummonDamageBoost.ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static int SetBonusMinionSlotBoost = 2;
|
||||
public static float SetBonusSummonDamageBoost = 0.3f;
|
||||
public static int MineDamage = 3750;
|
||||
public static int MineCooldown = 900;
|
||||
public static int DefenseBoostBelowHealthThreshold = 20;
|
||||
public static float DefenseBoostHealthThreshold = 0.5f;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
|
||||
Item.defense = 16; //85
|
||||
Item.defense = 12; // 76
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<BloodflareBodyArmor>() && legs.type == ModContent.ItemType<BloodflareCuisses>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawShadowSubtle = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadowSubtle = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
@@ -39,15 +46,16 @@ namespace CalamityMod.Items.Armor.Bloodflare
|
||||
modPlayer.bloodflareSet = true;
|
||||
modPlayer.bloodflareSummon = true;
|
||||
modPlayer.WearingPostMLSummonerSet = true;
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextValueFromModItem<BloodflareBodyArmor>("CommonSetBonus");
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost, SetBonusSummonDamageBoost.ToPercent(), DefenseBoostBelowHealthThreshold, DefenseBoostHealthThreshold.ToPercent());
|
||||
player.crimsonRegen = true;
|
||||
player.GetDamage<SummonDamageClass>() += 0.5f;
|
||||
player.maxMinions += 3;
|
||||
player.maxMinions += SetBonusMinionSlotBoost;
|
||||
player.GetDamage<SummonDamageClass>() += SetBonusSummonDamageBoost;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<SummonDamageClass>() += 0.05f;
|
||||
player.maxMinions += MinionSlotBoost;
|
||||
player.GetDamage<SummonDamageClass>() += SummonDamageBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Armor.Daedalus
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
|
||||
|
||||
// Set Bonus
|
||||
public static int ShardDamage = 60;
|
||||
public static int ShardDamage => CalamityUtils.ScaleWithDifficulty(30);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Demonshade
|
||||
@@ -14,6 +15,12 @@ namespace CalamityMod.Items.Armor.Demonshade
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
public string FrontArmTexture => "CalamityMod/Items/Armor/Demonshade/DemonshadeBreastplate_Arms";
|
||||
|
||||
public static int MaxManaBoost = 200;
|
||||
public static float DamageBoost = 0.15f;
|
||||
public static int CritBoost = 15; // NOTE: Tooltip shares this number with damage % as they're equal
|
||||
public static float MeleeSpeedBoost = 0.25f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, DamageBoost.ToPercent(), MeleeSpeedBoost.ToPercent());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
@@ -28,12 +35,10 @@ namespace CalamityMod.Items.Armor.Demonshade
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.shadeRegen = true;
|
||||
player.thorns += 100f;
|
||||
player.statLifeMax2 += 50;
|
||||
player.statManaMax2 += 200;
|
||||
player.GetDamage<GenericDamageClass>() += 0.15f;
|
||||
player.GetCritChance<GenericDamageClass>() += 15;
|
||||
player.GetAttackSpeed<MeleeDamageClass>() += 0.25f;
|
||||
player.statManaMax2 += MaxManaBoost;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
player.GetAttackSpeed<MeleeDamageClass>() += MeleeSpeedBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -11,6 +11,11 @@ namespace CalamityMod.Items.Armor.Demonshade
|
||||
public class DemonshadeGreaves : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
// Shadow Speed... (elusive)
|
||||
public static float MoveSpeedBoost = 0.3f;
|
||||
public static float AccelerationBoost = 0.5f;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
@@ -26,7 +31,7 @@ namespace CalamityMod.Items.Armor.Demonshade
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.shadowSpeed = true;
|
||||
player.moveSpeed += 0.3f;
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -9,6 +9,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Demonshade
|
||||
@@ -20,7 +21,18 @@ namespace CalamityMod.Items.Armor.Demonshade
|
||||
public static readonly SoundStyle ActivationSound = new("CalamityMod/Sounds/Custom/AbilitySounds/DemonshadeEnrage");
|
||||
internal static string ShadowScytheEntitySourceContext => "SetBonus_Calamity_Demonshade";
|
||||
|
||||
public static int MinionSlotBoost = 2;
|
||||
public static float DamageBoost = 0.3f;
|
||||
public static int CritBoost = 15;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinionSlotBoost, DamageBoost.ToPercent(), CritBoost);
|
||||
|
||||
// Set Bonus
|
||||
public static int SetBonusMinionSlotBoost = 8;
|
||||
public static float SetBonusSummonDamageBoost = 1f;
|
||||
public static int DevilDamage = 1000;
|
||||
public static int BeamDamage => CalamityUtils.ScaleWithDifficulty(300);
|
||||
public static int ScytheDamage => CalamityUtils.ScaleWithDifficulty(500);
|
||||
public static int EnrageDuration = CalamityUtils.SecondsToFrames(10);
|
||||
public static float MultDamageBoost = 0.5f;
|
||||
public static double MultDamageTakenBoost = 0.25D;
|
||||
|
||||
@@ -34,10 +46,7 @@ namespace CalamityMod.Items.Armor.Demonshade
|
||||
Item.Calamity().devItem = true;
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<DemonshadeBreastplate>() && legs.type == ModContent.ItemType<DemonshadeGreaves>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<DemonshadeBreastplate>() && legs.type == ModContent.ItemType<DemonshadeGreaves>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
@@ -47,7 +56,7 @@ namespace CalamityMod.Items.Armor.Demonshade
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(CalamityUtils.GetArmorSetBonusKey(), (1f + MultDamageBoost).Round(), (1D + MultDamageTakenBoost).Round());
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost, SetBonusSummonDamageBoost.ToPercent(), CalamityUtils.GetArmorSetBonusKey(), EnrageDuration.FramesToSeconds(), (1f + MultDamageBoost).Round(), (1D + MultDamageTakenBoost).Round());
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.dsSetBonus = true;
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
@@ -68,14 +77,15 @@ namespace CalamityMod.Items.Armor.Demonshade
|
||||
devil.originalDamage = DevilDamage;
|
||||
}
|
||||
}
|
||||
player.GetDamage<SummonDamageClass>() += 1f;
|
||||
player.maxMinions += 10;
|
||||
player.maxMinions += SetBonusMinionSlotBoost;
|
||||
player.GetDamage<SummonDamageClass>() += SetBonusSummonDamageBoost;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<GenericDamageClass>() += 0.3f;
|
||||
player.GetCritChance<GenericDamageClass>() += 15;
|
||||
player.maxMinions += MinionSlotBoost;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Empyrean
|
||||
@@ -10,6 +11,11 @@ namespace CalamityMod.Items.Armor.Empyrean
|
||||
public class EmpyreanCloak : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float RogueDamageBoost = 0.12f;
|
||||
public static int RogueCritBoost = 8;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), RogueCritBoost);
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
@@ -21,7 +27,6 @@ namespace CalamityMod.Items.Armor.Empyrean
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
var equipSlot = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
|
||||
@@ -36,13 +41,13 @@ namespace CalamityMod.Items.Armor.Empyrean
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityRedBuyPrice;
|
||||
Item.rare = ItemRarityID.Red;
|
||||
Item.defense = 27;
|
||||
Item.defense = 24;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetCritChance<ThrowingDamageClass>() += 7;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.07f;
|
||||
player.GetDamage<ThrowingDamageClass>() += RogueDamageBoost;
|
||||
player.GetCritChance<ThrowingDamageClass>() += RogueCritBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Empyrean
|
||||
@@ -10,20 +11,26 @@ namespace CalamityMod.Items.Armor.Empyrean
|
||||
public class EmpyreanCuisses : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float RogueDamageBoost = 0.08f;
|
||||
public static int RogueCritBoost = 8; // NOTE: Tooltip shares this number with damage % as they're equal
|
||||
public static float MoveSpeedBoost = 0.2f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), MoveSpeedBoost.ToPercent());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityRedBuyPrice;
|
||||
Item.rare = ItemRarityID.Red;
|
||||
Item.defense = 24;
|
||||
Item.defense = 20;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetCritChance<ThrowingDamageClass>() += 5;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.05f;
|
||||
player.moveSpeed += 0.15f;
|
||||
player.GetDamage<ThrowingDamageClass>() += RogueDamageBoost;
|
||||
player.GetCritChance<ThrowingDamageClass>() += RogueCritBoost;
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Empyrean
|
||||
@@ -12,6 +13,20 @@ namespace CalamityMod.Items.Armor.Empyrean
|
||||
public class EmpyreanMask : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float RogueDamageBoost = 0.12f;
|
||||
public static int RogueCritBoost = 7;
|
||||
public static float RogueVelocityBoost = 0.1f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), RogueCritBoost, RogueVelocityBoost.ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static float SetBonusRogueStealth = 1.15f;
|
||||
public static int WrathDuration = CalamityUtils.SecondsToFrames(3);
|
||||
public static float PermanentWrathHealthRatio = 0.5f;
|
||||
public static float WrathRogueDamageBoost = 0.1f;
|
||||
public static int WrathRogueCritBoost = 5;
|
||||
// There's 10 or so different magic numbers polluting CalamityPlayerOnHit for each projectile. I'm not adding it. - Iris
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
@@ -25,7 +40,6 @@ namespace CalamityMod.Items.Armor.Empyrean
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
if (Main.dedServ)
|
||||
return;
|
||||
|
||||
@@ -45,13 +59,10 @@ namespace CalamityMod.Items.Armor.Empyrean
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityRedBuyPrice;
|
||||
Item.rare = ItemRarityID.Red;
|
||||
Item.defense = 20; //71
|
||||
Item.defense = 16; // 60
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<EmpyreanCloak>() && legs.type == ModContent.ItemType<EmpyreanCuisses>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<EmpyreanCloak>() && legs.type == ModContent.ItemType<EmpyreanCuisses>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
@@ -65,20 +76,18 @@ namespace CalamityMod.Items.Armor.Empyrean
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.xerocSet = true;
|
||||
modPlayer.rogueStealthMax += 1.15f;
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus");
|
||||
if (player.statLife <= (int)(player.statLifeMax2 * 0.5))
|
||||
modPlayer.rogueStealthMax += SetBonusRogueStealth;
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth());
|
||||
if (player.statLife <= (int)(player.statLifeMax2 * PermanentWrathHealthRatio))
|
||||
player.AddBuff(ModContent.BuffType<EmpyreanWrath>(), 2);
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.09f;
|
||||
modPlayer.rogueVelocity += 0.09f;
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.11f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 11;
|
||||
player.moveSpeed += 0.05f;
|
||||
player.GetDamage<ThrowingDamageClass>() += RogueDamageBoost;
|
||||
player.GetCritChance<ThrowingDamageClass>() += RogueCritBoost;
|
||||
player.Calamity().rogueVelocity += RogueVelocityBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -5,6 +5,7 @@ using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Fearmonger
|
||||
@@ -13,45 +14,52 @@ namespace CalamityMod.Items.Armor.Fearmonger
|
||||
public class FearmongerGreathelm : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static int MaxManaBoost = 60;
|
||||
public static float ManaCostReduction = 0.1f;
|
||||
public static float SummonDamageBoost = 0.2f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, ManaCostReduction.ToPercent(), SummonDamageBoost.ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static int SetBonusMinionSlotBoost = 2;
|
||||
public static int RegenBoostDurationPerHit = CalamityUtils.SecondsToFrames(0.17f);
|
||||
public static int RegenBoostDurationLimit = CalamityUtils.SecondsToFrames(1.5f);
|
||||
public static int MinionRegenBoost = 5;
|
||||
public static int MinionRegenTimeBoost = 4;
|
||||
public static int MinionRegenTimeFloor = 900;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.defense = 38; // 132 total
|
||||
Item.defense = 35; // 125
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.statManaMax2 += 60;
|
||||
player.GetDamage<SummonDamageClass>() += 0.1f;
|
||||
player.manaCost -= 0.1f;
|
||||
player.statManaMax2 += MaxManaBoost;
|
||||
player.manaCost -= ManaCostReduction;
|
||||
player.GetDamage<SummonDamageClass>() += SummonDamageBoost;
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<FearmongerPlateMail>() && legs.type == ModContent.ItemType<FearmongerGreaves>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<FearmongerPlateMail>() && legs.type == ModContent.ItemType<FearmongerGreaves>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawOutlines = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawOutlines = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus");
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost, MinionRegenBoost.ToRegenPerSecond());
|
||||
|
||||
// This bool encompasses cross-class nerf immunity, colossal life regen on minion attack, and the holiday moon DR
|
||||
// This bool encompasses cross-class nerf immunity and colossal life regen on minion attack
|
||||
// TODO -- Fearmonger life regen from minion attacks needs some sort of cool visual effect
|
||||
player.Calamity().fearmongerSet = true;
|
||||
|
||||
// All-class armors count as rogue sets, but don't grant stealth bonuses
|
||||
player.Calamity().wearingRogueArmor = true;
|
||||
player.Calamity().WearingPostMLSummonerSet = true;
|
||||
player.GetDamage<SummonDamageClass>() += 0.2f;
|
||||
player.maxMinions += 2;
|
||||
player.maxMinions += SetBonusMinionSlotBoost;
|
||||
|
||||
int[] immuneDebuffs = {
|
||||
BuffID.OnFire,
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Fearmonger
|
||||
@@ -11,21 +12,24 @@ namespace CalamityMod.Items.Armor.Fearmonger
|
||||
public class FearmongerGreaves : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float DamageBoost = 0.1f;
|
||||
public static float MoveSpeedBoost = 0.2f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), MoveSpeedBoost.ToPercent());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.defense = 44;
|
||||
Item.defense = 42;
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<GenericDamageClass>() += 0.06f;
|
||||
player.GetKnockback<SummonDamageClass>() += 0.5f;
|
||||
player.moveSpeed += 0.1f;
|
||||
player.panic = true;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Fearmonger
|
||||
@@ -11,21 +12,28 @@ namespace CalamityMod.Items.Armor.Fearmonger
|
||||
public class FearmongerPlateMail : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float DamageBoost = 0.1f;
|
||||
public static int CritBoost = 5;
|
||||
public static int MaxLifeBoost = 100;
|
||||
public static float DamageReductionBoost = 0.08f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), CritBoost, MaxLifeBoost, DamageReductionBoost.ToPercent());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.defense = 50;
|
||||
Item.defense = 48;
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.statLifeMax2 += 100;
|
||||
player.endurance += 0.08f;
|
||||
player.GetDamage<GenericDamageClass>() += 0.05f;
|
||||
player.GetCritChance<GenericDamageClass>() += 5;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
player.statLifeMax2 += MaxLifeBoost;
|
||||
player.endurance += DamageReductionBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -64,10 +64,8 @@ namespace CalamityMod.Items.Armor.GemTech
|
||||
Item.Calamity().donorItem = true;
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ItemType<GemTechBodyArmor>() && legs.type == ItemType<GemTechSchynbaulds>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ItemType<GemTechBodyArmor>() && legs.type == ItemType<GemTechSchynbaulds>();
|
||||
|
||||
public static bool HasArmorSet(Player player) => player.armor[0].type == ItemType<GemTechHeadgear>() && player.armor[1].type == ItemType<GemTechBodyArmor>() && player.armor[2].type == ItemType<GemTechSchynbaulds>();
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
@@ -79,7 +77,8 @@ namespace CalamityMod.Items.Armor.GemTech
|
||||
if (player.Calamity().GemTechState.IsYellowGemActive)
|
||||
player.GetAttackSpeed<MeleeDamageClass>() += MeleeSpeedBoost;
|
||||
|
||||
player.setBonus = "Mucho Texto"; //Replaced below
|
||||
Color AbilityBriefColor = Color.Lerp(Color.White, Main.DiscoColor, 0.3f);
|
||||
player.setBonus = this.GetLocalization("AbilityBrief").Format(AbilityBriefColor.Hex3()); // Added below
|
||||
}
|
||||
|
||||
public static void ModifySetTooltips(ModItem item, List<TooltipLine> tooltips)
|
||||
@@ -90,24 +89,22 @@ namespace CalamityMod.Items.Armor.GemTech
|
||||
|
||||
if (setBonusIndex != -1)
|
||||
{
|
||||
tooltips[setBonusIndex].Text = CalamityUtils.GetTextValueFromModItem<GemTechHeadgear>("AbilityBrief");
|
||||
tooltips[setBonusIndex].OverrideColor = Color.Lerp(Color.White, Main.DiscoColor, 0.3f);
|
||||
|
||||
if (!Main.keyState.PressingShift())
|
||||
{
|
||||
setBonusIndex++;
|
||||
TooltipLine briefDescription = new TooltipLine(item.Mod, "CalamityMod:SetBonus1", CalamityUtils.GetTextValueFromModItem<GemTechHeadgear>("AbilityDescription"));
|
||||
briefDescription.OverrideColor = Color.Lerp(Color.White, Main.DiscoColor, 0.5f);
|
||||
tooltips.Insert(setBonusIndex + 1, briefDescription);
|
||||
tooltips.Insert(setBonusIndex, briefDescription);
|
||||
|
||||
TooltipLine itemDisplay = new TooltipLine(item.Mod, "CalamityMod:ExpandedDisplay", CalamityUtils.GetTextValue("Misc.ShiftToExpand"));
|
||||
itemDisplay.OverrideColor = new Color(190, 190, 190);
|
||||
tooltips.Add(itemDisplay);
|
||||
setBonusIndex++;
|
||||
TooltipLine holdShiftIndicator = new TooltipLine(item.Mod, IHoldShiftTooltipItem.ExtensionIndicatorTooltipID, CalamityUtils.GetTextValue("Misc.ShiftToExpand"));
|
||||
holdShiftIndicator.OverrideColor = IHoldShiftTooltipItem.DefaultExtensionIndicatorColor;
|
||||
tooltips.Insert(setBonusIndex, holdShiftIndicator);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
setBonusIndex++;
|
||||
TooltipLine largerDescription = new TooltipLine(item.Mod, "CalamityMod:SetBonus1", CalamityUtils.GetTextFromModItem<GemTechHeadgear>("GeneralGemInfo").Format(GemBreakDamageLowerBound, GemDamage, GemRegenTime / 60));
|
||||
TooltipLine largerDescription = new TooltipLine(item.Mod, "CalamityMod:SetBonus1", CalamityUtils.GetTextFromModItem<GemTechHeadgear>("GeneralGemInfo").Format(GemBreakDamageLowerBound, GemDamage, GemRegenTime.FramesToSeconds()));
|
||||
largerDescription.OverrideColor = Color.Lerp(Color.White, Main.DiscoColor, 0.5f);
|
||||
tooltips.Insert(setBonusIndex, largerDescription);
|
||||
|
||||
@@ -137,15 +134,12 @@ namespace CalamityMod.Items.Armor.GemTech
|
||||
tooltips.Insert(setBonusIndex, purpleGemTooltip);
|
||||
|
||||
setBonusIndex++;
|
||||
string pinkLifeRegenString = (0.5f * BaseGemLifeRegenBoost).ToString("n1");
|
||||
TooltipLine pinkGemTooltip = new TooltipLine(item.Mod, "CalamityMod:SetBonus7", CalamityUtils.GetTextFromModItem<GemTechHeadgear>("PinkGemInfo").Format(BaseGemDefenseBoost, pinkLifeRegenString));
|
||||
TooltipLine pinkGemTooltip = new TooltipLine(item.Mod, "CalamityMod:SetBonus7", CalamityUtils.GetTextFromModItem<GemTechHeadgear>("PinkGemInfo").Format(BaseGemDefenseBoost, BaseGemLifeRegenBoost.ToRegenPerSecond()));
|
||||
pinkGemTooltip.OverrideColor = new Color(255, 115, 206);
|
||||
tooltips.Insert(setBonusIndex, pinkGemTooltip);
|
||||
|
||||
setBonusIndex++;
|
||||
string baseLifeRegenString = (0.5f * AllGemsWeaponUseLifeRegenBoost).ToString("n1");
|
||||
string multiclassLifeRegenString = (0.5f * AllGemsMultiWeaponUseLifeRegenBoost).ToString("n1");
|
||||
TooltipLine liferegenTooltip = new TooltipLine(item.Mod, "CalamityMod:SetBonus8", CalamityUtils.GetTextFromModItem<GemTechHeadgear>("GemBonusInfo").Format(baseLifeRegenString, AllGemsLifeRegenBoostTime / 60, multiclassLifeRegenString, AllGemsMultiWeaponLifeRegenBoostTime / 60f));
|
||||
TooltipLine liferegenTooltip = new TooltipLine(item.Mod, "CalamityMod:SetBonus8", CalamityUtils.GetTextFromModItem<GemTechHeadgear>("GemBonusInfo").Format(AllGemsWeaponUseLifeRegenBoost.ToRegenPerSecond(), AllGemsLifeRegenBoostTime.FramesToSeconds(), AllGemsMultiWeaponUseLifeRegenBoost.ToRegenPerSecond(), AllGemsMultiWeaponLifeRegenBoostTime.FramesToSeconds()));
|
||||
liferegenTooltip.OverrideColor = new Color(230, 230, 230);
|
||||
tooltips.Insert(setBonusIndex, liferegenTooltip);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.GodSlayer
|
||||
@@ -11,24 +12,31 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
public class GodSlayerChestplate : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
public const int DashIFrames = 12;
|
||||
|
||||
public static float DamageBoost = 0.15f;
|
||||
public static int CritBoost = 11;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), CritBoost);
|
||||
|
||||
// Common Set Bonus
|
||||
public static int DashCooldown = CalamityUtils.SecondsToFrames(45);
|
||||
public static int DashDamage = 3000;
|
||||
public static float DashKnockback = 15f;
|
||||
public static int DashIFrames = 12;
|
||||
public static int DashGodSlayerInfernoDuration = CalamityUtils.SecondsToFrames(5);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.defense = 41;
|
||||
Item.defense = 40;
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
player.thorns += 0.5f;
|
||||
player.statLifeMax2 += 50;
|
||||
player.GetDamage<GenericDamageClass>() += 0.11f;
|
||||
player.GetCritChance<GenericDamageClass>() += 8;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -4,6 +4,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.GodSlayer
|
||||
@@ -13,35 +14,38 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
public class GodSlayerHeadMelee : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float MeleeDamageBoost = 0.1f;
|
||||
public static int MeleeCritBoost = 5;
|
||||
public static float MeleeSpeedBoost = 0.2f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MeleeDamageBoost.ToPercent(), MeleeCritBoost, MeleeSpeedBoost.ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static int SetBonusAggroBoost = 1000;
|
||||
public static int SetBonusHurtDamageThreshold = 80;
|
||||
public static int DartDamage => CalamityUtils.ScaleWithDifficulty(350);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.defense = 48; //96
|
||||
Item.defense = 50; // 120
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<GodSlayerChestplate>() && legs.type == ModContent.ItemType<GodSlayerLeggings>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<GodSlayerChestplate>() && legs.type == ModContent.ItemType<GodSlayerLeggings>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawShadow = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadow = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
player.GetAttackSpeed<MeleeDamageClass>() += 0.2f;
|
||||
modPlayer.godSlayer = true;
|
||||
modPlayer.godSlayerDamage = true;
|
||||
var hotkey = CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString();
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextFromModItem<GodSlayerChestplate>("CommonSetBonus").Format(hotkey, GodslayerArmorDash.GodslayerCooldown);
|
||||
player.thorns += 2.5f;
|
||||
player.aggro += 1000;
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusHurtDamageThreshold, hotkey, GodSlayerChestplate.DashCooldown.FramesToSeconds());
|
||||
player.aggro += SetBonusAggroBoost;
|
||||
|
||||
if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID))
|
||||
{
|
||||
@@ -52,8 +56,9 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<MeleeDamageClass>() += 0.14f;
|
||||
player.GetCritChance<MeleeDamageClass>() += 7;
|
||||
player.GetDamage<MeleeDamageClass>() += MeleeDamageBoost;
|
||||
player.GetCritChance<MeleeDamageClass>() += MeleeCritBoost;
|
||||
player.GetAttackSpeed<MeleeDamageClass>() += MeleeSpeedBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -4,6 +4,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.GodSlayer
|
||||
@@ -13,24 +14,28 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
public class GodSlayerHeadRanged : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float RangedDamageBoost = 0.1f;
|
||||
public static int RangedCritBoost = 12;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
|
||||
|
||||
// Set Bonus
|
||||
public static int ShrapnelRoundCooldown = CalamityUtils.SecondsToFrames(2.5f);
|
||||
public static double ShrapnelRoundDamageRatio = 1D;
|
||||
public static int ShrapnelRoundDamageSoftcap = 800;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.defense = 35; //96
|
||||
Item.defense = 35; // 105
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<GodSlayerChestplate>() && legs.type == ModContent.ItemType<GodSlayerLeggings>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<GodSlayerChestplate>() && legs.type == ModContent.ItemType<GodSlayerLeggings>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawShadow = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadow = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
@@ -38,7 +43,7 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
modPlayer.godSlayer = true;
|
||||
modPlayer.godSlayerRanged = true;
|
||||
var hotkey = CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString();
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextFromModItem<GodSlayerChestplate>("CommonSetBonus").Format(hotkey, GodslayerArmorDash.GodslayerCooldown);
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(ShrapnelRoundCooldown.FramesToSeconds(), hotkey, GodSlayerChestplate.DashCooldown.FramesToSeconds());
|
||||
|
||||
if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID))
|
||||
{
|
||||
@@ -49,8 +54,8 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<RangedDamageClass>() += 0.14f;
|
||||
player.GetCritChance<RangedDamageClass>() += 14;
|
||||
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
|
||||
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -4,6 +4,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.GodSlayer
|
||||
@@ -13,34 +14,42 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
public class GodSlayerHeadRogue : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float RogueDamageBoost = 0.1f;
|
||||
public static int RogueCritBoost = 12;
|
||||
public static float MoveSpeedBoost = 0.05f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), RogueCritBoost, MoveSpeedBoost.ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static float SetBonusRogueStealth = 1.2f;
|
||||
public static float RogueDamageBoostAtFullHealth = 0.1f;
|
||||
public static int RogueCritBoostAtFullHealth = 10; // NOTE: Tooltip shares this number with damage % as they're equal
|
||||
public static float RogueVelocityBoostAtFullHealth = 0.1f; // NOTE: Tooltip shares this number with damage % as they're equal
|
||||
public static int SetBonusHurtDamageThreshold = 80;
|
||||
public static int ExtraIFrames = 30;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.defense = 29; //96
|
||||
Item.defense = 30; // 100
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<GodSlayerChestplate>() && legs.type == ModContent.ItemType<GodSlayerLeggings>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<GodSlayerChestplate>() && legs.type == ModContent.ItemType<GodSlayerLeggings>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawShadow = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadow = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.godSlayer = true;
|
||||
modPlayer.godSlayerThrowing = true;
|
||||
modPlayer.rogueStealthMax += 1.2f;
|
||||
modPlayer.rogueStealthMax += SetBonusRogueStealth;
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
var hotkey = CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString();
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextFromModItem<GodSlayerChestplate>("CommonSetBonus").Format(hotkey, GodslayerArmorDash.GodslayerCooldown);
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), RogueDamageBoostAtFullHealth.ToPercent(), SetBonusHurtDamageThreshold, hotkey, GodSlayerChestplate.DashCooldown.FramesToSeconds());
|
||||
|
||||
if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID))
|
||||
{
|
||||
@@ -51,9 +60,9 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.14f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 14;
|
||||
player.moveSpeed += 0.05f;
|
||||
player.GetDamage<ThrowingDamageClass>() += RogueDamageBoost;
|
||||
player.GetCritChance<ThrowingDamageClass>() += RogueCritBoost;
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.GodSlayer
|
||||
@@ -10,20 +11,26 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
public class GodSlayerLeggings : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float DamageBoost = 0.11f;
|
||||
public static int CritBoost = 11; // NOTE: Tooltip shares this number with damage % as they're equal
|
||||
public static float MoveSpeedBoost = 0.1f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), MoveSpeedBoost.ToPercent());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.defense = 35;
|
||||
Item.defense = 30;
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.moveSpeed += 0.1f;
|
||||
player.GetDamage<GenericDamageClass>() += 0.11f;
|
||||
player.GetCritChance<GenericDamageClass>() += 11;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -17,6 +17,8 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
public static float DamageBoost = 0.13f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent());
|
||||
|
||||
// Common Set Bonus
|
||||
public static int BlazeDamage => CalamityUtils.ScaleWithDifficulty(115);
|
||||
public static float InfernoHealthThreshold = 0.5f;
|
||||
public static int InfernoHitRate = 30;
|
||||
public static int InfernoDamage = 50;
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextFromModItem<HydrothermicArmor>("CommonSetBonus").Format(HydrothermicArmor.InfernoHealthThreshold.ToPercent());
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(HydrothermicArmor.InfernoHealthThreshold.ToPercent());
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ataxiaBlaze = true;
|
||||
modPlayer.ataxiaMage = true;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus") + "\n" + CalamityUtils.GetTextFromModItem<HydrothermicArmor>("CommonSetBonus").Format(HydrothermicArmor.InfernoHealthThreshold.ToPercent());
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(HydrothermicArmor.InfernoHealthThreshold.ToPercent());
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ataxiaBlaze = true;
|
||||
modPlayer.ataxiaGeyser = true;
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(FlareCooldown.FramesToSeconds()) + "\n" + CalamityUtils.GetTextFromModItem<HydrothermicArmor>("CommonSetBonus").Format(HydrothermicArmor.InfernoHealthThreshold.ToPercent());
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(FlareCooldown.FramesToSeconds(), HydrothermicArmor.InfernoHealthThreshold.ToPercent());
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ataxiaBlaze = true;
|
||||
modPlayer.ataxiaBolt = true;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), VolleyCooldown.FramesToSeconds()) + "\n" + CalamityUtils.GetTextFromModItem<HydrothermicArmor>("CommonSetBonus").Format(HydrothermicArmor.InfernoHealthThreshold.ToPercent());
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), VolleyCooldown.FramesToSeconds(), HydrothermicArmor.InfernoHealthThreshold.ToPercent());
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ataxiaBlaze = true;
|
||||
modPlayer.ataxiaVolley = true;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost, SetBonusSummonDamageBoost.ToPercent()) + "\n" + CalamityUtils.GetTextFromModItem<HydrothermicArmor>("CommonSetBonus").Format(HydrothermicArmor.InfernoHealthThreshold.ToPercent());
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost, SetBonusSummonDamageBoost.ToPercent(), HydrothermicArmor.InfernoHealthThreshold.ToPercent());
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ataxiaBlaze = true;
|
||||
modPlayer.chaosSpirit = true;
|
||||
|
||||
@@ -4,6 +4,7 @@ using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Rarities;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
@@ -12,6 +13,11 @@ namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
public class OmegaBlueChestplate : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float DamageBoost = 0.18f;
|
||||
public static int CritBoost = 12;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), CritBoost);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
if (Main.dedServ)
|
||||
@@ -35,8 +41,8 @@ namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
player.GetDamage<GenericDamageClass>() += 0.12f;
|
||||
player.GetCritChance<GenericDamageClass>() += 8;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
modPlayer.omegaBlueChestplate = true;
|
||||
modPlayer.noLifeRegen = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
@@ -7,6 +8,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
@@ -19,6 +21,18 @@ namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
|
||||
public static readonly SoundStyle ActivationSound = new("CalamityMod/Sounds/Custom/AbilitySounds/OmegaBlueAbility");
|
||||
|
||||
public static float DamageBoost = 0.12f;
|
||||
public static int CritBoost = 14;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), CritBoost);
|
||||
|
||||
// Set Bonus
|
||||
public static int SetBonusMinionSlotBoost = 2;
|
||||
public static int TentacleDamage = 350;
|
||||
public static float MadnessDamageBoost = 0.1f;
|
||||
public static int MadnessCritBoost = 10;
|
||||
public static int MadnessDuration = CalamityUtils.SecondsToFrames(5);
|
||||
public static int MadnessCooldown = CalamityUtils.SecondsToFrames(25);
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
@@ -48,14 +62,11 @@ namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
{
|
||||
player.ignoreWater = true;
|
||||
|
||||
player.GetDamage<GenericDamageClass>() += 0.12f;
|
||||
player.GetCritChance<GenericDamageClass>() += 8;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<OmegaBlueChestplate>() && legs.type == ModContent.ItemType<OmegaBlueTentacles>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<OmegaBlueChestplate>() && legs.type == ModContent.ItemType<OmegaBlueTentacles>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
@@ -66,10 +77,11 @@ namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(CalamityUtils.GetArmorSetBonusKey());
|
||||
Color AbilityBriefColor = Color.Lerp(new Color(255, 229, 61), new Color(110, 173, 237), 0.5f + 0.5f * MathF.Sin(Main.GlobalTimeWrappedHourly * 3f));
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost, AbilityBriefColor.Hex3(), CalamityUtils.GetArmorSetBonusKey(), MadnessDuration.FramesToSeconds(), MadnessDamageBoost.ToPercent(), MadnessCooldown.FramesToSeconds());
|
||||
|
||||
var mp = player.Calamity();
|
||||
player.maxMinions += 2;
|
||||
player.maxMinions += SetBonusMinionSlotBoost;
|
||||
mp.wearingRogueArmor = true;
|
||||
mp.omegaBlueSet = true;
|
||||
mp.WearingPostMLSummonerSet = true;
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Rarities;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
@@ -12,6 +13,12 @@ namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
public class OmegaBlueTentacles : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float DamageBoost = 0.16f;
|
||||
public static int CritBoost = 12;
|
||||
public static float MoveSpeedBoost = 0.12f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), CritBoost, MoveSpeedBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
if (Main.dedServ)
|
||||
@@ -33,9 +40,9 @@ namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<GenericDamageClass>() += 0.12f;
|
||||
player.GetCritChance<GenericDamageClass>() += 12;
|
||||
player.moveSpeed += 0.12f;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.PlagueReaper
|
||||
@@ -16,63 +17,55 @@ namespace CalamityMod.Items.Armor.PlagueReaper
|
||||
public new string LocalizationCategory => "Items.Armor.Hardmode";
|
||||
public static readonly SoundStyle ActivationSound = new("CalamityMod/Sounds/Custom/AbilitySounds/PlagueReaperAbility");
|
||||
|
||||
public static float RangedDamageBoost = 0.1f;
|
||||
public static int RangedCritBoost = 8;
|
||||
// NOTE: Ammo conservation is a bool so the number is manually added in the tooltip and equip
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
|
||||
|
||||
// Set Bonus
|
||||
public static float SetBonusFlightTimeBoost = 0.05f;
|
||||
public static float SetBonusPlaguedRangedDamageMult = 1.1f;
|
||||
public static float BlackoutRangedDamageBoost = 0.6f;
|
||||
public static int BlackoutRangedCritBoost = 20;
|
||||
public static int BlackoutDuration = CalamityUtils.SecondsToFrames(5);
|
||||
public static int BlackoutCooldown = CalamityUtils.SecondsToFrames(25);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
|
||||
Item.rare = ItemRarityID.Yellow;
|
||||
Item.defense = 11;
|
||||
Item.defense = 11; // 44
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
return body.type == ModContent.ItemType<PlagueReaperVest>() && legs.type == ModContent.ItemType<PlagueReaperStriders>();
|
||||
}
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<PlagueReaperVest>() && legs.type == ModContent.ItemType<PlagueReaperStriders>();
|
||||
|
||||
public override void ArmorSetShadows(Player player)
|
||||
{
|
||||
player.armorEffectDrawOutlines = true;
|
||||
}
|
||||
public override void ArmorSetShadows(Player player) => player.armorEffectDrawOutlines = true;
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(CalamityUtils.GetArmorSetBonusKey());
|
||||
Color AbilityBriefColor = Color.Lerp(new Color(79, 100, 95), new Color(109, 209, 130), 0.5f + 0.5f * MathF.Sin(Main.GlobalTimeWrappedHourly * 3f));
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusFlightTimeBoost.ToPercent(), SetBonusPlaguedRangedDamageMult, AbilityBriefColor.Hex3(), CalamityUtils.GetArmorSetBonusKey(), BlackoutRangedDamageBoost.ToPercent(), BlackoutRangedCritBoost, BlackoutDuration.FramesToSeconds(), BlackoutCooldown.FramesToSeconds());
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.plagueReaper = true;
|
||||
player.ammoCost75 = true;
|
||||
|
||||
var hasPlagueBlackoutCD = modPlayer.cooldowns.TryGetValue(PlagueBlackout.ID, out var cd);
|
||||
if (hasPlagueBlackoutCD && cd.timeLeft > 1500)
|
||||
if (hasPlagueBlackoutCD && cd.timeLeft > BlackoutCooldown)
|
||||
{
|
||||
player.blind = true;
|
||||
player.headcovered = true;
|
||||
player.blackout = true;
|
||||
player.GetDamage<RangedDamageClass>() += 0.6f; //60% ranged dmg and 20% crit
|
||||
player.GetCritChance<RangedDamageClass>() += 20;
|
||||
}
|
||||
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
if (player.immune)
|
||||
{
|
||||
if (player.miscCounter % 10 == 0)
|
||||
{
|
||||
var damage = (int)player.GetTotalDamage<RangedDamageClass>().ApplyTo(40);
|
||||
|
||||
var cinder = CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<TheSyringeCinder>(), damage, 4f, player.whoAmI);
|
||||
if (cinder.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
cinder.DamageType = DamageClass.Generic;
|
||||
}
|
||||
}
|
||||
player.GetDamage<RangedDamageClass>() += BlackoutRangedDamageBoost;
|
||||
player.GetCritChance<RangedDamageClass>() += BlackoutRangedCritBoost;
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<RangedDamageClass>() += 0.1f;
|
||||
player.GetCritChance<RangedDamageClass>() += 8;
|
||||
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
|
||||
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
|
||||
player.ammoCost75 = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.PlagueReaper
|
||||
@@ -9,6 +10,11 @@ namespace CalamityMod.Items.Armor.PlagueReaper
|
||||
public class PlagueReaperStriders : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.Hardmode";
|
||||
|
||||
public static int RangedCritBoost = 8;
|
||||
public static float MoveSpeedBoost = 0.15f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedCritBoost, MoveSpeedBoost.ToPercent());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
@@ -20,8 +26,8 @@ namespace CalamityMod.Items.Armor.PlagueReaper
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetCritChance<RangedDamageClass>() += 3;
|
||||
player.moveSpeed += 0.15f;
|
||||
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||