public override void UpdateLifeRegen(NPC npc, ref int damage) { Player player = Main.player[Main.myPlayer]; ApexPlayer modPlayer = player.GetModPlayer <ApexPlayer>(); if (WhiteFlames) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= 200; if (damage < 100) { damage = 100; } } if (FOH) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= 200; if (damage < 100) { damage = 100; } } }
public override void Update(Player player, ref int buffIndex) { ApexPlayer modPlayer = player.GetModPlayer <ApexPlayer>(); if (player.ownedProjectileCounts[ModContent.ProjectileType <Projectiles.SummonerProjectiles.ApexMinion>()] > 0) { modPlayer.AMinion = true; } if (!modPlayer.AMinion) { player.DelBuff(buffIndex); buffIndex--; } else { player.buffTime[buffIndex] = 18000; } }
public override void NPCLoot(NPC npc) { Player player = Main.player[npc.lastInteraction]; ApexPlayer modPlayer = player.GetModPlayer <ApexPlayer>(); if (npc.type == NPCID.PirateShip) { if (Main.rand.Next(50) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType <Stazzler>(), 1); } } if (npc.type == NPCID.BigMimicHallow) { if (Main.rand.Next(10) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType <CrystalizedSoul>(), 1); } } if (npc.type == NPCID.DukeFishron) { if (Main.rand.Next(10) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType <TheDuke>(), 1); } } if (npc.type == NPCID.BigMimicJungle) { switch (Main.rand.Next(4)) { case 0: Item.NewItem(npc.Hitbox, ModContent.ItemType <TikiEmblem>()); break; case 1: Item.NewItem(npc.Hitbox, ModContent.ItemType <JunglesResolution>()); break; case 2: Item.NewItem(npc.Hitbox, ModContent.ItemType <CoconutGun>()); break; case 3: Item.NewItem(npc.Hitbox, ModContent.ItemType <SporeInfestation>()); break; } } if (npc.type == NPCID.SnowmanGangsta || npc.type == NPCID.MisterStabby || npc.type == NPCID.SnowBalla) { if (Main.rand.Next(50) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType <SnowmanHeart>(), 1); } } if (npc.type == NPCID.GoblinSummoner) { if (Main.rand.Next(10) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType <ShadowFlames>(), 1); } } if (npc.type == NPCID.Pumpking) { if (Main.rand.Next(25) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType <PumpkingScythe>(), 1); } } if (player.ZoneSkyHeight) { if (NPC.downedMoonlord) { if (Main.rand.Next(350) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType <MysteriousFeather>(), 1); } } } if (player.ZoneSnow) { if (Main.hardMode) { if (Main.rand.Next(100) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.SnowGlobe, 1); } } } }