From c0603bbb2da09fef4f48108da191bfbedf842ed9 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 31 Oct 2019 22:07:16 -0400 Subject: [PATCH] added enchanted nightcrawler and hell's sun changes --- CalamityMod.cs | 2 +- NPCs/Astral/EnchantedNightcrawler.cs | 61 ++++++++++++++++++++++++++ NPCs/Astral/EnchantedNightcrawler.png | Bin 0 -> 289 bytes Projectiles/Rogue/ExplosiveSun.cs | 10 ++++- 4 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 NPCs/Astral/EnchantedNightcrawler.cs create mode 100644 NPCs/Astral/EnchantedNightcrawler.png diff --git a/CalamityMod.cs b/CalamityMod.cs index 641bd5c8fd..5aa2b2185a 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1710,7 +1710,7 @@ namespace CalamityMod spikyBallList = new List() //There's more to come { - ModContent.ItemType() + ModContent.ItemType(), ModContent.ItemType() }; diff --git a/NPCs/Astral/EnchantedNightcrawler.cs b/NPCs/Astral/EnchantedNightcrawler.cs new file mode 100644 index 0000000000..318202372a --- /dev/null +++ b/NPCs/Astral/EnchantedNightcrawler.cs @@ -0,0 +1,61 @@ +using CalamityMod.Dusts; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.NPCs.Astral +{ + public class EnchantedNightcrawler : ModNPC + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Enchanted Nightcrawler"); + Main.npcFrameCount[npc.type] = 2; + Main.npcCatchable[npc.type] = true; + } + + public override void SetDefaults() + { + npc.CloneDefaults(NPCID.EnchantedNightcrawler); //ID is 484 + aiType = NPCID.EnchantedNightcrawler; + animationType = NPCID.EnchantedNightcrawler; + } + + public override bool PreAI() + { + npc.type = NPCID.EnchantedNightcrawler; //Make it immediately turn into vanilla critter + return true; + } + + public override bool? CanBeHitByItem(Player player, Item item) + { + return true; + } + + public override bool? CanBeHitByProjectile(Projectile projectile) + { + return true; + } + + public override float SpawnChance(NPCSpawnInfo spawnInfo) + { + if (spawnInfo.player.Calamity().ZoneAstral && !spawnInfo.player.ZoneRockLayerHeight) + { + return SpawnCondition.TownCritter.Chance; + } + return 0f; + } + + public override void OnCatchNPC(Player player, Item item) + { + try + { + } catch + { + return; + } + } + } +} diff --git a/NPCs/Astral/EnchantedNightcrawler.png b/NPCs/Astral/EnchantedNightcrawler.png new file mode 100644 index 0000000000000000000000000000000000000000..9a3a1b74bfcc1c784a73bdc8ebc1dbfb7f5040a8 GIT binary patch literal 289 zcmV++0p9+JP)5wXz`8(mT8ib6}?S3mAs_%u2~(lt%C=EHIdKzg)!j0VWaM{bE~l5hpU zDZT=bu(u!q&2`j0*>FS^g$D4-nIZ8nmgGRQBN&2MS+a6xNc}($OSE8ZI{MEGg)AfI zQN24K{e}94#82X%S0PT9zwXZ2GUYOBUU)XSnwvbCn4R`ksQki_vqiacMyj