Darklight Greatsword balancing
This weapon is pretty cool (hehe)
This commit is contained in:
1 parent
1ece49bc3b
commit
3715ef542b
4 files changed
+15
-10
No files matched your search
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
internal const float TrueMeleeSlashProjectileDamageMultiplier = 0.8f;
|
||||
|
||||
internal const float SlashProjectileDamageMultiplier = 0.5f;
|
||||
internal const float SlashProjectileDamageMultiplier = 0.4125f; // Makes them do 33% damage since main projectile does 80% damage
|
||||
|
||||
internal const int SlashProjectileLimit = 4;
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(Main.rand.NextBool() ? BuffID.Frostburn2 : BuffID.OnFire, 240);
|
||||
target.AddBuff(Main.rand.NextBool() ? BuffID.Frostburn2 : BuffID.OnFire3, 240);
|
||||
int slashCreatorID = ModContent.ProjectileType<DarklightGreatswordSlashCreator>();
|
||||
int slashDamage = (int)(player.CalcIntDamage<MeleeDamageClass>(Item.damage) * TrueMeleeSlashProjectileDamageMultiplier);
|
||||
float slashKnockback = Item.knockBack * TrueMeleeSlashProjectileDamageMultiplier;
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo) => target.AddBuff(Main.rand.NextBool() ? BuffID.Frostburn2 : BuffID.OnFire, 240);
|
||||
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo) => target.AddBuff(Main.rand.NextBool() ? BuffID.Frostburn2 : BuffID.OnFire3, 240);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.penetrate = -1; // Actually only hits three times, set to infinite so the fade out works still
|
||||
Projectile.timeLeft = TimeLeft;
|
||||
Projectile.usesIDStaticNPCImmunity = true;
|
||||
Projectile.idStaticNPCHitCooldown = 24;
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (Projectile.timeLeft > FadeOutTime)
|
||||
{
|
||||
if (Projectile.velocity.Length() < MaxVelocity)
|
||||
Projectile.velocity *= 1.05f;
|
||||
Projectile.velocity *= 1.055f;
|
||||
}
|
||||
else
|
||||
Projectile.velocity *= 0.95f;
|
||||
@@ -99,6 +99,9 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.Frostburn2, 120);
|
||||
if (Projectile.numHits >= 2) // Fades out after the third hit
|
||||
Projectile.timeLeft = FadeOutTime;
|
||||
|
||||
int slashCreatorID = ModContent.ProjectileType<DarklightGreatswordSlashCreator>();
|
||||
int damage = (int)(Projectile.damage * DarklightGreatsword.SlashProjectileDamageMultiplier);
|
||||
float knockback = Projectile.knockBack * DarklightGreatsword.SlashProjectileDamageMultiplier;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.NPCs.OldDuke;
|
||||
using CalamityMod.Sounds;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.penetrate = -1; // Actually only hits three times, set to infinite so the fade out works still
|
||||
Projectile.timeLeft = TimeLeft;
|
||||
Projectile.usesIDStaticNPCImmunity = true;
|
||||
Projectile.idStaticNPCHitCooldown = 24;
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (Projectile.timeLeft > FadeOutTime)
|
||||
{
|
||||
if (Projectile.velocity.Length() < MaxVelocity)
|
||||
Projectile.velocity *= 1.025f;
|
||||
Projectile.velocity *= 1.055f;
|
||||
}
|
||||
else
|
||||
Projectile.velocity *= 0.925f;
|
||||
@@ -98,7 +98,10 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.OnFire, 120);
|
||||
target.AddBuff(BuffID.OnFire3, 120);
|
||||
if (Projectile.numHits >= 2) // Fades out after the third hit
|
||||
Projectile.timeLeft = FadeOutTime;
|
||||
|
||||
int slashCreatorID = ModContent.ProjectileType<DarklightGreatswordSlashCreator>();
|
||||
int damage = (int)(Projectile.damage * DarklightGreatsword.SlashProjectileDamageMultiplier);
|
||||
float knockback = Projectile.knockBack * DarklightGreatsword.SlashProjectileDamageMultiplier;
|
||||
@@ -109,7 +112,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.OnFire, 120);
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.OnFire3, 120);
|
||||
|
||||
public override bool? CanDamage() => Projectile.timeLeft < FadeOutTime ? false : null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user