1 - Spectre Hood set bonus no longer nerfs magic damage.
2 - Destroyer resists Aftershock and Avalanche projectiles by 50%. 3 - PBG hovers 10 tiles closer to the player on the Y axis. 4 - Adjusted Grand Guardian a bit and made the healing orbs home in on their user after a delay. 5 - Removed Chlorophyte Bullet IL edit and overrode the AI instead to make the dust look better and produce less. 6 - Reduced Boss Rush EoW DR.
This commit is contained in:
1 parent
d16a770da6
commit
daa48fe357
13 files changed
+167
-93
No files matched your search
@@ -157,6 +157,15 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Dormant Brimseeker.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
|
||||
|
||||
// 50% resist to Aftershock Rocks.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AftershockRock>()))));
|
||||
|
||||
// 50% resist to Avalanche Ice Bombs.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<IceBombFriendly>()))));
|
||||
|
||||
// 50% resist to Avalanche Frost Shards.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<FrostShardFriendly>()))));
|
||||
|
||||
// 45% resist to Mounted Scanner.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<MountedScannerLaser>()))));
|
||||
|
||||
|
||||
@@ -93,7 +93,6 @@ namespace CalamityMod.ILEditing
|
||||
// Damage and health balance
|
||||
On_Main.DamageVar_float_int_float += AdjustDamageVariance;
|
||||
IL_NPC.ScaleStats_ApplyExpertTweaks += RemoveExpertHardmodeScaling;
|
||||
IL_Projectile.AI_001 += AdjustChlorophyteBullets;
|
||||
IL_Projectile.AI_099_2 += LimitTerrarianProjectiles;
|
||||
IL_Player.UpdateBuffs += NerfSharpeningStation;
|
||||
IL_Player.UpdateBuffs += NerfBeetleScaleMail;
|
||||
|
||||
@@ -1186,26 +1186,6 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Chlorophyte Bullet Dust Reducing
|
||||
private static void AdjustChlorophyteBullets(ILContext il)
|
||||
{
|
||||
// Reduce dust from 10 to 5 and homing range.
|
||||
var cursor = new ILCursor(il);
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcI4(ProjectileID.ChlorophyteBullet)))
|
||||
{
|
||||
LogFailure("Chlorophyte Bullet AI", "Could not locate the bullet ID.");
|
||||
return;
|
||||
}
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcI4(10))) // The number of dust spawned by the bullet.
|
||||
{
|
||||
LogFailure("Chlorophyte Bullet AI", "Could not locate the dust quantity.");
|
||||
return;
|
||||
}
|
||||
cursor.Remove();
|
||||
cursor.Emit(OpCodes.Ldc_I4_5); // Decrease dust to 5.
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Make Tax Collector Worth it
|
||||
private static void MakeTaxCollectorUseful(ILContext il)
|
||||
{
|
||||
|
||||
@@ -1031,7 +1031,7 @@ namespace CalamityMod.Items
|
||||
}
|
||||
else if (set == "SpectreHealing")
|
||||
{
|
||||
player.GetDamage<MagicDamageClass>() += 0.2f;
|
||||
player.GetDamage<MagicDamageClass>() += 0.4f;
|
||||
player.setBonus = CalamityUtils.GetTextValue("Vanilla.Armor.SetBonus.SpectreHealing");
|
||||
}
|
||||
else if (set == "SolarFlare")
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public class DefiledGreatsword : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Melee";
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 102;
|
||||
|
||||
@@ -10,6 +10,13 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public class GrandGuardian : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Melee";
|
||||
|
||||
internal const int TotalHealOrbs = 3;
|
||||
|
||||
internal const int HealPerOrb = 3;
|
||||
|
||||
internal const int TotalHealed = TotalHealOrbs * HealPerOrb;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 130;
|
||||
@@ -72,31 +79,27 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
if (targetLife <= (targetMaxLife * 0.5f) && player.ownedProjectileCounts[ModContent.ProjectileType<RainBolt>()] < 3)
|
||||
{
|
||||
float randomSpeedX = Main.rand.Next(6, 13);
|
||||
float randomSpeedY = Main.rand.Next(6, 13);
|
||||
float randomSpeedX = Main.rand.NextFloat(6f, 12f);
|
||||
float randomSpeedY = Main.rand.NextFloat(6f, 12f);
|
||||
Projectile.NewProjectile(source, targetPos.X, targetPos.Y, -randomSpeedX, -randomSpeedY, ModContent.ProjectileType<RainBolt>(), rainBoltDamage, knockback, player.whoAmI);
|
||||
Projectile.NewProjectile(source, targetPos.X, targetPos.Y, randomSpeedX, -randomSpeedY, ModContent.ProjectileType<RainBolt>(), rainBoltDamage, knockback, player.whoAmI);
|
||||
Projectile.NewProjectile(source, targetPos.X, targetPos.Y, 0f, -randomSpeedY, ModContent.ProjectileType<RainBolt>(), rainBoltDamage, knockback, player.whoAmI);
|
||||
}
|
||||
if (targetLife <= 0 && !player.moonLeech && player.ownedProjectileCounts[ModContent.ProjectileType<RainHeal>()] < 3)
|
||||
|
||||
if (player.moonLeech || player.lifeSteal <= 0f)
|
||||
return;
|
||||
|
||||
if (targetLife <= 0 && !player.moonLeech && player.ownedProjectileCounts[ModContent.ProjectileType<RainHeal>()] < 3 && targetMaxLife > 5)
|
||||
{
|
||||
float randomSpeedX = Main.rand.Next(3, 7);
|
||||
float randomSpeedY = Main.rand.Next(3, 7);
|
||||
player.lifeSteal -= TotalHealed;
|
||||
float randomSpeedX = Main.rand.NextFloat(3f, 4.5f);
|
||||
float randomSpeedY = Main.rand.NextFloat(3f, 4.5f);
|
||||
Projectile.NewProjectile(source, targetPos.X, targetPos.Y, -randomSpeedX, -randomSpeedY, ModContent.ProjectileType<RainHeal>(), 0, 0f, player.whoAmI);
|
||||
Projectile.NewProjectile(source, targetPos.X, targetPos.Y, randomSpeedX, -randomSpeedY, ModContent.ProjectileType<RainHeal>(), 0, 0f, player.whoAmI);
|
||||
Projectile.NewProjectile(source, targetPos.X, targetPos.Y, 0f, -randomSpeedY, ModContent.ProjectileType<RainHeal>(), 0, 0f, player.whoAmI);
|
||||
}
|
||||
}
|
||||
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -165,7 +165,7 @@ SetBonus: {
|
||||
'''
|
||||
SpectreHealing:
|
||||
'''
|
||||
Reduces Magic damage by 20% and converts it to healing force
|
||||
Converts magic damage to healing force
|
||||
Magic damage done to enemies heals the player with lowest health
|
||||
'''
|
||||
}
|
||||
@@ -3214,7 +3214,7 @@ namespace CalamityMod.NPCs
|
||||
if (CalamityLists.AstrumDeusIDs.Contains(npc.type))
|
||||
modifiers.FinalDamage *= 1f - MathHelper.Lerp(0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / (newAI[0] != 0f ? 300f : 600f), 0f, 1f));
|
||||
if (eaterofWorldsResist)
|
||||
modifiers.FinalDamage *= 0.01f;
|
||||
modifiers.FinalDamage *= 0.05f;
|
||||
}
|
||||
|
||||
// Directly modifies final damage incoming to an NPC based on their DR (damage reduction) stat added by Calamity.
|
||||
|
||||
@@ -631,7 +631,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
|
||||
// Move closer
|
||||
bool canHitTarget = Collision.CanHit(NPC.Center, 1, 1, player.position, player.width, player.height);
|
||||
float distanceAboveTarget = !canHitTarget ? 0f : 560f;
|
||||
float distanceAboveTarget = !canHitTarget ? 0f : 400f;
|
||||
float distanceAwayFromTargetX = !canHitTarget ? 36f : 144f;
|
||||
float distanceAwayFromTargetY = player.Center.Y - NPC.Center.Y;
|
||||
float distanceAwayFromTargetYLeeway = !canHitTarget ? 16f : 48f;
|
||||
@@ -714,7 +714,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
}
|
||||
|
||||
// Move closer
|
||||
float distanceAboveTarget = !canHitTarget ? 0f : 560f;
|
||||
float distanceAboveTarget = !canHitTarget ? 0f : 400f;
|
||||
float distanceAwayFromTargetX = !canHitTarget ? 36f : 144f;
|
||||
float distanceAwayFromTargetY = player.Center.Y - NPC.Center.Y;
|
||||
float distanceAwayFromTargetYLeeway = !canHitTarget ? 16f : 48f;
|
||||
@@ -803,7 +803,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
}
|
||||
|
||||
// Move closer
|
||||
float distanceAboveTarget = !canHitTarget ? 0f : 560f;
|
||||
float distanceAboveTarget = !canHitTarget ? 0f : 400f;
|
||||
float distanceAwayFromTargetX = !canHitTarget ? 36f : 144f;
|
||||
float distanceAwayFromTargetY = player.Center.Y - NPC.Center.Y;
|
||||
float distanceAwayFromTargetYLeeway = !canHitTarget ? 16f : 48f;
|
||||
@@ -895,7 +895,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
}
|
||||
|
||||
// Move closer
|
||||
float distanceAboveTarget = !canHitTarget ? 0f : 560f;
|
||||
float distanceAboveTarget = !canHitTarget ? 0f : 400f;
|
||||
float distanceAwayFromTargetX = !canHitTarget ? 36f : 144f;
|
||||
float distanceAwayFromTargetY = player.Center.Y - NPC.Center.Y;
|
||||
float distanceAwayFromTargetYLeeway = !canHitTarget ? 16f : 48f;
|
||||
|
||||
@@ -1432,6 +1432,105 @@ namespace CalamityMod.Projectiles
|
||||
return false;
|
||||
}
|
||||
|
||||
else if (projectile.type == ProjectileID.ChlorophyteBullet)
|
||||
{
|
||||
if (projectile.alpha < 170)
|
||||
{
|
||||
int totalDust = 5;
|
||||
for (int i = 0; i < totalDust; i++)
|
||||
{
|
||||
float x2 = projectile.position.X - projectile.velocity.X / (float)totalDust * (float)i;
|
||||
float y2 = projectile.position.Y - projectile.velocity.Y / (float)totalDust * (float)i;
|
||||
int dust = Dust.NewDust(new Vector2(x2, y2), 1, 1, 75);
|
||||
Main.dust[dust].alpha = projectile.alpha;
|
||||
Main.dust[dust].position.X = x2;
|
||||
Main.dust[dust].position.Y = y2;
|
||||
Main.dust[dust].velocity *= 0f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
float velocityLength = (float)Math.Sqrt(projectile.velocity.X * projectile.velocity.X + projectile.velocity.Y * projectile.velocity.Y);
|
||||
float cachedVelocityLength = projectile.localAI[0];
|
||||
if (cachedVelocityLength == 0f)
|
||||
{
|
||||
projectile.localAI[0] = velocityLength;
|
||||
cachedVelocityLength = velocityLength;
|
||||
}
|
||||
|
||||
if (projectile.alpha > 0)
|
||||
projectile.alpha -= 25;
|
||||
|
||||
if (projectile.alpha < 0)
|
||||
projectile.alpha = 0;
|
||||
|
||||
float posX = projectile.position.X;
|
||||
float posY = projectile.position.Y;
|
||||
float homingDistance = 300f;
|
||||
bool homeIn = false;
|
||||
int target = 0;
|
||||
if (projectile.ai[1] == 0f)
|
||||
{
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].CanBeChasedBy(this) && (projectile.ai[1] == 0f || projectile.ai[1] == (float)(i + 1)))
|
||||
{
|
||||
float targetCenterX = Main.npc[i].Center.X;
|
||||
float targetCenterY = Main.npc[i].Center.Y;
|
||||
float targetDistance = Math.Abs(projectile.Center.X - targetCenterX) + Math.Abs(projectile.Center.Y - targetCenterY);
|
||||
if (targetDistance < homingDistance && Collision.CanHit(projectile.Center, 1, 1, Main.npc[i].position, Main.npc[i].width, Main.npc[i].height))
|
||||
{
|
||||
homingDistance = targetDistance;
|
||||
posX = targetCenterX;
|
||||
posY = targetCenterY;
|
||||
homeIn = true;
|
||||
target = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (homeIn)
|
||||
projectile.ai[1] = target + 1;
|
||||
|
||||
homeIn = false;
|
||||
}
|
||||
|
||||
if (projectile.ai[1] > 0f)
|
||||
{
|
||||
int targetIndex = (int)(projectile.ai[1] - 1f);
|
||||
if (Main.npc[targetIndex].active && Main.npc[targetIndex].CanBeChasedBy(this, ignoreDontTakeDamage: true) && !Main.npc[targetIndex].dontTakeDamage)
|
||||
{
|
||||
float targetCenterX = Main.npc[targetIndex].Center.X;
|
||||
float targetCenterY = Main.npc[targetIndex].Center.Y;
|
||||
float homingCutOffDistance = 1000f;
|
||||
if (Math.Abs(projectile.Center.X - targetCenterX) + Math.Abs(projectile.Center.Y - targetCenterY) < homingCutOffDistance)
|
||||
{
|
||||
homeIn = true;
|
||||
posX = Main.npc[targetIndex].Center.X;
|
||||
posY = Main.npc[targetIndex].Center.Y;
|
||||
}
|
||||
}
|
||||
else
|
||||
projectile.ai[1] = 0f;
|
||||
}
|
||||
|
||||
if (!projectile.friendly)
|
||||
homeIn = false;
|
||||
|
||||
if (homeIn)
|
||||
{
|
||||
int inertia = 8;
|
||||
float homingSpeed = cachedVelocityLength;
|
||||
Vector2 destination = new Vector2(posX, posY);
|
||||
Vector2 homeDirection = (destination - projectile.Center).SafeNormalize(Vector2.UnitY);
|
||||
projectile.velocity = (projectile.velocity * inertia + homeDirection * homingSpeed) / (inertia + 1f);
|
||||
}
|
||||
|
||||
projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Adjust dust to avoid lag.
|
||||
else if (projectile.type == ProjectileID.VampireHeal)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,37 +9,42 @@ namespace CalamityMod.Projectiles.Healing
|
||||
public class RainHeal : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Healing";
|
||||
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
|
||||
private const int TimeLeft = 300;
|
||||
|
||||
private const int HomingTime = TimeLeft - 120;
|
||||
|
||||
private const int SlowDownTime = TimeLeft - 150;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 4;
|
||||
Projectile.height = 4;
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 180;
|
||||
Projectile.timeLeft = TimeLeft;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.extraUpdates = 3;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (Projectile.timeLeft < 165)
|
||||
if (Projectile.timeLeft < HomingTime)
|
||||
{
|
||||
if (Projectile.timeLeft > 150)
|
||||
if (Projectile.timeLeft > SlowDownTime)
|
||||
Projectile.velocity *= 0.9f;
|
||||
else
|
||||
Projectile.HealingProjectile(8, Projectile.owner, 12f, 15f, false);
|
||||
Projectile.HealingProjectile(GrandGuardian.HealPerOrb, Projectile.owner, 12f, 15f);
|
||||
}
|
||||
|
||||
float dustX = Projectile.velocity.X * 0.2f;
|
||||
float dustY = -(Projectile.velocity.Y * 0.2f);
|
||||
int rainbow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f);
|
||||
Dust dust = Main.dust[rainbow];
|
||||
dust.noGravity = true;
|
||||
dust.position.X -= dustX;
|
||||
dust.position.Y -= dustY;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB));
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0f;
|
||||
Main.dust[dust].position.X -= Projectile.velocity.X * 0.2f;
|
||||
Main.dust[dust].position.Y += Projectile.velocity.Y * 0.2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,19 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
public class RainBolt : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Melee";
|
||||
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
|
||||
private const int TimeLeft = 180;
|
||||
|
||||
private const int HomingTime = TimeLeft - 30;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 10;
|
||||
@@ -17,10 +23,10 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.friendly = true;
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 180;
|
||||
Projectile.timeLeft = TimeLeft;
|
||||
}
|
||||
|
||||
public override bool? CanHitNPC(NPC target) => Projectile.timeLeft < 150 && target.CanBeChasedBy(Projectile);
|
||||
public override bool? CanHitNPC(NPC target) => Projectile.timeLeft < HomingTime && target.CanBeChasedBy(Projectile);
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
@@ -34,7 +40,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Main.dust[rainbow].noGravity = true;
|
||||
Main.dust[rainbow].velocity *= 0f;
|
||||
|
||||
if (Projectile.timeLeft < 150)
|
||||
if (Projectile.timeLeft < HomingTime)
|
||||
CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 600f, 12f, 20f);
|
||||
else
|
||||
Projectile.velocity *= 0.95f;
|
||||
@@ -45,9 +51,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
SoundEngine.PlaySound(SoundID.Item60, Projectile.Center);
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
int rain = Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB));
|
||||
int rain = Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.RainbowTorch, Projectile.oldVelocity.X, Projectile.oldVelocity.Y, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB));
|
||||
Main.dust[rain].noGravity = true;
|
||||
Main.dust[rain].velocity *= 4f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public class RainbowBoom : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Melee";
|
||||
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -27,38 +28,16 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool xflag = false;
|
||||
bool yflag = false;
|
||||
if (Projectile.velocity.X < 0f && Projectile.position.X < Projectile.ai[0])
|
||||
{
|
||||
xflag = true;
|
||||
}
|
||||
if (Projectile.velocity.X > 0f && Projectile.position.X > Projectile.ai[0])
|
||||
{
|
||||
xflag = true;
|
||||
}
|
||||
if (Projectile.velocity.Y < 0f && Projectile.position.Y < Projectile.ai[1])
|
||||
{
|
||||
yflag = true;
|
||||
}
|
||||
if (Projectile.velocity.Y > 0f && Projectile.position.Y > Projectile.ai[1])
|
||||
{
|
||||
yflag = true;
|
||||
}
|
||||
if (xflag && yflag)
|
||||
{
|
||||
Projectile.Kill();
|
||||
}
|
||||
float projTimer = 25f;
|
||||
if (Projectile.ai[0] > 180f)
|
||||
{
|
||||
projTimer -= (Projectile.ai[0] - 180f) / 2f;
|
||||
}
|
||||
|
||||
if (projTimer <= 0f)
|
||||
{
|
||||
projTimer = 0f;
|
||||
Projectile.Kill();
|
||||
}
|
||||
|
||||
projTimer *= 0.7f;
|
||||
Projectile.ai[0] += 4f;
|
||||
int timerCounter = 0;
|
||||
@@ -75,19 +54,12 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Main.dust[rainbow].noGravity = true;
|
||||
Main.dust[rainbow].position.X = Projectile.Center.X;
|
||||
Main.dust[rainbow].position.Y = Projectile.Center.Y;
|
||||
Dust expr_149DF_cp_0 = Main.dust[rainbow];
|
||||
expr_149DF_cp_0.position.X += (float)Main.rand.Next(-10, 11);
|
||||
Dust expr_14A09_cp_0 = Main.dust[rainbow];
|
||||
expr_14A09_cp_0.position.Y += (float)Main.rand.Next(-10, 11);
|
||||
Main.dust[rainbow].position.X += (float)Main.rand.Next(-10, 11);
|
||||
Main.dust[rainbow].position.Y += (float)Main.rand.Next(-10, 11);
|
||||
Main.dust[rainbow].velocity.X = rando1;
|
||||
Main.dust[rainbow].velocity.Y = rando2;
|
||||
timerCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user