Merge branch '1.4.4' into amidias-trident-rework
No files matched your search
@@ -0,0 +1,28 @@
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Pets
|
||||
{
|
||||
public class FrostyBatBuff : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.lightPet[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
player.Calamity().frostyBat = true;
|
||||
int proj = ModContent.ProjectileType<FrostyBatPet>();
|
||||
bool petProjectileNotSpawned = player.ownedProjectileCounts[proj] <= 0;
|
||||
if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(player.GetSource_Buff(buffIndex), player.Center, Vector2.Zero, proj, 0, 0f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 528 B After Width: | Height: | Size: 528 B |
@@ -0,0 +1,28 @@
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Pets
|
||||
{
|
||||
public class ToastyBatBuff : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.lightPet[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
player.Calamity().toastyBat = true;
|
||||
int proj = ModContent.ProjectileType<ToastyBatPet>();
|
||||
bool petProjectileNotSpawned = player.ownedProjectileCounts[proj] <= 0;
|
||||
if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(player.GetSource_Buff(buffIndex), player.Center, Vector2.Zero, proj, 0, 0f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 544 B |
@@ -1,12 +0,0 @@
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class FlarebatBuff : BaseSummonBuff
|
||||
{
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<FlarebatMinion>();
|
||||
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.FlarebatBool;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class FrostbatBuff : BaseSummonBuff
|
||||
{
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<FrostbatMinion>();
|
||||
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.FrostbatBool;
|
||||
}
|
||||
}
|
||||
@@ -82,6 +82,7 @@ using Terraria.ModLoader.IO;
|
||||
using Terraria.Net;
|
||||
using static Terraria.Main;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
using CalamityMod.Items.Pets;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
{
|
||||
@@ -297,6 +298,10 @@ namespace CalamityMod.CalPlayer
|
||||
public bool lucreciaEnergyPaused = false;
|
||||
public bool lucreciaEnergyMaxSFXPlayed = false;
|
||||
private int lucreciaParticleTimer = 0;
|
||||
public int elementalMastery = 0;
|
||||
public int elementalMasteryTimer = 0;
|
||||
public bool elementalMasteryPaused = false;
|
||||
public bool elementalMasterySFXPlayed = false;
|
||||
public float unstableCastersGauntletVis = 0;
|
||||
public int unstableCastersGauntletVisTimer = 0;
|
||||
public int PhotoAudioCooldown = 0;
|
||||
@@ -547,6 +552,8 @@ namespace CalamityMod.CalPlayer
|
||||
public bool pineapplePet = false;
|
||||
public bool eidolonSnailPet = false;
|
||||
public bool lordePet = false;
|
||||
public bool frostyBat = false;
|
||||
public bool toastyBat = false;
|
||||
#endregion
|
||||
|
||||
#region Rage
|
||||
@@ -1567,8 +1574,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool KalandraMirror = false;
|
||||
public bool StellarTorus = false;
|
||||
public bool LiliesOfFinalityBool = false;
|
||||
public bool FlarebatBool = false;
|
||||
public bool FrostbatBool = false;
|
||||
public bool AmphibiansGuitarBool = false;
|
||||
#endregion
|
||||
|
||||
@@ -2128,6 +2133,8 @@ namespace CalamityMod.CalPlayer
|
||||
pineapplePet = false;
|
||||
eidolonSnailPet = false;
|
||||
lordePet = false;
|
||||
frostyBat = false;
|
||||
toastyBat = false;
|
||||
|
||||
onyxExcavator = false;
|
||||
rimehound = false;
|
||||
@@ -2734,8 +2741,6 @@ namespace CalamityMod.CalPlayer
|
||||
KalandraMirror = false;
|
||||
StellarTorus = false;
|
||||
LiliesOfFinalityBool = false;
|
||||
FlarebatBool = false;
|
||||
FrostbatBool = false;
|
||||
AmphibiansGuitarBool = false;
|
||||
#endregion
|
||||
|
||||
@@ -3263,6 +3268,7 @@ namespace CalamityMod.CalPlayer
|
||||
flareGunOverheat = 0;
|
||||
hellbornShots = 0;
|
||||
lucreciaEnergy = 0;
|
||||
elementalMastery = 0;
|
||||
garandShots = 0;
|
||||
searedPanCounter = 0;
|
||||
searedPanTimer = 0;
|
||||
@@ -5217,6 +5223,13 @@ namespace CalamityMod.CalPlayer
|
||||
private void NOULOL()
|
||||
{
|
||||
Player.ResetEffects();
|
||||
for (int j = 0; j < 1000; j++)
|
||||
{
|
||||
if (!Main.projectile[j].active || Main.projectile[j].owner != Player.whoAmI)
|
||||
continue;
|
||||
|
||||
Player.ownedProjectileCounts[Main.projectile[j].type]++;
|
||||
}
|
||||
Player.head = -1;
|
||||
Player.body = -1;
|
||||
Player.legs = -1;
|
||||
|
||||
@@ -61,6 +61,7 @@ using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
@@ -167,7 +168,7 @@ namespace CalamityMod.CalPlayer
|
||||
UpdateDrawingParameters();
|
||||
|
||||
// Handle Lucrecia's passive energy effects
|
||||
HandleLucreciaEffects();
|
||||
HandleLucreciaLineEffects();
|
||||
|
||||
// Update all particle sets for items.
|
||||
// This must be done here instead of in the item logic because these sets are not properly instanced
|
||||
@@ -200,6 +201,17 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.ActiveItem().type != ModContent.ItemType<SaharaSlicers>())
|
||||
saharaSlicersBolts = 0;
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer && Player.HeldItem.type == ModContent.ItemType<Starfleet>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarfleetHoldout>()] == 0) && !Player.dead)
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(Player.HeldItem.damage);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<StarfleetHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
||||
}
|
||||
if (Player.whoAmI == Main.myPlayer && Player.HeldItem.type == ModContent.ItemType<Starmada>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarmadaHoldout>()] == 0) && !Player.dead)
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(Player.HeldItem.damage);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<StarmadaHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
||||
}
|
||||
|
||||
// De-equipping Gael's Greatsword deletes all rage.
|
||||
if (Player.ActiveItem().type == ModContent.ItemType<GaelsGreatsword>())
|
||||
heldGaelsLastFrame = true;
|
||||
@@ -414,9 +426,56 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
else
|
||||
{
|
||||
// Reset the timer and pause state if the player isn't holding the weapon.
|
||||
// Reset all energy variables when not holding the weapon
|
||||
lucreciaEnergyTimer = 0;
|
||||
lucreciaEnergyPaused = false;
|
||||
lucreciaEnergy = 0;
|
||||
}
|
||||
|
||||
if (Player.HeldItem.type == ModContent.ItemType<Lightspeed>() && elementalMastery > 0)
|
||||
{
|
||||
if (elementalMastery == Lightspeed.MaxEnergy && !elementalMasteryPaused)
|
||||
{
|
||||
elementalMasteryPaused = true;
|
||||
elementalMasteryTimer = 0;
|
||||
}
|
||||
|
||||
elementalMasteryTimer++;
|
||||
|
||||
// If the mastery is at max, pause for 180 ticks
|
||||
if (elementalMasteryPaused)
|
||||
{
|
||||
if (elementalMasteryTimer >= 1 && !elementalMasterySFXPlayed)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item79 with { Volume = 1.6f, Pitch = 0.4f }, Player.Center);
|
||||
elementalMasterySFXPlayed = true;
|
||||
|
||||
}
|
||||
// If the pause is Done, resume decrementing.
|
||||
if (elementalMasteryTimer >= 180)
|
||||
{
|
||||
elementalMasteryPaused = false;
|
||||
elementalMasteryTimer = 0;
|
||||
elementalMastery--;
|
||||
}
|
||||
}
|
||||
else // Decrementing
|
||||
{
|
||||
elementalMasterySFXPlayed = false;
|
||||
// Once every 20 ticks
|
||||
if (elementalMasteryTimer >= 20)
|
||||
{
|
||||
elementalMastery--;
|
||||
elementalMasteryTimer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Reset all EM variables when not holding the weapon
|
||||
elementalMasteryTimer = 0;
|
||||
elementalMasteryPaused = false;
|
||||
elementalMastery = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -4483,11 +4542,13 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Lucrecia Effects
|
||||
#region Lucrecia Line Effects
|
||||
|
||||
public void HandleLucreciaEffects()
|
||||
public void HandleLucreciaLineEffects()
|
||||
{
|
||||
int lucreciaItemID = ModContent.ItemType<Lucrecia>();
|
||||
int lightspeedItemID = ModContent.ItemType<Lightspeed>();
|
||||
|
||||
if (Player.HeldItem.type == lucreciaItemID && lucreciaEnergy > 0)
|
||||
{
|
||||
lucreciaParticleTimer--;
|
||||
@@ -4516,7 +4577,40 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 dummyVelocity = Vector2.Zero; // We dont want the argument where this is used to have influence on the actual path
|
||||
float rotationSpeed = 0.04f;
|
||||
|
||||
var particle = new RoundedStarParticle(spawnPosition, dummyVelocity, color, Main.rand.NextFloat(0.05f, 0.065f), Main.rand.Next(30, 60), rotationSpeed, 1f, true, Player.Center, Player.whoAmI);
|
||||
var particle = new RoundedStarParticle(spawnPosition, dummyVelocity, color with { A = 0 }, Main.rand.NextFloat(0.05f, 0.065f), Main.rand.Next(30, 60), rotationSpeed, 1f, true, Player.Center, Player.whoAmI);
|
||||
GeneralParticleHandler.SpawnParticle(particle);
|
||||
}
|
||||
}
|
||||
|
||||
if (Player.HeldItem.type == lightspeedItemID && elementalMastery > 0)
|
||||
{
|
||||
lucreciaParticleTimer--;
|
||||
|
||||
// If the timer is at or below zero, spawn a particle.
|
||||
if (lucreciaParticleTimer <= 0)
|
||||
{
|
||||
// Reset the timer (spawn rate depends on energy)
|
||||
lucreciaParticleTimer = (int)(20 - 15 * (elementalMastery / 60));
|
||||
|
||||
float radius = Main.rand.NextFloat(160f, 190f); // Distance from center
|
||||
float spawnAngle = Main.rand.NextFloat(MathHelper.TwoPi); // Random angle along the whole radius
|
||||
|
||||
Vector2 spawnPosition = Player.Center + spawnAngle.ToRotationVector2() * radius;
|
||||
|
||||
// Scale opacity with energy
|
||||
float opacity = elementalMastery / (float)Lightspeed.MaxEnergy;
|
||||
Color color = Main.rand.NextBool() ? Color.Aqua : Color.OrangeRed;
|
||||
color *= opacity;
|
||||
|
||||
if (elementalMastery >= 100)
|
||||
{
|
||||
color *= 1.6f; // Brighter
|
||||
}
|
||||
|
||||
Vector2 dummyVelocity = Vector2.Zero; // We dont want the argument where this is used to have influence on the actual path
|
||||
float rotationSpeed = 0.04f;
|
||||
|
||||
var particle = new RoundedStarParticle(spawnPosition, dummyVelocity, color with { A = 0 }, Main.rand.NextFloat(0.05f, 0.065f), Main.rand.Next(30, 60), rotationSpeed, 1f, true, Player.Center, Player.whoAmI);
|
||||
GeneralParticleHandler.SpawnParticle(particle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,8 +89,8 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/DraedonsArsenal/PulseRifleGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<SoulPiercer>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/SoulPiercerGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<StarburstShiv>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/StarburstShivGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<Lightspeed>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/LightspeedGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<SubsumingVortex>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/SubsumingVortexSmallGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<TerrorBlade>())
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Projectiles.Melee.Shortswords;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria.Audio;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using static CalamityMod.CalamityUtils;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class ElementalMastery : CooldownHandler
|
||||
{
|
||||
private float AdjustedCompletion => instance.timeLeft / (float) Lightspeed.MaxEnergy;
|
||||
private Color TextColor => Color.AliceBlue;
|
||||
private Color TextBorderColor = Color.AntiqueWhite;
|
||||
|
||||
public static new string ID => "ElementalMastery";
|
||||
public override bool CanTickDown => false;
|
||||
public override bool ShouldDisplay => instance.player.HeldItem.type == ItemType<Lightspeed>();
|
||||
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
|
||||
public override string Texture => $"CalamityMod/Cooldowns/{ID}";
|
||||
public override string OutlineTexture => $"CalamityMod/Cooldowns/{ID}Outline";
|
||||
public override string OverlayTexture => $"CalamityMod/Cooldowns/{ID}Overlay";
|
||||
|
||||
public override Color OutlineColor => Color.SlateGray;
|
||||
public override Color CooldownStartColor => Color.Lerp(Color.OrangeRed, Color.SlateGray, instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(Color.AliceBlue, Color.SlateGray, instance.Completion);
|
||||
|
||||
public override void ApplyBarShaders(float opacity)
|
||||
{
|
||||
// Use the adjusted completion
|
||||
GameShaders.Misc["CalamityMod:CircularBarShader"].UseOpacity(opacity);
|
||||
GameShaders.Misc["CalamityMod:CircularBarShader"].UseSaturation(AdjustedCompletion);
|
||||
GameShaders.Misc["CalamityMod:CircularBarShader"].UseColor(CooldownStartColor);
|
||||
GameShaders.Misc["CalamityMod:CircularBarShader"].UseSecondaryColor(CooldownEndColor);
|
||||
GameShaders.Misc["CalamityMod:CircularBarShader"].Apply();
|
||||
}
|
||||
|
||||
public override void DrawExpanded(SpriteBatch spriteBatch, Vector2 position, float opacity, float scale)
|
||||
{
|
||||
base.DrawExpanded(spriteBatch, position, opacity, scale);
|
||||
|
||||
Vector2 textOffset = new Vector2(instance.timeLeft > 9 ? -11f : -6f, 10f);
|
||||
DrawBorderStringEightWay(spriteBatch, FontAssets.MouseText.Value, instance.timeLeft.ToString(), position + textOffset * scale, TextColor, TextBorderColor, scale);
|
||||
}
|
||||
|
||||
public override void DrawCompact(SpriteBatch spriteBatch, Vector2 position, float opacity, float scale)
|
||||
{
|
||||
Texture2D sprite = Request<Texture2D>(Texture).Value;
|
||||
Texture2D outline = Request<Texture2D>(OutlineTexture).Value;
|
||||
Texture2D overlay = Request<Texture2D>(OverlayTexture).Value;
|
||||
|
||||
// Draw the outline
|
||||
spriteBatch.Draw(outline, position, null, OutlineColor * opacity, 0, outline.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
|
||||
// Draw the icon
|
||||
spriteBatch.Draw(sprite, position, null, Color.White * opacity, 0, sprite.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
|
||||
// Draw the small overlay
|
||||
int lostHeight = (int)Math.Ceiling(overlay.Height * AdjustedCompletion);
|
||||
Rectangle crop = new Rectangle(0, lostHeight, overlay.Width, overlay.Height - lostHeight);
|
||||
spriteBatch.Draw(overlay, position + Vector2.UnitY * lostHeight * scale, crop, OutlineColor * opacity * 0.9f, 0, sprite.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
|
||||
Vector2 textOffset = new Vector2(instance.timeLeft > 9 ? -11f : -6f, 10f);
|
||||
DrawBorderStringEightWay(spriteBatch, FontAssets.MouseText.Value, instance.timeLeft.ToString(), position + textOffset * scale, TextColor, TextBorderColor, scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 312 B |
|
After Width: | Height: | Size: 161 B |
|
After Width: | Height: | Size: 130 B |
@@ -151,8 +151,7 @@ namespace CalamityMod.Events
|
||||
DownedBossSystem.startedBossRushAtLeastOnce = true;
|
||||
},
|
||||
permittedNPCs: new int[] { NPCID.BlueSlime, NPCID.YellowSlime, NPCID.PurpleSlime, NPCID.RedSlime, NPCID.GreenSlime, NPCID.RedSlime,
|
||||
NPCID.IceSlime, NPCID.UmbrellaSlime, NPCID.Pinky, NPCID.SlimeSpiked, NPCID.RainbowSlime, ModContent.NPCType<KingSlimeJewelRuby>(),
|
||||
ModContent.NPCType<KingSlimeJewelSapphire>(), ModContent.NPCType<KingSlimeJewelEmerald>() }),
|
||||
NPCID.IceSlime, NPCID.UmbrellaSlime, NPCID.Pinky, NPCID.SlimeSpiked, NPCID.RainbowSlime, ModContent.NPCType<KingSlimeJewelRuby>()}),
|
||||
|
||||
new Boss(ModContent.NPCType<DesertScourgeHead>(), spawnContext: type =>
|
||||
{
|
||||
|
||||
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,150 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Graphics.Metaballs
|
||||
{
|
||||
public class StarsmokeMetaball : Metaball
|
||||
{
|
||||
public Color borderColor = Color.Purple;
|
||||
public Vector2 goalDir = Vector2.Zero;
|
||||
public Vector2 scrollDir = Vector2.Zero;
|
||||
public class StarsmokeParticle
|
||||
{
|
||||
public float Size;
|
||||
|
||||
public Vector2 Velocity;
|
||||
|
||||
public Vector2 Center;
|
||||
public Vector2 BaseSquash = Vector2.One;
|
||||
public float Rotation;
|
||||
public float ShrinkSpeed = 0;
|
||||
public int Lifetime;
|
||||
public float SquashPower = 0;
|
||||
public int time = 0;
|
||||
|
||||
public StarsmokeParticle(Vector2 center, Vector2 velocity, float size, int lifetime, Vector2 squash, float shrinkSpeed = 0, float velocitySquash = 0)
|
||||
{
|
||||
Center = center;
|
||||
Velocity = velocity;
|
||||
Size = size;
|
||||
Rotation = Velocity.ToRotation() + MathHelper.PiOver2;
|
||||
BaseSquash = squash;
|
||||
Lifetime = lifetime;
|
||||
ShrinkSpeed = shrinkSpeed;
|
||||
SquashPower = velocitySquash;
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
float sine = (float)Math.Sin(time * 0.15f * SquashPower) * 0.8f;
|
||||
Center += Velocity;
|
||||
Velocity *= 0.96f;
|
||||
Velocity += Velocity.RotatedBy(0.36f * sine * SquashPower * (Math.Sign(ShrinkSpeed))) * 0.02f;
|
||||
if ((float)time / (float)Lifetime > 0.8f)
|
||||
{
|
||||
Size *= 0.9f;
|
||||
}
|
||||
BaseSquash.X *= (1 - 0.2f * ShrinkSpeed);
|
||||
BaseSquash.Y *= (1 + 0.2f * ShrinkSpeed);
|
||||
Rotation = Velocity.ToRotation() + MathHelper.PiOver2;
|
||||
time++;
|
||||
}
|
||||
}
|
||||
public static Asset<Texture2D> LayerAsset
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public static List<StarsmokeParticle> Particles
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
} = new();
|
||||
|
||||
public override bool AnythingToDraw => Particles.Any();
|
||||
|
||||
public override IEnumerable<Texture2D> Layers
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return LayerAsset.Value;
|
||||
}
|
||||
}
|
||||
|
||||
public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeNPCs;
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.dedServ)
|
||||
return;
|
||||
|
||||
// Load the layer asset wrapper.
|
||||
LayerAsset = ModContent.Request<Texture2D>($"CalamityMod/Particles/GlowSquareParticleBig", AssetRequestMode.ImmediateLoad);
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
if (goalDir == Vector2.Zero)
|
||||
goalDir = Vector2.One.RotatedByRandom(Math.PI);
|
||||
if ((int)(Main.GlobalTimeWrappedHourly * 50) % 5 == 0)
|
||||
{
|
||||
goalDir = goalDir.RotatedByRandom(0.13f);
|
||||
}
|
||||
scrollDir = Vector2.Lerp(scrollDir, goalDir, 0.01f);
|
||||
|
||||
float rate = Main.GlobalTimeWrappedHourly * 19;
|
||||
List<Color> colors = new List<Color>()
|
||||
{
|
||||
new Color (192, 10, 111),
|
||||
Color.Coral,
|
||||
Color.DarkOrange
|
||||
};
|
||||
|
||||
int colorIndex = (int)(rate / 2 % colors.Count);
|
||||
Color currentColor = colors[colorIndex];
|
||||
Color nextColor = colors[(colorIndex + 1) % colors.Count];
|
||||
borderColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
|
||||
// Update all particle instances.
|
||||
// Once sufficiently small, they vanish.
|
||||
for (int i = 0; i < Particles.Count; i++)
|
||||
Particles[i].Update();
|
||||
Particles.RemoveAll(p => p.Size <= 2f);
|
||||
}
|
||||
public override Color EdgeColor => borderColor with { A = 0 } * 0.3f;
|
||||
|
||||
public static void SpawnParticle(Vector2 position, Vector2 velocity, float size, int lifetime, Vector2 squash, float shrinkSpeed = 0, float velocitySquash = 0) =>
|
||||
Particles.Add(new(position, velocity, size, lifetime, squash, shrinkSpeed, velocitySquash));
|
||||
|
||||
// Make the texture scroll.
|
||||
public override Vector2 CalculateManualOffsetForLayer(int layerIndex)
|
||||
{
|
||||
return scrollDir * 0.5f;
|
||||
}
|
||||
|
||||
public override void DrawInstances()
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Graphics/Metaballs/StarsmokeMetaball2").Value;
|
||||
|
||||
foreach (StarsmokeParticle particle in Particles)
|
||||
{
|
||||
float sine = (float)Math.Sin(particle.time * 0.2f) * 0.5f;
|
||||
float lifetimeVal = 1 - (particle.time / particle.Lifetime);
|
||||
Vector2 altSquash = new Vector2(1f + 1 * (1 + sine) * lifetimeVal, 1f + 1 * (1 - sine) * lifetimeVal);
|
||||
Vector2 squash = Vector2.Lerp(particle.BaseSquash, new Vector2(Utils.Remap(particle.Velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(particle.Velocity.Length(), 2, 7, 1, 2.5f)), particle.SquashPower);
|
||||
Vector2 drawPosition = particle.Center - Main.screenPosition;
|
||||
Vector2 origin = tex.Size() * 0.5f;
|
||||
Vector2 scale = Vector2.One * particle.Size / tex.Size();
|
||||
Main.spriteBatch.Draw(tex, drawPosition, null, Color.White, particle.Rotation, origin, squash * scale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 22 KiB |
@@ -207,7 +207,10 @@ namespace CalamityMod.ILEditing
|
||||
IL_WorldGen.AttemptFossilShattering += PreventFossilShattering;
|
||||
On_Player.GetPickaxeDamage += RemoveHellforgePickaxeRequirement;
|
||||
IL_Player.Update += PreventUFODismountInWater;
|
||||
On_Player.GetAnglerReward += ImproveAnglerRewards;
|
||||
|
||||
On_Player.GetAnglerReward_MainReward += AddMoreGuaranteedAnglerRewards;
|
||||
On_Player.GetAnglerReward_Bait += ImproveAnglerBaitReward;
|
||||
On_Player.GetAnglerReward_Money += ImproveAnglerMoneyReward;
|
||||
|
||||
IL_Player.TileInteractionsUse += RemovePowerCellPlanteraLock;
|
||||
On_Player.ItemCheck_CheckCanUse += RemoveUseLocks;
|
||||
@@ -220,10 +223,6 @@ namespace CalamityMod.ILEditing
|
||||
On_Main.DrawPlayerChatBubbles += UI_Unflip_Start;
|
||||
On_Main.DrawInterface += UI_Unflip_End;
|
||||
|
||||
// Fix vanilla bugs exposed by Calamity mechanics
|
||||
IL_NPC.NPCLoot += FixSplittingWormBannerDrops;
|
||||
On_NPC.PlayerInteraction += FixSplittingWormInteraction;
|
||||
|
||||
// Fix vanilla not accounting for spritebatch modification in held projectile drawing
|
||||
On_PlayerDrawLayers.DrawHeldProj += FixHeldProjectileBlendState;
|
||||
|
||||
|
||||
@@ -1831,7 +1831,7 @@ namespace CalamityMod.ILEditing
|
||||
droids.velocity = -self.velocity.RotatedByRandom(MathHelper.Pi / 20f) * 2f;
|
||||
droids.netUpdate = true;
|
||||
droids.shimmerTransparency = 1f;
|
||||
NetMessage.SendData(146, -1, -1, null, 2, droids.whoAmI);
|
||||
NetMessage.SendData(MessageID.ShimmerActions, -1, -1, null, 2, droids.whoAmI);
|
||||
}
|
||||
|
||||
self.TurnToAir();
|
||||
@@ -1844,8 +1844,8 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
else
|
||||
{
|
||||
NetMessage.SendData(146, -1, -1, null, 0, (int)self.Center.X, (int)self.Center.Y);
|
||||
NetMessage.SendData(145, -1, -1, null, self.whoAmI, 1f);
|
||||
NetMessage.SendData(MessageID.ShimmerActions, -1, -1, null, 0, (int)self.Center.X, (int)self.Center.Y);
|
||||
NetMessage.SendData(MessageID.SyncItemsWithShimmer, -1, -1, null, self.whoAmI, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,52 +12,6 @@ namespace CalamityMod.ILEditing
|
||||
{
|
||||
public partial class ILChanges
|
||||
{
|
||||
#region Fixing Splitting Worm Banner Spam in Deathmode
|
||||
// CONTEXT FOR FIX: In Death Mode, normal worms are capable of splitting similarly to the Eater of Worlds. This, as expected, comes with problems with loot dropping, as you can kill multiple
|
||||
// head segments from the same original worm. TML allows us to safely handle this with its drop hooks. Unfortunately, however, this does not apply to banner dropping logic based on total kills or
|
||||
// for bestiary registrations.
|
||||
// As such, we must IL Edit the vanilla drop method to stop it from registering kills based on worms that can still be split. This references the same blocking logic as the aforementioned hooks.
|
||||
private static void FixSplittingWormBannerDrops(ILContext il)
|
||||
{
|
||||
var cursor = new ILCursor(il);
|
||||
|
||||
// Find the first return in the method. This will be marked as a label to jump to if the splitting loot check is failed, effectively terminating any and all
|
||||
// loot code, including banners and bestiary stuff.
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchRet()))
|
||||
{
|
||||
LogFailure("Splitting worm banner spam fix", "Could not locate the first method return.");
|
||||
}
|
||||
|
||||
// Save the ret as a place to return to.
|
||||
ILLabel ret = cursor.MarkLabel();
|
||||
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchStloc(0)))
|
||||
{
|
||||
LogFailure("Splitting worm banner spam fix", "Could not locate the closest player storage.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Load the NPC caller onto the stack.
|
||||
cursor.Emit(OpCodes.Ldarg_0);
|
||||
cursor.EmitDelegate<Func<NPC, bool>>(npc => CalamityGlobalNPC.SplittingWormLootBlockWrapper(npc, CalamityMod.Instance));
|
||||
|
||||
// If the block is false (indicating the drop logic should stop), return the method early.
|
||||
cursor.Emit(OpCodes.Brfalse, ret);
|
||||
}
|
||||
#endregion Fixing Splitting Worm Banner Spam in Deathmode
|
||||
|
||||
#region Fixing Splitting Worm Interaction in Deathmode
|
||||
// CONTEXT FOR FIX: In Death Mode, normal worms are capable of splitting similarly to the Eater of Worlds. This comes with problems with bestiary entries. The entries are incremented only when
|
||||
// the killed npc is the head segment and it has been interacted at least once. These two conditions may be violated because NPC.NPCLoot only triggers once because of the above fix.
|
||||
// The fix for former condition is in CalamityGlobalNPCLoot.OnKill. For the latter condition, NPC.PlayerInteraction should broadcast interaction to every other worm segments.
|
||||
// This is already done for vanilla worm enemies like EOW.
|
||||
private static void FixSplittingWormInteraction(On_NPC.orig_PlayerInteraction orig, NPC npc, int player)
|
||||
{
|
||||
orig(npc, player);
|
||||
CalamityGlobalNPC.SplittingWormBroadcastInteractionWrapper(npc, player);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Fixing Vanilla Not Accounting For Spritebatch Modification in Held Projectiles
|
||||
private static bool HasLoggedHeldProjectileBlendStateCatch = false;
|
||||
private void FixHeldProjectileBlendState(On_PlayerDrawLayers.orig_DrawHeldProj orig, PlayerDrawSet drawinfo, Projectile proj)
|
||||
|
||||
@@ -436,628 +436,134 @@ namespace CalamityMod.ILEditing
|
||||
#endregion Color Blighted Gel
|
||||
|
||||
#region Improve Angler Quest Rewards
|
||||
private static void ImproveAnglerRewards(On_Player.orig_GetAnglerReward orig, Player self, NPC angler, int questItemType)
|
||||
private static void AddMoreGuaranteedAnglerRewards(On_Player.orig_GetAnglerReward_MainReward orig, Player self, List<Item> rewardItems, IEntitySource source, int questsDone, float rarityReduction, int questItemType, ref GetItemSettings anglerRewardSettings)
|
||||
{
|
||||
orig(self, angler, questItemType);
|
||||
|
||||
EntitySource_Gift source = new EntitySource_Gift(angler);
|
||||
int questsDone = self.anglerQuestsFinished;
|
||||
float rarityReduction = 1f;
|
||||
rarityReduction = (questsDone <= 50) ? (rarityReduction - questsDone * 0.01f) : ((questsDone <= 100) ? (0.5f - (questsDone - 50) * 0.005f) : ((questsDone > 150) ? 0.15f : (0.25f - (questsDone - 100) * 0.002f)));
|
||||
rarityReduction *= 0.9f;
|
||||
rarityReduction *= (float)(self.currentShoppingSettings.PriceAdjustment + 1.0) / 2f;
|
||||
|
||||
if (rarityReduction < 0.1f)
|
||||
rarityReduction = 0.1f;
|
||||
|
||||
List<Item> rewardItems = new List<Item>();
|
||||
|
||||
GetItemSettings anglerRewardSettings = GetItemSettings.NPCEntityToPlayerInventorySettings;
|
||||
|
||||
// Adds several new guaranteed rewards for specific quests.
|
||||
// These will replace the item that would have dropped via vanilla logic.
|
||||
Item item = new Item();
|
||||
item.type = ItemID.None;
|
||||
List<int> checkingList = [];
|
||||
|
||||
// GUARANTEED REWARDS
|
||||
|
||||
// BAIT
|
||||
switch (questsDone)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.Stinkbug);
|
||||
item.stack = Main.rand.Next(2, 6);
|
||||
case 3: // High Test Fishing Line
|
||||
checkingList.Add(ItemID.HighTestFishingLine);
|
||||
if (self.DropAnglerAccByMissing(checkingList, 1f, out _, out int highTest))
|
||||
item.SetDefaults(highTest);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.ApprenticeBait);
|
||||
item.stack = Main.rand.Next(2, 6);
|
||||
case 6: // Fisherman's Pocket Guide
|
||||
checkingList.Add(ItemID.FishermansGuide);
|
||||
if (self.DropAnglerAccByMissing(checkingList, 1f, out _, out int fishGuide))
|
||||
item.SetDefaults(fishGuide);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
item = new Item();
|
||||
item.SetDefaults(Main.rand.NextBool() ? ItemID.Worm : ItemID.Maggot);
|
||||
item.stack = Main.rand.Next(2, 6);
|
||||
case 10: // Angler armor
|
||||
Item vest = new Item(ItemID.AnglerVest); // Vanilla has a guaranteed reward for Angler Hat here. Calamity makes the other two pieces drop as well.
|
||||
rewardItems.Add(vest);
|
||||
Item pants = new Item(ItemID.AnglerPants); // This intentionally does not set the item variable, to allow vanilla logic to drop the Angler Hat.
|
||||
rewardItems.Add(pants);
|
||||
break;
|
||||
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
case 20:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.JourneymanBait);
|
||||
item.stack = Main.rand.Next(2, 6);
|
||||
case 11: // Weather Radio
|
||||
checkingList.Add(ItemID.WeatherRadio);
|
||||
if (self.DropAnglerAccByMissing(checkingList, 1f, out _, out int radio))
|
||||
item.SetDefaults(radio);
|
||||
break;
|
||||
|
||||
case 21:
|
||||
case 22:
|
||||
case 23:
|
||||
case 24:
|
||||
case 25:
|
||||
case 26:
|
||||
item = new Item();
|
||||
item.SetDefaults(Main.rand.NextBool() ? ItemID.EnchantedNightcrawler : ItemID.Buggy);
|
||||
item.stack = Main.rand.Next(2, 6);
|
||||
case 14: // Sextant
|
||||
checkingList.Add(ItemID.Sextant);
|
||||
if (self.DropAnglerAccByMissing(checkingList, 1f, out _, out int sextant))
|
||||
item.SetDefaults(sextant);
|
||||
break;
|
||||
|
||||
case 27:
|
||||
case 28:
|
||||
case 29:
|
||||
case 30:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.MasterBait);
|
||||
item.stack = Main.rand.Next(2, 6);
|
||||
case 15: // Tackle Box
|
||||
checkingList.Add(ItemID.TackleBox);
|
||||
if (self.DropAnglerAccByMissing(checkingList, 1f, out _, out int tackle))
|
||||
item.SetDefaults(tackle);
|
||||
break;
|
||||
|
||||
default:
|
||||
item = new Item();
|
||||
item.SetDefaults(ModContent.ItemType<GrandMarquisBait>());
|
||||
item.stack = Main.rand.Next(2, 6);
|
||||
case 20: // Angler Earring
|
||||
checkingList.Add(ItemID.AnglerEarring);
|
||||
if (self.DropAnglerAccByMissing(checkingList, 1f, out _, out int earring))
|
||||
item.SetDefaults(earring);
|
||||
break;
|
||||
}
|
||||
|
||||
item.position = self.Center;
|
||||
Item item2 = self.GetItem(self.whoAmI, item, anglerRewardSettings);
|
||||
rewardItems.Add(item2);
|
||||
|
||||
// COINS
|
||||
switch (questsDone)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.GoldCoin);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.GoldCoin);
|
||||
item.stack = 2;
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.SilverCoin);
|
||||
item.stack = 50;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.GoldCoin);
|
||||
item.stack = 4;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.GoldCoin);
|
||||
item.stack = 6;
|
||||
break;
|
||||
|
||||
case 20:
|
||||
case 21:
|
||||
case 22:
|
||||
case 23:
|
||||
case 24:
|
||||
case 25:
|
||||
case 26:
|
||||
case 27:
|
||||
case 28:
|
||||
case 29:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.GoldCoin);
|
||||
item.stack = 8;
|
||||
break;
|
||||
|
||||
default:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.GoldCoin);
|
||||
item.stack = 10;
|
||||
break;
|
||||
}
|
||||
|
||||
item.position = self.Center;
|
||||
item2 = self.GetItem(self.whoAmI, item, anglerRewardSettings);
|
||||
rewardItems.Add(item2);
|
||||
|
||||
// PRIMARY ITEMS
|
||||
switch (questsDone)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
item = new Item();
|
||||
item.SetDefaults(ModContent.ItemType<Spadefish>());
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
item = new Item();
|
||||
item.SetDefaults(ModContent.ItemType<StuffedFish>());
|
||||
item.stack = Main.rand.Next(4, 10);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.HighTestFishingLine);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishHook);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FuzzyCarrot);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishermansGuide);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishCostumeMask);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishCostumeShirt);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishCostumeFinskirt);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ModContent.ItemType<SandyAnglingKit>());
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishMinecart);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.SailfishBoots);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.AnglerHat);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.AnglerVest);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.AnglerPants);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.WeatherRadio);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 12:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishingBobber);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.SeashellHairpin);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.MermaidAdornment);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.MermaidTail);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ModContent.ItemType<SandyAnglingKit>());
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.Sextant);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.TackleBox);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 16:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.SuperAbsorbantSponge);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 17:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.LavaFishingHook);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 18:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.MagicConch);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 19:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.DemonConch);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 20:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.AnglerEarring);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 21:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.HoneyAbsorbantSponge);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 22:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.HotlineFishingHook);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 23:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FrogLeg);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 24:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.SuperheatedBlood);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.BottomlessBucket);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 26:
|
||||
item = new Item();
|
||||
case 26: // Enchanted Sundial
|
||||
item.SetDefaults(ItemID.Sundial);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 27:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.BottomlessHoneyBucket);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 28:
|
||||
item = new Item();
|
||||
case 28: // Golden Bug Net
|
||||
item.SetDefaults(ItemID.GoldenBugNet);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 29:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.BottomlessLavaBucket);
|
||||
rewardItems.Add(item);
|
||||
break;
|
||||
|
||||
case 30:
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.GoldenFishingRod);
|
||||
rewardItems.Add(item);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// RANDOM DROPS
|
||||
// If the quest is of a number that gives a guaranteed reward from Calamity, add it to the reward pool and skip vanilla logic.
|
||||
if (item.type > ItemID.None)
|
||||
rewardItems.Add(item);
|
||||
else
|
||||
orig(self, rewardItems, source, questsDone, rarityReduction, questItemType, ref anglerRewardSettings);
|
||||
}
|
||||
|
||||
// Angling Kits
|
||||
if (Main.rand.NextBool((int)(12f * rarityReduction)) && questsDone > 30)
|
||||
private static void ImproveAnglerBaitReward(On_Player.orig_GetAnglerReward_Bait orig, Player self, List<Item> rewardItems, IEntitySource source, int questsDone, float rarityReduction, ref GetItemSettings anglerRewardSettings)
|
||||
{
|
||||
// Improves the bait reward given for Angler quests in three ways:
|
||||
// 1. Makes bait reward be guaranteed.
|
||||
// 2. Adds the ability for Grand Marquis Bait to be dropped.
|
||||
// 3. Increases the amount of bait dropped.
|
||||
// This entirely replaces the vanilla logic.
|
||||
|
||||
Item bait = new Item();
|
||||
if (Main.rand.NextBool((int)(15f * rarityReduction)))
|
||||
bait.SetDefaults(ModContent.ItemType<GrandMarquisBait>());
|
||||
else if (Main.rand.NextBool((int)(10f * rarityReduction)))
|
||||
bait.SetDefaults(ItemID.MasterBait);
|
||||
else if (Main.rand.NextBool((int)(5f * rarityReduction)))
|
||||
bait.SetDefaults(ItemID.JourneymanBait);
|
||||
else
|
||||
bait.SetDefaults(ItemID.ApprenticeBait);
|
||||
|
||||
bait.stack = 2;
|
||||
if (Main.rand.Next(10) <= questsDone)
|
||||
bait.stack++;
|
||||
if (Main.rand.Next(20) <= questsDone)
|
||||
bait.stack++;
|
||||
if (Main.rand.Next(30) <= questsDone)
|
||||
bait.stack++;
|
||||
if (Main.rand.Next(40) <= questsDone)
|
||||
bait.stack++;
|
||||
if (Main.rand.Next(50) <= questsDone)
|
||||
bait.stack++;
|
||||
|
||||
rewardItems.Add(bait);
|
||||
}
|
||||
|
||||
private static void ImproveAnglerMoneyReward(On_Player.orig_GetAnglerReward_Money orig, Player self, List<Item> rewardItems, IEntitySource source, int questsDone, float rarityReduction, ref GetItemSettings anglerRewardSettings)
|
||||
{
|
||||
// Improves the logic for giving money to the player from Angler quests.
|
||||
// This is accomplished via a higher starting amount, reduced variance, and not truncating off Silver Coins if giving Gold Coins.
|
||||
// This entirely replaces the vanilla logic.
|
||||
|
||||
int moneyDrop = (questsDone + 70) / 2; // Vanilla uses 50
|
||||
moneyDrop = (int)(moneyDrop * Main.rand.NextFloat(1f, 2f)); // Vanilla is 0.75x-3x
|
||||
moneyDrop = (int)(moneyDrop * 1.5f); // Vanilla then arbitrarily multiplies the value by 1.5x
|
||||
if (Main.hardMode)
|
||||
moneyDrop *= 2;
|
||||
if (Main.expertMode)
|
||||
moneyDrop *= 2;
|
||||
if (moneyDrop > 1000)
|
||||
moneyDrop = 1000; // Vanilla has a cap of 10 Gold Coins, or 1000 Silver Coins.
|
||||
|
||||
// moneyDrop now contains the number of SILVER Coins to drop.
|
||||
// Determine the number of Gold Coins to drop, if any.
|
||||
if (moneyDrop >= 100)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(Main.hardMode ? ModContent.ItemType<BleachedAnglingKit>() : ModContent.ItemType<SandyAnglingKit>());
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Golden Fishing Rod
|
||||
if (Main.rand.NextBool((int)(500f * rarityReduction)) && questsDone > 30)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.GoldenFishingRod);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Hotline Fishing Hook
|
||||
if (Main.rand.NextBool((int)(200f * rarityReduction)) && questsDone > 22)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.HotlineFishingHook);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Angler Set
|
||||
if (Main.rand.NextBool((int)(150f * rarityReduction)) && questsDone > 10)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.AnglerHat);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.AnglerVest);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.AnglerPants);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Mermaid Set
|
||||
if (Main.rand.NextBool((int)(150f * rarityReduction)) && questsDone > 13)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.SeashellHairpin);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.MermaidAdornment);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.MermaidTail);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Fish Set
|
||||
if (Main.rand.NextBool((int)(150f * rarityReduction)) && questsDone > 7)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishCostumeMask);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishCostumeShirt);
|
||||
rewardItems.Add(item);
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishCostumeFinskirt);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Fin Wings
|
||||
if (Main.rand.NextBool((int)(140f * rarityReduction)) && Main.hardMode && questsDone > 10)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FinWings);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Bottomless Water Bucket
|
||||
if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 25)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.BottomlessBucket);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Bottomless Honey Bucket
|
||||
if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 27)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.BottomlessHoneyBucket);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Bottomless Lava Bucket
|
||||
if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 29)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.BottomlessLavaBucket);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Magic Conch
|
||||
if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 18)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.MagicConch);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Demon Conch
|
||||
if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 19)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.DemonConch);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Super Absorbant Sponge
|
||||
if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 16)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.SuperAbsorbantSponge);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Honey Absorbant Sponge
|
||||
if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 21)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.SuperAbsorbantSponge);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Golden Bug Net
|
||||
if (Main.rand.NextBool((int)(140f * rarityReduction)) && questsDone > 28)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.GoldenBugNet);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Fish Hook
|
||||
if (Main.rand.NextBool((int)(120f * rarityReduction)) && questsDone > 4)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishHook);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Minecarp
|
||||
if (Main.rand.NextBool((int)(120f * rarityReduction)) && questsDone > 8)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishMinecart);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Lava Shark
|
||||
if (Main.rand.NextBool((int)(120f * rarityReduction)) && questsDone > 24)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.SuperheatedBlood);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// High Test Fishing Line
|
||||
if (Main.rand.NextBool((int)(80f * rarityReduction)) && questsDone > 3)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.HighTestFishingLine);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Angler Earring
|
||||
if (Main.rand.NextBool((int)(80f * rarityReduction)) && questsDone > 20)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.AnglerEarring);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Lavaproof Fishing Hook
|
||||
if (Main.rand.NextBool((int)(80f * rarityReduction)) && questsDone > 17)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.LavaFishingHook);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Tackle Box
|
||||
if (Main.rand.NextBool((int)(80f * rarityReduction)) && questsDone > 15)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.TackleBox);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Fisherman's Pocket Guide
|
||||
if (Main.rand.NextBool((int)(60f * rarityReduction)) && questsDone > 6)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishermansGuide);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Weather Radio
|
||||
if (Main.rand.NextBool((int)(60f * rarityReduction)) && questsDone > 11)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.WeatherRadio);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Sextant
|
||||
if (Main.rand.NextBool((int)(60f * rarityReduction)) && questsDone > 14)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.Sextant);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
// Fishing Bobber
|
||||
if (Main.rand.NextBool((int)(50f * rarityReduction)) && questsDone > 12)
|
||||
{
|
||||
item = new Item();
|
||||
item.SetDefaults(ItemID.FishingBobber);
|
||||
rewardItems.Add(item);
|
||||
}
|
||||
|
||||
PlayerLoader.AnglerQuestReward(self, rarityReduction, rewardItems);
|
||||
|
||||
foreach (Item rewardItem in rewardItems)
|
||||
{
|
||||
rewardItem.position = self.Center;
|
||||
|
||||
Item getItem = self.GetItem(self.whoAmI, rewardItem, GetItemSettings.NPCEntityToPlayerInventorySettings);
|
||||
|
||||
if (getItem.stack > 0)
|
||||
{
|
||||
int number = Item.NewItem(source, (int)self.position.X, (int)self.position.Y, self.width, self.height, getItem.type, getItem.stack, noBroadcast: false, 0, noGrabDelay: true);
|
||||
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
NetMessage.SendData(MessageID.SyncItem, -1, -1, null, number, 1f);
|
||||
}
|
||||
int goldDrop = moneyDrop / 100;
|
||||
Item gold = new Item();
|
||||
gold.SetDefaults(ItemID.GoldCoin);
|
||||
gold.stack = goldDrop;
|
||||
rewardItems.Add(gold);
|
||||
}
|
||||
// Now the Silver Coins to drop.
|
||||
int silverDrop = moneyDrop % 100;
|
||||
Item silver = new Item();
|
||||
silver.SetDefaults(ItemID.SilverCoin);
|
||||
silver.stack = silverDrop;
|
||||
rewardItems.Add(silver);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -24,14 +24,12 @@ namespace CalamityMod.Items.Accessories
|
||||
player.accTackleBox = true;
|
||||
player.accLavaFishing = true;
|
||||
player.Calamity().fishingStation = true;
|
||||
player.sonarPotion = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.LavaproofTackleBag).
|
||||
AddIngredient(ItemID.SonarPotion, 5).
|
||||
AddIngredient(ItemID.MasterBait, 5).
|
||||
AddIngredient<MolluskHusk>(5).
|
||||
AddTile(TileID.Anvils).
|
||||
|
||||
@@ -3,9 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.ChatTags;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.DataStructures;
|
||||
@@ -1753,6 +1750,108 @@ namespace CalamityMod.Items
|
||||
return false;
|
||||
}
|
||||
|
||||
if (line.Mod == "Terraria" && item.type == ModContent.ItemType<OntologicalDespoiler>() && (line.Name == "Tooltip1" || line.Name == "Tooltip2" || line.Name == "Tooltip4" || line.Name == "Tooltip5" || line.Name == "Tooltip7"))
|
||||
{
|
||||
Color rarityColor = Color.Black;
|
||||
Vector2 basePosition = new Vector2(line.X, line.Y);
|
||||
Vector2 backScale = line.BaseScale;
|
||||
Player Owner = Main.LocalPlayer;
|
||||
if (Owner is null)
|
||||
return false;
|
||||
|
||||
float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * 5 / MathHelper.Pi);
|
||||
int draws = 20;
|
||||
Color usedColor = Color.White;
|
||||
if (line.Name == "Tooltip1" || line.Name == "Tooltip4" || line.Name == "Tooltip7") // Give the shifting color to the lines that need it
|
||||
{
|
||||
float rate = (Main.GlobalTimeWrappedHourly * 3);
|
||||
List<Color> eColors = new List<Color>()
|
||||
{
|
||||
Owner.shirtColor,
|
||||
Color.Lerp(Owner.shirtColor, Color.Black, 0.15f),
|
||||
Color.Lerp(Owner.shirtColor, Color.White, 0.05f),
|
||||
Color.Lerp(Owner.shirtColor, Color.White, 0.25f)
|
||||
};
|
||||
int colorIndex = (int)(rate / 2 % eColors.Count);
|
||||
Color currentColor = eColors[colorIndex];
|
||||
Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
|
||||
usedColor = Color.Lerp(currentColor, nextColor, rate % 2f >= 1f ? 1f : rate % 1f);
|
||||
if (Owner.shirtColor == Color.White)
|
||||
usedColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB);
|
||||
}
|
||||
|
||||
if (line.Name == "Tooltip5") // Shaky black outline
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
Vector2 shake = Main.rand.NextVector2Circular(5, 5);
|
||||
Vector2 backPosition = basePosition + shake;
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, rarityColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
|
||||
}
|
||||
}
|
||||
if (line.Name == "Tooltip2" || line.Name == "Tooltip5") // Negative lines (inverted colors)
|
||||
{
|
||||
for (int i = 0; i < draws; i++)
|
||||
{
|
||||
Color clr = (line.Name == "Tooltip5") ? Color.Lerp(Color.White, Color.Black, sine) : Color.White;
|
||||
Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / draws).ToRotationVector2() * (1.5f + 0.2f * sine);
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, clr with { A = 0 }, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
|
||||
}
|
||||
Color clr2 = (line.Name == "Tooltip5") ? Color.Lerp(Color.Black, Color.White, sine) : Color.Black;
|
||||
ChatManager.DrawColorCodedString(Main.spriteBatch, line.Font, line.Text, basePosition, clr2, line.Rotation, line.Origin, backScale);
|
||||
return false;
|
||||
|
||||
}
|
||||
else if (line.Name == "Tooltip4") // Double outline
|
||||
{
|
||||
for (int i = 0; i < draws; i++)
|
||||
{
|
||||
Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / draws).ToRotationVector2() * (4.5f + 0.2f * sine);
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, usedColor with { A = 0 }, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
|
||||
}
|
||||
for (int i = 0; i < draws; i++)
|
||||
{
|
||||
Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / draws).ToRotationVector2() * (2.5f + 0.2f * sine);
|
||||
ChatManager.DrawColorCodedString(Main.spriteBatch, line.Font, line.Text, backPosition, Color.Black, line.Rotation, line.Origin, backScale);
|
||||
}
|
||||
|
||||
ChatManager.DrawColorCodedString(Main.spriteBatch, line.Font, line.Text, basePosition, Color.White, line.Rotation, line.Origin, backScale);
|
||||
return false;
|
||||
}
|
||||
if (line.Name == "Tooltip7") // Dark horizon thing
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Particles/Light").Value;
|
||||
|
||||
Vector2 drawPosition = basePosition;
|
||||
Color drawColor = Color.Black;
|
||||
Vector2 rotationPoint = texture.Size() * 0.5f;
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
int length = line.Text.Length;
|
||||
Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 10 + Vector2.UnitX * (i % 2 == 0 ? -7 * i : 7 * i), null, usedColor with { A = 0 }, (MathHelper.PiOver2), rotationPoint, new Vector2(0.9f - 0.085f * i, 1 + 2.7f * i * 1f) * 0.7f * Main.rand.NextFloat(0.95f, 1f), SpriteEffects.None);
|
||||
Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 10 + Vector2.UnitX * (i % 2 == 0 ? -7 * i : 7 * i), null, drawColor, (MathHelper.PiOver2), rotationPoint, new Vector2(0.9f - 0.05f * i, 1 + 4.5f * i * 1f) * 0.55f * Main.rand.NextFloat(0.95f, 1f), SpriteEffects.None);
|
||||
}
|
||||
|
||||
for (int i = 0; i < draws; i++)
|
||||
{
|
||||
Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / draws).ToRotationVector2() * (1.5f);
|
||||
ChatManager.DrawColorCodedString(Main.spriteBatch, line.Font, line.Text, backPosition, usedColor with { A = 0 } * 0.6f, line.Rotation, line.Origin, backScale);
|
||||
}
|
||||
ChatManager.DrawColorCodedString(Main.spriteBatch, line.Font, line.Text, basePosition, Color.Black, line.Rotation, line.Origin, backScale);
|
||||
return false;
|
||||
}
|
||||
if (line.Name == "Tooltip1")
|
||||
{
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, basePosition, usedColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Draw the front text as usual as a backup just in case.
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, basePosition, Color.White, line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Rainbow effect originally made for Orderbringer because it used to have a special rarity
|
||||
// But why did it have one in the first place??
|
||||
// Might be used for Miracle stuff later or something idk
|
||||
|
||||
@@ -77,12 +77,12 @@ namespace CalamityMod.Items
|
||||
{ ItemID.ChlorophyteClaymore, Do(UseMeleeSpeed, DamageExact(180), UseExact(45), ShootSpeedExact(22f)) },
|
||||
{ ItemID.ChlorophytePartisan, Do(AutoReuse, UseMeleeSpeed, DamageExact(98)) },
|
||||
{ ItemID.ChlorophyteSaber, Do(UseMeleeSpeed, DamageExact(92), UseExact(10)) },
|
||||
{ ItemID.ChristmasTreeSword, Do(AutoReuse, UseTurn, UseMeleeSpeed, DamageExact(80), UseExact(30)) },
|
||||
{ ItemID.ChristmasTreeSword, Do(UseTurn, UseMeleeSpeed, DamageExact(80), UseExact(30)) },
|
||||
{ ItemID.ClingerStaff, Do(DamageExact(63)) },
|
||||
{ ItemID.ClockworkAssaultRifle, Do(DamageExact(21)) },
|
||||
{ ItemID.CobaltNaginata, Do(AutoReuse, TrueMelee, DamageExact(55), UseExact(9), ShootSpeedExact(12f)) },
|
||||
{ ItemID.CobaltRepeater, Do(UseExact(18)) },
|
||||
{ ItemID.CobaltSword, Do(UseTurn, DamageExact(60), UseExact(9)) },
|
||||
{ ItemID.CobaltSword, Do(DamageExact(60), UseExact(9)) },
|
||||
{ ItemID.Code2, Do(AutoReuse, DamageExact(43)) },
|
||||
{ ItemID.CoinGun, Do(UseExact(12)) },
|
||||
{ ItemID.CorruptYoyo, Do(AutoReuse, DamageExact(20)) }, // Malaise
|
||||
@@ -95,21 +95,21 @@ namespace CalamityMod.Items
|
||||
{ ItemID.CursedDart, Do(DamageExact(25)) },
|
||||
{ ItemID.Cutlass, Do(UseRatio(0.9f), DamageExact(90)) },
|
||||
{ ItemID.DaedalusStormbow, Do(DamageExact(30)) },
|
||||
{ ItemID.DaoofPow, Do(DamageExact(85)) },
|
||||
{ ItemID.DaoofPow, Do(DamageExact(85)) }, // Displays as 170 damage
|
||||
{ ItemID.DarkLance, Do(AutoReuse, TrueMelee, DamageExact(40)) },
|
||||
{ ItemID.DartRifle, Do(DamageExact(58)) },
|
||||
{ ItemID.DayBreak, Do(DamageExact(125), UseExact(20)) },
|
||||
{ ItemID.DD2BetsyBow, Do(DamageExact(42)) }, // Aerial Bane's ridiculous multiplier is removed, so this compensates for that
|
||||
{ ItemID.DD2SquireBetsySword, Do(UseMeleeSpeed, DamageExact(150)) }, // Flying Dragon
|
||||
{ ItemID.DD2SquireDemonSword, Do(DamageExact(110), UseExact(25)) }, // Brand of the Inferno
|
||||
{ ItemID.DeadlySphereStaff, Do(AutoReuse, UseExact(20), DamageExact(50)) },
|
||||
{ ItemID.DeadlySphereStaff, Do(UseExact(20), DamageExact(50)) },
|
||||
{ ItemID.DeathSickle, Do(UseMeleeSpeed, DamageExact(70), ShootSpeedExact(15f)) },
|
||||
{ ItemID.DemonBow, Do(DamageExact(12), AutoReuse) },
|
||||
{ ItemID.DemonScythe, Do(AutoReuse, DamageExact(28)) },
|
||||
{ ItemID.DyeTradersScimitar, Do(AutoReuse, UseTurn, DamageExact(24)) }, // Exotic Scimitar
|
||||
{ ItemID.ElfMelter, Do(ShootSpeedDelta(+5f)) },
|
||||
{ ItemID.EmeraldStaff, Do(DamageExact(27)) },
|
||||
{ ItemID.EmpressBlade, Do(AutoReuse, DamageExact(50), UseExact(20)) }, // Terraprisma
|
||||
{ ItemID.EmpressBlade, Do(DamageExact(50), UseExact(20)) }, // Terraprisma
|
||||
{ ItemID.EnchantedBoomerang, Do(DamageExact(24)) },
|
||||
{ ItemID.EnchantedSword, Do(UseMeleeSpeed, DamageExact(30), ShootSpeedExact(15f)) },
|
||||
{ ItemID.EndlessMusketPouch, Do(DamageExact(8)) },
|
||||
@@ -136,20 +136,20 @@ namespace CalamityMod.Items
|
||||
{ ItemID.Handgun, Do(UseExact(20)) },
|
||||
{ ItemID.HighVelocityBullet, Do(DamageExact(13)) },
|
||||
{ ItemID.HiveFive, Do(AutoReuse, DamageExact(27)) },
|
||||
{ ItemID.HornetStaff, Do(AutoReuse, DamageExact(18), UseExact(30)) },
|
||||
{ ItemID.HornetStaff, Do(DamageExact(18), UseExact(30)) },
|
||||
{ ItemID.IceBlade, Do(UseMeleeSpeed) },
|
||||
{ ItemID.IceBoomerang, Do(UseExact(25), ShootSpeedExact(9)) },
|
||||
{ ItemID.IceRod, Do(UseExact(6), ShootSpeedExact(20)) },
|
||||
{ ItemID.IceSickle, Do(AutoReuse, UseMeleeSpeed, DamageExact(75), ShootSpeedExact(20f)) },
|
||||
{ ItemID.IchorArrow, Do(DamageExact(13)) },
|
||||
{ ItemID.IchorBullet, Do(DamageExact(11)) },
|
||||
{ ItemID.ImpStaff, Do(AutoReuse, UseExact(30), DamageExact(25)) },
|
||||
{ ItemID.ImpStaff, Do(UseExact(30), DamageExact(25)) },
|
||||
{ ItemID.InfernoFork, Do(DamageExact(83), ShootSpeedExact(11)) },
|
||||
{ ItemID.InfluxWaver, Do(UseMeleeSpeed, DamageExact(80), UseExact(25)) },
|
||||
{ ItemID.IronShortsword, Do(AutoReuse, TrueMelee, DamageExact(10)) },
|
||||
{ ItemID.Keybrand, Do(UseTurn) },
|
||||
{ ItemID.Kraken, Do(AutoReuse, DamageExact(65)) },
|
||||
{ ItemID.KOCannon, Do(DamageRatio(2.65f)) }, // Uses ratios due to remix seed
|
||||
{ ItemID.Kraken, Do(AutoReuse, DamageExact(65)) },
|
||||
{ ItemID.LaserMachinegun, Do(DamageExact(49)) },
|
||||
{ ItemID.LaserRifle, Do(DamageExact(46), UseExact(10), ManaExact(4)) },
|
||||
{ ItemID.LastPrism, Do(DamageExact(57), ManaExact(10)) },
|
||||
@@ -190,7 +190,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.PaladinsHammer, Do(DamageExact(95), ShootSpeedExact(28)) },
|
||||
{ ItemID.PalladiumPike, Do(AutoReuse, TrueMelee, DamageExact(120), ShootSpeedExact(5.4f)) },
|
||||
{ ItemID.PalladiumRepeater, Do(DamageExact(45)) },
|
||||
{ ItemID.PalladiumSword, Do(UseTurn, DamageExact(150)) },
|
||||
{ ItemID.PalladiumSword, Do(DamageExact(150)) },
|
||||
{ ItemID.PearlwoodBow, Do(AutoReuse, DamageExact(32)) },
|
||||
{ ItemID.PearlwoodSword, Do(UseTurn, DamageExact(45)) },
|
||||
{ ItemID.PewMaticHorn, Do(DamageExact(25), ShootSpeedExact(15)) },
|
||||
@@ -203,11 +203,11 @@ namespace CalamityMod.Items
|
||||
{ ItemID.PurpleClubberfish, Do(UseTurn, KnockbackExact(10f)) },
|
||||
{ ItemID.PurplePhaseblade, phaseblade },
|
||||
{ ItemID.PurplePhasesaber, phasesaber },
|
||||
{ ItemID.PygmyStaff, Do(AutoReuse, UseExact(20), DamageExact(63)) },
|
||||
{ ItemID.PygmyStaff, Do(UseExact(20), DamageExact(63)) },
|
||||
{ ItemID.RainbowGun, Do(DamageExact(60), ManaExact(40)) },
|
||||
{ ItemID.RainbowRod, Do(DamageExact(40), ManaExact(13), KnockbackExact(8f)) },
|
||||
{ ItemID.Rally, Do(AutoReuse, DamageExact(18)) },
|
||||
{ ItemID.RavenStaff, Do(AutoReuse, UseExact(20), DamageExact(36)) },
|
||||
{ ItemID.RavenStaff, Do(UseExact(20), DamageExact(36)) },
|
||||
{ ItemID.RazorbladeTyphoon, Do(DamageExact(103)) },
|
||||
{ ItemID.Razorpine, Do(DamageExact(40)) },
|
||||
{ ItemID.RedPhaseblade, phaseblade },
|
||||
@@ -230,7 +230,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.SilverShortsword, Do(AutoReuse, TrueMelee, DamageExact(14)) },
|
||||
{ ItemID.SkyFracture, Do(DamageExact(46)) },
|
||||
{ ItemID.SlapHand, Do(UseTurn, DamageExact(120)) },
|
||||
{ ItemID.Smolstar, Do(DamageExact(9), AutoReuse, UseExact(25)) }, // Blade Staff
|
||||
{ ItemID.Smolstar, Do(DamageExact(9), UseExact(25)) }, // Blade Staff
|
||||
{ ItemID.SniperRifle, Do(DamageExact(200), UseExact(40)) },
|
||||
{ ItemID.SolarEruption, Do(DamageExact(122)) },
|
||||
{ ItemID.SoulDrain, Do(DamageExact(38)) }, // Life Drain
|
||||
@@ -240,8 +240,8 @@ namespace CalamityMod.Items
|
||||
{ ItemID.SpiritFlame, Do(UseExact(20), ManaExact(11), ShootSpeedExact(2f)) },
|
||||
{ ItemID.StaffofEarth, Do(DamageExact(150)) },
|
||||
{ ItemID.StarCannon, Do(DamageExact(25), UseExact(15)) },
|
||||
{ ItemID.StardustDragonStaff, Do(AutoReuse, DamageExact(20), UseExact(19)) },
|
||||
{ ItemID.StormTigerStaff, Do(AutoReuse, DamageExact(49), UseExact(20)) }, // Desert Tiger Staff
|
||||
{ ItemID.StardustDragonStaff, Do(DamageExact(20), UseExact(19)) },
|
||||
{ ItemID.StormTigerStaff, Do(DamageExact(49), UseExact(20)) }, // Desert Tiger Staff
|
||||
{ ItemID.StylistKilLaKillScissorsIWish, Do(AutoReuse, UseTurn, DamageExact(21)) }, // Stylish Scissors
|
||||
{ ItemID.Stynger, Do(DamageExact(75)) },
|
||||
{ ItemID.SuperStarCannon, Do(DamageExact(55)) },
|
||||
@@ -422,8 +422,7 @@ namespace CalamityMod.Items
|
||||
#endregion
|
||||
|
||||
#region CATEGORY 5: Summoner Quality of Life
|
||||
{ ItemID.AbigailsFlower, autoReuse },
|
||||
{ ItemID.BabyBirdStaff, Do(AutoReuse, UseExact(35)) }, // Finch Staff
|
||||
{ ItemID.BabyBirdStaff, Do(UseExact(35)) }, // Finch Staff
|
||||
{ ItemID.BlandWhip, autoReuse }, // Leather Whip
|
||||
{ ItemID.BoneWhip, autoReuse }, // Spinal Tap
|
||||
{ ItemID.CoolWhip, autoReuse },
|
||||
@@ -440,24 +439,24 @@ namespace CalamityMod.Items
|
||||
{ ItemID.DD2LightningAuraT2Popper, Do(AutoReuse, UseExact(25)) }, // Lightning Aura Tier 2
|
||||
{ ItemID.DD2LightningAuraT3Popper, Do(AutoReuse, UseExact(20)) }, // Lightning Aura Tier 3
|
||||
{ ItemID.FireWhip, autoReuse }, // Firecracker
|
||||
{ ItemID.FlinxStaff, Do(AutoReuse, UseExact(35)) },
|
||||
{ ItemID.FlinxStaff, Do(UseExact(35)) },
|
||||
{ ItemID.MaceWhip, autoReuse }, // Morning Star
|
||||
{ ItemID.OpticStaff, Do(AutoReuse, UseExact(25)) },
|
||||
{ ItemID.PirateStaff, Do(AutoReuse, UseExact(25)) },
|
||||
{ ItemID.OpticStaff, Do(UseExact(25)) },
|
||||
{ ItemID.PirateStaff, Do(UseExact(25)) },
|
||||
{ ItemID.QueenSpiderStaff, Do(UseExact(25)) },
|
||||
{ ItemID.RainbowCrystalStaff, Do(UseExact(15)) },
|
||||
{ ItemID.RainbowWhip, autoReuse }, // Kaleidoscope
|
||||
{ ItemID.SanguineStaff, Do(AutoReuse, UseExact(25)) },
|
||||
{ ItemID.SanguineStaff, Do(UseExact(25)) },
|
||||
{ ItemID.ScytheWhip, autoReuse }, // Dark Harvest
|
||||
{ ItemID.SlimeStaff, Do(AutoReuse, UseExact(30)) },
|
||||
{ ItemID.SpiderStaff, Do(AutoReuse, UseExact(25)) },
|
||||
{ ItemID.SlimeStaff, Do(UseExact(30)) },
|
||||
{ ItemID.SpiderStaff, Do(UseExact(25)) },
|
||||
{ ItemID.StaffoftheFrostHydra, Do(UseExact(20)) },
|
||||
{ ItemID.StardustCellStaff, Do(AutoReuse, UseExact(20)) },
|
||||
{ ItemID.StardustCellStaff, Do(UseExact(20)) },
|
||||
{ ItemID.SwordWhip, autoReuse }, // Durendal
|
||||
{ ItemID.TempestStaff, Do(AutoReuse, UseExact(20)) },
|
||||
{ ItemID.TempestStaff, Do(UseExact(20)) },
|
||||
{ ItemID.ThornWhip, autoReuse }, // Snapthorn
|
||||
{ ItemID.VampireFrogStaff, Do(AutoReuse, UseExact(30)) },
|
||||
{ ItemID.XenoStaff, Do(AutoReuse, UseExact(20)) },
|
||||
{ ItemID.VampireFrogStaff, Do(UseExact(30)) },
|
||||
{ ItemID.XenoStaff, Do(UseExact(20)) },
|
||||
#endregion
|
||||
|
||||
#region CATEGORY 6: Other Quality of Life (AutoReuse / UseTurn)
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
using CalamityMod.Buffs.Pets;
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Pets
|
||||
{
|
||||
public class FrostyBatBottle : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Pets";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToVanitypet(ModContent.ProjectileType<FrostyBatPet>(), ModContent.BuffType<FrostyBatBuff>());
|
||||
Item.rare = ItemRarityID.Green;
|
||||
Item.value = Item.sellPrice(gold: 3);
|
||||
}
|
||||
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer && player.itemTime == 0)
|
||||
{
|
||||
player.AddBuff(Item.buffType, 3600, true);
|
||||
}
|
||||
}
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryCustomScale(
|
||||
spriteBatch,
|
||||
texture: TextureAssets.Item[Type].Value,
|
||||
position,
|
||||
frame,
|
||||
drawColor,
|
||||
itemColor,
|
||||
origin,
|
||||
scale,
|
||||
wantedScale: 1.3f,
|
||||
drawOffset: new(0f, 0f)
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
@@ -0,0 +1,46 @@
|
||||
using CalamityMod.Buffs.Pets;
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Pets
|
||||
{
|
||||
public class ToastyBatBottle : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Pets";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToVanitypet(ModContent.ProjectileType<ToastyBatPet>(), ModContent.BuffType<ToastyBatBuff>());
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.value = Item.sellPrice(gold: 3);
|
||||
}
|
||||
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer && player.itemTime == 0)
|
||||
{
|
||||
player.AddBuff(Item.buffType, 3600, true);
|
||||
}
|
||||
}
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryCustomScale(
|
||||
spriteBatch,
|
||||
texture: TextureAssets.Item[Type].Value,
|
||||
position,
|
||||
frame,
|
||||
drawColor,
|
||||
itemColor,
|
||||
origin,
|
||||
scale,
|
||||
wantedScale: 1.3f,
|
||||
drawOffset: new(0f, 0f)
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 410 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class CarrionSwallowerBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 131;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 388 B |
|
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 379 B |
|
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 333 B |
|
Before Width: | Height: | Size: 306 B After Width: | Height: | Size: 435 B |
|
After Width: | Height: | Size: 389 B |
|
After Width: | Height: | Size: 484 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class HauntedChumBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 134;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 403 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class JellyghoulBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 135;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 356 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class KelpieSeadragonBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 136;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 350 B |
@@ -0,0 +1,10 @@
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
[LegacyName("BlindedAnglerBanner")]
|
||||
public class LazarusLampfishBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 104;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 393 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class LeerslugBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 137;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 383 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class LostShoalBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 138;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 385 B |
|
After Width: | Height: | Size: 413 B |
|
After Width: | Height: | Size: 386 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class PearlpodBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 141;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 340 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class PodobooKoiBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 143;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 418 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class PolyperilBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 144;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 400 B |
|
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 398 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class PrismaticGuppyBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 145;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 397 B |
|
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 384 B |
@@ -0,0 +1,10 @@
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
[LegacyName("SeaSerpentBanner")]
|
||||
public class SandProwlerBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 106;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 411 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class ScavengerBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 146;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 429 B |
|
Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 409 B |
|
Before Width: | Height: | Size: 351 B After Width: | Height: | Size: 371 B |
@@ -1,7 +0,0 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class SeaSerpentBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 106;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 300 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class SearslugBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 147;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 479 B After Width: | Height: | Size: 434 B |
|
After Width: | Height: | Size: 374 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class SlugbunBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 149;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 423 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class SteampodBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 150;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 424 B |
|
After Width: | Height: | Size: 398 B |
@@ -0,0 +1,7 @@
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class StormlionSentryBanner : BaseBanner
|
||||
{
|
||||
public override int BannerTileStyle => 142;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 377 B |
@@ -80,9 +80,6 @@ namespace CalamityMod.Items.TreasureBags
|
||||
// Vanity
|
||||
itemLoot.Add(ModContent.ItemType<AquaticScourgeMask>(), 7);
|
||||
itemLoot.Add(ModContent.ItemType<ThankYouPainting>(), ThankYouPainting.DropInt);
|
||||
|
||||
// Fishing
|
||||
itemLoot.Add(ModContent.ItemType<BleachedAnglingKit>());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,9 +83,6 @@ namespace CalamityMod.Items.TreasureBags
|
||||
// Vanity
|
||||
itemLoot.Add(ModContent.ItemType<DesertScourgeMask>(), 7);
|
||||
itemLoot.Add(ModContent.ItemType<ThankYouPainting>(), ThankYouPainting.DropInt);
|
||||
|
||||
// Fishing
|
||||
itemLoot.Add(ModContent.ItemType<SandyAnglingKit>());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ItemDropRules;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.TreasureBags.MiscGrabBags
|
||||
{
|
||||
public class BleachedAnglingKit : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.TreasureBags";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 10;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<SandyAnglingKit>();
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 24;
|
||||
Item.height = 24;
|
||||
Item.maxStack = Item.CommonMaxStack;
|
||||
Item.consumable = true;
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
}
|
||||
|
||||
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
|
||||
{
|
||||
itemGroup = ContentSamples.CreativeHelper.ItemGroup.GoodieBags;
|
||||
}
|
||||
|
||||
public override bool CanRightClick() => true;
|
||||
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
{
|
||||
// Different drop rates on Normal and Expert, so define normal first, then expert
|
||||
var normalOnly = itemLoot.DefineNormalOnlyDropSet();
|
||||
normalOnly.Add(ItemID.FishermansGuide, 18);
|
||||
normalOnly.Add(ItemID.WeatherRadio, 18);
|
||||
normalOnly.Add(ItemID.Sextant, 18);
|
||||
normalOnly.Add(ItemID.FishingPotion, 3, 2, 3);
|
||||
normalOnly.Add(ItemID.SonarPotion, 3, 2, 3);
|
||||
normalOnly.Add(ItemID.CratePotion, 3, 2, 3);
|
||||
normalOnly.Add(ItemID.GoldCoin, 1, 3, 4);
|
||||
|
||||
var expertPlus = itemLoot.DefineConditionalDropSet(new Conditions.IsExpert());
|
||||
expertPlus.Add(ItemID.FishermansGuide, 14);
|
||||
expertPlus.Add(ItemID.WeatherRadio, 14);
|
||||
expertPlus.Add(ItemID.Sextant, 14);
|
||||
expertPlus.Add(ItemID.FishingPotion, 2, 2, 3);
|
||||
expertPlus.Add(ItemID.SonarPotion, 2, 2, 3);
|
||||
expertPlus.Add(ItemID.CratePotion, 2, 2, 3);
|
||||
expertPlus.Add(ItemID.GoldCoin, 1, 4, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 628 B |
@@ -1,55 +0,0 @@
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ItemDropRules;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.TreasureBags.MiscGrabBags
|
||||
{
|
||||
public class SandyAnglingKit : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.TreasureBags";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 10;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 24;
|
||||
Item.height = 24;
|
||||
Item.maxStack = Item.CommonMaxStack;
|
||||
Item.consumable = true;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
|
||||
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
|
||||
{
|
||||
itemGroup = ContentSamples.CreativeHelper.ItemGroup.GoodieBags;
|
||||
}
|
||||
|
||||
public override bool CanRightClick() => true;
|
||||
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
{
|
||||
// Different drop rates on Normal and Expert, so define normal first, then expert
|
||||
var normalOnly = itemLoot.DefineNormalOnlyDropSet();
|
||||
normalOnly.Add(ItemID.FishermansGuide, 20);
|
||||
normalOnly.Add(ItemID.WeatherRadio, 20);
|
||||
normalOnly.Add(ItemID.Sextant, 20);
|
||||
normalOnly.Add(ItemID.FishingPotion, 3, 2, 3);
|
||||
normalOnly.Add(ItemID.SonarPotion, 3, 2, 3);
|
||||
normalOnly.Add(ItemID.CratePotion, 3, 2, 3);
|
||||
normalOnly.Add(ItemID.GoldCoin, 1, 1, 2);
|
||||
|
||||
var expertPlus = itemLoot.DefineConditionalDropSet(new Conditions.IsExpert());
|
||||
expertPlus.Add(ItemID.FishermansGuide, 16);
|
||||
expertPlus.Add(ItemID.WeatherRadio, 16);
|
||||
expertPlus.Add(ItemID.Sextant, 16);
|
||||
expertPlus.Add(ItemID.FishingPotion, 2, 2, 3);
|
||||
expertPlus.Add(ItemID.SonarPotion, 2, 2, 3);
|
||||
expertPlus.Add(ItemID.CratePotion, 2, 2, 3);
|
||||
expertPlus.Add(ItemID.GoldCoin, 1, 2, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 599 B |
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
Item.width = 26;
|
||||
Item.height = 26;
|
||||
Item.damage = 980;
|
||||
Item.damage = 1350;
|
||||
Item.DamageType = DamageClass.MeleeNoSpeed;
|
||||
Item.useTime = 24;
|
||||
Item.useAnimation = 24;
|
||||
|
||||
@@ -141,8 +141,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Projectile.NewProjectile(source, player.Center + angle.ToRotationVector2() * 90f, velocity, ProjectileType<ArkoftheCosmosBlast>(), (int)(damage * BlastDamageMultiplier), 0, player.whoAmI, Charge);
|
||||
Charge = 0;
|
||||
|
||||
// If the parry holdout has existed for very few frames and hasn't parried something, just delete it.
|
||||
if (parrier is not null && parrier.timeLeft > ArkoftheCosmosParryHoldout.MaxTime - DoubleRightClickFrames && parrier.ai[1] <= 0f)
|
||||
// If the parry holdout has existed for very few frames, just delete it.
|
||||
if (parrier is not null && parrier.timeLeft > ArkoftheCosmosParryHoldout.MaxTime - DoubleRightClickFrames)
|
||||
{
|
||||
parrier.active = false;
|
||||
parrier.netUpdate = true;
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<StarburstShiv>().
|
||||
AddIngredient<Lightspeed>().
|
||||
AddIngredient<CosmiliteBar>(8).
|
||||
AddTile<CosmicAnvil>().
|
||||
Register();
|
||||
|
||||
@@ -144,8 +144,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<Terratomere>().
|
||||
AddIngredient<Lightspeed>().
|
||||
AddIngredient<EntropicClaymore>().
|
||||
AddIngredient<AnarchyBlade>().
|
||||
AddIngredient<FlarefrostBlade>().
|
||||
AddIngredient<MiracleMatter>().
|
||||
AddTile(TileType<DraedonsForge>()).
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
[LegacyName("ElementalShortsword", "ElementalShiv")]
|
||||
public class Lightspeed : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Melee";
|
||||
|
||||
public static int MaxEnergy = 100;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 74;
|
||||
Item.height = 94;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.damage = 196;
|
||||
Item.DamageType = TrueMeleeDamageClass.Instance;
|
||||
Item.useAnimation = Item.useTime = 20;
|
||||
Item.shootSpeed = 10f;
|
||||
Item.knockBack = 2f;
|
||||
Item.value = CalamityGlobalItem.RarityPurpleBuyPrice;
|
||||
Item.rare = ItemRarityID.Purple;
|
||||
Item.shoot = ModContent.ProjectileType<LightspeedHoldout>();
|
||||
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
|
||||
Item.autoReuse = true;
|
||||
Item.channel = true;
|
||||
base.SetDefaults();
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void HoldItem(Player player)
|
||||
{
|
||||
if (player.Calamity().cooldowns.TryGetValue(ElementalMastery.ID, out var cooldown))
|
||||
{
|
||||
cooldown.timeLeft = player.Calamity().elementalMastery;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.AddCooldown(ElementalMastery.ID, 0);
|
||||
}
|
||||
}
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.PiercingStarlight).
|
||||
AddIngredient<Lucrecia>().
|
||||
AddIngredient(ItemID.LunarBar, 5).
|
||||
AddIngredient<LifeAlloy>(5).
|
||||
AddIngredient(ItemID.FragmentSolar, 5).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -1,20 +1,14 @@
|
||||
using System;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Systems.Collections;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Mono.Cecil;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.Audio;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using Terraria.ModLoader;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Melee.Shortswords;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
[LegacyName("ElementalShortsword", "ElementalShiv")]
|
||||
public class StarburstShiv : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Melee";
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 74;
|
||||
Item.height = 94;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.autoReuse = true;
|
||||
Item.useStyle = ItemUseStyleID.Rapier;
|
||||
Item.damage = 138;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useAnimation = Item.useTime = 13;
|
||||
Item.shoot = ModContent.ProjectileType<StarburstShivProj>();
|
||||
Item.shootSpeed = 2.4f;
|
||||
Item.knockBack = 8.5f;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.value = CalamityGlobalItem.RarityPurpleBuyPrice;
|
||||
Item.rare = ItemRarityID.Purple;
|
||||
}
|
||||
|
||||
public override bool MeleePrefix() => true;
|
||||
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) => Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/StarburstShivGlow").Value);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.PiercingStarlight).
|
||||
AddIngredient(ItemID.LunarBar, 5).
|
||||
AddIngredient<LifeAlloy>(5).
|
||||
AddIngredient(ItemID.FragmentSolar, 5).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public static int AftershotCooldownFrames = 9;
|
||||
public static int Charge1Frames = 156;
|
||||
public static int Charge2Frames = 308;
|
||||
public static Color mainColor = new Color(116, 225, 0);
|
||||
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
@@ -32,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 58;
|
||||
Item.height = 28;
|
||||
Item.damage = 172;
|
||||
Item.damage = 125;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useAnimation = Item.useTime = AftershotCooldownFrames;
|
||||
Item.noMelee = true;
|
||||
@@ -65,8 +66,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
CreateRecipe().
|
||||
AddIngredient<OpalStriker>().
|
||||
AddIngredient<MagnaCannon>().
|
||||
AddIngredient<LifeAlloy>(3).
|
||||
AddIngredient(ItemID.MartianConduitPlating, 15).
|
||||
AddIngredient<CoreofCalamity>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.UseSound = new SoundStyle("CalamityMod/Sounds/Item/PlasmaBlast");
|
||||
Item.UseSound = new SoundStyle("CalamityMod/Sounds/Item/StarfleetStar");
|
||||
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
|
||||
Item.rare = ModContent.RarityType<Turquoise>();
|
||||
Item.Calamity().donorItem = true;
|
||||
|
||||