added enchanted nightcrawler and hell's sun changes

This commit is contained in:
termigator1359 committed 2019-10-31 22:07:16 -04:00
1 parent 92d5488ad6
commit c0603bbb2d
4 files changed
+70 -3

No files matched your search

+1 -1
View File
@@ -1710,7 +1710,7 @@ namespace CalamityMod
spikyBallList = new List<int>() //There's more to come
{
ModContent.ItemType<HellsSun>()
ModContent.ItemType<HellsSun>(),
ModContent.ItemType<SkyStabber>()
};
+61
View File
@@ -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;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

+8 -2
View File
@@ -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