using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace MoreAwesomeStuffpeeps.NPCs.Boss
{
[AutoloadBossHead]
public class TheSeer : ModNPC
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("The Seer");
Main.npcFrameCount[npc.type] = 6;
}
public override void SetDefaults()
{
npc.aiStyle = 4; //Eye of Cthulhu AI
npc.lifeMax = 200000;
npc.damage = 80;
npc.defense = 30;
npc.knockBackResist = 0f;
npc.width = 100;
npc.height = 110;
npc.value = 10000;
npc.npcSlots = 1f;
npc.boss = true;
npc.lavaImmune = true;
npc. noGravity = true;
npc.noTileCollide = true;
npc.HitSound = SoundID.NPCHit1;
npc.DeathSound = SoundID.NPCDeath1;
music = MusicID.Boss1;
bossBag = mod.ItemType("TheSeerTreasureBag");
}
public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
{
npc.lifeMax = (int)(npc.lifeMax * 0.500f * bossLifeScale);
npc.damage = (int)(npc.damage * 0.5f);
npc.defense = (int)(npc.defense + numPlayers);
}
public override void FindFrame(int frameHeight)
{
npc.frameCounter += 1.0;
npc.frameCounter %= 10;
int frame = (int)(npc.frameCounter / 2.0);
if (frame >= Main.npcFrameCount[npc.type]) frame = 0;
npc.frame.Y = frame * frameHeight;
}
public override void NPCLoot()
{
if (Main.expertMode)
{
npc.DropBossBags();
}
else
{
if (Main.rand.Next(3) == 0)
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("LuminiteSlimeSword"));
}
else
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("CelestialPickaxe"));
}
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("CelestialBar"), 5);
}
}
}
}