Merge branch '1.4.4' into MegalodonLine
This commit is contained in:
commit
5aa41eda9a
38 files changed
+310
-103
No files matched your search
@@ -31,6 +31,7 @@ namespace CalamityMod.BiomeManagers
|
||||
if (!CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
bool acidRain = AcidRainEvent.AcidRainEventIsOngoing;
|
||||
bool normalRain = Main.cloudAlpha > 0f;
|
||||
|
||||
// Acid Rain themes
|
||||
if (acidRain)
|
||||
@@ -42,9 +43,18 @@ namespace CalamityMod.BiomeManagers
|
||||
|
||||
// Regular Sulphur Sea themes, when Acid Rain is not occurring
|
||||
else
|
||||
music = !Main.dayTime
|
||||
? CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaNight") ?? MusicID.Desert // Nighttime
|
||||
: CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaDay") ?? MusicID.Desert; // Daytime
|
||||
{
|
||||
if (normalRain)
|
||||
{
|
||||
music = CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaRain") ?? MusicID.Desert; // Normal Rain
|
||||
}
|
||||
else
|
||||
{
|
||||
music = !Main.dayTime
|
||||
? CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaNight") ?? MusicID.Desert // Nighttime
|
||||
: CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaDay") ?? MusicID.Desert; // Daytime
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return music;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
@@ -13,6 +14,11 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare)
|
||||
{
|
||||
tip = base.Description.Format((AbyssalDivingSuit.PlatesAllDamageReduction - Main.player[Main.myPlayer].Calamity().abyssalDivingSuitPlateHits * AbyssalDivingSuit.PlatesHitDecay).ToPercent());
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().abyssalDivingSuitPlates = true;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class AquaticHeartWaterSpeed : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(AquaticHeart.WaterSpeedBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class CoralSymbiosis : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(CoralSpout.SymbiosisDamageBuff);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
|
||||
@@ -3,12 +3,15 @@ using CalamityMod.Items.Accessories;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class Encased : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(PermafrostsConcoction.EncasedDefenseBoost, PermafrostsConcoction.EncasedAllDamageReduction.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class HallowedRuneDefense : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(HallowedRune.DefenseBoost, HallowedRune.DamageReductionBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
@@ -15,8 +19,8 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.statDefense += 8;
|
||||
player.endurance += 0.04f; // TODO -- is this applied too late to be affected by the DR softcap?
|
||||
player.statDefense += HallowedRune.DefenseBoost;
|
||||
player.endurance += HallowedRune.DamageReductionBoost; // TODO -- is this applied too late to be affected by the DR softcap?
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class HallowedRunePower : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(HallowedRune.SummonDamageBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
@@ -16,7 +20,7 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().hallowedPower = true;
|
||||
player.GetDamage<SummonDamageClass>() += 0.1f;
|
||||
player.GetDamage<SummonDamageClass>() += HallowedRune.SummonDamageBoost;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class IceShieldBuff : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(AquaticHeart.IceShieldAllDamageReduction.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class PhantomicEmpowerment : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(PhantomicArtifact.SummonDamageBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
@@ -15,7 +19,7 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.GetDamage<SummonDamageClass>() += 0.1f;
|
||||
player.GetDamage<SummonDamageClass>() += PhantomicArtifact.SummonDamageBoost;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class PhantomicShield : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(PhantomicArtifact.DefenseBoost, PhantomicArtifact.DamageReductionBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
@@ -15,8 +19,8 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.endurance += 0.05f; // TODO -- is this applied too late to be affected by the DR softcap?
|
||||
player.statDefense += 10;
|
||||
player.endurance += PhantomicArtifact.DamageReductionBoost; // TODO -- is this applied too late to be affected by the DR softcap?
|
||||
player.statDefense += PhantomicArtifact.DefenseBoost;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Armor.Reaver;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class ReaverRage : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(ReaverHeadTank.ReaverRageDefenseBoost, ReaverHeadTank.ReaverRageDamageBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class SpiritDefense : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(SpiritGlyph.DefenseBoost, SpiritGlyph.DamageReductionBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
@@ -15,8 +19,8 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.statDefense += 6;
|
||||
player.endurance += 0.03f; // TODO -- is this applied too late to be affected by the DR softcap?
|
||||
player.statDefense += SpiritGlyph.DefenseBoost;
|
||||
player.endurance += SpiritGlyph.DamageReductionBoost; // TODO -- is this applied too late to be affected by the DR softcap?
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class SpiritPower : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(SpiritGlyph.SummonDamageBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
@@ -15,7 +19,7 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.GetDamage<SummonDamageClass>() += 0.1f;
|
||||
player.GetDamage<SummonDamageClass>() += SpiritGlyph.SummonDamageBoost;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,14 +16,20 @@ using CalamityMod.Events;
|
||||
using CalamityMod.FluidSimulation;
|
||||
using CalamityMod.Items;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Accessories.Vanity;
|
||||
using CalamityMod.Items.Armor;
|
||||
using CalamityMod.Items.Armor.Auric;
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.Brimflame;
|
||||
using CalamityMod.Items.Armor.Daedalus;
|
||||
using CalamityMod.Items.Armor.Demonshade;
|
||||
using CalamityMod.Items.Armor.Empyrean;
|
||||
using CalamityMod.Items.Armor.LunicCorps;
|
||||
using CalamityMod.Items.Armor.OmegaBlue;
|
||||
using CalamityMod.Items.Armor.PlagueReaper;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
using CalamityMod.Items.Armor.SnowRuffian;
|
||||
using CalamityMod.Items.Armor.Victide;
|
||||
using CalamityMod.Items.Dyes;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.Mounts.Minecarts;
|
||||
@@ -603,6 +609,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool holyMinions = false;
|
||||
public bool alchFlask = false;
|
||||
public bool toxicHeart = false;
|
||||
public bool toxicHeartVisuals = false;
|
||||
public bool abaddon = false;
|
||||
|
||||
public bool aeroStone = false;
|
||||
@@ -1815,6 +1822,7 @@ namespace CalamityMod.CalPlayer
|
||||
holyMinions = false;
|
||||
alchFlask = false;
|
||||
toxicHeart = false;
|
||||
toxicHeartVisuals = false;
|
||||
abaddon = false;
|
||||
aeroStone = false;
|
||||
lifejelly = false;
|
||||
@@ -3878,7 +3886,7 @@ namespace CalamityMod.CalPlayer
|
||||
(shadowSpeed ? 0.5f : 0f) +
|
||||
(stressPills ? 0.05f : 0f) +
|
||||
((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) +
|
||||
(aquaticHeartWaterBuff ? 0.15f : 0f) +
|
||||
(aquaticHeartWaterBuff ? AquaticHeart.WaterSpeedBoost : 0f) +
|
||||
((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 0.15f : 0f) +
|
||||
(dragonScales ? 0.1f : 0f) +
|
||||
(kamiBoost ? YanmeisKnife.RunAccelerationBoost : 0f) +
|
||||
@@ -3895,7 +3903,7 @@ namespace CalamityMod.CalPlayer
|
||||
(shadowSpeed ? 0.5f : 0f) +
|
||||
(stressPills ? 0.05f : 0f) +
|
||||
((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) +
|
||||
(aquaticHeartWaterBuff ? 0.15f : 0f) +
|
||||
(aquaticHeartWaterBuff ? AquaticHeart.WaterSpeedBoost : 0f) +
|
||||
((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 0.15f : 0f) +
|
||||
(dragonScales ? 0.1f : 0f) +
|
||||
(kamiBoost ? YanmeisKnife.RunSpeedBoost : 0f) +
|
||||
@@ -4299,6 +4307,66 @@ namespace CalamityMod.CalPlayer
|
||||
#region Frame Effects
|
||||
public override void FrameEffects()
|
||||
{
|
||||
// Mannequin frame effects
|
||||
// These "players" never load Calamity's equippable bools so they need to be manually loaded
|
||||
if (Player.isDisplayDollOrInanimate)
|
||||
{
|
||||
// Body
|
||||
if (Player.armor[1].type == ModContent.ItemType<AuricTeslaBodyArmor>())
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "AuricTeslaBodyArmor", EquipType.Body);
|
||||
else if (Player.armor[1].type == ModContent.ItemType<DaedalusBreastplate>())
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "DaedalusBreastplate", EquipType.Body);
|
||||
else if (Player.armor[1].type == ModContent.ItemType<EmpyreanCloak>())
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "EmpyreanCloak", EquipType.Body);
|
||||
else if (Player.armor[1].type == ModContent.ItemType<SnowRuffianChestplate>())
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "SnowRuffianChestplate", EquipType.Body);
|
||||
else if (Player.armor[1].type == ModContent.ItemType<VictideBreastplate>())
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "VictideBreastplate", EquipType.Body);
|
||||
|
||||
// Legs
|
||||
if (Player.armor[2].type == ModContent.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>())
|
||||
snowRuffianSet = true;
|
||||
|
||||
// Accessories
|
||||
for (int i = 3; i < 8; i++)
|
||||
{
|
||||
Item vanity = Player.armor[i];
|
||||
|
||||
if (vanity.type == ModContent.ItemType<AbandonedWulfrumHelmet>())
|
||||
Player.GetModPlayer<WulfrumTransformationPlayer>().transformationActive = true;
|
||||
if (vanity.type == ModContent.ItemType<AbyssalDivingSuit>())
|
||||
abyssalDivingSuitForce = true;
|
||||
if (vanity.type == ModContent.ItemType<AquaticHeart>())
|
||||
aquaticHeartForce = true;
|
||||
if (vanity.type == ModContent.ItemType<CrystalHeartVodka>())
|
||||
Player.GetModPlayer<CrystalHeartVodkaPlayer>().vanityEquipped = true;
|
||||
if (vanity.type == ModContent.ItemType<GhostBracelet>())
|
||||
ghostBracelet = true;
|
||||
if (vanity.type == ModContent.ItemType<HapuFruit>())
|
||||
Player.GetModPlayer<HapuFruitPlayer>().vanityEquipped = true;
|
||||
if (vanity.type == ModContent.ItemType<OracleHeadphones>())
|
||||
Player.GetModPlayer<OracleHeadphonesPlayer>().vanityEquipped = true;
|
||||
if (vanity.type == ModContent.ItemType<Popo>())
|
||||
snowmanForce = true;
|
||||
if (vanity.type == ModContent.ItemType<ProfanedSoulCrystal>())
|
||||
profanedCrystalForce = true;
|
||||
if (vanity.type == ModContent.ItemType<PunchCard>())
|
||||
punchCard = true;
|
||||
if (vanity.type == ModContent.ItemType<SharkyPlush>())
|
||||
Player.GetModPlayer<SharkyPlushPlayer>().vanityEquipped = true;
|
||||
if (vanity.type == ModContent.ItemType<XyksBlessingBlue>())
|
||||
Player.GetModPlayer<XyksBlessingBluePlayer>().vanityEquipped = true;
|
||||
if (vanity.type == ModContent.ItemType<XyksBlessingOrange>())
|
||||
Player.GetModPlayer<XyksBlessingOrangePlayer>().vanityEquipped = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (Player.Calamity().andromedaState == AndromedaPlayerState.LargeRobot ||
|
||||
Player.Calamity().andromedaState == AndromedaPlayerState.SpecialAttack)
|
||||
{
|
||||
|
||||
@@ -810,13 +810,13 @@ namespace CalamityMod.CalPlayer
|
||||
contactDamageReduction += 0.15;
|
||||
|
||||
if (abyssalDivingSuitPlates)
|
||||
contactDamageReduction += 0.15 - abyssalDivingSuitPlateHits * 0.03;
|
||||
contactDamageReduction += AbyssalDivingSuit.PlatesAllDamageReduction - abyssalDivingSuitPlateHits * AbyssalDivingSuit.PlatesHitDecay;
|
||||
|
||||
if (aquaticHeartIce)
|
||||
contactDamageReduction += 0.2;
|
||||
contactDamageReduction += AquaticHeart.IceShieldAllDamageReduction;
|
||||
|
||||
if (encased)
|
||||
contactDamageReduction += 0.3;
|
||||
contactDamageReduction += PermafrostsConcoction.EncasedAllDamageReduction;
|
||||
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<EnergyShell>()] > 0 && Player.ActiveItem().type == ModContent.ItemType<LionHeart>())
|
||||
contactDamageReduction += 0.5;
|
||||
@@ -1047,13 +1047,13 @@ namespace CalamityMod.CalPlayer
|
||||
projectileDamageReduction += 0.15;
|
||||
|
||||
if (abyssalDivingSuitPlates)
|
||||
projectileDamageReduction += 0.15 - abyssalDivingSuitPlateHits * 0.03;
|
||||
projectileDamageReduction += AbyssalDivingSuit.PlatesAllDamageReduction - abyssalDivingSuitPlateHits * AbyssalDivingSuit.PlatesHitDecay;
|
||||
|
||||
if (aquaticHeartIce)
|
||||
projectileDamageReduction += 0.2;
|
||||
projectileDamageReduction += AquaticHeart.IceShieldAllDamageReduction;
|
||||
|
||||
if (encased)
|
||||
projectileDamageReduction += 0.3;
|
||||
projectileDamageReduction += PermafrostsConcoction.EncasedAllDamageReduction;
|
||||
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<EnergyShell>()] > 0 && Player.ActiveItem().type == ModContent.ItemType<LionHeart>())
|
||||
projectileDamageReduction += 0.5;
|
||||
|
||||
@@ -644,7 +644,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeRegen += 3;
|
||||
|
||||
if (sRegen)
|
||||
Player.lifeRegen += 2;
|
||||
Player.lifeRegen += SpiritGlyph.RegenBoost;
|
||||
|
||||
if (PinkJellyRegen)
|
||||
Player.lifeRegen += LifeJelly.AuraRegenBoost;
|
||||
@@ -656,7 +656,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeRegen += TheAbsorber.AuraRegenBoost;
|
||||
|
||||
if (hallowedRegen)
|
||||
Player.lifeRegen += 3;
|
||||
Player.lifeRegen += HallowedRune.RegenBoost;
|
||||
|
||||
if (affliction || afflicted)
|
||||
Player.lifeRegen += 1;
|
||||
@@ -680,7 +680,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (phantomicHeartRegen <= 720 && phantomicHeartRegen >= 600)
|
||||
{
|
||||
Player.lifeRegen += 2;
|
||||
Player.lifeRegen += PhantomicArtifact.RegenBoost;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Dust regen = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Blood, 0f, 0f, 200, new Color(99, 54, 84), 2f);
|
||||
@@ -900,16 +900,27 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (toxicHeart) // Since it needs to know your life regen, it must be placed here
|
||||
{
|
||||
float minLifeRegen = -20; // Fastest rate
|
||||
float maxLifeRegen = 15; // Slowest rate
|
||||
int auraDamage = (int)Player.GetBestClassDamage().ApplyTo(200);
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<ToxicHeart>()));
|
||||
pulseRate = Utils.Remap(Player.lifeRegen, -30, 10, 20, 1, true);
|
||||
float lifeRegenRate = Utils.Remap(Player.lifeRegen, minLifeRegen, maxLifeRegen, 20, 1, true);
|
||||
|
||||
if (pulseRate < lifeRegenRate) // Jump to fastest pulse rate and slowly slow down if life regen increases
|
||||
pulseRate = lifeRegenRate;
|
||||
else
|
||||
pulseRate = MathHelper.Lerp(pulseRate, lifeRegenRate, 0.002f);
|
||||
|
||||
if (pulseCounter >= 420)
|
||||
{
|
||||
Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<PlaguePulse>(), auraDamage, 0f, Player.whoAmI, 0, 0, 0);
|
||||
pulseCounter = 0;
|
||||
float soundVolume = Utils.Remap(Player.lifeRegen, -30, 10, 1f, 0.3f, true);
|
||||
SoundStyle heartbeat = new("CalamityMod/Sounds/Item/Heartbeat");
|
||||
SoundEngine.PlaySound(heartbeat with { Volume = soundVolume, PitchVariance = 0.2f }, Player.Center);
|
||||
if (toxicHeartVisuals)
|
||||
{
|
||||
float soundVolume = Utils.Remap(Player.lifeRegen, minLifeRegen, maxLifeRegen, 1f, 0.3f, true);
|
||||
SoundStyle heartbeat = new("CalamityMod/Sounds/Item/Heartbeat");
|
||||
SoundEngine.PlaySound(heartbeat with { Volume = soundVolume, PitchVariance = 0.2f }, Player.Center);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@ using CalamityMod.Items.Armor.Hydrothermic;
|
||||
using CalamityMod.Items.Armor.LunicCorps;
|
||||
using CalamityMod.Items.Armor.OmegaBlue;
|
||||
using CalamityMod.Items.Armor.Prismatic;
|
||||
using CalamityMod.Items.Armor.Reaver;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
using CalamityMod.Items.Armor.Tarragon;
|
||||
using CalamityMod.Items.Armor.Wulfrum;
|
||||
@@ -2146,7 +2147,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (encased)
|
||||
{
|
||||
Player.statDefense += 30;
|
||||
Player.statDefense += PermafrostsConcoction.EncasedDefenseBoost;
|
||||
Player.frozen = true;
|
||||
Player.velocity.X = 0f;
|
||||
Player.velocity.Y = -0.4f; // Should negate gravity
|
||||
@@ -2902,14 +2903,14 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (rRage)
|
||||
{
|
||||
Player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
Player.statDefense += 5;
|
||||
Player.GetDamage<GenericDamageClass>() += ReaverHeadTank.ReaverRageDamageBoost;
|
||||
Player.statDefense += ReaverHeadTank.ReaverRageDefenseBoost;
|
||||
}
|
||||
|
||||
if (xWrath)
|
||||
{
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
Player.GetCritChance<RogueDamageClass>() += 5;
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
Player.GetCritChance<RogueDamageClass>() += 5;
|
||||
}
|
||||
|
||||
if (graxDefense)
|
||||
|
||||
@@ -10,6 +10,10 @@ namespace CalamityMod.Items.Accessories
|
||||
public class AbyssalDivingSuit : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static double PlatesAllDamageReduction = 0.15D;
|
||||
public static double PlatesHitDecay = 0.03D;
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
// All code below runs only if we're not loading on a server
|
||||
|
||||
@@ -11,6 +11,10 @@ namespace CalamityMod.Items.Accessories
|
||||
public class AquaticHeart : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static float WaterSpeedBoost = 0.15f;
|
||||
public static double IceShieldAllDamageReduction = 0.2D;
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
// All code below runs only if we're not loading on a server
|
||||
|
||||
@@ -7,6 +7,12 @@ namespace CalamityMod.Items.Accessories
|
||||
public class HallowedRune : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int RegenBoost = 3;
|
||||
public static int DefenseBoost = 8;
|
||||
public static float DamageReductionBoost = 0.04f;
|
||||
public static float SummonDamageBoost = 0.1f;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 26;
|
||||
|
||||
@@ -8,7 +8,10 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
// Boosted by Cross Necklace.
|
||||
internal static readonly int EncasedIFrames = 90;
|
||||
|
||||
|
||||
public static int EncasedDefenseBoost = 30;
|
||||
public static double EncasedAllDamageReduction = 0.3D;
|
||||
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
|
||||
@@ -15,6 +15,12 @@ namespace CalamityMod.Items.Accessories
|
||||
public class PhantomicArtifact : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int RegenBoost = 2;
|
||||
public static int DefenseBoost = 10;
|
||||
public static float DamageReductionBoost = 0.05f;
|
||||
public static float SummonDamageBoost = 0.1f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 7));
|
||||
|
||||
@@ -9,6 +9,12 @@ namespace CalamityMod.Items.Accessories
|
||||
public class SpiritGlyph : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int RegenBoost = 2;
|
||||
public static int DefenseBoost = 6;
|
||||
public static float DamageReductionBoost = 0.03f;
|
||||
public static float SummonDamageBoost = 0.1f;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 24;
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.toxicHeart = true;
|
||||
modPlayer.toxicHeartVisuals = !hideVisual;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,9 @@ namespace CalamityMod.Items.Armor.Reaver
|
||||
public new string LocalizationCategory => "Items.Armor.Hardmode";
|
||||
internal static string HealOrbEntitySourceContext => "SetBonus_Calamity_ReaverTank";
|
||||
|
||||
public static int ReaverRageDefenseBoost = 5;
|
||||
public static float ReaverRageDamageBoost = 0.1f;
|
||||
|
||||
//Defense and DR Helm
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -45,7 +48,6 @@ namespace CalamityMod.Items.Armor.Reaver
|
||||
modPlayer.reaverDefense = true;
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus");
|
||||
// Reaver Rage provides 10% damage, 5 def, and 5% melee speed.
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
|
||||
@@ -151,14 +151,16 @@ namespace CalamityMod.Items.Mounts
|
||||
if (angle > MathHelper.ToRadians(60f))
|
||||
continue;
|
||||
|
||||
canFireLasers = angle <= MathHelper.ToRadians(18f);
|
||||
if (canFireLasers && angle > MathHelper.ToRadians(18f))
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (angle < MathHelper.ToRadians(120f))
|
||||
continue;
|
||||
|
||||
canFireLasers = angle >= MathHelper.ToRadians(162f);
|
||||
if (canFireLasers && angle < MathHelper.ToRadians(162f))
|
||||
continue;
|
||||
}
|
||||
|
||||
float distance = targetDif.Length();
|
||||
@@ -166,6 +168,7 @@ namespace CalamityMod.Items.Mounts
|
||||
{
|
||||
range = distance;
|
||||
targetNPC = target.whoAmI;
|
||||
canFireLasers = (player.direction == 1 ? angle <= MathHelper.ToRadians(18f) : angle >= MathHelper.ToRadians(162f));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -651,7 +651,7 @@ AbyssalDivingSuitBuff: {
|
||||
|
||||
AbyssalDivingSuitPlates: {
|
||||
DisplayName: Abyssal Diving Suit Plates
|
||||
Description: 15% increased damage reduction
|
||||
Description: "{0}% increased damage reduction"
|
||||
}
|
||||
|
||||
AbyssalMadness: {
|
||||
@@ -695,7 +695,7 @@ AquaticHeartBuff: {
|
||||
|
||||
AquaticHeartWaterSpeed: {
|
||||
DisplayName: Ocean's Blessing
|
||||
Description: 15% increased max speed and acceleration
|
||||
Description: "{0}% increased max speed and acceleration"
|
||||
}
|
||||
|
||||
AvertorBonus: {
|
||||
@@ -741,7 +741,7 @@ ChiRegenBuff: {
|
||||
|
||||
CoralSymbiosis: {
|
||||
DisplayName: Coral Symbiosis
|
||||
Description: Coral Spout charges up faster and deals 2 extra damage
|
||||
Description: Coral Spout charges up faster and deals {0} extra damage
|
||||
}
|
||||
|
||||
CosmicFreeze: {
|
||||
@@ -766,7 +766,7 @@ EmpyreanWrath: {
|
||||
|
||||
Encased: {
|
||||
DisplayName: Encased
|
||||
Description: Increased defense by 30 and damage reduction by 30%, but...
|
||||
Description: Increased defense by {0} and damage reduction by {1}%, but...
|
||||
}
|
||||
|
||||
GraxBoost: {
|
||||
@@ -781,12 +781,12 @@ GreenJellyRegen: {
|
||||
|
||||
HallowedRuneDefense: {
|
||||
DisplayName: Hallowed Defense
|
||||
Description: Increased defense by 8 and damage reduction by 4%
|
||||
Description: Increased defense by {0} and damage reduction by {1}%
|
||||
}
|
||||
|
||||
HallowedRunePower: {
|
||||
DisplayName: Hallowed Power
|
||||
Description: 10% increased summon damage
|
||||
Description: "{0}% increased summon damage"
|
||||
}
|
||||
|
||||
HallowedRuneRegeneration: {
|
||||
@@ -801,7 +801,7 @@ Haste: {
|
||||
|
||||
IceShieldBuff: {
|
||||
DisplayName: Ice Shield
|
||||
Description: Absorbs 20% damage from the next hit you take, then shatters
|
||||
Description: Absorbs {0}% damage from the next hit you take, then shatters
|
||||
}
|
||||
|
||||
KamiBuff: {
|
||||
@@ -816,7 +816,7 @@ Mushy: {
|
||||
|
||||
PhantomicEmpowerment: {
|
||||
DisplayName: Phantomic Empowerment
|
||||
Description: 10% increased summon damage
|
||||
Description: "{0}% increased summon damage"
|
||||
}
|
||||
|
||||
PhantomicRegen: {
|
||||
@@ -828,7 +828,7 @@ PhantomicShield: {
|
||||
DisplayName: Phantomic Shield
|
||||
Description:
|
||||
'''
|
||||
Defense increased by 10 and damage reduction increased by 5%
|
||||
Defense increased by {0} and damage reduction increased by {1}%
|
||||
An ephemeral bulwark protects you
|
||||
'''
|
||||
}
|
||||
@@ -880,7 +880,7 @@ ReaverRage: {
|
||||
Description:
|
||||
'''
|
||||
Rage of the earth
|
||||
Defense increased by 5 and damage increased by 10%
|
||||
Defense increased by {0} and damage increased by {1}%
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -900,12 +900,12 @@ SilvaRevival: {
|
||||
|
||||
SpiritDefense: {
|
||||
DisplayName: Spirit Defense
|
||||
Description: Defense increased by 6 and damage reduction increased by 3%
|
||||
Description: Defense increased by {0} and damage reduction increased by {1}%
|
||||
}
|
||||
|
||||
SpiritPower: {
|
||||
DisplayName: Spirit Power
|
||||
Description: 10% increased summon damage
|
||||
Description: "{0}% increased summon damage"
|
||||
}
|
||||
|
||||
SpiritRegen: {
|
||||
|
||||
@@ -237,7 +237,7 @@ AscendantInsignia: {
|
||||
Tooltip:
|
||||
'''
|
||||
Increases wing flight time by 50%, movement and jump speed by 10%, and acceleration by 1.5x
|
||||
Pressing [KEY] will give you the power of ascension, providing infinite flight time for 4 seconds
|
||||
Pressing [KEY] grants you the power of ascension, providing infinite flight time for 4 seconds
|
||||
Ascension has a 40 second cooldown
|
||||
'''
|
||||
}
|
||||
@@ -1905,6 +1905,7 @@ ToxicHeart: {
|
||||
Your heart beats with the plague, pulsing outside of your body
|
||||
Pulse frequency scale with regen, and pulses that kill enemies pulse again to heal you
|
||||
Multiplies all sickness debuff damage by 1.5x
|
||||
Effects are transparent and silent if visibility is disabled
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace CalamityMod.MainMenu
|
||||
internal set;
|
||||
} = new();
|
||||
|
||||
public float remixLogoRotation = 0f;
|
||||
public override string DisplayName => "Calamity Style";
|
||||
|
||||
public override Asset<Texture2D> Logo => ModContent.Request<Texture2D>("CalamityMod/MainMenu/Logo");
|
||||
@@ -135,11 +136,24 @@ namespace CalamityMod.MainMenu
|
||||
Main.time = 27000;
|
||||
Main.dayTime = true;
|
||||
|
||||
// Adjust rotation based on secret seeds; only Drunk world and Remix touch this, with GFB leeching off those two
|
||||
// Standard rotation is none; Drunk world makes it spin out, so it can use the vanilla rotation due to disappearing
|
||||
// Remix makes it flip upside down, and in GFB it will spin forever
|
||||
if (WorldGen.remixWorldGen)
|
||||
{
|
||||
remixLogoRotation += MathHelper.Pi / 50f;
|
||||
if (remixLogoRotation >= MathHelper.Pi && !WorldGen.everythingWorldGen)
|
||||
remixLogoRotation = MathHelper.Pi;
|
||||
}
|
||||
else
|
||||
remixLogoRotation = 0f;
|
||||
float rotationSecretSeedAdjusted = WorldGen.remixWorldGen ? remixLogoRotation : WorldGen.drunkWorldGen ? logoRotation : 0f;
|
||||
|
||||
// Draw the logo using a different spritebatch blending setting so it doesn't have a horrible yellow glow
|
||||
Vector2 drawPos = new Vector2(Main.screenWidth / 2f, 100f);
|
||||
spriteBatch.End();
|
||||
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, null, Main.UIScaleMatrix);
|
||||
spriteBatch.Draw(Logo.Value, drawPos, null, drawColor, logoRotation, Logo.Value.Size() * 0.5f, logoScale, SpriteEffects.None, 0f);
|
||||
spriteBatch.Draw(Logo.Value, drawPos, null, drawColor, rotationSecretSeedAdjusted, Logo.Value.Size() * 0.5f, WorldGen.drunkWorldGen ? logoScale : 1f, SpriteEffects.None, 0f);
|
||||
spriteBatch.End();
|
||||
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, null, Main.UIScaleMatrix);
|
||||
return false;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 338 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 603 KiB |
@@ -86,14 +86,14 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
float scale = Main.rand.NextFloat(0.8f, 1.1f);
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Dust dust2 = Dust.NewDustPerfect(Projectile.Center + offset * sineDir, Projectile.ai[1] == 5 ? ModContent.DustType<VoidDust>() : ModContent.DustType<LightDust>(), -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.8f));
|
||||
Dust dust2 = Dust.NewDustPerfect(Projectile.Center + offset * sineDir, ModContent.DustType<VoidDust>(), -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.8f));
|
||||
dust2.noGravity = true;
|
||||
dust2.scale = scale;
|
||||
dust2.color = baseColor;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Dust dust3 = Dust.NewDustPerfect(Projectile.Center - offset * sineDir, /*Projectile.ai[1] == 5 ? ModContent.DustType<VoidDust>() : */ModContent.DustType<LightDust>(), -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.8f));
|
||||
Dust dust3 = Dust.NewDustPerfect(Projectile.Center - offset * sineDir, ModContent.DustType<VoidDustInverted>(), -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.8f));
|
||||
dust3.noGravity = true;
|
||||
dust3.scale = scale;
|
||||
dust3.color = baseColor;
|
||||
@@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
else if (Main.rand.NextBool(13))
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(10, 10), Projectile.ai[1] == 5 ? ModContent.DustType<VoidDust>() : ModContent.DustType<LightDust>(), -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.8f));
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(10, 10), Projectile.ai[1] == 5 ? (Main.rand.NextBool() ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()) : ModContent.DustType<LightDust>(), -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.8f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1.05f, 1.65f);
|
||||
dust.color = baseColor;
|
||||
@@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, Projectile.ai[1] == 5 ? ModContent.DustType<VoidDust>() : ModContent.DustType<LightDust>(), (Projectile.velocity * 3).RotatedByRandom(0.7f) * Main.rand.NextFloat(0.2f, 1f));
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, Projectile.ai[1] == 5 ? (Main.rand.NextBool() ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()) : ModContent.DustType<LightDust>(), (Projectile.velocity * 3).RotatedByRandom(0.7f) * Main.rand.NextFloat(0.2f, 1f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1.15f, 1.45f);
|
||||
dust.color = baseColor;
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
if (Main.rand.NextBool(4) && !fading)
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(20, 20), ModContent.DustType<VoidDust>(), Projectile.velocity.RotatedByRandom(0.1f) * Main.rand.NextFloat(2.3f, 5.8f));
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(20, 20), (Main.rand.NextBool() ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()), Projectile.velocity.RotatedByRandom(0.1f) * Main.rand.NextFloat(2.3f, 5.8f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1.3f, 2.15f);
|
||||
dust.color = baseColor;
|
||||
@@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
float dustPower = Main.rand.NextFloat(0.2f, 1f);
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType<VoidDust>(), (Projectile.velocity * 15 * (dustPower * dustPower)).RotatedByRandom(1f - dustPower * dustPower) * Main.rand.NextFloat(0.9f, 1f));
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, (Main.rand.NextBool() ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()), (Projectile.velocity * 15 * (dustPower * dustPower)).RotatedByRandom(1f - dustPower * dustPower) * Main.rand.NextFloat(0.9f, 1f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(2.15f, 3.45f) * dustPower;
|
||||
dust.color = baseColor;
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Dust dust3 = Dust.NewDustPerfect(Projectile.Center - offset, ModContent.DustType<VoidDust>(), -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.8f));
|
||||
Dust dust3 = Dust.NewDustPerfect(Projectile.Center - offset, ModContent.DustType<VoidDustInverted>(), -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.8f));
|
||||
dust3.noGravity = true;
|
||||
dust3.scale = scale;
|
||||
dust3.color = baseColor;
|
||||
@@ -130,12 +130,12 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Owner.Calamity().GeneralScreenShakePower = 8.5f;
|
||||
float power = 1.5f;
|
||||
|
||||
for (int i = 0; i < 40; i++)
|
||||
for (int i = 0; i < 55; i++)
|
||||
{
|
||||
Color useColor = GetRandomColor();
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType<VoidDust>(), (Projectile.velocity * 6 * power).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1f));
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, (Main.rand.NextBool(6) ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()), (Projectile.velocity * 6 * power).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1.85f, 2.45f) * power;
|
||||
dust.scale = Main.rand.NextFloat(1.75f, 2.25f) * power;
|
||||
dust.color = useColor;
|
||||
if (Owner.shirtColor == Color.White)
|
||||
useColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Main.DiscoR);
|
||||
@@ -180,7 +180,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
Color useColor = GetRandomColor();
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType<VoidDust>(), (Projectile.velocity * 3).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1f));
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, (Main.rand.NextBool() ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()), (Projectile.velocity * 3).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1.85f, 2.45f);
|
||||
dust.color = useColor;
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
Color useColor = GetRandomColor();
|
||||
|
||||
Dust dust = Dust.NewDustPerfect(Owner.Center, !Positive ? ModContent.DustType<VoidDust>() : ModContent.DustType<LightDust>(), new Vector2(12, 12).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 1f));
|
||||
Dust dust = Dust.NewDustPerfect(Owner.Center, !Positive ? (Main.rand.NextBool() ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()) : ModContent.DustType<LightDust>(), new Vector2(12, 12).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 1f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(0.9f, 1.25f);
|
||||
dust.color = Projectile.ai[2] == 15 ? baseColor : useColor;
|
||||
@@ -172,7 +172,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
if (Main.rand.NextBool() && Time > 1)
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(GunTipPosition - (Projectile.velocity * 60).RotatedBy(0.15f * Projectile.direction), Projectile.ai[2] == 15 ? ModContent.DustType<VoidDust>() : ModContent.DustType<LightDust>(), (Projectile.velocity * 14).RotatedBy(MathHelper.ToRadians(-135f) * Projectile.direction).RotatedByRandom(0.3f) * Main.rand.NextFloat(0.6f, 1f));
|
||||
Dust dust = Dust.NewDustPerfect(GunTipPosition - (Projectile.velocity * 60).RotatedBy(0.15f * Projectile.direction), Projectile.ai[2] == 15 ? (Main.rand.NextBool() ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()) : ModContent.DustType<LightDust>(), (Projectile.velocity * 14).RotatedBy(MathHelper.ToRadians(-135f) * Projectile.direction).RotatedByRandom(0.3f) * Main.rand.NextFloat(0.6f, 1f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(0.8f, 0.9f) * Utils.GetLerpValue(-10, 15, Projectile.timeLeft);
|
||||
dust.color = baseColor;
|
||||
@@ -226,7 +226,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Color useColor = GetRandomColor();
|
||||
|
||||
float rand = Main.rand.NextFloat(0, 2.5f);
|
||||
Dust dust = Dust.NewDustPerfect(GunTipPosition - Projectile.velocity * 15, ModContent.DustType<VoidDust>(), shootVelocity.RotatedByRandom(0.12f + rand * 0.2f) * (Main.rand.NextFloat(2.5f, 6.3f) - rand));
|
||||
Dust dust = Dust.NewDustPerfect(GunTipPosition - Projectile.velocity * 15, (i % 2 == 0 ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()), shootVelocity.RotatedByRandom(0.12f + rand * 0.2f) * (Main.rand.NextFloat(2.5f, 6.3f) - rand));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1.55f, 1.85f);
|
||||
dust.color = Positive ? useColor : baseColor;
|
||||
@@ -274,7 +274,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
SoundEngine.PlaySound(OntologicalDespoiler.SmallShot, Projectile.position);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(GunTipPosition - Projectile.velocity * 15, !Positive ? ModContent.DustType<VoidDust>() : ModContent.DustType<LightDust>(), shootVelocity.RotatedByRandom(0.5f) * Main.rand.NextFloat(0.3f, 2.3f));
|
||||
Dust dust = Dust.NewDustPerfect(GunTipPosition - Projectile.velocity * 15, !Positive ? (Main.rand.NextBool() ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()) : ModContent.DustType<LightDust>(), shootVelocity.RotatedByRandom(0.5f) * Main.rand.NextFloat(0.3f, 2.3f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1.15f, 1.35f);
|
||||
dust.color = baseColor;
|
||||
@@ -319,7 +319,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Vector2 dustVel = -Projectile.velocity.RotatedByRandom(100) * Main.rand.NextFloat(1.1f, 15.8f);
|
||||
Vector2 addedPlace = Positive ? Vector2.Zero : dustVel * 3;
|
||||
bool dustChance = Main.rand.NextBool((int)(30 * Utils.GetLerpValue(Charge2Frames, Charge1Frames, CurrentChargingFrames, true) + 1));
|
||||
int dustType = !Positive ? ModContent.DustType<VoidDust>() : ChargeLV1 ? (dustChance ? ModContent.DustType<VoidDust>() : ModContent.DustType<LightDust>()) : ModContent.DustType<LightDust>();
|
||||
int dustType = !Positive ? (Main.rand.NextBool() ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()) : ChargeLV1 ? (dustChance ? ModContent.DustType<VoidDust>() : ModContent.DustType<LightDust>()) : ModContent.DustType<LightDust>();
|
||||
|
||||
Dust dust = Dust.NewDustPerfect(GunTipPosition + (Positive ? Vector2.Zero : (dustVel * 15 * Utils.GetLerpValue(Charge1Frames, Charge2Frames, CurrentChargingFrames, true))), dustType, dustVel - addedPlace * Utils.GetLerpValue(Charge1Frames, Charge2Frames, CurrentChargingFrames, true));
|
||||
dust.noGravity = true;
|
||||
@@ -341,9 +341,9 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
bool color = Main.rand.NextBool(4);
|
||||
Vector2 dustVel = -Projectile.velocity.RotatedByRandom(100) * Main.rand.NextFloat(1.1f, 15.8f);
|
||||
Dust dust = Dust.NewDustPerfect(GunTipPosition, ModContent.DustType<VoidDust>(), dustVel);
|
||||
Dust dust = Dust.NewDustPerfect(GunTipPosition, (color ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()), dustVel);
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(0.5f, 1.25f) * (color ? 1.8f : 1);
|
||||
dust.scale = Main.rand.NextFloat(0.5f, 1.25f);
|
||||
dust.color = color ? Color.Black : baseColor;
|
||||
}
|
||||
}
|
||||
@@ -356,7 +356,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
Color useColor = GetRandomColor();
|
||||
|
||||
Dust chargefull = Dust.NewDustPerfect(GunTipPosition, ModContent.DustType<LightDust>());
|
||||
Dust chargefull = Dust.NewDustPerfect(GunTipPosition, !Positive ? (i % 2 == 0 ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()) : ModContent.DustType<LightDust>());
|
||||
chargefull.velocity = (MathHelper.TwoPi * i / 16f).ToRotationVector2() * 16f * (i % 2 == 0 ? 0.7f : 1);
|
||||
chargefull.scale = Main.rand.NextFloat(1.1f, 1.3f);
|
||||
chargefull.noGravity = true;
|
||||
@@ -369,11 +369,11 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (ChargeLV2 && !hasReachedLV2)
|
||||
{
|
||||
SoundEngine.PlaySound(OntologicalDespoiler.ChargeLV2, Projectile.Center);
|
||||
for (int i = 0; i < 25; i++)
|
||||
for (int i = 0; i < 24; i++)
|
||||
{
|
||||
Color useColor = GetRandomColor();
|
||||
|
||||
Dust chargefull = Dust.NewDustPerfect(GunTipPosition, ModContent.DustType<LightDust>());
|
||||
Dust chargefull = Dust.NewDustPerfect(GunTipPosition, !Positive ? (i % 2 == 0 ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()) : ModContent.DustType<LightDust>());
|
||||
chargefull.velocity = (MathHelper.TwoPi * i / 25f).ToRotationVector2() * 22f * (i % 2 == 0 ? 0.7f : 1);
|
||||
chargefull.scale = Main.rand.NextFloat(1.45f, 1.55f);
|
||||
chargefull.noGravity = true;
|
||||
|
||||
@@ -110,13 +110,10 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
Vector2 offset = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(MathHelper.PiOver2) * sine * 13f;
|
||||
float scale = Main.rand.NextFloat(0.45f, 0.55f);
|
||||
if (true)
|
||||
{
|
||||
Dust dust2 = Dust.NewDustPerfect(Projectile.Center + offset * sineDir, ModContent.DustType<VoidDust>(), -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.8f));
|
||||
dust2.noGravity = true;
|
||||
dust2.scale = scale;
|
||||
dust2.color = baseColor;
|
||||
}
|
||||
Dust dust2 = Dust.NewDustPerfect(Projectile.Center + offset * sineDir, (time % 2 == 0 ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()), -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.8f));
|
||||
dust2.noGravity = true;
|
||||
dust2.scale = scale;
|
||||
dust2.color = baseColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -172,7 +169,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, !Positive ? ModContent.DustType<VoidDust>() : ModContent.DustType<LightDust>(), (Projectile.velocity * 3).RotatedByRandom(0.7f) * Main.rand.NextFloat(0.2f, 1f));
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, !Positive ? (Main.rand.NextBool() ? ModContent.DustType<VoidDustInverted>() : ModContent.DustType<VoidDust>()) : ModContent.DustType<LightDust>(), (Projectile.velocity * 3).RotatedByRandom(0.7f) * Main.rand.NextFloat(0.2f, 1f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1.15f, 1.45f);
|
||||
dust.color = baseColor;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
public ref float time => ref Projectile.ai[0];
|
||||
public ref float radius => ref Projectile.ai[1];
|
||||
public float maxRadius = 300;
|
||||
public int startDamage;
|
||||
public bool visible;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 96;
|
||||
@@ -36,23 +36,22 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (time == 0)
|
||||
startDamage = Projectile.damage;
|
||||
|
||||
Player player = Main.player[Projectile.owner];
|
||||
visible = player.Calamity().toxicHeartVisuals;
|
||||
if (Projectile.ai[2] == 0)
|
||||
Projectile.Center = player.MountedCenter;
|
||||
if (Projectile.ai[2] == 1)
|
||||
{
|
||||
maxRadius = 200;
|
||||
maxRadius = Main.rand.Next(150, 250 + 1);
|
||||
Projectile.extraUpdates = 2;
|
||||
}
|
||||
|
||||
if (Main.rand.NextBool(5))
|
||||
if (Main.rand.NextBool(5) && visible)
|
||||
{
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Projectile.Center + Main.rand.NextVector2Circular(radius, radius), Vector2.Zero, (Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green) * 0.6f, new Vector2(1, 1), 0, Main.rand.NextFloat(0.07f, 0.23f), 0f, 20);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
}
|
||||
if (Main.rand.NextBool(3))
|
||||
if (Main.rand.NextBool(3) && visible)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
@@ -70,10 +69,10 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.85f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
float minMult = 0.4f;
|
||||
int hitsToMinMult = 6;
|
||||
float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true);
|
||||
modifiers.SourceDamage *= damageMult;
|
||||
}
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
@@ -83,15 +82,33 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
if ((target.life <= 0 && target.realLife == -1))
|
||||
{
|
||||
player.Heal(10);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType<PlaguePulse>(), (int)(startDamage * 0.8f), 0f, Projectile.owner, 0, 0, 1);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType<PlaguePulse>(), (int)(Projectile.damage * 0.9f), 0f, Projectile.owner, 0, Projectile.ai[1] + 1, 1);
|
||||
}
|
||||
if (target.CanBeMoved()) // Always push targets away from the player
|
||||
{
|
||||
Vector2 pushVelocity = Utils.DirectionTo(player.Center, target.Center) * 5;
|
||||
target.velocity = pushVelocity;
|
||||
}
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Player player = Main.player[Projectile.owner];
|
||||
|
||||
Texture2D rexture = ModContent.Request<Texture2D>("CalamityMod/Particles/HighResHollowCircleHardEdge").Value;
|
||||
Main.EntitySpriteDraw(rexture, Projectile.Center - Main.screenPosition, null, (Color.Green * Utils.Remap(time, 30, 60, 0.35f, 0, true)) with { A = 0 }, Projectile.rotation, rexture.Size() * 0.5f, (Utils.Remap(time, 0, 60, 1, 6, true) / 21) * (maxRadius == 300 ? 1 : 0.7f), SpriteEffects.None, 0);
|
||||
Texture2D rexture = ModContent.Request<Texture2D>("CalamityMod/Particles/SoftRoundExplosion").Value;
|
||||
Texture2D fexture = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
Color color = (Color.Green * Utils.Remap(time, 30, 60, 0.35f, 0, true)) with { A = 0 } * (visible ? 1f : 0.25f);
|
||||
float scale = (Utils.Remap(time, 0, 60, 1, 6, true) / 21) * (maxRadius == 300 ? 1 : 0.7f);
|
||||
Vector2 pos = Projectile.Center - Main.screenPosition;
|
||||
Main.EntitySpriteDraw(rexture, pos, null, color, Projectile.rotation - Main.GlobalTimeWrappedHourly * 1.5f, rexture.Size() * 0.5f, scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(rexture, pos, null, color, Projectile.rotation + Main.GlobalTimeWrappedHourly * 3, rexture.Size() * 0.5f, scale * 0.95f, SpriteEffects.None, 0);
|
||||
if (Projectile.ai[2] == 1)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
float pulseScale = (scale * 6 + 0.11f) - i * 0.022f;
|
||||
Main.EntitySpriteDraw(fexture, pos, null, color, Projectile.rotation, fexture.Size() * 0.5f, pulseScale, SpriteEffects.None, 0);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, radius, targetHitbox);
|
||||
|
||||
@@ -6,6 +6,7 @@ using CalamityMod.Projectiles.Melee.MaceFlails;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
@@ -32,6 +33,7 @@ namespace CalamityMod.Systems.Collections
|
||||
ProjectileID.Terragrim,
|
||||
ProjectileType<AcidicSaxBubble>(),
|
||||
ProjectileType<AcidRocket>(),
|
||||
ProjectileType<ArtifactOfResilienceShards>(),
|
||||
ProjectileType<BasherHoldout>(),
|
||||
ProjectileType<BlushieStaffProj>(),
|
||||
ProjectileType<BonebreakerProjectile>(),
|
||||
@@ -54,6 +56,7 @@ namespace CalamityMod.Systems.Collections
|
||||
ProjectileType<GrandGuardianHoldout>(),
|
||||
ProjectileType<HellbornHoldout>(),
|
||||
ProjectileType<HellkiteHoldout>(),
|
||||
ProjectileType<HolyColliderHoldout>(),
|
||||
ProjectileType<InsidiousHarpoon>(),
|
||||
ProjectileType<JawsProjectile>(),
|
||||
ProjectileType<LeviathanTooth>(),
|
||||
@@ -72,8 +75,10 @@ namespace CalamityMod.Systems.Collections
|
||||
ProjectileType<PrismaticRay>(),
|
||||
ProjectileType<RancorLaserbeam>(),
|
||||
ProjectileType<ReaperProjectile>(),
|
||||
ProjectileType<RelicOfDeliveranceSpear>(),
|
||||
ProjectileType<RespiteblockHoldout>(),
|
||||
ProjectileType<SacrificeProjectile>(),
|
||||
ProjectileType<SkytideDragoonHoldout>(),
|
||||
ProjectileType<SnapClamProj>(),
|
||||
ProjectileType<SnapClamStealth>(),
|
||||
ProjectileType<Snowflake>(),
|
||||
|
||||
Reference in new issue
Block a user