Merge duststorm and stardust dragon resists properly
No files matched your search
@@ -195,9 +195,6 @@ namespace CalamityMod.Balancing
|
||||
// 75% resist to Plaguenades.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<PlaguenadeBee>(), ProjectileType<PlaguenadeProj>()))));
|
||||
|
||||
// 70% resist to Stardust Dragon Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
|
||||
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
@@ -210,6 +207,9 @@ namespace CalamityMod.Balancing
|
||||
//45% resist to Duststorm in a Bottle
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<DuststormCloud>(), ProjectileType<DuststormCloudExplosion>(), ProjectileType<DuststormInABottleProj>()))));
|
||||
|
||||
// 40% resist to Stardust Dragon Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.6f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
|
||||
|
||||
// 35% resist to Aerial Bane.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2BetsyArrow))));
|
||||
|
||||
@@ -251,9 +251,6 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Galactus Blade.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.5f, ProjectileType<GalacticaComet>())));
|
||||
|
||||
// 40% resist to Pristine Fury's alt fire.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<PristineSecondary>())));
|
||||
|
||||
// 40% resist to Stellar Torus Staff.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<StellarTorusBeam>())));
|
||||
#endregion
|
||||
@@ -271,9 +268,6 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Legion of Celestia.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<CelestialAxeMinion>()))));
|
||||
|
||||
// 50% resist to Pristine Fury's alt fire.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<PristineSecondary>()))));
|
||||
|
||||
// 50% resist to Tactician's Trump Card's explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TacticiansElectricBoom>()))));
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 646 B After Width: | Height: | Size: 871 B |
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 866 B |
|
Before Width: | Height: | Size: 651 B After Width: | Height: | Size: 832 B |
|
Before Width: | Height: | Size: 736 B After Width: | Height: | Size: 819 B |
|
Before Width: | Height: | Size: 668 B After Width: | Height: | Size: 907 B |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 818 B |
|
Before Width: | Height: | Size: 640 B After Width: | Height: | Size: 885 B |
|
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 815 B |
|
Before Width: | Height: | Size: 729 B After Width: | Height: | Size: 842 B |
|
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 813 B |
|
Before Width: | Height: | Size: 743 B After Width: | Height: | Size: 898 B |
|
Before Width: | Height: | Size: 649 B After Width: | Height: | Size: 788 B |
|
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 807 B |
|
Before Width: | Height: | Size: 688 B After Width: | Height: | Size: 816 B |
|
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 789 B |
|
Before Width: | Height: | Size: 656 B After Width: | Height: | Size: 828 B |
|
Before Width: | Height: | Size: 716 B After Width: | Height: | Size: 836 B |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 822 B |
|
Before Width: | Height: | Size: 700 B After Width: | Height: | Size: 964 B |
|
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 731 B |
|
Before Width: | Height: | Size: 706 B After Width: | Height: | Size: 820 B |
|
Before Width: | Height: | Size: 752 B After Width: | Height: | Size: 790 B |
|
Before Width: | Height: | Size: 698 B After Width: | Height: | Size: 848 B |
@@ -70,7 +70,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
Particle smoke = new HeavySmokeParticle(npcSize, new Vector2(2f, 2f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), smokeColor, 40, Main.rand.NextFloat(0.3f, 0.4f) + (0.00000013f * npc.width * npc.height), 0.5f, Main.rand.NextFloat(-0.2f, 0.2f), false, required: true);
|
||||
GeneralParticleHandler.SpawnParticle(smoke);
|
||||
}
|
||||
Dust water = Dust.NewDustDirect(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, 360, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.4f);
|
||||
Dust water = Dust.NewDustDirect(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, 390, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.4f);
|
||||
water.noGravity = true;
|
||||
water.velocity *= 0.75f;
|
||||
water.velocity.X = water.velocity.X * 0.75f;
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class WindChilled : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 12,
|
||||
NPCLifeRegenMethod = WindChilledNPCLifeRegen,
|
||||
ColdDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
public static void WindChilledNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
var cnpc = npc.Calamity();
|
||||
|
||||
int baseDoTValue = (int)(cnpc.windChilledMult * npc.Calamity().ActiveColdDebuffMultiplier.ApplyTo(debuffData.EnemyLostRegen));
|
||||
cnpc.ApplyDPSDebuff(baseDoTValue, Math.Max((int)(baseDoTValue * debuffData.MultiplierDamageTickSize), debuffData.MinimumDamageTickSize) / 2, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().windChilled = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
npc.Calamity().windChilled = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
|
||||
{
|
||||
Player player = drawInfo.drawPlayer;
|
||||
|
||||
float widthMult = 1;
|
||||
float hightMult = 1;
|
||||
Color color = Elumphant.color1;
|
||||
Color color2 = Elumphant.color2;
|
||||
float sine = (float)Math.Sin((Main.GlobalTimeWrappedHourly * 9.0f) / MathHelper.Pi);
|
||||
if (Main.rand.NextBool(16))
|
||||
{
|
||||
bool start = !Main.rand.NextBool(4);
|
||||
Vector2 particleVel = Vector2.UnitY * Main.rand.NextFloat(-1.25f, 1.25f) * Math.Max(hightMult, widthMult) * (Main.rand.NextBool(5) ? 1.5f : 1) + player.velocity * 0.85f;
|
||||
Vector2 particlePos = player.Center + Main.rand.NextVector2Circular(3 * widthMult + 8, 3 * widthMult + 8) * Math.Max(hightMult, widthMult);
|
||||
Particle mist = new CustomPulsingSpark(particlePos, particleVel, "CalamityMod/Particles/ThinSparkle", "CalamityMod/Particles/BloomCircle", false, 65, Main.rand.NextFloat(0.95f, 1.35f) * MathF.Pow(widthMult, 0.45f), start ? color : color2, start ? color2 : color,
|
||||
new Vector2(0.6f, 1.2f), true, true, Main.rand.Next(4, 7 + 1), colorFadeSpeed: 0.85f, noShrink: true, extraRotation: -particleVel.ToRotation(), shrinkSpeed: 0.1f, sineRate: Main.rand.NextFloat(0.25f, 0.55f), sineIntensity: (int)(Main.rand.Next(12, 19 + 1) * Math.Max(hightMult, widthMult)));
|
||||
GeneralParticleHandler.SpawnParticle(mist, true, Enums.GeneralDrawLayer.AfterPlayers);
|
||||
}
|
||||
if (Main.rand.NextBool(11))
|
||||
{
|
||||
Vector2 dustVel = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(0.2f, 1.1f) * Math.Max(hightMult, widthMult) * 2 * (Main.rand.NextBool(5) ? 2f : 1);
|
||||
Dust dust2 = Dust.NewDustPerfect(player.Center + dustVel * Main.rand.NextFloat(3, 4), ModContent.DustType<SquashDustPixelated>(),
|
||||
Vector2.Zero, 0, default, Main.rand.NextFloat(0.2f, 0.45f) * Math.Max(hightMult, widthMult));
|
||||
dust2.noGravity = false;
|
||||
dust2.color = Main.rand.NextBool() ? color : color2;
|
||||
dust2.customData = new Vector2(0.7f, 1.4f);
|
||||
dust2.fadeIn = 0.1f * Math.Max(hightMult, widthMult);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
{
|
||||
float maxSizeMult = 10f;
|
||||
float widthMult = MathF.Pow(Utils.Remap(npc.width, 10, 500, 1f, maxSizeMult, false), 0.8f);
|
||||
float hightMult = MathF.Pow(Utils.Remap(npc.height, 10, 500, 1f, maxSizeMult, false), 0.8f);
|
||||
Color color = Elumphant.color1;
|
||||
Color color2 = Elumphant.color2;
|
||||
float sine = (float)Math.Sin((Main.GlobalTimeWrappedHourly * 9.0f) / MathHelper.Pi);
|
||||
if (Main.rand.NextBool(16))
|
||||
{
|
||||
bool start = !Main.rand.NextBool(4);
|
||||
Vector2 particleVel = Vector2.UnitY * Main.rand.NextFloat(-1.25f, 1.25f) * Math.Max(hightMult, widthMult) * (Main.rand.NextBool(5) ? 1.5f : 1) + npc.velocity * 0.85f;
|
||||
Vector2 particlePos = npc.Center + Main.rand.NextVector2Circular(3 * widthMult + 8, 3 * widthMult + 8) * Math.Max(hightMult, widthMult);
|
||||
Particle mist = new CustomPulsingSpark(particlePos, particleVel, "CalamityMod/Particles/ThinSparkle", "CalamityMod/Particles/BloomCircle", false, 65, Main.rand.NextFloat(0.95f, 1.35f) * MathF.Pow(widthMult, 0.45f), start ? color : color2, start ? color2 : color,
|
||||
new Vector2(0.6f, 1.2f), true, true, Main.rand.Next(4, 7 + 1), colorFadeSpeed: 0.85f, noShrink: true, extraRotation: -particleVel.ToRotation(), shrinkSpeed: 0.1f, sineRate: Main.rand.NextFloat(0.25f, 0.55f), sineIntensity: (int)(Main.rand.Next(12, 19 + 1) * Math.Max(hightMult, widthMult)));
|
||||
GeneralParticleHandler.SpawnParticle(mist, true, Main.rand.NextBool() ? Enums.GeneralDrawLayer.AfterNPCs : Enums.GeneralDrawLayer.BeforeNPCs);
|
||||
}
|
||||
if (Main.rand.NextBool(11))
|
||||
{
|
||||
Vector2 dustVel = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(0.2f, 1.1f) * Math.Max(hightMult, widthMult) * 2 * (Main.rand.NextBool(5) ? 2f : 1);
|
||||
Dust dust2 = Dust.NewDustPerfect(npc.Center + dustVel * Main.rand.NextFloat(3, 4), ModContent.DustType<SquashDustPixelated>(),
|
||||
Vector2.Zero, 0, default, Main.rand.NextFloat(0.2f, 0.45f) * Math.Max(hightMult, widthMult));
|
||||
dust2.noGravity = false;
|
||||
dust2.color = Main.rand.NextBool() ? color : color2;
|
||||
dust2.customData = new Vector2(0.7f, 1.4f);
|
||||
dust2.fadeIn = 0.1f * Math.Max(hightMult, widthMult);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 587 B |
|
Before Width: | Height: | Size: 664 B After Width: | Height: | Size: 644 B |
|
Before Width: | Height: | Size: 562 B After Width: | Height: | Size: 551 B |
|
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 530 B |
@@ -6,8 +6,6 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
{
|
||||
public class Crumbling : ModBuff
|
||||
{
|
||||
public static int DefenseReduction = 10;
|
||||
public static float MultiplicativeDamageReductionPlayer = 0.7f;
|
||||
// 8% DR reduction
|
||||
public static float MultiplicativeDamageReductionEnemy = 0.92f;
|
||||
|
||||
@@ -24,10 +22,5 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
{
|
||||
npc.Calamity().crumble = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().crumble = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,9 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
{
|
||||
public class WhisperingDeath : ModBuff
|
||||
{
|
||||
public static float PlayerDamageReduction = 0.2f;
|
||||
public static float EnemyDamageReduction = 0.1f;
|
||||
|
||||
// Whispering Death does not deal DoT, but is classified as a sickness debuff.
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class RareSandElemental : BaseSummonBuff
|
||||
public class OasisElementalBuff : BaseSummonBuff
|
||||
{
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<SandElementalHealer>();
|
||||
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.rareSandEleBuff;
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.oasisEleBuff;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 601 B After Width: | Height: | Size: 601 B |
@@ -61,7 +61,6 @@ using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Melee.Shortswords;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
@@ -70,6 +69,7 @@ using CalamityMod.Systems;
|
||||
using CalamityMod.Systems.Collections;
|
||||
using CalamityMod.Systems.Mechanic;
|
||||
using CalamityMod.Utilities;
|
||||
using CalamityMod.Waters;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -85,7 +85,6 @@ using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Terraria.Net;
|
||||
using Terraria.WorldBuilding;
|
||||
using static Terraria.Main;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
@@ -779,8 +778,6 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region Permanent Buff
|
||||
/// <summary> If true, the player has spawned in Punch Card through its one-time chat easter egg. </summary>
|
||||
public bool spawnedPunchCard = false;
|
||||
/// <summary> If true, the player has consumed Celestial Onion. </summary>
|
||||
public bool extraAccessoryML = false;
|
||||
/// <summary> If true, the player has consumed Comet Shard. </summary>
|
||||
@@ -874,6 +871,11 @@ namespace CalamityMod.CalPlayer
|
||||
public bool ascendantInsignia = false;
|
||||
public int ascendantInsigniaBuffTime = 0;
|
||||
public int ascendantInsigniaCooldown = 0;
|
||||
public bool fishStocks = false;
|
||||
public float fishStockVisual = 0;
|
||||
public float fishStockPower = 0;
|
||||
public float fishStockSlidingPower = 0;
|
||||
public (float, float, float, float, float) fishStockOldPower = (0, 0, 0, 0, 0);
|
||||
/// <summary> Used to toggle dust spawned while swinging, through accessory visibility. </summary>
|
||||
public bool magmaStoneVisuals = true;
|
||||
public bool eGauntlet = false;
|
||||
@@ -1045,6 +1047,10 @@ namespace CalamityMod.CalPlayer
|
||||
/// At 0f, the player has regular crit damage. At 1f, the player has +100% crit damage.
|
||||
/// </summary>
|
||||
public float critDamage = 0;
|
||||
/// <summary>
|
||||
/// Multiplies the amount of coins the player gets from enemies.
|
||||
/// </summary>
|
||||
public float coinDropMult = 1f;
|
||||
public bool darkSunRing = false;
|
||||
public bool crawCarapace = false;
|
||||
public bool baroclaw = false;
|
||||
@@ -1093,8 +1099,8 @@ namespace CalamityMod.CalPlayer
|
||||
public float summonProjCooldown;
|
||||
public bool sandElemental = false;
|
||||
public bool sandElementalVanity = false;
|
||||
public bool rareSandElemental = false;
|
||||
public bool rareSandElementalVanity = false;
|
||||
public bool oasisElemental = false;
|
||||
public bool oasisElementalVanity = false;
|
||||
public bool cloudElemental = false;
|
||||
public bool cloudElementalVanity = false;
|
||||
public bool brimElemental = false;
|
||||
@@ -1141,6 +1147,11 @@ namespace CalamityMod.CalPlayer
|
||||
public bool scionsCurioGotHit = false;
|
||||
public bool scionsCurioVisuals = false;
|
||||
public float scionsCurioDebuffDamage = 0;
|
||||
public bool frozenCube = false;
|
||||
public bool frozenCubeVisuals = false;
|
||||
public float frozenCubeDebuffBoost = 0;
|
||||
public float frozenCubeElumphantBoost = 0;
|
||||
public int frozenCubeUsedDefense = 0;
|
||||
public bool miniOldDuke = false;
|
||||
public bool miniOldDukeVanity = false;
|
||||
public bool starbusterCore = false;
|
||||
@@ -1381,7 +1392,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool staticDischarge = false;
|
||||
public bool miracleBlight = false;
|
||||
public bool armorCrunch = false;
|
||||
public bool crumble = false;
|
||||
public bool irradiated = false;
|
||||
public bool bane = false;
|
||||
public bool brimstoneFlames = false;
|
||||
@@ -1420,6 +1430,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool vaporfied = false;
|
||||
public bool banishingFire = false;
|
||||
public bool wither = false;
|
||||
public bool windChilled = false;
|
||||
public bool ManaBurn = false;
|
||||
|
||||
/// <summary> Counter variable used to prevent the player from being inflicted with another immobilizing debuff for a short time after being inflicted with one. </summary>
|
||||
@@ -1580,7 +1591,7 @@ namespace CalamityMod.CalPlayer
|
||||
/// <summary> Elemental in a Bottle. </summary>
|
||||
public bool sandEleBuff = false;
|
||||
/// <summary> Rare Elemental in a Bottle. </summary>
|
||||
public bool rareSandEleBuff = false;
|
||||
public bool oasisEleBuff = false;
|
||||
/// <summary> Eye of the Storm. </summary>
|
||||
public bool cloudEleBuff = false;
|
||||
/// <summary> Rose Stone. </summary>
|
||||
@@ -1855,7 +1866,6 @@ namespace CalamityMod.CalPlayer
|
||||
#region Saving And Loading
|
||||
public override void Initialize()
|
||||
{
|
||||
spawnedPunchCard = false;
|
||||
extraAccessoryML = false;
|
||||
eCore = false;
|
||||
mFruit = false;
|
||||
@@ -1907,7 +1917,6 @@ namespace CalamityMod.CalPlayer
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
var boost = new List<string>();
|
||||
boost.AddWithCondition("spawnedPunchCard", spawnedPunchCard);
|
||||
boost.AddWithCondition("extraAccessoryML", extraAccessoryML);
|
||||
boost.AddWithCondition("etherealCore", eCore);
|
||||
boost.AddWithCondition("miracleFruit", mFruit);
|
||||
@@ -1997,7 +2006,6 @@ namespace CalamityMod.CalPlayer
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
var boost = tag.GetList<string>("boost");
|
||||
spawnedPunchCard = boost.Contains("spawnedPunchCard");
|
||||
extraAccessoryML = boost.Contains("extraAccessoryML");
|
||||
eCore = boost.Contains("etherealCore");
|
||||
mFruit = boost.Contains("miracleFruit");
|
||||
@@ -2438,6 +2446,7 @@ namespace CalamityMod.CalPlayer
|
||||
teslaVisuals = true;
|
||||
cryogenSoul = false;
|
||||
ascendantInsignia = false;
|
||||
fishStocks = false;
|
||||
magmaStoneVisuals = true;
|
||||
eGauntlet = false;
|
||||
eGauntletVisuals = true;
|
||||
@@ -2527,6 +2536,7 @@ namespace CalamityMod.CalPlayer
|
||||
camper = false;
|
||||
corrosiveSpine = false;
|
||||
scionsCurio = false;
|
||||
frozenCube = false; frozenCubeDebuffBoost = 0; frozenCubeElumphantBoost = 0; frozenCubeUsedDefense = 0;
|
||||
rottenDogTooth = false;
|
||||
angelicAlliance = false;
|
||||
ChaosStone = false;
|
||||
@@ -2685,7 +2695,6 @@ namespace CalamityMod.CalPlayer
|
||||
staticDischarge = false;
|
||||
miracleBlight = false;
|
||||
armorCrunch = false;
|
||||
crumble = false;
|
||||
irradiated = false;
|
||||
bane = false;
|
||||
brimstoneFlames = false;
|
||||
@@ -2726,6 +2735,7 @@ namespace CalamityMod.CalPlayer
|
||||
vaporfied = false;
|
||||
banishingFire = false;
|
||||
wither = false;
|
||||
windChilled = false;
|
||||
ManaBurn = false;
|
||||
|
||||
TypelessDebuffMultiplier = new();
|
||||
@@ -2847,7 +2857,7 @@ namespace CalamityMod.CalPlayer
|
||||
cEnergy = false;
|
||||
pSoulGuardians = false;
|
||||
sandEleBuff = false;
|
||||
rareSandEleBuff = false;
|
||||
oasisEleBuff = false;
|
||||
cloudEleBuff = false;
|
||||
brimEleBuff = false;
|
||||
waterEleBuff = false;
|
||||
@@ -2864,8 +2874,8 @@ namespace CalamityMod.CalPlayer
|
||||
MutatedTruffleBool = false;
|
||||
sandElemental = false;
|
||||
sandElementalVanity = false;
|
||||
rareSandElemental = false;
|
||||
rareSandElementalVanity = false;
|
||||
oasisElemental = false;
|
||||
oasisElementalVanity = false;
|
||||
cloudElemental = false;
|
||||
cloudElementalVanity = false;
|
||||
brimElemental = false;
|
||||
@@ -3116,6 +3126,7 @@ namespace CalamityMod.CalPlayer
|
||||
holyInfernoFadeIntensity = 0f;
|
||||
spiritOriginCritBoost = 0;
|
||||
critDamage = 0f;
|
||||
coinDropMult = 1f;
|
||||
rage = 0f;
|
||||
adrenaline = 0f;
|
||||
raiderCritLifespan = 0;
|
||||
@@ -3172,7 +3183,6 @@ namespace CalamityMod.CalPlayer
|
||||
staticDischarge = false;
|
||||
miracleBlight = false;
|
||||
armorCrunch = false;
|
||||
crumble = false;
|
||||
irradiated = false;
|
||||
bane = false;
|
||||
brimstoneFlames = false;
|
||||
@@ -3212,6 +3222,7 @@ namespace CalamityMod.CalPlayer
|
||||
vaporfied = false;
|
||||
banishingFire = false;
|
||||
wither = false;
|
||||
windChilled = false;
|
||||
ImmobilityDebuffImmunityTimer = 0;
|
||||
TypelessDebuffMultiplier = new();
|
||||
HeatDebuffMultiplier = new();
|
||||
@@ -4296,12 +4307,217 @@ namespace CalamityMod.CalPlayer
|
||||
vector = player.CheckForGoodTeleportationSpot(ref canSpawn, halfWorldXTiles + smallerCheckRadius, smallerCheckRadius, teleportStartY, teleportRangeY, settings);
|
||||
|
||||
if (canSpawn)
|
||||
{
|
||||
return (Vector2?)vector;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a random position in the Lihzhard Temple to teleport the player to. <br></br>
|
||||
/// Used primarily for <see cref="Items.Potions.TheElixir"/>.
|
||||
/// </summary>
|
||||
public static Vector2? GetTempleTeleportPosition(Player player)
|
||||
{
|
||||
int foundX = -1;
|
||||
int foundY = -1;
|
||||
bool dungeonOnRightSide = Main.dungeonX > Main.spawnTileX;
|
||||
int xSearchEnd = dungeonOnRightSide ? 20 : Main.maxTilesX - 20;
|
||||
|
||||
if (dungeonOnRightSide)
|
||||
{
|
||||
for (int i = Main.spawnTileX; i >= xSearchEnd; i -= 2)
|
||||
{
|
||||
for (int j = (int)Main.worldSurface; j < Main.maxTilesY - 210; j++)
|
||||
{
|
||||
Tile tile = Framing.GetTileSafely(i, j);
|
||||
if (tile.WallType == WallID.LihzahrdBrickUnsafe)
|
||||
{
|
||||
foundX = i;
|
||||
foundY = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundX != -1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = Main.spawnTileX; i <= xSearchEnd; i += 2)
|
||||
{
|
||||
for (int j = (int)Main.worldSurface; j < Main.maxTilesY - 210; j++)
|
||||
{
|
||||
Tile tile = Framing.GetTileSafely(i, j);
|
||||
if (tile.WallType == WallID.LihzahrdBrickUnsafe)
|
||||
{
|
||||
foundX = i;
|
||||
foundY = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundX != -1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundX == -1)
|
||||
return null;
|
||||
|
||||
int attempts = 25;
|
||||
int rangeX = 300;
|
||||
int rangeY = 300;
|
||||
int randomFluff = 500;
|
||||
Point finalTeleportPoint = Point.Zero;
|
||||
for (int i = 0; i < attempts; i++)
|
||||
{
|
||||
for (int x = 0; x <= rangeX; x++)
|
||||
{
|
||||
for (int y = 0; y <= rangeY; y++)
|
||||
{
|
||||
int teleportPosX = foundX + x + Main.rand.Next(-randomFluff, randomFluff);
|
||||
int teleportPosY = foundY + y + Main.rand.Next(-randomFluff, randomFluff);
|
||||
Tile tile = Framing.GetTileSafely(teleportPosX, teleportPosY);
|
||||
Tile tileAbove = Framing.GetTileSafely(teleportPosX, teleportPosY - 1);
|
||||
Tile tileBelow = Framing.GetTileSafely(teleportPosX, teleportPosY + 1);
|
||||
|
||||
if (!tileAbove.HasTile && tileBelow.HasTile && tile.WallType == WallID.LihzahrdBrickUnsafe)
|
||||
{
|
||||
finalTeleportPoint = new(tile.X(), tile.Y());
|
||||
if (!Collision.SolidCollision(finalTeleportPoint.ToWorldCoordinates(), player.width, player.height))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return finalTeleportPoint.ToWorldCoordinates() - new Vector2(player.width, player.height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a random position in the Void (Abyss Layer 4) to teleport the player to. <br></br>
|
||||
/// Used primarily for <see cref="Items.Potions.TheElixir"/>.
|
||||
/// </summary>
|
||||
public static Vector2? GetAbyssVoidTeleportPosition(Player player)
|
||||
{
|
||||
bool canSpawn = false;
|
||||
int halfWorldWidth = Main.maxTilesX / 2;
|
||||
|
||||
int abyssStartX = Abyss.AtLeftSideOfWorld ? halfWorldWidth - (halfWorldWidth - 135) + 35 : halfWorldWidth + (halfWorldWidth - 135) - 35;
|
||||
int abyssXRange = 50;
|
||||
|
||||
int teleportStartY = Main.remixWorld ? SulphurousSea.YStart - (int)(Main.UnderworldLayer * 0.6f) : Main.maxTilesY - 300;
|
||||
int teleportRangeY = 80;
|
||||
|
||||
Player.RandomTeleportationAttemptSettings settings = new Player.RandomTeleportationAttemptSettings
|
||||
{
|
||||
mostlySolidFloor = false,
|
||||
avoidAnyLiquid = false,
|
||||
avoidLava = true,
|
||||
avoidHurtTiles = true,
|
||||
avoidWalls = false,
|
||||
attemptsBeforeGivingUp = 1000,
|
||||
maximumFallDistanceFromOrignalPoint = 10
|
||||
};
|
||||
|
||||
Vector2 teleportPosition = player.CheckForGoodTeleportationSpot(ref canSpawn, abyssStartX, abyssXRange, teleportStartY, teleportRangeY, settings);
|
||||
return canSpawn ? teleportPosition : null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a random position in the Forsaken Archives to teleport the player to. <br></br>
|
||||
/// Used primarily for <see cref="Items.Potions.TheElixir"/>.
|
||||
/// </summary>
|
||||
public static Vector2? GetDungeonArchivesTeleportPosition(Player player)
|
||||
{
|
||||
// Define an area around the center to search for a valid spot to tp
|
||||
int teleportStartX = WorldgenManagementSystem.DungeonArchivePos.X;
|
||||
int teleportStartY = WorldgenManagementSystem.DungeonArchivePos.Y;
|
||||
|
||||
// Manually search for the Archives from the bottom of the world if the Archive position isn't saved.
|
||||
if (WorldgenManagementSystem.DungeonArchivePos == Point.Zero)
|
||||
{
|
||||
int foundX = -1;
|
||||
int foundY = -1;
|
||||
bool dungeonOnRightSide = Main.dungeonX > Main.spawnTileX;
|
||||
int xSearchStart = dungeonOnRightSide ? Main.maxTilesX - 20 : 20;
|
||||
|
||||
if (dungeonOnRightSide)
|
||||
{
|
||||
for (int y = Main.UnderworldLayer; y > (int)Main.rockLayer; y--)
|
||||
{
|
||||
for (int x = xSearchStart; x >= Main.maxTilesX / 2; x -= 2)
|
||||
{
|
||||
Tile tile = Framing.GetTileSafely(x, y);
|
||||
if (Main.wallDungeon[tile.WallType] && Main.tileDungeon[tile.TileType])
|
||||
{
|
||||
foundX = x;
|
||||
foundY = y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundY != -1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int y = Main.UnderworldLayer; y > (int)Main.rockLayer; y--)
|
||||
{
|
||||
for (int x = xSearchStart; x <= Main.maxTilesX / 2; x += 2)
|
||||
{
|
||||
Tile tile = Framing.GetTileSafely(x, y);
|
||||
if (Main.wallDungeon[tile.WallType] && Main.tileDungeon[tile.TileType])
|
||||
{
|
||||
foundX = x;
|
||||
foundY = y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundY != -1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundY == -1)
|
||||
return null;
|
||||
|
||||
teleportStartX = foundX;
|
||||
teleportStartY = foundY;
|
||||
}
|
||||
|
||||
int attempts = 25;
|
||||
int rangeX = 100;
|
||||
int rangeY = 200;
|
||||
int randomFluff = 60;
|
||||
Point finalTeleportPoint = Point.Zero;
|
||||
for (int i = 0; i < attempts; i++)
|
||||
{
|
||||
for (int x = -rangeX; x <= rangeX; x++)
|
||||
{
|
||||
for (int y = 0; y <= rangeY; y++)
|
||||
{
|
||||
int teleportPosX = teleportStartX + x + Main.rand.Next(-randomFluff, randomFluff);
|
||||
int teleportPosY = teleportStartY + y + Main.rand.Next(-randomFluff, randomFluff);
|
||||
Tile tile = Framing.GetTileSafely(teleportPosX, teleportPosY);
|
||||
Tile tileAbove = Framing.GetTileSafely(teleportPosX, teleportPosY - 1);
|
||||
Tile tileBelow = Framing.GetTileSafely(teleportPosX, teleportPosY + 1);
|
||||
|
||||
if (!tileAbove.HasTile && tileBelow.HasUnactuatedTile && Main.wallDungeon[tile.WallType])
|
||||
{
|
||||
finalTeleportPoint = new(tile.X(), tile.Y());
|
||||
if (!Collision.SolidCollision(finalTeleportPoint.ToWorldCoordinates(), player.width, player.height))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return finalTeleportPoint.ToWorldCoordinates() - new Vector2(player.width, player.height);
|
||||
}
|
||||
|
||||
public static void ModTeleport(Player player, Vector2 pos, bool playSound = true, int style = TeleportationStyleID.RecallPotion)
|
||||
{
|
||||
bool postImmune = player.immune;
|
||||
@@ -5139,6 +5355,9 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
public override void PostUpdate()
|
||||
{
|
||||
if (Player.Calamity().XykVisualsBlue || Player.Calamity().XykVisualsOrange)
|
||||
Player.wings = 0;
|
||||
|
||||
if (ZoneAbyss && Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
//Main aura
|
||||
@@ -5192,6 +5411,14 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
// Frozen Cube defense cut
|
||||
if (Player.Calamity().frozenCube)
|
||||
{
|
||||
int usedDefense = (Player.statDefense / FrozenCube.usedDefenseDivide);
|
||||
Player.Calamity().frozenCubeUsedDefense = usedDefense;
|
||||
Player.statDefense -= usedDefense;
|
||||
}
|
||||
|
||||
if (malnourished) // Has to be here because alcoholPoisonLevel isn't updated until now
|
||||
Player.GetDamage<GenericDamageClass>() += -0.05f + TheSandwich.statBoost * alcoholPoisonLevel;
|
||||
|
||||
@@ -5326,16 +5553,18 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (Player.Calamity().baconOil && !Player.mount.Active)
|
||||
if ((Player.Calamity().baconOil || Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.BaconOil)) && !Player.mount.Active)
|
||||
{
|
||||
Player.noFallDmg = true;
|
||||
|
||||
|
||||
float stackScale = (Player.Calamity().baconOil && Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.BaconOil)) ? 1.33f : 1;
|
||||
|
||||
float velX = Math.Abs(Player.velocity.X);
|
||||
float velY = Math.Abs(Player.velocity.Y);
|
||||
|
||||
float speedMult = Player.GetBestClassDamage().ApplyTo(1);
|
||||
float maxMoveSpeed = 10.5f * speedMult;
|
||||
float minMoveSpeed = 3; // Minimum move speed to be at if the player can bounce
|
||||
float maxMoveSpeed = 10.5f * speedMult * stackScale;
|
||||
float minMoveSpeed = 3 * stackScale; // Minimum move speed to be at if the player can bounce
|
||||
float hitboxSizeMult = 0.45f;
|
||||
|
||||
bool onPlatform = false;
|
||||
@@ -5354,9 +5583,9 @@ namespace CalamityMod.CalPlayer
|
||||
bool hitDown = velY > minMoveSpeed && (Collision.SolidCollision(Player.Bottom + Vector2.UnitY * Player.velocity.Y, (int)(Player.width * hitboxSizeMult), 1) || onPlatform);
|
||||
bool hitUp = velY > minMoveSpeed && Collision.SolidCollision(Player.Top + Vector2.UnitY * Player.velocity.Y, (int)(Player.width * hitboxSizeMult), 1);
|
||||
bool hitSide = velX > minMoveSpeed && Collision.SolidCollision(Vector2.Lerp(Player.TopLeft, Player.Left, 0.15f) + Vector2.UnitX * Player.velocity.X, 1, (int)(Player.height * hitboxSizeMult)) || Collision.SolidCollision(Vector2.Lerp(Player.TopRight, Player.Right, 0.15f) + Vector2.UnitX * Player.velocity.X, 1, (int)(Player.height * hitboxSizeMult));
|
||||
float acceleration = 0.05f;
|
||||
float acceleration = 0.05f * stackScale;
|
||||
float decceleration = -0.025f / speedMult;
|
||||
float riseSpeed = 0.8f; // The speed the player rises when in water or rain
|
||||
float riseSpeed = 0.8f * stackScale; // The speed the player rises when in water or rain
|
||||
float slipPower = 0.85f; //How strong the slippery effect is
|
||||
|
||||
float bounceReduction = 0.9f;
|
||||
@@ -5384,7 +5613,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (baconOilSoundCooldown < soundCDMax)
|
||||
baconOilSoundCooldown += 30;
|
||||
float pitch = 0.55f * Utils.GetLerpValue(0, soundCDMax, baconOilSoundCooldown, true);
|
||||
float pitch = (0.55f * stackScale) * Utils.GetLerpValue(0, soundCDMax, baconOilSoundCooldown, true);
|
||||
SoundStyle boyoyoing = new("CalamityMod/Sounds/Item/BaconOilBounce");
|
||||
SoundEngine.PlaySound(boyoyoing with { Volume = 0.45f, Pitch = hitSide ? pitch - 0.3f : pitch, MaxInstances = 5 }, Player.Center);
|
||||
}
|
||||
|
||||
@@ -584,6 +584,9 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (calamityPlayer.vHex && drawInfo.shadow == 0f)
|
||||
VulnerabilityHex.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.windChilled && drawInfo.shadow == 0f)
|
||||
WindChilled.DrawEffects(drawInfo);
|
||||
#endregion
|
||||
|
||||
if (calamityPlayer.fortunesFavor && drawInfo.shadow == 0f)
|
||||
|
||||
@@ -438,6 +438,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.ZoneSkyHeight && fishingRod.type == ModContent.ItemType<HeronRod>())
|
||||
fishingLevel = fishingLevel * HeronRod.FishingPowerBiomeMult;
|
||||
|
||||
// Rage bait gives free sonar effect
|
||||
if (bait.type == ModContent.ItemType<RageBait>())
|
||||
Player.sonarPotion = true;
|
||||
|
||||
// Prevent the player from fishing if they have the Bloodworm
|
||||
if (bait.type == ModContent.ItemType<BloodwormItem>())
|
||||
{
|
||||
|
||||
@@ -284,6 +284,11 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8)
|
||||
{
|
||||
if (fishStocks && fishStockPower < 0)
|
||||
{
|
||||
string year = DateTime.Now.ToString("yy");
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.FishStocks" + Main.rand.Next(1, 6 + 1)).ToNetworkText(Player.name, year));
|
||||
}
|
||||
if (alcoholPoisoning)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.AlcoholBig" + Main.rand.Next(1, 2 + 1)).ToNetworkText(Player.name));
|
||||
@@ -480,6 +485,9 @@ namespace CalamityMod.CalPlayer
|
||||
#region Modify Hit NPC
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (Player.Calamity().coinDropMult != 1)
|
||||
target.Calamity().coinDropMult = Player.Calamity().coinDropMult;
|
||||
|
||||
if (target.HasBuff<SmashedEvil>())
|
||||
{
|
||||
//This is essentially 10 AP, but independent of armor amount
|
||||
@@ -719,70 +727,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (npc.Calamity().antlionCloudDebuffTimer > 0)
|
||||
modifiers.SourceDamage *= AntlionSkewer.CloudDamageDebuffMult;
|
||||
|
||||
// Enemies deal less contact damage while sick, due to being weakened.
|
||||
if (npc.poisoned)
|
||||
{
|
||||
float damageReductionFromPoison = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
|
||||
if (npc.Calamity().VulnerableToSickness.HasValue)
|
||||
{
|
||||
if (npc.Calamity().VulnerableToSickness.Value)
|
||||
damageReductionFromPoison *= 2f;
|
||||
else
|
||||
damageReductionFromPoison /= 2f;
|
||||
}
|
||||
damageReductionFromPoison = 1f - damageReductionFromPoison;
|
||||
|
||||
modifiers.SourceDamage *= damageReductionFromPoison;
|
||||
}
|
||||
|
||||
if (npc.venom)
|
||||
{
|
||||
float damageReductionFromVenom = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
|
||||
if (npc.Calamity().VulnerableToSickness.HasValue)
|
||||
{
|
||||
if (npc.Calamity().VulnerableToSickness.Value)
|
||||
damageReductionFromVenom *= 2f;
|
||||
else
|
||||
damageReductionFromVenom /= 2f;
|
||||
}
|
||||
damageReductionFromVenom = 1f - damageReductionFromVenom;
|
||||
|
||||
modifiers.SourceDamage *= damageReductionFromVenom;
|
||||
}
|
||||
|
||||
if (npc.Calamity().astralInfection)
|
||||
{
|
||||
float damageReductionFromAstralInfection = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
|
||||
if (npc.Calamity().VulnerableToSickness.HasValue)
|
||||
{
|
||||
if (npc.Calamity().VulnerableToSickness.Value)
|
||||
damageReductionFromAstralInfection *= 2f;
|
||||
else
|
||||
damageReductionFromAstralInfection /= 2f;
|
||||
}
|
||||
damageReductionFromAstralInfection = 1f - damageReductionFromAstralInfection;
|
||||
|
||||
modifiers.SourceDamage *= damageReductionFromAstralInfection;
|
||||
}
|
||||
|
||||
if (npc.Calamity().plague)
|
||||
{
|
||||
float damageReductionFromPlague = (float)((npc.Calamity().irradiated? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
|
||||
if (npc.Calamity().VulnerableToSickness.HasValue)
|
||||
{
|
||||
if (npc.Calamity().VulnerableToSickness.Value)
|
||||
damageReductionFromPlague *= 2f;
|
||||
else
|
||||
damageReductionFromPlague /= 2f;
|
||||
}
|
||||
damageReductionFromPlague = 1f - damageReductionFromPlague;
|
||||
|
||||
modifiers.SourceDamage *= damageReductionFromPlague;
|
||||
}
|
||||
|
||||
// Whispering Death makes enemies deal less damage
|
||||
if (npc.Calamity().whisperingDeath)
|
||||
{
|
||||
float damageReductionFromWhisperingDeath = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.1f);
|
||||
float damageReductionFromWhisperingDeath = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * WhisperingDeath.EnemyDamageReduction);
|
||||
if (npc.Calamity().VulnerableToSickness.HasValue)
|
||||
{
|
||||
if (npc.Calamity().VulnerableToSickness.Value)
|
||||
@@ -1354,11 +1302,11 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (rOfResilienceCooldown == 0 && rOfResilienceEffect > 0)
|
||||
{
|
||||
int cooldownTime = (Player.Calamity().profanedSoulRelicBuff ? 300 : 600);
|
||||
int cooldownTime = RelicOfResilience.baseCooldown;
|
||||
rOfResilienceCooldown = cooldownTime;
|
||||
Player.AddCooldown(Cooldowns.RelicOfResilienceCooldown.ID, cooldownTime);
|
||||
SoundStyle youGotHit = new("CalamityMod/Sounds/Custom/ProfanedGuardians/GuardianRockShieldActivate");
|
||||
SoundEngine.PlaySound(youGotHit with { Volume = 0.7f, Pitch = -0.1f }, Player.Center);
|
||||
SoundEngine.PlaySound(youGotHit with { Volume = 0.7f, Pitch = -0.5f }, Player.Center);
|
||||
}
|
||||
|
||||
if (alchFlask)
|
||||
@@ -1529,6 +1477,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.AddCooldown(GlobalDodge.ID, cooldownDuration);
|
||||
else
|
||||
Player.AddCooldown(GlobalDodge.ID, cooldownDuration, true, IconToUse);
|
||||
Player.SetImmuneTimeForAllTypes(Player.longInvince ? 120 : 80);
|
||||
}
|
||||
|
||||
//Dodge activation order is as follows:
|
||||
|
||||
@@ -101,6 +101,7 @@ namespace CalamityMod.CalPlayer
|
||||
ApplyDoTDebuff(whisperingDeath, 0, laudanum);
|
||||
|
||||
ApplyDoTDebuff(irradiated, 4);
|
||||
ApplyDoTDebuff(windChilled, 4);
|
||||
int sulphurDoT = 6 - (sulphurSet ? 2 : 0) - (sulphurskin ? 2 : 0) - (corrosiveSpine ? 2 : 0);
|
||||
ApplyDoTDebuff(sulphurPoison, sulphurDoT);
|
||||
ApplyDoTDebuff(riptide, 6);
|
||||
@@ -190,14 +191,30 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region Alcohol
|
||||
var dripPlayer = Player.GetModPlayer<IVDripPlayer>();
|
||||
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
int buff = Player.buffType[l];
|
||||
if (BuffDatasets.DebuffDataset[buff] is not null && BuffDatasets.DebuffDataset[buff].AlcoholLevel > 0)
|
||||
alcoholPoisonLevel += BuffDatasets.DebuffDataset[buff].AlcoholLevel + (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Everclear) ? 1 : 0);
|
||||
if (buff <= 0) continue;
|
||||
|
||||
var data = BuffDatasets.DebuffDataset[buff];
|
||||
if (data?.AlcoholLevel > 0)
|
||||
alcoholPoisonLevel += data.AlcoholLevel;
|
||||
}
|
||||
if (Player.Calamity().ivDrip) // +1 stack of poisoning while IV Drip is equipped
|
||||
alcoholPoisonLevel++;
|
||||
|
||||
if (dripPlayer.ivDripEquipped && dripPlayer.currentAlcohol != AlcoholType.None)
|
||||
{
|
||||
int ivBuffID = BuffDatasets.GetBuffIDFromAlcoholType(dripPlayer.currentAlcohol);
|
||||
|
||||
if (ivBuffID != -1)
|
||||
{
|
||||
var ivData = BuffDatasets.DebuffDataset[ivBuffID];
|
||||
if (ivData?.AlcoholLevel > 0)
|
||||
alcoholPoisonLevel += ivData.AlcoholLevel;
|
||||
}
|
||||
}
|
||||
|
||||
if (everclear)
|
||||
totalNegativeLifeRegen += Everclear.RegenLoss;
|
||||
if (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Everclear))
|
||||
@@ -347,7 +364,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
}
|
||||
|
||||
var dripPlayer = Player.GetModPlayer<IVDripPlayer>();
|
||||
if (dripPlayer.HasAlcohol(AlcoholType.TequilaSunrise))
|
||||
{
|
||||
if (hadLifeRegenHinderingDebuff && !hasLifeRegenHinderingDebuff)
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.Potions;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.Summon;
|
||||
@@ -17,6 +16,7 @@ using CalamityMod.Events;
|
||||
using CalamityMod.ExtraTextures;
|
||||
using CalamityMod.Items;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Accessories.Vanity;
|
||||
using CalamityMod.Items.Ammo;
|
||||
using CalamityMod.Items.Armor.Aerospec;
|
||||
using CalamityMod.Items.Armor.Auric;
|
||||
@@ -280,14 +280,14 @@ namespace CalamityMod.CalPlayer
|
||||
if ((XykVisualsBlue || XykVisualsOrange))
|
||||
{
|
||||
bool Orange = XykVisualsOrange;
|
||||
Color effectColor = Orange ? Color.Gold : Color.DodgerBlue;
|
||||
Color effectColor = Orange ? XyksBlessingOrange.baseMainColor : XyksBlessingBlue.baseMainColor;
|
||||
|
||||
float rate = Main.GlobalTimeWrappedHourly * 12;
|
||||
List<Color> eColors = new List<Color>()
|
||||
{
|
||||
Orange ? new Color(248, 117, 52) : Color.DodgerBlue,
|
||||
Orange ? Color.Gold : Color.Cyan,
|
||||
Orange ? Color.Orange : Color.RoyalBlue
|
||||
Orange ? XyksBlessingOrange.baseMainColor : XyksBlessingBlue.baseMainColor,
|
||||
Orange ? XyksBlessingOrange.baseAccentColor : XyksBlessingBlue.baseAccentColor,
|
||||
Orange ? XyksBlessingOrange.baseEffectColor : XyksBlessingBlue.baseEffectColor
|
||||
};
|
||||
int colorIndex = (int)(rate / 2 % eColors.Count);
|
||||
Color currentColor = eColors[colorIndex];
|
||||
@@ -296,7 +296,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
bool rageOrAdren = (Player.Calamity().rageModeActive || Player.Calamity().adrenalineModeActive);
|
||||
bool rageAndAdren = (Player.Calamity().rageModeActive && Player.Calamity().adrenalineModeActive);
|
||||
Color attemptColor = (rageAndAdren ? new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) : Player.Calamity().adrenalineModeActive ? Color.MediumSpringGreen : Player.Calamity().rageModeActive ? Color.Crimson : effectColor);
|
||||
Color dashColor = Orange ? XyksBlessingOrange.animEffectColor : XyksBlessingBlue.animEffectColor;
|
||||
Color attemptColor = (rageAndAdren ? new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) :
|
||||
Player.Calamity().adrenalineModeActive ? Color.MediumSpringGreen : Player.Calamity().rageModeActive ? Color.Crimson :
|
||||
Player.dashDelay == -1 ? dashColor : effectColor);
|
||||
XykFXColor = Color.Lerp(XykFXColor, attemptColor, rageOrAdren ? 0.05f : 0.25f);
|
||||
|
||||
|
||||
@@ -905,6 +908,11 @@ namespace CalamityMod.CalPlayer
|
||||
int scoriaOreID = ModContent.TileType<ScoriaOre>();
|
||||
int abyssKelpID = ModContent.TileType<AbyssKelp>();
|
||||
|
||||
// Auric Ore causes an Auric Rejection unless you are wearing Auric Armor or have God Mode
|
||||
// Auric Rejection causes an electrical explosion that yeets the player a considerable distance
|
||||
// CIT 17AUG2024: Despite providing full invulnerability, Silva armor revive intentionally does not prevent Auric rejection's yeeting.
|
||||
// 25FEB2025 Ozzatron: Added external bool to control Auric Rejection immunity from the ore.
|
||||
bool rejectionImmunity = auricSet || seraphTracers || Player.creativeGodMode || externalAuricRejectionImmunity;
|
||||
int auricRejectionDamage = 300;
|
||||
float auricRejectionKB = Player.noKnockback ? 20f : 40f;
|
||||
|
||||
@@ -941,11 +949,6 @@ namespace CalamityMod.CalPlayer
|
||||
Player.AddBuff(BuffID.Burning, 2);
|
||||
}
|
||||
|
||||
// Auric Ore causes an Auric Rejection unless you are wearing Auric Armor or have God Mode
|
||||
// Auric Rejection causes an electrical explosion that yeets the player a considerable distance
|
||||
// CIT 17AUG2024: Despite providing full invulnerability, Silva armor revive intentionally does not prevent Auric rejection's yeeting.
|
||||
// 25FEB2025 Ozzatron: Added external bool to control Auric Rejection immunity from the ore.
|
||||
bool rejectionImmunity = auricSet || seraphTracers || Player.creativeGodMode || externalAuricRejectionImmunity;
|
||||
bool oreRejection = (tile.TileType == auricOreID) && !rejectionImmunity;
|
||||
|
||||
// Repulsers always perform this effect because they are player-placed tiles made for this exact purpose
|
||||
@@ -972,6 +975,16 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Custom/ExoMechs/TeslaShoot1"), Player.Center);
|
||||
}
|
||||
}
|
||||
|
||||
if (Player.sitting.TryGetSittingBlock(Player, out Tile AuricToiletTile) && !rejectionImmunity)
|
||||
{
|
||||
Player.Hurt(PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.AuricRejection").ToNetworkText(Player.name)), auricRejectionDamage, 0);
|
||||
Player.AddBuff(ModContent.BuffType<AuricRebuke>(), 120);
|
||||
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Custom/ExoMechs/TeslaShoot1"), Player.Center);
|
||||
Player.sitting.SitUp(Player, false);
|
||||
Vector2 yeetVec = new Vector2(Player.direction, -1.5f);
|
||||
Player.velocity += yeetVec * auricRejectionKB;
|
||||
}
|
||||
}
|
||||
private void HandleBlazingMouseEffects()
|
||||
{
|
||||
@@ -1688,52 +1701,101 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
float minVis = 0.001f;
|
||||
if (fishStockVisual > minVis) // Fish stock effects are active as long as the UI exists, even if the player removes the item
|
||||
{
|
||||
fishStockSlidingPower = MathHelper.Lerp(fishStockSlidingPower, fishStockPower, 0.05f);
|
||||
if (Player.miscCounter % 60 == 0)
|
||||
{
|
||||
bool isExtreme = fishStockPower > 1.5f || fishStockPower < -1.5f;
|
||||
float smallJump = Main.rand.NextBool(4) ? 0.55f : 0;
|
||||
float bigJump = Main.rand.NextBool(isExtreme ? 7 : 10) ? 1.8f : 0;
|
||||
int riseOrFall = Main.rand.NextBool() ? -1 : 1;
|
||||
float newFishStockPower = Math.Clamp(fishStockPower + (Main.rand.NextFloat(0.1f, 0.2f) + Math.Max(smallJump, bigJump)) * riseOrFall, -2, 2);
|
||||
fishStockOldPower = // Cycle each power point up as the new point is gotten
|
||||
(fishStockPower,
|
||||
fishStockOldPower.Item1,
|
||||
fishStockOldPower.Item2,
|
||||
fishStockOldPower.Item3,
|
||||
fishStockOldPower.Item4);
|
||||
fishStockPower = newFishStockPower;
|
||||
}
|
||||
// Stats
|
||||
Player.GetDamage<GenericDamageClass>() += 0.15f * fishStockPower;
|
||||
Player.GetCritChance<GenericDamageClass>() += 10 * fishStockPower;
|
||||
Player.Calamity().critDamage += 0.15f * fishStockPower;
|
||||
Player.statDefense += (int)(10 * fishStockPower);
|
||||
Player.endurance += 0.1f * fishStockPower;
|
||||
Player.lifeRegen += (int)(6 * fishStockPower);
|
||||
Player.pickSpeed -= 0.25f * fishStockPower;
|
||||
Player.fishingSkill += (int)(50 * fishStockPower);
|
||||
Player.luck += 0.55f * fishStockPower;
|
||||
float CoinMult = MathF.Abs(fishStockPower) * 1.5f;
|
||||
float givenMult = (fishStockPower < 0 ? (1 / CoinMult) : CoinMult);
|
||||
Player.Calamity().coinDropMult = givenMult;
|
||||
}
|
||||
// Only put away fish stocks if the stocks are even or higher, or if they've already been started to be put away
|
||||
float goalVis = (!fishStocks && (fishStockPower >= 0 || fishStockVisual < 0.9f)) ? 0 : 1;
|
||||
fishStockVisual = MathF.Round(MathHelper.Lerp(fishStockVisual, goalVis, 0.05f), 4); // Fade in and out the U
|
||||
|
||||
// The fire boots debuff boosts
|
||||
// bootLevel exists SO THAT THEY DO NOT STACK. Please help me maintain my sanity so we're not "fixing" this issue seventy times
|
||||
if (bootLevel > 0)
|
||||
HeatDebuffMultiplier += 0.25f * bootLevel;
|
||||
|
||||
if (rOfResilienceEffect > 0)
|
||||
rOfResilienceEffect--;
|
||||
if (Player.HeldItem.type == ModContent.ItemType<RelicOfResilience>()) // All players close to a player holding RoR get the benefits
|
||||
bool holdingRoR = Player.HeldItem.type == ModContent.ItemType<RelicOfResilience>();
|
||||
bool shieldIsSetup = (rOfResilienceEffect >= RelicOfResilience.baseTimeMax);
|
||||
bool chargedButNotHolding = (rOfResilienceEffect > RelicOfResilience.baseTimeMax && !holdingRoR);
|
||||
bool reduceEffect = (!shieldIsSetup || chargedButNotHolding);
|
||||
if (rOfResilienceEffect > 0 && reduceEffect)
|
||||
{ rOfResilienceEffect -= (chargedButNotHolding ? 4 : 1); if (shieldIsSetup && rOfResilienceEffect < RelicOfResilience.baseTimeMax) rOfResilienceEffect = RelicOfResilience.baseTimeMax; if (rOfResilienceEffect < 0) rOfResilienceEffect = 0; }
|
||||
if (holdingRoR) // All players close to a player holding RoR get the benefits
|
||||
{
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<RelicGuard>()] < 1 && !Player.dead)
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<RelicGuard>()] < 1 && !Player.dead && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Projectile relic = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType<RelicGuard>(), 0, 0f, Player.whoAmI);
|
||||
}
|
||||
for (int index = 0; index < Main.player.Length; index++)
|
||||
{
|
||||
Player fella = Main.player[index];
|
||||
if (Utils.Distance(fella.Center, Player.Center) < 650 && fella.team == Player.team)
|
||||
float maxDistancePlayersCanBe = 1000;
|
||||
bool validEffectBoost = Utils.Distance(fella.Center, Player.Center) < maxDistancePlayersCanBe && fella.team == Player.team && fella.Calamity().rOfResilienceEffect < RelicOfResilience.maxPowerTime
|
||||
&& fella.Calamity().rOfResilienceCooldown == 0 && (fella.Calamity().rOfResilienceEffect > RelicOfResilience.baseTimeMax ? holdingRoR : true);
|
||||
if (validEffectBoost)
|
||||
{
|
||||
fella.Calamity().rOfResilienceEffect = (fella != Player ? 480 : 2);
|
||||
fella.Calamity().rOfResilienceEffect += (reduceEffect ? 2 : 1) + (Player.Calamity().profanedSoulRelicBuff ? 1 : 0); // gets subtracted by 1 every frame, so this goes up by more to keep up
|
||||
}
|
||||
}
|
||||
}
|
||||
// Adds a floor for defense and dr, will not ignore defense damage
|
||||
if (Player.Calamity().rOfResilienceCooldown >= RelicOfResilience.baseCooldown / 2|| Player.Calamity().rOfResilienceCooldown == 0)
|
||||
{
|
||||
float fadeInStats = Utils.GetLerpValue(0, RelicOfResilience.baseTimeMax, rOfResilienceEffect, true);
|
||||
float fadeStats = (Player.Calamity().rOfResilienceCooldown == 0 ? fadeInStats : MathF.Pow(Utils.GetLerpValue(RelicOfResilience.baseCooldown / 2, RelicOfResilience.baseCooldown, Player.Calamity().rOfResilienceCooldown, true), 3));
|
||||
float overchargeBoost = 1 + (Utils.GetLerpValue(RelicOfResilience.baseTimeMax, RelicOfResilience.maxPowerTime, rOfResilienceEffect, true) * (Player.Calamity().profanedSoulRelicBuff ? RelicOfResilience.additionalMaxPowerDefensesMult * 5 : RelicOfResilience.additionalMaxPowerDefensesMult)); // The amount of bulk this gives with artifact is way overkill but it is REALLY funny
|
||||
int def = (int)(RelicOfResilience.baseDefenseFloor * overchargeBoost);
|
||||
float dr = RelicOfResilience.baseDrFloor * overchargeBoost;
|
||||
int maxDefFloor = (int)(def * fadeStats);
|
||||
float MaxDRFloor = dr * fadeStats;
|
||||
if (Player.statDefense < maxDefFloor)
|
||||
Player.statDefense += maxDefFloor - Player.statDefense;
|
||||
if (Player.endurance < MaxDRFloor)
|
||||
Player.endurance += MaxDRFloor - Player.endurance;
|
||||
}
|
||||
if (rOfResilienceEffect > 0)
|
||||
{
|
||||
if (Player.Calamity().mouseRight && !Player.mouseInterface && rOfResilienceCooldown == 0)
|
||||
if (Player.Calamity().mouseRight && !Player.mouseInterface && rOfResilienceCooldown == 0 && holdingRoR)
|
||||
{
|
||||
int cooldownTime = (Player.Calamity().profanedSoulRelicBuff ? 300 : 600);
|
||||
int cooldownTime = RelicOfResilience.baseCooldown;
|
||||
rOfResilienceCooldown = cooldownTime;
|
||||
Player.AddCooldown(Cooldowns.RelicOfResilienceCooldown.ID, cooldownTime);
|
||||
SoundStyle y = new("CalamityMod/Sounds/Custom/ProfanedGuardians/GuardianRockShieldActivate");
|
||||
SoundEngine.PlaySound(y with { Volume = 0.7f, Pitch = -0.1f }, Player.Center);
|
||||
}
|
||||
|
||||
// Adds a floor for defense and dr at 150 and 10% respectivley, will not ignore defense damage
|
||||
if (Player.Calamity().rOfResilienceCooldown > 300 || Player.Calamity().rOfResilienceCooldown == 0)
|
||||
{
|
||||
float fadeStats = (Player.Calamity().rOfResilienceCooldown == 0 ? 1 : Utils.GetLerpValue(300, 600, Player.Calamity().rOfResilienceCooldown, true));
|
||||
int maxDefFloor = (int)(150 * fadeStats);
|
||||
float MaxDRFloor = 0.10f * fadeStats;
|
||||
if (Player.statDefense < maxDefFloor)
|
||||
Player.statDefense += maxDefFloor - Player.statDefense;
|
||||
if (Player.endurance < MaxDRFloor)
|
||||
Player.endurance += MaxDRFloor - Player.endurance;
|
||||
}
|
||||
|
||||
int shardBaseCap = (Player.Calamity().profanedSoulRelicBuff ? (int)(RelicOfResilience.baseMaxShardCount * 1.5f) : RelicOfResilience.baseMaxShardCount);
|
||||
float postMaxedShards = MathHelper.Lerp(shardBaseCap, shardBaseCap * RelicOfResilience.maxPowerShardMult, MathF.Pow(Utils.GetLerpValue(RelicOfResilience.baseTimeMax, RelicOfResilience.maxPowerTime, rOfResilienceEffect, true), 2));
|
||||
int maxShards = (int)(postMaxedShards * Utils.GetLerpValue(0, RelicOfResilience.baseTimeMax, rOfResilienceEffect, true));
|
||||
int numOfShards = 0;
|
||||
for (int x = 0; x < Main.maxProjectiles; x++)
|
||||
{
|
||||
@@ -1743,7 +1805,26 @@ namespace CalamityMod.CalPlayer
|
||||
numOfShards++;
|
||||
}
|
||||
}
|
||||
if (Player.miscCounter % (Player.Calamity().profanedSoulRelicBuff ? 4 : 8) == 0 && numOfShards < (Player.Calamity().profanedSoulRelicBuff ? 75 : 30) && Player.Calamity().rOfResilienceCooldown == 0)
|
||||
float lowestNum = 0;
|
||||
int whoAmI = 0;
|
||||
if (numOfShards > maxShards) // Kill the most recent shard if there's too many
|
||||
{
|
||||
for (int x = 0; x < Main.maxProjectiles; x++)
|
||||
{
|
||||
Projectile projectile = Main.projectile[x];
|
||||
if (projectile.active && projectile.type == ModContent.ProjectileType<ArtifactOfResilienceShards>() && projectile.ai[1] == 0 && projectile.owner == Player.whoAmI && projectile.ai[2] > lowestNum)
|
||||
{
|
||||
whoAmI = projectile.whoAmI;
|
||||
lowestNum = projectile.ai[2];
|
||||
}
|
||||
}
|
||||
if (whoAmI != 0)
|
||||
{
|
||||
Projectile shard = Main.projectile[whoAmI];
|
||||
shard.ai[1] = -1;
|
||||
}
|
||||
}
|
||||
if (numOfShards < maxShards && Player.Calamity().rOfResilienceCooldown == 0 && (rOfResilienceEffect >= RelicOfResilience.baseTimeMax || holdingRoR))
|
||||
{
|
||||
if (numOfShards == 0)
|
||||
{
|
||||
@@ -1751,12 +1832,13 @@ namespace CalamityMod.CalPlayer
|
||||
SoundStyle sound = new("CalamityMod/Sounds/Custom/ProfanedGuardians/GuardianDash");
|
||||
SoundEngine.PlaySound(sound with { Volume = 0.5f, Pitch = -0.3f }, Player.Center);
|
||||
}
|
||||
int shardDamage = (int)Player.GetBestClassDamage().ApplyTo(420);
|
||||
Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, new Vector2(1, 0), ModContent.ProjectileType<ArtifactOfResilienceShards>(), shardDamage, 0f, Player.whoAmI, 0, 0, numOfShards + 1);
|
||||
int shardDamage = (int)Player.GetBestClassDamage().ApplyTo(Player.Calamity().profanedSoulRelicBuff ? RelicOfResilience.shardBaseDamage * 5 : RelicOfResilience.shardBaseDamage);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, new Vector2(1, 0), ModContent.ProjectileType<ArtifactOfResilienceShards>(), shardDamage, 0f, Player.whoAmI, 0, 0, numOfShards + 1);
|
||||
}
|
||||
}
|
||||
if (rOfResilienceCooldown > 0)
|
||||
rOfResilienceCooldown--;
|
||||
{ rOfResilienceCooldown -= (holdingRoR ? 2 : 1); if (rOfResilienceCooldown < 0) rOfResilienceCooldown = 0; }
|
||||
|
||||
if (Player.Calamity().friendlyMinions > 0)
|
||||
{
|
||||
@@ -2310,7 +2392,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (bloomStoneTotalHeal > 0)
|
||||
{
|
||||
float healRateDiv = (Player.statLife >= Player.statLifeMax ? 5 : // 5 times as slow if at max hp already (overheal prevention)
|
||||
float healRateDiv = (Player.statLife >= Player.statLifeMax ? 2 : // 2 times as slow if at max hp already (overheal prevention)
|
||||
bloomStoneBuffedHealRateTimer > 0 ? Utils.Remap(bloomStoneBuffedHealRateTimer, 90, 0, 0.5f, 1f, true) // 2 times faster if pollen buffed, scales back down to regular speed as the buff fades
|
||||
: 1); // Regular speed
|
||||
bloomStoneHealRate = 1 / healRateDiv;
|
||||
@@ -3766,7 +3848,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeMagnet = true;
|
||||
|
||||
if (whisperingDeath && !laudanum)
|
||||
Player.GetDamage<GenericDamageClass>() -= 0.2f;
|
||||
Player.GetDamage<GenericDamageClass>() -= WhisperingDeath.PlayerDamageReduction;
|
||||
|
||||
if (armorCrunch && !laudanum)
|
||||
{
|
||||
@@ -4379,7 +4461,7 @@ namespace CalamityMod.CalPlayer
|
||||
else if (hasBuff == ModContent.BuffType<WhisperingDeath>())
|
||||
{
|
||||
Player.lifeRegenCount += 5;
|
||||
Player.GetDamage<GenericDamageClass>() += 0.2f;
|
||||
Player.GetDamage<GenericDamageClass>() += WhisperingDeath.PlayerDamageReduction;
|
||||
}
|
||||
|
||||
switch (hasBuff)
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
target.Calamity().IncreasedColdEffects_EskimoSet = eskimoSet;
|
||||
target.Calamity().IncreasedColdEffects_CryoStone = CryoStone;
|
||||
target.Calamity().IncreasedColdEffects_FrozenCube = frozenCube;
|
||||
|
||||
target.Calamity().IncreasedElectricityEffects_Unused = false;
|
||||
|
||||
@@ -1288,7 +1289,7 @@ namespace CalamityMod.CalPlayer
|
||||
//Nanotech has the same heal as Electrician's glove
|
||||
Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, electricianGlove ? 10 : 5, electricianGlove ? 2f : 3f);
|
||||
|
||||
if (proj.CountsAsClass<MagicDamageClass>() && Player.HeldItem.CountsAsClass<MagicDamageClass>())
|
||||
if (proj.CountsAsClass<MagicDamageClass>())
|
||||
{
|
||||
if (manaOverloader)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.Items.Tools;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
@@ -12,5 +14,11 @@ namespace CalamityMod.Cooldowns
|
||||
public override Color OutlineColor => new Color(255, 191, 73);
|
||||
public override Color CooldownStartColor => new Color(122, 66, 59);
|
||||
public override Color CooldownEndColor => new Color(165, 103, 87);
|
||||
|
||||
public override void Tick()
|
||||
{
|
||||
if (instance.player.HeldItem.type == ModContent.ItemType<RelicOfResilience>())
|
||||
instance.timeLeft--;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -10,6 +12,7 @@ namespace CalamityMod.DataStructures
|
||||
[ReinitializeDuringResizeArrays]
|
||||
public static class BuffDatasets
|
||||
{
|
||||
private static DebuffData Alch(int level) => new DebuffData() { AlcoholLevel = level };
|
||||
public static DebuffData[] DebuffDataset = BuffID.Sets.Factory.CreateNamedSet("DebuffData")
|
||||
.Description("Stores DebuffData for a particular debuff")
|
||||
.RegisterCustomSet<DebuffData>(null,
|
||||
@@ -24,8 +27,69 @@ namespace CalamityMod.DataStructures
|
||||
BuffID.Poisoned, DebuffData.Poisoned,
|
||||
BuffID.Venom, DebuffData.AcidVenom,
|
||||
BuffID.Electrified, DebuffData.Electrified,
|
||||
BuffID.Oiled, DebuffData.Oiled
|
||||
BuffID.Oiled, DebuffData.Oiled,
|
||||
|
||||
BuffID.Tipsy, Alch(1),
|
||||
ModContent.BuffType<BloodyMaryBuff>(), Alch(1),
|
||||
ModContent.BuffType<CaribbeanRumBuff>(), Alch(1),
|
||||
ModContent.BuffType<CinnamonRollBuff>(), Alch(1),
|
||||
ModContent.BuffType<EvergreenGinBuff>(), Alch(1),
|
||||
ModContent.BuffType<FireballBuff>(), Alch(1),
|
||||
ModContent.BuffType<GrapeBeerBuff>(), Alch(1),
|
||||
ModContent.BuffType<ManhattanBuff>(), Alch(1),
|
||||
ModContent.BuffType<MargaritaBuff>(), Alch(1),
|
||||
ModContent.BuffType<MoonshineBuff>(), Alch(1),
|
||||
ModContent.BuffType<MoscowMuleBuff>(), Alch(1),
|
||||
ModContent.BuffType<OldFashionedBuff>(), Alch(1),
|
||||
ModContent.BuffType<PurpleHazeBuff>(), Alch(1),
|
||||
ModContent.BuffType<RedWineBuff>(), Alch(1),
|
||||
ModContent.BuffType<RumBuff>(), Alch(1),
|
||||
ModContent.BuffType<ScrewdriverBuff>(), Alch(1),
|
||||
ModContent.BuffType<StarBeamRyeBuff>(), Alch(1),
|
||||
ModContent.BuffType<TequilaBuff>(), Alch(1),
|
||||
ModContent.BuffType<TequilaSunriseBuff>(), Alch(1),
|
||||
ModContent.BuffType<VodkaBuff>(), Alch(1),
|
||||
ModContent.BuffType<WhiskeyBuff>(), Alch(1),
|
||||
ModContent.BuffType<WhiteWineBuff>(), Alch(1),
|
||||
|
||||
ModContent.BuffType<EverclearBuff>(), Alch(2),
|
||||
ModContent.BuffType<BaconOilBuff>(), Alch(3)
|
||||
);
|
||||
public static int GetBuffIDFromAlcoholType(AlcoholType type)
|
||||
{
|
||||
return type switch
|
||||
{
|
||||
AlcoholType.BaconOil => ModContent.BuffType<BaconOilBuff>(),
|
||||
AlcoholType.BloodyMary => ModContent.BuffType<BloodyMaryBuff>(),
|
||||
AlcoholType.CaribbeanRum => ModContent.BuffType<CaribbeanRumBuff>(),
|
||||
AlcoholType.CinnamonRoll => ModContent.BuffType<CinnamonRollBuff>(),
|
||||
AlcoholType.Everclear => ModContent.BuffType<EverclearBuff>(),
|
||||
AlcoholType.EvergreenGin => ModContent.BuffType<EvergreenGinBuff>(),
|
||||
AlcoholType.Fireball => ModContent.BuffType<FireballBuff>(),
|
||||
AlcoholType.GrapeBeer => ModContent.BuffType<GrapeBeerBuff>(),
|
||||
AlcoholType.Manhattan => ModContent.BuffType<ManhattanBuff>(),
|
||||
AlcoholType.Margarita => ModContent.BuffType<MargaritaBuff>(),
|
||||
AlcoholType.Moonshine => ModContent.BuffType<MoonshineBuff>(),
|
||||
AlcoholType.MoscowMule => ModContent.BuffType<MoscowMuleBuff>(),
|
||||
AlcoholType.OldFashioned => ModContent.BuffType<OldFashionedBuff>(),
|
||||
AlcoholType.PurpleHaze => ModContent.BuffType<PurpleHazeBuff>(),
|
||||
AlcoholType.RedWine => ModContent.BuffType<RedWineBuff>(),
|
||||
AlcoholType.Rum => ModContent.BuffType<RumBuff>(),
|
||||
AlcoholType.Screwdriver => ModContent.BuffType<ScrewdriverBuff>(),
|
||||
AlcoholType.StarBeamRye => ModContent.BuffType<StarBeamRyeBuff>(),
|
||||
AlcoholType.Tequila => ModContent.BuffType<TequilaBuff>(),
|
||||
AlcoholType.TequilaSunrise => ModContent.BuffType<TequilaSunriseBuff>(),
|
||||
AlcoholType.Vodka => ModContent.BuffType<VodkaBuff>(),
|
||||
AlcoholType.Whiskey => ModContent.BuffType<WhiskeyBuff>(),
|
||||
AlcoholType.WhiteWine => ModContent.BuffType<WhiteWineBuff>(),
|
||||
|
||||
// Vanilla treats both Ale and Sake as the "Tipsy" buff
|
||||
AlcoholType.Ale => BuffID.Tipsy,
|
||||
AlcoholType.Sake => BuffID.Tipsy,
|
||||
|
||||
_ => -1
|
||||
};
|
||||
}
|
||||
}
|
||||
public class DebuffData
|
||||
{
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace CalamityMod.Items.Accessories
|
||||
AddIngredient<MysteriousCircuitry>(15).
|
||||
AddIngredient<DubiousPlating>(15).
|
||||
AddIngredient(ItemID.LunarBar, 10).
|
||||
AddIngredient<GalacticaSingularity>(4).
|
||||
AddIngredient(ItemID.FragmentVortex, 5).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class FishStocks : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 30;
|
||||
Item.height = 38;
|
||||
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.accessory = true;
|
||||
}
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().fishStocks = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 622 B |
@@ -0,0 +1,60 @@
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class FrozenCube : ModItem, ILocalizedModType
|
||||
{
|
||||
public static int mistBaseDamage = 1;
|
||||
public static int slamBaseDamage = 20;
|
||||
public static int baseAttackSpeed = 90;
|
||||
public static int baseAttackCooldown = 180;
|
||||
|
||||
public static int usedDefenseDivide = 3;
|
||||
public static int debuff = ModContent.BuffType<WindChilled>();
|
||||
|
||||
public static readonly SoundStyle noise = new("CalamityMod/Sounds/Item/ElumphantSound") { Volume = 0.6f };
|
||||
public static readonly SoundStyle cry = new("CalamityMod/Sounds/Item/ElumphantCry") { Volume = 0.6f };
|
||||
public static readonly SoundStyle hit = new("CalamityMod/Sounds/Item/ElumphantBop") { Volume = 0.6f };
|
||||
public static readonly SoundStyle jokeBonk = new("CalamityMod/Sounds/Item/Bonk") { Volume = 0.6f };
|
||||
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 34;
|
||||
Item.height = 34;
|
||||
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.accessory = true;
|
||||
}
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.frozenCube = true;
|
||||
modPlayer.frozenCubeVisuals = !hideVisual;
|
||||
|
||||
int projectile = ProjectileType<Elumphant>();
|
||||
if (player.ownedProjectileCounts[projectile] < 1 && !player.dead)
|
||||
{
|
||||
int damage = (int)player.GetTotalDamage<GenericDamageClass>().ApplyTo(slamBaseDamage);
|
||||
Projectile.NewProjectileDirect(player.GetSource_FromThis(), player.Center, Vector2.Zero, projectile, damage, 0f, player.whoAmI);
|
||||
}
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
if (Main.LocalPlayer != null)
|
||||
list.FindAndReplace("[DAMAGELINE]", Main.LocalPlayer.Calamity().frozenCube ?
|
||||
this.GetLocalization("EquippedDebuff").Format((Main.LocalPlayer.Calamity().frozenCubeDebuffBoost.ToPercent("N0")).ToString()) + "\n" +
|
||||
this.GetLocalization("EquippedElumphant").Format((Main.LocalPlayer.Calamity().frozenCubeElumphantBoost.ToPercent("N1")).ToString())
|
||||
: this.GetLocalizedValue("Unequipped"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 794 B |
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public override bool CanEquipAccessory(Player player, int slot, bool modded)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (modPlayer.brimElemental || modPlayer.sandElemental || modPlayer.rareSandElemental || modPlayer.cloudElemental || modPlayer.waterElemental)
|
||||
if (modPlayer.brimElemental || modPlayer.sandElemental || modPlayer.oasisElemental || modPlayer.cloudElemental || modPlayer.waterElemental)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -177,7 +177,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<ElementalinaBottle>().
|
||||
AddIngredient<RareElementalinaBottle>().
|
||||
AddIngredient<OasisElementalinaBottle>().
|
||||
AddIngredient<PearlofEnthrallment>().
|
||||
AddIngredient<EyeoftheStorm>().
|
||||
AddIngredient<RoseStone>().
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public enum AlcoholType
|
||||
{
|
||||
None,
|
||||
BaconOil,
|
||||
BloodyMary,
|
||||
CaribbeanRum,
|
||||
CinnamonRoll,
|
||||
@@ -39,7 +40,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Whiskey,
|
||||
WhiteWine,
|
||||
Ale,
|
||||
Sake
|
||||
Sake,
|
||||
}
|
||||
|
||||
public interface IAlcoholItem
|
||||
@@ -57,14 +58,14 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.RegisterItemAnimation(Item.type, new Terraria.DataStructures.DrawAnimationVertical(1, 25));
|
||||
Main.RegisterItemAnimation(Item.type, new Terraria.DataStructures.DrawAnimationVertical(1, 26));
|
||||
ItemID.Sets.AnimatesAsSoul[Item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 58;
|
||||
Item.height = 62;
|
||||
Item.height = 60;
|
||||
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
|
||||
Item.rare = ItemRarityID.Lime;
|
||||
Item.accessory = true;
|
||||
@@ -189,7 +190,6 @@ namespace CalamityMod.Items.Accessories
|
||||
if (effectLine != null)
|
||||
{
|
||||
effectLine.Text = this.GetLocalizedValue("Empty");
|
||||
effectLine.OverrideColor = Color.Gray;
|
||||
}
|
||||
nameLine?.Hide();
|
||||
return;
|
||||
@@ -220,7 +220,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
Texture2D texture = TextureAssets.Item[Item.type].Value;
|
||||
|
||||
int frameHeight = texture.Height / 25;
|
||||
int frameHeight = texture.Height / 26;
|
||||
int frameIndex = (int)currentAlcoholType;
|
||||
|
||||
Rectangle targetFrame = new Rectangle(0, frameIndex * frameHeight, texture.Width, frameHeight);
|
||||
@@ -228,6 +228,21 @@ namespace CalamityMod.Items.Accessories
|
||||
spriteBatch.Draw(texture, position, targetFrame, drawColor, 0f, origin, scale, SpriteEffects.None, 0f);
|
||||
return false;
|
||||
}
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture = TextureAssets.Item[Item.type].Value;
|
||||
|
||||
int frameHeight = texture.Height / 26;
|
||||
int frameIndex = (int)currentAlcoholType;
|
||||
|
||||
Rectangle targetFrame = new Rectangle(0, frameIndex * frameHeight, texture.Width, frameHeight);
|
||||
|
||||
Vector2 drawPosition = Item.position - Main.screenPosition + new Vector2(Item.width / 2, Item.height - frameHeight / 2);
|
||||
Vector2 origin = targetFrame.Size() / 2f;
|
||||
|
||||
spriteBatch.Draw(texture, drawPosition, targetFrame, lightColor, rotation, origin, scale, SpriteEffects.None, 0f);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class IVDripPlayer : ModPlayer
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
@@ -56,7 +56,8 @@ namespace CalamityMod.Items.Accessories
|
||||
CreateRecipe().
|
||||
AddIngredient<FeatherCrown>().
|
||||
AddIngredient(ItemID.LunarBar, 5).
|
||||
AddIngredient<GalacticaSingularity>(5).
|
||||
AddIngredient(ItemID.FragmentNebula, 5).
|
||||
AddIngredient<CoreofCalamity>(2).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
@@ -39,6 +40,7 @@ namespace CalamityMod.Items.Accessories
|
||||
AddIngredient<RogueEmblem>().
|
||||
AddIngredient<VampiricTalisman>().
|
||||
AddIngredient<ElectriciansGlove>().
|
||||
AddIngredient(ItemID.LunarBar, 8).
|
||||
AddIngredient<AscendantSpiritEssence>(4).
|
||||
AddTile<CosmicAnvil>().
|
||||
Register();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -8,8 +9,8 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("WifeinaBottlewithBoobs")] // Yes, that was the actual name.
|
||||
public class RareElementalinaBottle : ModItem, ILocalizedModType
|
||||
[LegacyName("WifeinaBottlewithBoobs", "RareElementalinaBottle")] // Yes, that was the actual name.
|
||||
public class OasisElementalinaBottle : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
@@ -38,12 +39,12 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.rareSandElemental = true;
|
||||
modPlayer.oasisElemental = true;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (player.FindBuffIndex(ModContent.BuffType<RareSandElemental>()) == -1)
|
||||
if (player.FindBuffIndex(ModContent.BuffType<OasisElementalBuff>()) == -1)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<RareSandElemental>(), 3600, true);
|
||||
player.AddBuff(ModContent.BuffType<OasisElementalBuff>(), 3600, true);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] < 1)
|
||||
{
|
||||
@@ -59,12 +60,12 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateVanity(Player player)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.rareSandElementalVanity = true;
|
||||
modPlayer.oasisElementalVanity = true;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (player.FindBuffIndex(ModContent.BuffType<RareSandElemental>()) == -1)
|
||||
if (player.FindBuffIndex(ModContent.BuffType<OasisElementalBuff>()) == -1)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<RareSandElemental>(), 3600, true);
|
||||
player.AddBuff(ModContent.BuffType<OasisElementalBuff>(), 3600, true);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] < 1)
|
||||
{
|
||||
|
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 472 B |
|
Before Width: | Height: | Size: 540 B |
@@ -49,7 +49,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CreateRecipe().
|
||||
AddRecipeGroup("AnyQuiver").
|
||||
AddIngredient<GalacticaSingularity>(5).
|
||||
AddIngredient(ItemID.FragmentVortex, 5).
|
||||
AddIngredient<DarkPlasma>(3).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
|
||||
@@ -39,11 +39,11 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.rBrain = true; // Handles shaderain cloud spawning on hit
|
||||
modPlayer.amalgam = true;
|
||||
player.brainOfConfusionItem = Item;
|
||||
modPlayer.HeatDebuffMultiplier += 3f;
|
||||
modPlayer.ColdDebuffMultiplier += 3f;
|
||||
modPlayer.SicknessDebuffMultiplier += 3f;
|
||||
modPlayer.WaterDebuffMultiplier += 3f;
|
||||
modPlayer.ElectricDebuffMultiplier += 3f;
|
||||
modPlayer.HeatDebuffMultiplier += 2f;
|
||||
modPlayer.ColdDebuffMultiplier += 2f;
|
||||
modPlayer.SicknessDebuffMultiplier += 2f;
|
||||
modPlayer.WaterDebuffMultiplier += 2f;
|
||||
modPlayer.ElectricDebuffMultiplier += 2f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -1,9 +1,20 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.BaseItems;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.NetModules;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Terraria.Net;
|
||||
|
||||
namespace CalamityMod.Items.Accessories.Vanity
|
||||
@@ -11,7 +22,14 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
public class XyksBlessingBlue : TransformationAccessory, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
int itemFrame = 0;
|
||||
int itemFrameTimer = 1;
|
||||
int pulseTimer = 0;
|
||||
public static Vector2 extraPosition = Vector2.Zero;
|
||||
public static Color baseEffectColor = new Color(150, 255, 210); // Teal-ish Glow
|
||||
public static Color animEffectColor = new Color(255, 85, 252); // Purple Flash
|
||||
public static Color baseMainColor = new Color(25, 118, 218); // Mid Blue
|
||||
public static Color baseAccentColor = new Color(0, 255, 250); // Light blue
|
||||
public override (EquipType, string, string)[] EquipSlots =>
|
||||
[
|
||||
(EquipType.Head, "Xyk", null),
|
||||
@@ -19,11 +37,104 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
(EquipType.Legs, "Xyk", null),
|
||||
(EquipType.Wings, null, null), //results in setting this equip slot to -1
|
||||
];
|
||||
public static Asset<Texture2D> Texture = ModContent.Request<Texture2D>("CalamityMod/Items/Accessories/Vanity/XyksBlessingBlueAnim");
|
||||
public static Asset<Texture2D> AltTexture = ModContent.Request<Texture2D>("CalamityMod/Items/Accessories/Vanity/XyksBlessingBlueAnim2");
|
||||
public static Asset<Texture2D> ShapeTexture = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomRing");
|
||||
public static Asset<Texture2D> BloomTexture = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle");
|
||||
|
||||
bool NoArmorEnabled = false;
|
||||
bool DoTransformAnimation = false;
|
||||
float effectsMult = 1;
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
tooltips.FindAndReplace("[TOGGLE]", NoArmorEnabled ? this.GetLocalizedValue("ArmorDisabled") : this.GetLocalizedValue("ArmorEnabled"));
|
||||
}
|
||||
public override bool ConsumeItem(Player player) => !Main.keyState.PressingShift();
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
tag.Add("noArmor", NoArmorEnabled);
|
||||
tag.Add("doAnim", DoTransformAnimation);
|
||||
}
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
NoArmorEnabled = tag.GetBool("noArmor");
|
||||
DoTransformAnimation = tag.GetBool("doAnim");
|
||||
}
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(NoArmorEnabled);
|
||||
writer.Write(DoTransformAnimation);
|
||||
}
|
||||
public override void NetReceive(BinaryReader reader)
|
||||
{
|
||||
NoArmorEnabled = reader.ReadBoolean();
|
||||
DoTransformAnimation = reader.ReadBoolean();
|
||||
}
|
||||
public Rectangle GetFrame()
|
||||
{
|
||||
Texture2D texture = DoTransformAnimation ? AltTexture.Value : Texture.Value;
|
||||
int vertialFramesNum = DoTransformAnimation ? 13 : 20;
|
||||
Rectangle frame = texture.Frame(verticalFrames: vertialFramesNum, frameY: itemFrame);
|
||||
return frame;
|
||||
}
|
||||
public void DrawItem(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, float scale, float rotation, bool inWorld)
|
||||
{
|
||||
itemFrameTimer++;
|
||||
if (itemFrameTimer % 5 == 0)
|
||||
itemFrame++;
|
||||
|
||||
effectsMult = MathHelper.Lerp(effectsMult, 1, 0.1f);
|
||||
Color effectColor = Color.Lerp(baseAccentColor, animEffectColor, Math.Max(effectsMult - 1, 0));
|
||||
|
||||
Texture2D texture = DoTransformAnimation ? AltTexture.Value : Texture.Value;
|
||||
float sine = MathF.Sin(Main.GlobalTimeWrappedHourly * 5);
|
||||
extraPosition = new Vector2(0, 5 * (inWorld ? 1 : 0.2f) * sine);
|
||||
Vector2 animPlaceAdjust = Vector2.UnitY * (DoTransformAnimation ? 2.8f : 0);
|
||||
|
||||
float pulseProgress = MathF.Pow(Utils.GetLerpValue(90, 0, pulseTimer % 90), 3.5f);
|
||||
|
||||
if (itemFrame >= (DoTransformAnimation ? 13 : 20))
|
||||
{
|
||||
itemFrame = (DoTransformAnimation ? 8 : 0);
|
||||
if (DoTransformAnimation) { DoTransformAnimation = false; Item.NetStateChanged(); }
|
||||
}
|
||||
//Pulse
|
||||
Texture2D pulse = ShapeTexture.Value;
|
||||
spriteBatch.Draw(pulse, position + extraPosition, null, Color.Lerp(effectColor, baseEffectColor, pulseProgress) with { A = 0 } * pulseProgress, rotation, pulse.Size() / 2, scale * (1 - pulseProgress) * effectsMult, SpriteEffects.None, 0f);
|
||||
|
||||
Texture2D bloom = BloomTexture.Value;
|
||||
Vector2 squash = new Vector2(1 + Math.Max(effectsMult - 1, 0) * 3.5f, 0.85f - Math.Max(effectsMult - 1, 0) * 0.75f);
|
||||
float bloomScale = 0.75f;
|
||||
// Bloom effects
|
||||
spriteBatch.Draw(bloom, position + extraPosition, null, effectColor with { A = 0 }, rotation, bloom.Size() / 2, new Vector2(1, 0.85f) * (scale + 0.05f * sine) * bloomScale, SpriteEffects.None, 0f);
|
||||
spriteBatch.Draw(bloom, position + extraPosition, null, effectColor with { A = 0 }, rotation, bloom.Size() / 2, squash * (scale + 0.05f * sine) * 0.9f * bloomScale, SpriteEffects.None, 0f);
|
||||
// Sprite
|
||||
spriteBatch.Draw(texture, position + extraPosition + animPlaceAdjust, frame, (inWorld ? Lighting.GetColor((Item.Center + extraPosition + animPlaceAdjust).ToTileCoordinates()) : Color.White), 0f, frame.Size() / 2, scale, SpriteEffects.None, 0f);
|
||||
pulseTimer++;
|
||||
}
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
frame = GetFrame();
|
||||
DrawItem(spriteBatch, position, frame, scale * 1.5f, 0, false);
|
||||
return false;
|
||||
}
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Rectangle itemFrame = GetFrame();
|
||||
Vector2 drawPosition = Item.Bottom - Main.screenPosition - new Vector2(0, (itemFrame.Size() / 2).Y);
|
||||
DrawItem(spriteBatch, drawPosition, itemFrame, scale * 0.5f, rotation, true);
|
||||
return false;
|
||||
}
|
||||
public override void Update(ref float gravity, ref float maxFallSpeed)
|
||||
{
|
||||
float sine = MathF.Sin(Main.GlobalTimeWrappedHourly * 3);
|
||||
Color clr = Color.Lerp(baseEffectColor, baseMainColor, Utils.GetLerpValue(-1, 1, sine));
|
||||
Lighting.AddLight(Item.Center + extraPosition, clr.ToVector3() * 0.55f);
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 36;
|
||||
Item.height = 34;
|
||||
Item.width = 30;
|
||||
Item.height = 25;
|
||||
Item.accessory = true;
|
||||
Item.vanity = true;
|
||||
Item.rare = ModContent.RarityType<Turquoise>();
|
||||
@@ -33,23 +144,43 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
public override bool CanRightClick() => true;
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
player.PutItemInInventoryFromItemUsage(ModContent.ItemType<XyksBlessingOrange>(), 1);
|
||||
if (Main.keyState.PressingShift())
|
||||
{
|
||||
SoundStyle sound = new("CalamityMod/Sounds/Item/StarfleetFire");
|
||||
for (int i = 0; i < 2; i++)
|
||||
SoundEngine.PlaySound(sound with { Volume = 0.65f, Pitch = Main.rand.NextFloat(0.4f, 0.5f) + 0.9f * i, MaxInstances = 6 }, player.Center);
|
||||
|
||||
effectsMult = 2;
|
||||
pulseTimer = 20;
|
||||
itemFrameTimer = 1;
|
||||
itemFrame = 0;
|
||||
NoArmorEnabled = !NoArmorEnabled;
|
||||
DoTransformAnimation = true;
|
||||
Item.NetStateChanged();
|
||||
}
|
||||
else
|
||||
player.PutItemInInventoryFromItemUsage(ModContent.ItemType<XyksBlessingOrange>());
|
||||
}
|
||||
public override Func<Player, bool> ShouldTransform => ((player) => !NoArmorEnabled);
|
||||
public override void UpdateVanity(Player player)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.XykVisualsBlue = true;
|
||||
EquipEffects(player);
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if (!hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.XykVisualsBlue = true;
|
||||
EquipEffects(player);
|
||||
}
|
||||
}
|
||||
|
||||
public void EquipEffects(Player player)
|
||||
{
|
||||
player.DisableWingFlapSound();
|
||||
if (NoArmorEnabled)
|
||||
IsForced = false;
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.XykVisualsBlue = true;
|
||||
}
|
||||
// Also research the other variant
|
||||
public override void OnResearched(bool fullyResearched)
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 21 KiB |
@@ -1,9 +1,17 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.BaseItems;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.GameContent.NetModules;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Terraria.Net;
|
||||
|
||||
namespace CalamityMod.Items.Accessories.Vanity
|
||||
@@ -11,7 +19,14 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
public class XyksBlessingOrange : TransformationAccessory, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
int itemFrame = 0;
|
||||
int itemFrameTimer = 1;
|
||||
int pulseTimer = 0;
|
||||
public static Vector2 extraPosition = Vector2.Zero;
|
||||
public static Color baseEffectColor = new Color(255, 153, 153); // Red-ish Glow
|
||||
public static Color animEffectColor = new Color(255, 105, 85); // Crimson Flash
|
||||
public static Color baseMainColor = new Color(239, 117, 34); // Mid Orange
|
||||
public static Color baseAccentColor = new Color(251, 242, 54); // Light Orange/Yellow
|
||||
public override (EquipType, string, string)[] EquipSlots =>
|
||||
[
|
||||
(EquipType.Head, "Xyk2", null),
|
||||
@@ -19,11 +34,104 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
(EquipType.Legs, "Xyk2", null),
|
||||
(EquipType.Wings, null, null), //results in setting this equip slot to -1
|
||||
];
|
||||
public static Asset<Texture2D> Texture = ModContent.Request<Texture2D>("CalamityMod/Items/Accessories/Vanity/XyksBlessingOrangeAnim");
|
||||
public static Asset<Texture2D> AltTexture = ModContent.Request<Texture2D>("CalamityMod/Items/Accessories/Vanity/XyksBlessingOrangeAnim2");
|
||||
public static Asset<Texture2D> ShapeTexture = ModContent.Request<Texture2D>("CalamityMod/Particles/GlowSquareParticleThick");
|
||||
public static Asset<Texture2D> BloomTexture = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle");
|
||||
|
||||
bool NoArmorEnabled = false;
|
||||
bool DoTransformAnimation = false;
|
||||
float effectsMult = 1;
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
tooltips.FindAndReplace("[TOGGLE]", NoArmorEnabled ? this.GetLocalizedValue("ArmorDisabled") : this.GetLocalizedValue("ArmorEnabled"));
|
||||
}
|
||||
public override bool ConsumeItem(Player player) => !Main.keyState.PressingShift();
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
tag.Add("noArmor", NoArmorEnabled);
|
||||
tag.Add("doAnim", DoTransformAnimation);
|
||||
}
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
NoArmorEnabled = tag.GetBool("noArmor");
|
||||
DoTransformAnimation = tag.GetBool("doAnim");
|
||||
}
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(NoArmorEnabled);
|
||||
writer.Write(DoTransformAnimation);
|
||||
}
|
||||
public override void NetReceive(BinaryReader reader)
|
||||
{
|
||||
NoArmorEnabled = reader.ReadBoolean();
|
||||
DoTransformAnimation = reader.ReadBoolean();
|
||||
}
|
||||
public Rectangle GetFrame()
|
||||
{
|
||||
Texture2D texture = DoTransformAnimation ? AltTexture.Value : Texture.Value;
|
||||
int vertialFramesNum = DoTransformAnimation ? 13 : 20;
|
||||
Rectangle frame = texture.Frame(verticalFrames: vertialFramesNum, frameY: itemFrame);
|
||||
return frame;
|
||||
}
|
||||
public void DrawItem(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, float scale, float rotation, bool inWorld)
|
||||
{
|
||||
itemFrameTimer++;
|
||||
if (itemFrameTimer % 5 == 0)
|
||||
itemFrame++;
|
||||
|
||||
effectsMult = MathHelper.Lerp(effectsMult, 1, 0.1f);
|
||||
Color effectColor = Color.Lerp(baseAccentColor, animEffectColor, Math.Max(effectsMult - 1, 0));
|
||||
|
||||
Texture2D texture = DoTransformAnimation ? AltTexture.Value : Texture.Value;
|
||||
float sine = MathF.Sin(Main.GlobalTimeWrappedHourly * 5);
|
||||
extraPosition = new Vector2(0, 5 * (inWorld ? 1 : 0.2f) * sine);
|
||||
Vector2 animPlaceAdjust = Vector2.UnitY * (DoTransformAnimation ? 2.8f : 0);
|
||||
|
||||
float pulseProgress = MathF.Pow(Utils.GetLerpValue(90, 0, pulseTimer % 90), 3.5f);
|
||||
|
||||
if (itemFrame >= (DoTransformAnimation ? 13 : 20))
|
||||
{
|
||||
itemFrame = (DoTransformAnimation ? 8 : 0);
|
||||
if (DoTransformAnimation) { DoTransformAnimation = false; Item.NetStateChanged(); }
|
||||
}
|
||||
//Pulse
|
||||
Texture2D pulse = ShapeTexture.Value;
|
||||
spriteBatch.Draw(pulse, position + extraPosition, null, Color.Lerp(effectColor, baseEffectColor, pulseProgress) with { A = 0 } * pulseProgress, rotation + MathHelper.PiOver4, pulse.Size() / 2, scale * (1 - pulseProgress) * effectsMult * 0.65f, SpriteEffects.None, 0f);
|
||||
|
||||
Texture2D bloom = BloomTexture.Value;
|
||||
Vector2 squash = new Vector2(1 + Math.Max(effectsMult - 1, 0) * 3.5f, 0.85f - Math.Max(effectsMult - 1, 0) * 0.75f);
|
||||
float bloomScale = 0.75f;
|
||||
// Bloom effects
|
||||
spriteBatch.Draw(bloom, position + extraPosition, null, effectColor with { A = 0 }, rotation, bloom.Size() / 2, new Vector2(1, 0.85f) * (scale + 0.05f * sine) * bloomScale, SpriteEffects.None, 0f);
|
||||
spriteBatch.Draw(bloom, position + extraPosition, null, effectColor with { A = 0 }, rotation, bloom.Size() / 2, squash * (scale + 0.05f * sine) * 0.9f * bloomScale, SpriteEffects.None, 0f);
|
||||
// Sprite
|
||||
spriteBatch.Draw(texture, position + extraPosition + animPlaceAdjust, frame, (inWorld ? Lighting.GetColor((Item.Center + extraPosition + animPlaceAdjust).ToTileCoordinates()) : Color.White), 0f, frame.Size() / 2, scale, SpriteEffects.None, 0f);
|
||||
pulseTimer++;
|
||||
}
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
frame = GetFrame();
|
||||
DrawItem(spriteBatch, position, frame, scale * 1.5f, 0, false);
|
||||
return false;
|
||||
}
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Rectangle itemFrame = GetFrame();
|
||||
Vector2 drawPosition = Item.Bottom - Main.screenPosition - new Vector2(0, (itemFrame.Size() / 2).Y);
|
||||
DrawItem(spriteBatch, drawPosition, itemFrame, scale * 0.5f, rotation, true);
|
||||
return false;
|
||||
}
|
||||
public override void Update(ref float gravity, ref float maxFallSpeed)
|
||||
{
|
||||
float sine = MathF.Sin(Main.GlobalTimeWrappedHourly * 3);
|
||||
Color clr = Color.Lerp(baseEffectColor, baseMainColor, Utils.GetLerpValue(-1, 1, sine));
|
||||
Lighting.AddLight(Item.Center + extraPosition, clr.ToVector3() * 0.55f);
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 36;
|
||||
Item.height = 34;
|
||||
Item.width = 30;
|
||||
Item.height = 25;
|
||||
Item.accessory = true;
|
||||
Item.vanity = true;
|
||||
Item.rare = ModContent.RarityType<DarkOrange>();
|
||||
@@ -33,23 +141,44 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
public override bool CanRightClick() => true;
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
player.PutItemInInventoryFromItemUsage(ModContent.ItemType<XyksBlessingBlue>(), 1);
|
||||
if (Main.keyState.PressingShift())
|
||||
{
|
||||
SoundStyle sound = new("CalamityMod/Sounds/Item/StarfleetFire");
|
||||
for (int i = 0; i < 2; i++)
|
||||
SoundEngine.PlaySound(sound with { Volume = 0.65f, Pitch = Main.rand.NextFloat(0.4f, 0.5f) + 0.9f * i, MaxInstances = 6 }, player.Center);
|
||||
|
||||
effectsMult = 2;
|
||||
pulseTimer = 20;
|
||||
itemFrameTimer = 1;
|
||||
itemFrame = 0;
|
||||
NoArmorEnabled = !NoArmorEnabled;
|
||||
DoTransformAnimation = true;
|
||||
Item.NetStateChanged();
|
||||
}
|
||||
else
|
||||
player.PutItemInInventoryFromItemUsage(ModContent.ItemType<XyksBlessingBlue>());
|
||||
|
||||
}
|
||||
public override Func<Player, bool> ShouldTransform => ((player) => !NoArmorEnabled);
|
||||
public override void UpdateVanity(Player player)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.XykVisualsOrange = true;
|
||||
EquipEffects(player);
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if (!hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.XykVisualsOrange = true;
|
||||
EquipEffects(player);
|
||||
}
|
||||
}
|
||||
|
||||
public void EquipEffects(Player player)
|
||||
{
|
||||
player.DisableWingFlapSound();
|
||||
if (NoArmorEnabled)
|
||||
IsForced = false;
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.XykVisualsOrange = true;
|
||||
}
|
||||
// Also research the other variant
|
||||
public override void OnResearched(bool fullyResearched)
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 21 KiB |
@@ -37,7 +37,6 @@ namespace CalamityMod.Items.Armor.Daedalus
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<CryonicBar>(15).
|
||||
AddIngredient<EssenceofEleum>(3).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@ namespace CalamityMod.Items.Armor.Daedalus
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<CryonicBar>(7).
|
||||
AddIngredient<EssenceofEleum>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<DaedalusBreastplate>()).
|
||||
Register();
|
||||
|
||||
@@ -58,7 +58,6 @@ namespace CalamityMod.Items.Armor.Daedalus
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<CryonicBar>(7).
|
||||
AddIngredient<EssenceofEleum>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<DaedalusHeadMagic>()).
|
||||
Register();
|
||||
|
||||
@@ -56,7 +56,6 @@ namespace CalamityMod.Items.Armor.Daedalus
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<CryonicBar>(7).
|
||||
AddIngredient<EssenceofEleum>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<DaedalusHeadMagic>()).
|
||||
Register();
|
||||
|
||||
@@ -62,7 +62,6 @@ namespace CalamityMod.Items.Armor.Daedalus
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<CryonicBar>(7).
|
||||
AddIngredient<EssenceofEleum>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<DaedalusBreastplate>()).
|
||||
Register();
|
||||
|
||||
@@ -75,7 +75,6 @@ namespace CalamityMod.Items.Armor.Daedalus
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<CryonicBar>(7).
|
||||
AddIngredient<EssenceofEleum>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<DaedalusHeadRogue>()).
|
||||
Register();
|
||||
|
||||
@@ -34,7 +34,6 @@ namespace CalamityMod.Items.Armor.Daedalus
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<CryonicBar>(10).
|
||||
AddIngredient<EssenceofEleum>(2).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ namespace CalamityMod.Items.Armor.Fearmonger
|
||||
ModContent.BuffType<GodSlayerInferno>(),
|
||||
BuffID.Chilled,
|
||||
BuffID.Frozen,
|
||||
ModContent.BuffType<WindChilled>(),
|
||||
};
|
||||
for (var i = 0; i < immuneDebuffs.Length; ++i)
|
||||
player.buffImmune[immuneDebuffs[i]] = true;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.GemTech
|
||||
@@ -25,7 +26,11 @@ namespace CalamityMod.Items.Armor.GemTech
|
||||
{
|
||||
CreateRecipe()
|
||||
.AddIngredient<ExoPrism>(16)
|
||||
.AddIngredient<GalacticaSingularity>(5)
|
||||
.AddIngredient(ItemID.FragmentSolar, 5)
|
||||
.AddIngredient(ItemID.FragmentVortex, 5)
|
||||
.AddIngredient(ItemID.FragmentNebula, 5)
|
||||
.AddIngredient(ItemID.FragmentStardust, 5)
|
||||
.AddIngredient<MeldBlob>(5)
|
||||
.AddIngredient<CoreofCalamity>(2)
|
||||
.AddTile<DraedonsForge>()
|
||||
.Register();
|
||||
|
||||
@@ -4,6 +4,7 @@ using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
@@ -150,7 +151,11 @@ namespace CalamityMod.Items.Armor.GemTech
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<ExoPrism>(10).
|
||||
AddIngredient<GalacticaSingularity>(3).
|
||||
AddIngredient(ItemID.FragmentSolar, 5).
|
||||
AddIngredient(ItemID.FragmentVortex, 5).
|
||||
AddIngredient(ItemID.FragmentNebula, 5).
|
||||
AddIngredient(ItemID.FragmentStardust, 5).
|
||||
AddIngredient<MeldBlob>(5).
|
||||
AddIngredient<CoreofCalamity>(2).
|
||||
AddTile<DraedonsForge>().
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<GemTechBodyArmor>()).
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.GemTech
|
||||
@@ -26,7 +27,11 @@ namespace CalamityMod.Items.Armor.GemTech
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<ExoPrism>(12).
|
||||
AddIngredient<GalacticaSingularity>(4).
|
||||
AddIngredient(ItemID.FragmentSolar, 4).
|
||||
AddIngredient(ItemID.FragmentVortex, 4).
|
||||
AddIngredient(ItemID.FragmentNebula, 4).
|
||||
AddIngredient(ItemID.FragmentStardust, 4).
|
||||
AddIngredient<MeldBlob>(4).
|
||||
AddIngredient<CoreofCalamity>(2).
|
||||
AddTile<DraedonsForge>().
|
||||
Register();
|
||||
|
||||
@@ -44,7 +44,6 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<ScoriaBar>(15).
|
||||
AddIngredient<EssenceofHavoc>(3).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -62,7 +62,6 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<ScoriaBar>(7).
|
||||
AddIngredient<EssenceofHavoc>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<HydrothermicArmor>()).
|
||||
Register();
|
||||
|
||||
@@ -60,7 +60,6 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<ScoriaBar>(7).
|
||||
AddIngredient<EssenceofHavoc>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<HydrothermicHeadMagic>()).
|
||||
Register();
|
||||
|
||||
@@ -58,7 +58,6 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<ScoriaBar>(7).
|
||||
AddIngredient<EssenceofHavoc>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<HydrothermicHeadMagic>()).
|
||||
Register();
|
||||
|
||||
@@ -62,7 +62,6 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<ScoriaBar>(7).
|
||||
AddIngredient<EssenceofHavoc>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<HydrothermicArmor>()).
|
||||
Register();
|
||||
|
||||
@@ -76,7 +76,6 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<ScoriaBar>(7).
|
||||
AddIngredient<EssenceofHavoc>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<HydrothermicHeadRogue>()).
|
||||
Register();
|
||||
|
||||
@@ -35,7 +35,6 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<ScoriaBar>(10).
|
||||
AddIngredient<EssenceofHavoc>(2).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
|
||||
Item.defense = 28;
|
||||
Item.defense = 20;
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
|
||||
Item.defense = 19;
|
||||
Item.defense = 15;
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
Item.width = 18;
|
||||
Item.height = 18;
|
||||
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
|
||||
Item.defense = 22;
|
||||
Item.defense = 15;
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ namespace CalamityMod.Items.Armor.Reaver
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<PerennialBar>(10).
|
||||
AddIngredient<LivingShard>(2).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -75,7 +75,6 @@ namespace CalamityMod.Items.Armor.Reaver
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<PerennialBar>(7).
|
||||
AddIngredient<LivingShard>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<ReaverCuisses>()).
|
||||
Register();
|
||||
|
||||
@@ -59,7 +59,6 @@ namespace CalamityMod.Items.Armor.Reaver
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<PerennialBar>(7).
|
||||
AddIngredient<LivingShard>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<ReaverHeadExplore>()).
|
||||
Register();
|
||||
|
||||
@@ -62,7 +62,6 @@ namespace CalamityMod.Items.Armor.Reaver
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<PerennialBar>(7).
|
||||
AddIngredient<LivingShard>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<ReaverHeadMobility>()).
|
||||
Register();
|
||||
|
||||
@@ -40,7 +40,6 @@ namespace CalamityMod.Items.Armor.Reaver
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<PerennialBar>(15).
|
||||
AddIngredient<LivingShard>(3).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<ReaverCuisses>()).
|
||||
Register();
|
||||
|
||||
|
Before Width: | Height: | Size: 488 B |
|
Before Width: | Height: | Size: 393 B |
@@ -938,9 +938,9 @@ namespace CalamityMod.Items
|
||||
{
|
||||
// Xyk 3MARCH2026: Doesn't work on any non use style 1 items currently, Doze will fix it
|
||||
if (item.CountsAsClass<MeleeDamageClass>() && player.HasBuff(BuffID.Tipsy))
|
||||
scale += 0.15f;
|
||||
scale += 0.25f;
|
||||
if (item.CountsAsClass<MeleeDamageClass>() && (player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Ale) || player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Sake)))
|
||||
scale += 0.15f;
|
||||
scale += 0.25f;
|
||||
}
|
||||
public override void UpdateArmorSet(Player player, string set)
|
||||
{
|
||||
@@ -1097,6 +1097,11 @@ namespace CalamityMod.Items
|
||||
{
|
||||
player.Calamity().critDamage += 0.15f;
|
||||
}
|
||||
if (item.type == ItemID.ReconScope)
|
||||
{
|
||||
player.GetDamage<RangedDamageClass>() += 0.05f; //Total 15% damage
|
||||
player.GetCritChance<RangedDamageClass>() -= 5; //Total 5% crit
|
||||
}
|
||||
if (item.type == ItemID.SniperScope)
|
||||
{
|
||||
player.GetDamage<RangedDamageClass>() -= 0.1f; //Total 0% damage
|
||||
@@ -1191,6 +1196,7 @@ namespace CalamityMod.Items
|
||||
|
||||
if (item.type == ItemID.GravityGlobe)
|
||||
{
|
||||
player.noFallDmg = true;
|
||||
player.GetJumpState<GravityJump>().Enable();
|
||||
if (player.Calamity().justChangedGravity)
|
||||
{
|
||||
|
||||
@@ -820,7 +820,11 @@ namespace CalamityMod.Items
|
||||
EditTooltipByNum(1, (line) => line.Text = EditedTooltip("RifleScope2"));
|
||||
}
|
||||
if (item.type == ItemID.ReconScope)
|
||||
{
|
||||
EditTooltipByNum(0, (line) => line.Text += AddedTooltip("RifleScope"));
|
||||
EditTooltipByNum(1, (line) => line.Text = EditedTooltip("ReconScope1"));
|
||||
EditTooltipByNum(1, (line) => line.Text += AddedTooltip("ReconScope2"));
|
||||
}
|
||||
if (item.type == ItemID.SniperScope)
|
||||
{
|
||||
EditTooltipByNum(1, (line) => line.Text = EditedTooltip("SniperScope"));
|
||||
@@ -1517,17 +1521,15 @@ namespace CalamityMod.Items
|
||||
float rate = Main.GlobalTimeWrappedHourly * 6;
|
||||
List<Color> eColors = new List<Color>()
|
||||
{
|
||||
Color.DodgerBlue,
|
||||
Color.Cyan,
|
||||
Color.RoyalBlue
|
||||
XyksBlessingBlue.baseMainColor,
|
||||
XyksBlessingBlue.baseAccentColor,
|
||||
};
|
||||
int colorIndex = (int)(rate / 2 % eColors.Count);
|
||||
Color currentColor = eColors[colorIndex];
|
||||
Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
|
||||
Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f >= 1f ? 1f : rate % 1f);
|
||||
|
||||
Vector2 backScale = line.BaseScale;
|
||||
Color backColor = usedColor;
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix);
|
||||
@@ -1535,19 +1537,19 @@ namespace CalamityMod.Items
|
||||
int draws = 20;
|
||||
for (int i = 0; i < draws; i++)
|
||||
{
|
||||
float clrProgress = Utils.GetLerpValue(0, draws - 1, i, true);
|
||||
Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / 20f).ToRotationVector2() * (3.5f);
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, backColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, Color.Lerp(usedColor, XyksBlessingBlue.animEffectColor, clrProgress), line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
|
||||
}
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
Texture2D square = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomRing").Value;
|
||||
|
||||
Vector2 drawPosition = basePosition;
|
||||
Color drawColor = backColor;
|
||||
Vector2 rotationPoint = texture.Size() * 0.5f;
|
||||
int length = line.Text.Length;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 23 + Vector2.UnitX * (i % 2 == 0 ? -10 * i : 10 * i), null, drawColor, (MathHelper.PiOver2), rotationPoint, new Vector2(0.3f - 0.02f * i, 1 + 0.35f * i) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None);
|
||||
Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 23 + Vector2.UnitX * (i % 2 == 0 ? -10 * i : 10 * i), null, usedColor, (MathHelper.PiOver2), rotationPoint, new Vector2(0.3f - 0.02f * i, 1 + 0.35f * i) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None);
|
||||
}
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
@@ -1556,10 +1558,11 @@ namespace CalamityMod.Items
|
||||
float squareSine = (float)Math.Sin(i * 2.5f / MathHelper.Pi);
|
||||
float clockSine = (float)Math.Sin((float)Math.Pow(Utils.GetLerpValue(0, 110, ((int)(Main.GlobalTimeWrappedHourly * (60 + i * 2)) % 120)), 5));
|
||||
Vector2 weirdPos = Vector2.UnitX * 53 * i * (Utils.GetLerpValue(20, 0, i, true)) + Vector2.UnitY * -23 * squareSine * sine2 + new Vector2(5, 10);
|
||||
float clrProgress = Utils.GetLerpValue(0, 9, i, true);
|
||||
for (int t = 0; t < 3; t++)
|
||||
Main.EntitySpriteDraw(square, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), 0, square.Size() * 0.5f, (1.2f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
|
||||
Main.EntitySpriteDraw(square, basePosition + weirdPos, null, Color.Lerp(usedColor, XyksBlessingBlue.animEffectColor, clrProgress) * (1 - 0.03f * i), 0, square.Size() * 0.5f, (1.2f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
|
||||
for (int t = 0; t < 3; t++)
|
||||
Main.EntitySpriteDraw(texture, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), 0, texture.Size() * 0.5f, (0.65f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
|
||||
Main.EntitySpriteDraw(texture, basePosition + weirdPos, null, Color.Lerp(usedColor, XyksBlessingBlue.animEffectColor, clrProgress) * (1 - 0.03f * i), 0, texture.Size() * 0.5f, (0.65f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
|
||||
}
|
||||
|
||||
Main.spriteBatch.End();
|
||||
@@ -1578,38 +1581,35 @@ namespace CalamityMod.Items
|
||||
float rate = Main.GlobalTimeWrappedHourly * 6;
|
||||
List<Color> eColors = new List<Color>()
|
||||
{
|
||||
new Color(248, 117, 52),
|
||||
Color.Gold,
|
||||
Color.Orange
|
||||
XyksBlessingOrange.baseMainColor,
|
||||
XyksBlessingOrange.baseAccentColor,
|
||||
};
|
||||
int colorIndex = (int)(rate / 2 % eColors.Count);
|
||||
Color currentColor = eColors[colorIndex];
|
||||
Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
|
||||
Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f >= 1f ? 1f : rate % 1f);
|
||||
|
||||
Vector2 backScale = line.BaseScale;
|
||||
Color backColor = usedColor;
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix);
|
||||
|
||||
int draws = 20;
|
||||
for (int i = 0; i < draws; i++)
|
||||
{
|
||||
float clrProgress = Utils.GetLerpValue(0, draws - 1, i, true);
|
||||
Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / 20f).ToRotationVector2() * (3.5f);
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, backColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, Color.Lerp(usedColor, XyksBlessingOrange.animEffectColor, clrProgress), line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
|
||||
}
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
Texture2D texture2 = ModContent.Request<Texture2D>("CalamityMod/Particles/SquareRotated").Value;
|
||||
Texture2D square = ModContent.Request<Texture2D>("CalamityMod/Particles/GlowSquareParticleThick").Value;
|
||||
|
||||
Vector2 drawPosition = basePosition;
|
||||
Color drawColor = backColor;
|
||||
Vector2 rotationPoint = texture.Size() * 0.5f;
|
||||
int length = line.Text.Length;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 23 + Vector2.UnitX * (i % 2 == 0 ? -10 * i : 10 * i), null, drawColor, (MathHelper.PiOver2), rotationPoint, new Vector2(0.3f - 0.02f * i, 1 + 0.35f * i) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None);
|
||||
Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 23 + Vector2.UnitX * (i % 2 == 0 ? -10 * i : 10 * i), null, usedColor, (MathHelper.PiOver2), rotationPoint, new Vector2(0.3f - 0.02f * i, 1 + 0.35f * i) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None);
|
||||
}
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
@@ -1617,10 +1617,11 @@ namespace CalamityMod.Items
|
||||
float squareSine = (float)Math.Sin(i * 2.5f / MathHelper.Pi);
|
||||
float clockSine = (float)Math.Sin((float)Math.Pow(Utils.GetLerpValue(0, 110, ((int)(Main.GlobalTimeWrappedHourly * (60 + i * 2)) % 120)), 5));
|
||||
Vector2 weirdPos = Vector2.UnitX * 53 * i * (Utils.GetLerpValue(20, 0, i, true)) + Vector2.UnitY * 23 * squareSine + Vector2.UnitY * 5.5f * sine + new Vector2(5, 10);
|
||||
float clrProgress = Utils.GetLerpValue(0, 9, i, true);
|
||||
for (int t = 0; t < 3; t++)
|
||||
Main.EntitySpriteDraw(square, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), clockSine * MathHelper.PiOver2 + MathHelper.PiOver4, square.Size() * 0.5f, (1 - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
|
||||
Main.EntitySpriteDraw(square, basePosition + weirdPos, null, Color.Lerp(usedColor, XyksBlessingOrange.animEffectColor, clrProgress) * (1 - 0.03f * i), clockSine * MathHelper.PiOver2 + MathHelper.PiOver4, square.Size() * 0.5f, (1 - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
|
||||
for (int t = 0; t < 3; t++)
|
||||
Main.EntitySpriteDraw(texture2, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), clockSine * MathHelper.PiOver2, texture2.Size() * 0.5f, (0.6f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
|
||||
Main.EntitySpriteDraw(texture2, basePosition + weirdPos, null, Color.Lerp(usedColor, XyksBlessingOrange.animEffectColor, clrProgress) * (1 - 0.03f * i), clockSine * MathHelper.PiOver2, texture2.Size() * 0.5f, (0.6f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
|
||||
}
|
||||
|
||||
Main.spriteBatch.End();
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.BluePhaseblade, phaseblade },
|
||||
{ ItemID.BluePhasesaber, phasesaber },
|
||||
{ ItemID.BoneSword, Do(UseTurn, DamageExact(25)) }, // VANILLA: 19 DMG
|
||||
{ ItemID.BookofSkulls, Do(DamageExact(27), ManaExact(13), ShootSpeedExact(5.5f)) }, // VANILLA: 29 DMG, 18 MANA, 3.5 VEL
|
||||
{ ItemID.BookofSkulls, Do(ShootSpeedExact(5.5f)) }, // VANILLA: 3.5 VEL
|
||||
{ ItemID.Boomstick, Do(DamageExact(11)) }, // VANILLA: 14 DMG
|
||||
{ ItemID.BreakerBlade, Do(UseTurn, DamageExact(140)) }, // VANILLA: 70 DMG
|
||||
{ ItemID.CandyCornRifle, Do(DamageExact(66)) }, // VANILLA: 44 DMG
|
||||
@@ -112,7 +112,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.FairyQueenMagicItem, Do(DamageExact(54)) }, // Nightglow. VANILLA: 50 DMG
|
||||
{ ItemID.FalconBlade, Do(UseTurn, UseExact(13)) }, // VANILLA: 20 UT
|
||||
{ ItemID.FireworksLauncher, Do(DamageExact(50), UseExact(25)) }, // Celebration. VANILLA: 25 DMG, 30 UT
|
||||
{ ItemID.Flamarang, Do(DamageExact(37)) }, // VANILLA: 49 DMG
|
||||
{ ItemID.Flamarang, Do(DamageExact(40)) }, // VANILLA: 49 DMG
|
||||
{ ItemID.Flamelash, Do(DamageExact(36)) }, // VANILLA: 32 DMG
|
||||
{ ItemID.Flamethrower, Do(DamageExact(21), ShootSpeedDelta(+3f)) }, // VANILLA: 35 DMG, 7 VEL
|
||||
{ ItemID.FlowerofFire, Do(DamageRatio(0.78f)) }, // VANILLA: 48 DMG. Uses ratios due to remix seed
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Fishing.FishingRods
|
||||
{
|
||||
public class TrustyOldRod : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Fishing";
|
||||
public static (int, int) enemyChance = (1, 3); // x/x Chance to pull up enemies
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 70;
|
||||
Item.height = 70;
|
||||
Item.useAnimation = 8;
|
||||
Item.useTime = 8;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.fishingPole = 45;
|
||||
Item.shootSpeed = 14f;
|
||||
Item.shoot = ModContent.ProjectileType<TrustyOldBobber>();
|
||||
Item.rare = ItemRarityID.Green;
|
||||
Item.value = CalamityGlobalItem.RarityGreenBuyPrice;
|
||||
}
|
||||
public override void ModifyFishingLine(Projectile bobber, ref Vector2 lineOriginOffset, ref Color lineColor)
|
||||
{
|
||||
lineOriginOffset = new Vector2(68f, -52f);
|
||||
lineColor = new Color(171, 171, 171, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||