Post-Plantera Calamity rogue
This commit is contained in:
1 parent
c24be91a9c
commit
6886466f49
32 files changed
+161
-358
No files matched your search
@@ -216,9 +216,6 @@ namespace CalamityMod.Balancing
|
||||
// 35% resist to Aerial Bane.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2BetsyArrow))));
|
||||
|
||||
// 35% resist to Ballistic Poison Bomb's clouds.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<BallisticPoisonCloud>()))));
|
||||
|
||||
// 35% resist to Icicle Arrows.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<IcicleArrowProj>()))));
|
||||
|
||||
@@ -228,6 +225,9 @@ namespace CalamityMod.Balancing
|
||||
// 30% resist to Flak Kraken.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
|
||||
|
||||
// 20% resist to Ballistic Poison Bomb's clouds.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BallisticPoisonCloud>()))));
|
||||
|
||||
// 20% resist to Cluster Rocket fragments.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.ClusterFragmentsI, ProjectileID.ClusterFragmentsII))));
|
||||
#endregion
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 66;
|
||||
Item.height = 64;
|
||||
Item.damage = 238;
|
||||
Item.damage = 185;
|
||||
Item.shootSpeed = 18f;
|
||||
Item.shoot = ModContent.ProjectileType<ApoctolithProj>();
|
||||
Item.useAnimation = Item.useTime = 26;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 30;
|
||||
Item.height = 38;
|
||||
Item.damage = 72;
|
||||
Item.damage = 57;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = Item.useTime = 26;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 42;
|
||||
Item.height = 44;
|
||||
Item.damage = 116;
|
||||
Item.damage = 85;
|
||||
Item.knockBack = 5f;
|
||||
Item.useAnimation = 13;
|
||||
Item.useTime = 13;
|
||||
@@ -37,22 +37,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ((player.ownedProjectileCounts[Item.shoot] + player.ownedProjectileCounts[ProjectileType<SphereBladed>()] + player.ownedProjectileCounts[ProjectileType<SphereYellow>()] + player.ownedProjectileCounts[ProjectileType<SphereBlue>()]) >= 5)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return player.Calamity().StealthStrikeAvailable() || (player.ownedProjectileCounts[Item.shoot] + player.ownedProjectileCounts[ProjectileType<SphereBladed>()] + player.ownedProjectileCounts[ProjectileType<SphereYellow>()] + player.ownedProjectileCounts[ProjectileType<SphereBlue>()]) <= 4;
|
||||
}
|
||||
|
||||
public override float StealthDamageMultiplier => 0.9f;
|
||||
|
||||
public override void ModifyStatsExtra(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback)
|
||||
{
|
||||
type = Utils.SelectRandom(Main.rand, new int[]
|
||||
@@ -72,13 +59,13 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
// This is done to allow looping when creating projectiles, instead of having to create many projectile/velocity variables all at once,
|
||||
// which this shoot code used to do.
|
||||
int[] projectilesToShoot = new int[]
|
||||
{
|
||||
int[] projectilesToShoot =
|
||||
[
|
||||
ProjectileType<SphereSpiked>(),
|
||||
ProjectileType<SphereBladed>(),
|
||||
ProjectileType<SphereYellow>(),
|
||||
ProjectileType<SphereBlue>()
|
||||
};
|
||||
];
|
||||
|
||||
foreach (int projectileType in projectilesToShoot)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 20;
|
||||
Item.height = 24;
|
||||
Item.damage = 74;
|
||||
Item.damage = 65;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 28;
|
||||
@@ -30,18 +30,16 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
|
||||
public static float StealthDmgMult = 0.6f; //So I can edit it directly via DragonLens instead of having to do math with CalTestHelpers
|
||||
public override float StealthDamageMultiplier => StealthDmgMult;
|
||||
public override float StealthDamageMultiplier => 0.6f;
|
||||
|
||||
public static int CloudLifetime = 200;
|
||||
public static float DustRadius = 11f;
|
||||
public static int StealthIframes = 9;
|
||||
|
||||
//Cloud hitbox size manipulation
|
||||
public static float MaxSize = 3.2f;
|
||||
public static float MaxSizeStealth = 3.6f;
|
||||
public static float GrowthRate = 0.025f;
|
||||
public static float StealthGrowhRate = 0.035f;
|
||||
public static float StealthGrowthRate = 0.035f;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
@@ -14,11 +14,10 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 30;
|
||||
Item.height = 30;
|
||||
Item.damage = 52;
|
||||
Item.damage = 45;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 25;
|
||||
Item.useTime = 25;
|
||||
Item.useTime = Item.useAnimation = 25;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.knockBack = 6f;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
@@ -29,28 +28,18 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.shootSpeed = 18f;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
public override float StealthDamageMultiplier => 0.7f;
|
||||
public override float StealthDamageMultiplier => 0.75f;
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (!player.Calamity().StealthStrikeAvailable())
|
||||
for (int i = -1; i <= 1; i++)
|
||||
{
|
||||
for (int i = -1; i <= 1; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = velocity.RotatedBy(MathHelper.ToRadians(i * 6f));
|
||||
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
Vector2 perturbedSpeed = velocity.RotatedBy(MathHelper.ToRadians(i * (player.Calamity().StealthStrikeAvailable() ? 5f : 6f)));
|
||||
int shootCard = player.Calamity().StealthStrikeAvailable() ? ModContent.ProjectileType<FantasyTalismanStealth>() : type;
|
||||
int card = Projectile.NewProjectile(source, position, perturbedSpeed, shootCard, damage, knockback, player.whoAmI);
|
||||
if (card.WithinBounds(Main.maxProjectiles) && player.Calamity().StealthStrikeAvailable())
|
||||
Main.projectile[card].Calamity().stealthStrike = true;
|
||||
}
|
||||
else if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
for (int i = -1; i <= 1; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = velocity.RotatedBy(MathHelper.ToRadians(i * 5f));
|
||||
int stealth = Projectile.NewProjectile(source, position, perturbedSpeed, ModContent.ProjectileType<FantasyTalismanStealth>(), damage, knockback, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -18,9 +18,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 32;
|
||||
Item.height = 46;
|
||||
Item.damage = 89;
|
||||
Item.damage = 81;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.useTime = Item.useAnimation = 17;
|
||||
Item.useTime = Item.useAnimation = 19;
|
||||
Item.knockBack = 12;
|
||||
|
||||
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
|
||||
@@ -37,9 +37,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 16;
|
||||
|
||||
public override float StealthDamageMultiplier => 0.9f;
|
||||
public override float StealthKnockbackMultiplier => 0.3333f;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
@@ -48,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].Calamity().stealthStrike = true;
|
||||
Main.projectile[proj].penetrate = 5;
|
||||
Main.projectile[proj].penetrate = 4;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 44;
|
||||
Item.height = 48;
|
||||
Item.damage = 165;
|
||||
Item.damage = 160;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = Item.useTime = 40;
|
||||
@@ -32,26 +32,10 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
{
|
||||
int proj = Projectile.NewProjectile(source, position, velocity.Length() * -Vector2.UnitY, type, damage, knockback, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int spread = 15;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Vector2 perturbedspeed = new Vector2(velocity.X + Main.rand.Next(-8, 8), velocity.Y + Main.rand.Next(-2, 3)).RotatedBy(MathHelper.ToRadians(spread));
|
||||
Projectile.NewProjectile(source, position, perturbedspeed.Length() * -Vector2.UnitY, type, (int)(damage * 0.3), knockback, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
}
|
||||
spread -= Main.rand.Next(5, 8);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
int proj = Projectile.NewProjectile(source, position, velocity.Length() * -Vector2.UnitY, type, damage, knockback, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 32;
|
||||
Item.height = 48;
|
||||
Item.damage = 64;
|
||||
Item.damage = 57;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.knockBack = 3f;
|
||||
Item.useAnimation = Item.useTime = 15;
|
||||
@@ -38,9 +38,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
|
||||
Item.rare = ItemRarityID.Lime;
|
||||
}
|
||||
public override float StealthDamageMultiplier => 1.25f;
|
||||
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable() || player.altFunctionUse != 2)
|
||||
@@ -56,35 +56,23 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
|
||||
public override float UseSpeedMultiplier(Player player)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable() || player.altFunctionUse != 2)
|
||||
return 1f;
|
||||
return 0.8f;
|
||||
}
|
||||
|
||||
public override float StealthDamageMultiplier => 1.25f;
|
||||
|
||||
public override void ModifyStatsExtra(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback)
|
||||
{
|
||||
if (!player.Calamity().StealthStrikeAvailable() && player.altFunctionUse == 2)
|
||||
damage = (int)(damage * 0.5f);
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable() || player.altFunctionUse != 2)
|
||||
{
|
||||
int bomb = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
|
||||
if (bomb.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[bomb].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
if (bomb.WithinBounds(Main.maxProjectiles) && player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
Main.projectile[bomb].Calamity().stealthStrike = true;
|
||||
Main.projectile[bomb].extraUpdates = 1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (float i = -2.5f; i < 3f; ++i)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = velocity.RotatedBy(MathHelper.ToRadians(i));
|
||||
Vector2 perturbedSpeed = velocity.RotatedBy(MathHelper.ToRadians((i - 0.5f) * 2));
|
||||
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 36;
|
||||
Item.height = 38;
|
||||
Item.damage = 44;
|
||||
Item.damage = 43;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = Item.useTime = 9;
|
||||
@@ -21,7 +21,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.knockBack = 1f;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.autoReuse = true;
|
||||
Item.maxStack = 1;
|
||||
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
|
||||
Item.rare = ItemRarityID.Lime;
|
||||
Item.shoot = ModContent.ProjectileType<LeviathanTooth>();
|
||||
@@ -31,25 +30,16 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
bool stealthStrike = false;
|
||||
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
stealthStrike = true;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
if (stealthStrike)
|
||||
{
|
||||
Projectile tooth = Projectile.NewProjectileDirect(source, position, velocity * 1.5f, type, damage, knockback * 12, player.whoAmI);
|
||||
tooth.Calamity().stealthStrike = true;
|
||||
tooth.timeLeft = 140;
|
||||
tooth.ai[1] = 4;
|
||||
return false; // This makes it not fire 2 with the for loop, thanks Angel lol
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile tooth = Projectile.NewProjectileDirect(source, position, velocity.RotatedByRandom(0.05f + i * 0.15f) * Main.rand.NextFloat(0.7f, 1f), type, damage, knockback, player.whoAmI);
|
||||
tooth.ai[1] = Main.rand.Next(1, 3 + 1);
|
||||
}
|
||||
Projectile tooth = Projectile.NewProjectileDirect(source, position, velocity * 1.5f, type, damage, knockback * 12, player.whoAmI, 0f, 4f);
|
||||
tooth.Calamity().stealthStrike = true;
|
||||
tooth.timeLeft = 140;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
Projectile.NewProjectile(source, position, velocity.RotatedByRandom(0.05f + i * 0.15f) * Main.rand.NextFloat(0.7f, 1f), type, damage, knockback, player.whoAmI, 0f, Main.rand.Next(1, 3+1));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -16,13 +16,12 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 108;
|
||||
Item.height = 114;
|
||||
Item.damage = 152;
|
||||
Item.damage = 140;
|
||||
Item.knockBack = 8f;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useTime = 30;
|
||||
Item.useAnimation = 30;
|
||||
Item.useTime = Item.useAnimation = 30;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 12f;
|
||||
Item.shoot = ModContent.ProjectileType<PhantasmalRuinProj>();
|
||||
|
||||
@@ -15,12 +15,11 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 32;
|
||||
Item.height = 34;
|
||||
Item.damage = 82;
|
||||
Item.damage = 69;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 9;
|
||||
Item.useTime = Item.useAnimation = 9;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTime = 9;
|
||||
Item.knockBack = 4f;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.autoReuse = true;
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 36;
|
||||
Item.height = 40;
|
||||
Item.damage = 120;
|
||||
Item.damage = 80;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useTime = Item.useAnimation = 42;
|
||||
Item.useTime = Item.useAnimation = 34;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.knockBack = 6.5f;
|
||||
Item.UseSound = SoundID.Item106 with { Volume = 0.7f };
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
|
||||
public override float StealthDamageMultiplier => 0.85f;
|
||||
public override float StealthDamageMultiplier => 0.9f;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
@@ -449,7 +449,6 @@ FrostcrushValari: {
|
||||
'''
|
||||
Fires a long ranged frosty boomerang that chips off homing icicles on hit
|
||||
Stealth strikes throw a boomerang which follows the cursor
|
||||
This boomerang creates a freezing blast and chips off homing icicles on every hit
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -23,73 +23,21 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 5;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 10;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.5f / 255f, (255 - Projectile.alpha) * 0.5f / 255f, (255 - Projectile.alpha) * 0.5f / 255f);
|
||||
Color dustColor = Projectile.ai[1] == 1f ? CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f) : default;
|
||||
bool xflag = false;
|
||||
bool yflag = false;
|
||||
if (Projectile.velocity.X < 0f && Projectile.position.X < Projectile.ai[0])
|
||||
{
|
||||
xflag = true;
|
||||
}
|
||||
if (Projectile.velocity.X > 0f && Projectile.position.X > Projectile.ai[0])
|
||||
{
|
||||
xflag = true;
|
||||
}
|
||||
if (Projectile.velocity.Y < 0f && Projectile.position.Y < Projectile.ai[1])
|
||||
{
|
||||
yflag = true;
|
||||
}
|
||||
if (Projectile.velocity.Y > 0f && Projectile.position.Y > Projectile.ai[1])
|
||||
{
|
||||
yflag = true;
|
||||
}
|
||||
if (xflag && yflag)
|
||||
{
|
||||
Projectile.Kill();
|
||||
}
|
||||
float projTimer = 25f;
|
||||
if (Projectile.ai[0] > 180f)
|
||||
{
|
||||
projTimer -= (Projectile.ai[0] - 180f) / 2f;
|
||||
}
|
||||
if (projTimer <= 0f)
|
||||
{
|
||||
projTimer = 0f;
|
||||
Projectile.Kill();
|
||||
}
|
||||
projTimer *= 0.7f;
|
||||
Projectile.ai[0] += 4f;
|
||||
int timerCounter = 0;
|
||||
while ((float)timerCounter < projTimer)
|
||||
{
|
||||
float rand1 = (float)Main.rand.Next(-30, 31);
|
||||
float rand2 = (float)Main.rand.Next(-30, 31);
|
||||
float rand3 = (float)Main.rand.Next(9, 27);
|
||||
float randAdjust = (float)Math.Sqrt((double)(rand1 * rand1 + rand2 * rand2));
|
||||
randAdjust = rand3 / randAdjust;
|
||||
rand1 *= randAdjust;
|
||||
rand2 *= randAdjust;
|
||||
int flashDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PortalBoltTrail, 0f, 0f, 100, dustColor, 2f);
|
||||
Dust dust = Main.dust[flashDust];
|
||||
dust.noGravity = true;
|
||||
dust.position.X = Projectile.Center.X;
|
||||
dust.position.Y = Projectile.Center.Y;
|
||||
dust.position.X += (float)Main.rand.Next(-10, 11);
|
||||
dust.position.Y += (float)Main.rand.Next(-10, 11);
|
||||
dust.velocity.X = rand1;
|
||||
dust.velocity.Y = rand2;
|
||||
timerCounter++;
|
||||
}
|
||||
}
|
||||
float randRot = Main.rand.NextFloat(MathHelper.TwoPi);
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.Confused, 300);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
Vector2 dustVel = Vector2.UnitX.RotatedBy(MathHelper.PiOver2 * i + randRot) * 3f;
|
||||
Dust flashDust = Dust.NewDustPerfect(Projectile.Center, DustID.PortalBoltTrail, dustVel, 100, dustColor, 1.5f);
|
||||
flashDust.noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,11 +12,11 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public class AuroradicalStar : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Rogue";
|
||||
public int[] dustTypes = new int[]
|
||||
{
|
||||
public int[] dustTypes =
|
||||
[
|
||||
ModContent.DustType<AstralBlue>(),
|
||||
ModContent.DustType<AstralOrange>()
|
||||
};
|
||||
];
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -107,27 +107,23 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, Projectile.alpha);
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 180);
|
||||
OnHitEffect(target.Center, target.width);
|
||||
OnHitEffect(target);
|
||||
}
|
||||
|
||||
private void OnHitEffect(Vector2 targetPos, int width)
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 180);
|
||||
OnHitEffect(target);
|
||||
}
|
||||
private void OnHitEffect(Entity target)
|
||||
{
|
||||
if (Projectile.Calamity().stealthStrike && Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
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 comet = Projectile.NewProjectile(Projectile.GetSource_FromThis(), pos, velocity, ModContent.ProjectileType<LeonidCometBig>(), (int)(Projectile.damage * 1.25), Projectile.knockBack, Projectile.owner);
|
||||
Vector2 pos = new Vector2(target.Center.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
|
||||
Vector2 meteorVel = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(pos, target, 20f, 3);
|
||||
int comet = Projectile.NewProjectile(Projectile.GetSource_FromThis(), pos, meteorVel, ModContent.ProjectileType<LeonidCometBig>(), (int)(Projectile.damage * 1.25f), Projectile.knockBack, Projectile.owner);
|
||||
if (comet.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[comet].DamageType = RogueDamageClass.Instance;
|
||||
@@ -136,12 +132,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 180);
|
||||
OnHitEffect(target.Center, target.width);
|
||||
}
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item9, Projectile.position);
|
||||
@@ -166,5 +156,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1);
|
||||
return false;
|
||||
}
|
||||
public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, Projectile.alpha);
|
||||
}
|
||||
}
|
||||
@@ -60,10 +60,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
Projectile.ExpandHitboxBy(128);
|
||||
SoundEngine.PlaySound(SoundID.Item14, Projectile.Center);
|
||||
int spikeAmt = Main.rand.Next(3, 4+1);
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
for (int s = 0; s < spikeAmt; s++)
|
||||
for (int s = 0; s < 3; s++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<BallisticPoisonBombSpike>(), Projectile.damage, 0f, Projectile.owner);
|
||||
@@ -72,7 +71,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int c = 0; c < cloudAmt; c++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 10f, 200f, 0.01f);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<BallisticPoisonCloud>(), (int)(Projectile.damage * 0.75), 0f, Projectile.owner, 0f, Projectile.Calamity().stealthStrike ? 1f : 0f);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<BallisticPoisonCloud>(), (int)(Projectile.damage * 0.6f), 0f, Projectile.owner, 0f, Projectile.Calamity().stealthStrike ? 1f : 0f);
|
||||
}
|
||||
}
|
||||
for (int d = 0; d < 5; d++)
|
||||
@@ -99,42 +98,13 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Vector2 goreSource = Projectile.Center;
|
||||
int goreAmt = 3;
|
||||
Vector2 source = new Vector2(goreSource.X - 24f, goreSource.Y - 24f);
|
||||
for (int goreIndex = 0; goreIndex < goreAmt; goreIndex++)
|
||||
for (int goreIndex = 1; goreIndex <= goreAmt; goreIndex++)
|
||||
{
|
||||
float velocityMult = 0.33f;
|
||||
if (goreIndex < (goreAmt / 3))
|
||||
{
|
||||
velocityMult = 0.66f;
|
||||
}
|
||||
if (goreIndex >= (2 * goreAmt / 3))
|
||||
{
|
||||
velocityMult = 1f;
|
||||
}
|
||||
Mod mod = ModContent.GetInstance<CalamityMod>();
|
||||
float velocityMult = 0.33f * goreIndex;
|
||||
int type = Main.rand.Next(61, 64);
|
||||
int smoke = Gore.NewGore(Projectile.GetSource_Death(), source, default, type, 1f);
|
||||
int smoke = Gore.NewGore(Projectile.GetSource_Death(), source, Main.rand.NextVector2CircularEdge(2f, 2f), type, 1f);
|
||||
Gore gore = Main.gore[smoke];
|
||||
gore.velocity *= velocityMult;
|
||||
gore.velocity.X += 1f;
|
||||
gore.velocity.Y += 1f;
|
||||
type = Main.rand.Next(61, 64);
|
||||
smoke = Gore.NewGore(Projectile.GetSource_Death(), source, default, type, 1f);
|
||||
gore = Main.gore[smoke];
|
||||
gore.velocity *= velocityMult;
|
||||
gore.velocity.X -= 1f;
|
||||
gore.velocity.Y += 1f;
|
||||
type = Main.rand.Next(61, 64);
|
||||
smoke = Gore.NewGore(Projectile.GetSource_Death(), source, default, type, 1f);
|
||||
gore = Main.gore[smoke];
|
||||
gore.velocity *= velocityMult;
|
||||
gore.velocity.X += 1f;
|
||||
gore.velocity.Y -= 1f;
|
||||
type = Main.rand.Next(61, 64);
|
||||
smoke = Gore.NewGore(Projectile.GetSource_Death(), source, default, type, 1f);
|
||||
gore = Main.gore[smoke];
|
||||
gore.velocity *= velocityMult;
|
||||
gore.velocity.X -= 1f;
|
||||
gore.velocity.Y -= 1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,7 +114,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
target.AddBuff(BuffID.Venom, 180);
|
||||
Projectile.Kill();
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(BuffID.Venom, 180);
|
||||
|
||||
@@ -4,7 +4,6 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
[PierceResistException(onlyForSingleHitbox: true)]
|
||||
public class DuststormCloud : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Rogue";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.NPCs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
@@ -9,6 +10,7 @@ using Terraria.Utilities;
|
||||
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
[PierceResistExceptionAttribute(true)]
|
||||
public class DuststormCloudHitbox : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Rogue";
|
||||
@@ -25,15 +27,15 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.timeLeft = DuststormInABottle.CloudLifetime;
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.usesIDStaticNPCImmunity = true;
|
||||
Projectile.idStaticNPCHitCooldown = 10;
|
||||
Projectile.idStaticNPCHitCooldown = 12;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (Projectile.scale < (Projectile.ai[1] == 1 ? DuststormInABottle.MaxSizeStealth : DuststormInABottle.MaxSize))
|
||||
{
|
||||
Projectile.scale += (Projectile.ai[1] == 1 ? DuststormInABottle.StealthGrowhRate : DuststormInABottle.GrowthRate);
|
||||
Projectile.ExpandHitboxBy(1 + (Projectile.ai[1] == 1 ? DuststormInABottle.StealthGrowhRate : DuststormInABottle.GrowthRate));
|
||||
Projectile.scale += Projectile.ai[1] == 1 ? DuststormInABottle.StealthGrowthRate : DuststormInABottle.GrowthRate;
|
||||
Projectile.ExpandHitboxBy(1 + (Projectile.ai[1] == 1 ? DuststormInABottle.StealthGrowthRate : DuststormInABottle.GrowthRate));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,11 +68,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, stealth ? velocity * 1.2f : velocity, ModContent.ProjectileType<DuststormCloud>(), 0, 0, Projectile.owner, stealth ? 1f : 0f, (float)Main.rand.Next(-45, 1));
|
||||
}
|
||||
int hitbox = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<DuststormCloudHitbox>(), Projectile.damage, Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
if (hitbox.WithinBounds(Main.maxProjectiles) && Projectile.Calamity().stealthStrike) //Inherit stealth flag and less iframes
|
||||
{
|
||||
if (hitbox.WithinBounds(Main.maxProjectiles) && Projectile.Calamity().stealthStrike) //Inherit stealth flag
|
||||
Main.projectile[hitbox].ai[1] = 1;
|
||||
Main.projectile[hitbox].idStaticNPCHitCooldown = DuststormInABottle.StealthIframes;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,16 +43,13 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.StickyProjAI(4);
|
||||
if (Projectile.ai[0] == 1f)
|
||||
{
|
||||
if (Projectile.timeLeft % 10 == 0)
|
||||
if (Projectile.timeLeft % 40 == 0)
|
||||
{
|
||||
if (Main.rand.NextBool(8))
|
||||
Projectile ghost = CalamityUtils.SpawnOrb(Projectile, (int)(Projectile.damage * 0.3f), ProjectileID.SpectreWrath, 1000f, 4f);
|
||||
if (ghost.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Projectile ghost = CalamityUtils.SpawnOrb(Projectile, (int)(Projectile.damage * 0.4f), ProjectileID.SpectreWrath, 1000f, 4f);
|
||||
if (ghost.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
ghost.DamageType = RogueDamageClass.Instance;
|
||||
ghost.penetrate = 1;
|
||||
}
|
||||
ghost.DamageType = RogueDamageClass.Instance;
|
||||
ghost.penetrate = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,7 +61,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(12);
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(9);
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
|
||||
@@ -45,16 +45,13 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.StickyProjAI(4);
|
||||
if (Projectile.ai[0] == 1f)
|
||||
{
|
||||
if (Projectile.timeLeft % 4 == 0)
|
||||
if (Projectile.timeLeft % 20 == 0)
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
Projectile ghost = CalamityUtils.SpawnOrb(Projectile, (int)(Projectile.damage * 0.3f), ProjectileID.SpectreWrath, 1000f, 4f);
|
||||
if (ghost.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Projectile ghost = CalamityUtils.SpawnOrb(Projectile, (int)(Projectile.damage * 0.2f), ProjectileID.SpectreWrath, 1000f, 4f);
|
||||
if (ghost.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
ghost.DamageType = RogueDamageClass.Instance;
|
||||
ghost.penetrate = 1;
|
||||
}
|
||||
ghost.DamageType = RogueDamageClass.Instance;
|
||||
ghost.penetrate = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,7 +63,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(9);
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(6);
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
@@ -74,7 +71,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
for (int j = 0; j <= 3; j++)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Main.rand.NextVector2Circular(12f, 12f), ModContent.ProjectileType<LostSoulFriendly>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Main.rand.NextVector2Circular(12f, 12f), ModContent.ProjectileType<LostSoulFriendly>(), Projectile.damage / 2, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,41 +20,31 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.height = 8;
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 300;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.timeLeft = 240;
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int constant = 14;
|
||||
int coolDust;
|
||||
Projectile.ai[0]++;
|
||||
if (Projectile.ai[0] % 2 == 0)
|
||||
{
|
||||
if (Projectile.ai[0] % 4 == 0)
|
||||
{
|
||||
coolDust = Dust.NewDust(Projectile.position, Projectile.width - constant * 2, Projectile.height - constant * 2, ModContent.DustType<AstralBlue>(), 0f, 0f, 100, default, 1.5f);
|
||||
}
|
||||
else
|
||||
{
|
||||
coolDust = Dust.NewDust(Projectile.position, Projectile.width - constant * 2, Projectile.height - constant * 2, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1.5f);
|
||||
}
|
||||
int dustType = Projectile.ai[0] % 4 == 0 ? ModContent.DustType<AstralBlue>() : ModContent.DustType<AstralOrange>();
|
||||
coolDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Alpha: 100, Scale: 1.5f);
|
||||
Main.dust[coolDust].noGravity = true;
|
||||
Main.dust[coolDust].velocity *= 0.1f;
|
||||
Main.dust[coolDust].velocity += Projectile.velocity * 0.5f;
|
||||
}
|
||||
|
||||
float homingRange = raining ? 480f : 240f;
|
||||
|
||||
if (Projectile.ai[0] >= 15f || raining)
|
||||
CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, homingRange, 12f, 20f);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 180);
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 180);
|
||||
|
||||
public override bool? CanDamage() => Projectile.ai[0] >= 15f || raining;
|
||||
}
|
||||
}
|
||||
@@ -36,8 +36,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (Projectile.Calamity().stealthStrike && Projectile.timeLeft % 20f == 4f) // every 5 frames
|
||||
CalamityUtils.ProjectileRain(Projectile.GetSource_FromThis(), Projectile.Center, 400f, 100f, 500f, 800f, 29f, ModContent.ProjectileType<HeavenfallenEnergy>(), Projectile.damage / 6, Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
if (Projectile.Calamity().stealthStrike && Projectile.timeLeft % 20f == 4f)
|
||||
CalamityUtils.ProjectileRain(Projectile.GetSource_FromThis(), Projectile.Center, 400f, 100f, 500f, 800f, 29f, ModContent.ProjectileType<HeavenfallenEnergy>(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner);
|
||||
|
||||
if (Projectile.alpha > 0)
|
||||
{
|
||||
@@ -136,7 +136,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 240);
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 240);
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
|
||||
@@ -28,19 +28,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.alpha = 255;
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
|
||||
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), Projectile.rotation, tex.Size() / 2, Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Rogue/LeonidProgenitorGlow").Value;
|
||||
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, tex.Size() / 2, Projectile.scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Projectile.alpha -= 25;
|
||||
@@ -55,15 +42,10 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
});
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int index = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.6f);
|
||||
int index = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.3f);
|
||||
Main.dust[index].noGravity = true;
|
||||
}
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int index = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.6f);
|
||||
Main.dust[index].noGravity = true;
|
||||
}
|
||||
int index1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.2f);
|
||||
int index1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f));
|
||||
Main.dust[index1].noGravity = true;
|
||||
Main.dust[index1].velocity *= 2f;
|
||||
Main.dust[index1].velocity += Projectile.velocity;
|
||||
@@ -84,11 +66,14 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.rotation += Projectile.velocity.X * 0.1f;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120);
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120);
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
if (Projectile.owner != Main.myPlayer)
|
||||
return;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<LeonidStar>(), Projectile.damage / 3, 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<LeonidStar>(), Projectile.damage / 2, 0f, Projectile.owner);
|
||||
Projectile.ai[1] = -1f;
|
||||
Projectile.position = Projectile.Center;
|
||||
Projectile.width = Projectile.height = 40;
|
||||
@@ -124,8 +109,16 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120);
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120);
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
|
||||
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), Projectile.rotation, tex.Size() / 2, Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Rogue/LeonidProgenitorGlow").Value;
|
||||
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, tex.Size() / 2, Projectile.scale, SpriteEffects.None, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.netUpdate = true;
|
||||
}
|
||||
}
|
||||
Projectile.velocity.Y += 0.2f;
|
||||
Projectile.velocity.Y += 0.2f / (float)Projectile.MaxUpdates;
|
||||
}
|
||||
Projectile.rotation += Projectile.velocity.X * 0.1f;
|
||||
}
|
||||
@@ -76,45 +76,35 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
int flash = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<Flash>(), Projectile.damage, 0f, Projectile.owner, 0f, 1f);
|
||||
if (flash.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[flash].DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
|
||||
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(Projectile.GetSource_FromThis(), pos, velocity, ModContent.ProjectileType<LeonidCometBig>(), dmg, Projectile.knockBack, Projectile.owner, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 240);
|
||||
StealthStrikeEffect();
|
||||
SpawnExtraProjectiles(target);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 240);
|
||||
StealthStrikeEffect();
|
||||
SpawnExtraProjectiles(target);
|
||||
}
|
||||
|
||||
private void StealthStrikeEffect()
|
||||
private void SpawnExtraProjectiles(Entity target)
|
||||
{
|
||||
if (!Projectile.Calamity().stealthStrike || Main.myPlayer != Projectile.owner)
|
||||
return;
|
||||
|
||||
Vector2 spinningpoint = new Vector2(0f, 6f);
|
||||
float radian45 = MathHelper.ToRadians(45f);
|
||||
int cometAmt = 5;
|
||||
float cometSpread = -(radian45 * 2f) / (cometAmt - 1f);
|
||||
for (int projIndex = 0; projIndex < cometAmt; ++projIndex)
|
||||
Vector2 pos = new Vector2(target.Center.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
|
||||
Vector2 meteorVel = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(pos, target, 20f, 3);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), pos, meteorVel, ModContent.ProjectileType<LeonidCometBig>(), Projectile.damage / 2, Projectile.knockBack, Projectile.owner, 0f, 0.5f + Main.rand.NextFloat() * 0.3f);
|
||||
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
int index2 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, spinningpoint.RotatedBy((double)radian45 + (double)cometSpread * (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)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
proj.localNPCImmunity[index3] = Projectile.localNPCImmunity[index3];
|
||||
Vector2 cometPos = new Vector2(target.Center.X + Main.rand.Next(-100, 101), target.Center.Y - 150f - Main.rand.Next(30));
|
||||
Vector2 cometVel = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(pos, target, 18f, 2);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), cometPos, cometVel, ModContent.ProjectileType<LeonidCometSmall>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, -1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,14 +151,16 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (time % 3 == 0)
|
||||
{
|
||||
Projectile tooth = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), spawnPos, jawVel, ModContent.ProjectileType<LeviathanTooth>(), Projectile.damage, Projectile.knockBack / 12, Projectile.owner, 0, 0, Projectile.velocity.X > 0 ? 1 : -1);
|
||||
tooth.Calamity().stealthStrike = true;
|
||||
tooth.timeLeft = 120;
|
||||
tooth.extraUpdates = 0;
|
||||
tooth.usesIDStaticNPCImmunity = true;
|
||||
tooth.usesLocalNPCImmunity = false;
|
||||
tooth.idStaticNPCHitCooldown = 5;
|
||||
tooth.ai[1] = Main.rand.Next(1, 3 + 1);
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
Projectile tooth = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), spawnPos, jawVel, ModContent.ProjectileType<LeviathanTooth>(), Projectile.damage, Projectile.knockBack / 12, Projectile.owner, 0, Main.rand.Next(1, 3 + 1), Projectile.velocity.X > 0 ? 1 : -1);
|
||||
tooth.Calamity().stealthStrike = true;
|
||||
tooth.timeLeft = 120;
|
||||
tooth.extraUpdates = 0;
|
||||
tooth.usesLocalNPCImmunity = false;
|
||||
tooth.usesIDStaticNPCImmunity = true;
|
||||
tooth.idStaticNPCHitCooldown = 8;
|
||||
}
|
||||
jawline = !jawline;
|
||||
}
|
||||
if (time % 2 == 0)
|
||||
@@ -229,9 +231,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
modifiers.SourceDamage *= Projectile.ai[1] == 4 ? 0.6f : 0.5f;
|
||||
else
|
||||
if (!Projectile.Calamity().stealthStrike)
|
||||
modifiers.SourceDamage *= target == chosenTarget ? 1 : (canStick ? 0.2f : 0.5f);
|
||||
}
|
||||
public override bool? CanDamage() => canDamage ? null : false;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Lighting.AddLight(Projectile.Center, 0f, 0.25f, 0f);
|
||||
|
||||
if (Main.rand.NextBool(5))
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.JungleSpore, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f);
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.ChlorophyteWeapon, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f);
|
||||
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
@@ -39,8 +39,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Projectile.timeLeft < 240)
|
||||
Projectile.Kill();
|
||||
|
||||
Projectile.localAI[0] += Main.rand.Next(0, 3);
|
||||
if (Projectile.localAI[0] >= 10f)
|
||||
Projectile.localAI[0] += Main.rand.Next(1, 3);
|
||||
if (Projectile.localAI[0] >= 20f)
|
||||
{
|
||||
Projectile.localAI[0] = 0f;
|
||||
Vector2 flowerSpawnPosition = Projectile.Center + Main.rand.NextVector2Square(-10f, 10f);
|
||||
@@ -58,7 +58,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Venom, 120);
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.Venom, 120);
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
width = 20;
|
||||
height = 20;
|
||||
|
||||
return base.TileCollideStyle(ref width, ref height, ref fallThrough, ref hitboxCenterFrac);
|
||||
}
|
||||
|
||||
@@ -219,8 +218,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
else
|
||||
{
|
||||
//Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Rogue/SamsaraSlicerGlow").Value, Projectile.Center - Main.screenPosition + randVec, tex.Frame(), new Color(0f, 1f, 0f, 0f), Projectile.rotation, tex.Frame().Center(), 1f, SpriteEffects.None);
|
||||
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Rogue/SamsaraSlicerGlow").Value, Projectile.Center - Main.screenPosition + randVec, tex.Frame(), new Color(0f, 1f, 0f, 0f), Projectile.rotation, tex.Frame().Center(), 1f, SpriteEffects.None);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -145,7 +145,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.velocity.Y -= acceleration;
|
||||
}
|
||||
|
||||
|
||||
// Delete the projectile if it touches its owner.
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
if (Projectile.Hitbox.Intersects(owner.Hitbox))
|
||||
|
||||
@@ -164,7 +164,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.Hitbox.Intersects(Owner.Hitbox))
|
||||
{
|
||||
Projectile.Kill();
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
@@ -175,8 +174,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
p.timeLeft = 30;
|
||||
}
|
||||
}
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<WhitewaterAura>(), (int)(Projectile.damage * 0.3f), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<WhitewaterAura>(), (int)(Projectile.damage * 0.25f), Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
Projectile.Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.extraUpdates = 5;
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 15 * Projectile.MaxUpdates;
|
||||
Projectile.localNPCHitCooldown = 20 * Projectile.MaxUpdates;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
Reference in new issue
Block a user