Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into flames
No files matched your search
@@ -1105,7 +1105,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (gladiatorSword && !target.IsAnEnemy(false) && target.life <= 0 && target.Calamity().gladiatorOnKill)
|
||||
if (gladiatorSword && target.IsAnEnemy(false) && target.life <= 0 && target.Calamity().gladiatorOnKill)
|
||||
{
|
||||
target.Calamity().gladiatorOnKill = false;
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), target.Center.X, target.Center.Y, target.velocity.X / 2, target.velocity.Y / 2, ModContent.ProjectileType<GladiatorHealOrb>(), 0, 0f);
|
||||
|
||||
@@ -789,7 +789,7 @@ namespace CalamityMod
|
||||
ProjectileType<ApotheosisWorm>(),
|
||||
ProjectileType<SpiritCongregation>(),
|
||||
ProjectileType<RancorLaserbeam>(),
|
||||
ProjectileType<GrandStaffoftheNebulaMage_Held>(),
|
||||
ProjectileType<NebulousCataclysm_Held>(),
|
||||
|
||||
ProjectileType<FlakKrakenProj>(),
|
||||
ProjectileType<InfernadoFriendly>(),
|
||||
|
||||
@@ -185,6 +185,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.RainbowRod, Do(DamageExact(35), ManaExact(15)) },
|
||||
{ ItemID.Rally, Do(AutoReuse, DamageExact(18)) },
|
||||
{ ItemID.RainbowGun, Do(DamageExact(60), ManaExact(40)) },
|
||||
{ ItemID.RavenStaff, Do(AutoReuse, UseExact(20), DamageExact(36)) },
|
||||
{ ItemID.Razorpine, Do(DamageExact(40)) },
|
||||
{ ItemID.RedPhaseblade, Do(AutoReuse, UseTurn, DamageExact(32)) },
|
||||
{ ItemID.RedPhasesaber, Do(ScaleRatio(1.5f), DamageExact(60)) },
|
||||
@@ -479,7 +480,6 @@ namespace CalamityMod.Items
|
||||
{ ItemID.QueenSpiderStaff, Do(UseExact(25)) },
|
||||
{ ItemID.RainbowCrystalStaff, Do(UseExact(15)) },
|
||||
{ ItemID.RainbowWhip, autoReuse }, // Kaleidoscope
|
||||
{ ItemID.RavenStaff, Do(AutoReuse, UseExact(20)) },
|
||||
{ ItemID.SanguineStaff, Do(AutoReuse, UseExact(25)) },
|
||||
{ ItemID.ScytheWhip, autoReuse }, // Dark Harvest
|
||||
{ ItemID.SlimeStaff, Do(AutoReuse, UseExact(30)) },
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Placeables.DraedonStructures
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 32;
|
||||
Item.height = 26;
|
||||
Item.height = 28;
|
||||
Item.maxStack = 9999;
|
||||
Item.useTurn = true;
|
||||
Item.autoReuse = true;
|
||||
|
||||
|
Before Width: | Height: | Size: 534 B After Width: | Height: | Size: 543 B |
@@ -30,14 +30,14 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
Item.width = 43;
|
||||
Item.height = 24;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.damage = 50;
|
||||
Item.damage = 43;
|
||||
Item.knockBack = 1f;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.noUseGraphic = true;
|
||||
Item.autoReuse = false;
|
||||
Item.channel = true;
|
||||
Item.mana = 6;
|
||||
Item.mana = 4;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.UseSound = FireSound;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 70;
|
||||
Item.damage = 82;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 12;
|
||||
Item.width = 28;
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
bool devourer = DownedBossSystem.downedDoG;
|
||||
float damageMult = 1f + (devourer ? (418f / 70f - 1f) : 0f);
|
||||
float damageMult = 1f + (devourer ? (430f / 82f - 1f) : 0f);
|
||||
damage *= damageMult;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
public new string LocalizationCategory => "Items.Weapons.Magic";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 80;
|
||||
Item.damage = 76;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 4;
|
||||
Item.width = 42;
|
||||
|
||||
@@ -9,7 +9,8 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class GrandStaffoftheNebulaMage : ModItem, ILocalizedModType
|
||||
[LegacyName("GrandStaffoftheNebulaMage")]
|
||||
public class NebulousCataclysm : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Magic";
|
||||
public override void SetDefaults()
|
||||
@@ -30,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.value = CalamityGlobalItem.Rarity14BuyPrice;
|
||||
Item.rare = ModContent.RarityType<DarkBlue>();
|
||||
Item.Calamity().donorItem = true;
|
||||
Item.shoot = ModContent.ProjectileType<GrandStaffoftheNebulaMage_Held>();
|
||||
Item.shoot = ModContent.ProjectileType<NebulousCataclysm_Held>();
|
||||
Item.shootSpeed = 3f;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
@@ -17,9 +17,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 175;
|
||||
Item.damage = 182;
|
||||
Item.knockBack = 4f;
|
||||
Item.useAnimation = Item.useTime = 21;
|
||||
Item.useAnimation = Item.useTime = 20;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useTurn = true;
|
||||
Item.autoReuse = true;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 102;
|
||||
Item.damage = 112;
|
||||
Item.damage = 124;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useAnimation = 18;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
#region stats
|
||||
public static int BaseDamage = 800;
|
||||
|
||||
public static int PhoenixAttunement_BaseDamage = 1050;
|
||||
public static int PhoenixAttunement_BaseDamage = 1200;
|
||||
public static int PhoenixAttunement_LocalIFrames = 30; //Remember its got one extra update
|
||||
public static float PhoenixAttunement_BoltDamageReduction = 0.5f;
|
||||
public static float PhoenixAttunement_BoltThrowDamageMultiplier = 1f;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 80;
|
||||
Item.damage = 120;
|
||||
Item.knockBack = 4.5f;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useAnimation = Item.useTime = 14;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public new string LocalizationCategory => "Items.Weapons.Melee";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 84;
|
||||
Item.damage = 102;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.width = 16;
|
||||
Item.height = 16;
|
||||
|
||||
@@ -368,11 +368,6 @@ GloriousEnd: {
|
||||
'''
|
||||
}
|
||||
|
||||
GrandStaffoftheNebulaMage: {
|
||||
DisplayName: Grand Staff of the Nebula Mage
|
||||
Tooltip: "'The true power of the Nebula Mage rests in your hands...'"
|
||||
}
|
||||
|
||||
GruesomeEminence: {
|
||||
DisplayName: Gruesome Eminence
|
||||
Tooltip:
|
||||
@@ -530,6 +525,11 @@ NanoPurge: {
|
||||
Tooltip: Fires a barrage of nano lasers
|
||||
}
|
||||
|
||||
NebulousCataclysm: {
|
||||
DisplayName: Nebulous Cataclysm
|
||||
Tooltip: "'The true power of the Nebula Mage rests in your hands...'"
|
||||
}
|
||||
|
||||
NightsRay: {
|
||||
DisplayName: Night's Ray
|
||||
Tooltip:
|
||||
|
||||
@@ -52,8 +52,8 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
Vector2 etherealLanceDistance = new Vector2(0f, -450f);
|
||||
Vector2 sunDanceDistance = new Vector2(-80f, -500f);
|
||||
|
||||
float acceleration = death ? 0.7f : 0.6f;
|
||||
float velocity = death ? 18f : 15f;
|
||||
float acceleration = death ? 0.55f : 0.48f;
|
||||
float velocity = death ? 14f : 12f;
|
||||
float movementDistanceGateValue = 40f;
|
||||
float despawnDistanceGateValue = 6400f;
|
||||
|
||||
@@ -406,7 +406,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
}
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
extraPhaseTime = (dayTimeEnrage ? 36f : 45f) + 30f * lessTimeSpentPerPhaseMultiplier;
|
||||
extraPhaseTime = (dayTimeEnrage ? 36f : 72f) + 30f * lessTimeSpentPerPhaseMultiplier;
|
||||
if (npc.ai[1] >= 60f + extraPhaseTime)
|
||||
{
|
||||
npc.ai[0] = 1f;
|
||||
@@ -533,7 +533,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
}
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
extraPhaseTime = (dayTimeEnrage ? 24f : 30f) + 20f * lessTimeSpentPerPhaseMultiplier;
|
||||
extraPhaseTime = (dayTimeEnrage ? 24f : 48f) + 20f * lessTimeSpentPerPhaseMultiplier;
|
||||
if (npc.ai[1] >= 100f + extraPhaseTime)
|
||||
{
|
||||
npc.ai[0] = 1f;
|
||||
@@ -604,7 +604,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
}
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
extraPhaseTime = (dayTimeEnrage ? 36f : 45f) + 30f * lessTimeSpentPerPhaseMultiplier;
|
||||
extraPhaseTime = (dayTimeEnrage ? 36f : 72f) + 30f * lessTimeSpentPerPhaseMultiplier;
|
||||
if (npc.ai[1] >= 72f + extraPhaseTime)
|
||||
{
|
||||
npc.ai[0] = 1f;
|
||||
@@ -654,7 +654,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
}
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
extraPhaseTime = 110f + 30f * lessTimeSpentPerPhaseMultiplier; // 112.5 is too little
|
||||
extraPhaseTime = (dayTimeEnrage ? 110f : 150f) + 30f * lessTimeSpentPerPhaseMultiplier; // 112.5 is too little
|
||||
if (npc.ai[1] >= totalSunDancePhaseTime + extraPhaseTime)
|
||||
{
|
||||
npc.ai[0] = 1f;
|
||||
@@ -784,7 +784,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
}
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
extraPhaseTime = (dayTimeEnrage ? 24f : 30f) + 20f * lessTimeSpentPerPhaseMultiplier;
|
||||
extraPhaseTime = (dayTimeEnrage ? 24f : 48f) + 20f * lessTimeSpentPerPhaseMultiplier;
|
||||
if (npc.ai[1] >= lanceWallPhaseTime + extraPhaseTime)
|
||||
{
|
||||
npc.ai[0] = 1f;
|
||||
@@ -887,7 +887,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
}
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
extraPhaseTime = (dayTimeEnrage ? 48f : 60f) * lessTimeSpentPerPhaseMultiplier;
|
||||
extraPhaseTime = (dayTimeEnrage ? 48f : 96f) * lessTimeSpentPerPhaseMultiplier;
|
||||
if (npc.ai[1] >= 150f + extraPhaseTime)
|
||||
{
|
||||
npc.ai[0] = 1f;
|
||||
@@ -1021,7 +1021,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
}
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
extraPhaseTime = (dayTimeEnrage ? 24f : 30f) * lessTimeSpentPerPhaseMultiplier;
|
||||
extraPhaseTime = (dayTimeEnrage ? 24f : 48f) * lessTimeSpentPerPhaseMultiplier;
|
||||
if (npc.ai[1] >= 100f + extraPhaseTime)
|
||||
{
|
||||
npc.ai[0] = 1f;
|
||||
@@ -1085,7 +1085,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
}
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
extraPhaseTime = (dayTimeEnrage ? 36f : 45f) + 30f * lessTimeSpentPerPhaseMultiplier;
|
||||
extraPhaseTime = (dayTimeEnrage ? 36f : 72f) + 30f * lessTimeSpentPerPhaseMultiplier;
|
||||
if (npc.ai[1] >= 120f + extraPhaseTime)
|
||||
{
|
||||
npc.ai[0] = 1f;
|
||||
|
||||
@@ -188,6 +188,10 @@ namespace CalamityMod.Projectiles
|
||||
if (projectile.type == ProjectileID.FlyingImp)
|
||||
return ImpMinionAI.DoImpMinionAI(projectile);
|
||||
|
||||
// Raven Staff's minion changes.
|
||||
if (projectile.type == ProjectileID.Raven)
|
||||
return RavenMinionAI.DoRavenMinionAI(projectile);
|
||||
|
||||
//
|
||||
// SENTRY AI CHANGES:
|
||||
//
|
||||
@@ -2772,6 +2776,17 @@ namespace CalamityMod.Projectiles
|
||||
|
||||
public override bool PreDraw(Projectile projectile, ref Color lightColor)
|
||||
{
|
||||
#region Vanilla Summons Drawing Changes
|
||||
|
||||
//
|
||||
// MINION AI CHANGES:
|
||||
//
|
||||
|
||||
if (projectile.type == ProjectileID.Raven)
|
||||
return RavenMinionAI.DoRavenMinionDrawing(projectile, ref lightColor);
|
||||
|
||||
#endregion
|
||||
|
||||
// Chlorophyte Crystal AI rework.
|
||||
if (projectile.type == ProjectileID.CrystalLeaf)
|
||||
return ChlorophyteCrystalAI.DoChlorophyteCrystalDrawing(projectile);
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.extraUpdates = (Main.zenithWorld && devourer) ? 1 : 0;
|
||||
Projectile.usesIDStaticNPCImmunity = true;
|
||||
Projectile.idStaticNPCHitCooldown = (Main.zenithWorld && devourer) ? 2 : 12;
|
||||
Projectile.idStaticNPCHitCooldown = (Main.zenithWorld && devourer) ? 2 : 6;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
target.AddBuff(BuffID.Daybreak, 180);
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<FuckYou>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<FuckYou>(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].DamageType = DamageClass.Magic;
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class GrandStaffoftheNebulaMage_Held : ModProjectile
|
||||
public class NebulousCataclysm_Held : ModProjectile
|
||||
{
|
||||
public override LocalizedText DisplayName => CalamityUtils.GetItemName<GrandStaffoftheNebulaMage>();
|
||||
public override LocalizedText DisplayName => CalamityUtils.GetItemName<NebulousCataclysm>();
|
||||
private const int TotalXFrames = 2;
|
||||
private const int TotalYFrames = 8;
|
||||
private const int FrameTimer = 6;
|
||||
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
@@ -23,13 +23,13 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.friendly = true;
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.penetrate = 3;
|
||||
Projectile.penetrate = 5;
|
||||
Projectile.ignoreWater = true;
|
||||
AIType = ProjectileID.DeathSickle;
|
||||
Projectile.MaxUpdates = 2;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 20 * Projectile.MaxUpdates;
|
||||
Projectile.timeLeft = 180 * Projectile.MaxUpdates;
|
||||
Projectile.timeLeft = 210 * Projectile.MaxUpdates;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.OnFire, 180);
|
||||
target.AddBuff(BuffID.OnFire3, 180);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -20,7 +20,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 30;
|
||||
Projectile.extraUpdates = 1;
|
||||
Projectile.timeLeft = 75;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -34,7 +35,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
if (Projectile.timeLeft > 25)
|
||||
if (Projectile.timeLeft > 70)
|
||||
return false;
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -29,14 +29,14 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.MaxUpdates = 3;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 15 * Projectile.MaxUpdates;
|
||||
Projectile.timeLeft = 120 * Projectile.MaxUpdates;
|
||||
Projectile.timeLeft = 150 * Projectile.MaxUpdates;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, 0f, 0.5f, 0f);
|
||||
|
||||
CalamityUtils.HomeInOnNPC(Projectile, true, 300f, 10f, 10f);
|
||||
CalamityUtils.HomeInOnNPC(Projectile, true, 350f, 15f, 10f);
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.CursedInferno, 120);
|
||||
target.AddBuff(BuffID.CursedInferno, 180);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
public override Action<Projectile> EffectBeforeReelback => (proj) =>
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y, Projectile.velocity.X * 2.4f, Projectile.velocity.Y * 2.4f,
|
||||
ModContent.ProjectileType<TenebreusTidesWaterProjectile>(), (int)(Projectile.damage * 0.65), Projectile.knockBack * 0.85f, Projectile.owner, 0f, 0f);
|
||||
ModContent.ProjectileType<TenebreusTidesWaterProjectile>(), (int)(Projectile.damage * 0.75), Projectile.knockBack * 0.85f, Projectile.owner, 0f, 0f);
|
||||
};
|
||||
public override void ExtraBehavior()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -23,13 +23,13 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.friendly = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.penetrate = 3;
|
||||
Projectile.penetrate = 6;
|
||||
Projectile.ignoreWater = true;
|
||||
AIType = ProjectileID.DeathSickle;
|
||||
Projectile.MaxUpdates = 2;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 10 * Projectile.MaxUpdates;
|
||||
Projectile.timeLeft = 90 * Projectile.MaxUpdates;
|
||||
Projectile.timeLeft = 150 * Projectile.MaxUpdates;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.aiStyle = ProjAIStyleID.Beam;
|
||||
Projectile.friendly = true;
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.penetrate = 5;
|
||||
Projectile.timeLeft = 300;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.usesIDStaticNPCImmunity = true;
|
||||
@@ -93,14 +93,14 @@ namespace CalamityMod.Projectiles.Melee
|
||||
// Spawns a storm of water projectiles on-hit.
|
||||
public void SwordSpam(Vector2 targetPos)
|
||||
{
|
||||
int projAmt = 3;
|
||||
int projAmt = 2;
|
||||
var source = Projectile.GetSource_FromThis();
|
||||
for (int i = 0; i < projAmt; ++i)
|
||||
{
|
||||
int type = Main.rand.NextBool() ? ModContent.ProjectileType<TenebreusTidesWaterSword>() : ModContent.ProjectileType<TenebreusTidesWaterSpear>();
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
CalamityUtils.ProjectileBarrage(source, Projectile.Center, targetPos, Main.rand.NextBool(), 1000f, 1400f, 80f, 900f, Main.rand.NextFloat(25f, 35f), type, Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
CalamityUtils.ProjectileBarrage(source, Projectile.Center, targetPos, Main.rand.NextBool(), 1000f, 1400f, 80f, 900f, Main.rand.NextFloat(25f, 35f), type, (int)(Projectile.damage * 0.4f), Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public new string LocalizationCategory => "Projectiles.Melee";
|
||||
public override string Texture => "CalamityMod/Projectiles/Magic/UndinesRetributionSpear";
|
||||
|
||||
private int penetrationAmt = 4;
|
||||
private int penetrationAmt = 2;
|
||||
private bool dontDraw = false;
|
||||
private int drawInt = 0;
|
||||
|
||||
@@ -29,8 +29,9 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.penetrate = penetrationAmt;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.extraUpdates = 2;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 5;
|
||||
Projectile.localNPCHitCooldown = 5 * Projectile.MaxUpdates;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.ignoreWater = true;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public class TenebreusTidesWaterSword : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Melee";
|
||||
private int penetrationAmt = 4;
|
||||
private int penetrationAmt = 2;
|
||||
private bool dontDraw = false;
|
||||
private int drawInt = 0;
|
||||
|
||||
@@ -22,8 +22,9 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.penetrate = penetrationAmt;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.extraUpdates = 2;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 5;
|
||||
Projectile.localNPCHitCooldown = 5 * Projectile.MaxUpdates;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.ignoreWater = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -40,6 +40,12 @@ namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
Projectile.frame = 0;
|
||||
}
|
||||
|
||||
if (Projectile.timeLeft < 210) // making it not home right away so the projectiles get closer to the character first, to make it look more natural and overall better.
|
||||
{
|
||||
CalamityUtils.HomeInOnNPC(Projectile, true, 450f, 20f, 20f);
|
||||
}
|
||||
|
||||
float inertia = 50f * Projectile.ai[1]; //100
|
||||
float speed = 10f * Projectile.ai[1]; //5
|
||||
float num954 = 40f;
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
float num3 = -0.7853982f;
|
||||
Vector2 value = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
Vector2 value2 = Vector2.Zero;
|
||||
|
||||
if (player.dead)
|
||||
{
|
||||
Projectile.Kill();
|
||||
|
||||
@@ -186,7 +186,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
public void AdvancedAI(NPC potentialTarget, Player owner, MiniOffenseAIState aiState)
|
||||
{
|
||||
|
||||
bool buffedAi = owner.HasBuff<ProfanedCrystalWhipBuff>();
|
||||
|
||||
Vector2 targetDestination = potentialTarget.Center - Projectile.Center;
|
||||
@@ -384,7 +383,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
BaseAI(potentialTarget);
|
||||
break;
|
||||
default:
|
||||
if (potentialTarget != null)
|
||||
if (potentialTarget != null && !ForcedVanity)
|
||||
AdvancedAI(potentialTarget, owner, newAIState);
|
||||
else
|
||||
BaseAI(null);
|
||||
|
||||
@@ -10,10 +10,16 @@ namespace CalamityMod.Projectiles.VanillaProjectileOverrides
|
||||
{
|
||||
public static class HornetMinionAI
|
||||
{
|
||||
// Shorter range when the minion has no target yet: 40 tiles
|
||||
private const float MinEnemyDistanceDetection = 640f;
|
||||
|
||||
// Longer range when a target is already acquired: 75 tiles
|
||||
private const float MaxEnemyDistanceDetection = 1200f;
|
||||
|
||||
private static float EnemyDistanceDetection { get => Target is null ? MinEnemyDistanceDetection : MaxEnemyDistanceDetection; }
|
||||
|
||||
private const int FireRate = 40;
|
||||
private const float ProjectileVelocity = 20f;
|
||||
private static float EnemyDistanceDetection { get => (Target is null) ? Main.screenWidth / 2f : MaxEnemyDistanceDetection; }
|
||||
private static NPC Target { get; set; }
|
||||
|
||||
public static bool DoHornetMinionAI(Projectile proj)
|
||||
|
||||
@@ -7,10 +7,16 @@ namespace CalamityMod.Projectiles.VanillaProjectileOverrides
|
||||
{
|
||||
public static class ImpMinionAI
|
||||
{
|
||||
// Shorter range when the minion has no target yet: 40 tiles
|
||||
private const float MinEnemyDistanceDetection = 640f;
|
||||
|
||||
// Longer range when a target is already acquired: 75 tiles
|
||||
private const float MaxEnemyDistanceDetection = 1200f;
|
||||
|
||||
private static float EnemyDistanceDetection { get => Target is null ? MinEnemyDistanceDetection : MaxEnemyDistanceDetection; }
|
||||
|
||||
private const int FireRate = 75;
|
||||
private const float ProjectileVelocity = 20f;
|
||||
private static float EnemyDistanceDetection { get => (Target is null) ? Main.screenWidth / 2f : MaxEnemyDistanceDetection; }
|
||||
private static NPC Target { get; set; }
|
||||
|
||||
public static bool DoImpMinionAI(Projectile proj)
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.Projectiles.VanillaProjectileOverrides
|
||||
{
|
||||
public static class RavenMinionAI
|
||||
{
|
||||
// Shorter range when the minion has no target yet: 60 tiles
|
||||
// This is half of the width of a 1920x1080 screen.
|
||||
private const float MinEnemyDistanceDetection = 960f;
|
||||
|
||||
// Longer range when a target is already acquired: 150 tiles
|
||||
private const float MaxEnemyDistanceDetection = 2400f;
|
||||
|
||||
// The detection distance dynamically updates.
|
||||
// If the minion hasn't detected a target, the minion will check within screen more or less.
|
||||
// When the minion has detected a target, the minion will follow it as long as we set it to.
|
||||
private static float EnemyDistanceDetection { get => Target is null ? MinEnemyDistanceDetection : MaxEnemyDistanceDetection; }
|
||||
|
||||
private const float DashSpeed = 35f;
|
||||
private static SoundStyle CrowNoises = new("CalamityMod/Sounds/Custom/Crow", 3);
|
||||
private static NPC Target { get; set; }
|
||||
|
||||
public static bool DoRavenMinionAI(Projectile proj)
|
||||
{
|
||||
Player owner = Main.player[proj.owner];
|
||||
Target = owner.Center.MinionHoming(EnemyDistanceDetection, owner);
|
||||
|
||||
CheckMinionExistence(proj, owner);
|
||||
DoAnimation(proj);
|
||||
|
||||
proj.localNPCHitCooldown = 10;
|
||||
proj.friendly = true;
|
||||
proj.tileCollide = false;
|
||||
proj.ignoreWater = true;
|
||||
proj.usesLocalNPCImmunity = true;
|
||||
proj.usesIDStaticNPCImmunity = false;
|
||||
proj.rotation = MathHelper.ToRadians(proj.velocity.X);
|
||||
proj.MinionAntiClump(0.5f);
|
||||
|
||||
if (Target is not null)
|
||||
{
|
||||
Vector2 dashDirection = proj.SafeDirectionTo(Target.Center);
|
||||
|
||||
// If the minion is not withing dashing range, go towards it.
|
||||
// When the minion's inside the range, it'll just move forward
|
||||
// until it hits the outside bounds of the range, changing it's directions back.
|
||||
// Hence giving the effect of a dash.
|
||||
if (!proj.WithinRange(Target.Center, 240f))
|
||||
{
|
||||
float inertia = 5f;
|
||||
proj.velocity = (proj.velocity * inertia + dashDirection * DashSpeed) / (inertia + 1f);
|
||||
SyncVariables(proj);
|
||||
}
|
||||
|
||||
// But if there was the case where the minion was already inside the range,
|
||||
// if the velocity's not around the dash speed, make it dash.
|
||||
else if (proj.velocity.Length() < DashSpeed - 15f)
|
||||
{
|
||||
proj.velocity = dashDirection * (DashSpeed - 10f);
|
||||
SyncVariables(proj);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// The minion will hover around the owner.
|
||||
if (!proj.WithinRange(owner.Center, 320f))
|
||||
{
|
||||
proj.velocity = (proj.velocity + proj.SafeDirectionTo(owner.Center)) * 0.9f;
|
||||
SyncVariables(proj);
|
||||
}
|
||||
|
||||
// The minion will teleport on the owner if they get far enough.
|
||||
if (!proj.WithinRange(owner.Center, MaxEnemyDistanceDetection))
|
||||
{
|
||||
proj.Center = owner.Center;
|
||||
SyncVariables(proj);
|
||||
}
|
||||
|
||||
// So the minion doens't still weirdly still, move it.
|
||||
if (proj.velocity == Vector2.Zero)
|
||||
proj.velocity = Main.rand.NextVector2Circular(5f, 5f);
|
||||
}
|
||||
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
if (Main.rand.NextBool(6000))
|
||||
SoundEngine.PlaySound(CrowNoises, proj.Center);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool DoRavenMinionDrawing(Projectile proj, ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = TextureAssets.Projectile[proj.type].Value;
|
||||
Vector2 drawPosition = proj.Center - Main.screenPosition;
|
||||
Rectangle frame = texture.Frame(1, Main.projFrames[proj.type], 0, proj.frame);
|
||||
Vector2 origin = frame.Size() * 0.5f;
|
||||
SpriteEffects effects = MathF.Sign(-proj.velocity.X) == 1f ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
|
||||
|
||||
ProjectileID.Sets.TrailingMode[proj.type] = 2;
|
||||
ProjectileID.Sets.TrailCacheLength[proj.type] = 5;
|
||||
|
||||
if (Target is not null)
|
||||
CalamityUtils.DrawAfterimagesCentered(proj, 0, Color.MediumPurple with { A = 50 });
|
||||
|
||||
Main.EntitySpriteDraw(texture, drawPosition, frame, proj.GetAlpha(lightColor), proj.rotation, origin, proj.scale, effects);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#region AI Methods
|
||||
|
||||
private static void CheckMinionExistence(Projectile proj, Player owner)
|
||||
{
|
||||
owner.AddBuff(BuffID.Ravens, 2);
|
||||
if (proj.type != ProjectileID.Raven)
|
||||
return;
|
||||
|
||||
if (owner.dead)
|
||||
owner.raven = false;
|
||||
if (owner.raven)
|
||||
proj.timeLeft = 2;
|
||||
}
|
||||
|
||||
private static void DoAnimation(Projectile proj)
|
||||
{
|
||||
proj.frameCounter++;
|
||||
if (proj.frameCounter >= 5)
|
||||
{
|
||||
proj.frame = (proj.frame + 1) % Main.projFrames[proj.type];
|
||||
proj.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private static void SyncVariables(Projectile proj)
|
||||
{
|
||||
proj.netUpdate = true;
|
||||
if (proj.netSpam >= 10)
|
||||
proj.netSpam = 9;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |