Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Microsoft.Xna.Framework;
- using Terraria;
- using Terraria.ID;
- using Terraria.ModLoader;
- using DarkSouls;
- namespace DarkSouls.NPCs.Enemies
- {
- public class AbysmalOolacileSorcerer : ModNPC
- {
- public int basicsoul;
- static int count;
- float customAi5;
- float customspawn1;
- float customspawn2;
- float customspawn3;
- public override void SetStaticDefaults()
- {
- DisplayName.SetDefault("Abysmal Oolacile Sorcerer");
- Main.npcFrameCount[npc.type] = 3;
- }
- public override void SetDefaults()
- {
- npc.lifeMax = 56800;
- npc.damage = 96;
- npc.defense = 157;
- npc.knockBackResist = 0.3f;
- npc.width = 28;
- npc.height = 44;
- npc.aiStyle = 8;
- animationType = 29;
- npc.npcSlots = 180;
- npc.HitSound = SoundID.NPCHit1;
- npc.DeathSound = SoundID.NPCDeath6;
- npc.value = 370000;
- npc.boss = true;
- npc.timeLeft = 22500;
- }
- public override void AI()
- {
- if (Main.netMode != 1)
- {
- customAi5 += (Main.rand.Next(2, 5) * 0.1f) * npc.scale;
- if (customAi5 >= 10f)
- {
- if ((customspawn1 < 30) && Main.rand.Next(130)==1)
- {
- int Spawned = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("ArmoredWraith"), 0, npc.whoAmI, 0, 200);
- Main.npc[Spawned].velocity.Y = -8;
- Main.npc[Spawned].velocity.X = Main.rand.Next(-10,10)/10;
- //npc.ai[5] = 20-Main.rand.Next(80);
- customspawn1 += 1f;
- }
- if ((customspawn2 < 1) && Main.rand.Next(3500)==1)
- {
- int Spawned = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("ArmoredWraith"), 0, npc.whoAmI, 0, 200);
- Main.npc[Spawned].velocity.Y = -8;
- Main.npc[Spawned].velocity.X = Main.rand.Next(-10,10)/10;
- //npc.ai[5] = 20-Main.rand.Next(80);
- customspawn2 += 1f;
- }
- if ((customspawn3 < 1) && Main.rand.Next(2050)==1)
- {
- int Spawned = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("ArmoredWraith"), 0, npc.whoAmI, 0, 200);
- Main.npc[Spawned].velocity.Y = -8;
- Main.npc[Spawned].velocity.X = Main.rand.Next(-10,10)/10;
- //npc.ai[5] = 20-Main.rand.Next(80);
- customspawn3 += 1f;
- }
- }
- }
- }
- public override void HitEffect(int hitDirection, double damage)
- {
- }
- public override float SpawnChance(NPCSpawnInfo spawnInfo)
- {
- int x = spawnInfo.spawnTileX;
- int y = spawnInfo.spawnTileY;
- int tile = Main.tile[x, y].type;
- return Main.hardMode && NPC.downedMoonlord && !spawnInfo.player.ZoneDungeon && y > Main.rockLayer ? 0.1f : 0f;
- }
- public override void NPCLoot()
- {
- if (Main.netMode != 1)
- {
- if (Main.expertMode)
- {
- basicsoul = 2;
- }
- else
- {
- basicsoul = 1;
- }
- count = basicsoul * 5000;
- Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("DarkSoul"), count);
- }
- DarkSoulsWorld.downedTutorialBoss = true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement