Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using Microsoft.Xna.Framework;
- using Microsoft.Xna.Framework.Graphics;
- using Terraria;
- using Terraria.ID;
- using Terraria.ModLoader;
- using Terraria.Localization;
- namespace retrocity.NPCs.Town
- {
- public class Miner : ModNPC
- {
- public override bool Autoload(ref string name)
- {
- name = "Miner";
- return mod.Properties.Autoload;
- }
- public override void SetDefaults()
- {
- npc.townNPC = true;
- npc.friendly = true;
- npc.width = 18;
- npc.height = 40;
- npc.aiStyle = 7;
- npc.damage = 10;
- npc.defense = 15;
- npc.lifeMax = 250;
- npc.knockBackResist = 0.5f;
- Main.npcFrameCount[npc.type] = 16;
- animationType = NPCID.Guide;
- }
- public override bool CanTownNPCSpawn(int numTownNPCs, int money)
- {
- return false;// this make that he will spawn when a house is available
- }
- public override string TownNPCName()
- { //NPC names
- switch (WorldGen.genRand.Next(4))
- {
- case 0:
- return "Sully";
- case 1:
- return "Steve";
- case 2:
- return "Rocky";
- default:
- return "Isaac";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement