Added Albino Radiator

This commit is contained in:
Altixal committed 2026-08-05 12:11:53 +07:00
1 parent e1e02fc085
commit 2af9f6b250
3 files changed
+24 -4

No files matched your search

+23 -3
View File
@@ -8,6 +8,7 @@ using CalamityMod.Items.Placeables.Banners;
using Terraria;
using Terraria.GameContent.Bestiary;
using Terraria.GameContent.ItemDropRules;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
@@ -17,7 +18,7 @@ namespace CalamityMod.NPCs.AcidRain
{
public override void SetStaticDefaults()
{
Main.npcFrameCount[Type] = 4;
Main.npcFrameCount[Type] = 8;
}
public override void SetDefaults()
@@ -52,7 +53,6 @@ namespace CalamityMod.NPCs.AcidRain
AIType = NPCID.GlowingSnail;
Banner = NPC.type;
BannerItem = ModContent.ItemType<RadiatorBanner>();
NPC.catchItem = (short)ModContent.ItemType<RadiatingCrystal>();
NPC.Calamity().VulnerableToHeat = false;
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToElectricity = true;
@@ -68,8 +68,24 @@ namespace CalamityMod.NPCs.AcidRain
});
}
public override void OnSpawn(IEntitySource source)
{
if (Main.rand.NextBool(10))
{
NPC.frame.Y = NPC.height * 4;
NPC.catchItem = (short)ModContent.ItemType<RadiatingCrystal>();
NPC.damage = 0;
}
}
public override void AI()
{
if (NPC.damage == 0)
{
Lighting.AddLight(NPC.Center, 0.7f, 0.7f, 0.7f);
return;
}
Lighting.AddLight(NPC.Center, 0.3f, 1.5f, 0.3f);
if (!Main.dedServ)
@@ -96,7 +112,11 @@ namespace CalamityMod.NPCs.AcidRain
{
NPC.frameCounter = 0;
NPC.frame.Y += frameHeight;
if (NPC.frame.Y > frameHeight * 2)
if (NPC.frame.Y > frameHeight * 6)
{
NPC.frame.Y = frameHeight * 4;
}
else if (NPC.frame.Y > frameHeight * 2 && NPC.frame.Y < frameHeight * 4)
{
NPC.frame.Y = 0;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

+1 -1
View File
@@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Pets
Projectile.frame = 0;
}
}
Lighting.AddLight(Projectile.Center, 0.4f, 1f, 0.5f);
Lighting.AddLight(Projectile.Center, 0.6f, 0.6f, 0.6f);
Vector2 vector46 = Projectile.position;
if (!fly)
{