Cosmic Shiv balancing + tooltip
This commit is contained in:
1 parent
d4e304e2df
commit
d5bc7ff9c6
5 files changed
+82
-79
No files matched your search
@@ -20,16 +20,16 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.noUseGraphic = true;
|
||||
Item.autoReuse = true;
|
||||
Item.useStyle = ItemUseStyleID.Rapier;
|
||||
Item.damage = 300;
|
||||
Item.damage = 240;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useAnimation = Item.useTime = 38;
|
||||
Item.useAnimation = Item.useTime = 40;
|
||||
Item.shoot = ModContent.ProjectileType<CosmicShivProj>();
|
||||
Item.shootSpeed = 2.4f;
|
||||
Item.knockBack = 9f;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.value = CalamityGlobalItem.Rarity14BuyPrice;
|
||||
Item.rare = ModContent.RarityType<DarkBlue>();
|
||||
Item.Calamity().donorItem = true; // revertusernamechange on Discord (Yatagarasu)
|
||||
Item.Calamity().donorItem = true; // revertusernamechange on Discord (Yatagarasu)
|
||||
}
|
||||
|
||||
public override bool MeleePrefix() => true;
|
||||
@@ -43,4 +43,4 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -288,8 +288,9 @@ CosmicShiv: {
|
||||
DisplayName: Cosmic Shiv
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a cosmic beam that homes in on enemies
|
||||
Upon hitting an enemy, a barrage of offscreen objects home in on the enemy as well as raining stars
|
||||
Fires a cosmic star that homes in on enemies
|
||||
Upon hitting an enemy, a barrage of blades will persistently strike
|
||||
Landing more stars causes more blades to strike
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -65,8 +65,10 @@ CosmicBolt.DisplayName: Cosmic Bolt
|
||||
CosmicDischargeFlail.DisplayName: Cosmic Discharge
|
||||
CosmicIceBurst.DisplayName: Cosmic Ice
|
||||
CosmicOrb.DisplayName: Cosmic Orb
|
||||
CosmicShivAura.DisplayName: Cosmic Shiv Aura
|
||||
CosmicShivBall.DisplayName: Cosmic Energy
|
||||
CosmicShivBlade.DisplayName: Cosmic Beam
|
||||
CosmicShivTrail.DisplayName: Cosmic Shiv Trail
|
||||
CosmicSpiritBomb1.DisplayName: Cosmic Bomb
|
||||
CosmicSpiritBomb2.DisplayName: Cosmic Bomb
|
||||
CosmicSpiritBomb3.DisplayName: Cosmic Bomb
|
||||
|
||||
@@ -1,71 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
public class CosmicShivAura : ModProjectile
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Melee";
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
|
||||
public readonly int SwordsAverageDelay = 40;
|
||||
public readonly int SwordsRandomOffset = 15;
|
||||
public int CurrentSwordTimer;
|
||||
public NPC target;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 2;
|
||||
Projectile.height = 2;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 300;
|
||||
}
|
||||
|
||||
public override void OnSpawn(IEntitySource source)
|
||||
{
|
||||
if (Main.npc[(int)Projectile.ai[0]] is not null || Main.npc[(int)Projectile.ai[0]].active)
|
||||
target = Main.npc[(int)Projectile.ai[0]]; // Convert target.whoAmI to object
|
||||
}
|
||||
|
||||
// ai[0] for ID of target to follow until the end of projectile's lifespan or the target cannot be found
|
||||
// ai[1] for sword timer
|
||||
public override void AI()
|
||||
{
|
||||
// Unexist with target
|
||||
if (target is null || !target.active) {
|
||||
Projectile.Kill();
|
||||
}
|
||||
|
||||
Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center; // Stay with target
|
||||
|
||||
if (Projectile.ai[1] == CurrentSwordTimer)
|
||||
{
|
||||
Vector2 randomDirection = Main.rand.NextFloat(0, MathHelper.TwoPi).ToRotationVector2();
|
||||
randomDirection.Normalize();
|
||||
int randomDistance = Main.rand.Next(200, 426);
|
||||
Vector2 spawnPos = Projectile.Center + (randomDirection * randomDistance);
|
||||
Vector2 velocity = Vector2.Normalize(Projectile.Center - spawnPos) * Utils.GetLerpValue(-100, 426, randomDistance, clamped: true) * 20f; // Sword moves a bit slower if spawned closer, moves faster if spawned further
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPos.X, spawnPos.Y, velocity.X, velocity.Y, ModContent.ProjectileType<CosmicShivBlade>(), Projectile.damage, Projectile.knockBack * 0.8f, Projectile.owner, randomDistance);
|
||||
Projectile.ai[1] = 0; // Reset timer
|
||||
CurrentSwordTimer = Main.rand.Next(SwordsAverageDelay - SwordsRandomOffset, SwordsAverageDelay + SwordsRandomOffset); // Determine when next sword will spawn
|
||||
}
|
||||
|
||||
Projectile.ai[1]++;
|
||||
}
|
||||
|
||||
// The aura itself should not do contact damage
|
||||
public override bool? CanDamage() => false;
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
public class CosmicShivAura : ModProjectile
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Melee";
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
|
||||
public readonly int SwordsAverageDelay = 40;
|
||||
public readonly int SwordsRandomOffset = 15;
|
||||
public int CurrentSwordTimer;
|
||||
public NPC target;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 2;
|
||||
Projectile.height = 2;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 240;
|
||||
}
|
||||
|
||||
public override void OnSpawn(IEntitySource source)
|
||||
{
|
||||
if (Main.npc[(int)Projectile.ai[0]] is not null || Main.npc[(int)Projectile.ai[0]].active)
|
||||
target = Main.npc[(int)Projectile.ai[0]]; // Convert target.whoAmI to object
|
||||
}
|
||||
|
||||
// ai[0] for ID of target to follow until the end of projectile's lifespan or the target cannot be found
|
||||
// ai[1] for sword timer
|
||||
public override void AI()
|
||||
{
|
||||
// Unexist with target
|
||||
if (target is null || !target.active) {
|
||||
Projectile.Kill();
|
||||
}
|
||||
|
||||
Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center; // Stay with target
|
||||
|
||||
if (Projectile.ai[1] == CurrentSwordTimer)
|
||||
{
|
||||
Vector2 randomDirection = Main.rand.NextFloat(0, MathHelper.TwoPi).ToRotationVector2();
|
||||
randomDirection.Normalize();
|
||||
int randomDistance = Main.rand.Next(200, 426);
|
||||
Vector2 spawnPos = Projectile.Center + (randomDirection * randomDistance);
|
||||
Vector2 velocity = Vector2.Normalize(Projectile.Center - spawnPos) * Utils.GetLerpValue(-100, 426, randomDistance, clamped: true) * 20f; // Sword moves a bit slower if spawned closer, moves faster if spawned further
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPos.X, spawnPos.Y, velocity.X, velocity.Y, ModContent.ProjectileType<CosmicShivBlade>(), Projectile.damage, Projectile.knockBack * 0.8f, Projectile.owner, randomDistance);
|
||||
Projectile.ai[1] = 0; // Reset timer
|
||||
CurrentSwordTimer = Main.rand.Next(SwordsAverageDelay - SwordsRandomOffset, SwordsAverageDelay + SwordsRandomOffset); // Determine when next sword will spawn
|
||||
}
|
||||
|
||||
Projectile.ai[1]++;
|
||||
}
|
||||
|
||||
// The aura itself should not do contact damage
|
||||
public override bool? CanDamage() => false;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.timeLeft = 6000;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
Projectile.extraUpdates = 2;
|
||||
Projectile.extraUpdates = 3;
|
||||
Projectile.alpha = 0;
|
||||
Projectile.scale = 1.2f;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user