make it stop, my fingers are cold
This commit is contained in:
1 parent
48b06309cb
commit
ee236cbefd
72 files changed
+195
-406
No files matched your search
@@ -26,7 +26,7 @@ namespace CalamityMod.Balancing
|
||||
classType = ClassType.Magic;
|
||||
if (proj.minion)
|
||||
classType = ClassType.Summon;
|
||||
if (proj.Calamity().rogue)
|
||||
if (proj.CountsAsClass<RogueDamageClass>())
|
||||
classType = ClassType.Rogue;
|
||||
}
|
||||
|
||||
|
||||
@@ -4697,7 +4697,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (CalamityWorld.revenge)
|
||||
CalamityUtils.ApplyRippersToDamage(this, isTrueMelee, ref damageMult);
|
||||
|
||||
if (filthyGlove && proj.Calamity().stealthStrike && proj.Calamity().rogue)
|
||||
if (filthyGlove && proj.Calamity().stealthStrike && proj.CountsAsClass<RogueDamageClass>())
|
||||
{
|
||||
if (nanotech)
|
||||
damageMult += 0.05;
|
||||
@@ -4745,7 +4745,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
int penetrateAmt = 0;
|
||||
if (proj.Calamity().stealthStrike && proj.Calamity().rogue)
|
||||
if (proj.Calamity().stealthStrike && proj.CountsAsClass<RogueDamageClass>())
|
||||
{
|
||||
// Nanotech is a total of 20 as it has all three bools
|
||||
if (nanotech)
|
||||
@@ -4904,7 +4904,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
SyncLevel(false, (int)ClassType.Summon);
|
||||
}
|
||||
else if (proj.Calamity().rogue && rogueLevel <= 12500)
|
||||
else if (proj.CountsAsClass<RogueDamageClass>() && rogueLevel <= 12500)
|
||||
{
|
||||
if (!ReduceCooldown((int)ClassType.Rogue))
|
||||
{
|
||||
|
||||
@@ -1253,7 +1253,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
bool shouldAffect = CalamityLists.debuffList.Contains(hasBuff);
|
||||
if (shouldAffect)
|
||||
throwingDamage += 0.1f;
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1308,7 +1308,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Nanotech use to have an exclusive nerf here, but since they are currently equal, there
|
||||
// is no check to indicate such.
|
||||
float damageMult = 0.15f;
|
||||
throwingDamage += raiderStack / 150f * damageMult;
|
||||
Player.GetDamage<ThrowingDamageClass>() += raiderStack / 150f * damageMult;
|
||||
}
|
||||
|
||||
if (kamiBoost)
|
||||
@@ -2127,8 +2127,8 @@ namespace CalamityMod.CalPlayer
|
||||
modStealth = 1f;
|
||||
}
|
||||
|
||||
throwingDamage += (1f - modStealth) * 0.2f;
|
||||
throwingCrit += (int)((1f - modStealth) * 10f);
|
||||
Player.GetDamage<RogueDamageClass>() += (1f - modStealth) * 0.2f;
|
||||
Player.GetCritChance<RogueDamageClass>() += (int)((1f - modStealth) * 10f);
|
||||
Player.aggro -= (int)((1f - modStealth) * 750f);
|
||||
if (modStealthTimer > 0)
|
||||
modStealthTimer--;
|
||||
@@ -2343,7 +2343,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (armorCrumbling)
|
||||
{
|
||||
throwingCrit += 5;
|
||||
Player.GetCritChance<RogueDamageClass>() += 5;
|
||||
Player.GetCritChance(DamageClass.Melee) += 5;
|
||||
}
|
||||
|
||||
@@ -2351,9 +2351,9 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Player.FindBuffIndex(ModContent.BuffType<ArmorCrumbling>()) > -1)
|
||||
Player.ClearBuff(ModContent.BuffType<ArmorCrumbling>());
|
||||
throwingDamage += 0.08f;
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.08f;
|
||||
Player.GetDamage(DamageClass.Melee) += 0.08f;
|
||||
throwingCrit += 8;
|
||||
Player.GetCritChance<RogueDamageClass>() += 8;
|
||||
Player.GetCritChance(DamageClass.Melee) += 8;
|
||||
}
|
||||
|
||||
@@ -2392,10 +2392,10 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
if (xRage)
|
||||
throwingDamage += 0.1f;
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
|
||||
if (xWrath)
|
||||
throwingCrit += 5;
|
||||
Player.GetCritChance<RogueDamageClass>() += 5;
|
||||
|
||||
if (graxDefense)
|
||||
{
|
||||
@@ -2584,7 +2584,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.accFishingLine = true;
|
||||
|
||||
if (CalamityLists.boomerangList.Contains(Player.ActiveItem().type) && Player.invis)
|
||||
throwingDamage += 0.1f;
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
|
||||
if (CalamityLists.javelinList.Contains(Player.ActiveItem().type) && Player.invis)
|
||||
Player.GetArmorPenetration(DamageClass.Generic) += 5;
|
||||
@@ -2593,7 +2593,7 @@ namespace CalamityMod.CalPlayer
|
||||
rogueVelocity += 0.1f;
|
||||
|
||||
if (CalamityLists.spikyBallList.Contains(Player.ActiveItem().type) && Player.invis)
|
||||
throwingCrit += 10;
|
||||
Player.GetCritChance<RogueDamageClass>() += 10;
|
||||
|
||||
if (planarSpeedBoost != 0)
|
||||
{
|
||||
@@ -2942,11 +2942,11 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Player.statLife > (int)(Player.statLifeMax2 * 0.8))
|
||||
{
|
||||
throwingCrit += 5;
|
||||
Player.GetCritChance<RogueDamageClass>() += 5;
|
||||
Player.statDefense += 30;
|
||||
}
|
||||
else
|
||||
throwingDamage += 0.1f;
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
}
|
||||
|
||||
if (bloodflareSummon)
|
||||
@@ -3009,8 +3009,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Player.statLife >= Player.statLifeMax2)
|
||||
{
|
||||
throwingCrit += 10;
|
||||
throwingDamage += 0.1f;
|
||||
Player.GetCritChance<RogueDamageClass>() += 10;
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
rogueVelocity += 0.1f;
|
||||
}
|
||||
}
|
||||
@@ -3170,7 +3170,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (eArtifact)
|
||||
{
|
||||
Player.manaCost *= 0.85f;
|
||||
throwingDamage += 0.15f;
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.15f;
|
||||
Player.maxMinions += 2;
|
||||
}
|
||||
|
||||
@@ -3889,19 +3889,21 @@ namespace CalamityMod.CalPlayer
|
||||
#region Limits
|
||||
private void Limits()
|
||||
{
|
||||
//not sure where else this should go
|
||||
// TODO -- what is Forbidden Circlet actually supposed to do?
|
||||
if (forbiddenCirclet)
|
||||
{
|
||||
float rogueDmg = Player.GetDamage(DamageClass.Throwing).Base + throwingDamage - 1f;
|
||||
float minionDmg = Player.GetDamage(DamageClass.Summon).Base;
|
||||
if (minionDmg < rogueDmg)
|
||||
{
|
||||
Player.GetDamage(DamageClass.Summon) += rogueDmg - Player.GetDamage(DamageClass.Summon).Base;
|
||||
}
|
||||
if (rogueDmg < minionDmg)
|
||||
{
|
||||
throwingDamage = minionDmg - Player.GetDamage(DamageClass.Throwing).Base + 1f;
|
||||
}
|
||||
ref StatModifier summon = ref Player.GetDamage<SummonDamageClass>();
|
||||
ref StatModifier rogue = ref Player.GetDamage<RogueDamageClass>();
|
||||
float boostToSummonFromRogue = 0f;
|
||||
float boostToRogueFromSummon = 0f;
|
||||
|
||||
if (summon.Additive < rogue.Additive)
|
||||
boostToSummonFromRogue = rogue.Additive - summon.Additive;
|
||||
if (rogue.Additive < summon.Additive)
|
||||
boostToRogueFromSummon = summon.Additive - rogue.Additive;
|
||||
|
||||
summon += boostToSummonFromRogue;
|
||||
rogue += boostToRogueFromSummon;
|
||||
}
|
||||
|
||||
// 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50%
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
ItemLifesteal(target, item, damage);
|
||||
ItemOnHit(item, damage, target.Center, crit, (target.damage > 5 || target.boss) && !target.SpawnedFromStatue);
|
||||
NPCDebuffs(target, item.CountsAsClass<MeleeDamageClass>(), item.CountsAsClass<RangedDamageClass>(), item.CountsAsClass<MagicDamageClass>(), item.CountsAsClass<SummonDamageClass>(), item.Calamity().rogue, false);
|
||||
NPCDebuffs(target, item.CountsAsClass<MeleeDamageClass>(), item.CountsAsClass<RangedDamageClass>(), item.CountsAsClass<MagicDamageClass>(), item.CountsAsClass<SummonDamageClass>(), item.CountsAsClass<ThrowingDamageClass>(), false);
|
||||
|
||||
// Shattered Community tracks all damage dealt with Rage Mode (ignoring dummies).
|
||||
if (target.type == NPCID.TargetDummy || target.type == NPCType<SuperDummyNPC>())
|
||||
@@ -380,7 +380,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
ProjLifesteal(target, proj, damage, crit);
|
||||
ProjOnHit(proj, target.Center, crit, (target.damage > 5 || target.boss) && !target.SpawnedFromStatue);
|
||||
NPCDebuffs(target, proj.CountsAsClass<MeleeDamageClass>(), proj.CountsAsClass<RangedDamageClass>(), proj.CountsAsClass<MagicDamageClass>(), proj.IsSummon(), cgp.rogue, true);
|
||||
NPCDebuffs(target, proj.CountsAsClass<MeleeDamageClass>(), proj.CountsAsClass<RangedDamageClass>(), proj.CountsAsClass<MagicDamageClass>(), proj.IsSummon(), proj.CountsAsClass<ThrowingDamageClass>(), true);
|
||||
|
||||
// Shattered Community tracks all damage dealt with Rage Mode (ignoring dummies).
|
||||
if (target.type == NPCID.TargetDummy || target.type == NPCType<SuperDummyNPC>())
|
||||
@@ -467,7 +467,7 @@ namespace CalamityMod.CalPlayer
|
||||
break;
|
||||
}
|
||||
ItemOnHit(item, damage, target.Center, crit, true);
|
||||
PvpDebuffs(target, item.CountsAsClass<MeleeDamageClass>(), item.CountsAsClass<RangedDamageClass>(), item.CountsAsClass<MagicDamageClass>(), item.CountsAsClass<SummonDamageClass>(), item.Calamity().rogue, false);
|
||||
PvpDebuffs(target, item.CountsAsClass<MeleeDamageClass>(), item.CountsAsClass<RangedDamageClass>(), item.CountsAsClass<MagicDamageClass>(), item.CountsAsClass<SummonDamageClass>(), item.CountsAsClass<ThrowingDamageClass>(), false);
|
||||
}
|
||||
|
||||
public override void OnHitPvpWithProj(Projectile proj, Player target, int damage, bool crit)
|
||||
@@ -602,7 +602,7 @@ namespace CalamityMod.CalPlayer
|
||||
target.AddBuff(BuffType<Plague>(), 300);
|
||||
}
|
||||
ProjOnHit(proj, target.Center, crit, true);
|
||||
PvpDebuffs(target, proj.CountsAsClass<MeleeDamageClass>(), proj.CountsAsClass<RangedDamageClass>(), proj.CountsAsClass<MagicDamageClass>(), proj.IsSummon(), proj.Calamity().rogue, true);
|
||||
PvpDebuffs(target, proj.CountsAsClass<MeleeDamageClass>(), proj.CountsAsClass<RangedDamageClass>(), proj.CountsAsClass<MagicDamageClass>(), proj.IsSummon(), proj.CountsAsClass<ThrowingDamageClass>(), true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -757,7 +757,7 @@ namespace CalamityMod.CalPlayer
|
||||
MagicOnHit(proj, modProj, position, crit, npcCheck);
|
||||
if (proj.IsSummon())
|
||||
SummonOnHit(proj, modProj, position, crit, npcCheck);
|
||||
if (modProj.rogue)
|
||||
if (proj.CountsAsClass<ThrowingDamageClass>())
|
||||
RogueOnHit(proj, modProj, position, crit, npcCheck);
|
||||
}
|
||||
|
||||
@@ -1670,14 +1670,14 @@ namespace CalamityMod.CalPlayer
|
||||
Main.player[Main.myPlayer].lifeSteal -= cooldown;
|
||||
}
|
||||
|
||||
if (vampiricTalisman && modProj.rogue && crit)
|
||||
if (vampiricTalisman && proj.CountsAsClass<ThrowingDamageClass>() && crit)
|
||||
{
|
||||
float heal = MathHelper.Clamp(damage * 0.011f, 0f, 5f);
|
||||
if ((int)heal > 0)
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, heal, ProjectileID.VampireHeal, 1200f, 3f);
|
||||
}
|
||||
|
||||
if (bloodyGlove && modProj.rogue && modProj.stealthStrike)
|
||||
if (bloodyGlove && proj.CountsAsClass<RogueDamageClass>() && modProj.stealthStrike)
|
||||
{
|
||||
Player.statLife += 1;
|
||||
Player.HealEffect(1);
|
||||
@@ -1685,7 +1685,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if ((target.damage > 5 || target.boss) && !target.SpawnedFromStatue)
|
||||
{
|
||||
if (bloodflareThrowing && modProj.rogue && crit && Main.rand.NextBool(2))
|
||||
if (bloodflareThrowing && proj.CountsAsClass<ThrowingDamageClass>() && crit && Main.rand.NextBool(2))
|
||||
{
|
||||
float projHitMult = 0.03f;
|
||||
projHitMult -= proj.numHits * 0.015f;
|
||||
@@ -1839,7 +1839,7 @@ namespace CalamityMod.CalPlayer
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, heal, ProjectileType<ReaverHealOrb>(), 1200f, 3f);
|
||||
}
|
||||
|
||||
if (modProj.rogue)
|
||||
if (proj.CountsAsClass<ThrowingDamageClass>())
|
||||
{
|
||||
if (xerocSet && xerocDmg <= 0 && Player.ownedProjectileCounts[ProjectileType<XerocFire>()] < 3 && Player.ownedProjectileCounts[ProjectileType<XerocBlast>()] < 3)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.CalPlayer.Dashes
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace CalamityMod.DataStructures
|
||||
GemThatShouldBeLost = GemTechArmorGemType.Magic;
|
||||
if (Owner.ActiveItem().CountsAsClass<SummonDamageClass>())
|
||||
GemThatShouldBeLost = GemTechArmorGemType.Summoner;
|
||||
if (Owner.ActiveItem().Calamity().rogue)
|
||||
if (Owner.ActiveItem().CountsAsClass<ThrowingDamageClass>())
|
||||
GemThatShouldBeLost = GemTechArmorGemType.Rogue;
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ namespace CalamityMod.DataStructures
|
||||
usedGemType = GemTechArmorGemType.Magic;
|
||||
if (item.CountsAsClass<SummonDamageClass>())
|
||||
usedGemType = GemTechArmorGemType.Summoner;
|
||||
if (item.Calamity().rogue)
|
||||
if (item.CountsAsClass<ThrowingDamageClass>())
|
||||
usedGemType = GemTechArmorGemType.Rogue;
|
||||
|
||||
// The previously used gem has been defined and is different than the currently used one, set the
|
||||
@@ -293,8 +293,8 @@ namespace CalamityMod.DataStructures
|
||||
// The rogue stealth max is present in the Gem Tech Headgear file.
|
||||
if (IsRedGemActive)
|
||||
{
|
||||
Owner.Calamity().throwingCrit += (int)(GemTechHeadgear.RogueCritBoost * 100f);
|
||||
Owner.Calamity().throwingDamage += GemTechHeadgear.RogueDamageBoost;
|
||||
Owner.GetCritChance<ThrowingDamageClass>() += (int)(GemTechHeadgear.RogueCritBoost * 100f);
|
||||
Owner.GetDamage<ThrowingDamageClass>() += GemTechHeadgear.RogueDamageBoost;
|
||||
}
|
||||
|
||||
// The melee speed boost code is present in the Player Misc Effects file.
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().hasJetpack = true;
|
||||
player.Calamity().throwingDamage += 0.12f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.12f;
|
||||
player.Calamity().rogueVelocity += 0.15f;
|
||||
player.Calamity().blunderBooster = true;
|
||||
player.Calamity().stealthGenStandstill += 0.1f;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().throwingCrit += 6;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 6;
|
||||
player.Calamity().stealthStrike75Cost = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.stealthStrikeHalfCost = true;
|
||||
modPlayer.rogueStealthMax += 0.2f;
|
||||
modPlayer.darkGodSheath = true;
|
||||
modPlayer.throwingCrit += 6;
|
||||
modPlayer.throwingDamage += 0.06f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 6;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.06f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -45,8 +45,8 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.eclipseMirror = true;
|
||||
modPlayer.stealthStrikeAlwaysCrits = true;
|
||||
modPlayer.stealthStrikeHalfCost = true;
|
||||
modPlayer.throwingCrit += 6;
|
||||
modPlayer.throwingDamage += 0.06f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 6;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.06f;
|
||||
player.aggro -= 700;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.etherealExtorter = true;
|
||||
modPlayer.throwingDamage += 0.1f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
player.lifeRegen -= 1;
|
||||
modPlayer.rogueStealthMax += 0.1f;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.gloveOfRecklessness = true;
|
||||
modPlayer.throwingDamage -= 0.1f;
|
||||
modPlayer.rogueUseSpeedFactor += 0.12f;
|
||||
player.GetDamage<RogueDamageClass>() -= 0.1f;
|
||||
player.GetAttackSpeed<RogueDamageClass>() += 0.12f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,10 +29,10 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.gloveOfPrecision = true;
|
||||
modPlayer.throwingDamage += 0.12f;
|
||||
modPlayer.throwingCrit += 12;
|
||||
player.GetDamage<RogueDamageClass>() += 0.12f;
|
||||
player.GetCritChance<RogueDamageClass>() += 12;
|
||||
modPlayer.rogueVelocity += 0.25f;
|
||||
modPlayer.rogueUseSpeedFactor -= 0.2f;
|
||||
player.GetAttackSpeed<RogueDamageClass>() -= 0.2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.electricianGlove = true;
|
||||
modPlayer.filthyGlove = true;
|
||||
modPlayer.bloodyGlove = true;
|
||||
player.Calamity().throwingDamage += 0.15f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.15f;
|
||||
player.Calamity().rogueVelocity += 0.15f;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().hasJetpack = true;
|
||||
player.Calamity().throwingDamage += 0.05f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.05f;
|
||||
player.Calamity().rogueVelocity += 0.15f;
|
||||
player.Calamity().plaguedFuelPack = true;
|
||||
player.Calamity().stealthGenStandstill += 0.1f;
|
||||
|
||||
@@ -129,8 +129,8 @@ namespace CalamityMod.Items.Accessories
|
||||
var source = player.GetSource_ItemUse(item);
|
||||
int weaponType = item.CountsAsClass<MeleeDamageClass>() ? 1 :
|
||||
item.CountsAsClass<RangedDamageClass>() ? 2 :
|
||||
item.CountsAsClass<MagicDamageClass>() ? 3 :
|
||||
item.Calamity().rogue ? 4 : -1;
|
||||
item.CountsAsClass<MagicDamageClass>() ? 3 :
|
||||
item.CountsAsClass<ThrowingDamageClass>() ? 4 : -1;
|
||||
if (weaponType > 0)
|
||||
{
|
||||
if (player.Calamity().profanedSoulWeaponType != weaponType || player.Calamity().profanedSoulWeaponUsage >= 300)
|
||||
@@ -242,7 +242,7 @@ namespace CalamityMod.Items.Accessories
|
||||
if (player.Calamity().profanedSoulWeaponUsage > 0)
|
||||
player.Calamity().profanedSoulWeaponUsage--;
|
||||
}
|
||||
else if (item.Calamity().rogue)
|
||||
else if (item.CountsAsClass<ThrowingDamageClass>())
|
||||
{
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<ProfanedCrystalRogueShard>()] == 0)
|
||||
{
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace CalamityMod.Items.Accessories
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.pAmulet = true;
|
||||
player.shroomiteStealth = true;
|
||||
modPlayer.throwingDamage += 0.05f;
|
||||
modPlayer.throwingCrit += 5;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.05f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 5;
|
||||
player.GetDamage(DamageClass.Ranged) += 0.05f;
|
||||
player.GetCritChance(DamageClass.Ranged) += 5;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.15f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.15f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,8 +30,8 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.stealthStrikeHalfCost = true;
|
||||
modPlayer.throwingCrit += 6;
|
||||
modPlayer.throwingDamage += 0.06f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 6;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.06f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -133,8 +133,10 @@ namespace CalamityMod.Items.Accessories
|
||||
damageClassName = "Minion";
|
||||
else if (dc == DamageClass.SummonMeleeSpeed)
|
||||
damageClassName = "Whip";
|
||||
else if (dc == RogueDamageClass.Instance)
|
||||
damageClassName = "Rogue";
|
||||
else if (dc == DamageClass.Throwing)
|
||||
damageClassName = (heldItem?.Calamity().rogue ?? false) ? "Rogue" : "Throwing";
|
||||
damageClassName = "Throwing";
|
||||
|
||||
var currentStats = player.GetDamage(dc);
|
||||
float baseFlatDamage = currentStats.Flat;
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.vampiricTalisman = true;
|
||||
player.Calamity().throwingDamage += 0.12f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.12f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.1f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
player.Calamity().veneratedLocket = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,8 +39,8 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
if (player.armor[0].type == ModContent.ItemType<XerocMask>() && player.armor[1].type == ModContent.ItemType<XerocPlateMail>() && player.armor[2].type == ModContent.ItemType<XerocCuisses>())
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.05f;
|
||||
player.Calamity().throwingCrit += 5;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.05f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 5;
|
||||
}
|
||||
|
||||
if (player.controlJump && player.wingTime > 0f && !player.canJumpAgain_Cloud && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
|
||||
|
||||
@@ -25,13 +25,7 @@ namespace CalamityMod.Items.Armor
|
||||
Item.defense = 7;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetCritChance(DamageClass.Melee) += 3;
|
||||
player.GetCritChance(DamageClass.Ranged) += 3;
|
||||
player.GetCritChance(DamageClass.Magic) += 3;
|
||||
player.Calamity().throwingCrit += 3;
|
||||
}
|
||||
public override void UpdateEquip(Player player) => player.GetCritChance<GenericDamageClass>() += 3;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -53,13 +53,13 @@ namespace CalamityMod.Items.Armor
|
||||
modPlayer.rogueStealthMax += 1f;
|
||||
player.noFallDmg = true;
|
||||
player.moveSpeed += 0.05f;
|
||||
player.Calamity().throwingCrit += 5;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 5;
|
||||
player.Calamity().wearingRogueArmor = true;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.08f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.08f;
|
||||
player.moveSpeed += 0.05f;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,15 +53,15 @@ namespace CalamityMod.Items.Armor
|
||||
modPlayer.ataxiaBlaze = true;
|
||||
modPlayer.ataxiaVolley = true;
|
||||
modPlayer.rogueStealthMax += 1.1f;
|
||||
modPlayer.throwingDamage += 0.05f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.05f;
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().rogueAmmoCost *= 0.5f;
|
||||
player.Calamity().throwingDamage += 0.12f;
|
||||
player.Calamity().throwingCrit += 10;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.12f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 10;
|
||||
player.moveSpeed += 0.05f;
|
||||
player.lavaMax += 240;
|
||||
player.buffImmune[BuffID.OnFire] = true;
|
||||
|
||||
@@ -70,8 +70,8 @@ namespace CalamityMod.Items.Armor
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.auricBoost = true;
|
||||
player.Calamity().throwingDamage += 0.2f;
|
||||
player.Calamity().throwingCrit += 20;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.2f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 20;
|
||||
player.moveSpeed += 0.05f;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@ namespace CalamityMod.Items.Armor
|
||||
{
|
||||
player.lavaMax += 240;
|
||||
player.ignoreWater = true;
|
||||
player.Calamity().throwingDamage += 0.1f;
|
||||
player.Calamity().throwingCrit += 10;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 10;
|
||||
player.moveSpeed += 0.05f;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,15 +49,15 @@ namespace CalamityMod.Items.Armor
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.daedalusSplit = true;
|
||||
modPlayer.rogueStealthMax += 1.05f;
|
||||
modPlayer.throwingDamage += 0.05f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.05f;
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().rogueVelocity += 0.15f;
|
||||
player.Calamity().throwingDamage += 0.13f;
|
||||
player.Calamity().throwingCrit += 7;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.13f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 7;
|
||||
player.moveSpeed += 0.05f;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,8 +66,8 @@ namespace CalamityMod.Items.Armor
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.14f;
|
||||
player.Calamity().throwingCrit += 14;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.14f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 14;
|
||||
player.moveSpeed += 0.05f;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Armor
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingCrit += 3;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 3;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Items.Armor
|
||||
"Once you have built max stealth, you will be able to perform a Stealth Strike\n" +
|
||||
"Rogue stealth only reduces when you attack, it does not reduce while moving\n" +
|
||||
"The higher your rogue stealth the higher your rogue damage, crit, and movement speed";
|
||||
player.Calamity().throwingDamage += 0.05f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.05f;
|
||||
player.Calamity().wearingRogueArmor = true;
|
||||
if (player.controlJump)
|
||||
{
|
||||
@@ -72,7 +72,7 @@ namespace CalamityMod.Items.Armor
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.02f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.02f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -54,8 +54,8 @@ namespace CalamityMod.Items.Armor
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().rogueAmmoCost *= 0.66f;
|
||||
player.Calamity().throwingDamage += 0.1f;
|
||||
player.Calamity().throwingCrit += 7;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 7;
|
||||
player.moveSpeed += 0.05f;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace CalamityMod.Items.Armor
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.08f;
|
||||
player.Calamity().throwingCrit += 5;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.08f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 5;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -54,8 +54,8 @@ namespace CalamityMod.Items.Armor
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.04f;
|
||||
player.Calamity().throwingCrit += 2;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.04f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 2;
|
||||
player.gills = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,8 +61,8 @@ namespace CalamityMod.Items.Armor
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.1f;
|
||||
player.Calamity().throwingCrit += 10;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 10;
|
||||
player.moveSpeed += 0.05f;
|
||||
player.endurance += 0.05f;
|
||||
player.lavaMax += 240;
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Armor
|
||||
{
|
||||
player.Calamity().titanHeartBoots = true;
|
||||
player.Calamity().rogueVelocity += 0.1f;
|
||||
player.Calamity().throwingDamage += 0.04f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.04f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -31,7 +31,8 @@ namespace CalamityMod.Items.Armor
|
||||
{
|
||||
player.Calamity().titanHeartMantle = true;
|
||||
player.Calamity().rogueAmmoCost *= 0.55f;
|
||||
player.Calamity().rogueUseSpeedFactor -= 0.15f;
|
||||
// 15% attack speed penalty
|
||||
player.GetAttackSpeed<ThrowingDamageClass>() -= 0.15f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Armor
|
||||
"The higher your rogue stealth the higher your rogue damage, crit, and movement speed";
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.titanHeartSet = true;
|
||||
modPlayer.throwingDamage += 0.15f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.15f;
|
||||
modPlayer.rogueStealthMax += 1f;
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
player.noKnockback = true;
|
||||
@@ -54,7 +54,7 @@ namespace CalamityMod.Items.Armor
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.titanHeartMask = true;
|
||||
modPlayer.throwingDamage += 0.05f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.05f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace CalamityMod.Items.Armor
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.moveSpeed += 0.2f;
|
||||
player.Calamity().throwingDamage += 0.09f;
|
||||
player.Calamity().throwingCrit += 6;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.09f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 6;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace CalamityMod.Items.Armor
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.08f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.08f;
|
||||
player.Calamity().rogueVelocity += 0.1f;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ namespace CalamityMod.Items.Armor
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.1f;
|
||||
player.Calamity().throwingCrit += 10;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 10;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -48,14 +48,14 @@ namespace CalamityMod.Items.Armor
|
||||
player.ignoreWater = true;
|
||||
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.1f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
player.lifeRegen += 3;
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.05f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.05f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Items.Armor
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.1f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace CalamityMod.Items.Armor
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingCrit += 5;
|
||||
player.Calamity().throwingDamage += 0.05f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 5;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.05f;
|
||||
player.moveSpeed += 0.15f;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,15 +82,15 @@ namespace CalamityMod.Items.Armor
|
||||
player.AddBuff(BuffID.Wrath, 2);
|
||||
player.AddBuff(BuffID.Rage, 2);
|
||||
}
|
||||
modPlayer.throwingDamage += 0.09f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.09f;
|
||||
modPlayer.rogueVelocity += 0.09f;
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.Calamity().throwingDamage += 0.11f;
|
||||
player.Calamity().throwingCrit += 11;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.11f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 11;
|
||||
player.moveSpeed += 0.05f;
|
||||
player.lavaMax += 240;
|
||||
}
|
||||
|
||||
@@ -46,8 +46,8 @@ namespace CalamityMod.Items.Armor
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.statLifeMax2 += 20;
|
||||
player.Calamity().throwingCrit += 7;
|
||||
player.Calamity().throwingDamage += 0.07f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 7;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.07f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.VanillaArmorChanges
|
||||
{
|
||||
@@ -31,12 +32,12 @@ namespace CalamityMod.Items.VanillaArmorChanges
|
||||
|
||||
public override void ApplyHeadPieceEffect(Player player)
|
||||
{
|
||||
player.Calamity().throwingDamage += HelmetRogueDamageBoostPercent * 0.01f;
|
||||
player.GetDamage<ThrowingDamageClass>() += HelmetRogueDamageBoostPercent * 0.01f;
|
||||
}
|
||||
|
||||
public override void ApplyBodyPieceEffect(Player player)
|
||||
{
|
||||
player.Calamity().throwingCrit += ChestplateRogueCritBoostPercent;
|
||||
player.GetCritChance<ThrowingDamageClass>() += ChestplateRogueCritBoostPercent;
|
||||
}
|
||||
|
||||
public override void ApplyLegPieceEffect(Player player)
|
||||
@@ -48,7 +49,7 @@ namespace CalamityMod.Items.VanillaArmorChanges
|
||||
{
|
||||
player.Calamity().rogueStealthMax += 0.7f;
|
||||
player.Calamity().wearingRogueArmor = true;
|
||||
player.Calamity().throwingDamage += 0.05f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.05f;
|
||||
player.Calamity().rogueVelocity += 0.1f;
|
||||
player.statDefense += 3;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -23,12 +22,12 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
"Stealth strikes release more energy and explode on collision");
|
||||
}
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
public override void SetDefaults()
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.damage = 80;
|
||||
modItem.rogue = true;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.width = 26;
|
||||
@@ -54,7 +53,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
|
||||
public override void SafeModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 2);
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 2);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -23,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
"Stealth strikes explode violently on collision into a vaporizing blast");
|
||||
}
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
public override void SetDefaults()
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
@@ -46,7 +45,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<PlasmaGrenadeProjectile>();
|
||||
Item.shootSpeed = 14f;
|
||||
modItem.rogue = true;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
@@ -60,7 +59,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void SafeModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 5);
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 5);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -24,12 +23,12 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
"Stealth strikes make the device emit a large, damaging EMP field");
|
||||
}
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
public override void SetDefaults()
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.damage = 45;
|
||||
modItem.rogue = true;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.width = 42;
|
||||
@@ -62,7 +61,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void SafeModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3);
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -22,12 +21,12 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
"Releases a flying disk that fires lasers at nearby enemies\n" +
|
||||
"Stealth strikes allow the disk to fire multiple larger lasers at different targets");
|
||||
}
|
||||
public override void SafeSetDefaults()
|
||||
public override void SetDefaults()
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.damage = 25;
|
||||
modItem.rogue = true;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
|
||||
Item.width = 30;
|
||||
Item.height = 34;
|
||||
@@ -62,7 +61,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void SafeModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 1);
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 1);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -22,12 +21,12 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
"Stealth strikes emit absurdly powerful shockwaves");
|
||||
}
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
public override void SetDefaults()
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.damage = 75;
|
||||
modItem.rogue = true;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.width = 26;
|
||||
@@ -60,7 +59,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void SafeModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 4);
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 4);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -68,9 +68,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
|
||||
public override float SafeSetUseTimeMultiplier(Player player) => player.altFunctionUse == 2 ? 5f / 9f : 1f;
|
||||
public override float UseTimeMultiplier(Player player) => player.altFunctionUse == 2 ? 5f / 9f : 1f;
|
||||
|
||||
public override void SafeModifyWeaponDamage(Player player, ref StatModifier damage)
|
||||
public override void ModifyWeaponDamage(Player player, ref StatModifier damage)
|
||||
{
|
||||
damage *= flexMult;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Creative;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
|
||||
public override float SafeSetUseTimeMultiplier(Player player)
|
||||
public override float UseTimeMultiplier(Player player)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable() || player.altFunctionUse != 2)
|
||||
return 1f;
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
|
||||
public override float SafeSetUseTimeMultiplier(Player player)
|
||||
public override float UseTimeMultiplier(Player player)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable() || player.altFunctionUse == 2)
|
||||
return 1f;
|
||||
|
||||
@@ -23,6 +23,8 @@ namespace CalamityMod.Items.Weapons.Typeless
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
// TODO -- "scales with all stats at once"
|
||||
Item.DamageType = DamageClass.Generic;
|
||||
Item.width = 58;
|
||||
Item.damage = 8;
|
||||
Item.useAnimation = 25;
|
||||
@@ -41,18 +43,6 @@ namespace CalamityMod.Items.Weapons.Typeless
|
||||
Item.shootSpeed = 5f;
|
||||
}
|
||||
|
||||
// Aestheticus scales off of all damage types simultaneously (meaning it scales 5x from universal damage boosts).
|
||||
public override void ModifyWeaponDamage(Player player, ref StatModifier damage)
|
||||
{
|
||||
float formula = 5f * (player.GetDamage(DamageClass.Generic).Additive - 1f);
|
||||
formula += player.GetDamage(DamageClass.Melee).Additive - 1f;
|
||||
formula += player.GetDamage(DamageClass.Ranged).Additive - 1f;
|
||||
formula += player.GetDamage(DamageClass.Magic).Additive - 1f;
|
||||
formula += player.GetDamage(DamageClass.Summon).Additive - 1f;
|
||||
formula += player.Calamity().throwingDamage - 1f;
|
||||
damage += formula;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 0f);
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace CalamityMod.Items.Weapons.Typeless
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
// TODO -- "scales with all stats at once"
|
||||
Item.DamageType = DamageClass.Generic;
|
||||
|
||||
Item.width = 80;
|
||||
Item.damage = 32;
|
||||
Item.rare = ItemRarityID.Cyan;
|
||||
@@ -41,18 +44,6 @@ namespace CalamityMod.Items.Weapons.Typeless
|
||||
return new Vector2(-15, 0);
|
||||
}
|
||||
|
||||
// Eye of Magnus scales off of all damage types simultaneously (meaning it scales 5x from universal damage boosts).
|
||||
public override void ModifyWeaponDamage(Player player, ref StatModifier damage)
|
||||
{
|
||||
float formula = 5f * (player.GetDamage(DamageClass.Generic).Additive - 1f);
|
||||
formula += player.GetDamage(DamageClass.Melee).Additive - 1f;
|
||||
formula += player.GetDamage(DamageClass.Ranged).Additive - 1f;
|
||||
formula += player.GetDamage(DamageClass.Magic).Additive - 1f;
|
||||
formula += player.GetDamage(DamageClass.Summon).Additive - 1f;
|
||||
formula += player.Calamity().throwingDamage - 1f;
|
||||
damage += formula;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -21,6 +21,9 @@ namespace CalamityMod.Items.Weapons.Typeless
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
// TODO -- "scales with all stats at once"
|
||||
Item.DamageType = DamageClass.Generic;
|
||||
|
||||
Item.width = 80;
|
||||
Item.damage = 9;
|
||||
Item.value = CalamityGlobalItem.Rarity4BuyPrice;
|
||||
@@ -42,18 +45,6 @@ namespace CalamityMod.Items.Weapons.Typeless
|
||||
return new Vector2(-15, 0);
|
||||
}
|
||||
|
||||
// Lunic Eye scales off of all damage types simultaneously (meaning it scales 5x from universal damage boosts).
|
||||
public override void ModifyWeaponDamage(Player player, ref StatModifier damage)
|
||||
{
|
||||
float formula = 5f * (player.GetDamage(DamageClass.Generic).Additive - 1f);
|
||||
formula += player.GetDamage(DamageClass.Melee).Additive - 1f;
|
||||
formula += player.GetDamage(DamageClass.Ranged).Additive - 1f;
|
||||
formula += player.GetDamage(DamageClass.Magic).Additive - 1f;
|
||||
formula += player.GetDamage(DamageClass.Summon).Additive - 1f;
|
||||
formula += player.Calamity().throwingDamage - 1f;
|
||||
damage += formula;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace CalamityMod.Items.Weapons.Typeless
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
// TODO -- "scales with all stats at once"
|
||||
Item.DamageType = DamageClass.Generic;
|
||||
|
||||
Item.damage = 4;
|
||||
Item.width = 54;
|
||||
Item.height = 20;
|
||||
@@ -41,18 +44,6 @@ namespace CalamityMod.Items.Weapons.Typeless
|
||||
return new Vector2(-5, 0);
|
||||
}
|
||||
|
||||
// Marked Magnum scales off of all damage types simultaneously (meaning it scales 5x from universal damage boosts).
|
||||
public override void ModifyWeaponDamage(Player player, ref StatModifier damage)
|
||||
{
|
||||
float formula = 5f * (player.GetDamage(DamageClass.Generic).Additive - 1f);
|
||||
formula += player.GetDamage(DamageClass.Melee).Additive - 1f;
|
||||
formula += player.GetDamage(DamageClass.Ranged).Additive - 1f;
|
||||
formula += player.GetDamage(DamageClass.Magic).Additive - 1f;
|
||||
formula += player.GetDamage(DamageClass.Summon).Additive - 1f;
|
||||
formula += player.Calamity().throwingDamage - 1f;
|
||||
damage += formula;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 0f);
|
||||
|
||||
+4
-175
@@ -1,16 +1,15 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.UI;
|
||||
using CalamityMod.UI.CalamitasEnchants;
|
||||
using CalamityMod.World;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -495,36 +494,6 @@ namespace CalamityMod
|
||||
#endregion
|
||||
|
||||
#region Rogue Class
|
||||
/// <summary>
|
||||
/// Gets a player's current rogue damage stat.
|
||||
/// </summary>
|
||||
/// <param name="p">The player whose rogue damage is being queried.</param>
|
||||
/// <returns>Current rogue damage boost. 1f is no bonus, 2f is +100%.</returns>
|
||||
public static float GetRogueDamage(Player p) => p?.Calamity()?.throwingDamage ?? 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a flat amount of rogue damage stat to a player. This amount can be negative.
|
||||
/// </summary>
|
||||
/// <param name="p">The player whose rogue damage is being modified.</param>
|
||||
/// <param name="add">The amount of rogue damage to add or subtract (if negative).</param>
|
||||
/// <returns>The player's new rogue damage stat.</returns>
|
||||
public static float AddRogueDamage(Player p, float add) => p is null ? 1f : (p.Calamity().throwingDamage += add);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a player's current rogue critical strike chance.
|
||||
/// </summary>
|
||||
/// <param name="p">The player whose rogue crit is being queried.</param>
|
||||
/// <returns>Current rogue critical strike chance. 0 is no additional crit, 8 is +8% crit chance.</returns>
|
||||
public static int GetRogueCrit(Player p) => p?.Calamity()?.throwingCrit ?? 0;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a flat amount of rogue crit to a player. This amount can be negative.
|
||||
/// </summary>
|
||||
/// <param name="p">The player whose rogue crit is being modified.</param>
|
||||
/// <param name="add">The amount of rogue crit to add or subtract (if negative).</param>
|
||||
/// <returns>The player's new rogue crit stat.</returns>
|
||||
public static int AddRogueCrit(Player p, int add) => p is null ? 0 : (p.Calamity().throwingCrit += add);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a player's current rogue projectile velocity multiplier.
|
||||
/// </summary>
|
||||
@@ -545,62 +514,6 @@ namespace CalamityMod
|
||||
public static float GetMaxStealth(Player p) => p?.Calamity()?.rogueStealthMax ?? 0f;
|
||||
|
||||
public static float AddMaxStealth(Player p, float add) => p is null ? 0f : (p.Calamity().rogueStealthMax += add);
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the given item is classified as a rogue weapon.
|
||||
/// </summary>
|
||||
/// <param name="p">The item which is being checked.</param>
|
||||
/// <returns>Whether the item is a rogue weapon.</returns>
|
||||
public static bool IsRogue(Item it)
|
||||
{
|
||||
if (it is null || it.Calamity() is null)
|
||||
return false;
|
||||
CalamityGlobalItem cgi = it.Calamity();
|
||||
return cgi.rogue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets whether the given item is classified as a rogue weapon.
|
||||
/// </summary>
|
||||
/// <param name="p">The item whose rogue classification is being toggled.</param>
|
||||
/// <param name="isRogue">The value to apply.</param>
|
||||
/// <returns>Whether the item is now a rogue weapon.</returns>
|
||||
public static bool SetRogue(Item it, bool isRogue)
|
||||
{
|
||||
if (it is null || it.Calamity() is null)
|
||||
return false;
|
||||
CalamityGlobalItem cgi = it.Calamity();
|
||||
cgi.rogue = isRogue;
|
||||
return cgi.rogue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the given projectile is classified as rogue.
|
||||
/// </summary>
|
||||
/// <param name="p">The projectile which is being checked.</param>
|
||||
/// <returns>Whether the projectile is rogue.</returns>
|
||||
public static bool IsRogue(Projectile p)
|
||||
{
|
||||
if (p is null || p.Calamity() is null)
|
||||
return false;
|
||||
CalamityGlobalProjectile cgp = p.Calamity();
|
||||
return cgp.rogue | cgp.forceRogue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets whether the given projectile is classified as rogue. If set to true, also forces the projectile to be rogue every single frame.
|
||||
/// </summary>
|
||||
/// <param name="p">The projectile whose rogue classification is being toggled.</param>
|
||||
/// <param name="isRogue">The value to apply.</param>
|
||||
/// <returns>Whether the projectile is now rogue.</returns>
|
||||
public static bool SetRogue(Projectile p, bool isRogue)
|
||||
{
|
||||
if (p is null || p.Calamity() is null)
|
||||
return false;
|
||||
CalamityGlobalProjectile cgp = p.Calamity();
|
||||
cgp.forceRogue = cgp.rogue = isRogue;
|
||||
return cgp.rogue;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Player Armor Set Bonuses
|
||||
@@ -1630,22 +1543,6 @@ namespace CalamityMod
|
||||
AddAbyssLightStrength(castPlayer(args[1]), light);
|
||||
return null;
|
||||
|
||||
case "GetRogueDamage":
|
||||
case "GetRogueDmg":
|
||||
if (args.Length < 2)
|
||||
return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player).");
|
||||
if (!isValidPlayerArg(args[1]))
|
||||
return new ArgumentException("ERROR: The argument to \"GetRogueDamage\" must be a Player or an int.");
|
||||
return GetRogueDamage(castPlayer(args[1]));
|
||||
|
||||
case "GetRogueCrit":
|
||||
case "GetRogueCritChance":
|
||||
if (args.Length < 2)
|
||||
return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player).");
|
||||
if (!isValidPlayerArg(args[1]))
|
||||
return new ArgumentException("ERROR: The argument to \"GetRogueCrit\" must be a Player or an int.");
|
||||
return GetRogueCrit(castPlayer(args[1]));
|
||||
|
||||
case "GetRogueVelocity":
|
||||
if (args.Length < 2)
|
||||
return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player).");
|
||||
@@ -1653,34 +1550,6 @@ namespace CalamityMod
|
||||
return new ArgumentException("ERROR: The argument to \"GetRogueVelocity\" must be a Player or an int.");
|
||||
return GetRogueVelocity(castPlayer(args[1]));
|
||||
|
||||
case "AddRogueDamage":
|
||||
case "AddRogueDmg":
|
||||
case "ModifyRogueDamage":
|
||||
case "ModifyRogueDmg":
|
||||
if (args.Length < 2)
|
||||
return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and rogue damage change as a float.");
|
||||
if (args.Length < 3)
|
||||
return new ArgumentNullException("ERROR: Must specify rogue damage change as a float.");
|
||||
if (!(args[2] is float damage))
|
||||
return new ArgumentException("ERROR: The second argument to \"AddRogueDamage\" must be a float.");
|
||||
if (!isValidPlayerArg(args[1]))
|
||||
return new ArgumentException("ERROR: The first argument to \"AddRogueDamage\" must be a Player or an int.");
|
||||
return AddRogueDamage(castPlayer(args[1]), damage);
|
||||
|
||||
case "AddRogueCrit":
|
||||
case "AddRogueCritChance":
|
||||
case "ModifyRogueCrit":
|
||||
case "ModifyRogueCritChance":
|
||||
if (args.Length < 2)
|
||||
return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and rogue crit change as an int.");
|
||||
if (args.Length < 3)
|
||||
return new ArgumentNullException("ERROR: Must specify rogue crit change as a float.");
|
||||
if (!(args[2] is int crit))
|
||||
return new ArgumentException("ERROR: The second argument to \"AddRogueCrit\" must be an int.");
|
||||
if (!isValidPlayerArg(args[1]))
|
||||
return new ArgumentException("ERROR: The first argument to \"AddRogueCrit\" must be a Player or an int.");
|
||||
return AddRogueCrit(castPlayer(args[1]), crit);
|
||||
|
||||
case "AddRogueVelocity":
|
||||
case "ModifyRogueVelocity":
|
||||
if (args.Length < 2)
|
||||
@@ -1722,46 +1591,6 @@ namespace CalamityMod
|
||||
return new ArgumentException("ERROR: The first argument to \"AddMaxStealth\" must be a Player or an int.");
|
||||
return AddMaxStealth(castPlayer(args[1]), maxStealth);
|
||||
|
||||
case "IsItemRogue":
|
||||
if (args.Length < 2)
|
||||
return new ArgumentNullException("ERROR: Must specify an Item object (or int index of an Item in the Main.item array).");
|
||||
if (!isValidItemArg(args[1]))
|
||||
return new ArgumentException("ERROR: The first argument to \"IsItemRogue\" must be an Item or an int.");
|
||||
return IsRogue(castItem(args[1]));
|
||||
|
||||
case "SetItemRogue":
|
||||
if (args.Length < 2)
|
||||
return new ArgumentNullException("ERROR: Must specify both an Item object (or int index of an Item in the Main.item array) and a bool.");
|
||||
if (args.Length < 3)
|
||||
return new ArgumentNullException("ERROR: Must specify rogue status as a bool.");
|
||||
if (!(args[2] is bool isItemRogue))
|
||||
return new ArgumentException("ERROR: The second argument to \"SetItemRogue\" must be a bool.");
|
||||
if (!isValidItemArg(args[1]))
|
||||
return new ArgumentException("ERROR: The first argument to \"SetItemRogue\" must be an Item or an int.");
|
||||
return SetRogue(castItem(args[1]), isItemRogue);
|
||||
|
||||
case "IsRogue":
|
||||
case "IsProjRogue":
|
||||
case "IsProjectileRogue":
|
||||
if (args.Length < 2)
|
||||
return new ArgumentNullException("ERROR: Must specify a Projectile object (or int index of a Projectile).");
|
||||
if (!isValidProjectileArg(args[1]))
|
||||
return new ArgumentException("ERROR: The first argument to \"IsRogue\" must be a Projectile or an int.");
|
||||
return IsRogue(castProjectile(args[1]));
|
||||
|
||||
case "SetRogue":
|
||||
case "SetProjRogue":
|
||||
case "SetProjectileRogue":
|
||||
if (args.Length < 2)
|
||||
return new ArgumentNullException("ERROR: Must specify both a Projectile object (or int index of a Projectile) and a bool.");
|
||||
if (args.Length < 3)
|
||||
return new ArgumentNullException("ERROR: Must specify rogue status as a bool.");
|
||||
if (!(args[2] is bool isRogue))
|
||||
return new ArgumentException("ERROR: The second argument to \"SetRogue\" must be a bool.");
|
||||
if (!isValidProjectileArg(args[1]))
|
||||
return new ArgumentException("ERROR: The first argument to \"SetRogue\" must be a Projectile or an int.");
|
||||
return SetRogue(castProjectile(args[1]), isRogue);
|
||||
|
||||
case "DR":
|
||||
case "DamageReduction":
|
||||
case "SetDR":
|
||||
|
||||
@@ -1858,7 +1858,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
};
|
||||
|
||||
bool allowedClass = projectile.IsSummon() || (!projectile.CountsAsClass<MeleeDamageClass>() && !projectile.CountsAsClass<RangedDamageClass>() &&
|
||||
!projectile.CountsAsClass<MagicDamageClass>() && !projectile.CountsAsClass<ThrowingDamageClass>() && !projectile.Calamity().rogue);
|
||||
!projectile.CountsAsClass<MagicDamageClass>() && !projectile.CountsAsClass<ThrowingDamageClass>());
|
||||
bool allowedDamage = allowedClass && damage <= 75; //Flat 75 regardless of difficulty.
|
||||
//Absorber on-hit effects likely won't proc this but Deific Amulet and Astral Bulwark stars will proc this.
|
||||
bool allowedBabs = Main.player[projectile.owner].Calamity().pArtifact && !Main.player[projectile.owner].Calamity().profanedCrystalBuffs;
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
float acceleration = 1.5f;
|
||||
|
||||
// Reduce acceleration if target is holding a true melee weapon
|
||||
if (player.HoldingTrueMeleeWeapon())
|
||||
if (Main.player[NPC.target].HoldingTrueMeleeWeapon())
|
||||
acceleration *= 0.5f;
|
||||
|
||||
int verticalSpeed = (int)Math.Round(MathHelper.Lerp(2f, 6.5f, 1f - totalLifeRatio));
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
int star = Projectile.NewProjectile(Projectile.GetSource_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;
|
||||
Main.projectile[star].Calamity().forceRogue = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
int proj = Projectile.NewProjectile(Projectile.GetSource_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;
|
||||
Main.projectile[proj].Calamity().forceRogue = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
int proj = Projectile.NewProjectile(Projectile.GetSource_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;
|
||||
Main.projectile[proj].Calamity().forceRogue = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
else
|
||||
proj = Projectile.NewProjectile(Projectile.GetSource_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;
|
||||
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.ID;
|
||||
@@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
// Reduce damage of projectiles if more than the cap are active
|
||||
public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
|
||||
{
|
||||
if (!Projectile.Calamity().rogue)
|
||||
if (!Projectile.CountsAsClass<ThrowingDamageClass>())
|
||||
{
|
||||
int projectileCount = Main.player[Projectile.owner].ownedProjectileCounts[Projectile.type];
|
||||
int cap = 5;
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
{
|
||||
// Keep the loop as short as possible
|
||||
if (!Main.projectile[i].active || Main.projectile[i].owner != Projectile.owner || !Main.projectile[i].Calamity().rogue || targetIndex != (int)Main.projectile[i].ai[1])
|
||||
if (!Main.projectile[i].active || Main.projectile[i].owner != Projectile.owner || !Main.projectile[i].CountsAsClass<ThrowingDamageClass>() || targetIndex != (int)Main.projectile[i].ai[1])
|
||||
continue;
|
||||
if (Main.projectile[i].ModProjectile is NiceCock)
|
||||
{
|
||||
@@ -169,7 +169,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
float angle = 0f;
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
{
|
||||
if (!Main.projectile[i].active || Main.projectile[i].owner != Projectile.owner || !Main.projectile[i].Calamity().rogue || targetIndex != (int)Main.projectile[i].ai[1])
|
||||
if (!Main.projectile[i].active || Main.projectile[i].owner != Projectile.owner || !Main.projectile[i].CountsAsClass<ThrowingDamageClass>() || targetIndex != (int)Main.projectile[i].ai[1])
|
||||
continue;
|
||||
if (Main.projectile[i].ModProjectile is NiceCock)
|
||||
{
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
!player.ActiveItem().CountsAsClass<MeleeDamageClass>() &&
|
||||
!player.ActiveItem().CountsAsClass<RangedDamageClass>() &&
|
||||
!player.ActiveItem().CountsAsClass<MagicDamageClass>() &&
|
||||
!player.ActiveItem().Calamity().rogue) ||
|
||||
!player.ActiveItem().CountsAsClass<ThrowingDamageClass>()) ||
|
||||
player.ActiveItem().hammer > 0 ||
|
||||
player.ActiveItem().pick > 0 ||
|
||||
player.ActiveItem().axe > 0)
|
||||
|
||||
@@ -391,7 +391,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
deathLaser.Calamity().forceMinion = true;
|
||||
}
|
||||
else if (player.HeldItem.Calamity().rogue)
|
||||
else if (player.HeldItem.CountsAsClass<ThrowingDamageClass>())
|
||||
{
|
||||
deathLaser.Calamity().forceRogue = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
Main.projectile[k].type == ModContent.ProjectileType<MalachiteProj>() ||
|
||||
Main.projectile[k].type == ModContent.ProjectileType<DuneHopperProjectile>())
|
||||
continue;
|
||||
if (Main.projectile[k].owner == Projectile.owner && Main.projectile[k].Calamity().rogue &&
|
||||
if (Main.projectile[k].owner == Projectile.owner && Main.projectile[k].CountsAsClass<ThrowingDamageClass>() &&
|
||||
!Main.projectile[k].Calamity().momentumCapacitatorBoost && Main.projectile[k].friendly &&
|
||||
Vector2.Distance(Main.projectile[k].Center, Projectile.Center) < Radius)
|
||||
{
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace CalamityMod.UI.CalamitasEnchants
|
||||
"CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Ephemeral",
|
||||
null,
|
||||
player => player.Calamity().dischargingItemEnchant = true,
|
||||
item => item.IsEnchantable() && item.damage > 0 && !item.CountsAsClass<SummonDamageClass>() && !item.channel && !item.Calamity().rogue),
|
||||
item => item.IsEnchantable() && item.damage > 0 && !item.CountsAsClass<SummonDamageClass>() && !item.channel && !item.CountsAsClass<ThrowingDamageClass>()),
|
||||
|
||||
new Enchantment("Hellbound", "Causes minions to be created with a 40 second timer.\nOnce it runs out, they explode violently. Minions do more damage the longer they live and idly explode as well.",
|
||||
700,
|
||||
|
||||
Reference in new issue
Block a user