Minor improvements
This commit is contained in:
1 parent
db7a489434
commit
06b577f26c
10 files changed
+66
-48
No files matched your search
+1
-1
@@ -1620,7 +1620,7 @@ namespace CalamityMod
|
||||
ItemType<EidolicWail>(),
|
||||
ItemType<GatlingLaser>(),
|
||||
ItemType<GaussPistol>(),
|
||||
ItemType<Genisis>(),
|
||||
ItemType<Genesis>(),
|
||||
ItemType<IonBlaster>(),
|
||||
ItemType<Lazhar>(),
|
||||
ItemType<NanoPurge>(),
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
Projectile.NewProjectile(source, position.X, position.Y, velocity.X * 1.35f, velocity.Y * 1.35f, ModContent.ProjectileType<GenisisBeam>(), (int)(damage * 1.6625), knockback, player.whoAmI);
|
||||
Projectile.NewProjectile(source, position.X, position.Y, velocity.X * 1.35f, velocity.Y * 1.35f, ModContent.ProjectileType<GenesisBeam>(), (int)(damage * 1.6625), knockback, player.whoAmI);
|
||||
int laserAmt = 3;
|
||||
float SpeedX = velocity.X + Main.rand.NextFloat(-1f, 1f);
|
||||
float SpeedY = velocity.Y + Main.rand.NextFloat(-1f, 1f);
|
||||
@@ -86,7 +86,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<Genisis>().
|
||||
AddIngredient<Genesis>().
|
||||
AddIngredient<Wingman>(2).
|
||||
AddIngredient<GalacticaSingularity>(5).
|
||||
AddIngredient<CosmiliteBar>(10).
|
||||
|
||||
@@ -8,7 +8,8 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class Genisis : ModItem, ILocalizedModType
|
||||
[LegacyName("Genisis")]
|
||||
public class Genesis : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Magic";
|
||||
public override void SetDefaults()
|
||||
@@ -30,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.shootSpeed = 6f;
|
||||
Item.channel = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.shoot = ModContent.ProjectileType<GenisisHoldout>();
|
||||
Item.shoot = ModContent.ProjectileType<GenesisHoldout>();
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
@@ -39,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
public override void HoldItem(Player player) => player.Calamity().mouseRotationListener = true;
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType<GenisisHoldout>(), damage, knockback, player.whoAmI, 0, 0, 0);
|
||||
Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType<GenesisHoldout>(), damage, knockback, player.whoAmI, 0, 0, 0);
|
||||
holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero);
|
||||
|
||||
return false;
|
||||
@@ -47,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.LaserMachinegun).
|
||||
AddIngredient(ItemID.LaserRifle).
|
||||
AddIngredient(ItemID.LunarBar, 5).
|
||||
AddIngredient<LifeAlloy>(5).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
@@ -345,8 +345,8 @@ FrostBolt: {
|
||||
Tooltip: Casts a slow-moving ball of frost
|
||||
}
|
||||
|
||||
Genisis: {
|
||||
DisplayName: Genisis
|
||||
Genesis: {
|
||||
DisplayName: Genesis
|
||||
Tooltip: Fires a Y-shaped beam of destructive energy and a spread of lasers
|
||||
}
|
||||
|
||||
|
||||
@@ -257,7 +257,8 @@ WyvernFeatherPurple.DisplayName: Feather
|
||||
WyvernProjectile.DisplayName: Wyvern
|
||||
YharimsCrystalBeam.DisplayName: Yharim's Beam
|
||||
YharimsCrystalPrism.DisplayName: Yermes Christal
|
||||
WingmanShot.DisplayName: Wingman Shot
|
||||
WingmanShot.DisplayName: Energy Shot
|
||||
WingmanGrenade.DisplayName: Wingman Grenade
|
||||
GenisisBeam.DisplayName: Genisis Beam
|
||||
GenesisBeam.DisplayName: Genesis Beam
|
||||
GenesisSplitBeam.DisplayName: Genesis Split Beam
|
||||
GenisisSplitBeam.DisplayName: Genisis Split Beam
|
||||
@@ -1,18 +1,19 @@
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class GenisisBeam : ModProjectile, ILocalizedModType
|
||||
public class GenesisBeam : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Magic";
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
public ref float time => ref Projectile.ai[0];
|
||||
|
||||
public Color mainColor = Color.Cyan;
|
||||
public Color mainColor = Color.Indigo;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 12;
|
||||
@@ -28,14 +29,14 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
public override void AI()
|
||||
{
|
||||
if (Projectile.timeLeft % 2 == 0 && (Projectile.ai[1] == 1 && time > 4f || time > 6f && Projectile.timeLeft > 4))
|
||||
if (Projectile.timeLeft % 2 == 0 && (Projectile.ai[1] == 1 && time > 2 || (Projectile.ai[1] == 0 && time > 3 && Projectile.timeLeft > 2)))
|
||||
{
|
||||
Particle spark = new GlowSparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 17, 0.095f, mainColor, new Vector2(0.5f, 1.3f));
|
||||
Particle spark = new GlowSparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 17, 0.06f, mainColor, new Vector2(0.5f, 1.3f));
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
if (Main.rand.NextBool())
|
||||
if (Main.rand.NextBool(1))
|
||||
{
|
||||
Vector2 dustVel = new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 0.8f);
|
||||
Vector2 dustVel = new Vector2(2, 2).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 0.8f);
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center + dustVel, Main.rand.NextBool(4) ? 264 : 66, dustVel, 0, default, Main.rand.NextFloat(0.9f, 1.2f));
|
||||
dust.noGravity = true;
|
||||
dust.color = Main.rand.NextBool() ? Color.Lerp(mainColor, Color.White, 0.5f) : mainColor;
|
||||
@@ -52,16 +53,17 @@ namespace CalamityMod.Projectiles.Magic
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = Projectile.velocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1)));
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, perturbedSpeed, ModContent.ProjectileType<GenisisBeam>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 1f);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, perturbedSpeed, ModContent.ProjectileType<GenesisBeam>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 1f);
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.9f, 0.6f, 30);
|
||||
Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.5f, 0.4f, 35);
|
||||
GeneralParticleHandler.SpawnParticle(blastRing);
|
||||
Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.8f, 0.4f, 30);
|
||||
Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.4f, 0.3f, 35);
|
||||
GeneralParticleHandler.SpawnParticle(blastRing2);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 40; i++)
|
||||
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
Vector2 dustVel = new Vector2(13, 13).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 0.8f);
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center + dustVel, Main.rand.NextBool(4) ? 264 : 66, dustVel, 0, default, Main.rand.NextFloat(0.9f, 1.2f));
|
||||
@@ -71,17 +73,39 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
for (int i = 0; i < 18; i++)
|
||||
{
|
||||
Particle spark2 = new GlowSparkParticle(Projectile.Center + Main.rand.NextVector2Circular(6, 6), Projectile.velocity * Main.rand.NextFloat(0.5f, 2f), false, 8, 0.03f, mainColor, new Vector2(0.4f, 1.3f));
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
|
||||
Vector2 dustVel = Projectile.velocity * Main.rand.NextFloat(0.5f, 2f);
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center + dustVel, Main.rand.NextBool(4) ? 264 : 66, dustVel, 0, default, Main.rand.NextFloat(0.9f, 1.2f));
|
||||
Vector2 dustVel = Projectile.velocity * Main.rand.NextFloat(0.1f, 1.5f);
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center + dustVel + Main.rand.NextVector2Circular(6, 6), Main.rand.NextBool(4) ? 264 : 66, dustVel, 0, default, Main.rand.NextFloat(0.9f, 1.2f));
|
||||
dust.noGravity = true;
|
||||
dust.color = Main.rand.NextBool() ? Color.Lerp(mainColor, Color.White, 0.5f) : mainColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (Projectile.timeLeft <= 3) // This is the sweet spot
|
||||
{
|
||||
modifiers.SourceDamage *= 2;
|
||||
|
||||
int points = 10;
|
||||
float radians = MathHelper.TwoPi / points;
|
||||
Vector2 spinningPoint = Vector2.Normalize(new Vector2(-1f, -1f));
|
||||
float rotRando = Main.rand.NextFloat(0.1f, 2.5f);
|
||||
for (int k = 0; k < points; k++)
|
||||
{
|
||||
Vector2 velocity = spinningPoint.RotatedBy(radians * k).RotatedBy(-0.45f * rotRando);
|
||||
Particle subTrail = new GlowSparkParticle(Projectile.Center + velocity * 10.5f, velocity * 5, false, 10, 0.045f, mainColor, new Vector2(2, 0.4f), true);
|
||||
GeneralParticleHandler.SpawnParticle(subTrail);
|
||||
}
|
||||
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/ArcNovaDiffuserChargeImpact");
|
||||
SoundEngine.PlaySound(fire with { Volume = 1.25f, Pitch = 0.4f, PitchVariance = 0.15f }, Projectile.Center);
|
||||
}
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.95f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,16 +10,16 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class GenisisHoldout : BaseGunHoldoutProjectile
|
||||
public class GenesisHoldout : BaseGunHoldoutProjectile
|
||||
{
|
||||
public override int AssociatedItemID => ModContent.ItemType<Genisis>();
|
||||
public override int AssociatedItemID => ModContent.ItemType<Genesis>();
|
||||
public override Vector2 GunTipPosition => base.GunTipPosition - Vector2.UnitY.RotatedBy(Projectile.rotation) * 2f * Projectile.spriteDirection;
|
||||
public override float MaxOffsetLengthFromArm => 10f;
|
||||
public override float OffsetXUpwards => -5f;
|
||||
public override float BaseOffsetY => -5f;
|
||||
public override float OffsetYDownwards => 5f;
|
||||
|
||||
public Color StaticEffectsColor = Color.Cyan;
|
||||
public Color StaticEffectsColor = Color.Indigo;
|
||||
|
||||
public float FiringTime = 15;
|
||||
public float Windup = 60;
|
||||
@@ -72,11 +72,11 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
if (Windup > 10)
|
||||
{
|
||||
Windup -= 10;
|
||||
if (!fireYBeam)
|
||||
Windup -= 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
WindingUp = !WindingUp;
|
||||
Windup = 10;
|
||||
}
|
||||
|
||||
@@ -106,9 +106,9 @@ namespace CalamityMod.Projectiles.Magic
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/LanceofDestinyStrong");
|
||||
SoundEngine.PlaySound(fire with { Volume = 0.35f, Pitch = 1f, PitchVariance = 0.15f }, Projectile.Center);
|
||||
|
||||
Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity3, ModContent.ProjectileType<GenisisBeam>(), Projectile.damage * 10, Projectile.knockBack, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity3, ModContent.ProjectileType<GenesisBeam>(), Projectile.damage * 7, Projectile.knockBack, Projectile.owner, 0, 0);
|
||||
|
||||
Particle pulse3 = new GlowSparkParticle((GunTipPosition - firingVelocity3 * 2), firingVelocity3 * 2, false, Main.rand.Next(7, 11 + 1), 0.047f, StaticEffectsColor, new Vector2(1.5f, 0.9f), true);
|
||||
Particle pulse3 = new GlowSparkParticle(GunTipPosition, shootDirection * 18, false, 6, 0.057f, StaticEffectsColor, new Vector2(1.7f, 0.8f), true);
|
||||
GeneralParticleHandler.SpawnParticle(pulse3);
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
@@ -123,25 +123,17 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
firingVelocity3 = (shootDirection * 10).RotatedBy((0.045f * (i + 1)) * Utils.GetLerpValue(0, 55, Windup, true));
|
||||
firingVelocity3 = (shootDirection * 10).RotatedBy((0.05f * (i + 1)) * Utils.GetLerpValue(0, 55, Windup, true));
|
||||
Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity3 * (1 - i * 0.1f), ModContent.ProjectileType<WingmanShot>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 1);
|
||||
}
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
firingVelocity3 = (shootDirection * 10).RotatedBy((-0.045f * (i + 1)) * Utils.GetLerpValue(0, 55, Windup, true));
|
||||
firingVelocity3 = (shootDirection * 10).RotatedBy((-0.05f * (i + 1)) * Utils.GetLerpValue(0, 55, Windup, true));
|
||||
Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity3 * (1 - i * 0.1f), ModContent.ProjectileType<WingmanShot>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 1);
|
||||
}
|
||||
//Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity2, ModContent.ProjectileType<WingmanShot>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 1);
|
||||
//Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity3, ModContent.ProjectileType<WingmanShot>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 1);
|
||||
|
||||
Particle pulse = new GlowSparkParticle((GunTipPosition - firingVelocity1 * 2), firingVelocity1 * 2, false, Main.rand.Next(7, 11 + 1), 0.035f, StaticEffectsColor, new Vector2(1.5f, 0.9f), true);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
Particle pulse2 = new GlowSparkParticle((GunTipPosition - firingVelocity2 * 2), firingVelocity2 * 2, false, Main.rand.Next(7, 11 + 1), 0.035f, StaticEffectsColor, new Vector2(1.5f, 0.9f), true);
|
||||
GeneralParticleHandler.SpawnParticle(pulse2);
|
||||
//Particle pulse3 = new GlowSparkParticle((GunTipPosition - firingVelocity3 * 2), firingVelocity3 * 2, false, Main.rand.Next(7, 11 + 1), 0.04f, StaticEffectsColor, new Vector2(1.5f, 0.9f), true);
|
||||
//GeneralParticleHandler.SpawnParticle(pulse3);
|
||||
//Particle sparkle = new GenericSparkle(GunTipPosition, Vector2.Zero, Color.White, StaticEffectsColor, 1.7f, 4, Main.rand.NextFloat(-7f, 7f), 2);
|
||||
//GeneralParticleHandler.SpawnParticle(sparkle);
|
||||
Particle pulse3 = new GlowSparkParticle(GunTipPosition, shootDirection * 18, false, 6, 0.057f, StaticEffectsColor, new Vector2(1.7f, 0.8f), true);
|
||||
GeneralParticleHandler.SpawnParticle(pulse3);
|
||||
}
|
||||
|
||||
// Inside here go all the things that dedicated servers shouldn't spend resources on.
|
||||
@@ -40,9 +40,9 @@ namespace CalamityMod.Projectiles.Magic
|
||||
if (Projectile.ai[1] == 0)
|
||||
mainColor = Color.Orchid;
|
||||
if (Projectile.ai[1] == 1)
|
||||
mainColor = Color.Cyan;
|
||||
mainColor = Color.Indigo;
|
||||
if (Projectile.ai[1] == 2)
|
||||
mainColor = Color.MediumTurquoise;
|
||||
mainColor = Color.MediumVioletRed;
|
||||
}
|
||||
Lighting.AddLight(Projectile.Center, mainColor.ToVector3() * 0.7f);
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
|
||||
Reference in new issue
Block a user