Files
CalamityModPublic/NPCs/NormalNPCs/PhantomSpiritM.cs
T
Andrew Marheine 0a7a897aab 1 - Shield bashes no longer give extra immunity frames if you are already immune.
2 - Yharim's Stims increase pick speed.
3 - Crumbling Potions no longer require Forbidden Fragments.
4 - Penumbra Potions no longer require Essence of Chaos and take 1 Solar Tablet Fragment instead of 2.
5 - Photosynthesis Potions no longer require Vines and take 1 Beetle Juice instead of 2.
6 - Revivify Potions last 3 seconds intead of 2.
7 - Soaring Potions no longer require Feathers.
8 - Triumph Potions no longer require Stormlion Mandibles.
9 - Yharim's Stimulants no longer require Archery and Magic Power Potions, but they now require Any Food item.
10 - Caustic Edge now requires Shadow Scales or Tissue Samples to craft.
11 - Draconic Swarmers deal 20% less damage if they naturally spawn in the jungle.
12 - Increased normal, small and medium Phantom Spirit HP.
13 - Decreased large Phantom Spirit HP.
14 - Increased Profaned Energy HP.
15 - Added Warmth Potions to Permafrost's shop.
16 - Added Heartreach, Lifeforce and Love Potoins to Cirrus' shop.
17 - Added Gills, Water Walking and Flipper Potions to Amidias' shop.
18 - Added Invisibility, Night Owl and Dangersense Potions to Bandit's shop.
19 - Added Wormhole, Archery, Healing, Mana and Titan Potions to Merchant's shop.
20 - Added Mining, Ironskin, Shine, Spelunker, Obsidian Skin and Endurance Potions to Demolitionist's shop.
21 - Added Ammo Reservation, Hunter and Battle Potions to Arms Dealer's shop.
22 - Added Thorns, Featherfall, Regeneration and Swiftness Potions to Dryad's shop.
23 - Added Stink Potions to Goblin Tinkerer's shop because he's the worst NPC and reprogramming his shit was annoying as fuck.
24 - Added Builder Potions to Mechanic's shop.
25 - Added Mana Regen, Magic Power and Gravitation Potions to Wizard's shop.
26 - Added Calming, Rage, Wrath and Inferno Potions to Witch Doctor's shop.
27 - Added Gender Change Potions to Party Girl's shop.
28 - Added Calcium Potions to Skeleton Merchant's shop.
2021-01-11 04:02:31 -06:00

90 lines
2.9 KiB
C#

using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Dusts;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Banners;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.NPCs.NormalNPCs
{
public class PhantomSpiritM : ModNPC
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Phantom Spirit");
Main.npcFrameCount[npc.type] = 4;
}
public override void SetDefaults()
{
npc.aiStyle = -1;
npc.damage = 90;
npc.width = 32;
npc.height = 32;
npc.scale = 1.1f;
npc.defense = 25;
npc.lifeMax = 2000;
npc.knockBackResist = 0.1f;
aiType = -1;
npc.value = Item.buyPrice(0, 0, 40, 0);
npc.HitSound = SoundID.NPCHit36;
npc.DeathSound = SoundID.NPCDeath39;
npc.noGravity = true;
npc.noTileCollide = true;
banner = ModContent.NPCType<PhantomSpirit>();
bannerItem = ModContent.ItemType<PhantomSpiritBanner>();
}
public override void FindFrame(int frameHeight)
{
npc.frameCounter += 0.15f;
npc.frameCounter %= Main.npcFrameCount[npc.type];
int frame = (int)npc.frameCounter;
npc.frame.Y = frame * frameHeight;
}
public override void AI()
{
float speed = CalamityWorld.death ? 18f : 13.5f;
CalamityAI.DungeonSpiritAI(npc, mod, speed, -MathHelper.PiOver2);
int num822 = Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 0, default, 1f);
Dust dust = Main.dust[num822];
dust.velocity *= 0.1f;
dust.scale = 1.3f;
dust.noGravity = true;
return;
}
public override void HitEffect(int hitDirection, double damage)
{
for (int k = 0; k < 5; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.Phantoplasm, hitDirection, -1f, 0, default, 1f);
}
if (npc.life <= 0)
{
for (int num288 = 0; num288 < 50; num288++)
{
int num289 = Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.Phantoplasm, npc.velocity.X, npc.velocity.Y, 0, default, 1f);
Dust dust = Main.dust[num289];
dust.velocity *= 2f;
dust.noGravity = true;
dust.scale = 1.4f;
}
}
}
public override Color? GetAlpha(Color drawColor)
{
return new Color(200, 200, 200, 0);
}
public override void NPCLoot()
{
DropHelper.DropItem(npc, ModContent.ItemType<Phantoplasm>(), 1, 3);
}
}
}