Freedom Star and Corinth Prime changes.
This commit is contained in:
1 parent
5463d715f1
commit
2e40ccf22f
6 files changed
+31
-20
No files matched your search
@@ -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<RealmRavagerBullet>() : type, damage, knockback, player.whoAmI);
|
||||
Main.projectile[proj].extraUpdates += 1;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 705 B After Width: | Height: | Size: 1.8 KiB |
@@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
// The beam itself still stops on tiles, but its invisible "source" projectile ignores them.
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 20;
|
||||
Projectile.localNPCHitCooldown = 10;
|
||||
Projectile.timeLeft = Lifetime;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
|
||||
// Dust spawning for orbs.
|
||||
if (Projectile.ai[0] > 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user