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 0000000000..9a3a1b74bf Binary files /dev/null and b/NPCs/Astral/EnchantedNightcrawler.png differ diff --git a/Projectiles/Rogue/ExplosiveSun.cs b/Projectiles/Rogue/ExplosiveSun.cs index 0da1cbeb43..25058a382b 100644 --- a/Projectiles/Rogue/ExplosiveSun.cs +++ b/Projectiles/Rogue/ExplosiveSun.cs @@ -18,17 +18,23 @@ namespace CalamityMod.Projectiles.Rogue { projectile.width = 22; projectile.height = 22; - projectile.aiStyle = 115; + //projectile.aiStyle = 115; projectile.friendly = true; projectile.penetrate = 1; projectile.light = 0.5f; projectile.alpha = 50; projectile.scale = 1.2f; - projectile.timeLeft = 600; + projectile.timeLeft = 60; projectile.tileCollide = false; projectile.Calamity().rogue = true; } + public override void AI() + { + projectile.velocity.X *= 0.985f; + projectile.velocity.Y *= 0.985f; + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { //Changes the texture of the projectile