Merge branch '1.4' into sulph-sea-gen
This commit is contained in:
commit
a5066cb6ef
46 files changed
+137
-97
No files matched your search
@@ -56,7 +56,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.BeeKeeper, Do(UseTurn, ScaleRatio(1.5f), DamageExact(60)) },
|
||||
{ ItemID.BeesKnees, Do(PointBlank, DamageExact(18), UseExact(38)) },
|
||||
{ ItemID.BladedGlove, Do(DamageExact(15), UseExact(7)) },
|
||||
{ ItemID.BladeofGrass, Do(AutoReuse, UseTurn, ScaleRatio(1.8f), DamageExact(45), UseExact(33)) },
|
||||
{ ItemID.BladeofGrass, Do(AutoReuse, UseTurn, ScaleRatio(1.8f), DamageExact(35)) },
|
||||
{ ItemID.Bladetongue, Do(UseTurn, UseRatio(0.8f), DamageExact(120), ScaleRatio(1.75f)) },
|
||||
{ ItemID.BlizzardStaff, Do(DamageExact(41), ManaExact(7)) },
|
||||
{ ItemID.BloodButcherer, Do(AutoReuse, UseTurn, DamageRatio(1.66f), ScaleRatio(1.4f)) },
|
||||
@@ -188,7 +188,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.Excalibur, Do(UseTurn, ScaleRatio(1.5f), UseRatio(0.8f), DamageExact(125), UseAnimationExact(45)) },
|
||||
{ ItemID.FairyQueenMagicItem, Do(DamageExact(54)) },
|
||||
{ ItemID.FalconBlade, Do(UseTurn, ScaleRatio(1.5f), DamageExact(35), UseExact(15)) },
|
||||
{ ItemID.FieryGreatsword, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(90), UseExact(45)) },
|
||||
{ ItemID.FieryGreatsword, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(72), UseExact(45)) },
|
||||
{ ItemID.FireWhip, autoReuse },
|
||||
// Unsure what to do with Celebration. Should it be treated as a serious weapon or not? Currently not changing it from vanilla.
|
||||
// { ItemID.FireworksLauncher, Do(DamageRatio(2f)) }, // Celebration
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
Item.width = 43;
|
||||
Item.height = 24;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.damage = 43;
|
||||
Item.damage = 50;
|
||||
Item.knockBack = 1f;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
Item.height = 22;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 6;
|
||||
Item.damage = 110;
|
||||
Item.damage = 150;
|
||||
Item.knockBack = 11f;
|
||||
Item.useTime = Item.useAnimation = 20;
|
||||
Item.autoReuse = true;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
Item.width = 40;
|
||||
Item.height = 22;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.damage = 84;
|
||||
Item.damage = 100;
|
||||
Item.knockBack = 11f;
|
||||
Item.useTime = Item.useAnimation = 33;
|
||||
Item.autoReuse = true;
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
Item.rare = ModContent.RarityType<DarkOrange>();
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<UnstableMatter>();
|
||||
Item.shootSpeed = 7f;
|
||||
Item.shootSpeed = 12f;
|
||||
|
||||
modItem.UsesCharge = true;
|
||||
modItem.MaxCharge = 85f;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
Item.height = 26;
|
||||
Item.DamageType = DamageClass.Summon;
|
||||
Item.sentry = true;
|
||||
Item.damage = 100;
|
||||
Item.damage = 150;
|
||||
Item.knockBack = 0f;
|
||||
Item.mana = 10;
|
||||
Item.useTime = Item.useAnimation = 24;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.shootSpeed = 10f;
|
||||
Item.damage = 36;
|
||||
Item.damage = 65;
|
||||
Item.mana = 12;
|
||||
Item.width = 38;
|
||||
Item.height = 24;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 17;
|
||||
Item.damage = 28;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 9;
|
||||
Item.width = 42;
|
||||
@@ -41,10 +41,30 @@ 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)
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
float angle = MathHelper.Lerp(-0.145f, 0.145f, 1f / 3f);
|
||||
int acid1 = Projectile.NewProjectile(source, position, velocity.RotatedBy(angle), type, damage, knockback, player.whoAmI);
|
||||
|
||||
angle = MathHelper.Lerp(-0.145f, 0.145f, 2f / 3f);
|
||||
int acid2 = Projectile.NewProjectile(source, position, velocity.RotatedBy(angle), type, damage, knockback, player.whoAmI);
|
||||
|
||||
angle = MathHelper.Lerp(-0.145f, 0.145f, 1f);
|
||||
int acid3 = Projectile.NewProjectile(source, position, velocity.RotatedBy(angle), type, damage, knockback, player.whoAmI);
|
||||
|
||||
// Keep track of the other 2 acid streams
|
||||
if (Main.projectile.IndexInRange(acid1))
|
||||
{
|
||||
float angle = MathHelper.Lerp(-0.145f, 0.145f, i / 3f);
|
||||
Projectile.NewProjectile(source, position, velocity.RotatedBy(angle), type, damage, knockback, player.whoAmI);
|
||||
Main.projectile[acid1].ai[0] = acid2;
|
||||
Main.projectile[acid1].ai[1] = acid3;
|
||||
}
|
||||
if (Main.projectile.IndexInRange(acid2))
|
||||
{
|
||||
Main.projectile[acid2].ai[0] = acid1;
|
||||
Main.projectile[acid2].ai[1] = acid3;
|
||||
}
|
||||
if (Main.projectile.IndexInRange(acid3))
|
||||
{
|
||||
Main.projectile[acid3].ai[0] = acid1;
|
||||
Main.projectile[acid3].ai[1] = acid2;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 38;
|
||||
Item.damage = 80;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 15;
|
||||
Item.width = 28;
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.UseSound = SoundID.Item8;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.ClothiersCurse;
|
||||
Item.shootSpeed = 6f;
|
||||
Item.shootSpeed = 9f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 140;
|
||||
Item.damage = 200;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 10;
|
||||
Item.width = 56;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 66;
|
||||
Item.damage = 80;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 13;
|
||||
Item.width = 28;
|
||||
|
||||
@@ -20,13 +20,13 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 33;
|
||||
Item.damage = 22;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 18;
|
||||
Item.width = 54;
|
||||
Item.height = 52;
|
||||
Item.useTime = 24;
|
||||
Item.useAnimation = 24;
|
||||
Item.useTime = 30;
|
||||
Item.useAnimation = 30;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 5;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 10;
|
||||
Item.damage = 14;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 20;
|
||||
Item.width = 28;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 49;
|
||||
Item.damage = 70;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 12;
|
||||
Item.width = 42;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 70;
|
||||
Item.damage = 75;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 15;
|
||||
Item.width = 16;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
Item.width = 16;
|
||||
Item.height = 16;
|
||||
Item.damage = 300;
|
||||
Item.damage = 380;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.channel = true;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public float Combo = 1f;
|
||||
public float Charge = 0f;
|
||||
public static float chargeDamageMultiplier = 1.75f; //Extra damage from charge
|
||||
public static float chargeDamageMultiplier = 1.5f; //Extra damage from charge
|
||||
public static float beamDamageMultiplier = 0.8f; //Damage multiplier for the charged shots (remember it applies ontop of the charge damage multiplied
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = Item.height = 60;
|
||||
Item.damage = 80;
|
||||
Item.damage = 70;
|
||||
Item.DamageType = DamageClass.MeleeNoSpeed;
|
||||
Item.noUseGraphic = true;
|
||||
Item.noMelee = true;
|
||||
|
||||
@@ -25,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Rapier;
|
||||
Item.DamageType = TrueMeleeDamageClass.Instance;
|
||||
Item.useAnimation = 10;
|
||||
Item.useTime = 10;
|
||||
Item.useAnimation = 8;
|
||||
Item.useTime = 8;
|
||||
Item.width = 44;
|
||||
Item.height = 44;
|
||||
Item.damage = 110;
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.noUseGraphic = true;
|
||||
Item.noMelee = true;
|
||||
Item.shoot = ModContent.ProjectileType<GalileoGladiusProj>();
|
||||
Item.shootSpeed = 2.4f;
|
||||
Item.shootSpeed = 0.9f;
|
||||
|
||||
Item.value = CalamityGlobalItem.Rarity13BuyPrice;
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public bool OnHitProc = false;
|
||||
|
||||
#region stats
|
||||
public static int BaseDamage = 400;
|
||||
public static int BaseDamage = 200;
|
||||
|
||||
public static int WhirlwindAttunement_BaseDamage = 140;
|
||||
public static int WhirlwindAttunement_LocalIFrames = 20; //Remember its got one extra update
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 56;
|
||||
Item.damage = 24;
|
||||
Item.damage = 45;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useAnimation = 24;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
@@ -27,6 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.autoReuse = true;
|
||||
Item.height = 66;
|
||||
Item.scale = 1.5f;
|
||||
Item.value = CalamityGlobalItem.Rarity2BuyPrice;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 2800;
|
||||
Item.damage = 1880;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 154;
|
||||
Item.height = 40;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 808;
|
||||
Item.damage = 770;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 48;
|
||||
Item.height = 96;
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using static CalamityMod.CalamityUtils;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -23,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public static readonly SoundStyle BlingHitSound = new("CalamityMod/Sounds/Custom/UltrablingHit") { PitchVariance = 0.5f };
|
||||
|
||||
public static float MaxDownwardsAngle4Coin = MathHelper.PiOver4;
|
||||
public static float RicochetDamageMult = 2f;
|
||||
public static float RicochetDamageMult = 2.5f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -56,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
public override void HoldItem(Player player) => player.Calamity().mouseWorldListener = true;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.altFunctionUse == 2 ? false : true;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.altFunctionUse != 2;
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
|
||||
@@ -23,8 +23,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 66;
|
||||
Item.height = 24;
|
||||
Item.useTime = 23;
|
||||
Item.useAnimation = 23;
|
||||
Item.useTime = 30;
|
||||
Item.useAnimation = 30;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4.5f;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 50;
|
||||
Item.damage = 60;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 88;
|
||||
Item.height = 28;
|
||||
@@ -33,16 +33,13 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.UseSound = SoundID.Item109;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ModContent.ProjectileType<ToxicannonShot>();
|
||||
Item.shootSpeed = 9f;
|
||||
Item.shootSpeed = 16f;
|
||||
}
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
float angle = velocity.ToRotation() + MathHelper.PiOver2;
|
||||
if (angle <= -MathHelper.PiOver4 || angle >= MathHelper.PiOver4)
|
||||
return false;
|
||||
angle -= MathHelper.PiOver2;
|
||||
|
||||
|
||||
|
||||
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<ToxicannonShot>(), damage, knockback, player.whoAmI);
|
||||
return false;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 5;
|
||||
Item.damage = 15;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 20;
|
||||
Item.height = 54;
|
||||
|
||||
@@ -22,8 +22,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 46;
|
||||
Item.height = 22;
|
||||
Item.useTime = 16;
|
||||
Item.useAnimation = 16;
|
||||
Item.useTime = 21;
|
||||
Item.useAnimation = 21;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 3.25f;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 7;
|
||||
Item.damage = 16;
|
||||
Item.mana = 10;
|
||||
Item.width = 58;
|
||||
Item.height = 64;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 7;
|
||||
Item.damage = 16;
|
||||
Item.mana = 10;
|
||||
Item.width = 58;
|
||||
Item.height = 58;
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 444;
|
||||
Item.damage = 100;
|
||||
Item.mana = 10;
|
||||
Item.width = Item.height = 56;
|
||||
Item.useTime = Item.useAnimation = 10; // 9 because of useStyle 1
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 65;
|
||||
Item.damage = 55;
|
||||
Item.mana = 10;
|
||||
Item.width = 46;
|
||||
Item.height = 46;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 250;
|
||||
Item.damage = 200;
|
||||
Item.mana = 10;
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 61;
|
||||
Item.damage = 50;
|
||||
Item.mana = 10;
|
||||
Item.width = 52;
|
||||
Item.height = 60;
|
||||
|
||||
@@ -817,7 +817,7 @@ namespace CalamityMod.NPCs
|
||||
// Cursed Inferno
|
||||
if (npc.onFire2)
|
||||
{
|
||||
int baseCursedInfernoDoTValue = (int)((npc.oiled ? 62 : 12) * vanillaHeatDamageMult);
|
||||
int baseCursedInfernoDoTValue = (int)((npc.oiled ? 98 : 48) * vanillaHeatDamageMult);
|
||||
npc.lifeRegen -= baseCursedInfernoDoTValue;
|
||||
if (damage < baseCursedInfernoDoTValue / 4)
|
||||
damage = baseCursedInfernoDoTValue / 4;
|
||||
@@ -983,7 +983,7 @@ namespace CalamityMod.NPCs
|
||||
// Venom
|
||||
if (npc.venom)
|
||||
{
|
||||
int baseVenomDoTValue = (int)(12 * vanillaSicknessDamageMult);
|
||||
int baseVenomDoTValue = (int)(60 * vanillaSicknessDamageMult);
|
||||
npc.lifeRegen -= baseVenomDoTValue;
|
||||
if (damage < baseVenomDoTValue / 4)
|
||||
damage = baseVenomDoTValue / 4;
|
||||
@@ -992,7 +992,7 @@ namespace CalamityMod.NPCs
|
||||
// Electrified
|
||||
if (electrified > 0)
|
||||
{
|
||||
int baseElectrifiedDoTValue = (int)((CalamityPlayer.areThereAnyDamnBosses ? 5 : 10) * (npc.velocity.X == 0 ? 1 : 4) * electricityDamageMult);
|
||||
int baseElectrifiedDoTValue = (int)(5 * (npc.velocity.X == 0 ? 1 : 4) * electricityDamageMult);
|
||||
ApplyDPSDebuff(baseElectrifiedDoTValue, baseElectrifiedDoTValue / 5, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -81,11 +81,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
Projectile.position = Projectile.Center;
|
||||
Projectile.width = Projectile.height = height;
|
||||
Projectile.Center = Projectile.position;
|
||||
Projectile.maxPenetrate = -1;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 10;
|
||||
Projectile.Damage();
|
||||
Projectile.damage = 0;
|
||||
|
||||
LaserBurst(2.4f, 4.2f); // 60 dusts
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -27,8 +28,8 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Projectile.ai[1]++;
|
||||
if (Projectile.ai[1] >= 4f)
|
||||
Projectile.localAI[1]++;
|
||||
if (Projectile.localAI[1] >= 4f)
|
||||
{
|
||||
Projectile.tileCollide = true;
|
||||
}
|
||||
@@ -37,12 +38,12 @@ namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
Projectile.Kill();
|
||||
}
|
||||
if (Projectile.ai[0] <= 3f)
|
||||
if (Projectile.localAI[0] <= 3f)
|
||||
{
|
||||
Projectile.ai[0] += 1f;
|
||||
Projectile.localAI[0] += 1f;
|
||||
return;
|
||||
}
|
||||
Projectile.velocity.Y = Projectile.velocity.Y + 0.075f;
|
||||
Projectile.velocity.Y += 0.075f;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Vector2 positionDelta = Projectile.velocity / 3f * i;
|
||||
@@ -62,5 +63,37 @@ namespace CalamityMod.Projectiles.Magic
|
||||
Main.dust[dustIdx].velocity += Projectile.velocity * 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
// If any of the streams are destroyed, kill the accompanying acid streams
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
if (Projectile.penetrate > 1)
|
||||
return;
|
||||
|
||||
if (Main.projectile.IndexInRange((int)Projectile.ai[0]))
|
||||
{
|
||||
Projectile proj = Main.projectile[(int)Projectile.ai[0]];
|
||||
proj.ai[0] = -1f;
|
||||
proj.ai[1] = -1f;
|
||||
proj.Kill();
|
||||
}
|
||||
if (Main.projectile.IndexInRange((int)Projectile.ai[1]))
|
||||
{
|
||||
Projectile proj = Main.projectile[(int)Projectile.ai[1]];
|
||||
proj.ai[0] = -1f;
|
||||
proj.ai[1] = -1f;
|
||||
proj.Kill();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
}
|
||||
|
||||
CalamityUtils.HomeInOnNPC(Projectile, true, 250f, 12f, 20f);
|
||||
CalamityUtils.HomeInOnNPC(Projectile, true, 375f, 12f, 20f);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
|
||||
@@ -26,8 +26,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.timeLeft = 60;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 30;
|
||||
Projectile.usesIDStaticNPCImmunity = true;
|
||||
Projectile.idStaticNPCHitCooldown = 30;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
if (Projectile.frame == 8)
|
||||
{
|
||||
SoundEngine.PlaySound(ThanatosHead.VentSound, Projectile.Top);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + Vector2.UnitY * 10f, Vector2.Zero, ModContent.ProjectileType<AtlasMunitionsAutocannon>(), 0, 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Top + Vector2.UnitY * 72f, Vector2.Zero, ModContent.ProjectileType<AtlasMunitionsDropPodUpper>(), 0, 0f, Projectile.owner);
|
||||
|
||||
@@ -30,8 +30,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.timeLeft *= 5;
|
||||
Projectile.minion = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.MaxUpdates = 3;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 10;
|
||||
Projectile.localNPCHitCooldown = Projectile.MaxUpdates * 10;
|
||||
Projectile.DamageType = DamageClass.Summon;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.DamageType = DamageClass.Summon;
|
||||
Projectile.minionSlots = 0f;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.penetrate = 3;
|
||||
Projectile.MaxUpdates = 3;
|
||||
Projectile.timeLeft = Projectile.MaxUpdates * Lifetime;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
|
||||
@@ -30,8 +30,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.timeLeft *= 5;
|
||||
Projectile.minion = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.MaxUpdates = 3;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 10;
|
||||
Projectile.localNPCHitCooldown = Projectile.MaxUpdates * 10;
|
||||
Projectile.DamageType = DamageClass.Summon;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.minion = true;
|
||||
Projectile.coldDamage = true;
|
||||
Projectile.DamageType = DamageClass.Summon;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 16;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -81,7 +83,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
}
|
||||
|
||||
Projectile.ChargingMinionAI(1200f, 1500f, 2200f, 150f, 0, 40f, 9f, 4f, new Vector2(0f, -60f), 40f, 9f, true, true);
|
||||
Projectile.ChargingMinionAI(1200f, 1500f, 2200f, 150f, 0, 12f, 9f, 4f, new Vector2(0f, -60f), 12f, 18f, true, true, 2);
|
||||
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2;
|
||||
}
|
||||
|
||||
@@ -133,6 +133,8 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.netSpam = 59;
|
||||
}
|
||||
|
||||
projectile.extraUpdates = head.extraUpdates;
|
||||
|
||||
MechwormHead headModProj = head.ModProjectile<MechwormHead>();
|
||||
if (headModProj.EndRiftGateUUID == -1)
|
||||
{
|
||||
|
||||
@@ -36,9 +36,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
internal ref float Time => ref Projectile.ai[1];
|
||||
internal ref float TotalWormSegments => ref Projectile.localAI[0];
|
||||
|
||||
private static bool Use_TML_0_11_7_7_Hacky_Netcode = false;
|
||||
|
||||
|
||||
// Helper functions because Mechworm does a lot of checking for either itself or its target being near the edge of the world.
|
||||
private static Vector2 WorldTopLeft(int tileDist = 15) => new Vector2(tileDist * 16f);
|
||||
private static Vector2 WorldBottomRight(int tileDist = 15) => new Vector2(Main.maxTilesX - tileDist, Main.maxTilesY - tileDist) * 16f;
|
||||
@@ -73,12 +70,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
#region Syncing
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
// TODO -- remove when TML updates to 0.11.7.8
|
||||
// TML 0.11.7.7 SPECIFIC FIX (because they were too slow to update): Write an extra UUID here.
|
||||
// This is necessary because NetMessage case 27 and MessageBuffer case 27 are out of order with each other.
|
||||
if (Use_TML_0_11_7_7_Hacky_Netcode)
|
||||
writer.Write((short)Projectile.projUUID);
|
||||
|
||||
byte enumByte = (byte)CurrentAttackState;
|
||||
writer.Write(enumByte);
|
||||
writer.Write(AttackStateTimer);
|
||||
@@ -88,6 +79,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
writer.Write(EndRiftGateUUID);
|
||||
writer.WriteVector2(TeleportStartingPoint);
|
||||
writer.WriteVector2(TeleportEndingPoint);
|
||||
writer.Write(Projectile.extraUpdates);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
@@ -100,12 +92,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
EndRiftGateUUID = reader.ReadInt32();
|
||||
TeleportStartingPoint = reader.ReadVector2();
|
||||
TeleportEndingPoint = reader.ReadVector2();
|
||||
|
||||
// TODO -- remove when TML updates to 0.11.7.8
|
||||
// TML 0.11.7.7 SPECIFIC FIX (because they were too slow to update): Read and dump an extra UUID here.
|
||||
// This is necessary because NetMessage case 27 and MessageBuffer case 27 are out of order with each other.
|
||||
if (Use_TML_0_11_7_7_Hacky_Netcode)
|
||||
_ = reader.ReadInt16();
|
||||
Projectile.extraUpdates = reader.ReadInt32();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -172,10 +159,10 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
|
||||
// Mechworm has an extremely generous default aggro range of 2200, but if it's already attacking, its bloodlust is insatiable.
|
||||
NPC potentialTarget = Projectile.Center.MinionHoming(AttackStateTimer > 0 ? 999999f : 2200f, owner);
|
||||
NPC potentialTarget = Projectile.Center.MinionHoming(AttackStateTimer > 0 ? 999999f : 2800f, owner);
|
||||
|
||||
// Teleport to the player if the worm is very far away from them.
|
||||
if (Projectile.Distance(owner.Center) > 2700f)
|
||||
if (Projectile.Distance(owner.Center) > 3850f)
|
||||
{
|
||||
Projectile.Center = owner.Center;
|
||||
// Reset the worm's velocity when it returns to the player so that it doesn't instantly yeet off somewhere.
|
||||
@@ -191,6 +178,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
else
|
||||
PortalAttackMovement(potentialTarget);
|
||||
UpdateAttackStates();
|
||||
Projectile.extraUpdates = 1;
|
||||
}
|
||||
// Attacking movement can be canceled, so if it was, run the passive movement instead.
|
||||
else
|
||||
@@ -215,6 +203,8 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
private void PlayerFollowMovement(Player owner)
|
||||
{
|
||||
Projectile.extraUpdates = 0;
|
||||
|
||||
// Reset the gate UUID from any previous teleports.
|
||||
if (EndRiftGateUUID != -1)
|
||||
{
|
||||
@@ -250,7 +240,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.velocity.Y -= 0.1f;
|
||||
|
||||
// The worm's max speed is more strictly capped for the first few seconds.
|
||||
float maxSpeed = Time < StartupLethargy ? 13f : 25f;
|
||||
float maxSpeed = Time < StartupLethargy ? 6.5f : 25f;
|
||||
if (Projectile.velocity.Length() > maxSpeed)
|
||||
Projectile.velocity = Vector2.Normalize(Projectile.velocity) * maxSpeed;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.timeLeft *= 5;
|
||||
Projectile.minion = true;
|
||||
Projectile.DamageType = DamageClass.Summon;
|
||||
Projectile.MaxUpdates = 2;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = Projectile.MaxUpdates * 15;
|
||||
}
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.ai[1] += 1f;
|
||||
if ((Projectile.ai[1] % 10f) == 0f)
|
||||
{
|
||||
int amount = Main.rand.Next(5, 8);
|
||||
int amount = Main.rand.Next(2, 4);
|
||||
for (int i = 0; i < amount; i++)
|
||||
{
|
||||
float velocityX = Main.rand.NextFloat(-10f, 10f);
|
||||
|
||||
Reference in new issue
Block a user