1 - More.
This commit is contained in:
1 parent
6a5a201326
commit
72736df102
147 files changed
+407
-407
No files matched your search
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -150,8 +150,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
int disk = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
int disk2 = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
int disk = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
int disk2 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
Main.projectile[disk].idStaticNPCHitCooldown = Main.projectile[disk2].idStaticNPCHitCooldown = 6;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using CalamityMod.NPCs.StormWeaver;
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
float kb = 1f;
|
||||
float ai0 = 1f; // Stealth strike spawned seekers set ai[0] to 1, which makes them cling to the parent projectile.
|
||||
Vector2 vel = Main.rand.NextVector2CircularEdge(5f, 5f);
|
||||
Projectile.NewProjectile(Projectile.Center, vel, projID, damage, kb, Projectile.owner, ai0, Projectile.identity);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, vel, projID, damage, kb, Projectile.owner, ai0, Projectile.identity);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -202,7 +202,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < numSeekers; i++)
|
||||
{
|
||||
Vector2 velocity = (MathHelper.Pi * i / 3f).ToRotationVector2() * speed;
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<AlphaSeeker>(), damage, kb, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<AlphaSeeker>(), damage, kb, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
|
||||
int numDust = 20;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
int star = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0.25f, Projectile.velocity.Y * 0.25f, ModContent.ProjectileType<XerocStar>(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
int star = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0.25f, Projectile.velocity.Y * 0.25f, ModContent.ProjectileType<XerocStar>(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Main.projectile[star].Calamity().rogue = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
|
||||
//Spawn the projectile
|
||||
int shard = Projectile.NewProjectile(Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType<ApoctolithShard>(), (int)(Projectile.damage * 0.5), Projectile.knockBack / 2f, Projectile.owner);
|
||||
int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType<ApoctolithShard>(), (int)(Projectile.damage * 0.5), Projectile.knockBack / 2f, Projectile.owner);
|
||||
Main.projectile[shard].frame = Main.rand.Next(3);
|
||||
split += 1;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
int dustIndex = Dust.NewDust(Projectile.Center, 1, 1, 1, Projectile.velocity.X, Projectile.velocity.Y);
|
||||
Projectile.NewProjectile(Projectile.Center, Main.dust[dustIndex].velocity, ModContent.ProjectileType<AshenStalactiteDebris>(), Projectile.damage / 2, 0, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Main.dust[dustIndex].velocity, ModContent.ProjectileType<AshenStalactiteDebris>(), Projectile.damage / 2, 0, Projectile.owner, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (float i = 0; i < 5; i++)
|
||||
{
|
||||
float angle = MathHelper.TwoPi / 5f * i;
|
||||
int star = Projectile.NewProjectile(Projectile.Center, angle.ToRotationVector2() * 5f, ModContent.ProjectileType<AuroradicalStar>(), (int)(Projectile.damage * 0.87), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
int star = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, angle.ToRotationVector2() * 5f, ModContent.ProjectileType<AuroradicalStar>(), (int)(Projectile.damage * 0.87), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Main.projectile[star].Calamity().stealthStrike = Projectile.Calamity().stealthStrike;
|
||||
}
|
||||
Projectile.position = Projectile.Center;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -137,7 +137,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 pos = new Vector2(targetPos.X + width * 0.5f + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
|
||||
Vector2 velocity = (targetPos - pos) / 40f;
|
||||
int dmg = Projectile.damage / 2;
|
||||
int comet = Projectile.NewProjectile(pos, velocity, ModContent.ProjectileType<CometQuasherMeteor>(), dmg, Projectile.knockBack, Projectile.owner);
|
||||
int comet = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, velocity, ModContent.ProjectileType<CometQuasherMeteor>(), dmg, Projectile.knockBack, Projectile.owner);
|
||||
if (comet.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[comet].Calamity().forceRogue = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -69,13 +69,13 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int s = 0; s < projAmt; s++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<BallisticPoisonBombSpike>(), (int)(Projectile.damage * 0.5), 0f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<BallisticPoisonBombSpike>(), (int)(Projectile.damage * 0.5), 0f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
int cloudAmt = Main.rand.Next(8, 13);
|
||||
for (int c = 0; c < cloudAmt; c++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 10f, 200f, 0.01f);
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<BallisticPoisonCloud>(), (int)(Projectile.damage * 0.25), 1f, Projectile.owner, 0f, (float)Main.rand.Next(-45, 1));
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<BallisticPoisonCloud>(), (int)(Projectile.damage * 0.25), 1f, Projectile.owner, 0f, (float)Main.rand.Next(-45, 1));
|
||||
}
|
||||
}
|
||||
for (int d = 0; d < 5; d++)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -75,12 +75,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Vector2 shrapnelVelocity = (Vector2.UnitY * Main.rand.NextFloat(-19f, -4f)).RotatedByRandom(MathHelper.ToRadians(30f));
|
||||
Projectile.NewProjectile(Projectile.Center, Projectile.velocity + shrapnelVelocity, ModContent.ProjectileType<BarrelShrapnel>(), Projectile.damage, 3f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + shrapnelVelocity, ModContent.ProjectileType<BarrelShrapnel>(), Projectile.damage, 3f, Projectile.owner);
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector2 fireVelocity = (Vector2.UnitY * Main.rand.NextFloat(-19f, -4f)).RotatedByRandom(MathHelper.ToRadians(40f));
|
||||
Projectile fire = Projectile.NewProjectileDirect(Projectile.Center, Projectile.velocity + fireVelocity, ModContent.ProjectileType<TotalityFire>(), (int)(Projectile.damage * 0.75f), 1f, Projectile.owner);
|
||||
Projectile fire = Projectile.NewProjectileDirect(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + fireVelocity, ModContent.ProjectileType<TotalityFire>(), (int)(Projectile.damage * 0.75f), 1f, Projectile.owner);
|
||||
fire.timeLeft = 300;
|
||||
fire.penetrate = 3;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
int projID = ModContent.ProjectileType<Blood>();
|
||||
int bloodDamage = Projectile.damage;
|
||||
float bloodKB = 1f;
|
||||
int stealth = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, projID, bloodDamage, bloodKB, Projectile.owner, 1f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
int stealth = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, projID, bloodDamage, bloodKB, Projectile.owner, 1f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[stealth].Calamity().forceRogue = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
SoundEngine.PlaySound(SoundID.Item14, Projectile.Center);
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<BettyExplosion>(), Projectile.damage, 8f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<BettyExplosion>(), Projectile.damage, 8f, Projectile.owner);
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
int projectileCount = 12;
|
||||
@@ -36,12 +36,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Vector2 shrapnelVelocity = (Vector2.UnitY * Main.rand.NextFloat(-12f, -4f)).RotatedByRandom(MathHelper.ToRadians(30f));
|
||||
Projectile.NewProjectile(Projectile.Center, Projectile.velocity + shrapnelVelocity, ModContent.ProjectileType<BouncingBettyShrapnel>(), (int)(Projectile.damage * 0.5f), 3f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + shrapnelVelocity, ModContent.ProjectileType<BouncingBettyShrapnel>(), (int)(Projectile.damage * 0.5f), 3f, Projectile.owner);
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector2 fireVelocity = (Vector2.UnitY * Main.rand.NextFloat(-12f, -4f)).RotatedByRandom(MathHelper.ToRadians(40f));
|
||||
Projectile fire = Projectile.NewProjectileDirect(Projectile.Center, Projectile.velocity + fireVelocity, ModContent.ProjectileType<TotalityFire>(), (int)(Projectile.damage * 0.6f), 1f, Projectile.owner);
|
||||
Projectile fire = Projectile.NewProjectileDirect(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + fireVelocity, ModContent.ProjectileType<TotalityFire>(), (int)(Projectile.damage * 0.6f), 1f, Projectile.owner);
|
||||
fire.localNPCHitCooldown = 9;
|
||||
fire.timeLeft = 240;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -49,16 +49,16 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, 0f, -32f, ModContent.ProjectileType<BrackishSpear>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, -32f, ModContent.ProjectileType<BrackishSpear>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<BrackishWaterBlast>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<BrackishWaterBlast>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<BrackishWater>(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<BrackishWater>(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 1f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<BrackishWater>(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<BrackishWater>(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 1f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
int dmg = Projectile.damage;
|
||||
float kBack = Projectile.knockBack;
|
||||
int number = Projectile.NewProjectile(Projectile.position.X + Projectile.velocity.X + (float)(Projectile.width / 2), Projectile.position.Y + Projectile.velocity.Y + (float)(Projectile.height / 2), Projectile.velocity.X, Projectile.velocity.Y, projType, dmg, kBack, Projectile.owner, 0f, Projectile.ai[1] + 1f);
|
||||
int number = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + Projectile.velocity.X + (float)(Projectile.width / 2), Projectile.position.Y + Projectile.velocity.Y + (float)(Projectile.height / 2), Projectile.velocity.X, Projectile.velocity.Y, projType, dmg, kBack, Projectile.owner, 0f, Projectile.ai[1] + 1f);
|
||||
NetMessage.SendData(MessageID.SyncProjectile, -1, -1, null, number, 0f, 0f, 0f, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
@@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(Projectile.velocity.X, Projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1)));
|
||||
int projectile2 = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType<BrackishSpear2>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
int projectile2 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType<BrackishSpear2>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Main.projectile[projectile2].penetrate = 1;
|
||||
}
|
||||
for (int k = 0; k < 3; k++)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<BrackishWaterBlast>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<BrackishWaterBlast>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using Terraria.ID;
|
||||
@@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
|
||||
//Spawn the projectile
|
||||
Projectile.NewProjectile(Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType<BrickFragment>(), (int)(Projectile.damage * 0.3), Projectile.knockBack / 2f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType<BrickFragment>(), (int)(Projectile.damage * 0.3), Projectile.knockBack / 2f, Projectile.owner);
|
||||
split += 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < numProj + 1; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(Projectile.velocity.X, Projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1)));
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X * 0.25f, perturbedSpeed.Y * 0.25f, ModContent.ProjectileType<Brimblade2>(), (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X * 0.25f, perturbedSpeed.Y * 0.25f, ModContent.ProjectileType<Brimblade2>(), (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
for (int k = 0; k < 5; k++)
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < numProj + 1; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(Projectile.velocity.X, Projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1)));
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X * 0.25f, perturbedSpeed.Y * 0.25f, ModContent.ProjectileType<Brimblade2>(), (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X * 0.25f, perturbedSpeed.Y * 0.25f, ModContent.ProjectileType<Brimblade2>(), (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
for (int k = 0; k < 5; k++)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Projectile.Calamity().stealthStrike && Projectile.penetrate != 1)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item, Projectile.Center, 103);
|
||||
int proj = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ShadowflameExplosionBig>(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ShadowflameExplosionBig>(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner);
|
||||
Main.projectile[proj].timeLeft += 20;
|
||||
Main.projectile[proj].Center = Projectile.Center;
|
||||
Main.projectile[proj].Calamity().rogue = true;
|
||||
@@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Projectile.Calamity().stealthStrike && Projectile.penetrate != 1)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item, Projectile.Center, 103);
|
||||
int proj = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ShadowflameExplosionBig>(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ShadowflameExplosionBig>(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner);
|
||||
Main.projectile[proj].timeLeft += 20;
|
||||
Main.projectile[proj].Center = Projectile.Center;
|
||||
Main.projectile[proj].Calamity().rogue = true;
|
||||
@@ -85,9 +85,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
int proj;
|
||||
SoundEngine.PlaySound(SoundID.Item, Projectile.Center, 103);
|
||||
if(Projectile.Calamity().stealthStrike)
|
||||
proj = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ShadowflameExplosionBig>(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner);
|
||||
proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ShadowflameExplosionBig>(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner);
|
||||
else
|
||||
proj = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ShadowflameExplosion>(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner);
|
||||
proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ShadowflameExplosion>(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner);
|
||||
Main.projectile[proj].Center = Projectile.Center;
|
||||
Main.projectile[proj].Calamity().rogue = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
@@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
int projID = ModContent.ProjectileType<CelestialReaperAfterimage>();
|
||||
int damage = (int)(Projectile.damage * 0.25f);
|
||||
float kb = Projectile.knockBack * 0.5f;
|
||||
Projectile.NewProjectile(Projectile.Center, Projectile.velocity, projID, damage, kb, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity, projID, damage, kb, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
float angle = MathHelper.TwoPi * i / numSplits;
|
||||
Vector2 velocity = angle.ToRotationVector2() * speed;
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, projID, damage, kb, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projID, damage, kb, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -159,8 +159,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType<Celestus2>(), (int)(Projectile.damage * 0.7), Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType<Celestus2>(), (int)(Projectile.damage * 0.7), Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType<Celestus2>(), (int)(Projectile.damage * 0.7), Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType<Celestus2>(), (int)(Projectile.damage * 0.7), Projectile.knockBack, Projectile.owner);
|
||||
}
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item122, Projectile.Center);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
@@ -131,7 +131,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.localAI[1] += 1f;
|
||||
if (Projectile.localAI[1] == 60f && Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<CircletTornado>(), Projectile.damage, 2f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<CircletTornado>(), Projectile.damage, 2f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
if (Projectile.localAI[1] >= 120f)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Point result;
|
||||
if (WorldUtils.Find(Projectile.Top.ToTileCoordinates(), Searches.Chain((GenSearch)new Searches.Down(80), (GenCondition)new Conditions.IsSolid()), out result))
|
||||
{
|
||||
Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType<BlueFlamePillar>(), Projectile.damage, 2f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType<BlueFlamePillar>(), Projectile.damage, 2f, Projectile.owner);
|
||||
}
|
||||
}
|
||||
//stealth strike
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Point result;
|
||||
if (WorldUtils.Find((Projectile.Top + i * Main.rand.NextFloat(56f, 108f) * Vector2.UnitX).ToTileCoordinates(), Searches.Chain((GenSearch)new Searches.Down(80), (GenCondition)new Conditions.IsSolid()), out result))
|
||||
{
|
||||
Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType<BlueFlamePillar>(), Projectile.damage, 2f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType<BlueFlamePillar>(), Projectile.damage, 2f, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item107, Projectile.Bottom);
|
||||
Projectile explosion = Projectile.NewProjectileDirect(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<BileExplosion>(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner);
|
||||
Projectile explosion = Projectile.NewProjectileDirect(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<BileExplosion>(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner);
|
||||
if (explosion.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
explosion.Calamity().stealthStrike = Projectile.Calamity().stealthStrike;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
float mult = Projectile.ai[0] / 80f; // Ranges from 0.25 to 0.5 to 0.75
|
||||
velocity *= mult;
|
||||
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<CorpusAvertorClone>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<CorpusAvertorClone>(),
|
||||
(int)(Projectile.damage * mult), Projectile.knockBack * mult, Projectile.owner, Projectile.ai[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int smash = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<CraniumSMASH>(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
int smash = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<CraniumSMASH>(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Main.projectile[smash].Center = Projectile.Center;
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int smash = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<CraniumSMASH>(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
int smash = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<CraniumSMASH>(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Main.projectile[smash].Center = Projectile.Center;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X + Main.rand.NextFloat(-15f, 15f), Projectile.Center.Y + Main.rand.NextFloat(-15f, 15f), Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<CrystalPiercerShard>(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X + Main.rand.NextFloat(-15f, 15f), Projectile.Center.Y + Main.rand.NextFloat(-15f, 15f), Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<CrystalPiercerShard>(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < numProj + 1; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(Projectile.velocity.X * 0.8f, Projectile.velocity.Y * 0.8f).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1)));
|
||||
int proj = Projectile.NewProjectile(Projectile.Center, perturbedSpeed, ModContent.ProjectileType<Crystalline2>(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, 0f, 2f);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, perturbedSpeed, ModContent.ProjectileType<Crystalline2>(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, 0f, 2f);
|
||||
Main.projectile[proj].timeLeft = 20;
|
||||
}
|
||||
}
|
||||
@@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Vector2 projspeed = new Vector2(Main.rand.NextFloat(-8f, 8f), Main.rand.NextFloat(-8f, 8f));
|
||||
int shard = Projectile.NewProjectile(Projectile.Center, projspeed, ProjectileID.CrystalShard, (int)(Projectile.damage * 0.4f), 2f, Projectile.owner);
|
||||
int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, projspeed, ProjectileID.CrystalShard, (int)(Projectile.damage * 0.4f), 2f, Projectile.owner);
|
||||
if (shard.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[shard].Calamity().forceRogue = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
float AI1 = Projectile.Calamity().stealthStrike ? 1f : 0f;
|
||||
Vector2 perturbedSpeed = Projectile.velocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1)));
|
||||
Projectile.NewProjectile(Projectile.Center, perturbedSpeed, ModContent.ProjectileType<Crystalline2>(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, 0f, AI1);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, perturbedSpeed, ModContent.ProjectileType<Crystalline2>(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, 0f, AI1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Vector2 velocity = new Vector2(Main.rand.NextFloat(-14f, 14f), Main.rand.NextFloat(-14f, 14f));
|
||||
int flame = Projectile.NewProjectile(Projectile.Center, velocity, Main.rand.NextBool(2) ? ProjectileID.CursedFlameFriendly : ProjectileID.CursedDartFlame, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
int flame = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, Main.rand.NextBool(2) ? ProjectileID.CursedFlameFriendly : ProjectileID.CursedDartFlame, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
if (flame.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[flame].Calamity().forceRogue = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<DeepSeaDumbbell2>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<DeepSeaDumbbell2>(),
|
||||
(int)((double)Projectile.damage * 0.75), Projectile.knockBack * 0.75f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
float num628 = (float)Main.rand.Next(-35, 36) * 0.01f;
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
num629 *= -10f;
|
||||
}
|
||||
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
(int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
num3 = num627;
|
||||
@@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<DeepSeaDumbbell2>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<DeepSeaDumbbell2>(),
|
||||
(int)((double)Projectile.damage * 0.75), Projectile.knockBack * 0.75f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
float num628 = (float)Main.rand.Next(-35, 36) * 0.01f;
|
||||
@@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
num629 *= -10f;
|
||||
}
|
||||
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
(int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
num3 = num627;
|
||||
@@ -125,7 +125,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<DeepSeaDumbbell2>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<DeepSeaDumbbell2>(),
|
||||
(int)((double)Projectile.damage * 0.75), Projectile.knockBack * 0.75f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
float num628 = (float)Main.rand.Next(-35, 36) * 0.01f;
|
||||
@@ -144,7 +144,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
num629 *= -10f;
|
||||
}
|
||||
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
(int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
num3 = num627;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<DeepSeaDumbbell3>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<DeepSeaDumbbell3>(),
|
||||
(int)((double)Projectile.damage * 0.75), Projectile.knockBack * 0.75f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
float num628 = (float)Main.rand.Next(-35, 36) * 0.01f;
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
num629 *= -10f;
|
||||
}
|
||||
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
(int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
num3 = num627;
|
||||
@@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<DeepSeaDumbbell3>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<DeepSeaDumbbell3>(),
|
||||
(int)((double)Projectile.damage * 0.75), Projectile.knockBack * 0.75f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
float num628 = (float)Main.rand.Next(-35, 36) * 0.01f;
|
||||
@@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
num629 *= -10f;
|
||||
}
|
||||
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
(int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
num3 = num627;
|
||||
@@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<DeepSeaDumbbell3>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<DeepSeaDumbbell3>(),
|
||||
(int)((double)Projectile.damage * 0.75), Projectile.knockBack * 0.75f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
float num628 = (float)Main.rand.Next(-35, 36) * 0.01f;
|
||||
@@ -151,7 +151,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
num629 *= -10f;
|
||||
}
|
||||
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
(int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
num3 = num627;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
num629 *= -10f;
|
||||
}
|
||||
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
(int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
num3 = num627;
|
||||
@@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
num629 *= -10f;
|
||||
}
|
||||
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
(int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
num3 = num627;
|
||||
@@ -131,7 +131,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
num629 *= -10f;
|
||||
}
|
||||
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType<DeepSeaDumbbellWeight>(),
|
||||
(int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
num3 = num627;
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 waterVelocity = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1));
|
||||
waterVelocity.Normalize();
|
||||
waterVelocity *= 3;
|
||||
Projectile.NewProjectile(spriteCenter, waterVelocity, ModContent.ProjectileType<DeepWounderWater>(), 20, 1, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), spriteCenter, waterVelocity, ModContent.ProjectileType<DeepWounderWater>(), 20, 1, Projectile.owner, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 ai0 = fireTo - spawnPoint;
|
||||
float ai = (float)Main.rand.Next(100);
|
||||
Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(0.78539818525314331)) * 9f;
|
||||
int proj = Projectile.NewProjectile(spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ProjectileID.CultistBossLightningOrbArc, (int)(Projectile.damage * damageMult), Projectile.knockBack, Projectile.owner, ai0.ToRotation(), ai);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ProjectileID.CultistBossLightningOrbArc, (int)(Projectile.damage * damageMult), Projectile.knockBack, Projectile.owner, ai0.ToRotation(), ai);
|
||||
Main.projectile[proj].extraUpdates += 9;
|
||||
//Does not force to Rogue because lightning is extremely abusable with Moonstone Crown
|
||||
Main.projectile[proj].friendly = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 value17 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
||||
value17.Normalize();
|
||||
value17 *= (float)Main.rand.Next(10, 201) * 0.01f;
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, value17.X, value17.Y, ModContent.ProjectileType<DesecratedBubble>(), (int)(Projectile.damage * 0.5), 1f, Projectile.owner, (Projectile.Calamity().stealthStrike ? 1f : 0f), 1f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, value17.X, value17.Y, ModContent.ProjectileType<DesecratedBubble>(), (int)(Projectile.damage * 0.5), 1f, Projectile.owner, (Projectile.Calamity().stealthStrike ? 1f : 0f), 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < hitCount; i++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<DestructionBolt>(), (int)(Projectile.damage * 0.5), 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<DestructionBolt>(), (int)(Projectile.damage * 0.5), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
float velocityX = Main.rand.NextFloat(-0.8f, 0.8f);
|
||||
float velocityY = Main.rand.NextFloat(-0.8f, -0.8f);
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, velocityX, velocityY, ModContent.ProjectileType<DukesDecapitatorBubble>(), (int)(Projectile.damage * 0.8), Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, velocityX, velocityY, ModContent.ProjectileType<DukesDecapitatorBubble>(), (int)(Projectile.damage * 0.8), Projectile.knockBack, Projectile.owner);
|
||||
}
|
||||
}
|
||||
if (rotationAmount <= 0f)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int index = 0; index < cloudAmt; index++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 10f, 200f, 0.01f);
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, projType, Projectile.damage, Projectile.knockBack * 0.5f, Projectile.owner, stealth ? 1f : 0f, (float)Main.rand.Next(-45, 1));
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projType, Projectile.damage, Projectile.knockBack * 0.5f, Projectile.owner, stealth ? 1f : 0f, (float)Main.rand.Next(-45, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
newAxeVelocity.Normalize();
|
||||
newAxeVelocity *= 20f;
|
||||
int p = Projectile.NewProjectile(Projectile.position, newAxeVelocity, ModContent.ProjectileType<EnchantedAxe2>(), (int)(Projectile.damage * 1.2f), 2, Projectile.owner, 0, 0);
|
||||
int p = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, newAxeVelocity, ModContent.ProjectileType<EnchantedAxe2>(), (int)(Projectile.damage * 1.2f), 2, Projectile.owner, 0, 0);
|
||||
Main.projectile[p].Calamity().stealthStrike = Projectile.Calamity().stealthStrike;
|
||||
summonAxe = false;
|
||||
}
|
||||
@@ -108,14 +108,14 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
float axeSpeed = 15f;
|
||||
int axeDamage = Projectile.damage / 2;
|
||||
Projectile.NewProjectile(Projectile.position, new Vector2(1f, 0f) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.position, new Vector2(0f, 1f) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.position, new Vector2(-1f, 0f) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.position, new Vector2(0f, -1f) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.position, Vector2.Normalize(new Vector2(1f, 1f)) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.position, Vector2.Normalize(new Vector2(1f, -1f)) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.position, Vector2.Normalize(new Vector2(-1f, -1f)) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.position, Vector2.Normalize(new Vector2(-1f, 1f)) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, new Vector2(1f, 0f) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, new Vector2(0f, 1f) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, new Vector2(-1f, 0f) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, new Vector2(0f, -1f) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, Vector2.Normalize(new Vector2(1f, 1f)) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, Vector2.Normalize(new Vector2(1f, -1f)) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, Vector2.Normalize(new Vector2(-1f, -1f)) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, Vector2.Normalize(new Vector2(-1f, 1f)) * axeSpeed, ModContent.ProjectileType<EnchantedAxe2>(), axeDamage, 2, Projectile.owner, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
if (Projectile.timeLeft % 5 == 0 && Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
int projIndex2 = Projectile.NewProjectile(Projectile.Center, (Projectile.velocity * -1f).RotatedByRandom(MathHelper.ToRadians(15f)), ModContent.ProjectileType<PlagueSeeker>(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner);
|
||||
int projIndex2 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, (Projectile.velocity * -1f).RotatedByRandom(MathHelper.ToRadians(15f)), ModContent.ProjectileType<PlagueSeeker>(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner);
|
||||
if (projIndex2.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[projIndex2].Calamity().forceRogue = true;
|
||||
}
|
||||
@@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
if (Projectile.ai[0] == 0f)
|
||||
{
|
||||
int projIndex1 = Projectile.NewProjectile(Projectile.Center, Projectile.velocity, ModContent.ProjectileType<PlagueSeeker>(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner);
|
||||
int projIndex1 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType<PlagueSeeker>(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner);
|
||||
if (projIndex1.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[projIndex1].Calamity().forceRogue = true;
|
||||
Projectile.ai[0] = 12f; //0.2th of a second cooldown
|
||||
@@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.ai[0] == 0f)
|
||||
{
|
||||
int projectileIndex = Projectile.NewProjectile(Projectile.Center, Projectile.velocity, ModContent.ProjectileType<PlagueSeeker>(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner);
|
||||
int projectileIndex = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType<PlagueSeeker>(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner);
|
||||
if (projectileIndex.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[projectileIndex].Calamity().forceRogue = true;
|
||||
Projectile.ai[0] = 12f; //0.2th of a second cooldown
|
||||
@@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.ai[0] == 0f)
|
||||
{
|
||||
int projectileIndex = Projectile.NewProjectile(Projectile.Center, Projectile.velocity, ModContent.ProjectileType<PlagueSeeker>(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner);
|
||||
int projectileIndex = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType<PlagueSeeker>(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner);
|
||||
if (projectileIndex.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[projectileIndex].Calamity().forceRogue = true;
|
||||
Projectile.ai[0] = 12f; //0.2th of a second cooldown
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -50,10 +50,10 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f));
|
||||
shardVelocity.Normalize();
|
||||
shardVelocity *= 5f;
|
||||
Projectile.NewProjectile(Projectile.Center, shardVelocity, ModContent.ProjectileType<EquanimityDarkShard>(), (int)(Projectile.damage * 0.15f), 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, shardVelocity, ModContent.ProjectileType<EquanimityDarkShard>(), (int)(Projectile.damage * 0.15f), 0f, Projectile.owner);
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center, -shardVelocity, ModContent.ProjectileType<EquanimityLightShard>(), (int)(Projectile.damage * 0.15f), 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, -shardVelocity, ModContent.ProjectileType<EquanimityLightShard>(), (int)(Projectile.damage * 0.15f), 0f, Projectile.owner);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,10 +84,10 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f));
|
||||
shardVelocity.Normalize();
|
||||
shardVelocity *= 5f;
|
||||
Projectile.NewProjectile(Projectile.Center, shardVelocity, ModContent.ProjectileType<EquanimityLightShard>(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, shardVelocity, ModContent.ProjectileType<EquanimityLightShard>(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner);
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center, -shardVelocity, ModContent.ProjectileType<EquanimityDarkShard>(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, -shardVelocity, ModContent.ProjectileType<EquanimityDarkShard>(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,10 +105,10 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f));
|
||||
shardVelocity.Normalize();
|
||||
shardVelocity *= 5f;
|
||||
Projectile.NewProjectile(Projectile.Center, shardVelocity, ModContent.ProjectileType<EquanimityLightShard>(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, shardVelocity, ModContent.ProjectileType<EquanimityLightShard>(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner);
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center, -shardVelocity, ModContent.ProjectileType<EquanimityDarkShard>(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, -shardVelocity, ModContent.ProjectileType<EquanimityDarkShard>(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
|
||||
int laserDamage = (int)(Projectile.damage * 0.12D);
|
||||
Projectile laser = Projectile.NewProjectileDirect(Projectile.Center, velocity, ModContent.ProjectileType<NebulaShot>(), laserDamage, 0f, Projectile.owner);
|
||||
Projectile laser = Projectile.NewProjectileDirect(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<NebulaShot>(), laserDamage, 0f, Projectile.owner);
|
||||
if (laser.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
laser.Calamity().forceRogue = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
SoundEngine.PlaySound(SoundID.Item73, Projectile.Center);
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
Projectile.NewProjectile(new Vector2(position.X + (-600 + i * 60), position.Y - 800), new Vector2(0f, 2.5f), ModContent.ProjectileType<ExecutionersBladeStealthProj>(), (int)(Projectile.damage * 1.2f), Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), new Vector2(position.X + (-600 + i * 60), position.Y - 800), new Vector2(0f, 2.5f), ModContent.ProjectileType<ExecutionersBladeStealthProj>(), (int)(Projectile.damage * 1.2f), Projectile.knockBack, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
//Crystal smash sound
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.Center);
|
||||
// Light burst
|
||||
int p = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ExorcismShockwave>(), (int)(Projectile.damage * 0.8f), 0, Projectile.owner, Projectile.ai[0] - 1f, 0);
|
||||
int p = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ExorcismShockwave>(), (int)(Projectile.damage * 0.8f), 0, Projectile.owner, Projectile.ai[0] - 1f, 0);
|
||||
Main.projectile[p].rotation = Projectile.rotation;
|
||||
// Stars
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
@@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 pos = new Vector2(Projectile.Center.X + (float)Projectile.width * 0.5f + (float)Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
|
||||
float speedX = (Projectile.Center.X - pos.X) / 20f;
|
||||
float speedY = (Projectile.Center.Y - pos.Y) / 20f;
|
||||
Projectile.NewProjectile(pos.X, pos.Y, speedX, speedY, ModContent.ProjectileType<ExorcismStar>(), Projectile.damage / 2, 3, Projectile.owner, Main.rand.NextFloat(-3f, 3f), 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos.X, pos.Y, speedX, speedY, ModContent.ProjectileType<ExorcismStar>(), Projectile.damage / 2, 3, Projectile.owner, Main.rand.NextFloat(-3f, 3f), 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
// Use a tiny velocity to ensure that rotation works correctly.
|
||||
// The speed should be so low that it will make no meaningful mechanical difference.
|
||||
Vector2 soulVelocity = Projectile.velocity.SafeNormalize(Vector2.Zero) * 0.0001f;
|
||||
Projectile.NewProjectile(Projectile.Center, soulVelocity, ModContent.ProjectileType<LostSoulFriendly>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, soulVelocity, ModContent.ProjectileType<LostSoulFriendly>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(Projectile.position, new Vector2(Projectile.velocity.X / 20, 2), ModContent.ProjectileType<StickyFeatherAero>(), (int)(Projectile.damage * 0.4), Projectile.knockBack, Projectile.owner);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, new Vector2(Projectile.velocity.X / 20, 2), ModContent.ProjectileType<StickyFeatherAero>(), (int)(Projectile.damage * 0.4), Projectile.knockBack, Projectile.owner);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().forceRogue = true;
|
||||
}
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(Projectile.position, new Vector2(Projectile.velocity.X / 20, 2), ModContent.ProjectileType<StickyFeatherAero>(), (int)(Projectile.damage * 0.69), Projectile.knockBack, Projectile.owner);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, new Vector2(Projectile.velocity.X / 20, 2), ModContent.ProjectileType<StickyFeatherAero>(), (int)(Projectile.damage * 0.69), Projectile.knockBack, Projectile.owner);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().forceRogue = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<FinalDawnReticle>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<FinalDawnReticle>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
}
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<FinalDawnFlame>(), Projectile.damage / 2, 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<FinalDawnFlame>(), Projectile.damage / 2, 0f, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -99,7 +99,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
// Stealth Strike
|
||||
if (player.Calamity().StealthStrikeAvailable() && Projectile.ai[1] != 1f)
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(player.Center,
|
||||
int stealth = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), player.Center,
|
||||
player.SafeDirectionTo(Main.MouseWorld) * 38f,
|
||||
ModContent.ProjectileType<FinalDawnThrow2>(),
|
||||
(int)(Projectile.damage * 1.05f),
|
||||
@@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center,
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center,
|
||||
Projectile.SafeDirectionTo(Main.MouseWorld) * 38f,
|
||||
ModContent.ProjectileType<FinalDawnThrow>(), Projectile.damage,
|
||||
Projectile.knockBack, Projectile.owner);
|
||||
@@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
// Stealth
|
||||
if (player.Calamity().StealthStrikeAvailable() && Projectile.ai[1] != 1f)
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(Projectile.Center,
|
||||
int stealth = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center,
|
||||
Projectile.velocity,
|
||||
ModContent.ProjectileType<FinalDawnHorizontalSlash>(),
|
||||
(int)(Projectile.damage * 1.275f),
|
||||
@@ -136,7 +136,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
else
|
||||
{
|
||||
//This one doesn't consume stealth since it replenishes stealth on hits
|
||||
Projectile.NewProjectile(Projectile.Center,
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center,
|
||||
Projectile.velocity,
|
||||
ModContent.ProjectileType<FinalDawnFireSlash>(),
|
||||
Projectile.damage,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
Vector2 velocity = Utils.NextVector2Circular(Main.rand, 7.2f, 7.2f);
|
||||
Projectile.NewProjectile(Projectile.Center, velocity,
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity,
|
||||
ModContent.ProjectileType<FinalDawnFireball>(),
|
||||
(int)(Projectile.damage * 0.3), Projectile.knockBack, Projectile.owner, 0f,
|
||||
target.whoAmI);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, Vector2.Zero, ModContent.ProjectileType<FuckYou>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), position, Vector2.Zero, ModContent.ProjectileType<FuckYou>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().forceRogue = true;
|
||||
if (Projectile.Calamity().stealthStrike && Projectile.localAI[0] <= 0f)
|
||||
@@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Point result;
|
||||
if (WorldUtils.Find(Projectile.Top.ToTileCoordinates(), Searches.Chain((GenSearch)new Searches.Down(80), (GenCondition)new Conditions.IsSolid()), out result))
|
||||
{
|
||||
Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType<SubductionFlameburst>(), (int)(Projectile.damage * 1.5f), 2f, Projectile.owner, 1f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType<SubductionFlameburst>(), (int)(Projectile.damage * 1.5f), 2f, Projectile.owner, 1f);
|
||||
Projectile.localAI[0] = 30f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
vel.X += Main.rand.Next(-50, 51);
|
||||
vel.Normalize();
|
||||
vel *= 30f;
|
||||
int shard = Projectile.NewProjectile(pos, vel + Projectile.velocity / 4f, ModContent.ProjectileType<FrostShardFriendly>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, vel + Projectile.velocity / 4f, ModContent.ProjectileType<FrostShardFriendly>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
Main.projectile[shard].alpha = Projectile.alpha;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
vel.X += Main.rand.Next(-50, 51);
|
||||
vel.Normalize();
|
||||
vel *= 30f;
|
||||
int shard = Projectile.NewProjectile(pos, vel + Main.npc[id].velocity, ModContent.ProjectileType<FrostShardFriendly>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, vel + Main.npc[id].velocity, ModContent.ProjectileType<FrostShardFriendly>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
Main.projectile[shard].alpha = Projectile.alpha;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -51,12 +51,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
vel.X += Main.rand.Next(-50, 51);
|
||||
vel.Normalize();
|
||||
vel *= 30f;
|
||||
int flare = Projectile.NewProjectile(pos, vel + Projectile.velocity / 4f, ModContent.ProjectileType<FrostyFlareProj>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
int flare = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, vel + Projectile.velocity / 4f, ModContent.ProjectileType<FrostyFlareProj>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
Main.projectile[flare].alpha = 150;
|
||||
}
|
||||
if (Projectile.timeLeft % 10 == 0)
|
||||
{
|
||||
int snowflake = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0f, Projectile.velocity.Y * 0f, ProjectileID.NorthPoleSnowflake, (int)(Projectile.damage * 0.25), Projectile.knockBack, Projectile.owner, 0f, Main.rand.Next(3));
|
||||
int snowflake = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0f, Projectile.velocity.Y * 0f, ProjectileID.NorthPoleSnowflake, (int)(Projectile.damage * 0.25), Projectile.knockBack, Projectile.owner, 0f, Main.rand.Next(3));
|
||||
if (snowflake.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[snowflake].Calamity().forceRogue = true;
|
||||
@@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
vel.X += Main.rand.Next(-50, 51);
|
||||
vel.Normalize();
|
||||
vel *= 30f;
|
||||
int flare = Projectile.NewProjectile(pos, vel + Main.npc[id].velocity, ModContent.ProjectileType<FrostyFlareProj>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
int flare = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, vel + Main.npc[id].velocity, ModContent.ProjectileType<FrostyFlareProj>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
Main.projectile[flare].alpha = 150;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
if (Projectile.timeLeft % 30 == 0 && Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<UltimusCleaverDust>(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<UltimusCleaverDust>(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().forceRogue = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -39,11 +39,11 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<GacruxianHome>(), (int)(Projectile.damage * 0.3), Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<GacruxianHome>(), (int)(Projectile.damage * 0.3), Projectile.knockBack, Projectile.owner);
|
||||
}
|
||||
else
|
||||
{
|
||||
int proj = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<UltimusCleaverDust>(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<UltimusCleaverDust>(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().forceRogue = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Projectile.timeLeft % 8 == 0)
|
||||
{
|
||||
Vector2 velocity = new Vector2(Main.rand.NextFloat(-7f, 7f), Main.rand.NextFloat(-7f, 7f));
|
||||
int slime = Projectile.NewProjectile(Projectile.Center, velocity, ProjectileID.SlimeGun, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
int slime = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ProjectileID.SlimeGun, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
if (slime.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[slime].Calamity().forceRogue = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
// Each soul has randomized player homing strength
|
||||
float ai1 = Main.rand.NextFloat() + 0.5f;
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, projID, soulDamage, soulKB, Projectile.owner, 0f, ai1);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projID, soulDamage, soulKB, Projectile.owner, 0f, ai1);
|
||||
|
||||
// Rotate direction for the next soul
|
||||
velocity = velocity.RotatedBy(MathHelper.TwoPi / numSouls);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int idx = Projectile.NewProjectile(startPos, kunaiSp, ModContent.ProjectileType<GodsParanoiaDart>(), Projectile.damage / 2, Projectile.knockBack / 2f, Projectile.owner, 0f, 0f);
|
||||
int idx = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), startPos, kunaiSp, ModContent.ProjectileType<GodsParanoiaDart>(), Projectile.damage / 2, Projectile.knockBack / 2f, Projectile.owner, 0f, 0f);
|
||||
Main.projectile[idx].rotation = angle;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -76,13 +76,13 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Vector2 shrapnelVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(30f));
|
||||
Projectile.NewProjectile(Projectile.Center, Projectile.velocity + shrapnelVelocity,
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + shrapnelVelocity,
|
||||
ModContent.ProjectileType<AcidShrapnel>(), Projectile.damage, 3f, Projectile.owner);
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector2 acidVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(40f));
|
||||
int acidIndex = Projectile.NewProjectile(Projectile.Center, Projectile.velocity + acidVelocity,
|
||||
int acidIndex = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + acidVelocity,
|
||||
ModContent.ProjectileType<AcidBarrelDrop>(),
|
||||
(int)(Projectile.damage * 0.75f), 1f, Projectile.owner);
|
||||
if (acidIndex.WithinBounds(Main.maxProjectiles))
|
||||
@@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
Vector2 acidVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(40f));
|
||||
int acidIndex = Projectile.NewProjectile(Projectile.Center, Projectile.velocity + acidVelocity,
|
||||
int acidIndex = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + acidVelocity,
|
||||
ModContent.ProjectileType<AcidBarrelDrop>(),
|
||||
(int)(Projectile.damage * 0.667f), 1f, Projectile.owner);
|
||||
if (acidIndex.WithinBounds(Main.maxProjectiles))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -195,8 +195,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType<HeavenfallenEnergy>(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType<HeavenfallenEnergy>(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType<HeavenfallenEnergy>(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType<HeavenfallenEnergy>(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.CalPlayer;
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
vector2_2 *= 2f;
|
||||
Vector2 vector2_3 = velocity * 0.25f + vector2_2;
|
||||
Vector2 vector2_5 = vector2_3 * 0.8f;
|
||||
Projectile.NewProjectile(Projectile.Center.X - vector2_5.X, Projectile.Center.Y - vector2_5.Y, vector2_5.X, vector2_5.Y, ModContent.ProjectileType<ExplosiveSun>(), Projectile.damage, Projectile.knockBack, Projectile.owner, Main.rand.Next(3), 0.0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X - vector2_5.X, Projectile.Center.Y - vector2_5.Y, vector2_5.X, vector2_5.Y, ModContent.ProjectileType<ExplosiveSun>(), Projectile.damage, Projectile.knockBack, Projectile.owner, Main.rand.Next(3), 0.0f);
|
||||
Projectile.localAI[1] = 0.0f;
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
vector2_2 *= 2f;
|
||||
Vector2 vector2_3 = velocity * 0.25f + vector2_2;
|
||||
Vector2 vector2_5 = vector2_3 * 0.8f;
|
||||
Projectile.NewProjectile(Projectile.Center.X - vector2_5.X, Projectile.Center.Y - vector2_5.Y, vector2_5.X, vector2_5.Y, ModContent.ProjectileType<ExplosiveSun>(), Projectile.damage, Projectile.knockBack, Projectile.owner, Main.rand.Next(3), 0.0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X - vector2_5.X, Projectile.Center.Y - vector2_5.Y, vector2_5.X, vector2_5.Y, ModContent.ProjectileType<ExplosiveSun>(), Projectile.damage, Projectile.knockBack, Projectile.owner, Main.rand.Next(3), 0.0f);
|
||||
Projectile.localAI[1] = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
|
||||
//Spawn the projectile
|
||||
Projectile.NewProjectile(Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType<HoneycombFragment>(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType<HoneycombFragment>(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f);
|
||||
split += 1;
|
||||
}
|
||||
Projectile.penetrate--;
|
||||
@@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
|
||||
//Spawn the projectile
|
||||
Projectile.NewProjectile(Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType<HoneycombFragment>(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType<HoneycombFragment>(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f);
|
||||
split += 1;
|
||||
}
|
||||
}
|
||||
@@ -129,7 +129,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
|
||||
//Spawn the projectile
|
||||
Projectile.NewProjectile(Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType<HoneycombFragment>(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType<HoneycombFragment>(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f);
|
||||
split += 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
int texID = Main.rand.Next(4);
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, type, shardDamage, shardKB, Main.myPlayer, texID, 1f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, type, shardDamage, shardKB, Main.myPlayer, texID, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -108,10 +108,10 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f),
|
||||
ModContent.ProjectileType<KelvinCatalystStar>(), Projectile.damage / 8, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f);
|
||||
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f),
|
||||
ModContent.ProjectileType<KelvinCatalystStar>(), Projectile.damage / 8, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
@@ -133,10 +133,10 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f),
|
||||
ModContent.ProjectileType<KelvinCatalystStar>(), Projectile.damage / 8, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f);
|
||||
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f),
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f),
|
||||
ModContent.ProjectileType<KelvinCatalystStar>(), Projectile.damage / 8, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (explosionCount < 3) //max amount of explosions to prevent worm memes
|
||||
{
|
||||
int ice = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<CosmicIceBurst>(), (int)(Projectile.damage * 1.5), Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
int ice = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<CosmicIceBurst>(), (int)(Projectile.damage * 1.5), Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
if (ice.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[ice].Calamity().forceRogue = true;
|
||||
explosionCount++;
|
||||
@@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
//no explosion count cap in pvp
|
||||
int ice = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<CosmicIceBurst>(), (int)(Projectile.damage * 1.5), Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
int ice = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<CosmicIceBurst>(), (int)(Projectile.damage * 1.5), Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
if (ice.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[ice].Calamity().forceRogue = true;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Vector2 velocity = new Vector2(Main.rand.NextFloat(-14f, 14f), Main.rand.NextFloat(-14f, 14f));
|
||||
int ichor = Projectile.NewProjectile(Projectile.Center, velocity, Main.rand.NextBool(2) ? ProjectileID.GoldenShowerFriendly : ProjectileID.IchorSplash, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
int ichor = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, Main.rand.NextBool(2) ? ProjectileID.GoldenShowerFriendly : ProjectileID.IchorSplash, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
if (ichor.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[ichor].Calamity().forceRogue = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -79,9 +79,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
sparkVelocity.Normalize();
|
||||
sparkVelocity *= 3;
|
||||
|
||||
Projectile.NewProjectile(Projectile.Center, sparkVelocity, ModContent.ProjectileType<InfernalKrisCinder>(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType<InfernalKrisCinder>(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0);
|
||||
}
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<InfernalKrisExplosion>(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<InfernalKrisExplosion>(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0);
|
||||
SoundEngine.PlaySound(SoundID.Item74, Projectile.position);
|
||||
}
|
||||
}
|
||||
@@ -102,9 +102,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
sparkVelocity.Normalize();
|
||||
sparkVelocity *= 3;
|
||||
|
||||
Projectile.NewProjectile(Projectile.Center, sparkVelocity, ModContent.ProjectileType<InfernalKrisCinder>(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType<InfernalKrisCinder>(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0);
|
||||
}
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<InfernalKrisExplosion>(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<InfernalKrisExplosion>(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0);
|
||||
SoundEngine.PlaySound(SoundID.Item74, Projectile.position);
|
||||
}
|
||||
}
|
||||
@@ -193,9 +193,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
sparkVelocity.Normalize();
|
||||
sparkVelocity *= 3;
|
||||
|
||||
Projectile.NewProjectile(Projectile.Center, sparkVelocity, ModContent.ProjectileType<InfernalKrisCinder>(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType<InfernalKrisCinder>(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0);
|
||||
}
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<InfernalKrisExplosion>(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<InfernalKrisExplosion>(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0);
|
||||
SoundEngine.PlaySound(SoundID.Item74, Projectile.position);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
inkType = ModContent.ProjectileType<InkCloud3>();
|
||||
break;
|
||||
}
|
||||
int inkID = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), inkType, (int)(22 * player.RogueDamage()), 7, Projectile.owner);
|
||||
int inkID = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), inkType, (int)(22 * player.RogueDamage()), 7, Projectile.owner);
|
||||
Main.projectile[inkID].timeLeft += Main.rand.Next(-20, 25);
|
||||
}
|
||||
Projectile.Kill();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<CrushDepth>(), 120);
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<JawsShockwave>(), (int)(100f * player.RogueDamage()), 10f, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<JawsShockwave>(), (int)(100f * player.RogueDamage()), 10f, Projectile.owner, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<CrushDepth>(), 120);
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<JawsShockwave>(), (int)(100f * player.RogueDamage()), 10f, Projectile.owner, 0, 0);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<JawsShockwave>(), (int)(100f * player.RogueDamage()), 10f, Projectile.owner, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
@@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
float SpeedX = -Projectile.velocity.X * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f;
|
||||
float SpeedY = -Projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f;
|
||||
Projectile.NewProjectile(Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ProjectileID.CrystalShard, Projectile.damage / 4, 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ProjectileID.CrystalShard, Projectile.damage / 4, 0f, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -184,9 +184,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f), projType, Projectile.damage / 6, Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f), projType, Projectile.damage / 6, Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f), projType, Projectile.damage / 6, Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f), projType, Projectile.damage / 6, Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
}
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item30, Projectile.position);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -141,12 +141,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Main.rand.NextBool(2) && Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
Vector2 shrapnelVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(40f));
|
||||
Projectile.NewProjectile(Projectile.Top, shrapnelVelocity, ModContent.ProjectileType<BarrelShrapnel>(), projdmg, 3f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Top, shrapnelVelocity, ModContent.ProjectileType<BarrelShrapnel>(), projdmg, 3f, Projectile.owner);
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector2 fireVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(40f));
|
||||
int fireIndex = Projectile.NewProjectile(Projectile.Top, fireVelocity, ModContent.ProjectileType<TotalityFire>(), projdmg / 3, 1f, Projectile.owner);
|
||||
int fireIndex = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Top, fireVelocity, ModContent.ProjectileType<TotalityFire>(), projdmg / 3, 1f, Projectile.owner);
|
||||
Main.projectile[fireIndex].localNPCHitCooldown = -2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.owner != Main.myPlayer)
|
||||
return;
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<LeonidStar>(), Projectile.damage / 3, 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<LeonidStar>(), Projectile.damage / 3, 0f, Projectile.owner);
|
||||
Projectile.ai[1] = -1f;
|
||||
Projectile.position = Projectile.Center;
|
||||
Projectile.width = Projectile.height = 40;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
@@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
SoundEngine.PlaySound(SoundID.Item62, Projectile.position);
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
int flash = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<Flash>(), Projectile.damage, 0f, Projectile.owner, 0f, 1f);
|
||||
int flash = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<Flash>(), Projectile.damage, 0f, Projectile.owner, 0f, 1f);
|
||||
if (flash.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[flash].Calamity().forceRogue = true;
|
||||
@@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 pos = new Vector2(Projectile.Center.X + Projectile.width * 0.5f + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
|
||||
Vector2 velocity = (Projectile.Center - pos) / 40f;
|
||||
int dmg = Projectile.damage / 2;
|
||||
Projectile.NewProjectile(pos, velocity, ModContent.ProjectileType<LeonidCometBig>(), dmg, Projectile.knockBack, Projectile.owner, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, velocity, ModContent.ProjectileType<LeonidCometBig>(), dmg, Projectile.knockBack, Projectile.owner, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
float num3 = -(num1 * 2f) / (cometAmt - 1f);
|
||||
for (int projIndex = 0; projIndex < cometAmt; ++projIndex)
|
||||
{
|
||||
int index2 = Projectile.NewProjectile(Projectile.Center, spinningpoint.RotatedBy((double)num1 + (double)num3 * (double)projIndex, new Vector2()), ModContent.ProjectileType<LeonidCometSmall>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, -1f);
|
||||
int index2 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, spinningpoint.RotatedBy((double)num1 + (double)num3 * (double)projIndex, new Vector2()), ModContent.ProjectileType<LeonidCometSmall>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, -1f);
|
||||
Projectile proj = Main.projectile[index2];
|
||||
for (int index3 = 0; index3 < Projectile.localNPCImmunity.Length; ++index3)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 velocity = Projectile.DirectionFrom(Main.player[Projectile.owner].Center);
|
||||
velocity *= Main.rand.NextFloat(4.5f, 6.5f);
|
||||
velocity = velocity.RotatedBy((Main.rand.NextDouble() - 0.5) * Math.PI * 0.5, default);
|
||||
int spike = Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<UrchinSpikeFugu>(), (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner, -10f, 0f);
|
||||
int spike = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<UrchinSpikeFugu>(), (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner, -10f, 0f);
|
||||
if (spike.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[spike].Calamity().forceRogue = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -50,10 +50,10 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X + Main.rand.NextFloat(-15f, 15f), Projectile.Center.Y + Main.rand.NextFloat(-15f, 15f), Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<LuminousShard>(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X + Main.rand.NextFloat(-15f, 15f), Projectile.Center.Y + Main.rand.NextFloat(-15f, 15f), Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<LuminousShard>(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner);
|
||||
}
|
||||
else
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0f, -2f, ModContent.ProjectileType<LuminousShard>(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0f, -2f, ModContent.ProjectileType<LuminousShard>(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
speed.Normalize();
|
||||
speed *= Main.rand.Next(30, 61) * 0.1f * 2f;
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType<LuminousShard>(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType<LuminousShard>(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
speed.Normalize();
|
||||
speed *= Main.rand.Next(30, 61) * 0.1f * 2f;
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType<LuminousShard>(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType<LuminousShard>(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.localAI[0] = 0f;
|
||||
Vector2 flowerSpawnPosition = Projectile.Center + Main.rand.NextVector2Square(-10f, 10f);
|
||||
Vector2 flowerShootVelocity = Projectile.velocity.RotatedByRandom(0.1f) * 0.25f;
|
||||
Projectile.NewProjectile(flowerSpawnPosition, flowerShootVelocity, ModContent.ProjectileType<MangroveChakramFlower>(), Projectile.damage / 4, 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), flowerSpawnPosition, flowerShootVelocity, ModContent.ProjectileType<MangroveChakramFlower>(), Projectile.damage / 4, 0f, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if(Projectile.ai[0] >= 10f)
|
||||
{
|
||||
Vector2 speed = new Vector2(Main.rand.NextFloat(-6f, 6f), Main.rand.NextFloat(-6f, 6f));
|
||||
Projectile.NewProjectile(Projectile.Center, speed, ModContent.ProjectileType<MetalShard>(), (int)(Projectile.damage * 0.3f), 0f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, speed, ModContent.ProjectileType<MetalShard>(), (int)(Projectile.damage * 0.3f), 0f, Projectile.owner, 0f, 0f);
|
||||
Projectile.ai[0] = 0f;
|
||||
}
|
||||
}
|
||||
@@ -51,12 +51,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Vector2 S1 = new Vector2(-Projectile.velocity.X, -Projectile.velocity.Y).RotatedBy(MathHelper.ToRadians(Main.rand.Next(-45, 46)));
|
||||
int proj = Projectile.NewProjectile(Projectile.Center, S1, ProjectileID.SpikyBall, (int)(Projectile.damage * 0.3), 0f, Projectile.owner, 0f, 0f);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, S1, ProjectileID.SpikyBall, (int)(Projectile.damage * 0.3), 0f, Projectile.owner, 0f, 0f);
|
||||
Main.projectile[proj].timeLeft = 600;
|
||||
Main.projectile[proj].usesLocalNPCImmunity = true;
|
||||
Main.projectile[proj].localNPCHitCooldown = 20;
|
||||
S1 = new Vector2(-Projectile.velocity.X * 0.7f, -Projectile.velocity.Y*0.7f).RotatedBy(MathHelper.ToRadians(Main.rand.Next(-45, 46)));
|
||||
Projectile.NewProjectile(Projectile.Center, S1, ModContent.ProjectileType<MetalShard>(), (int)(Projectile.damage * 0.3), 0f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, S1, ModContent.ProjectileType<MetalShard>(), (int)(Projectile.damage * 0.3), 0f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
//Dust
|
||||
for (int i = 0; i < 20; i++)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -146,7 +146,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
newFistVelocity.Normalize();
|
||||
newFistVelocity *= 10f;
|
||||
float AI1 = Projectile.ai[1] - 1f;
|
||||
int p = Projectile.NewProjectile(Projectile.position, newFistVelocity, ModContent.ProjectileType<MeteorFistProj>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, AI1);
|
||||
int p = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, newFistVelocity, ModContent.ProjectileType<MeteorFistProj>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, AI1);
|
||||
Main.projectile[p].Calamity().stealthStrike = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
iAmSpeed.Normalize();
|
||||
iAmSpeed *= (float)Main.rand.Next(70, 101) * 0.1f;
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, iAmSpeed.X, iAmSpeed.Y, ModContent.ProjectileType<MoltenBlobThrown>(), (int)(Projectile.damage * 0.25), 0f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, iAmSpeed.X, iAmSpeed.Y, ModContent.ProjectileType<MoltenBlobThrown>(), (int)(Projectile.damage * 0.25), 0f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 velocityOffset = Main.rand.NextFloat(-velocityMult, velocityMult) * Projectile.velocity;
|
||||
Vector2 pos = Projectile.Center + directOffset + velocityOffset;
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
Projectile.NewProjectile(pos, Vector2.Zero, bladeID, bladeDamage, bladeKB, Projectile.owner, 0f, spin);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, Vector2.Zero, bladeID, bladeDamage, bladeKB, Projectile.owner, 0f, spin);
|
||||
}
|
||||
|
||||
private void SpawnScytheAfterimage()
|
||||
@@ -177,7 +177,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
float d = 16f;
|
||||
float velocityMult = 0.9f;
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, bladeID, bladeDamage, bladeKB, Projectile.owner, 0f, spin);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, bladeID, bladeDamage, bladeKB, Projectile.owner, 0f, spin);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int n = 0; n < needleAmt; n++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
int shard = Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<NastyChollaNeedle>(), (int)((NastyCholla.BaseDamage/4) * player.RogueDamage()), 0f, Projectile.owner, 0f, 0f);
|
||||
int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<NastyChollaNeedle>(), (int)((NastyCholla.BaseDamage/4) * player.RogueDamage()), 0f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
float starKB = 5f;
|
||||
Vector2 velocity = Projectile.velocity;
|
||||
|
||||
int p = Projectile.NewProjectile(Projectile.Center, velocity, projID, starDamage, starKB, Projectile.owner, 1f, 0f);
|
||||
int p = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projID, starDamage, starKB, Projectile.owner, 1f, 0f);
|
||||
Main.projectile[p].penetrate = 1;
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 velocity = Projectile.oldVelocity.RotateRandom(MathHelper.ToRadians(spread));
|
||||
float speed = Main.rand.NextFloat(1.5f, 2f);
|
||||
float moveDuration = Main.rand.Next(5, 15);
|
||||
Projectile.NewProjectile(Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration);
|
||||
}
|
||||
|
||||
SoundEngine.PlaySound(SoundID.Item, (int)Projectile.position.X, (int)Projectile.position.Y, 62, 0.6f);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
float speedMult = 24f / pathToTravel.Length();
|
||||
pathToTravel.X *= speedMult;
|
||||
pathToTravel.Y *= speedMult;
|
||||
int petal = Projectile.NewProjectile(startPos, pathToTravel, ProjectileID.FlowerPetal, Projectile.damage, 0f, Projectile.owner);
|
||||
int petal = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), startPos, pathToTravel, ProjectileID.FlowerPetal, Projectile.damage, 0f, Projectile.owner);
|
||||
if (petal.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[petal].Calamity().forceRogue = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -52,8 +52,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Dust.NewDust(Projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 144, 0f, 0f, 0, default, 1f);
|
||||
}
|
||||
|
||||
int javelin = Projectile.NewProjectile(Projectile.Center, Projectile.velocity.RotatedBy(MathHelper.ToRadians(5f)), Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
int javelin2 = Projectile.NewProjectile(Projectile.Center, Projectile.velocity.RotatedBy(MathHelper.ToRadians(-5f)), Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
int javelin = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity.RotatedBy(MathHelper.ToRadians(5f)), Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
int javelin2 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity.RotatedBy(MathHelper.ToRadians(-5f)), Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
if (javelin.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[javelin].Calamity().lineColor = Projectile.Calamity().lineColor + 1;
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < 360; i += ad)
|
||||
{
|
||||
Vector2 SoulSpeed = new Vector2(13f, 13f).RotatedBy(MathHelper.ToRadians(i + randrot));
|
||||
Projectile.NewProjectile(Projectile.Center, SoulSpeed, ModContent.ProjectileType<PenumbraSoul>(), (int)(Projectile.damage * dmgMult), 3f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, SoulSpeed, ModContent.ProjectileType<PenumbraSoul>(), (int)(Projectile.damage * dmgMult), 3f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
//Dust
|
||||
int maxDust = Projectile.Calamity().stealthStrike ? 100 : 70;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 velocity = ss
|
||||
? (Projectile.velocity * 0.4f).RotatedBy(Main.rand.NextFloat(-0.04f, 0.04f))
|
||||
: (Projectile.velocity * 0.08f) + Main.rand.NextVector2Circular(0.4f, 0.4f);
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, projID, damage, kb, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projID, damage, kb, Projectile.owner);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,9 +84,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
// Each pair of souls has randomized player homing strength
|
||||
float ai1 = Main.rand.NextFloat() + 0.5f;
|
||||
if (Main.rand.NextBool(2))
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, projID, soulDamage, soulKB, Projectile.owner, 0f, ai1);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projID, soulDamage, soulKB, Projectile.owner, 0f, ai1);
|
||||
if (Main.rand.NextBool(2))
|
||||
Projectile.NewProjectile(Projectile.Center, -velocity, projID, soulDamage, soulKB, Projectile.owner, 0f, ai1);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, -velocity, projID, soulDamage, soulKB, Projectile.owner, 0f, ai1);
|
||||
|
||||
// Rotate direction for the next pair of souls.
|
||||
velocity = velocity.RotatedBy(MathHelper.TwoPi / numSouls);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
damageMult = 0.7f;
|
||||
int soulDamage = (int)(Projectile.damage * damageMult);
|
||||
int soul = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<Phantom>(), soulDamage, Projectile.knockBack, Projectile.owner);
|
||||
int soul = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<Phantom>(), soulDamage, Projectile.knockBack, Projectile.owner);
|
||||
if (soul.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[soul].Calamity().forceRogue = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
float speedX = (float)Main.rand.Next(-35, 36) * 0.02f;
|
||||
float speedY = (float)Main.rand.Next(-35, 36) * 0.02f;
|
||||
Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, speedX, speedY, ModContent.ProjectileType<PlaguenadeBee>(), player.beeDamage(Projectile.damage), player.beeKB(0f), Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, speedX, speedY, ModContent.ProjectileType<PlaguenadeBee>(), player.beeDamage(Projectile.damage), player.beeKB(0f), Projectile.owner, 0f, 0f);
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item14, Projectile.position);
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
velocity *= 2f;
|
||||
velocity += Projectile.velocity * 0.25f;
|
||||
velocity *= 0.8f;
|
||||
int proj = Projectile.NewProjectile(Projectile.Center - velocity, velocity, Main.rand.Next(569,572), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center - velocity, velocity, Main.rand.Next(569,572), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].Calamity().forceRogue = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
@@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int s = 0; s < shardCount; s++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
int shard = Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<AquashardSplit>(), Projectile.damage / 3, 0f, Projectile.owner);
|
||||
int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<AquashardSplit>(), Projectile.damage / 3, 0f, Projectile.owner);
|
||||
if (shard.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[shard].Calamity().forceRogue = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -50,12 +50,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f, 0.2f);
|
||||
if (numSpecProj < 2 && !hitEnemy)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<Prismalline3>(), (int)(Projectile.damage * 1.1), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<Prismalline3>(), (int)(Projectile.damage * 1.1), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
++numSpecProj;
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<Prismalline2>(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<Prismalline2>(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int num252 = 0; num252 < shardCount; num252++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
int shard = Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<AquashardSplit>(), Projectile.damage / 2, 0f, Projectile.owner);
|
||||
int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<AquashardSplit>(), Projectile.damage / 2, 0f, Projectile.owner);
|
||||
if (shard.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[shard].Calamity().forceRogue = true;
|
||||
@@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < numProj + 1; i++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f, 0.2f);
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<Prismalline3>(), (int)(Projectile.damage * 1.15), Projectile.knockBack, Projectile.owner, 1f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<Prismalline3>(), (int)(Projectile.damage * 1.15), Projectile.knockBack, Projectile.owner, 1f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int s = 0; s < shardCount; s++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
int shard = Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<AquashardSplit>(), Projectile.damage / 2, 0f, Projectile.owner);
|
||||
int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<AquashardSplit>(), Projectile.damage / 2, 0f, Projectile.owner);
|
||||
if (shard.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[shard].Calamity().forceRogue = true;
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
int projID = ModContent.ProjectileType<ProfanedPartisanSpear>();
|
||||
int spearDamage = (int)(Projectile.damage * 0.4f);
|
||||
float spearKB = 1f;
|
||||
Projectile.NewProjectile(spearPosition, spearSpeed, projID, spearDamage, spearKB, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), spearPosition, spearSpeed, projID, spearDamage, spearKB, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
int projID = ModContent.ProjectileType<PartisanExplosion>();
|
||||
int explosionDamage = (int)(Projectile.damage * 0.8f);
|
||||
float explosionKB = 8f;
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, projID, explosionDamage, explosionKB, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, projID, explosionDamage, explosionKB, Projectile.owner);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -87,12 +87,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
speed.Normalize();
|
||||
speed *= (float)Main.rand.Next(30, 61) * 0.1f * 2.5f;
|
||||
int stabber2 = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType<RadiantStar2>(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner,
|
||||
int stabber2 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType<RadiantStar2>(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner,
|
||||
Projectile.ai[0] == 1f ? 1f : 0f, 0f);
|
||||
Main.projectile[stabber2].Calamity().stealthStrike = Projectile.Calamity().stealthStrike;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item14, Projectile.position);
|
||||
int boomer = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<RadiantExplosion>(), (int)(Projectile.damage * 0.75f), Projectile.knockBack, Projectile.owner);
|
||||
int boomer = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<RadiantExplosion>(), (int)(Projectile.damage * 0.75f), Projectile.knockBack, Projectile.owner);
|
||||
if (Projectile.Calamity().stealthStrike && boomer.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[boomer].Calamity().stealthStrike = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
Vector2 shootDirection = (MathHelper.TwoPi * i / 6f + Projectile.rotation + MathHelper.PiOver2).ToRotationVector2();
|
||||
Vector2 spawnPosition = Projectile.Center + Projectile.Size * 0.5f * Projectile.scale * shootDirection * 0.85f;
|
||||
Projectile.NewProjectile(spawnPosition, Projectile.velocity * 0.5f + shootDirection * 7f, bladeType, rocketDamage, Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), spawnPosition, Projectile.velocity * 0.5f + shootDirection * 7f, bladeType, rocketDamage, Projectile.knockBack, Projectile.owner);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < EnergyShotCount; i++)
|
||||
{
|
||||
Vector2 shootVelocity = (MathHelper.TwoPi * i / EnergyShotCount + baseDirectionRotation).ToRotationVector2() * 9f;
|
||||
Projectile.NewProjectile(Projectile.Center + shootVelocity, shootVelocity, shootType, energyDamage, Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center + shootVelocity, shootVelocity, shootType, energyDamage, Projectile.knockBack, Projectile.owner);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -190,8 +190,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType<RegulusEnergy>(), (int)(Projectile.damage * 0.4), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType<RegulusEnergy>(), (int)(Projectile.damage * 0.4), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType<RegulusEnergy>(), (int)(Projectile.damage * 0.4), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType<RegulusEnergy>(), (int)(Projectile.damage * 0.4), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer && Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, 0f, -10f, ModContent.ProjectileType<StealthNimbusCloud>(), Projectile.damage / 2, 0f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, -10f, ModContent.ProjectileType<StealthNimbusCloud>(), Projectile.damage / 2, 0f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int coralCount = 0; coralCount < coralAmt; coralCount++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
int coral = Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<SmallCoral>(), Projectile.damage / 3, 0f, Projectile.owner);
|
||||
int coral = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<SmallCoral>(), Projectile.damage / 3, 0f, Projectile.owner);
|
||||
if (coral.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[coral].Calamity().forceRogue = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if(Projectile.Calamity().stealthStrike && Projectile.ai[1] >= 5f)
|
||||
{
|
||||
Vector2 speed = new Vector2(Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f));
|
||||
Projectile.NewProjectile(Projectile.position, speed, ModContent.ProjectileType<DuststormCloud>(), (int)(Projectile.damage * 0.4), 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, speed, ModContent.ProjectileType<DuststormCloud>(), (int)(Projectile.damage * 0.4), 0f, Projectile.owner);
|
||||
Projectile.ai[1] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 perturbedSpeed = new Vector2(-Projectile.velocity.X / 3, -Projectile.velocity.Y / 3).RotatedBy(MathHelper.Lerp(-rotationalOffset, rotationalOffset, i / (totalBullets - 1)));
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center, perturbedSpeed, ModContent.ProjectileType<ScarletDevilBullet>(), (int)(Projectile.damage * 0.03), 0f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, perturbedSpeed, ModContent.ProjectileType<ScarletDevilBullet>(), (int)(Projectile.damage * 0.03), 0f, Projectile.owner, 0f, 0f);
|
||||
perturbedSpeed *= 1.05f;
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
Vector2 shootVelocity = (MathHelper.TwoPi * i / 40f).ToRotationVector2() * starSpeed;
|
||||
int bullet = Projectile.NewProjectile(Projectile.Center + shootVelocity, shootVelocity, ModContent.ProjectileType<ScarletDevilBullet>(), (int)(Projectile.damage * 0.01), 0f, Projectile.owner);
|
||||
int bullet = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center + shootVelocity, shootVelocity, ModContent.ProjectileType<ScarletDevilBullet>(), (int)(Projectile.damage * 0.01), 0f, Projectile.owner);
|
||||
if (Main.projectile.IndexInRange(bullet))
|
||||
Main.projectile[bullet].Calamity().stealthStrike = true;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int j = 0; j < pointsOnStarSegment; j++)
|
||||
{
|
||||
Vector2 shootVelocity = Vector2.Lerp(start, end, j / (float)pointsOnStarSegment) * starSpeed;
|
||||
int bullet = Projectile.NewProjectile(Projectile.Center + shootVelocity, shootVelocity, ModContent.ProjectileType<ScarletDevilBullet>(), (int)(Projectile.damage * 0.01), 0f, Projectile.owner);
|
||||
int bullet = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center + shootVelocity, shootVelocity, ModContent.ProjectileType<ScarletDevilBullet>(), (int)(Projectile.damage * 0.01), 0f, Projectile.owner);
|
||||
if (Main.projectile.IndexInRange(bullet))
|
||||
Main.projectile[bullet].Calamity().stealthStrike = true;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
CalamityGlobalProjectile.ExpandHitboxBy(Projectile, 150);
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ScarletBlast>(), (int)(Projectile.damage * 0.0075), 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ScarletBlast>(), (int)(Projectile.damage * 0.0075), 0f, Projectile.owner);
|
||||
if (!Projectile.Calamity().stealthStrike)
|
||||
return;
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
CalamityGlobalProjectile.ExpandHitboxBy(Projectile, 150);
|
||||
Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ScarletBlast>(), (int)(Projectile.damage * 0.0075), 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<ScarletBlast>(), (int)(Projectile.damage * 0.0075), 0f, Projectile.owner);
|
||||
if (!Projectile.Calamity().stealthStrike)
|
||||
return;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int cloudIndex = 0; cloudIndex < cloudNumber; cloudIndex++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 10f, 200f, 0.01f);
|
||||
Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType<ScourgeVenomCloud>(), (int)(Projectile.damage * 0.25), 1f, Projectile.owner, 0f, Projectile.Calamity().stealthStrike ? 1f : 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<ScourgeVenomCloud>(), (int)(Projectile.damage * 0.25), 1f, Projectile.owner, 0f, Projectile.Calamity().stealthStrike ? 1f : 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loaded 100 of 147 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user