Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. using System;
  2. using System.IO;
  3. using Microsoft.Xna.Framework;
  4. using Microsoft.Xna.Framework.Graphics;
  5. using Terraria;
  6. using Terraria.ID;
  7. using Terraria.ModLoader;
  8.  
  9. namespace MinecraftInTerraria.NPCs
  10. {
  11. public class EnderDragon : ModNPC
  12. {
  13. public override void SetDefaults()
  14. {
  15. npc.name = "EnderDragon";
  16. npc.displayName = "EnderDragon";
  17. npc.aiStyle = 5; //5 is the flying AI
  18. npc.lifeMax = 200000; //boss life
  19. npc.damage = 50; //boss damage
  20. npc.defense = 10; //boss defense
  21. npc.knockBackResist = 0f;
  22. npc.width = 100;
  23. npc.height = 100;
  24. animationType = NPCID.DemonEye; //this boss will behavior like the DemonEye
  25. Main.npcFrameCount[npc.type] = 2; //boss frame/animation
  26. npc.value = Item.buyPrice(0, 40, 75, 45);
  27. npc.npcSlots = 1f;
  28. npc.boss = true;
  29. npc.lavaImmune = true;
  30. npc.noGravity = true;
  31. npc.noTileCollide = true;
  32. npc.soundHit = 8;
  33. npc.soundKilled = 14;
  34. npc.buffImmune[24] = true;
  35. music = MusicID.Boss2;
  36. npc.netAlways = true;
  37. }
  38. public override void BossLoot(ref string name, ref int potionType)
  39. {
  40. potionType = ItemID.LesserHealingPotion; //boss drops
  41.  
  42. }
  43. public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
  44. {
  45. npc.lifeMax = (int)(npc.lifeMax * 0.579f * bossLifeScale); //boss life scale in expertmode
  46. npc.damage = (int)(npc.damage * 0.6f); //boss damage increase in expermode
  47. }
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement