Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into 1.4.4
This commit is contained in:
commit
bb7e835d28
32 files changed
+78
-140
No files matched your search
@@ -27,6 +27,7 @@ using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
@@ -609,6 +610,11 @@ namespace CalamityMod.Items
|
||||
#region Use Item Changes
|
||||
public override bool? UseItem(Item item, Player player)
|
||||
{
|
||||
if (Main.zenithWorld && item.type == ItemID.RodOfHarmony && NPC.AnyNPCs(ModContent.NPCType<THELORDE>()))
|
||||
{
|
||||
//one hour of NOU when using rod of harmony while LORDE is alive
|
||||
player.AddBuff(ModContent.BuffType<NOU>(), 3600 * 60);
|
||||
}
|
||||
if (player.Calamity().evilSmasherBoost > 0)
|
||||
{
|
||||
if (item.type != ModContent.ItemType<EvilSmasher>())
|
||||
|
||||
@@ -12,6 +12,9 @@ namespace CalamityMod.Items
|
||||
// ApplyTweaks(ref Item item) would be the one exposed function, which CalamityGlobalItem would call in SetDefaults.
|
||||
public partial class CalamityGlobalItem : GlobalItem
|
||||
{
|
||||
// 02AUG2023: Ozzatron: Having Overhaul enabled turns off all scaling changes, per direct request from Mirsario on 8/2/23.
|
||||
private static bool DisableScalingForOverhaul => CalamityMod.Instance.overhaul is not null;
|
||||
|
||||
#region Database and Initialization
|
||||
internal static SortedDictionary<int, IItemTweak[]> currentTweaks = null;
|
||||
|
||||
@@ -1015,6 +1018,8 @@ namespace CalamityMod.Items
|
||||
public bool AppliesTo(Item it) => IsScalable(it);
|
||||
public void ApplyTweak(Item it)
|
||||
{
|
||||
if (DisableScalingForOverhaul)
|
||||
return;
|
||||
it.scale += delta;
|
||||
if (it.scale < 0f)
|
||||
it.scale = 0f;
|
||||
@@ -1030,6 +1035,8 @@ namespace CalamityMod.Items
|
||||
public bool AppliesTo(Item it) => IsScalable(it);
|
||||
public void ApplyTweak(Item it)
|
||||
{
|
||||
if (DisableScalingForOverhaul)
|
||||
return;
|
||||
it.scale = newScale;
|
||||
if (it.scale < 0f)
|
||||
it.scale = 0f;
|
||||
@@ -1045,6 +1052,8 @@ namespace CalamityMod.Items
|
||||
public bool AppliesTo(Item it) => IsScalable(it);
|
||||
public void ApplyTweak(Item it)
|
||||
{
|
||||
if (DisableScalingForOverhaul)
|
||||
return;
|
||||
it.scale *= ratio;
|
||||
if (it.scale < 0f)
|
||||
it.scale = 0f;
|
||||
|
||||
@@ -1170,7 +1170,7 @@ OldDukeScales: {
|
||||
DisplayName: Old Duke's Scales
|
||||
Tooltip:
|
||||
'''
|
||||
15% increased damage reduction
|
||||
10% increased damage reduction
|
||||
10% increased max movement speed and acceleration
|
||||
25% increased dash velocity and length
|
||||
Gives you a stamina indicator on the cooldown rack
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
if (chosen == 6 || chosen == 9)
|
||||
return this.GetLocalization("Help.PreHardmode" + chosen).Format(worldEvil);
|
||||
|
||||
return this.GetLocalizedValue("Help.PreHardmdoe" + chosen);
|
||||
return this.GetLocalizedValue("Help.PreHardmode" + chosen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -114,10 +114,8 @@ namespace CalamityMod.Projectiles.Magic
|
||||
Projectile.StickyProjAI(15);
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(3, false);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(3);
|
||||
public override bool? CanDamage() => Projectile.ai[0] == 1f ? false : base.CanDamage();
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -85,10 +85,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(5, true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(5);
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -48,10 +48,8 @@ namespace CalamityMod.Projectiles.Magic
|
||||
Projectile.StickyProjAI(5);
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(3, false);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(3);
|
||||
public override bool? CanDamage() => Projectile.ai[0] == 1f ? false : base.CanDamage();
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
|
||||
@@ -47,10 +47,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.StickyProjAI(15);
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(6, true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(6);
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.alpha = 55;
|
||||
Projectile.penetrate = 3;
|
||||
Projectile.timeLeft = 300;
|
||||
Projectile.penetrate = 2;
|
||||
Projectile.timeLeft = 180;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 30;
|
||||
|
||||
@@ -62,10 +62,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(20, true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(20);
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
|
||||
@@ -33,10 +33,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.StickyProjAI(6);
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(6, false);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(6);
|
||||
public override bool? CanDamage() => Projectile.ai[0] == 1f ? false : base.CanDamage();
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -61,10 +61,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(8, true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(8);
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -66,10 +66,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
Projectile.StickyProjAI(5);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(4, true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(4);
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
|
||||
@@ -66,10 +66,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 180);
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(2, true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(2);
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -85,11 +85,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.StickyProjAI(10);
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
// Impale the enemy on contact ("sticky behavior").
|
||||
Projectile.ModifyHitNPCSticky(1, true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(1);
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
|
||||
// Apply sticky AI.
|
||||
Projectile.ModifyHitNPCSticky(3, true);
|
||||
Projectile.ModifyHitNPCSticky(3);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
|
||||
@@ -62,10 +62,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(3, true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(3);
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -77,10 +77,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(1, true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(1);
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -95,10 +95,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(10, true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(10);
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -54,10 +54,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.StickyProjAI(15);
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(6, false);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(6);
|
||||
public override bool? CanDamage() => Projectile.ai[0] == 1f ? false : base.CanDamage();
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
|
||||
@@ -48,10 +48,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.StickyProjAI(15);
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(6, false);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(6);
|
||||
public override bool? CanDamage() => Projectile.ai[0] == 1f ? false : base.CanDamage();
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Venom, 180);
|
||||
|
||||
|
||||
@@ -65,10 +65,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.StickyProjAI(15);
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(6, false);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(6);
|
||||
public override bool? CanDamage() => Projectile.ai[0] == 1f ? false : base.CanDamage();
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -36,10 +36,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.StickyProjAI(15);
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(8 , true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(8);
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -54,10 +54,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(3, false);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(3);
|
||||
public override bool? CanDamage() => Projectile.ai[0] == 1f ? false : base.CanDamage();
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(15, true);
|
||||
Projectile.ModifyHitNPCSticky(15);
|
||||
Projectile.velocity *= 0.5f;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public class SnapClamProj : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Rogue";
|
||||
public int clamCounter = 0;
|
||||
public bool openClam = true;
|
||||
public bool onEnemy = false;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -26,18 +23,17 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 10;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (openClam && !onEnemy)
|
||||
if (Projectile.ai[2] < 30f && Projectile.ai[0] != 1f)
|
||||
{
|
||||
++clamCounter;
|
||||
if (clamCounter >= 30)
|
||||
{
|
||||
openClam = false;
|
||||
Projectile.ai[2]++;
|
||||
if (Projectile.ai[2] >= 30f)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.8);
|
||||
}
|
||||
}
|
||||
if (Projectile.ai[0] == 0f)
|
||||
{
|
||||
@@ -48,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
//Sticky Behaviour
|
||||
Projectile.StickyProjAI(15);
|
||||
if (openClam && !onEnemy)
|
||||
if (Projectile.ai[2] < 30f && Projectile.ai[0] != 1f)
|
||||
{
|
||||
Projectile.frame = 1;
|
||||
}
|
||||
@@ -60,13 +56,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (openClam)
|
||||
{
|
||||
onEnemy = true;
|
||||
Projectile.ModifyHitNPCSticky(2, false);
|
||||
}
|
||||
if (Projectile.ai[2] < 30f)
|
||||
Projectile.ModifyHitNPCSticky(2);
|
||||
}
|
||||
|
||||
public override bool? CanDamage() => Projectile.ai[0] == 1f ? false : base.CanDamage();
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
if (targetHitbox.Width > 8 && targetHitbox.Height > 8)
|
||||
@@ -93,9 +88,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<SnapClamDebuff>(), 240);
|
||||
}
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<SnapClamDebuff>(), 240);
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public class SnapClamStealth : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Rogue";
|
||||
public int clamCounter = 0;
|
||||
public bool openClam = true;
|
||||
public bool onEnemy = false;
|
||||
|
||||
public override string Texture => "CalamityMod/Projectiles/Rogue/SnapClamProj";
|
||||
|
||||
@@ -28,20 +25,17 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.localNPCHitCooldown = 10;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 10;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (openClam && !onEnemy)
|
||||
if (Projectile.ai[2] < 30f && Projectile.ai[0] != 1f)
|
||||
{
|
||||
++clamCounter;
|
||||
if (clamCounter >= 30)
|
||||
{
|
||||
openClam = false;
|
||||
Projectile.ai[2]++;
|
||||
if (Projectile.ai[2] >= 30f)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.8);
|
||||
}
|
||||
}
|
||||
if (Projectile.ai[0] == 0f)
|
||||
{
|
||||
@@ -52,7 +46,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
//Sticky Behaviour
|
||||
Projectile.StickyProjAI(15);
|
||||
if (openClam && !onEnemy)
|
||||
if (Projectile.ai[2] < 30f && Projectile.ai[0] != 1f)
|
||||
{
|
||||
Projectile.frame = 1;
|
||||
}
|
||||
@@ -64,13 +58,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (openClam)
|
||||
{
|
||||
onEnemy = true;
|
||||
Projectile.ModifyHitNPCSticky(5, false);
|
||||
}
|
||||
if (Projectile.ai[2] < 30f)
|
||||
Projectile.ModifyHitNPCSticky(5);
|
||||
}
|
||||
|
||||
public override bool? CanDamage() => Projectile.ai[0] == 1f ? false : base.CanDamage();
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
if (targetHitbox.Width > 8 && targetHitbox.Height > 8)
|
||||
@@ -97,9 +90,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<SnapClamDebuff>(), 360);
|
||||
}
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<SnapClamDebuff>(), 360);
|
||||
}
|
||||
}
|
||||
@@ -55,10 +55,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.ModifyHitNPCSticky(5, true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(5);
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -12,8 +12,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Rogue";
|
||||
public override string Texture => "CalamityMod/Items/Weapons/Rogue/UrchinStinger";
|
||||
|
||||
private int projdmg = 0;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 10;
|
||||
@@ -48,7 +46,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Projectile.localAI[0] % 40 == 0 && Projectile.ai[0] == 1f)
|
||||
{
|
||||
Vector2 projspeed = new Vector2(Main.rand.NextFloat(-4f, 4f), Main.rand.NextFloat(-4f, 4f));
|
||||
int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, projspeed, ModContent.ProjectileType<SulphuricAcidBubbleFriendly>(), (int)(projdmg * 0.5f), 1f, Projectile.owner, 2f);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, projspeed, ModContent.ProjectileType<SulphuricAcidBubbleFriendly>(), (int)(Projectile.damage * 0.5f), 1f, Projectile.owner, 2f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
@@ -60,12 +58,11 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
projdmg = Projectile.damage;
|
||||
Projectile.ModifyHitNPCSticky(4, false);
|
||||
}
|
||||
Projectile.ModifyHitNPCSticky(4);
|
||||
}
|
||||
|
||||
public override bool? CanDamage() => Projectile.ai[0] == 1f ? false : base.CanDamage();
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
|
||||
@@ -45,6 +45,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(4, true);
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(4);
|
||||
}
|
||||
}
|
||||
@@ -458,8 +458,7 @@ namespace CalamityMod
|
||||
/// </summary>
|
||||
/// <param name="projectile">The projectile you're giving sticky behaviour to</param>
|
||||
/// <param name="maxStick">How many projectiles of this type can stick to one enemy</param>
|
||||
/// <param name="constantDamage">Decides if you want the projectile to deal damage while its sticked to enemies or not</param>
|
||||
public static void ModifyHitNPCSticky(this Projectile projectile, int maxStick, bool constantDamage)
|
||||
public static void ModifyHitNPCSticky(this Projectile projectile, int maxStick)
|
||||
{
|
||||
Player player = Main.player[projectile.owner];
|
||||
Rectangle myRect = projectile.Hitbox;
|
||||
@@ -510,10 +509,6 @@ namespace CalamityMod
|
||||
|
||||
projectile.netUpdate = true;
|
||||
|
||||
//Set projectile damage to 0 if desired
|
||||
if (!constantDamage)
|
||||
projectile.damage = 0;
|
||||
|
||||
//Count how many projectiles are attached, delete as necessary
|
||||
Point[] array2 = new Point[maxStick];
|
||||
int projCount = 0;
|
||||
|
||||
@@ -500,8 +500,8 @@ namespace CalamityMod.World
|
||||
int placementPositionX = WorldGen.genRand.Next((int)(Main.maxTilesX * 0.2f), (int)(Main.maxTilesX * 0.8f));
|
||||
int placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.2f), (int)(Main.maxTilesY * 0.85f));
|
||||
|
||||
// Gfb
|
||||
if (Main.getGoodWorld)
|
||||
// Gfb and Dont Dig up
|
||||
if (Main.remixWorld)
|
||||
{
|
||||
// Ensure that the shrine doesn't generate too close to the center of the world
|
||||
do
|
||||
@@ -539,11 +539,11 @@ namespace CalamityMod.World
|
||||
|
||||
}
|
||||
}
|
||||
if ((!canGenerateInLocation || realMushroomsInArea < requiredShrooms || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) && !Main.getGoodWorld)
|
||||
if ((!canGenerateInLocation || realMushroomsInArea < requiredShrooms || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) && !Main.remixWorld)
|
||||
{
|
||||
tries++;
|
||||
}
|
||||
else if (!canGenerateInLocation && Main.getGoodWorld) //GFB will not give a shit about mushrooms or the rectangle
|
||||
else if (!canGenerateInLocation && Main.remixWorld) //GFB nor dont dig up will not give a shit about mushrooms or the rectangle
|
||||
{
|
||||
tries++;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user