From 9704849acb26e1c6a5f87a826c9ba7115fa3d426 Mon Sep 17 00:00:00 2001 From: Niko Date: Fri, 14 Nov 2025 23:05:12 +0000 Subject: [PATCH] oops wrong branch --- .../AvalianInvasion/AvalianEliteCommando.cs | 119 ------------------ .../AvalianInvasion/AvalianRifleman.cs | 85 ------------- .../Enemies/AvalianInvasion/AvalianScout.cs | 62 --------- .../AvalianInvasion/AvalianTechnician.cs | 97 -------------- 4 files changed, 363 deletions(-) delete mode 100644 Content/NPCs/Enemies/AvalianInvasion/AvalianEliteCommando.cs delete mode 100644 Content/NPCs/Enemies/AvalianInvasion/AvalianRifleman.cs delete mode 100644 Content/NPCs/Enemies/AvalianInvasion/AvalianScout.cs delete mode 100644 Content/NPCs/Enemies/AvalianInvasion/AvalianTechnician.cs diff --git a/Content/NPCs/Enemies/AvalianInvasion/AvalianEliteCommando.cs b/Content/NPCs/Enemies/AvalianInvasion/AvalianEliteCommando.cs deleted file mode 100644 index 8fd480a..0000000 --- a/Content/NPCs/Enemies/AvalianInvasion/AvalianEliteCommando.cs +++ /dev/null @@ -1,119 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Microsoft.Xna.Framework; - -namespace ForgottenWawiTech.Content.NPCs.Enemies.AvalianInvasion -{ - public class AvalianEliteCommando : ModNPC - { - private int attackTimer = 0; - private int teleportTimer = 0; - - public override void SetStaticDefaults() - { - Main.npcFrameCount[Type] = 8; - NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(0) - { - Velocity = 1f - }; - NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, value); - } - - public override void SetDefaults() - { - NPC.width = 38; - NPC.height = 48; - NPC.damage = 70; - NPC.defense = 30; - NPC.lifeMax = 800; - NPC.HitSound = SoundID.NPCHit1; - NPC.DeathSound = SoundID.NPCDeath6; - NPC.value = Item.buyPrice(0, 0, 50, 0); - NPC.knockBackResist = 0.1f; - NPC.aiStyle = NPCAIStyleID.Bat; - } - - public override void AI() - { - Player target = Main.player[NPC.target]; - if (target.active && !target.dead) - { - attackTimer++; - teleportTimer++; - - // Fast movement - Vector2 toPlayer = Vector2.Normalize(target.Center - NPC.Center); - float distanceToPlayer = Vector2.Distance(NPC.Center, target.Center); - - // Teleport mechanic every 180 frames (3 seconds) - if (teleportTimer >= 180 && distanceToPlayer > 200f) - { - teleportTimer = 0; - - // Teleport dust effect - for (int i = 0; i < 20; i++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Electric); - } - - // Teleport near player - Vector2 teleportPos = target.Center + new Vector2(Main.rand.Next(-200, 200), -150); - NPC.position = teleportPos; - - for (int i = 0; i < 20; i++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Electric); - } - } - - // Rapid fire attack every 30 frames (0.5 seconds) - if (attackTimer >= 30) - { - attackTimer = 0; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Vector2 shootDirection = Vector2.Normalize(target.Center - NPC.Center); - - // Triple shot spread - for (int i = -1; i <= 1; i++) - { - Vector2 perturbedSpeed = shootDirection.RotatedBy(MathHelper.ToRadians(15 * i)); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, - perturbedSpeed * 14f, ProjectileID.MartianTurretBolt, - NPC.damage / 3, 1f); - } - } - } - - // Aggressive movement - if (distanceToPlayer > 150f) - { - NPC.velocity = toPlayer * 6f; - } - } - } - - public override void HitEffect(NPC.HitInfo hit) - { - if (NPC.life <= 0) - { - // Epic death effects - for (int i = 0; i < 20; i++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Feather); - } - for (int i = 0; i < 15; i++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Electric); - } - } - } - - public override float SpawnChance(NPCSpawnInfo spawnInfo) - { - return 0f; // Controlled by invasion system - } - } -} diff --git a/Content/NPCs/Enemies/AvalianInvasion/AvalianRifleman.cs b/Content/NPCs/Enemies/AvalianInvasion/AvalianRifleman.cs deleted file mode 100644 index 30d3821..0000000 --- a/Content/NPCs/Enemies/AvalianInvasion/AvalianRifleman.cs +++ /dev/null @@ -1,85 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Microsoft.Xna.Framework; - -namespace ForgottenWawiTech.Content.NPCs.Enemies.AvalianInvasion -{ - public class AvalianRifleman : ModNPC - { - private int shootTimer = 0; - - public override void SetStaticDefaults() - { - Main.npcFrameCount[Type] = 6; - NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(0) - { - Velocity = 1f - }; - NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, value); - } - - public override void SetDefaults() - { - NPC.width = 34; - NPC.height = 42; - NPC.damage = 55; - NPC.defense = 20; - NPC.lifeMax = 400; - NPC.HitSound = SoundID.NPCHit1; - NPC.DeathSound = SoundID.NPCDeath6; - NPC.value = Item.buyPrice(0, 0, 10, 0); - NPC.knockBackResist = 0.3f; - NPC.aiStyle = NPCAIStyleID.Bat; // Flying ranged enemy - } - - public override void AI() - { - // Ranged attack behavior - Player target = Main.player[NPC.target]; - if (target.active && !target.dead) - { - shootTimer++; - - // Keep distance from player - float distanceToPlayer = Vector2.Distance(NPC.Center, target.Center); - if (distanceToPlayer < 300f) - { - // Move away - Vector2 awayDirection = Vector2.Normalize(NPC.Center - target.Center); - NPC.velocity = awayDirection * 3f; - } - - // Shoot every 90 frames (1.5 seconds) - if (shootTimer >= 90) - { - shootTimer = 0; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Vector2 shootDirection = Vector2.Normalize(target.Center - NPC.Center); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, - shootDirection * 10f, ProjectileID.BulletHighVelocity, - NPC.damage / 2, 1f); - } - } - } - } - - public override void HitEffect(NPC.HitInfo hit) - { - if (NPC.life <= 0) - { - for (int i = 0; i < 12; i++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Feather); - } - } - } - - public override float SpawnChance(NPCSpawnInfo spawnInfo) - { - return 0f; // Controlled by invasion system - } - } -} diff --git a/Content/NPCs/Enemies/AvalianInvasion/AvalianScout.cs b/Content/NPCs/Enemies/AvalianInvasion/AvalianScout.cs deleted file mode 100644 index 618e609..0000000 --- a/Content/NPCs/Enemies/AvalianInvasion/AvalianScout.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Microsoft.Xna.Framework; - -namespace ForgottenWawiTech.Content.NPCs.Enemies.AvalianInvasion -{ - public class AvalianScout : ModNPC - { - public override void SetStaticDefaults() - { - Main.npcFrameCount[Type] = 6; // Animation frames - NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(0) - { - Velocity = 1f - }; - NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, value); - } - - public override void SetDefaults() - { - NPC.width = 32; - NPC.height = 40; - NPC.damage = 45; - NPC.defense = 15; - NPC.lifeMax = 250; - NPC.HitSound = SoundID.NPCHit1; - NPC.DeathSound = SoundID.NPCDeath6; - NPC.value = Item.buyPrice(0, 0, 5, 0); - NPC.knockBackResist = 0.5f; - NPC.aiStyle = NPCAIStyleID.Fighter; // Basic fighter AI - } - - public override void AI() - { - // Add subtle hover/flight behavior - if (NPC.velocity.Y > -2f && NPC.velocity.Y < 2f) - { - NPC.velocity.Y += Main.rand.NextFloat(-0.1f, 0.1f); - } - } - - public override void HitEffect(NPC.HitInfo hit) - { - // Feather particles on hit - if (NPC.life <= 0) - { - for (int i = 0; i < 10; i++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Feather, - Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f)); - } - } - } - - public override float SpawnChance(NPCSpawnInfo spawnInfo) - { - // Only spawn during Avalian Invasion event - return 0f; // Controlled by invasion system - } - } -} diff --git a/Content/NPCs/Enemies/AvalianInvasion/AvalianTechnician.cs b/Content/NPCs/Enemies/AvalianInvasion/AvalianTechnician.cs deleted file mode 100644 index ea0f445..0000000 --- a/Content/NPCs/Enemies/AvalianInvasion/AvalianTechnician.cs +++ /dev/null @@ -1,97 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Microsoft.Xna.Framework; - -namespace ForgottenWawiTech.Content.NPCs.Enemies.AvalianInvasion -{ - public class AvalianTechnician : ModNPC - { - private int laserTimer = 0; - - public override void SetStaticDefaults() - { - Main.npcFrameCount[Type] = 6; - NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(0) - { - Velocity = 1f - }; - NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, value); - } - - public override void SetDefaults() - { - NPC.width = 36; - NPC.height = 44; - NPC.damage = 40; - NPC.defense = 12; - NPC.lifeMax = 300; - NPC.HitSound = SoundID.NPCHit1; - NPC.DeathSound = SoundID.NPCDeath6; - NPC.value = Item.buyPrice(0, 0, 15, 0); - NPC.knockBackResist = 0.4f; - NPC.aiStyle = NPCAIStyleID.Bat; - } - - public override void AI() - { - Player target = Main.player[NPC.target]; - if (target.active && !target.dead) - { - laserTimer++; - - // Circle around player - float distanceToPlayer = Vector2.Distance(NPC.Center, target.Center); - if (distanceToPlayer > 400f) - { - // Move closer - Vector2 toPlayer = Vector2.Normalize(target.Center - NPC.Center); - NPC.velocity = toPlayer * 4f; - } - else if (distanceToPlayer < 350f) - { - // Orbit - Vector2 toPlayer = target.Center - NPC.Center; - Vector2 perpendicular = new Vector2(-toPlayer.Y, toPlayer.X); - perpendicular.Normalize(); - NPC.velocity = perpendicular * 3f; - } - - // Fire laser every 60 frames (1 second) - if (laserTimer >= 60) - { - laserTimer = 0; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Vector2 shootDirection = Vector2.Normalize(target.Center - NPC.Center); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, - shootDirection * 12f, ProjectileID.DeathLaser, - NPC.damage / 2, 1f); - } - } - } - } - - public override void HitEffect(NPC.HitInfo hit) - { - if (NPC.life <= 0) - { - // Tech parts and feathers - for (int i = 0; i < 8; i++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Feather); - } - for (int i = 0; i < 5; i++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Electric); - } - } - } - - public override float SpawnChance(NPCSpawnInfo spawnInfo) - { - return 0f; // Controlled by invasion system - } - } -}