Merge branch '1.4.4' into Rev+-Golem-nerfs

This commit is contained in:
CongratsIsTrash committed 2025-07-09 21:14:53 -04:00
commit 999d58a0ae
402 files changed
+3065 -3872

No files matched your search

+93 -2
View File
@@ -73,6 +73,7 @@ namespace CalamityMod.Backgrounds
// Leaving this here for other programmers, in case I don't get to doing this myself.
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, null, CalamityUtils.BackgroundMatrix);
DrawShoresBG();
DrawBurrowsBG();
Main.spriteBatch.End();
@@ -97,6 +98,7 @@ namespace CalamityMod.Backgrounds
// rendering code if that setting is on.
if (Main.WaveQuality > 0 || !CalamityClientConfig.Instance.SunkenSeaBackgroundDistortion)
{
DrawShoresBG();
DrawBurrowsBG();
}
else
@@ -123,14 +125,103 @@ namespace CalamityMod.Backgrounds
}
public static float Transparency;
public static float TransitionSpeed => 0.02f;
private static void DrawShoresBG()
{
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>()))
{
Transparency += 1f;
if (Transparency > 1f)
Transparency = 1f;
}
else
{
// Make transparency immediately go down so it doesnt look weird, since vanilla underground backgrounds dont have the fade-in effect this background has.
Transparency -= 1f;
if (Transparency < 0f)
Transparency = 0f;
}
// Don't bother running any of the background drawing if the transparency is zero (meaning the background isnt actually active).
// Also do not run any of the background drawing if you have the vanilla background config option turned off.
if (Transparency > 0f && Main.BackgroundEnabled)
{
Vector2 vector = Main.screenPosition + new Vector2((Main.screenWidth >> 1), (Main.screenHeight >> 1));
float num = (Main.GameViewMatrix.Zoom.Y - 1f) * 0.5f * 200f;
float Scale = 1.5f;
float playerDrawPosition = ((Main.LocalPlayer.Center.Y / 16f) - 90) * 16f;
for (int Layers = 4; Layers >= 0; Layers--)
{
// Get each background texture.
Texture2D BGTexture = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/SunkenSeaShoresBG" + Layers).Value;
Vector2 vector2 = new Vector2(BGTexture.Width, BGTexture.Height) * 0.5f;
float num2 = (Layers * 2 + 3f);
Vector2 vector3 = new Vector2(1f / num2);
Rectangle rectangle = new Rectangle(0, 0, BGTexture.Width, BGTexture.Height);
Vector2 zero = Vector2.Zero;
switch (Layers)
{
case 0:
{
zero.Y += 200f;
break;
}
case 1:
{
zero.Y += 0f;
break;
}
case 2:
{
zero.Y += 0f;
break;
}
case 3:
{
zero.Y += 0f;
break;
}
case 4:
{
zero.Y += 0f;
break;
}
}
vector2 *= Scale;
zero.Y -= num;
float LoopWidth = Scale * rectangle.Width;
float LoopHeight = Scale * rectangle.Height;
int LoopX = (int)((vector.X * vector3.X - vector2.X + zero.X - (Main.screenWidth >> 1)) / LoopWidth);
int LoopY = (int)((vector.Y * vector3.Y - vector2.Y + zero.Y - (Main.screenWidth >> 1)) / LoopWidth);
for (int i = LoopY - 2; i < LoopY + 4 + (int)(Main.screenWidth / LoopHeight); i++)
{
for (int j = LoopX - 2; j < LoopX + 4 + (int)(Main.screenWidth / LoopWidth); j++)
{
Vector2 drawPosition = (new Vector2(j * Scale * (rectangle.Width / vector3.X), playerDrawPosition) + vector2 - vector) * vector3 + vector - Main.screenPosition - vector2 + zero;
var frame = rectangle;
var color = Color.White * Transparency;
Main.spriteBatch.Draw(BGTexture, drawPosition, frame, color, 0f, Vector2.Zero, Scale, SpriteEffects.None, 0f);
}
}
}
}
}
private static void DrawBurrowsBG()
{
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.GleamingBurrowsBiome>()))
{
Transparency += TransitionSpeed;
Transparency += 1f;
if (Transparency > 1f)
Transparency = 1f;
Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

+18 -17
View File
@@ -36,6 +36,7 @@ namespace CalamityMod.Balancing
public override void SetStaticDefaults()
{
// Dirty shorthand for true melee resists, because they're super common and other class resists aren't.
// If you add/change a true melee resist here, be sure to add/change the resist in CalamityGlobalNPC ModifyHitByItem as well.
IBalancingRule ResistTrueMelee(float f) => new ClassResistBalancingRule(f, TrueMeleeDamageClass.Instance);
// Declare specific filters.
@@ -136,8 +137,11 @@ namespace CalamityMod.Balancing
#endregion
#region Astrum Aureus
// 30% resist to The Ballista's greatarrows.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<BallistaGreatArrow>()))));
// 25% resist to true melee.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), ResistTrueMelee(0.75f)));
// 25% resist to The Ballista's greatarrows.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<BallistaGreatArrow>()))));
#endregion
#region Duke Fishron
@@ -169,15 +173,12 @@ namespace CalamityMod.Balancing
// 35% resist to Flying Dragon.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
// 30% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
// 30% resist to Flak Kraken.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
// 25% resist to Lucrecia.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<DNA>()))));
// 20% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<AuroraFire>()))));
// 20% resist to The Hive.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<HiveNuke>(), ProjectileType<HiveMissile>()))));
#endregion
@@ -206,27 +207,27 @@ namespace CalamityMod.Balancing
// 70% resist to Stardust Dragon Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
// 55% resist to Flak Kraken.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType<FlakKrakenProjectile>()))));
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(ResistTrueMelee(0.5f))));
// 50% resist to Atlantis (Atlantis gaming!).
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AtlantisSpear>()))));
// 50% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AuroraFire>()))));
// 35% resist to Aerial Bane.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2BetsyArrow))));
// 35% resist to Ballistic Poison Bomb's clouds.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<BallisticPoisonCloud>()))));
// 35% resist to Icicle Arrows.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<IcicleArrowProj>()))));
// 30% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
// 30% resist to Flak Kraken.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
// 20% resist to Ballistic Poison Bomb's clouds.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BallisticPoisonCloud>()))));
// 20% resist to Cluster Rocket fragments.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.ClusterFragmentsI, ProjectileID.ClusterFragmentsII))));
#endregion
+2 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Accessories.Vanity;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -18,11 +19,7 @@ namespace CalamityMod.Buffs
public override void Update(Player player, ref int buffIndex)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.snowmanPrevious)
{
modPlayer.snowmanPower = true;
}
else
if (player.Transformation().Type != ModContent.ItemType<Popo>())
{
player.DelBuff(buffIndex);
buffIndex--;
+2 -4
View File
@@ -1,4 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Accessories.Vanity;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -17,11 +18,8 @@ namespace CalamityMod.Buffs
public override void Update(Player player, ref int buffIndex)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.snowmanPrevious)
{
modPlayer.snowmanPower = true;
if (player.Transformation().Type == ModContent.ItemType<Popo>())
modPlayer.snowmanNoseless = true;
}
else
{
player.DelBuff(buffIndex);
-1
View File
@@ -26,7 +26,6 @@ namespace CalamityMod.Buffs.StatBuffs
player.maxFallSpeed = 9f;
player.gills = true;
}
modPlayer.abyssalDivingSuitPower = true;
modPlayer.depthCharm = true;
modPlayer.jellyfishNecklace = true;
modPlayer.anechoicPlating = true;
-1
View File
@@ -20,7 +20,6 @@ namespace CalamityMod.Buffs.StatBuffs
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.aquaticHeartPrevious)
{
modPlayer.aquaticHeartPower = true;
player.ignoreWater = NPC.downedBoss3;
player.accFlipper = true;
if (player.breath <= player.breathMax + 2 && !modPlayer.ZoneAbyss && NPC.downedBoss3)
-24
View File
@@ -1,24 +0,0 @@
using Terraria;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
{
public class BrutalCarnage : ModBuff
{
public static float MeleeDamageBoost = 0.2f;
public override LocalizedText Description => base.Description.WithFormatArgs(MeleeDamageBoost.ToPercent());
public override void SetStaticDefaults()
{
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().brutalCarnage = true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 B

+11 -186
View File
@@ -1319,7 +1319,6 @@ namespace CalamityMod.CalPlayer
public bool xWrath = false;
public bool graxDefense = false;
public bool encased = false;
public bool brutalCarnage = false;
public bool omniscience = false;
public bool zerg = false;
public bool zen = false;
@@ -1577,33 +1576,19 @@ namespace CalamityMod.CalPlayer
#endregion
#region Transformation
public bool abyssalDivingSuitPrevious;
public bool abyssalDivingSuit;
public bool abyssalDivingSuitHide;
public bool abyssalDivingSuitForce;
public bool abyssalDivingSuitPower;
public bool abyssalDivingSuitPrevious;
public bool profanedCrystal;
public int profanedCrystalStatePrevious;
public bool profanedCrystalPrevious;
public int profanedCrystalAnim;
public bool profanedCrystalForce;
public bool profanedCrystalBuffs;
public bool profanedCrystalHide;
public KeyValuePair<int, int> profanedCrystalWingCounter = new KeyValuePair<int, int>(0, 10);
public KeyValuePair<int, int> profanedCrystalAnimCounter = new KeyValuePair<int, int>(0, 10);
public int pscState;
public Color pscLerpColor = Color.White;
public bool aquaticHeartPrevious;
public bool aquaticHeart;
public bool aquaticHeartHide;
public bool aquaticHeartForce;
public bool aquaticHeartPower;
public bool snowmanPrevious;
public bool snowman;
public bool snowmanHide;
public bool snowmanForce;
public bool snowmanNoseless;
public bool snowmanPower;
public bool meldTransformationPrevious;
public bool meldTransformation;
public bool meldTransformationForce;
@@ -1612,8 +1597,6 @@ namespace CalamityMod.CalPlayer
public bool omegaBlueTransformation;
public bool omegaBlueTransformationForce;
public bool omegaBlueTransformationPower;
public bool ghostBracelet;
public bool punchCard;
#endregion
#region Calamitas Enchant Effects
@@ -2516,7 +2499,6 @@ namespace CalamityMod.CalPlayer
xWrath = false;
graxDefense = false;
encased = false;
brutalCarnage = false;
omniscience = false;
zerg = false;
zen = false;
@@ -2722,29 +2704,22 @@ namespace CalamityMod.CalPlayer
*/
abyssalDivingSuitPrevious = abyssalDivingSuit;
abyssalDivingSuit = abyssalDivingSuitHide = abyssalDivingSuitForce = abyssalDivingSuitPower = false;
abyssalDivingSuit = false;
aquaticHeartPrevious = aquaticHeart;
aquaticHeart = aquaticHeartHide = aquaticHeartForce = aquaticHeartPower = false;
aquaticHeart = false;
profanedCrystalStatePrevious = pscState;
profanedCrystalPrevious = profanedCrystal;
profanedCrystal = profanedCrystalBuffs = profanedCrystalForce = profanedCrystalHide = false;
profanedCrystal = profanedCrystalBuffs = false;
pscState = 0;
pscLerpColor = Color.White;
snowmanPrevious = snowman;
snowman = snowmanHide = snowmanForce = snowmanPower = false;
meldTransformationPrevious = meldTransformation;
meldTransformation = meldTransformationForce = meldTransformationPower = false;
omegaBlueTransformationPrevious = omegaBlueTransformation;
omegaBlueTransformation = omegaBlueTransformationForce = omegaBlueTransformationPower = false;
ghostBracelet = false;
punchCard = false;
rageModeActive = false;
adrenalineModeActive = false;
AdrenalineTrail = false;
@@ -3017,7 +2992,6 @@ namespace CalamityMod.CalPlayer
xWrath = false;
graxDefense = false;
encased = false;
brutalCarnage = false;
omniscience = false;
zerg = false;
zen = false;
@@ -4048,6 +4022,11 @@ namespace CalamityMod.CalPlayer
// Putting this in GlobalItem will run multiple times for each slot, which this system already does, creating a slew of problems.
VanillaArmorChangeManager.ApplyPotentialEffectsTo(Player);
// Nerf to the proc rate of Spectre Mask's set bonus souls
// Vanilla subtracts 6.6666665 from this counter per frame, this reduces it to 4
if (Player.ghostDmg > 0)
Player.ghostDmg += 2.6666665f;
// If the config is enabled, vastly increase the player's base tile and wall placement speeds
// This stacks with the Brick Layer and Portable Cement Mixer
if (CalamityServerConfig.Instance.FasterTilePlacement)
@@ -4078,7 +4057,7 @@ namespace CalamityMod.CalPlayer
if (timePotionSick == 1 && Player.whoAmI == Main.myPlayer && absorber)
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ProjectileType<AbsorberAura>(), 0, 0, Player.whoAmI);
if (snowman)
if (Player.Transformation().Type == ModContent.ItemType<Popo>())
{
if (Player.whoAmI == Main.myPlayer && !snowmanNoseless)
Player.AddBuff(BuffType<PopoBuff>(), 60, true);
@@ -4879,37 +4858,6 @@ namespace CalamityMod.CalPlayer
&& Player.armor[1].type == ModContent.ItemType<SnowRuffianChestplate>()
&& Player.armor[2].type == ModContent.ItemType<SnowRuffianGreaves>())
snowRuffianSet = true;
// Accessories
for (int i = 3; i < 8; i++)
{
Item vanity = Player.armor[i];
if (vanity.type == ModContent.ItemType<AbandonedWulfrumHelmet>())
Player.GetModPlayer<WulfrumTransformationPlayer>().transformationActive = true;
if (vanity.type == ModContent.ItemType<AbyssalDivingSuit>())
abyssalDivingSuitForce = true;
if (vanity.type == ModContent.ItemType<AquaticHeart>())
aquaticHeartForce = true;
if (vanity.type == ModContent.ItemType<GhostBracelet>())
ghostBracelet = true;
if (vanity.type == ModContent.ItemType<HapuFruit>())
Player.GetModPlayer<HapuFruitPlayer>().vanityEquipped = true;
if (vanity.type == ModContent.ItemType<OracleHeadphones>())
Player.GetModPlayer<OracleHeadphonesPlayer>().vanityEquipped = true;
if (vanity.type == ModContent.ItemType<Popo>())
snowmanForce = true;
if (vanity.type == ModContent.ItemType<ProfanedSoulCrystal>())
profanedCrystalForce = true;
if (vanity.type == ModContent.ItemType<PunchCard>())
punchCard = true;
if (vanity.type == ModContent.ItemType<SharkyPlush>())
Player.GetModPlayer<SharkyPlushPlayer>().vanityEquipped = true;
if (vanity.type == ModContent.ItemType<XyksBlessingBlue>())
Player.GetModPlayer<XyksBlessingBluePlayer>().vanityEquipped = true;
if (vanity.type == ModContent.ItemType<XyksBlessingOrange>())
Player.GetModPlayer<XyksBlessingOrangePlayer>().vanityEquipped = true;
}
}
if (Player.Calamity().andromedaState == AndromedaPlayerState.LargeRobot ||
@@ -4917,58 +4865,8 @@ namespace CalamityMod.CalPlayer
{
Player.head = EquipLoader.GetEquipSlot(Mod, "HeadlessEquipTexture", EquipType.Head); // To make the head invisible on the map. The map was having a hissy fit because of hitbox changes.
}
else if ((profanedCrystal || profanedCrystalForce) && !profanedCrystalHide)
{
Player.legs = EquipLoader.GetEquipSlot(Mod, Main.dayTime ? "ProfanedSoulCrystal" : "PscNightLegs", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "ProfanedSoulCrystal", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, Main.dayTime ? "ProfanedSoulCrystal" : "PscNightHead", EquipType.Head);
Player.wings = EquipLoader.GetEquipSlot(Mod, Main.dayTime ? "ProfanedSoulCrystal" : "PscNightWings", EquipType.Wings);
Player.face = -1;
bool enrage = pscState >= (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Enraged;
if (profanedCrystalWingCounter.Value == 0)
{
int key = profanedCrystalWingCounter.Key;
profanedCrystalWingCounter = new KeyValuePair<int, int>(key == 3 ? 0 : key + 1, enrage ? 5 : 8);
}
Player.wingFrame = profanedCrystalWingCounter.Key;
profanedCrystalWingCounter = new KeyValuePair<int, int>(profanedCrystalWingCounter.Key, profanedCrystalWingCounter.Value - 1);
Player.armorEffectDrawOutlines = true;
if (profanedCrystalBuffs)
{
Player.armorEffectDrawShadow = true;
if (enrage)
{
Player.armorEffectDrawOutlinesForbidden = true;
}
}
}
else if ((snowmanPower || snowmanForce) && !snowmanHide)
{
Player.legs = EquipLoader.GetEquipSlot(Mod, "Popo", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "Popo", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, snowmanNoseless ? "PopoNoseless" : "Popo", EquipType.Head);
Player.face = -1;
}
else if (AresExoskeleton.ArmExists(Player))
Player.body = EquipLoader.GetEquipSlot(Mod, "AresExoskeleton", EquipType.Body);
else if ((abyssalDivingSuitPower || abyssalDivingSuitForce) && !abyssalDivingSuitHide)
{
Player.legs = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Head);
Player.face = -1;
}
else if ((aquaticHeartPower || aquaticHeartForce) && !aquaticHeartHide)
{
Player.legs = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Head);
Player.face = -1;
}
else if (meldTransformationPower || meldTransformationForce)
{
Player.legs = EquipLoader.GetEquipSlot(Mod, "MeldTransformation", EquipType.Legs);
@@ -4983,26 +4881,7 @@ namespace CalamityMod.CalPlayer
if (hasOmegaBlueCooldown && cd.timeLeft > 1500)
Player.head = EquipLoader.GetEquipSlot(Mod, "OmegaBlueTransformation", EquipType.Head);
}
else
{
if (profanedCrystalWingCounter.Key != 1)
profanedCrystalWingCounter = new KeyValuePair<int, int>(1, 7);
if (profanedCrystalAnimCounter.Key != 0)
profanedCrystalAnimCounter = new KeyValuePair<int, int>(0, 10);
}
if (ghostBracelet)
{
Player.legs = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Head);
}
if (punchCard)
{
Player.legs = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Head);
}
if (snowRuffianSet)
{
@@ -5600,60 +5479,6 @@ namespace CalamityMod.CalPlayer
}
}
private bool IsValidTransitionFrame(AnimationType currentAnim, AnimationType newAnim, int frame, int counter) //this exists so it doesn't loop through the entire walk/idle anim just to find one frame for switching.
{
bool result = newAnim != AnimationType.Jump && currentAnim != AnimationType.Jump;
if (currentAnim == AnimationType.Walk && newAnim == AnimationType.Idle)
{
result = counter <= 0 && (frame == 11 || frame == 15 || frame == 19);
}
else if (currentAnim == AnimationType.Idle && newAnim == AnimationType.Walk)
{
result = counter <= 0 && (frame == 2 || frame == 6);
}
return currentAnim != newAnim && result; //swapping to jumps should be instant, no need to check the counter here
}
private int HandlePSCAnimationFrames(AnimationType newType)
{
int key = profanedCrystalAnimCounter.Key; //0-based indexing
int value = profanedCrystalAnimCounter.Value - 1;
AnimationType currentType = key < 8 ? AnimationType.Idle : key == 8 ? AnimationType.Jump : AnimationType.Walk;
bool isInvalidTransFrame = !IsValidTransitionFrame(currentType, newType, key, value); //to make the transition between walk and idle frames less jarring and smoother
AnimationType type = isInvalidTransFrame ? newType : currentType;
int frameCount = type == AnimationType.Walk || (!profanedCrystalForce && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 7 : 10;
int lowerRange = type == AnimationType.Idle ? 0 : type == AnimationType.Jump ? 8 : 9;
int upperRange = type == AnimationType.Idle ? 7 : type == AnimationType.Jump ? 8 : 22;
if (value <= 0 || !isInvalidTransFrame)
{
value = frameCount;
if (key >= lowerRange && key < upperRange)
key++;
else
key = lowerRange;
}
profanedCrystalAnimCounter = new KeyValuePair<int, int>(key, value);
return profanedCrystalAnimCounter.Key;
}
public override void PostUpdate() //needs to be here else it doesn't work properly, otherwise i'd have stuck it with the wing anim stuffs
{
bool validEquipSlot = Player.legs == EquipLoader.GetEquipSlot(Mod, "ProfanedSoulCrystal", EquipType.Legs) ||
Player.legs == EquipLoader.GetEquipSlot(Mod, "PscNightLegs", EquipType.Legs);
if (!profanedCrystalHide && (profanedCrystal || profanedCrystalForce) && validEquipSlot)
{
bool usingCarpet = Player.carpetTime > 0 && Player.controlJump; //doesn't make sense for carpet to use jump frame since you have solid ground
AnimationType animType = AnimationType.Walk;
if ((Player.sliding || Player.velocity.Y != 0 || Player.mount.Active || (Player.grappling[0] != -1 || !Player.CheckSolidGround()) || Player.GoingDownWithGrapple) && !usingCarpet)
animType = AnimationType.Jump;
else if (Player.velocity.X == 0 || usingCarpet)
animType = AnimationType.Idle;
int frame = HandlePSCAnimationFrames(animType);
Player.legFrame.Y = Player.legFrame.Height * frame;
}
}
#endregion
#region Misc Stuff
-46
View File
@@ -442,52 +442,6 @@ namespace CalamityMod.CalPlayer
Player drawPlayer = drawInfo.drawPlayer;
Item item = drawPlayer.ActiveItem();
// Vanity accessory effects, allows them to draw while the game is paused
if (drawPlayer.Calamity().ghostBracelet)
{
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Legs);
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Body);
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Head);
}
else if ((drawPlayer.Calamity().snowmanPower || drawPlayer.Calamity().snowmanForce) && !drawPlayer.Calamity().snowmanHide)
{
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "Popo", EquipType.Legs);
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "Popo", EquipType.Body);
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, snowmanNoseless ? "PopoNoseless" : "Popo", EquipType.Head);
drawPlayer.face = -1;
}
else if (drawPlayer.Calamity().punchCard)
{
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Legs);
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Body);
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Head);
}
else if ((drawPlayer.Calamity().abyssalDivingSuitPower || drawPlayer.Calamity().abyssalDivingSuitForce) && !drawPlayer.Calamity().abyssalDivingSuitHide)
{
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Legs);
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Body);
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Head);
drawPlayer.face = -1;
}
else if ((drawPlayer.Calamity().aquaticHeartPower || drawPlayer.Calamity().aquaticHeartForce) && !drawPlayer.Calamity().aquaticHeartHide)
{
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Legs);
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Body);
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Head);
drawPlayer.face = -1;
}
// Need to set all of these so that certain vanity pieces like Capricorn Tail don't screw it up
if (drawPlayer.Calamity().ghostBracelet || ((drawPlayer.Calamity().snowmanPower || drawPlayer.Calamity().snowmanForce) && !drawPlayer.Calamity().snowmanHide) ||
drawPlayer.Calamity().punchCard || ((drawPlayer.Calamity().abyssalDivingSuitPower || drawPlayer.Calamity().abyssalDivingSuitForce) && !drawPlayer.Calamity().abyssalDivingSuitHide) ||
((drawPlayer.Calamity().aquaticHeartPower || drawPlayer.Calamity().aquaticHeartForce) && !drawPlayer.Calamity().aquaticHeartHide))
{
drawInfo.legsGlowMask = -1;
drawInfo.legsOffset = Vector2.Zero;
drawInfo.bodyGlowMask = -1;
drawInfo.headGlowMask = -1;
drawInfo.helmetOffset = Vector2.Zero;
}
if (!drawPlayer.frozen &&
(item.IsAir || item.type > ItemID.None) &&
!drawPlayer.dead &&
+9 -38
View File
@@ -485,7 +485,7 @@ namespace CalamityMod.CalPlayer
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Withered").ToNetworkText(Player.name));
}
}
if (profanedCrystalBuffs && !profanedCrystalHide)
if (profanedCrystalBuffs && Player.Transformation().Type == ModContent.ItemType<ProfanedSoulCrystal>())
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.ProfanedSoulCrystal").ToNetworkText(Player.name));
}
@@ -635,11 +635,6 @@ namespace CalamityMod.CalPlayer
modifiers.ScalingBonusDamage += Screwdriver.PiercingDamageBuff;
}
// Calamity buffs Inferno Fork by 20%. This is multiplicative because it's supposed to be a buff to the weapon's base damage.
// However, because the weapon is coded like spaghetti, you have to multiply the explosion's damage too.
if (proj.type == ProjectileID.InfernoFriendlyBlast)
modifiers.SourceDamage *= 1.2f;
if (Player.Calamity().scionsCurio && proj.CountsAsClass<RangedDamageClass>())
target.Calamity().scionsCurioEffected = true;
@@ -1750,11 +1745,17 @@ namespace CalamityMod.CalPlayer
// Handles energy shields and Boss Rush, in that order
modifiers.ModifyHurtInfo += ModifyHurtInfo_Calamity;
// TODO -- At some point it'd be nice to have a "TransformationPlayer" that has all the transformation sfx and visuals so their priorities can be more easily managed.
#region Custom Hurt Sounds
if (hurtSoundTimer == 0)
{
if (roverDrive && RoverDriveShieldDurability > 0)
if(Player.Transformation().Type != -1 && Player.Transformation().currentTransformation.HurtSound(Player) != null)
{
var hurtSound = Player.Transformation().currentTransformation.HurtSound(Player).Value;
modifiers.DisableSound();
SoundEngine.PlaySound(hurtSound.sound, Player.Center);
hurtSoundTimer = hurtSound.delay;
}
else if (roverDrive && RoverDriveShieldDurability > 0)
{
modifiers.DisableSound();
SoundEngine.PlaySound(RoverDrive.ShieldHurtSound, Player.Center);
@@ -1772,42 +1773,12 @@ namespace CalamityMod.CalPlayer
SoundEngine.PlaySound(TheSponge.ShieldHurtSound, Player.Center);
hurtSoundTimer = 20;
}
else if (((pSoulArtifact && !profanedCrystal) || profanedCrystalBuffs) && pSoulShieldDurability > 0)
{
modifiers.DisableSound();
SoundEngine.PlaySound(ProfanedGuardianDefender.ShieldDeathSound);
hurtSoundTimer = 20;
}
else if ((profanedCrystal || profanedCrystalForce) && !profanedCrystalHide)
{
modifiers.DisableSound();
SoundEngine.PlaySound(Providence.HurtSound, Player.Center);
hurtSoundTimer = 20;
}
else if ((abyssalDivingSuitPower || abyssalDivingSuitForce) && !abyssalDivingSuitHide)
{
modifiers.DisableSound();
SoundEngine.PlaySound(SoundID.NPCHit4, Player.Center); //metal hit noise
hurtSoundTimer = 10;
}
else if ((aquaticHeartPower || aquaticHeartForce) && !aquaticHeartHide)
{
modifiers.DisableSound();
SoundEngine.PlaySound(SoundID.FemaleHit, Player.Center); //female hit noise
hurtSoundTimer = 10;
}
else if (titanHeartSet)
{
modifiers.DisableSound();
SoundEngine.PlaySound(NPCs.Astral.Atlas.HurtSound, Player.Center);
hurtSoundTimer = 10;
}
else if (Player.GetModPlayer<WulfrumTransformationPlayer>().transformationActive)
{
modifiers.DisableSound();
SoundEngine.PlaySound(SoundID.NPCHit4, Player.Center);
hurtSoundTimer = 10;
}
else if (Player.GetModPlayer<WulfrumArmorPlayer>().wulfrumSet && (Player.name.ToLower() == "wagstaff" || Player.name.ToLower() == "john wulfrum"))
{
modifiers.DisableSound();
-13
View File
@@ -3332,11 +3332,6 @@ namespace CalamityMod.CalPlayer
Player.GetDamage<GenericDamageClass>() += Grax.DamageBoost;
}
if (brutalCarnage)
{
Player.GetDamage<MeleeDamageClass>() += BrutalCarnage.MeleeDamageBoost;
}
// Trinket of Chi bonus
if (trinketOfChi)
{
@@ -3662,14 +3657,6 @@ namespace CalamityMod.CalPlayer
if (wDeath && !laudanum && !purity)
Player.GetDamage<GenericDamageClass>() -= 0.2f;
if (astralInfection && !(infectedJewel || hideOfDeus || purity))
Player.GetDamage<GenericDamageClass>() -= 0.1f;
if (pFlames && !purity)
{
Player.GetDamage<GenericDamageClass>() -= 0.1f;
}
if (aCrunch && !laudanum && !purity)
{
Player.statDefense -= ArmorCrunch.DefenseReduction;
+1 -2
View File
@@ -61,8 +61,7 @@ namespace CalamityMod.CalPlayer.Dashes
// Constantly update the player's velocity direction.
Vector2 dashVel = Main.MouseWorld - player.Center;
dashVel = dashVel.SafeNormalize(Vector2.UnitX) * CalculateDashSpeed(player);
player.velocity = dashVel;
player.velocity = player.velocity.ToRotation().AngleTowards(dashVel.ToRotation(), 0.175f).ToRotationVector2() * CalculateDashSpeed(player);
// Fall way, way, faster than usual.
player.maxFallSpeed = 50f;
+178
View File
@@ -0,0 +1,178 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics.PackedVector;
using System;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Dusts.WaterSplash
{
public class BasaltGullyLavaSplash : ModDust
{
public override void OnSpawn(Dust dust)
{
dust.velocity *= 0.1f;
dust.velocity.Y = -0.5f;
}
public override bool Update(Dust dust)
{
if (dust.scale > 10f)
{
dust.active = false;
}
Dust.lavaBubbles++;
dust.position += dust.velocity;
if (!dust.noGravity)
{
dust.velocity.Y += 0.1f;
}
if (dust.noGravity)
{
dust.scale += 0.03f;
if (dust.scale < 1f)
{
dust.velocity.Y += 0.075f;
}
dust.velocity.X *= 1.08f;
if (dust.velocity.X > 0f)
{
dust.rotation += 0.01f;
}
else
{
dust.rotation -= 0.01f;
}
float num109 = dust.scale * 0.6f;
if (num109 > 1f)
{
num109 = 1f;
}
Lighting.AddLight((int)(dust.position.X / 16f), (int)(dust.position.Y / 16f + 1f), num109 * (2.5f / 4), num109 * (1.3f / 4), num109 * (0.1f / 4));
}
else
{
if (!Collision.WetCollision(new Vector2(dust.position.X, dust.position.Y - 8f), 4, 4))
{
dust.scale = 0f;
}
else
{
dust.alpha += Main.rand.Next(2);
if (dust.alpha > 255)
{
dust.scale = 0f;
}
dust.velocity.Y = -0.5f;
dust.alpha++;
dust.scale -= 0.01f;
dust.velocity.Y = -0.2f;
dust.velocity.X += (float)Main.rand.Next(-10, 10) * 0.002f;
if ((double)dust.velocity.X < -0.25)
{
dust.velocity.X = -0.25f;
}
if ((double)dust.velocity.X > 0.25)
{
dust.velocity.X = 0.25f;
}
}
float num3 = dust.scale * 0.3f + 0.4f;
if (num3 > 1f)
{
num3 = 1f;
}
Lighting.AddLight((int)(dust.position.X / 16f), (int)(dust.position.Y / 16f), num3 * (2.5f / 4), num3 * (1.3f / 4), num3 * (0.1f / 4));
}
dust.rotation += dust.velocity.X * 0.5f;
if (dust.fadeIn > 0f && dust.fadeIn < 100f)
{
dust.scale += 0.03f;
if (dust.scale > dust.fadeIn)
{
dust.fadeIn = 0f;
}
}
dust.scale -= 0.01f;
if (dust.noGravity)
{
dust.velocity *= 0.92f;
if (dust.fadeIn == 0f)
{
dust.scale -= 0.04f;
}
}
if (dust.position.Y > Main.screenPosition.Y + (float)Main.screenHeight)
{
dust.active = false;
}
float num17 = 0.1f;
if ((double)Dust.dCount == 0.5)
{
dust.scale -= 0.001f;
}
if ((double)Dust.dCount == 0.6)
{
dust.scale -= 0.0025f;
}
if ((double)Dust.dCount == 0.7)
{
dust.scale -= 0.005f;
}
if ((double)Dust.dCount == 0.8)
{
dust.scale -= 0.01f;
}
if ((double)Dust.dCount == 0.9)
{
dust.scale -= 0.02f;
}
if ((double)Dust.dCount == 0.5)
{
num17 = 0.11f;
}
if ((double)Dust.dCount == 0.6)
{
num17 = 0.13f;
}
if ((double)Dust.dCount == 0.7)
{
num17 = 0.16f;
}
if ((double)Dust.dCount == 0.8)
{
num17 = 0.22f;
}
if ((double)Dust.dCount == 0.9)
{
num17 = 0.25f;
}
if (dust.scale < num17)
{
dust.active = false;
}
return false;
}
public override Color? GetAlpha(Dust dust, Color lightColor)
{
float num = (float)(255 - dust.alpha) / 255f;
int num4;
int num3;
int num2;
num = (num + 3f) / 4f;
num4 = (int)((int)lightColor.R * num);
num3 = (int)((int)lightColor.G * num);
num2 = (int)((int)lightColor.B * num);
int num6 = lightColor.A - dust.alpha;
if (num6 < 0)
{
num6 = 0;
}
if (num6 > 255)
{
num6 = 255;
}
return new Color(num4, num3, num2, num6);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

@@ -0,0 +1,11 @@
using Microsoft.Xna.Framework;
namespace CalamityMod.Gores.WaterDroplet
{
public class BasaltGullyLavaDroplet : LiquidDropletGore
{
public override bool lavaDroplet => true;
public override Vector3 lavaColor => new Vector3(2.5f, 1.3f, 0.1f);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

-1
View File
@@ -65,7 +65,6 @@ namespace CalamityMod.ILEditing
// NPC behavior
IL_Main.UpdateTime += PermitNighttimeTownNPCSpawning;
On_Main.UpdateTime_SpawnTownNPCs += AlterTownNPCSpawnRate;
On_NPC.ShouldEmpressBeEnraged += AllowEmpressToEnrageInBossRush;
IL_NPC.DoDeathEvents += PreventVanillaBossDeathsInBossRush;
IL_Player.CollectTaxes += MakeTaxCollectorUseful;
-10
View File
@@ -333,16 +333,6 @@ namespace CalamityMod.ILEditing
}
#endregion
#region Allow Empress to Enrage in Boss Rush
private static bool AllowEmpressToEnrageInBossRush(On_NPC.orig_ShouldEmpressBeEnraged orig)
{
if (BossRushEvent.BossRushActive)
return true;
return orig();
}
#endregion
#region Prevent Vanilla Bosses From Being Marked as Defeated in Boss Rush
private static void PreventVanillaBossDeathsInBossRush(ILContext il)
{
+14 -38
View File
@@ -1,30 +1,29 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.BaseItems;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class AbyssalDivingSuit : ModItem, ILocalizedModType
public class AbyssalDivingSuit : TransformationAccessory, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public static double PlatesAllDamageReduction = 0.15D;
public static double PlatesHitDecay = 0.03D;
public override void Load()
{
// All code below runs only if we're not loading on a server
if (!Main.dedServ)
{
// Add equip textures
EquipLoader.AddEquipTexture(Mod, $"{Texture}_{EquipType.Head}", EquipType.Head, this);
EquipLoader.AddEquipTexture(Mod, $"{Texture}_{EquipType.Body}", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, $"{Texture}_{EquipType.Legs}", EquipType.Legs, this);
}
}
public override string AssetPath => "CalamityMod/Items/Accessories/";
public override (EquipType, string, string)[] EquipSlots =>
[
(EquipType.Head, "AbyssalDivingSuit", null),
(EquipType.Body, "AbyssalDivingSuit", null),
(EquipType.Legs, "AbyssalDivingSuit", null),
(EquipType.Face, null, null), //results in setting this equip slot to -1
];
public override (SoundStyle sound, int delay)? HurtSound(Player p) => (SoundID.NPCHit4, 10);
public override void SetDefaults()
{
@@ -33,32 +32,9 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
Item.value = CalamityGlobalItem.RarityPurpleBuyPrice;
Item.rare = ItemRarityID.Purple;
if (!Main.dedServ)
{
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Head);
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.abyssalDivingSuit = true;
if (hideVisual)
modPlayer.abyssalDivingSuitHide = true;
}
public override void UpdateVanity(Player player)
{
player.Calamity().abyssalDivingSuitHide = false;
player.Calamity().abyssalDivingSuitForce = true;
}
public override void UpdateAccessory(Player player, bool hideVisual) => player.Calamity().abyssalDivingSuit = true;
public override void AddRecipes()
{
+14 -41
View File
@@ -1,45 +1,30 @@
using System;
using System.Collections.Generic;
using CalamityMod.CalPlayer;
using System.Collections.Generic;
using CalamityMod.Items.BaseItems;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
[LegacyName("SirensHeart")]
public class AquaticHeart : ModItem, ILocalizedModType
public class AquaticHeart : TransformationAccessory, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public static float WaterSpeedBoost = 0.15f;
public static double IceShieldAllDamageReduction = 0.2D;
public override void Load()
{
// All code below runs only if we're not loading on a server
if (!Main.dedServ)
{
// Add equip textures
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/AquaticTrans_Head", EquipType.Head, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/AquaticTrans_Body", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/AquaticTrans_Legs", EquipType.Legs, this);
}
}
public override string AssetPath => "CalamityMod/Items/Accessories/";
public override (EquipType, string, string)[] EquipSlots =>
[
(EquipType.Head, "AquaticTrans", null),
(EquipType.Body, "AquaticTrans", null),
(EquipType.Legs, "AquaticTrans", null),
(EquipType.Face, null, null), //results in setting this equip slot to -1
];
public override void SetStaticDefaults()
{
if (!Main.dedServ)
{
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Head);
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
}
public override (SoundStyle sound, int delay)? HurtSound(Player p) => (SoundID.FemaleHit, 10);
public override void SetDefaults()
{
@@ -50,19 +35,7 @@ namespace CalamityMod.Items.Accessories
Item.rare = ItemRarityID.LightRed;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.aquaticHeart = true;
if (hideVisual)
modPlayer.aquaticHeartHide = true;
}
public override void UpdateVanity(Player player)
{
player.Calamity().aquaticHeartHide = false;
player.Calamity().aquaticHeartForce = true;
}
public override void UpdateAccessory(Player player, bool hideVisual) => player.Calamity().aquaticHeart = true;
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
modPlayer.gloveOfPrecision = true;
player.GetDamage<RogueDamageClass>() += 0.10f;
player.GetCritChance<RogueDamageClass>() += 15;
player.GetCritChance<RogueDamageClass>() += 10;
modPlayer.rogueVelocity += 0.15f;
player.GetAttackSpeed<RogueDamageClass>() -= 0.15f;
}
+129 -36
View File
@@ -5,7 +5,9 @@ using CalamityMod.Buffs.StatBuffs;
using CalamityMod.Buffs.Summon.Whips;
using CalamityMod.CalPlayer;
using CalamityMod.DataStructures;
using CalamityMod.Items.BaseItems;
using CalamityMod.Items.Materials;
using CalamityMod.NPCs.ProfanedGuardians;
using CalamityMod.NPCs.Providence;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Summon;
@@ -23,7 +25,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
//Developer item, dedicatee: Mishiro Usui/Amber Sienna
public class ProfanedSoulCrystal : ModItem, ILocalizedModType, IDyeableShaderRenderer
public class ProfanedSoulCrystal : TransformationAccessory, ILocalizedModType, IDyeableShaderRenderer
{
public static string[] contributorNames = new[] { "IbanPlay", "Chen", "Nincity", "Amber", "Mishiro", "LordMetarex", "Memes" };
public static int ShieldDurabilityMax = 125;
@@ -104,7 +106,7 @@ namespace CalamityMod.Items.Accessories
if (ignoreNoBuffs &&
(!DownedBossSystem.downedCalamitas || !DownedBossSystem.downedExoMechs ||
(player.maxMinions - player.slotsMinions) < maxMinionRequirement) ||
player.Calamity().profanedCrystalForce || !player.HasBuff<ProfanedCrystalBuff>())
player.Transformation().Type == ModContent.ItemType<ProfanedSoulCrystal>() || !player.HasBuff<ProfanedCrystalBuff>())
{
return ProfanedSoulCrystalState.Vanity; //failsafe for vanity
}
@@ -178,28 +180,22 @@ namespace CalamityMod.Items.Accessories
* Projectiles transformed are ONLY affected by alldamage and summon damage bonuses, likewise the weapon's base damage/usetime is NOT taken into account.
* The on-hit effect for the whip is in globalnpc
*/
public override void Load()
public override string AssetPath => "CalamityMod/Items/Accessories/";
public override (EquipType Type, string AssetName, string EquipName)[] EquipSlots =>
[
(EquipType.Head, "ProfanedSoulTrans", null),
(EquipType.Body, "ProfanedSoulTrans", null),
(EquipType.Legs, "ProfanedSoulTrans", null),
(EquipType.Wings, "ProfanedSoulTrans", null),
(EquipType.Head, "ProfanedSoulTransNight", "PscNightHead"),
(EquipType.Legs, "ProfanedSoulTransNight", "PscNightLegs"),
(EquipType.Wings, "ProfanedSoulTransNight", "PscNightWings"),
(EquipType.Face, null, null), //results in setting this equip slot to -1
];
public override void ArmorIDSets()
{
if (Main.dedServ)
return;
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/ProfanedSoulTransHead", EquipType.Head, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/ProfanedSoulTransHeadNight", EquipType.Head, this, "PscNightHead");
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/ProfanedSoulTransBody", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/ProfanedSoulTransLegs", EquipType.Legs, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/ProfanedSoulTransLegsNight", EquipType.Legs, this, "PscNightLegs");
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Wings/ProfanedSoulTransWings", EquipType.Wings, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Wings/ProfanedSoulTransWingsNight", EquipType.Wings, this, "PscNightWings");
}
public override void SetStaticDefaults()
{
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(8, 4));
ItemID.Sets.AnimatesAsSoul[Type] = true;
if (Main.dedServ)
return;
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
@@ -213,6 +209,16 @@ namespace CalamityMod.Items.Accessories
ArmorIDs.Legs.Sets.OverridesLegs[equipSlotNightLegs] = true;
}
public override (SoundStyle sound, int delay)? HurtSound(Player p) => (p.Calamity().pSoulShieldDurability > 0 ? ProfanedGuardianDefender.ShieldDeathSound : Providence.HurtSound, 20);
public override void SetStaticDefaults()
{
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(8, 4));
ItemID.Sets.AnimatesAsSoul[Type] = true;
base.SetStaticDefaults();
}
public override void SetDefaults()
{
SummonTag.TagItem = Item.type;
@@ -225,10 +231,7 @@ namespace CalamityMod.Items.Accessories
Item.Calamity().devItem = true;
}
public override bool CanAccessoryBeEquippedWith(Item equippedItem, Item incomingItem, Player player)
{
return incomingItem.type != ModContent.ItemType<ProfanedSoulArtifact>();
}
public override bool CanAccessoryBeEquippedWith(Item equippedItem, Item incomingItem, Player player) => incomingItem.type != ModContent.ItemType<ProfanedSoulArtifact>();
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
@@ -260,12 +263,30 @@ namespace CalamityMod.Items.Accessories
}
}
public override bool CustomSetEquipType(Player player, EquipType type, Mod mod, string name)
{
switch (type)
{
case EquipType.Legs:
player.legs = EquipLoader.GetEquipSlot(Mod, Main.dayTime ? "ProfanedSoulCrystal" : "PscNightLegs", type);
return true;
case EquipType.Head:
player.head = EquipLoader.GetEquipSlot(Mod, Main.dayTime ? "ProfanedSoulCrystal" : "PscNightHead", type);
return true;
case EquipType.Wings:
player.wings = EquipLoader.GetEquipSlot(Mod, Main.dayTime ? "ProfanedSoulCrystal" : "PscNightWings", type);
return true;
}
return false;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.pSoulArtifact = true;
modPlayer.profanedCrystal = true;
if (!modPlayer.profanedCrystalPrevious && player.ownedProjectileCounts[ModContent.ProjectileType<PscTransformAnimation>()] == 0)
{
modPlayer.pSoulShieldDurability = 1;
@@ -275,23 +296,15 @@ namespace CalamityMod.Items.Accessories
if (DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs)
player.Calamity().profanedSoulRelicBuff = true;
modPlayer.profanedCrystalHide = hideVisual || modPlayer.profanedCrystalAnim > 0;
modPlayer.pSoulShieldVisible = !hideVisual;
DetermineTransformationEligibility(player);
}
public override void UpdateVanity(Player player)
{
player.Calamity().profanedCrystalHide = false;
player.Calamity().profanedCrystalForce = true;
}
internal static void DetermineTransformationEligibility(Player player)
{
//short circuit immediately if profanedcrystalbuffs has already been set
if (!player.Calamity().profanedCrystalBuffs && player.Calamity().profanedCrystalAnim == -1 && DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs && (player.maxMinions - player.slotsMinions) >= maxMinionRequirement && !player.Calamity().profanedCrystalForce && player.HasBuff<ProfanedCrystalBuff>())
if (!player.Calamity().profanedCrystalBuffs && player.Calamity().profanedCrystalAnim == -1 && DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs && (player.maxMinions - player.slotsMinions) >= maxMinionRequirement && player.HasBuff<ProfanedCrystalBuff>())
{
player.Calamity().profanedCrystalBuffs = true;
player.Calamity().pscState = (int)GetPscStateFor(player); //update psc state, default is 0 which is the same as the int value of vanity
@@ -535,6 +548,86 @@ namespace CalamityMod.Items.Accessories
return false;
}
public override void TransformFrameEffects(Player player)
{
bool enrage = player.Calamity().pscState >= (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Enraged;
if (profanedCrystalWingCounter.Value == 0)
{
int key = profanedCrystalWingCounter.Key;
profanedCrystalWingCounter = new KeyValuePair<int, int>(key == 3 ? 0 : key + 1, enrage ? 5 : 8);
}
player.wingFrame = profanedCrystalWingCounter.Key;
profanedCrystalWingCounter = new KeyValuePair<int, int>(profanedCrystalWingCounter.Key, profanedCrystalWingCounter.Value - 1);
player.armorEffectDrawOutlines = true;
if (player.Calamity().profanedCrystalBuffs)
{
player.armorEffectDrawShadow = true;
if (enrage)
{
player.armorEffectDrawOutlinesForbidden = true;
}
}
}
public KeyValuePair<int, int> profanedCrystalWingCounter = new KeyValuePair<int, int>(1, 10);
public KeyValuePair<int, int> profanedCrystalAnimCounter = new KeyValuePair<int, int>(0, 10);
private bool IsValidTransitionFrame(AnimationType currentAnim, AnimationType newAnim, int frame, int counter) //this exists so it doesn't loop through the entire walk/idle anim just to find one frame for switching.
{
bool result = newAnim != AnimationType.Jump && currentAnim != AnimationType.Jump;
if (currentAnim == AnimationType.Walk && newAnim == AnimationType.Idle)
{
result = counter <= 0 && (frame == 11 || frame == 15 || frame == 19);
}
else if (currentAnim == AnimationType.Idle && newAnim == AnimationType.Walk)
{
result = counter <= 0 && (frame == 2 || frame == 6);
}
return currentAnim != newAnim && result; //swapping to jumps should be instant, no need to check the counter here
}
private int HandlePSCAnimationFrames(Player player, AnimationType newType)
{
int key = profanedCrystalAnimCounter.Key; //0-based indexing
int value = profanedCrystalAnimCounter.Value - 1;
AnimationType currentType = key < 8 ? AnimationType.Idle : key == 8 ? AnimationType.Jump : AnimationType.Walk;
bool isInvalidTransFrame = !IsValidTransitionFrame(currentType, newType, key, value); //to make the transition between walk and idle frames less jarring and smoother
AnimationType type = isInvalidTransFrame ? newType : currentType;
int frameCount = type == AnimationType.Walk || (player.Calamity().profanedCrystal && player.statLife <= (int)(player.statLifeMax2 * 0.5)) ? 7 : 10;
int lowerRange = type == AnimationType.Idle ? 0 : type == AnimationType.Jump ? 8 : 9;
int upperRange = type == AnimationType.Idle ? 7 : type == AnimationType.Jump ? 8 : 22;
if (value <= 0 || !isInvalidTransFrame)
{
value = frameCount;
if (key >= lowerRange && key < upperRange)
key++;
else
key = lowerRange;
}
profanedCrystalAnimCounter = new KeyValuePair<int, int>(key, value);
return profanedCrystalAnimCounter.Key;
}
public override void TransformPostUpdate(Player player)
{
bool validEquipSlot = player.legs == EquipLoader.GetEquipSlot(Mod, "ProfanedSoulCrystal", EquipType.Legs) ||
player.legs == EquipLoader.GetEquipSlot(Mod, "PscNightLegs", EquipType.Legs);
if (player.Transformation().Type == ModContent.ItemType<ProfanedSoulCrystal>() && validEquipSlot)
{
bool usingCarpet = player.carpetTime > 0 && player.controlJump; //doesn't make sense for carpet to use jump frame since you have solid ground
AnimationType animType = AnimationType.Walk;
if ((player.sliding || player.velocity.Y != 0 || player.mount.Active || (player.grappling[0] != -1 || !player.CheckSolidGround()) || player.GoingDownWithGrapple) && !usingCarpet)
animType = AnimationType.Jump;
else if (player.velocity.X == 0 || usingCarpet)
animType = AnimationType.Idle;
int frame = HandlePSCAnimationFrames(player, animType);
player.legFrame.Y = player.legFrame.Height * frame;
}
}
public override void AddRecipes()
{
CreateRecipe().
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -1,4 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.BaseItems;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
@@ -20,35 +21,19 @@ namespace CalamityMod.Items.Accessories.Vanity
[LegacyName("WulfrumHeadMelee")]
[LegacyName("WulfrumHood")]
[LegacyName("WulfrumHeadMagic")]
public class AbandonedWulfrumHelmet : ModItem, ILocalizedModType
public class AbandonedWulfrumHelmet : TransformationAccessory, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void Load()
{
if (!Main.dedServ)
{
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/AbandonedWulfrumHelmet_HeadSet", EquipType.Head, name: "WulfrumOldSetHead");
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/AbandonedWulfrumHelmet_Body", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/AbandonedWulfrumHelmet_Legs", EquipType.Legs, this);
}
}
public override (EquipType, string, string)[] EquipSlots =>
[
(EquipType.Head, "AbandonedWulfrumHelmet", "WulfrumOldSetHead"),
(EquipType.Body, "AbandonedWulfrumHelmet", null),
(EquipType.Legs, "AbandonedWulfrumHelmet", null),
(EquipType.Face, null, null), //results in setting this equip slot to -1
];
public override bool ShouldHideAccessories => true;
public override void SetStaticDefaults()
{
if (Main.dedServ)
return;
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, "WulfrumOldSetHead", EquipType.Head);
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
public override (SoundStyle sound, int delay)? HurtSound(Player p) => (SoundID.NPCHit4, 10);
public override void SetDefaults()
{
@@ -62,7 +47,6 @@ namespace CalamityMod.Items.Accessories.Vanity
public override void UpdateVanity(Player player)
{
player.GetModPlayer<WulfrumTransformationPlayer>().transformationActive = true;
player.GetModPlayer<WulfrumTransformationPlayer>().vanityEquipped = true;
}
@@ -70,7 +54,6 @@ namespace CalamityMod.Items.Accessories.Vanity
{
if (!hideVisual)
{
player.GetModPlayer<WulfrumTransformationPlayer>().transformationActive = true;
player.GetModPlayer<WulfrumTransformationPlayer>().vanityEquipped = true;
}
}
@@ -79,53 +62,10 @@ namespace CalamityMod.Items.Accessories.Vanity
public class WulfrumTransformationPlayer : ModPlayer
{
public bool vanityEquipped = false;
public bool transformationActive = false;
public bool forceHelmetOn = false;
public override void ResetEffects()
{
vanityEquipped = false;
transformationActive = false;
forceHelmetOn = false;
}
public override void FrameEffects()
{
if (forceHelmetOn || transformationActive)
{
Player.head = EquipLoader.GetEquipSlot(Mod, "WulfrumOldSetHead", EquipType.Head);
Player.face = -1;
}
if (transformationActive)
{
Player.legs = EquipLoader.GetEquipSlot(Mod, "AbandonedWulfrumHelmet", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "AbandonedWulfrumHelmet", EquipType.Body);
Player.HideAccessories();
}
}
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
{
if (forceHelmetOn || transformationActive)
{
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "WulfrumOldSetHead", EquipType.Head);
drawInfo.headGlowMask = -1;
drawInfo.helmetOffset = Vector2.Zero;
drawInfo.drawPlayer.face = -1;
}
if (transformationActive)
{
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "AbandonedWulfrumHelmet", EquipType.Legs);
drawInfo.legsGlowMask = -1;
drawInfo.legsOffset = Vector2.Zero;
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "AbandonedWulfrumHelmet", EquipType.Body);
drawInfo.bodyGlowMask = -1;
drawInfo.drawPlayer.HideAccessories();
}
}
}
}
+9 -40
View File
@@ -1,38 +1,20 @@
using Terraria;
using CalamityMod.Items.BaseItems;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories.Vanity
{
[LegacyName("RedBow")]
public class GhostBracelet : ModItem, ILocalizedModType
public class GhostBracelet : TransformationAccessory, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void Load()
{
if (!Main.dedServ)
{
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Dandy_Head", EquipType.Head, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Dandy_Body", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Dandy_Legs", EquipType.Legs, this);
}
}
public override void SetStaticDefaults()
{
if (Main.dedServ)
return;
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Head);
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
public override (EquipType, string, string)[] EquipSlots =>
[
(EquipType.Head, "Dandy", null),
(EquipType.Body, "Dandy", null),
(EquipType.Legs, "Dandy", null),
];
public override void SetDefaults()
{
@@ -45,19 +27,6 @@ namespace CalamityMod.Items.Accessories.Vanity
Item.Calamity().devItem = true;
}
public override void UpdateVanity(Player player)
{
player.Calamity().ghostBracelet = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (!hideVisual)
{
player.Calamity().ghostBracelet = true;
}
}
public override void AddRecipes()
{
CreateRecipe().
+8 -76
View File
@@ -1,39 +1,19 @@
using Microsoft.Xna.Framework;
using CalamityMod.Items.BaseItems;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories.Vanity
{
public class GoldenBomb : ModItem, ILocalizedModType
public class GoldenBomb : TransformationAccessory, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void Load()
{
if (!Main.dedServ)
{
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Mihaii_Head", EquipType.Head, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Mihaii_Body", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Mihaii_Legs", EquipType.Legs, this);
}
}
public override void SetStaticDefaults()
{
if (Main.dedServ)
return;
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Head);
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
public override (EquipType, string, string)[] EquipSlots =>
[
(EquipType.Head, "Mihaii", null),
(EquipType.Body, "Mihaii", null),
(EquipType.Legs, "Mihaii", null),
];
public override void SetDefaults()
{
@@ -45,53 +25,5 @@ namespace CalamityMod.Items.Accessories.Vanity
Item.vanity = true;
Item.Calamity().devItem = true;
}
public override void UpdateVanity(Player player)
{
player.GetModPlayer<GoldenBombPlayer>().vanityEquipped = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (!hideVisual)
{
player.GetModPlayer<GoldenBombPlayer>().vanityEquipped = true;
}
}
}
public class GoldenBombPlayer : ModPlayer
{
public bool vanityEquipped = false;
public override void ResetEffects()
{
vanityEquipped = false;
}
public override void FrameEffects()
{
if (vanityEquipped)
{
Player.legs = EquipLoader.GetEquipSlot(Mod, "GoldenBomb", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "GoldenBomb", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, "GoldenBomb", EquipType.Head);
}
}
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
{
if (vanityEquipped)
{
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "GoldenBomb", EquipType.Legs);
drawInfo.legsGlowMask = -1;
drawInfo.legsOffset = Vector2.Zero;
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "GoldenBomb", EquipType.Body);
drawInfo.bodyGlowMask = -1;
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "GoldenBomb", EquipType.Head);
drawInfo.headGlowMask = -1;
drawInfo.helmetOffset = Vector2.Zero;
}
}
}
}
+9 -83
View File
@@ -1,43 +1,20 @@
using CalamityMod.CalPlayer;
using Microsoft.Xna.Framework;
using CalamityMod.Items.BaseItems;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories.Vanity
{
public class HapuFruit : ModItem, ILocalizedModType
public class HapuFruit : TransformationAccessory, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void Load()
{
if (!Main.dedServ)
{
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Heart_Head", EquipType.Head, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Heart_Body", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Heart_Legs", EquipType.Legs, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Heart_Back", EquipType.Back, this);
}
}
public override void SetStaticDefaults()
{
if (Main.dedServ)
return;
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Head);
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
public override (EquipType, string, string)[] EquipSlots =>
[
(EquipType.Head, "Heart", null),
(EquipType.Body, "Heart", null),
(EquipType.Legs, "Heart", null),
(EquipType.Back, "Heart", null)
];
public override void SetDefaults()
{
@@ -49,56 +26,5 @@ namespace CalamityMod.Items.Accessories.Vanity
Item.vanity = true;
Item.Calamity().devItem = true;
}
public override void UpdateVanity(Player player)
{
player.GetModPlayer<HapuFruitPlayer>().vanityEquipped = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (!hideVisual)
{
player.GetModPlayer<HapuFruitPlayer>().vanityEquipped = true;
}
}
}
public class HapuFruitPlayer : ModPlayer
{
public bool vanityEquipped = false;
public override void ResetEffects()
{
vanityEquipped = false;
}
public override void FrameEffects()
{
if (vanityEquipped)
{
Player.back = EquipLoader.GetEquipSlot(Mod, "HapuFruit", EquipType.Back);
Player.legs = EquipLoader.GetEquipSlot(Mod, "HapuFruit", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "HapuFruit", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, "HapuFruit", EquipType.Head);
//Player.HideAccessories();
}
}
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
{
if (vanityEquipped)
{
drawInfo.drawPlayer.back = EquipLoader.GetEquipSlot(Mod, "HapuFruit", EquipType.Back);
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "HapuFruit", EquipType.Legs);
drawInfo.legsGlowMask = -1;
drawInfo.legsOffset = Vector2.Zero;
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "HapuFruit", EquipType.Body);
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "HapuFruit", EquipType.Head);
drawInfo.headGlowMask = -1;
drawInfo.helmetOffset = Vector2.Zero;
}
}
}
}
+7 -11
View File
@@ -1,22 +1,18 @@
using Terraria;
using CalamityMod.Items.BaseItems;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories.Vanity
{
[AutoloadEquip(EquipType.Face)]
public class LucisSight : ModItem, ILocalizedModType
public class LucisSight : TransformationAccessory, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void SetStaticDefaults()
{
if (!Main.dedServ)
{
int equipSlot = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Face);
ArmorIDs.Face.Sets.DrawInFaceUnderHairLayer[equipSlot] = true;
}
}
public override (EquipType, string, string)[] EquipSlots =>
[
(EquipType.Face, "LucisSight", null),
];
public override void SetDefaults()
{
+10 -81
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using CalamityMod.Items.BaseItems;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
@@ -6,36 +7,16 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories.Vanity
{
public class OracleHeadphones : ModItem, ILocalizedModType
public class OracleHeadphones : TransformationAccessory, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void Load()
{
if (!Main.dedServ)
{
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Mishiro_Head", EquipType.Head, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Mishiro_Body", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Mishiro_Legs", EquipType.Legs, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Mishiro_Back", EquipType.Back, this);
}
}
public override void SetStaticDefaults()
{
if (Main.dedServ)
return;
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Head);
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
public override (EquipType, string, string)[] EquipSlots =>
[
(EquipType.Head, "Mishiro", null),
(EquipType.Body, "Mishiro", null),
(EquipType.Legs, "Mishiro", null),
(EquipType.Back, "Mishiro", null)
];
public override void SetDefaults()
{
@@ -47,57 +28,5 @@ namespace CalamityMod.Items.Accessories.Vanity
Item.vanity = true;
Item.Calamity().devItem = true;
}
public override void UpdateVanity(Player player)
{
player.GetModPlayer<OracleHeadphonesPlayer>().vanityEquipped = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (!hideVisual)
{
player.GetModPlayer<OracleHeadphonesPlayer>().vanityEquipped = true;
}
}
}
public class OracleHeadphonesPlayer : ModPlayer
{
public bool vanityEquipped = false;
public override void ResetEffects()
{
vanityEquipped = false;
}
public override void FrameEffects()
{
if (vanityEquipped)
{
Player.back = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Back);
Player.legs = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Head);
//Player.HideAccessories();
}
}
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
{
if (vanityEquipped)
{
drawInfo.drawPlayer.back = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Back);
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Legs);
drawInfo.legsGlowMask = -1;
drawInfo.legsOffset = Vector2.Zero;
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Body);
drawInfo.bodyGlowMask = -1;
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Head);
drawInfo.headGlowMask = -1;
drawInfo.helmetOffset = Vector2.Zero;
}
}
}
}
+15 -35
View File
@@ -1,36 +1,22 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.BaseItems;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories.Vanity
{
public class Popo : ModItem, ILocalizedModType
public class Popo : TransformationAccessory, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void Load()
{
if (!Main.dedServ)
{
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Popo_Head", EquipType.Head, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/PopoNoseless_Head", EquipType.Head, name: "PopoNoseless");
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Popo_Body", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Popo_Legs", EquipType.Legs, this);
}
}
public override void SetStaticDefaults()
{
if (Main.dedServ)
return;
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
public override (EquipType, string, string)[] EquipSlots =>
[
(EquipType.Head, "Popo", null),
(EquipType.Head, "PopoNoseless", "PopoNoseless"),
(EquipType.Body, "Popo", null),
(EquipType.Legs, "Popo", null),
(EquipType.Face, null, null), //results in setting this equip slot to -1
];
public override void SetDefaults()
{
@@ -42,20 +28,14 @@ namespace CalamityMod.Items.Accessories.Vanity
Item.Calamity().devItem = true;
}
public override void UpdateVanity(Player player)
public override bool CustomSetEquipType(Player player, EquipType type, Mod mod, string name)
{
player.Calamity().snowmanHide = false;
player.Calamity().snowmanForce = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.snowman = true;
if (hideVisual)
if (type == EquipType.Head)
{
modPlayer.snowmanHide = true;
player.head = EquipLoader.GetEquipSlot(Mod, player.Calamity().snowmanNoseless ? "PopoNoseless" : "Popo", EquipType.Head);
return true;
}
return false;
}
}
}
+9 -40
View File
@@ -1,38 +1,20 @@
using CalamityMod.UI;
using CalamityMod.Items.BaseItems;
using CalamityMod.UI;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories.Vanity
{
public class PunchCard : ModItem, ILocalizedModType
public class PunchCard : TransformationAccessory, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void Load()
{
if (!Main.dedServ)
{
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Shayy_Head", EquipType.Head, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Shayy_Body", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Shayy_Legs", EquipType.Legs, this);
}
}
public override void SetStaticDefaults()
{
if (Main.dedServ)
return;
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Head);
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
public override (EquipType, string, string)[] EquipSlots =>
[
(EquipType.Head, "Shayy", null),
(EquipType.Body, "Shayy", null),
(EquipType.Legs, "Shayy", null),
];
public override void SetDefaults()
{
@@ -53,18 +35,5 @@ namespace CalamityMod.Items.Accessories.Vanity
PopupGUIManager.FlipActivityOfGUIWithType(typeof(PunchCardGUI));
return true;
}
public override void UpdateVanity(Player player)
{
player.Calamity().punchCard = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (!hideVisual)
{
player.Calamity().punchCard = true;
}
}
}
}
+8 -78
View File
@@ -1,42 +1,20 @@
using Microsoft.Xna.Framework;
using System;
using CalamityMod.Items.BaseItems;
using Terraria;
using Terraria.DataStructures;
using Terraria.Graphics.Renderers;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories.Vanity
{
public class SharkyPlush : ModItem, ILocalizedModType
public class SharkyPlush : TransformationAccessory, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void Load()
{
if (!Main.dedServ)
{
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Shark_Head", EquipType.Head, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Shark_Body", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Shark_Legs", EquipType.Legs, this);
}
}
public override void SetStaticDefaults()
{
if (Main.dedServ)
return;
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Head);
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
public override (EquipType, string, string)[] EquipSlots =>
[
(EquipType.Head, "Shark", null),
(EquipType.Body, "Shark", null),
(EquipType.Legs, "Shark", null),
];
public override void SetDefaults()
{
@@ -48,53 +26,5 @@ namespace CalamityMod.Items.Accessories.Vanity
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
Item.Calamity().devItem = true;
}
public override void UpdateVanity(Player player)
{
player.GetModPlayer<SharkyPlushPlayer>().vanityEquipped = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (!hideVisual)
{
player.GetModPlayer<SharkyPlushPlayer>().vanityEquipped = true;
}
}
}
public class SharkyPlushPlayer : ModPlayer
{
public bool vanityEquipped = false;
public override void ResetEffects()
{
vanityEquipped = false;
}
public override void FrameEffects()
{
if (vanityEquipped)
{
Player.legs = EquipLoader.GetEquipSlot(Mod, "SharkyPlush", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "SharkyPlush", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, "SharkyPlush", EquipType.Head);
}
}
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
{
if (vanityEquipped)
{
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "SharkyPlush", EquipType.Legs);
drawInfo.legsGlowMask = -1;
drawInfo.legsOffset = Vector2.Zero;
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "SharkyPlush", EquipType.Body);
drawInfo.bodyGlowMask = -1;
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "SharkyPlush", EquipType.Head);
drawInfo.headGlowMask = -1;
drawInfo.helmetOffset = Vector2.Zero;
}
}
}
}
+9 -64
View File
@@ -1,4 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.BaseItems;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,35 +9,17 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories.Vanity
{
public class XyksBlessingBlue : ModItem, ILocalizedModType
public class XyksBlessingBlue : TransformationAccessory, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void Load()
{
if (!Main.dedServ)
{
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Xyk_Head", EquipType.Head, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Xyk_Body", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Xyk_Legs", EquipType.Legs, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Projectiles/InvisibleProj", EquipType.Wings, this);
}
}
public override void SetStaticDefaults()
{
if (Main.dedServ)
return;
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Head);
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = false;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
public override (EquipType, string, string)[] EquipSlots =>
[
(EquipType.Head, "Xyk", null),
(EquipType.Body, "Xyk", null),
(EquipType.Legs, "Xyk", null),
(EquipType.Wings, null, null), //results in setting this equip slot to -1
];
public override void SetDefaults()
{
@@ -55,7 +38,6 @@ namespace CalamityMod.Items.Accessories.Vanity
}
public override void UpdateVanity(Player player)
{
player.GetModPlayer<XyksBlessingBluePlayer>().vanityEquipped = true;
CalamityPlayer modPlayer = player.Calamity();
modPlayer.XykVisualsBlue = true;
}
@@ -64,46 +46,9 @@ namespace CalamityMod.Items.Accessories.Vanity
{
if (!hideVisual)
{
player.GetModPlayer<XyksBlessingBluePlayer>().vanityEquipped = true;
CalamityPlayer modPlayer = player.Calamity();
modPlayer.XykVisualsBlue = true;
}
}
}
public class XyksBlessingBluePlayer : ModPlayer
{
public bool vanityEquipped = false;
public override void ResetEffects()
{
vanityEquipped = false;
}
public override void FrameEffects()
{
if (vanityEquipped)
{
Player.legs = EquipLoader.GetEquipSlot(Mod, "XyksBlessingBlue", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "XyksBlessingBlue", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, "XyksBlessingBlue", EquipType.Head);
Player.wings = EquipLoader.GetEquipSlot(Mod, "XyksBlessingOrange", EquipType.Wings);
}
}
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
{
if (vanityEquipped)
{
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "XyksBlessingBlue", EquipType.Legs);
drawInfo.legsGlowMask = -1;
drawInfo.legsOffset = Vector2.Zero;
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "XyksBlessingBlue", EquipType.Body);
drawInfo.bodyGlowMask = -1;
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "XyksBlessingBlue", EquipType.Head);
drawInfo.headGlowMask = -1;
drawInfo.helmetOffset = Vector2.Zero;
}
}
}
}
+9 -66
View File
@@ -1,43 +1,24 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.BaseItems;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories.Vanity
{
public class XyksBlessingOrange : ModItem, ILocalizedModType
public class XyksBlessingOrange : TransformationAccessory, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void Load()
{
if (!Main.dedServ)
{
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Xyk_Head2", EquipType.Head, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Xyk_Body2", EquipType.Body, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Xyk_Legs2", EquipType.Legs, this);
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Projectiles/InvisibleProj", EquipType.Wings, this);
}
}
public override void SetStaticDefaults()
{
if (Main.dedServ)
return;
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Head);
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = true;
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = false;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
public override (EquipType, string, string)[] EquipSlots =>
[
(EquipType.Head, "Xyk", null),
(EquipType.Body, "Xyk", null),
(EquipType.Legs, "Xyk", null),
(EquipType.Wings, null, null), //results in setting this equip slot to -1
];
public override void SetDefaults()
{
@@ -56,7 +37,6 @@ namespace CalamityMod.Items.Accessories.Vanity
}
public override void UpdateVanity(Player player)
{
player.GetModPlayer<XyksBlessingOrangePlayer>().vanityEquipped = true;
CalamityPlayer modPlayer = player.Calamity();
modPlayer.XykVisualsOrange = true;
}
@@ -65,46 +45,9 @@ namespace CalamityMod.Items.Accessories.Vanity
{
if (!hideVisual)
{
player.GetModPlayer<XyksBlessingOrangePlayer>().vanityEquipped = true;
CalamityPlayer modPlayer = player.Calamity();
modPlayer.XykVisualsOrange = true;
}
}
}
public class XyksBlessingOrangePlayer : ModPlayer
{
public bool vanityEquipped = false;
public override void ResetEffects()
{
vanityEquipped = false;
}
public override void FrameEffects()
{
if (vanityEquipped)
{
Player.legs = EquipLoader.GetEquipSlot(Mod, "XyksBlessingOrange", EquipType.Legs);
Player.body = EquipLoader.GetEquipSlot(Mod, "XyksBlessingOrange", EquipType.Body);
Player.head = EquipLoader.GetEquipSlot(Mod, "XyksBlessingOrange", EquipType.Head);
Player.wings = EquipLoader.GetEquipSlot(Mod, "XyksBlessingOrange", EquipType.Wings);
}
}
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
{
if (vanityEquipped)
{
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "XyksBlessingOrange", EquipType.Legs);
drawInfo.legsGlowMask = -1;
drawInfo.legsOffset = Vector2.Zero;
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "XyksBlessingOrange", EquipType.Body);
drawInfo.bodyGlowMask = -1;
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "XyksBlessingOrange", EquipType.Head);
drawInfo.headGlowMask = -1;
drawInfo.helmetOffset = Vector2.Zero;
}
}
}
}
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Ammo
{
Item.width = 22;
Item.height = 36;
Item.damage = 15;
Item.damage = 14;
Item.DamageType = DamageClass.Ranged;
Item.maxStack = Item.CommonMaxStack;
Item.consumable = true;
+2 -1
View File
@@ -1,6 +1,7 @@
using CalamityMod.Items.Armor.GodSlayer;
using CalamityMod.Rarities;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor.Vanity
@@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor.Vanity
Item.height = 18;
Item.vanity = true;
Item.value = Item.buyPrice(gold: 8); // Sold by Clothier
Item.rare = ModContent.RarityType<CosmicPurple>();
Item.rare = ItemRarityID.Blue;
}
public override bool IsArmorSet(Item head, Item body, Item legs)
+2 -1
View File
@@ -1,6 +1,7 @@
using CalamityMod.Items.Armor.GodSlayer;
using CalamityMod.Rarities;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor.Vanity
@@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor.Vanity
Item.height = 18;
Item.vanity = true;
Item.value = Item.buyPrice(gold: 8); // Sold by Clothier
Item.rare = ModContent.RarityType<CosmicPurple>();
Item.rare = ItemRarityID.Blue;
}
public override bool IsArmorSet(Item head, Item body, Item legs)
+1 -1
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Armor.Vanity
Item.height = 20;
Item.vanity = true;
Item.value = Item.buyPrice(gold: 8); // Sold by Clothier
Item.rare = ModContent.RarityType<CosmicPurple>();
Item.rare = ItemRarityID.Blue;
}
public override bool IsArmorSet(Item head, Item body, Item legs)
+1 -1
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Armor.Vanity
Item.height = 24;
Item.vanity = true;
Item.value = Item.buyPrice(gold: 8); // Sold by Clothier
Item.rare = ModContent.RarityType<CosmicPurple>();
Item.rare = ItemRarityID.Blue;
}
public override bool IsArmorSet(Item head, Item body, Item legs)
+1 -1
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Armor.Vanity
Item.height = 26;
Item.vanity = true;
Item.value = Item.buyPrice(gold: 8); // Sold by Clothier
Item.rare = ModContent.RarityType<CosmicPurple>();
Item.rare = ItemRarityID.Blue;
}
public override bool IsArmorSet(Item head, Item body, Item legs)
+20 -18
View File
@@ -57,8 +57,8 @@ namespace CalamityMod.Items.Armor.Wulfrum
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Armor/Wulfrum/WulfrumHat_FemaleHead", EquipType.Head, name: "WulfrumHatFemale");
}
Terraria.On_Player.KeyDoubleTap += ActivateSetBonus;
Terraria.On_Main.DrawPendingMouseText += SpoofMouseItem;
On_Player.KeyDoubleTap += ActivateSetBonus;
On_Main.DrawPendingMouseText += SpoofMouseItem;
}
public override void Unload()
@@ -67,7 +67,7 @@ namespace CalamityMod.Items.Armor.Wulfrum
DummyCannon = null;
}
private void ActivateSetBonus(Terraria.On_Player.orig_KeyDoubleTap orig, Player player, int keyDir)
private void ActivateSetBonus(On_Player.orig_KeyDoubleTap orig, Player player, int keyDir)
{
if (keyDir == (Main.ReversedUpDownArmorSetBonuses ? 1 : 0) && HasArmorSet(player) && !player.mount.Active)
{
@@ -84,9 +84,9 @@ namespace CalamityMod.Items.Armor.Wulfrum
else if (player.HasItem(ItemType<WulfrumMetalScrap>()))
{
player.ConsumeItem(ItemType<WulfrumMetalScrap>());
//I Thiiiinnnk there's no need to add mp syncing packets since cooldowns get auto synced right.
//I Thiiiinnnk there's no need to add mp syncing packets since cooldowns get auto synced right
player.AddCooldown(WulfrumBastion.ID, BastionCooldown + BastionTime);
//Though do i need to sync that or is the player inventory auto synced?
//Though do I need to sync that or is the player inventory auto synced?
DummyCannon.SetDefaults(ItemType<WulfrumFusionCannon>());
}
}
@@ -95,7 +95,7 @@ namespace CalamityMod.Items.Armor.Wulfrum
}
//Replaces the tooltip of the armor set with the fusion cannon if the player holds shift
private void SpoofMouseItem(Terraria.On_Main.orig_DrawPendingMouseText orig)
private void SpoofMouseItem(On_Main.orig_DrawPendingMouseText orig)
{
var player = Main.LocalPlayer;
@@ -132,7 +132,7 @@ namespace CalamityMod.Items.Armor.Wulfrum
armorPlayer.wulfrumSet = true;
player.setBonus = this.GetLocalization("SetBonus").Format(MinionSlotBoost); //The cooler part of the set bonus happens in modifytooltips because i can't recolor it otherwise. Madge
player.setBonus = this.GetLocalization("SetBonus").Format(MinionSlotBoost); //The cooler part of the set bonus happens in modifytooltips because I can't recolor it otherwise. Madge
player.maxMinions += MinionSlotBoost;
if (PowerModeEngaged(player, out var cd))
{
@@ -143,11 +143,12 @@ namespace CalamityMod.Items.Armor.Wulfrum
//Stats
player.statDefense += 13;
player.endurance += 0.05f; //10% Dr in total with the chestplate
player.endurance += 0.05f; //10% DR in total with the chestplate
//Can't account for previous fullbody transformations but at this point, whatever.
//Can't account for previous fullbody transformations but at this point, whatever
bool transformed = player.Transformation().Type == ItemType<AbandonedWulfrumHelmet>();
Item headItem = player.armor[10].type != ItemID.None ? player.armor[10] : player.armor[0];
bool hatVisible = !transformationPlayer.transformationActive && headItem.type == ItemType<WulfrumHat>();
bool hatVisible = !transformed && headItem.type == ItemType<WulfrumHat>();
//Spawn the hat
if (cd.timeLeft == BastionCooldown + BastionTime - (int)(BastionBuildTime * 0.9f) && hatVisible)
@@ -158,11 +159,9 @@ namespace CalamityMod.Items.Armor.Wulfrum
//Visuals
if (cd.timeLeft < BastionCooldown + BastionTime - BastionBuildTime)
player.GetModPlayer<WulfrumTransformationPlayer>().transformationActive = true;
else if (cd.timeLeft <= BastionCooldown + BastionTime - (int)(BastionBuildTime * 0.9f))
player.GetModPlayer<WulfrumTransformationPlayer>().forceHelmetOn = true;
player.Transformation().Type = ItemType<AbandonedWulfrumHelmet>();
//Swapping the arm.
//Swapping the arm
if (DummyCannon.IsAir)
DummyCannon.SetDefaults(ItemType<WulfrumFusionCannon>());
@@ -175,7 +174,7 @@ namespace CalamityMod.Items.Armor.Wulfrum
Main.mouseItem = DummyCannon;
}
//Slot 58 is the "fake" slot thats used for the item the player is holding in their mouse.
//Slot 58 is the "fake" slot thats used for the item the player is holding in their mouse
player.inventory[58] = DummyCannon;
player.selectedItem = 58;
}
@@ -187,6 +186,9 @@ namespace CalamityMod.Items.Armor.Wulfrum
Main.mouseItem = new Item();
DummyCannon.TurnToAir();
if (player.Transformation().Type == ItemType<AbandonedWulfrumHelmet>() && player.Transformation().currentTransformation.IsForced)
player.Transformation().currentTransformation.IsForced = false;
}
}
@@ -194,8 +196,8 @@ namespace CalamityMod.Items.Armor.Wulfrum
{
SoundEngine.PlaySound(SetActivationSound);
//Do'nt do the effect ifthe player is already using the wulfrum vanity lol.
bool transformedAlready = player.GetModPlayer<WulfrumTransformationPlayer>().transformationActive;
//Don't do the effect if the player is already using the wulfrum vanity lol
bool transformedAlready = player.Transformation().Type == ItemType<AbandonedWulfrumHelmet>();
if (!transformedAlready)
{
@@ -364,7 +366,7 @@ namespace CalamityMod.Items.Armor.Wulfrum
{
SetBonusEndEffect(true);
if (!Player.GetModPlayer<WulfrumTransformationPlayer>().vanityEquipped)
Player.GetModPlayer<WulfrumTransformationPlayer>().transformationActive = false;
Player.Transformation().currentTransformation = null;
}
}
+271
View File
@@ -0,0 +1,271 @@
using Terraria.DataStructures;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using System.Linq;
using System;
using Microsoft.Xna.Framework;
using Terraria.Audio;
namespace CalamityMod.Items.BaseItems
{
public abstract class TransformationAccessory : ModItem
{
public bool IsForced = false;
public virtual string AssetPath => "CalamityMod/Items/Accessories/Vanity/";
public virtual (EquipType Type, string AssetName, string EquipName)[] EquipSlots => [];
public virtual float Priority => 1;
public virtual Func<Player, bool> ShouldTransform => (player) => true;
public virtual bool ShouldHideAccessories => false;
public virtual (SoundStyle sound, int delay)? HurtSound(Player p) => null;
public virtual void ModifyDrawInfo(ref PlayerDrawSet drawInfo) { }
public virtual void ArmorIDSets()
{
if (EquipSlots.Any(s => s.Type == EquipType.Head))
{
string name = EquipSlots.First(s => s.Type == EquipType.Head).EquipName;
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, name ?? Name, EquipType.Head);
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
}
if (EquipSlots.Any(s => s.Type == EquipType.Body))
{
string name = EquipSlots.First(s => s.Type == EquipType.Body).EquipName;
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, name ?? Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
}
if (EquipSlots.Any(s => s.Type == EquipType.Legs))
{
string name = EquipSlots.First(s => s.Type == EquipType.Legs).EquipName;
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, name ?? Name, EquipType.Legs);
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
}
}
public virtual bool CustomSetEquipType(Player player, EquipType type, Mod mod, string name) => false;
public virtual void TransformFrameEffects(Player player) { }
public virtual void TransformPostUpdate(Player player) { }
public override void Load()
{
if (Main.netMode != NetmodeID.Server)
{
foreach (var v in EquipSlots)
{
if (v.AssetName == null)
continue;
EquipLoader.AddEquipTexture(Mod, AssetPath + v.AssetName + "_" + v.Type.ToString(), v.Type, this, v.EquipName);
}
}
}
public override void SetStaticDefaults()
{
if (Main.netMode == NetmodeID.Server)
return;
ArmorIDSets();
}
}
public class TransformationPlayer : ModPlayer
{
public override void Load()
{
On_Player.UpdateVisibleAccessory += SetTransformationItem;
}
internal TransformationAccessory currentTransformation = null;
int prevSlot = -1;
public int Type
{
get => currentTransformation == null ? -1 : currentTransformation.Type;
set
{
ModItem item = ModContent.GetModItem(value);
if (item != null && item is TransformationAccessory trans)
{
currentTransformation = trans;
currentTransformation.IsForced = true;
}
else
currentTransformation = null;
}
}
private void SetTransformationItem(On_Player.orig_UpdateVisibleAccessory orig, Player self, int itemSlot, Item item, bool modded)
{
orig(self, itemSlot, item, modded);
if (self.Transformation().currentTransformation == null || !self.Transformation().currentTransformation.IsForced)
{
if (self.Transformation().prevSlot > itemSlot) //determines if we're on the first visible slot (as this isnt called on non-visible slots)
self.Transformation().currentTransformation = null;
if (item.ModItem is TransformationAccessory transformation && transformation.ShouldTransform.Invoke(self) && (currentTransformation == null || transformation.Priority >= currentTransformation.Priority))
self.Transformation().currentTransformation = transformation;
}
if (self.Transformation().currentTransformation != null && itemSlot == 19) // last item slot, can set equip slots to our transformation if one is equipped
{
TransformationAccessory trans = self.Transformation().currentTransformation;
bool[] list = new bool[15];
foreach (var (Type, AssetName, EquipName) in trans.EquipSlots)
{
string name = AssetName == null ? null : EquipName ?? trans.Name;
if (!trans.CustomSetEquipType(self, Type, Mod, name) && !list[(int)Type])
{
SetEquipSlot(self, Type, Mod, name);
list[(int)Type] = true;
}
}
if(trans.ShouldHideAccessories)
self.HideAccessories();
}
self.Transformation().prevSlot = itemSlot;
}
public override void UpdateAutopause()
{
if (currentTransformation != null)
{
if (!currentTransformation.CustomSetEquipType(Player, EquipType.Head, Mod, currentTransformation.Name))
{
var (Type, AssetName, EquipName) = currentTransformation.EquipSlots.First(v => v.Type == EquipType.Head);
string name = (EquipName == null && AssetName == null) ? null : EquipName ?? currentTransformation.Name;
SetEquipSlot(Player, EquipType.Head, Mod, name);
}
}
}
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
{
if (currentTransformation != null)
{
currentTransformation.ModifyDrawInfo(ref drawInfo);
if (currentTransformation.EquipSlots.Any(s => s.Type == EquipType.Head))
{
drawInfo.headGlowMask = -1;
drawInfo.helmetOffset = Vector2.Zero;
}
if (currentTransformation.EquipSlots.Any(s => s.Type == EquipType.Body))
{
drawInfo.bodyGlowMask = -1;
}
if (currentTransformation.EquipSlots.Any(s => s.Type == EquipType.Legs))
{
drawInfo.legsGlowMask = -1;
drawInfo.legsOffset = Vector2.Zero;
}
}
}
public override void FrameEffects()
{
if (currentTransformation != null)
{
currentTransformation.TransformFrameEffects(Player);
if (currentTransformation.ShouldHideAccessories)
Player.HideAccessories();
}
}
public override void PostUpdate()
{
currentTransformation?.TransformPostUpdate(Player);
}
public static void SetEquipSlot(Player player, EquipType type, Mod mod, string name)
{
switch (type)
{
case EquipType.Head:
player.head = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.Body:
player.body = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.Legs:
player.legs = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.HandsOn:
player.handon = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.HandsOff:
player.handoff = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.Back:
player.back = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.Front:
player.front = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.Shoes:
player.shoe = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.Waist:
player.waist = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.Wings:
player.wings = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.Shield:
player.shield = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.Neck:
player.neck = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.Face:
player.face = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.Balloon:
player.balloon = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
case EquipType.Beard:
player.beard = name == null ? -1 : EquipLoader.GetEquipSlot(mod, name, type);
break;
}
}
public static int GetEquipSlot(Player player, EquipType type) => type switch
{
EquipType.Head => player.head,
EquipType.Body => player.body,
EquipType.Legs => player.legs,
EquipType.HandsOn => player.handon,
EquipType.HandsOff => player.handoff,
EquipType.Back => player.back,
EquipType.Front => player.front,
EquipType.Shoes => player.shoe,
EquipType.Waist => player.waist,
EquipType.Wings => player.wings,
EquipType.Shield => player.shield,
EquipType.Neck => player.neck,
EquipType.Face => player.face,
EquipType.Balloon => player.balloon,
EquipType.Beard => player.beard,
_ => -1,
};
public static EquipTexture GetEquipTexture(Player p, EquipType type) => EquipLoader.GetEquipTexture(type, GetEquipSlot(p, type));
}
}
+1 -1
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items
{
Item.width = 20;
Item.height = 20;
Item.rare = ModContent.RarityType<BurnishedAuric>();
Item.rare = ModContent.RarityType<CalamityRed>();
Item.value = 0;
}
+5
View File
@@ -1224,6 +1224,11 @@ namespace CalamityMod.Items
player.GetCritChance<MagicDamageClass>() -= 15;
break;
case ItemID.ShroomiteBreastplate:
player.GetDamage<RangedDamageClass>() -= 0.05f;
player.GetCritChance<RangedDamageClass>() -= 5;
break;
case ItemID.SquireAltHead:
player.GetDamage<MeleeDamageClass>() += 0.05f;
player.GetDamage<SummonDamageClass>() += 0.05f;
+4
View File
@@ -1100,6 +1100,10 @@ namespace CalamityMod.Items
if (item.type == ItemID.TitaniumMask)
EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("9%", "14%"));
// Shroomite
if (item.type == ItemID.ShroomiteBreastplate)
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("13%", "8%"));
// Solar Flare
if (item.type == ItemID.SolarFlareHelmet)
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("26%", "20%"));
+27 -24
View File
@@ -100,7 +100,8 @@ namespace CalamityMod.Items
{ 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.DeathSickle, Do(UseMeleeSpeed, DamageExact(82), ShootSpeedExact(15f)) },
{ ItemID.DeadlySphereStaff, Do(AutoReuse, UseExact(20), DamageExact(50)) },
{ ItemID.DeathSickle, Do(UseMeleeSpeed, DamageExact(70), ShootSpeedExact(15f)) },
{ ItemID.DemonBow, Do(PointBlank, DamageExact(12), AutoReuse) },
{ ItemID.DemonScythe, Do(AutoReuse, DamageExact(28)) },
{ ItemID.DyeTradersScimitar, Do(AutoReuse, UseTurn, DamageExact(24)) }, // Exotic Scimitar
@@ -111,7 +112,7 @@ namespace CalamityMod.Items
{ ItemID.EnchantedBoomerang, Do(DamageExact(24)) },
{ ItemID.EnchantedSword, Do(UseMeleeSpeed, DamageExact(30), ShootSpeedExact(15f)) },
{ ItemID.EndlessMusketPouch, Do(DamageExact(8)) },
{ ItemID.Excalibur, Do(TrueMelee, DamageExact(220), UseExact(24)) },
{ ItemID.Excalibur, Do(TrueMelee, DamageExact(205), UseExact(24)) },
{ ItemID.FairyQueenMagicItem, Do(DamageExact(54)) }, // Nightglow
{ ItemID.FalconBlade, Do(UseTurn, UseExact(13)) },
{ ItemID.FireworksLauncher, Do(DamageExact(50), UseExact(25)) }, // Celebration
@@ -130,8 +131,8 @@ namespace CalamityMod.Items
{ ItemID.Gradient, Do(AutoReuse, DamageExact(39)) },
{ ItemID.GreenPhaseblade, phaseblade },
{ ItemID.GreenPhasesaber, phasesaber },
{ ItemID.GrenadeLauncher, Do(DamageExact(112)) },
{ ItemID.Gungnir, Do(AutoReuse, TrueMelee, DamageExact(144), ShootSpeedExact(7f)) },
{ ItemID.GrenadeLauncher, Do(DamageExact(105)) },
{ ItemID.Gungnir, Do(AutoReuse, TrueMelee, DamageExact(132), ShootSpeedExact(7f)) },
{ ItemID.HallowedRepeater, Do(PointBlank, UseExact(12)) },
{ ItemID.Handgun, Do(PointBlank, UseExact(20)) },
{ ItemID.HellwingBow, Do(PointBlank, DamageExact(16)) },
@@ -145,22 +146,22 @@ namespace CalamityMod.Items
{ ItemID.IchorArrow, Do(DamageExact(13)) },
{ ItemID.IchorBullet, Do(DamageExact(11)) },
{ ItemID.ImpStaff, Do(AutoReuse, UseExact(30), DamageExact(25)) },
{ ItemID.InfernoFork, Do(DamageExact(99), ShootSpeedExact(11)) },
{ 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(85)) },
{ ItemID.Kraken, Do(AutoReuse, DamageExact(65)) },
{ ItemID.KOCannon, Do(DamageRatio(2.65f)) }, // Uses ratios due to remix seed
{ ItemID.LaserMachinegun, Do(DamageExact(49)) },
{ ItemID.LaserRifle, Do(DamageExact(46), UseExact(10), ManaExact(4)) },
{ ItemID.LastPrism, Do(DamageExact(57), ManaExact(10)) },
{ ItemID.LeadShortsword, Do(AutoReuse, TrueMelee, DamageExact(11)) },
{ ItemID.LightDisc, Do(DamageExact(98), ShootSpeedExact(18)) },
{ ItemID.LeafBlower, Do(DamageExact(61)) },
{ ItemID.LightDisc, Do(DamageExact(80), ShootSpeedExact(18)) },
{ ItemID.LunarFlareBook, Do(DamageExact(120)) },
{ ItemID.MagicalHarp, Do(DamageExact(50), ShootSpeedExact(12f)) },
{ ItemID.MagicDagger, Do(DamageRatio(1.8f), UseRatio(1.88f), ShootSpeedExact(30)) }, // Uses ratios due to remix seed
{ ItemID.MagicMissile, Do(DamageExact(23), ManaExact(10), UseAnimationExact(20), UseTimeExact(10)) },
{ ItemID.MagnetSphere, Do(DamageExact(52)) },
{ ItemID.Marrow, Do(PointBlank, DamageExact(69)) },
{ ItemID.MedusaHead, Do(ManaExact(6), DamageExact(48)) },
{ ItemID.Meowmere, Do(UseMeleeSpeed, DamageExact(240)) },
@@ -180,7 +181,8 @@ namespace CalamityMod.Items
{ ItemID.MythrilHalberd, Do(AutoReuse, TrueMelee, DamageExact(65), UseExact(8), ShootSpeedExact(15f)) },
{ ItemID.MythrilRepeater, Do(PointBlank, UseExact(16)) },
{ ItemID.MythrilSword, Do(UseTurn, DamageExact(70), UseExact(8)) },
{ ItemID.NettleBurst, Do(ManaExact(10), DamageExact(70)) },
{ ItemID.NailGun, Do(DamageExact(77)) },
{ ItemID.NettleBurst, Do(ManaExact(10), DamageExact(65)) },
{ ItemID.NightsEdge, Do(TrueMelee, DamageExact(45)) },
{ ItemID.NorthPole, Do(AutoReuse, UseMeleeSpeed) },
{ ItemID.OrangePhaseblade, phaseblade },
@@ -189,7 +191,7 @@ namespace CalamityMod.Items
{ ItemID.OrichalcumRepeater, Do(PointBlank, DamageExact(48)) },
{ ItemID.OrichalcumSword, Do(UseTurn, DamageExact(175)) },
{ ItemID.PainterPaintballGun, Do(PointBlank, DamageExact(8)) },
{ ItemID.PaladinsHammer, Do(DamageExact(100), ShootSpeedExact(23)) },
{ ItemID.PaladinsHammer, Do(DamageExact(95), ShootSpeedExact(28)) },
{ ItemID.PalladiumPike, Do(AutoReuse, TrueMelee, DamageExact(120), ShootSpeedExact(5.4f)) },
{ ItemID.PalladiumRepeater, Do(PointBlank, DamageExact(45)) },
{ ItemID.PalladiumSword, Do(UseTurn, DamageExact(150)) },
@@ -198,18 +200,17 @@ namespace CalamityMod.Items
{ ItemID.PewMaticHorn, Do(DamageExact(25), ShootSpeedExact(15)) },
{ ItemID.Phantasm, Do(PointBlank, DamageExact(48)) },
{ ItemID.PhoenixBlaster, Do(AutoReuse, PointBlank, UseExact(20)) },
{ ItemID.PiranhaGun, Do(DamageExact(48)) },
{ ItemID.PlatinumBow, Do(PointBlank, DamageExact(12)) },
{ ItemID.PlatinumCoin, Do(DamageExact(150)) }, // For Coin Gun
{ ItemID.PlatinumShortsword, Do(AutoReuse, TrueMelee, DamageExact(18)) },
{ ItemID.PoisonStaff, Do(DamageExact(57)) },
{ ItemID.PossessedHatchet, Do(DamageExact(135)) },
{ ItemID.PrincessWeapon, Do(DamageExact(90)) }, // Resonance Scepter
{ ItemID.PrincessWeapon, Do(DamageExact(80)) }, // Resonance Scepter
{ ItemID.PsychoKnife, Do(UseTurn, UseExact(11), DamageExact(200)) },
{ ItemID.PurpleClubberfish, Do(UseTurn, KnockbackExact(10f)) },
{ ItemID.PurplePhaseblade, phaseblade },
{ ItemID.PurplePhasesaber, phasesaber },
{ ItemID.PygmyStaff, Do(AutoReuse, UseExact(20), DamageExact(70)) },
{ ItemID.PygmyStaff, Do(AutoReuse, UseExact(20), DamageExact(63)) },
{ ItemID.QuadBarrelShotgun, Do(PointBlank, DamageExact(11)) },
{ ItemID.RainbowGun, Do(DamageExact(60), ManaExact(40)) },
{ ItemID.RainbowRod, Do(DamageExact(40), ManaExact(13), KnockbackExact(8f)) },
@@ -221,10 +222,11 @@ namespace CalamityMod.Items
{ ItemID.RedPhasesaber, phasesaber },
{ ItemID.RedRyder, Do(PointBlank, DamageExact(24)) },
{ ItemID.RedsYoyo, Do(AutoReuse, DamageExact(48)) }, // Red's Throw and Valkyrie Yoyo have the same stats
{ ItemID.RocketLauncher, Do(DamageExact(70)) },
{ ItemID.RocketLauncher, Do(DamageExact(60), ShootSpeedExact(9)) },
{ ItemID.Sandgun, Do(PointBlank, DamageExact(22), UseExact(20)) },
{ ItemID.SapphireStaff, Do(DamageExact(25)) },
{ ItemID.Seedler, Do(UseMeleeSpeed, DamageExact(75), ShootSpeedDelta(+4f)) },
{ ItemID.ScourgeoftheCorruptor, Do(DamageExact(63)) },
{ ItemID.Seedler, Do(UseMeleeSpeed, DamageExact(45), ShootSpeedExact(16)) },
{ ItemID.ShadowbeamStaff, Do(DamageExact(100)) },
{ ItemID.ShadowFlameBow, Do(PointBlank, DamageExact(55)) },
{ ItemID.ShadowFlameHexDoll, Do(DamageExact(40), ShootSpeedExact(30)) },
@@ -237,12 +239,12 @@ namespace CalamityMod.Items
{ ItemID.SkyFracture, Do(DamageExact(54), ShootSpeedExact(30f)) },
{ ItemID.SlapHand, Do(UseTurn, DamageExact(120)) },
{ ItemID.Smolstar, Do(DamageExact(9), AutoReuse, UseExact(25)) }, // Blade Staff
{ ItemID.SniperRifle, Do(PointBlank, DamageExact(215)) },
{ ItemID.SniperRifle, Do(PointBlank, DamageExact(200), UseExact(40)) },
{ ItemID.SolarEruption, Do(DamageExact(122)) },
{ ItemID.SoulDrain, Do(DamageExact(38)) }, // Life Drain
{ ItemID.SpaceGun, Do(DamageExact(23)) },
{ ItemID.Spear, Do(AutoReuse, TrueMelee, DamageExact(14)) },
{ ItemID.SpectreStaff, Do(DamageExact(78)) },
{ ItemID.SpectreStaff, Do(DamageExact(72)) },
{ ItemID.SpiritFlame, Do(UseExact(20), ManaExact(11), ShootSpeedExact(2f)) },
{ ItemID.StaffofEarth, Do(DamageExact(150)) },
{ ItemID.StarCannon, Do(DamageExact(25), UseExact(15)) },
@@ -250,16 +252,17 @@ namespace CalamityMod.Items
{ ItemID.StormTigerStaff, Do(AutoReuse, 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)) },
{ ItemID.Swordfish, Do(AutoReuse, TrueMelee, DamageExact(24)) },
{ ItemID.TacticalShotgun, Do(PointBlank, DamageExact(41)) },
{ ItemID.TacticalShotgun, Do(PointBlank, DamageExact(34)) },
{ ItemID.TaxCollectorsStickOfDoom, Do(AutoReuse, UseTurn, UseRatio(0.8f), DamageExact(70)) }, // Classy Cane
{ ItemID.TendonBow, Do(PointBlank, DamageExact(17), AutoReuse) },
{ ItemID.TerraBlade, Do(DamageExact(92)) },
{ ItemID.TerraBlade, Do(DamageExact(95)) },
{ ItemID.Terragrim, Do(TrueMeleeNoSpeed, DamageExact(13)) },
// Vanilla damage 190. After fixing iframes so yoyo and shots can hit simultaneously,
// Terrarian is extremely overpowered and requires a heavy nerf.
{ ItemID.Terrarian, Do(AutoReuse, DamageExact(90)) },
{ ItemID.TheEyeOfCthulhu, Do(AutoReuse, DamageExact(90)) },
{ ItemID.TheEyeOfCthulhu, Do(AutoReuse, DamageExact(80)) },
{ ItemID.TheMeatball, Do(DamageExact(24)) },
{ ItemID.TheRottedFork, Do(AutoReuse, TrueMelee, DamageExact(20)) },
{ ItemID.TheUndertaker, Do(PointBlank, AutoReuse, DamageExact(15)) },
@@ -269,6 +272,7 @@ namespace CalamityMod.Items
{ ItemID.TitaniumSword, Do(UseTurn, DamageExact(192)) },
{ ItemID.TitaniumTrident, Do(AutoReuse, TrueMelee, DamageExact(144), ShootSpeedExact(6.5f)) },
{ ItemID.TopazStaff, Do(ManaExact(2)) },
{ ItemID.ToxicFlask, Do(DamageExact(62), UseExact(33), ManaExact(20)) },
{ ItemID.Toxikarp, Do(UseExact(9)) },
{ ItemID.Trident, Do(AutoReuse, TrueMelee, DamageExact(20)) },
{ ItemID.Trimarang, Do(DamageExact(24)) },
@@ -282,9 +286,8 @@ namespace CalamityMod.Items
{ ItemID.Uzi, Do(PointBlank, UseExact(8)) },
{ ItemID.VampireKnives, Do(DamageExact(38)) },
{ ItemID.ValkyrieYoyo, Do(AutoReuse, DamageExact(48)) }, // Red's Throw and Valkyrie Yoyo have the same stats
{ ItemID.VenomStaff, Do(DamageExact(55)) },
{ ItemID.VenusMagnum, Do(PointBlank, DamageExact(65)) },
{ ItemID.WaspGun, Do(UseExact(11), DamageExact(58)) },
{ ItemID.VenomStaff, Do(UseExact(27)) },
{ ItemID.WaspGun, Do(DamageExact(44)) },
{ ItemID.WaterBolt, Do(DamageExact(23)) },
{ ItemID.WhitePhaseblade, phaseblade },
{ ItemID.WhitePhasesaber, phasesaber },
@@ -477,6 +480,7 @@ namespace CalamityMod.Items
{ ItemID.StakeLauncher, pointBlank },
{ ItemID.TinBow, pointBlank },
{ ItemID.TungstenBow, pointBlank },
{ ItemID.VenusMagnum, pointBlank },
{ ItemID.VortexBeater, pointBlank },
{ ItemID.WoodenBow, pointBlank },
#endregion
@@ -499,7 +503,6 @@ namespace CalamityMod.Items
{ ItemID.DD2LightningAuraT1Popper, autoReuse }, // Lightning Aura Tier 1
{ ItemID.DD2LightningAuraT2Popper, Do(AutoReuse, UseExact(25)) }, // Lightning Aura Tier 2
{ ItemID.DD2LightningAuraT3Popper, Do(AutoReuse, UseExact(20)) }, // Lightning Aura Tier 3
{ ItemID.DeadlySphereStaff, Do(AutoReuse, UseExact(20)) },
{ ItemID.FireWhip, autoReuse }, // Firecracker
{ ItemID.FlinxStaff, Do(AutoReuse, UseExact(35)) },
{ ItemID.MaceWhip, autoReuse }, // Morning Star
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.LoreItems
Item.width = 20;
Item.height = 20;
Item.consumable = false;
Item.rare = ModContent.RarityType<BurnishedAuric>();
Item.rare = ModContent.RarityType<CalamityRed>();
}
public override void AddRecipes()
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.LoreItems
Item.width = 20;
Item.height = 20;
Item.consumable = false;
Item.rare = ModContent.RarityType<PureGreen>();
Item.rare = ModContent.RarityType<CosmicPurple>();
}
public override void AddRecipes()
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.LoreItems
Item.width = 20;
Item.height = 20;
Item.consumable = false;
Item.rare = ModContent.RarityType<CosmicPurple>();
Item.rare = ModContent.RarityType<BurnishedAuric>();
}
public override void AddRecipes()
+6 -6
View File
@@ -108,32 +108,32 @@ namespace CalamityMod.Items.Placeables.Astral
resultType = ItemID.Amber;
resultStack = Main.rand.Next(1, 21);
}
else if (val < 81.78f)
else if (val < 81.78f && Main.hardMode)
{
resultType = ItemID.PalladiumOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 83.03f)
else if (val < 83.03f && Main.hardMode)
{
resultType = ItemID.CobaltOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 85.03f)
else if (val < 85.03f && Main.hardMode)
{
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? !NPC.downedMechBossAny ? ItemID.CobaltOre : ItemID.MythrilOre : ItemID.MythrilOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 87.03f)
else if (val < 87.03f && Main.hardMode)
{
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? !NPC.downedMechBossAny ? ItemID.PalladiumOre : ItemID.OrichalcumOre : ItemID.OrichalcumOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 88.78f)
else if (val < 88.78f && Main.hardMode)
{
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? !NPC.downedMechBossAny ? ItemID.CobaltOre : !twoMechsDowned ? ItemID.MythrilOre : ItemID.AdamantiteOre : ItemID.AdamantiteOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 89.53f)
else if (val < 89.53f && Main.hardMode)
{
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? !NPC.downedMechBossAny ? ItemID.PalladiumOre : !twoMechsDowned ? ItemID.OrichalcumOre : ItemID.TitaniumOre : ItemID.TitaniumOre;
resultStack = Main.rand.Next(1, 17);
+6 -6
View File
@@ -97,32 +97,32 @@ namespace CalamityMod.Items.Placeables.Astral
resultType = ItemID.Amber;
resultStack = Main.rand.Next(1, 21);
}
else if (val < 78.78f)
else if (val < 78.78f && Main.hardMode)
{
resultType = ItemID.PalladiumOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 81.03f)
else if (val < 81.03f && Main.hardMode)
{
resultType = ItemID.CobaltOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 83.03f)
else if (val < 83.03f && Main.hardMode)
{
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? !NPC.downedMechBossAny ? ItemID.CobaltOre : ItemID.MythrilOre : ItemID.MythrilOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 85.03f)
else if (val < 85.03f && Main.hardMode)
{
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? !NPC.downedMechBossAny ? ItemID.PalladiumOre : ItemID.OrichalcumOre : ItemID.OrichalcumOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 86.78f)
else if (val < 86.78f && Main.hardMode)
{
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? !NPC.downedMechBossAny ? ItemID.CobaltOre : !twoMechsDowned ? ItemID.MythrilOre : ItemID.AdamantiteOre : ItemID.AdamantiteOre;
resultStack = Main.rand.Next(1, 17);
}
else if (val < 88.53f)
else if (val < 88.53f && Main.hardMode)
{
resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? !NPC.downedMechBossAny ? ItemID.PalladiumOre : !twoMechsDowned ? ItemID.OrichalcumOre : ItemID.TitaniumOre : ItemID.TitaniumOre;
resultStack = Main.rand.Next(1, 17);
@@ -64,6 +64,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
"CrabBar",
"Dandy",
"Dia",
"Done",
"dozezoze",
"Eddie Spaghetti",
"ENNWAY",
@@ -118,7 +119,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
"DarkTiny",
"Demik",
"DM Dokuro",
"Done",
"Doog",
"drh",
"dwshin",
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -23,7 +24,7 @@ namespace CalamityMod.Items.Potions
{
Item.DefaultToHealingPotion(26, 38, 250);
Item.value = Item.sellPrice(silver: 60);
Item.rare = ItemRarityID.Purple;
Item.rare = ModContent.RarityType<Turquoise>();
}
public override void AddRecipes()
+1 -1
View File
@@ -59,7 +59,7 @@ namespace CalamityMod.Items
}
}
}
else if (player.whoAmI == Main.myPlayer)
else if (player.whoAmI == Main.myPlayer && NPC.CountNPCS(ModContent.NPCType<SuperDummyNPC>()) < 50)
{
int x = (int)Main.MouseWorld.X - 9;
int y = (int)Main.MouseWorld.Y - 20;
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.VanillaArmorChanges
public const int DelayBetweenHeals = 270;
public const int BaseDamageToEnemies = 250;
public const int BaseDamageToEnemies = 220;
public override void UpdateSetBonusText(ref string setBonusText)
{
+3 -3
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 56;
Item.height = 50;
Item.damage = 127;
Item.damage = 65;
Item.DamageType = DamageClass.Magic;
Item.mana = 7;
Item.useTime = 22;
@@ -58,8 +58,8 @@ namespace CalamityMod.Items.Weapons.Magic
if (nonReleasedMusicNotes >= musicNoteCap)
{
Main.musicPitch = -0.5f;
SoundEngine.PlaySound(CapSound with { Volume = 0.8f }, player.Center);
if (!Main.zenithWorld)
SoundEngine.PlaySound(CapSound with { Volume = 0.8f }, player.Center);
return false;
}
else
+1 -1
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 28;
Item.height = 24;
Item.damage = 90;
Item.damage = 80;
Item.DamageType = DamageClass.Magic;
Item.mana = 18;
Item.useTime = 28;
+9 -29
View File
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 52;
Item.height = 52;
Item.damage = 50;
Item.damage = 55;
Item.DamageType = DamageClass.Magic;
Item.mana = 19;
Item.useTime = 21;
@@ -39,38 +39,18 @@ namespace CalamityMod.Items.Weapons.Magic
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true);
int i = Main.myPlayer;
float fangSpeed = Item.shootSpeed;
float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X;
float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y;
float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist));
int spikeAmount = 4;
if (Main.rand.NextBool(3))
{
spikeAmount++;
}
if (Main.rand.NextBool(4))
{
spikeAmount++;
}
if (Main.rand.NextBool(5))
{
spikeAmount += 2;
}
int spikeAmount = Main.rand.Next(3, 4+1);
for (int j = 0; j < spikeAmount; j++)
{
float fangSpawnX = mouseXDist;
float fangSpawnY = mouseYDist;
float offsetDampener = 0.05f * (float)j;
fangSpawnX += (float)Main.rand.Next(-400, 400) * offsetDampener;
fangSpawnY += (float)Main.rand.Next(-400, 400) * offsetDampener;
float fangDistance = (float)Math.Sqrt((double)(fangSpawnX * fangSpawnX + fangSpawnY * fangSpawnY));
fangDistance = fangSpeed / fangDistance;
fangSpawnX *= fangDistance;
fangSpawnY *= fangDistance;
float x2 = realPlayerPos.X;
float y2 = realPlayerPos.Y;
Projectile.NewProjectile(source, x2, y2, fangSpawnX, fangSpawnY, ModContent.ProjectileType<AstralachneaFang>(), damage, knockback, i, 0f, 0f);
Vector2 fangSpawn = new Vector2(mouseXDist, mouseYDist);
fangSpawn.X += Main.rand.NextFloat(-20f, 20f) * j;
fangSpawn.Y += Main.rand.NextFloat(-20f, 20f) * j;
fangSpawn = fangSpawn.SafeNormalize(Vector2.UnitX) * Item.shootSpeed;
Projectile.NewProjectile(source, realPlayerPos, fangSpawn, ModContent.ProjectileType<AstralachneaFang>(), damage, knockback, player.whoAmI, 0f, 0f);
}
return false;
}
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 28;
Item.height = 30;
Item.damage = 88;
Item.damage = 81;
Item.DamageType = DamageClass.Magic;
Item.mana = 12;
Item.useTime = 25;
+3 -3
View File
@@ -13,14 +13,14 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 34;
Item.height = 30;
Item.damage = 28;
Item.damage = 65;
Item.DamageType = DamageClass.Magic;
Item.mana = 8;
Item.mana = 7;
Item.useTime = 6;
Item.useAnimation = 18;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 4.5f;
Item.knockBack = 2f;
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.rare = ItemRarityID.Lime;
Item.UseSound = SoundID.Item13;
+1 -2
View File
@@ -21,8 +21,7 @@ namespace CalamityMod.Items.Weapons.Magic
Item.damage = 37;
Item.DamageType = DamageClass.Magic;
Item.mana = 10;
Item.useTime = 16;
Item.useAnimation = 16;
Item.useTime = Item.useAnimation = 20;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 2.75f;
+2 -3
View File
@@ -12,11 +12,10 @@ namespace CalamityMod.Items.Weapons.Magic
Item.width = 42;
Item.height = 42;
Item.damage = 55;
Item.mana = 50;
Item.mana = 40;
Item.DamageType = DamageClass.Magic;
Item.noMelee = true;
Item.useTime = 30;
Item.useAnimation = 30;
Item.useTime = Item.useAnimation = 30;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 2f;
+2 -3
View File
@@ -22,11 +22,10 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 78;
Item.height = 78;
Item.damage = 60;
Item.damage = 74;
Item.DamageType = DamageClass.Magic;
Item.mana = 10;
Item.useTime = 24;
Item.useAnimation = 24;
Item.useTime = Item.useAnimation = 21;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 4f;
+2 -3
View File
@@ -21,11 +21,10 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 36;
Item.height = 42;
Item.damage = 300;
Item.damage = 205;
Item.DamageType = DamageClass.Magic;
Item.mana = 48;
Item.useTime = 68;
Item.useAnimation = 68;
Item.useTime = Item.useAnimation = 68;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 10;
+1 -1
View File
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 124;
Item.height = 52;
Item.damage = 110;
Item.damage = 97;
Item.DamageType = DamageClass.Magic;
Item.mana = 15;
Item.useAnimation = Item.useTime = 60;
+1 -1
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Magic
public override void SetDefaults()
{
Item.width = Item.height = 58;
Item.damage = 76;
Item.damage = 81;
Item.knockBack = 5f;
Item.useAnimation = Item.useTime = 30;
Item.mana = 20;
+6 -7
View File
@@ -18,11 +18,10 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 38;
Item.height = 48;
Item.damage = 45;
Item.damage = 43;
Item.DamageType = DamageClass.Magic;
Item.mana = 18;
Item.useTime = 20;
Item.useAnimation = 20;
Item.mana = 15;
Item.useTime = Item.useAnimation = 20;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 5.5f;
@@ -38,9 +37,9 @@ namespace CalamityMod.Items.Weapons.Magic
{
for (int index = 0; index < 2; ++index)
{
float SpeedX = velocity.X + (float)Main.rand.Next(-40, 41) * 0.05f;
float SpeedY = velocity.Y + (float)Main.rand.Next(-40, 41) * 0.05f;
Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI);
float SpeedX = velocity.X + Main.rand.NextFloat(-2f, 2f);
float SpeedY = velocity.Y + Main.rand.NextFloat(-2f, 2f);
Projectile.NewProjectile(source, position, new Vector2(SpeedX, SpeedY), type, damage, knockback, player.whoAmI);
}
return false;
}
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 64;
Item.height = 64;
Item.damage = 46;
Item.damage = 44;
Item.DamageType = DamageClass.Magic;
Item.mana = 15;
Item.useTime = 18;
+8 -6
View File
@@ -10,11 +10,11 @@ namespace CalamityMod.Items.Weapons.Magic
public class ValkyrieRay : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Magic";
// The base use time of the weapon is 47: 28 charge frames + 19 cooldown frames.
// The base use time of the weapon is 28: 18 charge frames + 10 cooldown frames.
// The rate at which it progresses through its charge and discharge cycle is dynamically sped up by reforges.
// This math is handled in its holdout projectile, ValkyrieRayStaff.
public const int ChargeFrames = 28;
public const int CooldownFrames = 19;
public const int ChargeFrames = 18;
public const int CooldownFrames = 10;
public const float GemDistance = 18f;
public static readonly Color LightColor = new Color(235, 40, 121);
@@ -27,14 +27,14 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 54;
Item.height = 52;
Item.damage = 53;
Item.damage = 115;
Item.knockBack = 8.5f;
Item.DamageType = DamageClass.Magic;
Item.mana = 26;
Item.mana = 17;
Item.useTime = ChargeFrames + CooldownFrames;
Item.useAnimation = ChargeFrames + CooldownFrames;
Item.useStyle = ItemUseStyleID.Shoot;
Item.UseSound = SoundID.NPCDeath7;
Item.UseSound = SoundID.NPCDeath7 with { Volume = 0.7f };
Item.useTurn = false;
Item.noMelee = true;
Item.noUseGraphic = true;
@@ -45,6 +45,8 @@ namespace CalamityMod.Items.Weapons.Magic
Item.autoReuse = true;
}
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 11;
public override void AddRecipes()
{
CreateRecipe().
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 74;
Item.height = 74;
Item.damage = 140;
Item.damage = 123;
Item.knockBack = 7.5f;
Item.useTime = 65;
Item.useAnimation = 65;
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 114;
Item.height = 122;
Item.damage = 150;
Item.damage = 120;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = 19;
Item.useTime = 19;
+1 -3
View File
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 88;
Item.height = 88;
Item.damage = 92;
Item.damage = 90;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = Item.useTime = 28;
Item.useStyle = ItemUseStyleID.Swing;
@@ -74,14 +74,12 @@ namespace CalamityMod.Items.Weapons.Melee
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
player.AddBuff(ModContent.BuffType<BrutalCarnage>(), 180);
target.AddBuff(BuffID.Venom, 240);
target.AddBuff(BuffID.OnFire3, 240);
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
player.AddBuff(ModContent.BuffType<BrutalCarnage>(), 180);
target.AddBuff(BuffID.Venom, 240);
target.AddBuff(BuffID.OnFire3, 240);
}
+1 -1
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 112;
Item.height = 112;
Item.damage = 88;
Item.damage = 110;
Item.DamageType = DamageClass.Melee;
Item.noMelee = true;
Item.useTurn = true;
+2 -3
View File
@@ -15,10 +15,9 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
Item.width = Item.height = 72;
Item.damage = 70;
Item.damage = 60;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = 30;
Item.useTime = 30;
Item.useTime = Item.useAnimation = 30;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 6f;
-2
View File
@@ -119,14 +119,12 @@ namespace CalamityMod.Items.Weapons.Melee
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
player.AddBuff(ModContent.BuffType<BrutalCarnage>(), 300);
target.AddBuff(BuffID.Venom, 360);
target.AddBuff(BuffID.OnFire3, 360);
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
player.AddBuff(ModContent.BuffType<BrutalCarnage>(), 300);
target.AddBuff(BuffID.Venom, 360);
target.AddBuff(BuffID.OnFire3, 360);
}
+2 -3
View File
@@ -16,10 +16,9 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 80;
Item.height = 92;
Item.damage = 91;
Item.damage = 85;
Item.DamageType = DamageClass.Melee;
Item.useTime = 21;
Item.useAnimation = 21;
Item.useTime = Item.useAnimation = 24;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 6f;
+4 -4
View File
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 144;
Item.height = 146;
Item.damage = 828;
Item.damage = 185;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = 27;
Item.useStyle = ItemUseStyleID.Swing;
@@ -40,8 +40,8 @@ namespace CalamityMod.Items.Weapons.Melee
Item.UseSound = SoundID.Item105;
Item.autoReuse = true;
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.rare = ModContent.RarityType<Turquoise>();
Item.shoot = ModContent.ProjectileType<GalacticaComet>();
Item.rare = RarityType<Turquoise>();
Item.shoot = ProjectileType<GalacticaComet>();
Item.shootSpeed = 13f;
Item.scale = 0.75f;
}
@@ -99,7 +99,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Vector2 clampedMouse = player.ClampedMouseWorld();
Vector2 spawnSpot = new Vector2(clampedMouse.X, player.Center.Y) + new Vector2(Main.rand.NextFloat(-850, 850), Main.rand.NextFloat(-750, -1250));
Projectile comet = Projectile.NewProjectileDirect(Item.GetSource_FromThis(), spawnSpot, Utils.DirectionTo(spawnSpot, player.Calamity().mouseWorld + Main.rand.NextVector2Circular(50, 50)) * Item.shootSpeed, Item.shoot, Item.damage / 3, Item.knockBack, player.whoAmI);
Projectile comet = Projectile.NewProjectileDirect(player.GetSource_ItemUse(Item), spawnSpot, Utils.DirectionTo(spawnSpot, player.Calamity().mouseWorld + Main.rand.NextVector2Circular(50, 50)) * Item.shootSpeed, Item.shoot, Item.damage, Item.knockBack, player.whoAmI);
comet.extraUpdates = Main.rand.Next(2, 3 + 1);
}
spawnProj = false;
+18 -25
View File
@@ -20,16 +20,15 @@ namespace CalamityMod.Items.Weapons.Melee
internal const int TotalRows = 2;
internal const int TotalTeeth = 4;
internal const int TotalTeeth = 3;
public override void SetDefaults()
{
Item.width = 62;
Item.height = 62;
Item.damage = 97;
Item.damage = 81;
Item.DamageType = DamageClass.Melee;
Item.useTime = 27;
Item.useAnimation = 27;
Item.useTime = Item.useAnimation = 30;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 7f;
@@ -46,17 +45,19 @@ namespace CalamityMod.Items.Weapons.Melee
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
for (int i = 0; i < 2; ++i)
for (int i = -2; i <= 2; i++)
{
Projectile tooth = Projectile.NewProjectileDirect(source, position, velocity.RotatedBy(-0.1f * (i + 1)).RotatedByRandom(0.06f) * (1 - i * 0.3f), type, (int)(damage * 0.5f), knockback / 3, player.whoAmI, 1f, 0f);
if (i == 0)
{
Projectile strongTooth = Projectile.NewProjectileDirect(source, position, velocity * 1.2f, type, damage, knockback, player.whoAmI, 2f, 0f);
strongTooth.penetrate = -1;
strongTooth.timeLeft = 150;
}
else
{
Projectile.NewProjectile(source, position, velocity.RotatedBy(0.1f * i).RotatedByRandom(0.06f) * (1 - (Math.Abs(i) - 1) * 0.3f), type, (int)(damage * 0.5f), knockback / 3, player.whoAmI, 1f, 0f);
}
}
for (int i = 0; i < 2; ++i)
{
Projectile tooth = Projectile.NewProjectileDirect(source, position, velocity.RotatedBy(0.1f * (i + 1)).RotatedByRandom(0.06f) * (1 - i * 0.3f), type, (int)(damage * 0.5f), knockback / 3, player.whoAmI, 1f, 0f);
}
Projectile strongTooth = Projectile.NewProjectileDirect(source, position, velocity * 1.2f, type, (int)(damage), knockback, player.whoAmI, 2f, 0f);
strongTooth.penetrate = -1;
strongTooth.timeLeft = 150;
return false;
}
@@ -81,20 +82,16 @@ namespace CalamityMod.Items.Weapons.Melee
int teethDamage = player.CalcIntDamage<MeleeDamageClass>((int)(Item.damage * 0.1f));
float teethKnockback = Item.knockBack * 0.2f;
bool evenNumberOfProjectiles = TotalTeeth % 2 == 0;
float amountToAdd = evenNumberOfProjectiles ? 0.5f : 0f;
int centralProjectile = TotalTeeth / 2;
int otherCentralProjectile = centralProjectile - 1;
float teethXVelocityReduction = 0.9f;
float minVelocityAdjustment = 0.8f;
float maxVelocityAdjustment = 1f;
float velocityAdjustment = minVelocityAdjustment;
for (int i = 0; i < TotalRows; i++)
{
bool topTeeth = i == 0;
for (int j = 0; j < TotalTeeth; j++)
{
velocityAdjustment = ((j == centralProjectile || j == otherCentralProjectile) && evenNumberOfProjectiles) ? minVelocityAdjustment : MathHelper.Lerp(minVelocityAdjustment, maxVelocityAdjustment, Math.Abs((j + amountToAdd) - centralProjectile) / (float)centralProjectile);
float velocityAdjustment = j == centralProjectile ? minVelocityAdjustment : MathHelper.Lerp(minVelocityAdjustment, maxVelocityAdjustment, Math.Abs(j + 0.5f - centralProjectile) / (float)centralProjectile);
if (topTeeth)
{
position.X += MathHelper.Lerp(-HalvedTeethSpread * 0.3f, HalvedTeethSpread * 0.3f, j / (float)(TotalTeeth - 1));
@@ -131,22 +128,18 @@ namespace CalamityMod.Items.Weapons.Melee
Vector2 secondVelocity = (destination - secondPosition).SafeNormalize(Vector2.UnitY) * ShootSpeed;
Vector2 secondCachedVelocity = secondVelocity;
int teethDamage = player.CalcIntDamage<MeleeDamageClass>((int)(Item.damage * 0.5));
int teethDamage = player.CalcIntDamage<MeleeDamageClass>((int)(Item.damage * 0.1f));
float teethKnockback = Item.knockBack * 0.2f;
bool evenNumberOfProjectiles = TotalTeeth % 2 == 0;
float amountToAdd = evenNumberOfProjectiles ? 0.5f : 0f;
int centralProjectile = TotalTeeth / 2;
int otherCentralProjectile = centralProjectile - 1;
float teethXVelocityReduction = 0.9f;
float minVelocityAdjustment = 0.8f;
float maxVelocityAdjustment = 1f;
float velocityAdjustment = minVelocityAdjustment;
for (int i = 0; i < TotalRows; i++)
{
bool topTeeth = i == 0;
for (int j = 0; j < TotalTeeth; j++)
{
velocityAdjustment = ((j == centralProjectile || j == otherCentralProjectile) && evenNumberOfProjectiles) ? minVelocityAdjustment : MathHelper.Lerp(minVelocityAdjustment, maxVelocityAdjustment, Math.Abs((j + amountToAdd) - centralProjectile) / (float)centralProjectile);
float velocityAdjustment = j == centralProjectile ? minVelocityAdjustment : MathHelper.Lerp(minVelocityAdjustment, maxVelocityAdjustment, Math.Abs(j + 0.5f - centralProjectile) / (float)centralProjectile);
if (topTeeth)
{
position.X += MathHelper.Lerp(-HalvedTeethSpread, HalvedTeethSpread, j / (float)(TotalTeeth - 1));
@@ -173,7 +166,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Vector2 dustVel = Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.9f, 1.5f);
if (Main.rand.NextBool(3))
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 102, dustVel.X, dustVel.Y);
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.Water_Desert, dustVel.X, dustVel.Y);
}
}
}
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 64;
Item.height = 64;
Item.damage = 135;
Item.damage = 85;
Item.DamageType = DamageClass.Melee;
Item.noMelee = true;
Item.useTurn = true;
+1 -1
View File
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 124;
Item.height = 124;
Item.damage = 795;
Item.damage = 760;
Item.DamageType = TrueMeleeDamageClass.Instance;
Item.useAnimation = Item.useTime = 71;
Item.useTurn = true;
+3 -13
View File
@@ -1,17 +1,8 @@
using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework;
using CalamityMod.Items.BaseItems;
using CalamityMod.Projectiles.Melee;
using Terraria;
using Terraria.ID;
using CalamityMod.Items.BaseItems;
using Terraria.ModLoader;
using CalamityMod.Projectiles.BaseProjectiles;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using CalamityMod.Balancing;
using Terraria.Audio;
using CalamityMod.Projectiles.Melee;
using System;
using CalamityMod.Particles;
namespace CalamityMod.Items.Weapons.Melee
{
@@ -20,10 +11,9 @@ namespace CalamityMod.Items.Weapons.Melee
public new string LocalizationCategory => "Items.Weapons.Melee";
public override void SetDefaults()
{
base.SetDefaults();
Item.width = 26;
Item.height = 20;
Item.damage = 111;
Item.damage = 75;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = Item.useTime = 25;
Item.knockBack = 0.25f;
+1 -1
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 16;
Item.height = 16;
Item.damage = 60;
Item.damage = 85;
Item.rare = ItemRarityID.Lime;
Item.noMelee = true;
Item.noUseGraphic = true;
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee
Item.width = 28;
Item.height = 38;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.damage = 55;
Item.damage = 50;
Item.knockBack = 4f;
Item.useTime = 22;
Item.useAnimation = 22;
+1 -1
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 66;
Item.height = 66;
Item.damage = 210;
Item.damage = 150;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.autoReuse = true;
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee
Item.width = 30;
Item.height = 36;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.damage = 52;
Item.damage = 54;
Item.knockBack = 3.5f;
Item.useTime = 22;
Item.useAnimation = 22;
+2 -3
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee
public float Charge = 0f;
public static float chargeDamageMultiplier = 1.25f; //Extra damage from charge
public static float beamDamageMultiplier = 1f; //Damage multiplier for the charged shots (remember it applies ontop of the charge damage multiplied
public static float glassStarDamageMultiplier = 0.6f; //Damage multiplier for the glass stars it shoots (Shoots 3x glass stars when not charged, shoots 2x glass stars + one beam when charged)
public static float glassStarDamageMultiplier = 1f; //Damage multiplier for the glass stars it shoots (Shoots 3x glass stars when not charged, shoots 2x glass stars + one beam when charged)
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
Item.width = Item.height = 72;
Item.damage = 194;
Item.damage = 130;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.noUseGraphic = true;
Item.noMelee = true;
@@ -103,7 +103,6 @@ namespace CalamityMod.Items.Weapons.Melee
Projectile.NewProjectile(source, player.Center - Shift, velocity.RotatedBy(-MathHelper.PiOver4 * 0.3f), ProjectileType<AncientStar>(), (int)(damage * glassStarDamageMultiplier), knockback, player.whoAmI, Charge > 0 ? 1 : 0);
}
Charge--;
if (Charge < 0)
Charge = 0;
+1 -1
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 16;
Item.height = 16;
Item.damage = 62;
Item.damage = 60;
Item.DamageType = DamageClass.Melee;
Item.useTime = 30;
Item.useAnimation = 30;
+5 -15
View File
@@ -29,14 +29,11 @@ namespace CalamityMod.Items.Weapons.Ranged
{
Item.width = 70;
Item.height = 18;
Item.damage = 46;
Item.damage = 39;
Item.DamageType = DamageClass.Ranged;
Item.width = 70;
Item.height = 18;
Item.scale = 0.85f;
Item.useTime = 30;
Item.useTime = Item.useAnimation = 33;
Item.reuseDelay = 10;
Item.useAnimation = 30;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 2f;
@@ -53,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void UpdateInventory(Player player)
{
//ITS MY REWORK SO I CAN PUT A REFERENCE: Shotgun full of hate, returns Animosity otherwise
//ITS MY REWORK SO I CAN PUT A REFERENCE: Shotgun Full of Hate, returns Animosity otherwise
if (Main.zenithWorld)
Item.SetNameOverride(this.GetLocalizedValue("GFBName"));
}
@@ -65,15 +62,8 @@ namespace CalamityMod.Items.Weapons.Ranged
//Distortion wind do whisper one truth...
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-5, 0);
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override Vector2? HoldoutOffset() => new Vector2(-5, 0);
public override bool AltFunctionUse(Player player) => true;
public override float UseSpeedMultiplier(Player player)
{
Loaded 100 of 402 files, more files were not shown because too many files have changed in this diff. Show more