Wulfrum battery makes minions glow
This commit is contained in:
1 parent
5b8943bf74
commit
7c6aed86f2
3 files changed
+31
-4
No files matched your search
@@ -14,7 +14,8 @@ namespace CalamityMod.Items.Accessories
|
||||
DisplayName.SetDefault("Rover Drive");
|
||||
Tooltip.SetDefault("Activates a protective shield that grants 15 defense for 10 seconds\n" +
|
||||
//Actually 10.1 seconds at full power with a dissipation across 0.1666 seconds but whatever
|
||||
"The shield then dissipates and recharges for 20 seconds before being reactivated");
|
||||
"The shield then dissipates and recharges for 20 seconds before being reactivated\n" +
|
||||
"Can also be scrapped at an extractinator");
|
||||
|
||||
ItemID.Sets.ExtractinatorMode[Item.type] = Item.type;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using Terraria.ID;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Audio;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
@@ -15,8 +16,8 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
SacrificeTotal = 1;
|
||||
DisplayName.SetDefault("Wulfrum Battery");
|
||||
Tooltip.SetDefault("7% increased summon damage\n" +
|
||||
"Attaches a spotlight on your first summon\n" +
|
||||
Tooltip.SetDefault( "Empowers your summons with wulfrum energy, letting them emit light around them\n" +
|
||||
"7% increased summon damage\n" +
|
||||
"50% chance to get an extra scrap when killing wulfrum robots\n" +
|
||||
"Can also be scrapped at an extractinator");
|
||||
|
||||
@@ -64,4 +65,29 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void ResetEffects() => battery = false;
|
||||
public override void UpdateDead() => battery = false;
|
||||
}
|
||||
|
||||
public class WulfrumBatteryGlobalProjectile : GlobalProjectile
|
||||
{
|
||||
public override void AI(Projectile projectile)
|
||||
{
|
||||
if (!projectile.npcProj && !projectile.trap && projectile.minion && !ProjectileID.Sets.MinionShot[projectile.type] && Main.player[projectile.owner].GetModPlayer<WulfrumBatteryPlayer>().battery)
|
||||
{
|
||||
float lightMult = 3f;
|
||||
if (Lighting.UpdateEveryFrame) //The light loks wayyy too bright in retro/trippy
|
||||
lightMult = 1.5f;
|
||||
|
||||
Lighting.AddLight(projectile.Center, Color.DeepSkyBlue.ToVector3() * lightMult);
|
||||
|
||||
|
||||
|
||||
if (Main.rand.NextBool(16))
|
||||
{
|
||||
float size = (projectile.Hitbox.Size() / 2f).Length();
|
||||
|
||||
Dust zapDust = Dust.NewDustPerfect(projectile.Center + Main.rand.NextVector2Circular(1f, 1f) * size, 226, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(1f, 2.3f));
|
||||
zapDust.noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
if (Owner.HeldItem.ModItem is WulfrumScrewdriver screwdriver && !screwdriver.ScrewStored)
|
||||
{
|
||||
WulfrumScrewdriver.ScrewStart = new Vector3(Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero) * 14f * Main.rand.NextFloat() - Main.screenPosition, Main.rand.NextFloat(MathHelper.PiOver2 - MathHelper.PiOver4));
|
||||
WulfrumScrewdriver.ScrewStart = new Vector3(Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero) * 4f * Main.rand.NextFloat() - Main.screenPosition, Projectile.rotation);
|
||||
WulfrumScrewdriver.ScrewTimer = WulfrumScrewdriver.ScrewTime;
|
||||
screwdriver.ScrewStored = true;
|
||||
|
||||
|
||||
Reference in new issue
Block a user