From 2e40ccf22fb51c7b4acfb03285a67804f3a42d52 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 13 Dec 2022 17:24:31 -0600 Subject: [PATCH] Freedom Star and Corinth Prime changes. --- Items/Weapons/Ranged/CorinthPrime.cs | 6 ++-- Projectiles/Ranged/CorinthPrimeAirburst.cs | 4 +-- .../Ranged/CorinthPrimeAirburstGrenade.cs | 29 ++++++++++++------ .../Ranged/CorinthPrimeAirburstGrenade.png | Bin 705 -> 1853 bytes Projectiles/Ranged/FreedomStarBeam.cs | 2 +- Projectiles/Ranged/FreedomStarHoldout.cs | 10 +++--- 6 files changed, 31 insertions(+), 20 deletions(-) diff --git a/Items/Weapons/Ranged/CorinthPrime.cs b/Items/Weapons/Ranged/CorinthPrime.cs index 4844856218..a225a758ae 100644 --- a/Items/Weapons/Ranged/CorinthPrime.cs +++ b/Items/Weapons/Ranged/CorinthPrime.cs @@ -56,7 +56,7 @@ Otherwise, the grenade emits an extremely weak explosion"); { Item.useTime = 90; Item.useAnimation = 90; - Item.UseSound = SoundID.Item61; + Item.UseSound = SoundID.Item66; Item.shootSpeed = 8f; } else @@ -80,8 +80,8 @@ Otherwise, the grenade emits an extremely weak explosion"); int numBullets = 6; for (int index = 0; index < numBullets; index++) { - float SpeedX = velocity.X + Main.rand.Next(-35, 36) * 0.05f; - float SpeedY = velocity.Y + Main.rand.Next(-35, 36) * 0.05f; + float SpeedX = velocity.X + Main.rand.Next(-30, 31) * 0.05f; + float SpeedY = velocity.Y + Main.rand.Next(-30, 31) * 0.05f; int proj = Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type == ProjectileID.Bullet ? ModContent.ProjectileType() : type, damage, knockback, player.whoAmI); Main.projectile[proj].extraUpdates += 1; } diff --git a/Projectiles/Ranged/CorinthPrimeAirburst.cs b/Projectiles/Ranged/CorinthPrimeAirburst.cs index a9f526b599..215ee7da98 100644 --- a/Projectiles/Ranged/CorinthPrimeAirburst.cs +++ b/Projectiles/Ranged/CorinthPrimeAirburst.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Ranged public override int Lifetime => 60; public override bool UsesScreenshake => Projectile.damage > 1; public override float GetScreenshakePower(float pulseCompletionRatio) => CalamityUtils.Convert01To010(pulseCompletionRatio) * 16f; - public override Color GetCurrentExplosionColor(float pulseCompletionRatio) => Color.Lerp(Color.DarkRed * 1.6f, Color.OrangeRed, MathHelper.Clamp(pulseCompletionRatio * 2.2f, 0f, 1f)); + public override Color GetCurrentExplosionColor(float pulseCompletionRatio) => Color.Lerp(Color.Blue * 1.6f, Color.Cyan, MathHelper.Clamp(pulseCompletionRatio * 2.2f, 0f, 1f)); public override void SetStaticDefaults() => DisplayName.SetDefault("Airburst"); public override void SetDefaults() @@ -26,6 +26,6 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; } - public override void PostAI() => Lighting.AddLight(Projectile.Center, 0.3f, 0f, 0f); + public override void PostAI() => Lighting.AddLight(Projectile.Center, 0f, 0f, 0.3f); } } diff --git a/Projectiles/Ranged/CorinthPrimeAirburstGrenade.cs b/Projectiles/Ranged/CorinthPrimeAirburstGrenade.cs index eadb25fa82..33434b7de0 100644 --- a/Projectiles/Ranged/CorinthPrimeAirburstGrenade.cs +++ b/Projectiles/Ranged/CorinthPrimeAirburstGrenade.cs @@ -12,13 +12,14 @@ namespace CalamityMod.Projectiles.Ranged { public override void SetStaticDefaults() { - DisplayName.SetDefault("Corinth Prime Airburst Grenade"); + DisplayName.SetDefault("Corinth Prime Airburst Shot"); + Main.projFrames[Projectile.type] = 4; } public override void SetDefaults() { Projectile.width = 44; - Projectile.height = 26; + Projectile.height = 28; Projectile.friendly = true; Projectile.penetrate = 1; Projectile.tileCollide = true; @@ -28,6 +29,16 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { + //Animation + Projectile.frameCounter++; + if (Projectile.frameCounter > 4) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame > 3) + Projectile.frame = 0; + // Gravity if (Projectile.velocity.Y < 12f && Projectile.timeLeft < 115) Projectile.velocity.Y += 0.1f; @@ -44,7 +55,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 5; i++) { pos -= Projectile.velocity * (i * 0.25f); - int idx = Dust.NewDust(pos, 1, 1, Main.rand.NextBool() ? 127 : 158, 0f, 0f, 0, default, 1f); + int idx = Dust.NewDust(pos, Projectile.width, Projectile.height, Main.rand.NextBool() ? 206 : 187, 0f, 0f, 0, default, 1f); Main.dust[idx].noGravity = true; Main.dust[idx].position = pos; Main.dust[idx].scale = Main.rand.Next(70, 110) * 0.013f; @@ -60,14 +71,14 @@ namespace CalamityMod.Projectiles.Ranged switch (Main.rand.Next(6)) { case 0: - dustID = 55; + dustID = 186; break; case 1: case 2: - dustID = 54; + dustID = 20; break; default: - dustID = 53; + dustID = 56; break; } @@ -82,7 +93,7 @@ namespace CalamityMod.Projectiles.Ranged float scale = Main.rand.NextFloat(0.5f, 1.6f); // Actually spawn the smoke. - int idx = Dust.NewDust(pos, 1, 1, dustID, dustVel.X, dustVel.Y, 0, default, scale); + int idx = Dust.NewDust(pos, Projectile.width, Projectile.height, dustID, dustVel.X, dustVel.Y, 0, default, scale); Main.dust[idx].noGravity = true; Main.dust[idx].position = pos; } @@ -133,11 +144,11 @@ namespace CalamityMod.Projectiles.Ranged int totalDust = weakExplosion ? 100 : 400; for (int num640 = 0; num640 < totalDust; num640++) { - int dustType = 127; + int dustType = 206; float num641 = 32f; if (num640 < 300) { - dustType = 158; + dustType = 187; num641 = 16f; } if (num640 < 200) diff --git a/Projectiles/Ranged/CorinthPrimeAirburstGrenade.png b/Projectiles/Ranged/CorinthPrimeAirburstGrenade.png index b0b95fa9bafa392e68f0a77050308db4af04d5be..833170cfb23e434434ee561a55d11fc64fc1cd01 100644 GIT binary patch delta 1851 zcmV-B2gLZn1-%ZC7k_XF1^@s6Wyq3^00001b5ch_0Itp)=>Px*_en%SRCt{2n_FxY zRT#&ALv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`4IEGVoi4;u7JBpTfymQeFfqph zNKaGGK<5oL`;_P#kH*Dtln%Sq!Ea>4(ODVcY8#q?Xq^>^-WKNN+JCNgme+OtU>w6y zG3@@OrTHq>W|d}o=4|hNdBOs?e7ViDb|#Rw5(Iw!`0MX?#(b{KXZTD|jWC_P!y04m z5iF3QzPo07t#(}e?k{@}*>Lyoaflz@T(imS>ZMl<$IOxi?m1w2Z^Q3B4ZpX)#uq#S zM8BKl&gnMSYy!pt!+&R6R1CL=hCP{f&jG*j`iJ+GS+{SN^~U1vjAJ-zr0X3};vlLp zD*FYX(#b@coceL16&^phR|X2Cwid~3)cu&xuvE?^W};(QWfl^{vgYS*nf6;%C1{;f zq1}&h45xHB*+_YbWFtx?Wc3mb`{IWu6{NZSunjPMdYR^jr8IW7@}1RMPx#1ZP1_K>z@;j|==^ z1poj532;bRa{vGi!vFvd!vV){sAK>D0#->xK~z{r<(JP(6k#03w`dmyTN_EXvR!A> zwuI1vpwp&8ErBQ`byEBf^w3p2MOP2mUm)HRg$+R@DD;vLq<AisQ1$^L?er#{0yv1_m%se|84y@iS9uN0LXb>}eqW_&3FmpX^#{yIDw7nPl( z?!)IAdVf6&tKWyyxgD6@g8XYA=Gt&$X5%N!KHLxvp${9zcN}MTf8hCux(O5Zzm7-% zPMX#(j>(gw_7d_gZ0`LBSoc|9ipk3Tn)~JgCug^YLf#K^brP;p&UH8VCERvlGV-oY zPWb=%Pj~fF0M{;m%{cxpGw`HOR2Byk#yB 10f && !shootLaser) + if (Projectile.ai[0] > 5f && !shootLaser) { Vector2 spinningpoint3 = Vector2.UnitX * 32f; spinningpoint3 = spinningpoint3.RotatedBy(Projectile.rotation + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f)); @@ -204,9 +204,9 @@ namespace CalamityMod.Projectiles.Ranged bool shootOrb = false; if (Projectile.ai[0] == 1f) shootOrb = true; - if (Projectile.ai[0] <= 50f && Projectile.ai[0] % 10f == 0f) + if (Projectile.ai[0] <= 50f && Projectile.ai[0] % 5f == 0f) shootOrb = true; - if (Projectile.ai[0] >= OrbLargeGateValue && Projectile.ai[0] < LaserGateValue && Projectile.ai[0] % 20f == 0f) + if (Projectile.ai[0] >= OrbLargeGateValue && Projectile.ai[0] < LaserGateValue && Projectile.ai[0] % 10f == 0f) shootOrb = true; if (shootOrb) @@ -214,7 +214,7 @@ namespace CalamityMod.Projectiles.Ranged SoundEngine.PlaySound(SoundID.Item75, Projectile.position); int projectileType = ProjectileID.ChargedBlasterOrb; - float projectileVelocity = 12f; + float projectileVelocity = 10f; Vector2 actualVelocity = Vector2.Normalize(Projectile.velocity) * projectileVelocity; if (float.IsNaN(actualVelocity.X) || float.IsNaN(actualVelocity.Y)) actualVelocity = -Vector2.UnitY; @@ -223,7 +223,7 @@ namespace CalamityMod.Projectiles.Ranged int projectileDamage = (orbPower < 1f) ? currentDamage : ((int)(currentDamage * 1.5f)); int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, actualVelocity, projectileType, projectileDamage, Projectile.knockBack, Projectile.owner, 0f, orbPower); Main.projectile[proj].DamageType = DamageClass.Ranged; - Main.projectile[proj].extraUpdates += 1; + Main.projectile[proj].extraUpdates += 2; } } }