This commit is contained in:
Ozzatron committed 2019-10-18 20:41:48 -04:00
commit adaa74fbce
26 files changed
+153 -64

No files matched your search

+6 -17
View File
@@ -1702,10 +1702,10 @@ namespace CalamityMod.CalPlayer
#region HotKeys
public override void ProcessTriggers(TriggersSet triggersSet)
{
if (CalamityMod.MomentumCapacitatorHotkey.JustPressed && momentumCapacitor && Main.myPlayer == player.whoAmI && player.Calamity().rogueStealth >= player.Calamity().rogueStealthMax * 0.25f &&
if (CalamityMod.MomentumCapacitatorHotkey.JustPressed && momentumCapacitor && Main.myPlayer == player.whoAmI && player.Calamity().rogueStealth >= player.Calamity().rogueStealthMax * 0.3f &&
CalamityUtils.CountProjectiles(ModContent.ProjectileType<MomentumCapacitorOrb>()) == 0)
{
player.Calamity().rogueStealth -= player.Calamity().rogueStealthMax * 0.25f;
player.Calamity().rogueStealth -= player.Calamity().rogueStealthMax * 0.3f;
Vector2 fieldSpawnCenter = new Vector2(Main.mouseX, Main.mouseY) + Main.screenPosition;
Projectile.NewProjectile(fieldSpawnCenter, Vector2.Zero, ModContent.ProjectileType<MomentumCapacitorOrb>(), 0, 0f, player.whoAmI, 0f, 0f);
}
@@ -4548,16 +4548,6 @@ namespace CalamityMod.CalPlayer
player.Calamity().throwingVelocity += 0.1f;
}
}
if (gloveOfPrecision)
{
player.Calamity().throwingCrit += 12;
player.Calamity().throwingVelocity *= 1.2f;
}
if (gloveOfRecklessness)
{
player.Calamity().throwingVelocity *= 1.2f;
player.Calamity().throwingDamage *= 0.9f;
}
if (tarraSummon)
{
int lifeCounter = 0;
@@ -4802,7 +4792,7 @@ namespace CalamityMod.CalPlayer
Rectangle rect = nPC.getRect();
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
{
if (Main.rand.Next(0, 10) == 0)
if (Main.rand.Next(0, 10) == 0 && player.immuneTime <= 0)
{
AbyssMirrorEvade();
EclipseMirrorEvade();
@@ -4896,8 +4886,8 @@ namespace CalamityMod.CalPlayer
}
if (ursaSergeant)
{
runAccMult *= 0.8f;
runSpeedMult *= 0.8f;
runAccMult *= 0.65f;
runSpeedMult *= 0.65f;
}
if (elysianGuard)
{
@@ -9686,8 +9676,7 @@ namespace CalamityMod.CalPlayer
// Stealth gen acceleration
float stealthScaleCap = eclipseMirror ? 40f : 25f;
if (standstill && (eclipseMirror || darkGodSheath))
if (standstill && (eclipseMirror || darkGodSheath) && player.itemAnimation == 0)
{
if (eclipseMirror)
stealthGenAcceleration = stealthGenAcceleration < stealthScaleCap ? stealthGenAcceleration * 1.2f : stealthScaleCap;
File renamed without changes.

Before

Width:  |  Height:  |  Size: 556 B

After

Width:  |  Height:  |  Size: 556 B

+2 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Items.Accessories
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Glove Of Recklessness");
Tooltip.SetDefault("Increases rogue speed by 20% but decreases damage by 10%\n" +
Tooltip.SetDefault("Increases rogue attack speed by 20% but decreases damage by 10%\n" +
"Adds inaccuracy to rogue weapons");
}
@@ -26,6 +26,7 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.gloveOfRecklessness = true;
modPlayer.throwingDamage *= 0.9f;
}
}
}
+4 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Items.Accessories
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Glove Of Precision");
Tooltip.SetDefault("Decreases rogue speed by 20% but increases damage and crit by 12% and velocity by 25%");
Tooltip.SetDefault("Decreases rogue attack speed by 20% but increases damage and crit by 12% and velocity by 25%");
}
public override void SetDefaults()
@@ -25,6 +25,9 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.gloveOfPrecision = true;
modPlayer.throwingDamage *= 1.12f;
modPlayer.throwingCrit += 12;
modPlayer.throwingVelocity *= 1.2f;
}
}
}
+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Items.Accessories
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Momentum Capacitor");
Tooltip.SetDefault("Pressing U, for the cost of 25% of max stealth, causes an energy field to appear at the cursor position\n" +
Tooltip.SetDefault("Pressing U, for the cost of 30% of max stealth, causes an energy field to appear at the cursor position\n" +
"Rogue projectiles that enter the field get a constant acceleration and 15% damage boost\n" +
"These boosts can only happen to a projectile once\n" +
"There can only be one field");
+1 -1
View File
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories
{
DisplayName.SetDefault("Old Die");
Tooltip.SetDefault("Increases randomness of attack damage \n" +
"'Lucky for you, the curse doesn't affect you.Mostly.'");
"'Lucky for you, the curse doesn't affect you. Mostly.'");
}
public override void SetDefaults()
+1
View File
@@ -2,6 +2,7 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Ranged;
namespace CalamityMod.Items.Fishing
{
+2 -1
View File
@@ -1,6 +1,7 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Buffs.DamageOverTime;
namespace CalamityMod.Items.Fishing
{
public class UrsaSergeant : ModItem
@@ -8,7 +9,7 @@ namespace CalamityMod.Items.Fishing
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ursa Sergeant");
Tooltip.SetDefault("+20 defense but 20% reduced movement speed\n" +
Tooltip.SetDefault("+20 defense but 35% reduced movement speed\n" +
"Immune to Astral Infection and Feral Bite\n" +
"Increased regeneration at lower health");
}
+1
View File
@@ -2,6 +2,7 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using CalamityMod.Projectiles.Melee;
namespace CalamityMod.Items.Weapons.Melee
{
+2 -1
View File
@@ -2,12 +2,13 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using CalamityMod.Projectiles.Rogue;
namespace CalamityMod.Items.Weapons.Rogue
{
public class BlastBarrel : RogueWeapon
{
public const int BaseDamage = 60;
public const int BaseDamage = 45;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Blast Barrel");
+6 -5
View File
@@ -33,13 +33,14 @@ namespace CalamityMod.Items.Weapons.Rogue
{
crit = item.crit + player.Calamity().throwingCrit;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
public override float UseTimeMultiplier(Player player)
{
float rogueAS = 1f;
if (player.Calamity().gloveOfPrecision)
{
item.useTime = (int)(item.useTime * 0.8f);
item.useAnimation = (int)(item.useAnimation * 0.8f);
}
rogueAS -= 0.2f;
if (player.Calamity().gloveOfRecklessness)
rogueAS += 0.2f;
return rogueAS;
}
// Not needed because the weapon is now internally thrown instead of ranged
/*
+4 -2
View File
@@ -2,6 +2,8 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
namespace CalamityMod.Items.Weapons.Rogue
{
@@ -18,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Rogue
public override void SafeSetDefaults()
{
item.width = 40;
item.damage = 30;
item.damage = 23;
item.noMelee = true;
item.noUseGraphic = true;
item.useAnimation = 15;
@@ -32,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue
item.value = 1000;
item.rare = 3;
item.value = Item.buyPrice(0, 4, 0, 0);
item.shoot = ModContent.ProjectileType<Projectiles.EnchantedAxe>();
item.shoot = ModContent.ProjectileType<Projectiles.Rogue.EnchantedAxe>();
item.shootSpeed = 30f;
item.Calamity().rogue = true;
}
+4 -4
View File
@@ -2,12 +2,12 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using CalamityMod.Projectiles.Rogue;
namespace CalamityMod.Items.Weapons.Rogue
{
public class GacruxianMollusk : RogueWeapon
{
public static int BaseDamage = 39;
public static int BaseDamage = 38;
public static float Knockback = 5f;
public static float Speed = 15f;
@@ -24,8 +24,8 @@ namespace CalamityMod.Items.Weapons.Rogue
item.rare = 4;
item.knockBack = Knockback;
item.autoReuse = true;
item.useTime = 15;
item.useAnimation = 15;
item.useTime = 22;
item.useAnimation = 22;
item.useStyle = 1;
item.width = 24;
item.height = 22;
+1 -13
View File
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using CalamityMod.Projectiles.Rogue;
namespace CalamityMod.Items.Weapons.Rogue
{
@@ -54,18 +55,5 @@ namespace CalamityMod.Items.Weapons.Rogue
}
return true;
}
public override bool CanUseItem(Player player)
{
//If you have more than one boomerang, you cant shoot another
int MAX = 1;
int launched = 0;
foreach (Projectile projectile in Main.projectile)
if (projectile.type == item.shoot && projectile.owner == item.owner && projectile.active)
{
launched++;
}
return (launched >= MAX) ? false : true;
}
}
}
+4 -3
View File
@@ -2,6 +2,7 @@
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using CalamityMod.Projectiles.Rogue;
namespace CalamityMod.Items.Weapons.Rogue
{
@@ -15,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Rogue
public override void SafeSetDefaults()
{
item.damage = 50;
item.damage = 130;
item.knockBack = 4;
item.crit = 18;
item.noMelee = true;
@@ -26,8 +27,8 @@ namespace CalamityMod.Items.Weapons.Rogue
item.height = 27;
item.useStyle = 1;
item.UseSound = SoundID.Item1;
item.useTime = 30;
item.useAnimation = 30;
item.useTime = 20;
item.useAnimation = 20;
item.value = Item.buyPrice(0, 0, 1, 0);
item.rare = 3;
item.shootSpeed = 10.5f;
+3 -2
View File
@@ -2,6 +2,7 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using CalamityMod.Projectiles.Rogue;
namespace CalamityMod.Items.Weapons.Rogue
{
@@ -19,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Rogue
{
item.width = 44;
item.height = 66;
item.damage = 500;
item.damage = 575;
item.Calamity().rogue = true;
item.knockBack = 8f;
item.noMelee = true;
@@ -41,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Rogue
{
if (player.Calamity().StealthStrikeAvailable())
{
int p = Projectile.NewProjectile(position.X, position.Y, (int)((double)speedX * 1.2), (int)((double)speedY * 1.2), ModContent.ProjectileType<ButcherKnife>(), (int)((double)damage * 3), knockBack, Main.myPlayer);
int p = Projectile.NewProjectile(position.X, position.Y, (int)((double)speedX * 1.2), (int)((double)speedY * 1.2), ModContent.ProjectileType<ButcherKnife>(), (int)(damage * 1.8), knockBack, Main.myPlayer);
Main.projectile[p].Calamity().stealthStrike = true;
if (Main.rand.NextBool(3))
{
+2 -1
View File
@@ -2,6 +2,7 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using CalamityMod.Projectiles.Summon;
namespace CalamityMod.Items.Weapons.Summon
{
@@ -15,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon
public override void SetDefaults()
{
item.damage = 30;
item.damage = 36;
item.mana = 10;
item.width = 46;
item.height = 28;
+14 -4
View File
@@ -5,6 +5,16 @@ using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Healing;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Buffs.DamageOverTime;
namespace CalamityMod.Projectiles
{
@@ -553,8 +563,8 @@ namespace CalamityMod.Projectiles
{
if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].ownedProjectileCounts[ProjectileID.Mushroom] < 30)
{
if (projectile.type == ModContent.ProjectileType<Nebulash>() || projectile.type == ModContent.ProjectileType<CosmicDischarge>() ||
projectile.type == ModContent.ProjectileType<Mourningstar>() || projectile.type == ProjectileID.SolarWhipSword)
if (projectile.type == ModContent.ProjectileType<Melee.Nebulash>() || projectile.type == ModContent.ProjectileType<Melee.CosmicDischarge>() ||
projectile.type == ModContent.ProjectileType<Melee.Mourningstar>() || projectile.type == ProjectileID.SolarWhipSword)
{
Vector2 vector24 = Main.OffsetsPlayerOnhand[Main.player[projectile.owner].bodyFrame.Y / 56] * 2f;
if (Main.player[projectile.owner].direction != 1)
@@ -629,7 +639,7 @@ namespace CalamityMod.Projectiles
//will always be friendly and rogue if it has this boost
if (Main.player[projectile.owner].Calamity().momentumCapacitor && projectile.Calamity().momentumCapacitatorBoost)
{
if (projectile.type != ModContent.ProjectileType<Malachite>() && projectile.type != ModContent.ProjectileType<DuneHopperProjectile>() &&
if (projectile.type != ModContent.ProjectileType<Rogue.Malachite>() && projectile.type != ModContent.ProjectileType<DuneHopperProjectile>() &&
projectile.velocity.Length() < 3f)
projectile.velocity *= 1.025f;
}
@@ -655,7 +665,7 @@ namespace CalamityMod.Projectiles
//Summon moon sigils infrequently
if (Main.rand.NextBool(300) && projectile.type != ModContent.ProjectileType<MoonSigil>())
{
Projectile.NewProjectile(projectile.position, Vector2.Zero, ModContent.ProjectileType<MoonSigil>(), (int)(projectile.damage * 0.05), 0, projectile.owner);
Projectile.NewProjectile(projectile.position, Vector2.Zero, ModContent.ProjectileType<MoonSigil>(), (int)(projectile.damage * 0.2), 0, projectile.owner);
}
}
}
+9 -1
View File
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Buffs.StatBuffs;
namespace CalamityMod.Projectiles.Ranged
{
public class PolarStar : ModProjectile
@@ -204,9 +205,16 @@ namespace CalamityMod.Projectiles.Ranged
}
}
public override bool OnTileCollide(Vector2 oldVelocity)
{
Collision.HitTiles(projectile.position + projectile.velocity, projectile.velocity, projectile.width, projectile.height);
Main.PlaySound(0, projectile.position);
return true;
}
public override void Kill(int timeLeft)
{
Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 62);
Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 62,0.5f);
if (projectile.ai[1] == 1f) //Boost two
{
int projectiles = Main.rand.Next(2, 5);
@@ -4,6 +4,7 @@ using System;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using CalamityMod.Items.Weapons.Rogue;
namespace CalamityMod.Projectiles.Rogue
{
@@ -84,6 +85,9 @@ namespace CalamityMod.Projectiles.Rogue
BlastBarrel.BaseDamage, 1f, projectile.owner);
Main.projectile[fireIndex].thrown = false;
Main.projectile[fireIndex].Calamity().rogue = true;
Main.projectile[fireIndex].penetrate = -1;
Main.projectile[fireIndex].usesLocalNPCImmunity = true;
Main.projectile[fireIndex].localNPCHitCooldown = -1;
}
}
projectile.ai[1]--;
+2 -1
View File
@@ -1,6 +1,7 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Dusts;
using CalamityMod.Projectiles.Melee;
namespace CalamityMod.Projectiles.Rogue
{
@@ -36,7 +37,7 @@ namespace CalamityMod.Projectiles.Rogue
{
if (projectile.Calamity().stealthStrike == true)
{
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType<GacruxianHome>(), (int)((double)projectile.damage * 0.75), projectile.knockBack, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType<GacruxianHome>(), (int)((double)projectile.damage * 0.3), projectile.knockBack, projectile.owner, 0f, 0f);
}
else
{
+3 -2
View File
@@ -3,6 +3,7 @@ using System;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using CalamityMod.Items.Weapons.Rogue;
namespace CalamityMod.Projectiles.Rogue
{
@@ -52,9 +53,9 @@ namespace CalamityMod.Projectiles.Rogue
projectile.tileCollide = true;
//Decide the range of the boomerang depending on stealth
if (projectile.Calamity().stealthStrike)
ReboundTime = 25f;
ReboundTime = 27f;
else
ReboundTime = 50f;
ReboundTime = 55f;
// ai[0] stores whether the boomerang is returning. If 0, it isn't. If 1, it is.
if (projectile.ai[0] == 0f)
+3
View File
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items.Weapons.Rogue;
namespace CalamityMod.Projectiles.Rogue
{
@@ -24,6 +25,8 @@ namespace CalamityMod.Projectiles.Rogue
drawOffsetX = -10;
drawOriginOffsetY = 0;
drawOriginOffsetX = 0;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 40;
projectile.extraUpdates = 1;
projectile.Calamity().rogue = true;
}
+67 -3
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ModLoader;
using System;
namespace CalamityMod.Projectiles.Rogue
{
public class MoonSigil : ModProjectile
@@ -22,14 +23,77 @@ namespace CalamityMod.Projectiles.Rogue
projectile.ignoreWater = true;
projectile.timeLeft = 250;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 2;
projectile.localNPCHitCooldown = 10;
projectile.Calamity().rogue = true;
}
public override void AI()
{
if (projectile.timeLeft < 25)
{ projectile.alpha += 10; }
if (projectile.timeLeft < 52)
{
projectile.alpha += 5;
projectile.scale -= 0.013f;
}
if (projectile.alpha >= 255)
{
projectile.alpha = 255;
projectile.Kill();
return;
}
float num472 = projectile.Center.X;
float num473 = projectile.Center.Y;
float num474 = 600f;
bool flag17 = false;
for (int num475 = 0; num475 < 200; num475++)
{
if (Main.npc[num475].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[num475].Center, 1, 1))
{
float num476 = Main.npc[num475].position.X + (float)(Main.npc[num475].width / 2);
float num477 = Main.npc[num475].position.Y + (float)(Main.npc[num475].height / 2);
float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num476) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num477);
if (num478 < num474)
{
num474 = num478;
num472 = num476;
num473 = num477;
flag17 = true;
}
}
}
if (flag17)
{
float num483 = 8f;
Vector2 vector35 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f);
float num484 = num472 - vector35.X;
float num485 = num473 - vector35.Y;
float num486 = (float)Math.Sqrt((double)(num484 * num484 + num485 * num485));
num486 = num483 / num486;
num484 *= num486;
num485 *= num486;
projectile.velocity.X = (projectile.velocity.X * 20f + num484) / 21f;
projectile.velocity.Y = (projectile.velocity.Y * 20f + num485) / 21f;
}
}
public override void Kill(int timeLeft)
{
float dustSp = 0.2f;
int dustD = 0;
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 5; j++)
{
Vector2 dustspeed = new Vector2(dustSp, dustSp).RotatedBy(MathHelper.ToRadians(dustD));
int d = Dust.NewDust(projectile.Center, projectile.width, projectile.height, 31, dustspeed.X, dustspeed.Y, 200, new Color(213, 242, 232, 200), 1f);
Main.dust[d].noGravity = true;
Main.dust[d].position = projectile.Center;
Main.dust[d].velocity = dustspeed;
dustSp += 0.2f;
}
dustD += 90;
dustSp = 0.2f;
}
}
public override void PostDraw(SpriteBatch spriteBatch, Color lightColor)
+1
View File
@@ -4,6 +4,7 @@ using System;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using CalamityMod.Buffs.Summon;
namespace CalamityMod.Projectiles.Summon
{
public class BlackHawkSummon : ModProjectile
@@ -1,6 +1,8 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Rogue;
namespace CalamityMod.Projectiles.Typeless
{
public class MomentumCapacitorOrb : ModProjectile
@@ -24,6 +26,10 @@ namespace CalamityMod.Projectiles.Typeless
}
public override void AI()
{
Player player = Main.player[Main.myPlayer];
CalamityPlayer modPlayer = player.Calamity();
if (!modPlayer.momentumCapacitor)
projectile.Kill();
if (Main.rand.NextBool(4))
{
float numDust = MathHelper.TwoPi * Radius / 5f;