voidragon visual work
This commit is contained in:
1 parent
7b1199c098
commit
9fa98bbf4b
9 files changed
+75
-108
No files matched your search
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 96;
|
||||
Item.height = 38;
|
||||
Item.damage = 450;
|
||||
Item.damage = 800;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = 3;
|
||||
Item.useAnimation = 3;
|
||||
@@ -36,7 +36,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.autoReuse = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.channel = true;
|
||||
Item.shoot = ProjectileID.PurificationPowder;
|
||||
Item.shootSpeed = 18f;
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.shoot = ModContent.ProjectileType<VoidragonHoldout>();
|
||||
|
||||
@@ -1063,9 +1063,9 @@ Seadragon: {
|
||||
Tooltip:
|
||||
'''
|
||||
Loads a 50 round deluge of alternating bullets and pressurized water jets
|
||||
Water jets summon a small fish that swims around and follows you
|
||||
After firing, all fish rush toward enemies and explode before the gun reloads
|
||||
Water jets consume no ammo
|
||||
Water jets summon small fish that swim around you
|
||||
Once your mag runs empty, all fish rush toward enemies and explode before the gun can reload
|
||||
Water jets do not consume ammo
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1419,11 +1419,11 @@ Voidragon: {
|
||||
DisplayName: Voidragon
|
||||
Tooltip:
|
||||
'''
|
||||
Loads a 50 round magazine of bullets and concentrated void blasts
|
||||
After firing, the gun unleashes a beam of abyssal fire that erases foes from existence
|
||||
The beam grows more powerful based on the amount of shots hit
|
||||
At maximum damage, abyssal portals rotate around the user that constantly summon creatures from beyond
|
||||
[c/C843E2: 'Fade to black']
|
||||
Loads a 50 round onslaught of bullets and concentrated void blasts
|
||||
Once your mag runs empty, an eruption of abyssal fire eviscerates wherever you look
|
||||
The beam grows increasingly powerful with the amount of shots you hit
|
||||
At maximum power, rifts from beyond are torn around you which summon otherworldly creatures
|
||||
[c/620BB0: 'Fade to black']
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -187,8 +187,9 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
Player Owner = Main.player[Projectile.owner];
|
||||
target.AddBuff(ModContent.BuffType<WhisperingDeath>(), 180);
|
||||
int bonusDamage = 10000;
|
||||
int bonusDamage = 200 * Owner.Calamity().sharkGunDamageScaling;
|
||||
if (target.Calamity().demonicFlamesBonusDamage <= bonusDamage)
|
||||
{
|
||||
target.Calamity().demonicFlamesBonusDamage = bonusDamage;
|
||||
|
||||
@@ -27,14 +27,15 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public int Time = 0;
|
||||
public int shotCounter = 0;
|
||||
public int framesBetweenShots = 0;
|
||||
public bool swapType = false;
|
||||
public bool isTired = false;
|
||||
|
||||
public override void KillHoldoutLogic()
|
||||
{
|
||||
//If the player is dead, kill the holdout.
|
||||
if (Owner.CantUseHoldout() || HeldItem.type != Owner.ActiveItem().type && shotCounter <= 19)
|
||||
if (!isTired && (Owner.CantUseHoldout() || HeldItem.type != Owner.ActiveItem().type))
|
||||
Projectile.Kill();
|
||||
}
|
||||
|
||||
|
||||
public override void HoldoutAI()
|
||||
{
|
||||
@@ -49,15 +50,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
#endregion
|
||||
#region Visuals and Sounds
|
||||
SoundEngine.PlaySound(SoundID.Item85, Projectile.Center);
|
||||
Particle sparker = new CritSpark(GunTipPosition, Vector2.Zero, Color.Gold, Color.LightGoldenrodYellow, 1.7f, 3, 0.5f, 3f);
|
||||
GeneralParticleHandler.SpawnParticle(sparker);
|
||||
for (int i = 0; i <= 4; i++)
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(GunTipPosition, Main.rand.NextBool(3) ? 303 : 244, (shootVelocity * Main.rand.NextFloat(0.2f, 1.1f)).RotatedByRandom(0.4f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(0.8f, 1.4f);
|
||||
}
|
||||
if (shotCounter > 14)
|
||||
if (shotCounter > 20)
|
||||
{
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
@@ -86,14 +79,15 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedByRandom(MathHelper.ToRadians(1.5f)), ModContent.ProjectileType<ArcherfishShot>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
shotCounter++;
|
||||
//Allow a pause before firing the rocket. This allows the final bullet a chance to hit before the rocket is fired. Lowering this number reduces the delay, but may also cause the gun to become inconsistent
|
||||
if (shotCounter == 20)
|
||||
if (shotCounter == 25)
|
||||
framesBetweenShots = 80;
|
||||
}
|
||||
if (framesBetweenShots > 0)
|
||||
framesBetweenShots--;
|
||||
}
|
||||
if (shotCounter >= 19 && framesBetweenShots > 0)
|
||||
if (shotCounter == 25 && framesBetweenShots > 0)
|
||||
{
|
||||
isTired = true;
|
||||
Owner.channel = true;
|
||||
if (framesBetweenShots % 6 == 0)
|
||||
{
|
||||
@@ -127,7 +121,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
|
||||
}
|
||||
if (shotCounter == 20 && framesBetweenShots == 0)
|
||||
if (shotCounter == 25 && framesBetweenShots == 0)
|
||||
{
|
||||
if (framesBetweenShots == 0)
|
||||
{
|
||||
|
||||
@@ -30,15 +30,6 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
// Bubbles
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Gore bubble = Gore.NewGorePerfect(Projectile.GetSource_FromAI(), Projectile.position, Projectile.velocity * 0.2f + Main.rand.NextVector2Circular(1f, 1f), 411);
|
||||
bubble.timeLeft = 9 + Main.rand.Next(7);
|
||||
bubble.scale = Main.rand.NextFloat(0.6f, 1f);
|
||||
bubble.type = Main.rand.NextBool(3) ? 412 : 411;
|
||||
}
|
||||
|
||||
// Water trail
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
#region Visuals and Sounds
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/GunShotTiny");
|
||||
SoundEngine.PlaySound(fire with { Volume = 0.3f, Pitch = 0.25f , PitchVariance = 0.1f, MaxInstances = -1 }, Projectile.Center);
|
||||
Particle sparker = new CustomPulse(GunTipPosition, Vector2.Zero, Color.HotPink, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.02f, 0.5f, 10, true, 0.8f);
|
||||
Particle sparker = new CustomPulse(GunTipPosition, Vector2.Zero, Color.HotPink, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.02f, 0.5f, 5, true, 0.8f);
|
||||
GeneralParticleHandler.SpawnParticle(sparker);
|
||||
GenericSparkle sparker2 = new GenericSparkle(GunTipPosition, Vector2.Zero, Main.rand.NextBool() ? Color.SeaShell : Color.Silver * 0.9f, Color.HotPink, Main.rand.NextFloat(0.8f, 1.2f), 2, 0, 2.68f);
|
||||
GeneralParticleHandler.SpawnParticle(sparker2);
|
||||
@@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
//How many frames between firing projectiles, and how far the gun moves backward to give the effect of recoil. Change this number to edit fire rate
|
||||
framesBetweenShots = 3;
|
||||
OffsetLengthFromArm -= 3f;
|
||||
OffsetLengthFromArm -= 2f;
|
||||
//Here we detect which ammo the bullets will use
|
||||
Owner.PickAmmo(Owner.ActiveItem(), out int bulletAMMO, out float SpeedNoUse, out int bulletDamage, out float kBackNoUse, out _, !Main.rand.NextBool(4));
|
||||
//Alternate between shooting bullets and water streams. Despite not having damage scaling, the fish gain movement speed based on the scaling, so we still need a Global Projectile
|
||||
|
||||
@@ -67,21 +67,20 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Player Owner = Main.player[Projectile.owner];
|
||||
Owner.Calamity().sharkGunDamageScaling++;
|
||||
}
|
||||
int bonusDamage = 10000;
|
||||
if (target.Calamity().demonicFlamesBonusDamage <= bonusDamage)
|
||||
{
|
||||
target.Calamity().demonicFlamesBonusDamage = bonusDamage;
|
||||
target.AddBuff(ModContent.BuffType<DemonicFlames>(), 180);
|
||||
// Demonic Flames damage must be synced, because OnHitNPC is only run for the client that hit the NPC
|
||||
if (Main.netMode != NetmodeID.SinglePlayer)
|
||||
DemonicFlamesSyncPacket.Send(target);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
//We can't set Demonic Flames damage with a Basic Burst projectile, so we'll have to use a new one
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<VoidBlastExplosion>(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner);
|
||||
float blastSize = 170;
|
||||
float minMultiplier = 0.25f;
|
||||
int hitsToMinMult = -1;
|
||||
int debuff1 = ModContent.BuffType<WhisperingDeath>();
|
||||
int debuffTime = 180;
|
||||
Projectile blast = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<BasicBurst>(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, blastSize, minMultiplier, hitsToMinMult);
|
||||
blast.localAI[0] = debuff1;
|
||||
blast.localAI[1] = debuffTime;
|
||||
blast.timeLeft = 2;
|
||||
blast.DamageType = Projectile.DamageType;
|
||||
#region Visuals and Sounds
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/OmicronBeam");
|
||||
SoundEngine.PlaySound(fire with { Volume = 0.9f }, Projectile.Center);
|
||||
@@ -126,8 +125,6 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
if (time == 0)
|
||||
return false;
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Particles/GlowSpark").Value;
|
||||
Vector2 drawPosition = Projectile.Center - Main.screenPosition;
|
||||
Color drawColor = Projectile.GetAlpha(lightColor);
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Packets.Entities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
public class VoidBlastExplosion : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Ranged";
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 400;
|
||||
Projectile.height = 365;
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = false;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 20;
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
}
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<WhisperingDeath>(), 180);
|
||||
int bonusDamage = 10000;
|
||||
if (target.Calamity().demonicFlamesBonusDamage <= bonusDamage)
|
||||
{
|
||||
target.Calamity().demonicFlamesBonusDamage = bonusDamage;
|
||||
target.AddBuff(ModContent.BuffType<DemonicFlames>(), 180);
|
||||
// Demonic Flames damage must be synced, because OnHitNPC is only run for the client that hit the NPC
|
||||
if (Main.netMode != NetmodeID.SinglePlayer)
|
||||
DemonicFlamesSyncPacket.Send(target);
|
||||
}
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.8f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * 0.5f * Projectile.scale, targetHitbox);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,9 @@ using Steamworks;
|
||||
using Mono.Cecil;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using CalamityMod.Dusts;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
@@ -24,7 +27,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override float OffsetXUpwards => -5f;
|
||||
public override float BaseOffsetY => -1f;
|
||||
public override float OffsetYDownwards => 5f;
|
||||
public override Vector2 GunTipPosition => Projectile.Center + (Projectile.velocity * 55).RotatedBy(-0.05f * Projectile.direction);
|
||||
public override Vector2 GunTipPosition => Projectile.Center + (Projectile.velocity * 55).RotatedBy(-0.09f * Projectile.direction);
|
||||
|
||||
public int Time = 0;
|
||||
public int beamTimer = 500;
|
||||
@@ -76,18 +79,36 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
//Main.NewText(shotCounter);
|
||||
//Main.NewText(Owner.Calamity().sharkGunDamageScaling);
|
||||
#endregion
|
||||
//Do not look in here if you value your sanity
|
||||
#region Visuals and Sounds
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/GunShotTiny");
|
||||
SoundEngine.PlaySound(fire with { Volume = 0.4f, Pitch = 0.1f, PitchVariance = 0.1f, MaxInstances = -1 }, Projectile.Center);
|
||||
Particle sparker = new CritSpark(GunTipPosition, Vector2.Zero, Color.Gold, Color.LightGoldenrodYellow, 1.7f, 3, 0.5f, 3f);
|
||||
Particle sparker = new CustomPulse(GunTipPosition, Vector2.Zero, Color.Purple, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.02f, 0.5f, 6, true, 0.8f);
|
||||
GeneralParticleHandler.SpawnParticle(sparker);
|
||||
Particle spark2 = new GlowSparkParticle(GunTipPosition, shootVelocity.RotatedByRandom(0.8f) * Main.rand.NextFloat(1.2f, 1.5f), false, 15, 0.017f, Main.rand.NextBool() ? Color.Indigo : Color.BlueViolet, new Vector2(1.5f, 0.7f), true, false, 1.3f);
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
Particle center = new SnowflakeSparkle(GunTipPosition, Vector2.Zero, Color.White, Color.Indigo, 0.8f, 2, Main.rand.NextFloat(-10, 10), 0.5f, 6);
|
||||
GeneralParticleHandler.SpawnParticle(center);
|
||||
GenericSparkle sparker2 = new GenericSparkle(GunTipPosition, Vector2.Zero, Main.rand.NextBool() ? Color.Indigo : Color.BlueViolet * 0.9f, Color.Indigo, Main.rand.NextFloat(1.4f, 1.6f), 2, 0, 2.22f);
|
||||
GeneralParticleHandler.SpawnParticle(sparker2);
|
||||
GenericSparkle sparker3 = new GenericSparkle(GunTipPosition, Vector2.Zero, Main.rand.NextBool() ? Color.Indigo : Color.BlueViolet * 0.9f, Color.Indigo, Main.rand.NextFloat(2.5f, 2.6f), 2, 0, 2.68f);
|
||||
GeneralParticleHandler.SpawnParticle(sparker3);
|
||||
for (int i = 0; i <= 2; i++)
|
||||
{
|
||||
Particle spark = new VoidSparkParticle(GunTipPosition, shootVelocity.RotatedByRandom(0.8f) * Main.rand.NextFloat(1.2f, 1.5f), false, 25, 0.1f, Main.rand.NextBool() ? Color.Indigo : Color.BlueViolet);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
for (int i = 0; i <= 4; i++)
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(GunTipPosition, Main.rand.NextBool(3) ? 303 : 244, (shootVelocity * Main.rand.NextFloat(0.2f, 1.1f)).RotatedByRandom(0.4f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(0.8f, 1.4f);
|
||||
Particle smoke = new HeavySmokeParticle(GunTipPosition, Vector2.Zero, Main.rand.NextBool() ? Color.Black : Color.Indigo * 0.6f, 10, 0.85f, 1.1f, 5f, false, 0, true);
|
||||
GeneralParticleHandler.SpawnParticle(smoke);
|
||||
}
|
||||
if (swapType)
|
||||
{
|
||||
float rotation = Projectile.velocity.ToRotation();
|
||||
Particle pulse = new CustomPulse(GunTipPosition, shootVelocity, Color.Indigo, "CalamityMod/Particles/FlameExplosion", new Vector2(0.4f, 1f), rotation, 0f, 0.07f, 10, true, 1.4f);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -127,6 +148,11 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (framesBetweenShots > 0)
|
||||
framesBetweenShots--;
|
||||
}
|
||||
if (shotCounter == 51 && !firingBeam)
|
||||
{
|
||||
Particle streak = new ManaDrainStreak(Owner, Main.rand.NextFloat(2f, 3f), Main.rand.NextVector2CircularEdge(20f, 20f) * Main.rand.NextFloat(2f, 4f), 0f, Color.Indigo, Color.BlueViolet, 7, GunTipPosition);
|
||||
GeneralParticleHandler.SpawnParticle(streak);
|
||||
}
|
||||
if (shotCounter == 51 && framesBetweenShots == 0)
|
||||
{
|
||||
//Main.NewText(beamTimer);
|
||||
@@ -161,12 +187,26 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (Time < 2)
|
||||
return false;
|
||||
Texture2D texture = TextureAssets.Projectile[Type].Value;
|
||||
Texture2D texture2 = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
Texture2D sparkle = ModContent.Request<Texture2D>("CalamityMod/Particles/HalfStar").Value;
|
||||
Vector2 drawPosition = Projectile.Center - Main.screenPosition;
|
||||
float drawRotation = Projectile.rotation + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f);
|
||||
Vector2 rotationPoint = texture.Size() * 0.5f;
|
||||
SpriteEffects flipSprite = (Projectile.spriteDirection * Owner.gravDir == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
|
||||
Vector2 shake = Main.rand.NextVector2Circular(6, 6);
|
||||
|
||||
for (int i = 0; i < 22; i++)
|
||||
{
|
||||
Color auraColor = Color.Lerp(Color.Indigo, Color.BlueViolet, i * 0.01f) with { A = 0 } * 0.6f;
|
||||
Vector2 drawOffset = ((MathHelper.TwoPi * i / 22f).ToRotationVector2() * 5) + Main.rand.NextVector2Circular(7, 7);
|
||||
Main.EntitySpriteDraw(texture, drawPosition + drawOffset, null, auraColor, drawRotation, rotationPoint, Projectile.scale * Main.rand.NextFloat(0.02f, 0.025f) * Owner.Calamity().sharkGunDamageScaling, flipSprite);
|
||||
}
|
||||
|
||||
Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(lightColor), drawRotation, rotationPoint, Projectile.scale * Owner.gravDir, flipSprite);
|
||||
|
||||
if (firingBeam)
|
||||
{
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user