Buffed Shattered Sun by 10%, doubled explosion damage, removed split falloff
This commit is contained in:
1 parent
722dace865
commit
41b1c46256
4 files changed
+32
-40
No files matched your search
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
item.width = 56;
|
||||
item.height = 56;
|
||||
item.damage = 68;
|
||||
item.damage = 75;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useAnimation = 12;
|
||||
@@ -29,16 +29,16 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
item.knockBack = 6f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = true;
|
||||
item.value = CalamityGlobalItem.Rarity12BuyPrice;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.Calamity().customRarity = CalamityRarity.Turquoise;
|
||||
item.shoot = ModContent.ProjectileType<ShatteredSunKnife>();
|
||||
item.value = CalamityGlobalItem.Rarity12BuyPrice;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.Calamity().customRarity = CalamityRarity.Turquoise;
|
||||
item.shoot = ModContent.ProjectileType<ShatteredSunKnife>();
|
||||
item.shootSpeed = 25f;
|
||||
item.Calamity().rogue = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void GetWeaponCrit(Player player, ref int crit) => crit += 10;
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void GetWeaponCrit(Player player, ref int crit) => crit += 10;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
@@ -55,8 +55,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Explosion");
|
||||
DisplayName.SetDefault("Shattered Sun Blast");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -49,14 +48,16 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (projectile.ai[1] == 20f)
|
||||
{
|
||||
int numProj = 5;
|
||||
float rotation = MathHelper.ToRadians(10);
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int spread = 6;
|
||||
int projID = ModContent.ProjectileType<ShatteredSunScorchedBlade>();
|
||||
int splitDamage = (int)(0.75f * projectile.damage);
|
||||
float splitKB = 1f;
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedspeed = new Vector2(projectile.velocity.X, projectile.velocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread));
|
||||
int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedspeed.X * 0.2f, perturbedspeed.Y * 0.2f, ModContent.ProjectileType<ShatteredSunScorchedBlade>(), (int)((double)projectile.damage * 0.75), 1f, projectile.owner, 0f, 0f);
|
||||
int proj = Projectile.NewProjectile(projectile.Center, perturbedspeed * 0.2f, projID, splitDamage, splitKB, projectile.owner, 0f, 0f);
|
||||
Main.projectile[proj].Calamity().stealthStrike = projectile.Calamity().stealthStrike;
|
||||
spread -= Main.rand.Next(2, 6);
|
||||
}
|
||||
@@ -68,7 +69,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
//Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
@@ -90,22 +90,22 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
private void ShatteredExplosion()
|
||||
{
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<ShatteredExplosion>(), (int) ((double) damage * 0.15), projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
int projID = ModContent.ProjectileType<ShatteredExplosion>();
|
||||
int explosionDamage = (int)(projectile.damage * 0.3f);
|
||||
float explosionKB = 3f;
|
||||
Projectile.NewProjectile(projectile.Center, Vector2.Zero, projID, explosionDamage, explosionKB, projectile.owner, 0f, 0f);
|
||||
Main.PlaySound(SoundID.Item14, projectile.position);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<ShatteredExplosion>(), (int)((double)damage * 0.15), projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
Main.PlaySound(SoundID.Item14, projectile.position);
|
||||
}
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => ShatteredExplosion();
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit) => ShatteredExplosion();
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<ShatteredExplosion>(), (int)((double)projectile.damage * 0.15), projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
Main.PlaySound(SoundID.Item14, projectile.position);
|
||||
ShatteredExplosion();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public class ShatteredSunScorchedBlade : ModProjectile
|
||||
{
|
||||
int counter = 0;
|
||||
float multiplier = 1f;
|
||||
bool stealthOrigin = false;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
@@ -53,9 +52,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
if (counter % 10 == 0)
|
||||
{
|
||||
multiplier -= 0.005f;
|
||||
if (multiplier >= 0.5f && !stealthOrigin && projectile.alpha < 200)
|
||||
projectile.alpha += Main.rand.Next(5, 7);
|
||||
if (!stealthOrigin && projectile.alpha < 200)
|
||||
projectile.alpha += 6;
|
||||
}
|
||||
if (counter % 9 == 0 || (counter % 5 == 0 && projectile.Calamity().stealthStrike))
|
||||
{
|
||||
@@ -78,7 +76,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
Lighting.AddLight(projectile.Center, 0.7f, 0.3f, 0f);
|
||||
CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 400f, 20f, 20f);
|
||||
float num633 = 700f;
|
||||
float num633;
|
||||
Vector2 vector46 = projectile.position;
|
||||
bool flag25 = false;
|
||||
for (int num645 = 0; num645 < 200; num645++)
|
||||
@@ -123,13 +121,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (multiplier < 0.5f)
|
||||
multiplier = 0.5f;
|
||||
damage = stealthOrigin ? damage : (int)((float)damage * multiplier);
|
||||
if (projectile.Calamity().stealthStrike)
|
||||
{
|
||||
int numProj = 2;
|
||||
float rotation = MathHelper.ToRadians(10);
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Player owner = Main.player[projectile.owner];
|
||||
@@ -140,8 +134,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedspeed = new Vector2(correctedVelocity.X, correctedVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread));
|
||||
|
||||
int proj = Projectile.NewProjectile(owner.Center.X, owner.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType<ShatteredSunScorchedBlade>(), (int)((double)projectile.damage * 0.6), 1f, projectile.owner, 1f, projectile.alpha);
|
||||
int projDamage = (int)(projectile.damage * 0.6f);
|
||||
float kb = 1f;
|
||||
int proj = Projectile.NewProjectile(owner.Center.X, owner.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, projectile.type, projDamage, kb, projectile.owner, 1f, projectile.alpha);
|
||||
spread -= Main.rand.Next(2, 6);
|
||||
Main.projectile[proj].ai[0] = 1f;
|
||||
}
|
||||
@@ -153,13 +148,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
if (multiplier < 0.5f)
|
||||
multiplier = 0.5f;
|
||||
damage = stealthOrigin ? damage : (int)((double)damage * multiplier);
|
||||
if (projectile.Calamity().stealthStrike)
|
||||
{
|
||||
int numProj = 2;
|
||||
float rotation = MathHelper.ToRadians(10);
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Player owner = Main.player[projectile.owner];
|
||||
@@ -170,8 +161,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedspeed = new Vector2(correctedVelocity.X, correctedVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread));
|
||||
|
||||
int proj = Projectile.NewProjectile(owner.Center.X, owner.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType<ShatteredSunScorchedBlade>(), (int)((double)projectile.damage * 0.55), 1f, projectile.owner, 0f, 0f);
|
||||
int projDamage = (int)(projectile.damage * 0.6f);
|
||||
float kb = 1f;
|
||||
int proj = Projectile.NewProjectile(owner.Center.X, owner.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, projectile.type, projDamage, kb, projectile.owner, 1f, projectile.alpha);
|
||||
spread -= Main.rand.Next(2, 6);
|
||||
Main.projectile[proj].ai[0] = 1f;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user