Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using Microsoft.Xna.Framework;
- using Microsoft.Xna.Framework.Graphics;
- using Terraria;
- using Terraria.ID;
- using Terraria.ModLoader;
- namespace ENUFsGloveMod.NPCs.Boss
- {
- public class TrueStoneGuard : ModNPC
- {
- public override void SetDefaults()
- {
- npc.name = "TrueStoneGuard";
- npc.displayName = "True Stone Guard";
- npc.aiStyle = 5; //5 is the flying AI
- npc.lifeMax = 2500; //boss life
- npc.damage = 30; //boss damage
- npc.defense = 10; //boss defense
- npc.knockBackResist = 0f;
- npc.width = 100;
- npc.height = 100;
- animationType = NPCID.EyeofCthulhu; //this boss will behavior like the DemonEye
- npc.value = Item.buyPrice(0, 40, 75, 45);
- npc.npcSlots = 1f;
- npc.boss = true;
- npc.lavaImmune = true;
- npc.noGravity = true;
- npc.noTileCollide = true;
- npc.HitSound = SoundID.NPCHit1;
- npc.DeathSound = SoundID.NPCDeath1;
- npc.buffImmune[24] = true;
- music = MusicID.Boss2;
- npc.netAlways = true;
- Main.npcFrameCount[npc.type] = 4;
- }
- public override void FindFrame(int frameHeight)
- {
- npc.frameCounter++;
- if (npc.frameCounter >= 240)
- {
- npc.frame.Y += frameHeight;
- if (npc.frame.Y >= Main.npcFrameCount[npc.type] * frameHeight)
- {
- npc.frame.Y = 0;
- }
- npc.frameCounter = 0;
- }
- }
- public override void AutoloadHead(ref string headTexture, ref string bossHeadTexture)
- {
- bossHeadTexture = "ENUFsGloveMod/NPCs/Boss/TrueStoneGuard_Head_Boss"; //the boss head texture
- }
- public override void BossLoot(ref string name, ref int potionType)
- {
- potionType = ItemID.LesserHealingPotion; //boss drops
- Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("TrueStone"), Main.rand.Next(20,50));
- }
- public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
- {
- npc.lifeMax = (int)(npc.lifeMax * 0.579f * bossLifeScale); //boss life scale in expertmode
- npc.damage = (int)(npc.damage * 0.6f); //boss damage increase in expermode
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement