Adjustments and Earth visual follow-through
This commit is contained in:
1 parent
f356fb2c42
commit
05025382fa
7 files changed
+35
-7
No files matched your search
@@ -845,6 +845,8 @@ namespace CalamityMod
|
||||
ProjectileType<EarthHoldout>(),
|
||||
ProjectileType<MajesticGuardHoldout>(),
|
||||
ProjectileType<HellkiteHoldout>(),
|
||||
ProjectileType<CometQuasherHoldout>(),
|
||||
ProjectileType<StellarStrikerHoldout>(),
|
||||
ProjectileType<PhangasmBow>(),
|
||||
ProjectileType<ContagionBow>(),
|
||||
ProjectileType<DaemonsFlameBow>(),
|
||||
@@ -2007,6 +2009,7 @@ namespace CalamityMod
|
||||
ProjectileType<AcidicSaxBubble>(),
|
||||
ProjectileType<BlushieStaffProj>(),
|
||||
ProjectileType<BonebreakerProjectile>(),
|
||||
ProjectileType<CometQuasherHoldout>(),
|
||||
ProjectileType<DarkSparkBeam>(),
|
||||
ProjectileType<DevilsSunriseCyclone>(),
|
||||
ProjectileType<DevilsSunriseProj>(),
|
||||
@@ -2050,6 +2053,7 @@ namespace CalamityMod
|
||||
ProjectileType<SparklingLaser>(),
|
||||
ProjectileType<SpiritCongregation>(),
|
||||
ProjectileType<StarmageddonBinaryStarCenter>(),
|
||||
ProjectileType<StellarStrikerHoldout>(),
|
||||
ProjectileType<StickyBol>(),
|
||||
ProjectileType<SulphuricBlast>(),
|
||||
ProjectileType<TaserHook>(),
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<GrandGuardian>().
|
||||
AddIngredient<GalactusBlade>().
|
||||
AddIngredient<StellarStriker>().
|
||||
AddIngredient<ShadowspecBar>(5).
|
||||
AddTile<DraedonsForge>().
|
||||
Register();
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
Item.width = 100;
|
||||
Item.height = 118;
|
||||
Item.damage = 250;
|
||||
Item.damage = 112;
|
||||
Item.DamageType = TrueMeleeDamageClass.Instance;
|
||||
|
||||
Item.useAnimation = Item.useTime = 33;
|
||||
|
||||
@@ -100,6 +100,13 @@ namespace CalamityMod.Projectiles.Melee
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.White, 1, tex);
|
||||
return false;
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
float minMult = 0.2f;
|
||||
int hitsToMinMult = 4;
|
||||
float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true);
|
||||
modifiers.SourceDamage *= damageMult;
|
||||
}
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public override LocalizedText DisplayName => CalamityUtils.GetItemName<Earth>();
|
||||
public override string Texture => "CalamityMod/Items/Weapons/Melee/Earth";
|
||||
public override float HitboxOutset => 135;
|
||||
|
||||
public override Vector2 HitboxSize => new Vector2(255, 255);
|
||||
public override float HitboxRotationOffset => MathHelper.ToRadians(-45);
|
||||
|
||||
@@ -155,7 +154,14 @@ namespace CalamityMod.Projectiles.Melee
|
||||
};
|
||||
Vector2 particleVel = new Vector2(0, 10 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45));
|
||||
Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 240), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)));
|
||||
GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(particlePos, -particleVel.RotatedByRandom(0.2f) * 2, mainColor, 23, Main.rand.NextFloat(0.5f, 1f), 0.65f, 0, true));
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Particle orb = new CustomPulse(particlePos, -particleVel * Main.rand.NextFloat(0.8f, 1.2f), mainColor, "CalamityMod/Particles/Sparkle", new Vector2(1f, 1f), Main.rand.NextFloat(-2, 2), Main.rand.NextFloat(0.8f, 1.4f), 0.5f, 36);
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
|
||||
}
|
||||
else
|
||||
GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(particlePos, -particleVel.RotatedByRandom(0.2f) * 2, mainColor, 23, Main.rand.NextFloat(0.5f, 1f), 0.65f, Main.rand.NextFloat(-0.1f, 0.1f), true));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -183,8 +189,10 @@ namespace CalamityMod.Projectiles.Melee
|
||||
GenericSparkle sparker = new GenericSparkle(Owner.Center + (new Vector2(240, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), Vector2.Zero, Color.White, mainColor, Main.rand.NextFloat(0.5f, 0.7f), 11, Main.rand.NextFloat(-0.1f, 0.1f), 2.68f);
|
||||
GeneralParticleHandler.SpawnParticle(sparker);
|
||||
|
||||
Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(240, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), 278, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 2));
|
||||
dust2.scale = Main.rand.NextFloat(0.55f, 0.85f);
|
||||
float randRot = Main.rand.NextFloat(-30, -60);
|
||||
Vector2 dustVel = (new Vector2(0, 15 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot));
|
||||
Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(240, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), 278, dustVel);
|
||||
dust2.scale = Main.rand.NextFloat(0.65f, 1.05f);
|
||||
dust2.noGravity = true;
|
||||
dust2.color = Color.Lerp(Color.White, mainColor, 0.5f);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public override Vector2 HitboxSize => new Vector2(130, 130);
|
||||
public override float HitboxRotationOffset => MathHelper.ToRadians(-45);
|
||||
|
||||
public override Vector2 SpriteOrigin => new(-5, 118);
|
||||
public override Vector2 SpriteOrigin => new(0, 118);
|
||||
public Vector2 mousePos;
|
||||
public Vector2 aimVel;
|
||||
public bool doSwing = true;
|
||||
@@ -180,7 +180,9 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
if ((damageDone <= 2 || (target.life <= 0 && target.realLife == -1)) && Projectile.numHits > 0)
|
||||
{
|
||||
Projectile.numHits -= 1;
|
||||
}
|
||||
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/CursedDaggerThrow");
|
||||
SoundEngine.PlaySound(fire with { Volume = 0.65f, Pitch = 0.7f }, Projectile.Center);
|
||||
|
||||
@@ -113,6 +113,13 @@ namespace CalamityMod.Projectiles.Melee
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.White, 1, tex);
|
||||
return false;
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
float minMult = 0.2f;
|
||||
int hitsToMinMult = 4;
|
||||
float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true);
|
||||
modifiers.SourceDamage *= damageMult;
|
||||
}
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user