63 lines
2.1 KiB
C#
63 lines
2.1 KiB
C#
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria.GameContent.ItemDropRules;
|
|
using ForgottenWawiTech.Content.Items.TreasureBags;
|
|
|
|
namespace ForgottenWawiTech.Content.NPCs.OriginalLexy
|
|
{
|
|
[AutoloadBossHead]
|
|
public class Lexy : ModNPC
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Main.npcFrameCount[NPC.type] = 1;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
NPC.width = 40;
|
|
NPC.height = 40;
|
|
NPC.damage = 1786;
|
|
NPC.defense = 290;
|
|
NPC.lifeMax = 1000000;
|
|
NPC.HitSound = SoundID.NPCHit1;
|
|
NPC.DeathSound = SoundID.NPCDeath1;
|
|
NPC.knockBackResist = 0f;
|
|
NPC.boss = true;
|
|
NPC.aiStyle = -1;
|
|
NPC.value = Item.buyPrice(0, 1, 0, 0);
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
/*
|
|
IDEA:
|
|
Lexy has yet to determine his fight style, but has a rough idea for enraged behaviour.
|
|
*/
|
|
/*
|
|
IDEA: Enraged Behaviour
|
|
Lexy will teleport near a player and unleash every ability he has in a frantic assault - taking 5% of his max health every second while in this state - while becoming invulnerable to player damage.
|
|
His damage will be multiplied to the power of 1000 - no player is expected to survive this. If they do, Lexy drops a dev set and a unique weapon (TBD).
|
|
This will last until he dies.
|
|
*/
|
|
// For now, the boss instantly dies
|
|
NPC.life = 0;
|
|
NPC.checkDead();
|
|
}
|
|
|
|
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
|
{
|
|
npcLoot.Add(ItemDropRule.BossBag(ModContent.ItemType<LexyBossBag>()));
|
|
}
|
|
|
|
public override void OnKill()
|
|
{
|
|
// Set a world flag or similar to indicate Lexy has been defeated
|
|
WorldDefeatedBosses.Lexy = true;
|
|
// Immediate sync of world flags
|
|
WorldDefeatedBosses.Sync(ModContent.GetInstance<ForgottenWawiTech>());
|
|
}
|
|
}
|
|
} |