This commit is contained in:
mountaindrew10 committed 2023-11-24 13:37:11 -06:00
commit 2ba2aad3c6
30 files changed
+237 -47

No files matched your search

+1 -2
View File
@@ -252,8 +252,7 @@ namespace CalamityMod.Balancing
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Yharon>(), Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<TimeBoltKnife>()))));
// 5% resist to Old Reaper.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Yharon>(), Do(new ProjectileResistBalancingRule(0.95f, ProjectileType<ReaperProjectile>()))));
//NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Yharon>(), Do(new ProjectileResistBalancingRule(0.95f, ProjectileType<ReaperProjectile>()))));
#endregion
#region Exo Mechs: Ares
+1 -1
View File
@@ -35,7 +35,7 @@ namespace CalamityMod.CalPlayer.DrawLayers
{
var drawData = existingDrawData[j];
drawData.position = existingDrawData[j].position - drawPlayer.position + drawPlayer.oldPosition;
drawData.color = new Color(155, 228, 232) * opacity;
drawData.color = Color.Khaki * opacity;
drawData.scale = new Vector2(scale);
afterimages.Add(drawData);
}
+2 -2
View File
@@ -13,8 +13,8 @@ namespace CalamityMod.Cooldowns
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
public override string Texture => "CalamityMod/Cooldowns/AscendEffect";
public override Color OutlineColor => new Color(50, 50, 50);
public override Color CooldownStartColor => new Color(37, 116, 166);
public override Color CooldownEndColor => new Color(155, 228, 232);
public override Color CooldownStartColor => Color.LightGreen;
public override Color CooldownEndColor => Color.Khaki;
public override SoundStyle? EndSound => new("CalamityMod/Sounds/Item/AscendantOff");
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

