1 - Cryophobia rework.
2 - Skullmasher finalized, I think.
This commit is contained in:
1 parent
dfe9592759
commit
d9fbb419bf
5 files changed
+61
-25
No files matched your search
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
DisplayName.SetDefault("Cryophobia");
|
||||
Tooltip.SetDefault("Chill\n" +
|
||||
"Fires an icy wave that splits multiple times before exploding into shards");
|
||||
"Fires an icy wave that splits multiple times and explodes into shards");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -21,8 +21,8 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.mana = 18;
|
||||
item.width = 56;
|
||||
item.height = 34;
|
||||
item.useTime = 22;
|
||||
item.useAnimation = 22;
|
||||
item.useTime = 28;
|
||||
item.useAnimation = 28;
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 1.5f;
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
|
||||
projectile.scale = 1f;
|
||||
projectile.width = projectile.height = (int)(30f * projectile.scale);
|
||||
CalamityGlobalProjectile.ExpandHitboxBy(projectile, (int)(30f * projectile.scale));
|
||||
Main.PlaySound(SoundID.Item30, projectile.Center);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,7 +8,9 @@ namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class CryoBlast : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
private const float Spread = 0.15f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Blast");
|
||||
Main.projFrames[projectile.type] = 4;
|
||||
@@ -20,21 +21,32 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.width = projectile.height = 35;
|
||||
projectile.friendly = true;
|
||||
projectile.magic = true;
|
||||
projectile.penetrate = 4;
|
||||
projectile.penetrate = 3;
|
||||
projectile.timeLeft = 600;
|
||||
projectile.coldDamage = true;
|
||||
projectile.alpha = 255;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (projectile.scale <= 3.6f)
|
||||
if (projectile.scale <= 2.5f)
|
||||
{
|
||||
projectile.scale *= 1.01f;
|
||||
projectile.scale *= 1.02f;
|
||||
CalamityGlobalProjectile.ExpandHitboxBy(projectile, (int)(35f * projectile.scale));
|
||||
}
|
||||
else if (projectile.ai[0] < 2f)
|
||||
{
|
||||
projectile.ai[0] += 1f;
|
||||
|
||||
if (projectile.timeLeft < 53)
|
||||
projectile.alpha += 5;
|
||||
// Fire extra waves to the left and right
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Projectile.NewProjectile(projectile.Center, projectile.velocity.RotatedBy(-Spread * (i + 1)), projectile.type, projectile.damage / 2, projectile.knockBack, projectile.owner, projectile.ai[0], 0f);
|
||||
Projectile.NewProjectile(projectile.Center, projectile.velocity.RotatedBy(+Spread * (i + 1)), projectile.type, projectile.damage / 2, projectile.knockBack, projectile.owner, projectile.ai[0], 0f);
|
||||
}
|
||||
|
||||
projectile.Kill();
|
||||
}
|
||||
|
||||
projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt();
|
||||
projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.Pi);
|
||||
@@ -46,14 +58,12 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.frameCounter = 0;
|
||||
}
|
||||
if (projectile.frame >= Main.projFrames[projectile.type])
|
||||
{
|
||||
projectile.frame = 0;
|
||||
}
|
||||
|
||||
Lighting.AddLight(projectile.Center, 0.5f, 0.5f, 0.5f);
|
||||
|
||||
projectile.localAI[0] += 1f;
|
||||
if (projectile.localAI[0] > 4f)
|
||||
if (projectile.localAI[0] > 4f || projectile.ai[0] > 0f)
|
||||
{
|
||||
int ice = Dust.NewDust(projectile.position, projectile.width, projectile.height, 66, 0f, 0f, 100, default, projectile.scale * 0.5f);
|
||||
Main.dust[ice].noGravity = true;
|
||||
@@ -66,7 +76,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
if (projectile.timeLeft > 599)
|
||||
if ((projectile.timeLeft > 596 && projectile.ai[0] == 0f) || (projectile.timeLeft > 599 && projectile.ai[0] > 0f))
|
||||
return false;
|
||||
|
||||
Texture2D texture = Main.projectileTexture[projectile.type];
|
||||
@@ -83,7 +93,33 @@ namespace CalamityMod.Projectiles.Magic
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item27, projectile.Center);
|
||||
for (int index1 = 0; index1 < 15; ++index1)
|
||||
{
|
||||
int index2 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 88, 0f, 0f, 0, new Color(), 0.9f);
|
||||
Main.dust[index2].noGravity = true;
|
||||
Main.dust[index2].velocity *= 1.5f;
|
||||
}
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Vector2 shardPos = projectile.oldPosition + 0.5f * projectile.Size;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Vector2 shardVel = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
while (shardVel.X == 0f && shardVel.Y == 0f)
|
||||
{
|
||||
shardVel = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
}
|
||||
shardVel.Normalize();
|
||||
shardVel *= Main.rand.Next(70, 101) * 0.1f;
|
||||
Projectile.NewProjectile(shardPos, shardVel, ProjectileID.Blizzard, projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 360);
|
||||
target.AddBuff(BuffID.Frostburn, 360);
|
||||
|
||||
@@ -60,22 +60,22 @@ namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
int explosionDamage = projectile.damage;
|
||||
float explosionKB = 6f;
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<VenusianExplosion>(), explosionDamage, explosionKB, projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType<VenusianExplosion>(), explosionDamage, explosionKB, projectile.owner);
|
||||
|
||||
int cinderDamage = (int)(projectile.damage * 0.75f);
|
||||
int cinderDamage = (int)(projectile.damage * 0.75);
|
||||
float cinderKB = 0f;
|
||||
Vector2 cinderPos = projectile.oldPosition + 0.5f * projectile.Size;
|
||||
int numCinders = Main.rand.Next(7, 10);
|
||||
for (int i = 0; i < numCinders; i++)
|
||||
{
|
||||
Vector2 cinderVel = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
||||
Vector2 cinderVel = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
while (cinderVel.X == 0f && cinderVel.Y == 0f)
|
||||
{
|
||||
cinderVel = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
||||
cinderVel = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
}
|
||||
cinderVel.Normalize();
|
||||
cinderVel *= (float)Main.rand.Next(70, 101) * 0.1f;
|
||||
Projectile.NewProjectile(cinderPos, cinderVel, ModContent.ProjectileType<VenusianFlame>(), cinderDamage, cinderKB, projectile.owner, 0f, 0f);
|
||||
cinderVel *= Main.rand.Next(70, 101) * 0.1f;
|
||||
Projectile.NewProjectile(cinderPos, cinderVel, ModContent.ProjectileType<VenusianFlame>(), cinderDamage, cinderKB, projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,15 +77,15 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
bool skullmasher = projectile.ai[1] == 1f;
|
||||
if (crit || skullmasher)
|
||||
{
|
||||
int extraProjectileAmt = skullmasher ? 2 : 8;
|
||||
int extraProjectileAmt = skullmasher ? 4 : 8;
|
||||
for (int x = 0; x < extraProjectileAmt; x++)
|
||||
{
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
bool fromRight = skullmasher ? x > 0 : x > 3;
|
||||
bool fromRight = skullmasher ? x > 1 : x > 3;
|
||||
CalamityUtils.ProjectileBarrage(projectile.Center, targetPos, fromRight, 500f, 500f, 0f, 500f, 10f, ModContent.ProjectileType<AMR2>(), (int)(projectile.damage * 0.1), projectile.knockBack * 0.1f, projectile.owner);
|
||||
if (skullmasher)
|
||||
CalamityUtils.ProjectileBarrage(projectile.Center, targetPos, fromRight, 500f, 500f, 0f, 500f, 10f, (int)projectile.ai[0], (int)(projectile.damage * 0.1), projectile.knockBack * 0.1f, projectile.owner);
|
||||
CalamityUtils.ProjectileBarrage(projectile.Center, targetPos, fromRight, 1000f, 1000f, 0f, 1000f, 12f, (int)projectile.ai[0], (int)(projectile.damage * 0.1), projectile.knockBack * 0.1f, projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user