+5 -1
View File
@@ -186,6 +186,7 @@ namespace CalamityMod.Effects
#region Amber's Shaders
internal static Effect PrimitiveClearShader;
internal static Effect HolyInfernoShader;
internal static Effect DeerclopsShadowShader;
#endregion
// Shorthand to register a loaded shader in Terraria's graphics engine
@@ -392,9 +393,12 @@ namespace CalamityMod.Effects
PrimitiveClearShader = LoadShader("PrimitiveClearShader");
RegisterScreenShader(PrimitiveClearShader, "AutoloadPass", "PrimitiveClearShader");
HolyInfernoShader = LoadShader("HolyInfernoShader");
HolyInfernoShader = LoadShader("ScreenShaders/HolyInfernoShader");
RegisterMiscShader(HolyInfernoShader, "InfernoPass", "HolyInfernoShader");
DeerclopsShadowShader = LoadShader("ScreenShaders/DeerclopsShadowShader");
RegisterMiscShader(DeerclopsShadowShader, "ShadowPass", "DeerclopsShadowShader");
#endregion
}
}
@@ -0,0 +1,52 @@
float minRadius;
float maxRadius;
float maxOpacity;
float2 screenPosition;
float2 screenSize;
float2 anchorPoint;
float InverseLerp(float a, float b, float t)
{
return saturate((t - a) / (b - a));
}
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 uv : TEXCOORD0) : COLOR0
{
float2 worldUV = screenPosition + screenSize * uv;
float2 deerclopsUV = anchorPoint / screenSize;
float worldDistance = distance(worldUV, anchorPoint);
// Get the distance to the pixel from Deerclops
float distToDeerclops = distance(anchorPoint, worldUV);
// And get the correct opacity based on it.
float opacity = InverseLerp(0, maxRadius, distToDeerclops);
// Define the border and mix the shadow and light for a smoother transition
bool border = worldDistance < minRadius && opacity > 0;
float colorMult = 1;
if (worldDistance > minRadius && worldDistance < maxRadius)
opacity = lerp(opacity, maxOpacity, InverseLerp(minRadius, maxRadius, distToDeerclops));
opacity = clamp(opacity, 0, maxOpacity);
if (border)
{
colorMult = InverseLerp(minRadius * 0.94, minRadius, worldDistance);
}
// If the color multi has not been changed (not border pixel) and opacity is 0 OR it's within
if (colorMult == 1 && (opacity == 0 || worldDistance < minRadius))
return sampleColor;
return float4(0, 0, 0, 1) * colorMult * opacity;
}
technique Technique1
{
pass ShadowPass
{
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}
Binary file not shown.
File renamed without changes.
File renamed without changes.
+69
View File
@@ -0,0 +1,69 @@
using CalamityMod.NPCs.VanillaNPCOverrides.Bosses;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.GameContent;
using Terraria.Graphics.Shaders;
using Rectangle = Microsoft.Xna.Framework.Rectangle;
namespace CalamityMod.Graphics.Drawers
{
public class DeerclopsShadowDrawer : BaseDrawer
{
#region Fields/Properties
public override DrawerLayer Layer => DrawerLayer.AfterEverything;
public NPC deerclops => Main.npc[NPC.deerclopsBoss];
//Should only draw if not in the main menu, deerclops is active or the border is fading post-death,
//it's rev+ and the boolean for drawing the border is true.
public override bool ShouldDraw => !Main.gameMenu && DeerclopsAI.borderScalar > 0f && DeerclopsAI.shouldDrawEnrageBorder;
#endregion
#region Methods
public override void DrawToTarget(SpriteBatch spriteBatch)
{
bool shouldDraw;
bool deerclopsInactive = false;
if (NPC.deerclopsBoss >= 0 && NPC.deerclopsBoss.WithinBounds(Main.npc.Length))
shouldDraw = deerclops.HasValidTarget;
else
{
shouldDraw = DeerclopsAI.borderScalar > 0f;
deerclopsInactive = true;
}
if (shouldDraw)
{
var minRadius = DeerclopsAI.innerBorder;
var maxRadius = DeerclopsAI.outerBorder;
//Begin drawing the shadow
var blackTile = TextureAssets.MagicPixel;
var shader = GameShaders.Misc["CalamityMod:DeerclopsShadowShader"].Shader;
shader.Parameters["minRadius"].SetValue(minRadius);
shader.Parameters["maxRadius"].SetValue(maxRadius);
shader.Parameters["anchorPoint"].SetValue(DeerclopsAI.lastDeerclopsPosition);
shader.Parameters["screenPosition"].SetValue(Main.screenPosition);
shader.Parameters["screenSize"].SetValue(Main.ScreenSize.ToVector2());
shader.Parameters["maxOpacity"].SetValue(DeerclopsAI.borderScalar);
spriteBatch.EnterShaderRegion(BlendState.NonPremultiplied, shader);
Rectangle rekt = new(Main.screenWidth / 2, Main.screenHeight / 2, Main.screenWidth, Main.screenHeight);
spriteBatch.Draw(blackTile.Value, rekt, null, default, 0f, blackTile.Value.Size() * 0.5f, 0, 0f);
//Shadow drawing complete
spriteBatch.ExitShaderRegion();
}
if (deerclopsInactive)
{
//Push the border away and fade out when deerclops is deadge
DeerclopsAI.borderScalar = MathHelper.Clamp(DeerclopsAI.borderScalar - 0.015f, 0f, 1f);
DeerclopsAI.innerBorder += 30f;
DeerclopsAI.outerBorder += 30f;
}
}
#endregion
}
}
+10 -1
View File
@@ -1,5 +1,6 @@
using CalamityMod.NPCs;
using CalamityMod.NPCs.Providence;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.GameContent;
@@ -31,6 +32,7 @@ namespace CalamityMod.Graphics.Drawers
{
var target = Main.player[Main.myPlayer];
var holyInfernoIntensity = target.Calamity().holyInfernoFadeIntensity;
var prov = Provi;
//Begin drawing the inferno
var blackTile = TextureAssets.MagicPixel;
@@ -38,6 +40,13 @@ namespace CalamityMod.Graphics.Drawers
var upwardPerlinNoise = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GreyscaleGradients/Perlin");
var upwardNoise = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GreyscaleGradients/MeltyNoise");
var maxOpacity = 1f;
if (prov.Dying)
{
//Death animation timer ends at 345f.
maxOpacity = MathHelper.Lerp(1f, 0f, Utils.GetLerpValue(0f, 344f, prov.DeathAnimationTimer));
}
var shader = GameShaders.Misc["CalamityMod:HolyInfernoShader"].Shader;
shader.Parameters["colorMult"].SetValue(Main.dayTime ? 7.35f : 7.65f); //I want you to know it took considerable restraint to deliberately misspell colour.
shader.Parameters["time"].SetValue(Main.GlobalTimeWrappedHourly);
@@ -47,7 +56,7 @@ namespace CalamityMod.Graphics.Drawers
shader.Parameters["screenSize"].SetValue(Main.ScreenSize.ToVector2());
shader.Parameters["burnIntensity"].SetValue(holyInfernoIntensity);
shader.Parameters["playerPosition"].SetValue(target.Center);
shader.Parameters["maxOpacity"].SetValue(1f);
shader.Parameters["maxOpacity"].SetValue(maxOpacity);
shader.Parameters["day"].SetValue(Main.dayTime);
spriteBatch.GraphicsDevice.Textures[1] = diagonalNoise.Value;
+3 -2
View File
@@ -7,6 +7,7 @@ using Terraria.ModLoader;
using System;
using System.Collections.Generic;
using CalamityMod.Items.Placeables.Ores;
using CalamityMod.Items.Placeables;
namespace CalamityMod.Items.Accessories
{
@@ -35,8 +36,8 @@ namespace CalamityMod.Items.Accessories
{
CreateRecipe().
AddIngredient(ItemID.EmpressFlightBooster).
AddIngredient<Lumenyl>(5).
AddIngredient<ExodiumCluster>(12).
AddIngredient<EffulgentFeather>(5).
AddIngredient(ItemID.SoulofFlight, 10).
AddIngredient<RuinousSoul>(5).
AddTile(TileID.LunarCraftingStation).
Register();
+2 -4
View File
@@ -699,10 +699,8 @@ namespace CalamityMod.Items
if (item.type == ItemID.TerrasparkBoots)
EditTooltipByNum(3, (line) => line.Text += "\nImmunity to the On Fire! debuff");
// IT'S HELLFIRE!!!
if (item.type == ItemID.MagmaStone || item.type == ItemID.LavaSkull || item.type == ItemID.MoltenSkullRose)
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("fire damage", "Hellfire"));
// Ozzatron 23NOV2023: Removed tooltip edits for Magma Skull and Molten Skull Rose, as they were invalid after vanilla tooltip changes.
// Yoyo Glove/Bag apply a 0.5x damage multiplier on the second yoyo
if (item.type == ItemID.YoyoBag || item.type == ItemID.YoYoGlove)
EditTooltipByNum(0, (line) => line.Text += "\nSecondary yoyos will do 50% less damage");
+4 -3
View File
@@ -108,8 +108,8 @@ namespace CalamityMod.Items
{ ItemID.Flamarang, Do(DamageExact(43)) },
{ ItemID.Flamelash, Do(DamageRatio(1.25f)) },
{ ItemID.Flamethrower, Do(DamageExact(24), ShootSpeedDelta(+3f)) },
{ ItemID.FlowerofFire, Do(AutoReuse, ManaExact(7), UseRatio(0.88f)) }, // Uses ratios due to remix seed
{ ItemID.FlowerofFrost, Do(AutoReuse, ManaExact(7), UseExact(30), DamageExact(70), ShootSpeedExact(14)) },
{ ItemID.FlowerofFire, Do(AutoReuse, ManaExact(7), UseRatio(0.88f), DamageRatio(0.65f)) }, // Uses ratios due to remix seed
{ ItemID.FlowerofFrost, Do(AutoReuse, ManaExact(7), UseExact(22), DamageExact(70), ShootSpeedExact(14)) },
{ ItemID.FlyingKnife, Do(DamageExact(53)) },
{ ItemID.Frostbrand, Do(UseMeleeSpeed, DamageExact(88)) },
{ ItemID.FrostStaff, Do(DamageExact(160), UseExact(37), ShootSpeedExact(20f)) }, // has 1 extra update
@@ -190,6 +190,7 @@ namespace CalamityMod.Items
{ ItemID.Rally, Do(AutoReuse, DamageExact(18)) },
{ ItemID.RainbowGun, Do(DamageExact(60), ManaExact(40)) },
{ ItemID.RavenStaff, Do(AutoReuse, UseExact(20), DamageExact(36)) },
{ ItemID.RazorbladeTyphoon, Do(DamageExact(103)) },
{ ItemID.Razorpine, Do(DamageExact(40)) },
{ ItemID.RedPhaseblade, Do(AutoReuse, UseTurn, DamageExact(32)) },
{ ItemID.RedPhasesaber, Do(ScaleRatio(1.5f), DamageExact(60)) },
@@ -199,6 +200,7 @@ namespace CalamityMod.Items
{ ItemID.RocketIV, Do(DamageRatio(0.75f)) },
{ ItemID.Sandgun, Do(PointBlank, DamageExact(22), UseExact(20)) },
{ ItemID.SapphireStaff, Do(DamageExact(25)) },
{ ItemID.SDMG, Do(PointBlank, DamageExact(80)) },
{ ItemID.Seedler, Do(UseMeleeSpeed, DamageRatio(1.5f)) },
{ ItemID.ShadowbeamStaff, Do(DamageExact(100)) },
{ ItemID.ShadowFlameBow, Do(PointBlank, DamageExact(55)) },
@@ -444,7 +446,6 @@ namespace CalamityMod.Items
{ ItemID.QuadBarrelShotgun, pointBlank },
{ ItemID.Revolver, Do(PointBlank, AutoReuse) },
{ ItemID.RichMahoganyBow, pointBlank },
{ ItemID.SDMG, pointBlank },
{ ItemID.ShadewoodBow, pointBlank },
{ ItemID.SilverBow, pointBlank },
{ ItemID.SniperRifle, pointBlank },
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
public override void SetDefaults()
{
Item.damage = 300;
Item.damage = 280;
Item.DamageType = DamageClass.Magic;
Item.mana = 20;
Item.width = 58;
+1 -1
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 56;
Item.height = 56;
Item.damage = 25;
Item.damage = 26;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = 21;
Item.useTime = 21;
+3 -3
View File
@@ -12,12 +12,12 @@ namespace CalamityMod.Items.Weapons.Ranged
public new string LocalizationCategory => "Items.Weapons.Ranged";
public override void SetDefaults()
{
Item.damage = 52;
Item.damage = 48;
Item.DamageType = DamageClass.Ranged;
Item.width = 66;
Item.height = 24;
Item.useTime = 30;
Item.useAnimation = 30;
Item.useTime = 35;
Item.useAnimation = 35;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 4.5f;
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
Item.damage = 86;
Item.damage = 74;
Item.DamageType = DamageClass.Ranged;
Item.width = 68;
Item.height = 32;
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
Item.damage = 27;
Item.damage = 24;
Item.DamageType = DamageClass.Ranged;
Item.width = 56;
Item.height = 24;
+2 -2
View File
@@ -34,8 +34,8 @@ namespace CalamityMod.Items.Weapons.Ranged
{
Item.damage = 40;
Item.DamageType = DamageClass.Ranged;
Item.width = 54;
Item.height = 26;
Item.width = 52;
Item.height = 30;
Item.useTime = Item.useAnimation = 10;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 657 B

After

Width:  |  Height:  |  Size: 757 B

+1 -1
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public new string LocalizationCategory => "Items.Weapons.Ranged";
public override void SetDefaults()
{
Item.damage = 68;
Item.damage = 56;
Item.DamageType = DamageClass.Ranged;
Item.width = 76;
Item.height = 36;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 802 B

After

Width:  |  Height:  |  Size: 720 B

+9
View File
@@ -5235,6 +5235,15 @@ namespace CalamityMod.NPCs
#region On Spawn
public override void OnSpawn(NPC npc, IEntitySource source)
{
if (npc.type == NPCID.Deerclops)
{
DeerclopsAI.hasTargetBeenInRange = false;
DeerclopsAI.borderDelay = 7f * 60f;
DeerclopsAI.borderScalar = 0f;
DeerclopsAI.innerBorder = DeerclopsAI.maxDRIncreaseDistance * 5f;
DeerclopsAI.outerBorder = DeerclopsAI.maxDRIncreaseDistance * 5f;
}
if (npc.type != NPCID.VoodooDemon)
return;
+44 -9
View File
@@ -1,8 +1,4 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Events;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.DataStructures;
@@ -11,13 +7,23 @@ using Terraria.Graphics.CameraModifiers;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
using CalamityMod.Projectiles.Boss;
using CalamityMod.NPCs.TownNPCs;
using CalamityMod.World;
namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
{
public static class DeerclopsAI
{
public static bool shouldDrawEnrageBorder = true;
public static bool hasTargetBeenInRange = true;
public const float increaseDRTriggerDistance = 450f;
public const float maxDRIncreaseDistance = 900f;
public static float borderDelay = 10f * 60f;
public static float innerBorder = 450f;
public static float outerBorder = 900f;
public static float borderScalar = 0f;
public static Vector2 lastDeerclopsPosition;
public static bool BuffedDeerclopsAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
@@ -46,14 +52,16 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
bool goHome = false;
// Damage resistance based on distance from target
float increaseDRTriggerDistance = 450f;
float maxDRIncreaseDistance = 900f;
float distanceFromTarget = npc.Distance(targetData.Center);
bool triggerDRIncrease = distanceFromTarget >= increaseDRTriggerDistance;
float resistDamageAmount = MathHelper.Clamp((distanceFromTarget - increaseDRTriggerDistance) / (maxDRIncreaseDistance - increaseDRTriggerDistance), 0f, 1f);
npc.localAI[3] = MathHelper.Lerp(0f, 30f, resistDamageAmount);
float dustAndDRScalar = Utils.Remap(npc.localAI[3], 0f, 30f, 0f, 1f);
calamityGlobalNPC.DR = MathHelper.Lerp(0.05f, 0.9f, dustAndDRScalar);
if (borderDelay > 0f)
borderDelay -= 1f;
if (dustAndDRScalar > 0f)
{
float invincibleDustAmount = Main.rand.NextFloat() * dustAndDRScalar * 3f;
@@ -63,6 +71,33 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
Dust.NewDustDirect(npc.position, npc.width, npc.height, 109, 0f, -3f, 0, default(Color), 1.4f).noGravity = true;
}
}
else if (!hasTargetBeenInRange)
{
//Target entered the border for the first time
hasTargetBeenInRange = true;
if (borderDelay > 120f)
borderDelay = 120f;
}
if (innerBorder != increaseDRTriggerDistance || maxDRIncreaseDistance != outerBorder)
{
//Adjust the border IF the new value is lower (helps prevent jumping if you enter the border early while it's on screen but not finished zooming in)
var LerpValue = Utils.GetLerpValue(hasTargetBeenInRange ? 120f : 180f, 0f, borderDelay, true);
var newInner = MathHelper.Lerp(maxDRIncreaseDistance * 5f, increaseDRTriggerDistance, LerpValue);
if (newInner < innerBorder)
innerBorder = newInner;
var newOuter = MathHelper.Lerp(maxDRIncreaseDistance * 5f, maxDRIncreaseDistance, LerpValue);
if (newOuter < outerBorder)
outerBorder = newOuter;
}
if ((hasTargetBeenInRange && borderScalar < 1f) || borderDelay > 0f)
{
//fade in, with full opacity only available after being inside the border for the first time
borderScalar = MathHelper.Clamp(borderScalar + 0.015f, 0f, hasTargetBeenInRange ? 1f : 0.9f);
}
shouldDrawEnrageBorder = CalamityWorld.revenge || CalamityWorld.death;
//Set the last deerclops position (used only for post-death border shenanigans)
lastDeerclopsPosition = npc.Center;
// Spawn settings
if (npc.homeTileX == -1 && npc.homeTileY == -1)
+1 -1
View File
@@ -153,7 +153,7 @@ namespace CalamityMod.Projectiles.Melee
shadowflame.noGravity = true;
}
if (Main.myPlayer == Projectile.owner && Owner.itemAnimation % 4 == 3 && Owner.itemAnimation < Owner.itemAnimationMax - 3)
if (Main.myPlayer == Projectile.owner && Owner.itemAnimation % 5 == 3 && Owner.itemAnimation < Owner.itemAnimationMax - 3)
{
Vector2 bloodScytheShootVelocity = (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2();
bloodScytheShootVelocity.Y *= 0.04f;
+2 -2
View File
@@ -37,8 +37,8 @@ namespace CalamityMod.Projectiles.Melee
if (potentialTarget != null && Projectile.timeLeft >= 480)
{
float flySpeed = Projectile.velocity.Length();
if (flySpeed < 8f)
flySpeed = 8f;
if (flySpeed < 10f)
flySpeed = 10f;
Projectile.Center = Projectile.Center.MoveTowards(potentialTarget.Center, 1.75f);
Projectile.velocity = (Projectile.velocity * 14f + Projectile.SafeDirectionTo(potentialTarget.Center) * flySpeed) / 15f;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

After

Width:  |  Height:  |  Size: 481 B

+22 -9
View File
@@ -14,7 +14,8 @@ namespace CalamityMod.Projectiles.Typeless
{
public new string LocalizationCategory => "Projectiles.Typeless";
public Player Owner => Main.player[Projectile.owner];
public float beamWidth = 1.04f;
public bool beamsize = false;
public CalamityPlayer moddedOwner => Owner.Calamity();
public override void SetStaticDefaults()
@@ -35,6 +36,18 @@ namespace CalamityMod.Projectiles.Typeless
public override void AI()
{
if (beamWidth <= 0.96f)
{
beamsize = true;
}
if (beamWidth >= 1.04f)
{
beamsize = false;
}
beamWidth += (beamsize ? 0.015f : -0.015f);
Projectile.scale = beamWidth;
if (Projectile.timeLeft >= 240)
{
int dustAmount = 200;
@@ -43,19 +56,19 @@ namespace CalamityMod.Projectiles.Typeless
float angle = MathHelper.TwoPi / dustAmount * d;
Vector2 velocity = angle.ToRotationVector2() * Main.rand.NextFloat(5f, 40f);
Dust spawnDust = Dust.NewDustPerfect(Owner.Center, 206, velocity);
Dust spawnDust = Dust.NewDustPerfect(Projectile.Center, 204, velocity);
spawnDust.noGravity = true;
spawnDust.scale = velocity.Length() * 0.15f;
spawnDust.scale = velocity.Length() * 0.05f;
spawnDust.velocity *= 0.4f;
}
}
// Stay on the player's head
Projectile.Center = Owner.Center - Vector2.UnitY * 45f - Owner.velocity * 0.7f;
Projectile.Center = (Owner.MountedCenter + new Vector2(0, -45));
Vector2 spawnPos = Projectile.Center + Main.rand.NextVector2Circular(5, 5);
int lifetime = Main.rand.Next(3, 6);
float scale = Main.rand.NextFloat(0.5f, 0.9f);
Color color = Main.rand.NextBool(3) ? Color.DeepSkyBlue : Color.LightSkyBlue;
Color color = Main.rand.NextBool(3) ? Color.LightGreen : Color.Khaki;
SparkParticle spark1 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(7, 12), Main.rand.NextFloat(7, 12)), false, lifetime, scale, color);
GeneralParticleHandler.SpawnParticle(spark1);
SparkParticle spark2 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(-7, -12), Main.rand.NextFloat(7, 12)), false, lifetime, scale, color);
@@ -70,7 +83,7 @@ namespace CalamityMod.Projectiles.Typeless
GeneralParticleHandler.SpawnParticle(spark6);
// Emit some light
Vector3 Light = new Vector3(0.015f, 0.157f, 0.247f);
Vector3 Light = new Vector3(0.251f, 0.255f, 0.219f);
Lighting.AddLight(Projectile.Center, Light * 5);
}
public override void OnKill(int timeLeft)
@@ -81,10 +94,10 @@ namespace CalamityMod.Projectiles.Typeless
{
float rot = MathHelper.ToRadians(i * rotFactor);
Vector2 offset = new Vector2(8f, 0).RotatedBy(rot);
Vector2 velOffset = new Vector2(4f, 0).RotatedBy(rot);
Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, 206, new Vector2(velOffset.X, velOffset.Y));
Vector2 velOffset = new Vector2(2.5f, 0).RotatedBy(rot);
Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, 204, new Vector2(velOffset.X, velOffset.Y));
dust.noGravity = true;
dust.velocity = velOffset;
dust.velocity = velOffset * Main.rand.NextFloat(0.9f, 1.1f);
dust.scale = 2.5f;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB