This commit is contained in:
Andrew Marheine committed 2019-10-09 14:28:26 -05:00
commit 0c1930c391
288 files changed
+2711 -1155

No files matched your search

+3 -2
View File
@@ -1,13 +1,14 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.NPCs;
using CalamityMod.CalPlayer;
namespace CalamityMod.Buffs.DoTDebuffs
{
public class AbyssalFlames : ModBuff
{
public override void SetDefaults()
public static int DefenseReduction = 10;
public override void SetDefaults()
{
DisplayName.SetDefault("Abyssal Flames");
Description.SetDefault("Your soul is being consumed");
+3 -2
View File
@@ -1,13 +1,14 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.NPCs;
using CalamityMod.CalPlayer;
namespace CalamityMod.Buffs.DoTDebuffs
{
public class AstralInfectionDebuff : ModBuff
{
public override void SetDefaults()
public static int DefenseReduction = 8;
public override void SetDefaults()
{
DisplayName.SetDefault("Astral Infection");
Description.SetDefault("Your flesh is melting off");
+3 -2
View File
@@ -1,13 +1,14 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.NPCs;
using CalamityMod.CalPlayer;
namespace CalamityMod.Buffs.DoTDebuffs
{
public class GodSlayerInferno : ModBuff
{
public override void SetDefaults()
public static int DefenseReduction = 20;
public override void SetDefaults()
{
DisplayName.SetDefault("God Slayer Inferno");
Description.SetDefault("Your flesh is burning off");
+3 -2
View File
@@ -1,13 +1,14 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.NPCs;
using CalamityMod.CalPlayer;
namespace CalamityMod.Buffs.DoTDebuffs
{
public class Plague : ModBuff
{
public override void SetDefaults()
public static int DefenseReduction = 4;
public override void SetDefaults()
{
DisplayName.SetDefault("Plague");
Description.SetDefault("Rotting from the inside");
@@ -0,0 +1,25 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Buffs.StatDebuffs
{
public class AbyssalMirrorCooldown : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Abyssal Evade Cooldown");
Description.SetDefault("Your Abyssal Mirror's dodge is recharging");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
longerExpertDebuff = false;
canBeCleared = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.GetModPlayer<CalamityPlayer>(mod).abyssalMirrorCooldown = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

@@ -0,0 +1,25 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Buffs.StatDebuffs
{
public class EclipseMirrorCooldown : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Eclipse Evade Cooldown");
Description.SetDefault("Your Eclipse Mirror's dodge is recharging");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
longerExpertDebuff = false;
canBeCleared = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.GetModPlayer<CalamityPlayer>(mod).eclipseMirrorCooldown = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

+25
View File
@@ -0,0 +1,25 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Buffs.StatDebuffs
{
public class InkBombCooldown : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Ink Bomb Cooldown");
Description.SetDefault("Your Ink Bomb is recharging");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
longerExpertDebuff = false;
canBeCleared = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.GetModPlayer<CalamityPlayer>(mod).inkBombCooldown = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

+3 -1
View File
@@ -6,7 +6,9 @@ namespace CalamityMod.Buffs.StatDebuffs
{
public class WarCleave : ModBuff
{
public override void SetDefaults()
public static int DefenseReduction = 15;
public override void SetDefaults()
{
DisplayName.SetDefault("War Cleave");
Description.SetDefault("Defense and protection reduced");
+3 -2
View File
@@ -1,13 +1,14 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.NPCs;
using CalamityMod.CalPlayer;
namespace CalamityMod.Buffs.StatDebuffs
{
public class WhisperingDeath : ModBuff
{
public override void SetDefaults()
public static int DefenseReduction = 50;
public override void SetDefaults()
{
DisplayName.SetDefault("Whispering Death");
Description.SetDefault("Death approaches; defense, attack power, and life regen reduced");
+280 -39
View File
@@ -85,9 +85,11 @@ namespace CalamityMod.CalPlayer
public float stealthGenStandstill = 1f;
public float stealthGenMoving = 0f;
public float stealthGenMultiplier = 1f;
private bool stealthStrikeThisFrame = false;
private float stealthGenAcceleration = 1f;
private bool stealthStrikeThisFrame = false;
public bool stealthStrikeHalfCost = false;
public bool stealthStrikeAlwaysCrits = false;
public bool wearingRogueArmor = false;
public float throwingDamage = 1f;
public float throwingVelocity = 1f;
@@ -288,16 +290,28 @@ namespace CalamityMod.CalPlayer
public bool normalityRelocator = false;
public bool fabledTortoise = false;
public bool manaOverloader = false;
public bool royalGel = false;
public bool oldDie = false;
public bool ursaSergeant = false;
public bool sandWaifu = false;
public bool sandBoobWaifu = false;
public bool cloudWaifu = false;
public bool brimstoneWaifu = false;
public bool sirenWaifu = false;
public bool fungalClump = false;
public bool darkGodSheath = false;
public bool inkBomb = false;
public bool inkBombCooldown = false;
public bool abyssalMirror = false;
public bool abyssalMirrorCooldown = false;
public bool eclipseMirror = false;
public bool eclipseMirrorCooldown = false;
public bool featherCrown = false;
public bool moonCrown = false;
// Armor Set
public bool victideSet = false;
public bool aeroSet = false;
// Armor Set
public bool victideSet = false;
public bool aeroSet = false;
public bool statigelSet = false;
public bool tarraSet = false;
public bool tarraMelee = false;
@@ -840,6 +854,7 @@ namespace CalamityMod.CalPlayer
shadowSpeed = false;
dsSetBonus = false;
wearingRogueArmor = false;
desertScourgeLore = false;
eaterOfWorldsLore = false;
@@ -934,6 +949,7 @@ namespace CalamityMod.CalPlayer
normalityRelocator = false;
fabledTortoise = false;
manaOverloader = false;
royalGel = false;
lol = false;
raiderTalisman = false;
sGenerator = false;
@@ -945,6 +961,8 @@ namespace CalamityMod.CalPlayer
sTracers = false;
eTracers = false;
cTracers = false;
oldDie = false;
ursaSergeant = false;
daedalusReflect = false;
daedalusSplit = false;
@@ -991,7 +1009,17 @@ namespace CalamityMod.CalPlayer
weakPetrification = false;
shadowflame = false;
inkBomb = false;
inkBombCooldown = false;
darkGodSheath = false;
abyssalMirror = false;
abyssalMirrorCooldown = false;
eclipseMirror = false;
eclipseMirrorCooldown = false;
featherCrown = false;
moonCrown = false;
shadowflame = false;
wDeath = false;
lethalLavaBurn = false;
aCrunch = false;
@@ -1211,11 +1239,14 @@ namespace CalamityMod.CalPlayer
abyssalDivingSuitCooldown = false;
abyssalDivingSuitPlateHits = 0;
sirenIceCooldown = false;
#endregion
inkBombCooldown = false;
abyssalMirrorCooldown = false;
eclipseMirrorCooldown = false;
#endregion
#region Rogue
#region Rogue
// Stealth
rogueStealth = 0f;
rogueStealth = 0f;
rogueStealthMax = 0f;
throwingDamage = 1f;
@@ -3256,6 +3287,24 @@ namespace CalamityMod.CalPlayer
}
}
}
if (ursaSergeant)
{
if (player.statLife <= (int)((double)player.statLifeMax2 * 0.15))
{
player.lifeRegen += 3;
player.lifeRegenTime += 3;
}
else if (player.statLife <= (int)((double)player.statLifeMax2 * 0.25))
{
player.lifeRegen += 2;
player.lifeRegenTime += 2;
}
else if (player.statLife <= (int)((double)player.statLifeMax2 * 0.5))
{
player.lifeRegen += 1;
player.lifeRegenTime += 1;
}
}
if (invincible || lol)
{
player.thorns = 0f;
@@ -4442,6 +4491,20 @@ namespace CalamityMod.CalPlayer
{
player.lifeRegen /= 2;
}
if (royalGel)
{
player.npcTypeNoAggro[mod.NPCType("AeroSlime")] = true;
player.npcTypeNoAggro[mod.NPCType("BloomSlime")] = true;
player.npcTypeNoAggro[mod.NPCType("CharredSlime")] = true;
player.npcTypeNoAggro[mod.NPCType("CrimulanBlightSlime")] = true;
player.npcTypeNoAggro[mod.NPCType("CryoSlime")] = true;
player.npcTypeNoAggro[mod.NPCType("EbonianBlightSlime")] = true;
player.npcTypeNoAggro[mod.NPCType("IrradiatedSlime")] = true;
player.npcTypeNoAggro[mod.NPCType("PerennialSlime")] = true;
player.npcTypeNoAggro[mod.NPCType("PlaguedJungleSlime")] = true;
player.npcTypeNoAggro[mod.NPCType("AstralSlime")] = true;
player.npcTypeNoAggro[mod.NPCType("WulfrumSlime")] = true; //remove when wulfrum slime redesigned
}
#endregion
#region LimitsAndOtherShit
@@ -4602,10 +4665,48 @@ namespace CalamityMod.CalPlayer
if (player.wingTimeMax < 50000)
player.wingTimeMax = 50000;
}
#endregion
}
#endregion
public override void PostUpdateRunSpeeds()
#region Rogue Mirrors
Rectangle rectangle = new Rectangle((int)((double)player.position.X + (double)player.velocity.X * 0.5 - 4.0), (int)((double)player.position.Y + (double)player.velocity.Y * 0.5 - 4.0), player.width + 8, player.height + 8);
for (int i = 0; i < 200; i++)
{
if ((Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && !Main.npc[i].townNPC && Main.npc[i].immune[player.whoAmI] <= 0 && Main.npc[i].damage > 0))
{
NPC nPC = Main.npc[i];
Rectangle rect = nPC.getRect();
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
{
if (Main.rand.Next(0, 10) == 0)
{
AbyssMirrorEvade();
EclipseMirrorEvade();
}
break;
}
}
}
for (int i = 0; i < 1000; i++)
{
if ((Main.projectile[i].active && !Main.projectile[i].friendly && Main.projectile[i].hostile && Main.projectile[i].damage > 0))
{
Projectile proj = Main.projectile[i];
Rectangle rect = proj.getRect();
if (rectangle.Intersects(rect))
{
if (Main.rand.Next(0, 10) == 0)
{
AbyssMirrorEvade();
EclipseMirrorEvade();
}
break;
}
}
}
#endregion
}
public override void PostUpdateRunSpeeds()
{
#region SpeedBoosts
float runAccMult = 1f +
@@ -4650,6 +4751,11 @@ namespace CalamityMod.CalPlayer
runAccMult *= 0.5f;
runSpeedMult *= 0.5f;
}
if (ursaSergeant)
{
runAccMult *= 0.8f;
runSpeedMult *= 0.8f;
}
if (elysianGuard)
{
runAccMult *= 0.5f;
@@ -4683,12 +4789,61 @@ namespace CalamityMod.CalPlayer
player.accRunSpeed = player.maxRunSpeed;
}
}
#endregion
}
#endregion
#endregion
}
#region Pre Kill
public override bool PreKill(double damage, int hitDirection, bool pvp, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource)
#region Rogue Mirrors
private void AbyssMirrorEvade()
{
if (player.whoAmI == Main.myPlayer && abyssalMirror && !abyssalMirrorCooldown)
{
player.AddBuff(mod.BuffType("AbyssalMirrorCooldown"), 1200);
player.immune = true;
player.immuneTime = player.longInvince ? 100 : 60;
player.noKnockback = true;
rogueStealth += 0.5f;
for (int k = 0; k < player.hurtCooldowns.Length; k++)
{
player.hurtCooldowns[k] = player.immuneTime;
}
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaActivation"), (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y);
for (int i = 0; i < 50; i++)
{
int lumenyl = Projectile.NewProjectile(player.Center.X, player.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), mod.ProjectileType("AbyssalMirrorProjectile"), 55, 0, player.whoAmI);
Main.projectile[lumenyl].rotation = Main.rand.NextFloat(0, 360);
Main.projectile[lumenyl].frame = Main.rand.Next(0, 4);
}
}
}
private void EclipseMirrorEvade()
{
if (player.whoAmI == Main.myPlayer && eclipseMirror && !eclipseMirrorCooldown)
{
player.AddBuff(mod.BuffType("EclipseMirrorCooldown"), 1200);
player.immune = true;
player.immuneTime = player.longInvince ? 100 : 60;
player.noKnockback = true;
rogueStealth = rogueStealthMax;
for (int k = 0; k < player.hurtCooldowns.Length; k++)
{
player.hurtCooldowns[k] = player.immuneTime;
}
Main.PlaySound(2, (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y, 68);
int eclipseBurst = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, mod.ProjectileType("EclipseMirrorBurst"), 8000, 0, player.whoAmI);
}
}
#endregion
#endregion
#region Pre Kill
public override bool PreKill(double damage, int hitDirection, bool pvp, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource)
{
if (invincible && player.inventory[player.selectedItem].type != mod.ItemType("ColdheartIcicle"))
{
@@ -5803,9 +5958,20 @@ namespace CalamityMod.CalPlayer
}
}
damage = (int)((double)damage * damageMult);
#endregion
if (yharonLore)
if (oldDie)
{
float diceMult = Main.rand.NextFloat(0.8824f, 1.1565f);
if (item.GetGlobalItem<CalamityGlobalItem>(mod).rogue || wearingRogueArmor)
{
float roll2 = Main.rand.NextFloat(0.8824f, 1.1565f);
diceMult = roll2 > diceMult ? roll2 : diceMult;
}
damage = (int)(damage * diceMult);
}
#endregion
if (yharonLore)
damage = (int)((double)damage * 0.75);
if ((target.damage > 5 || target.boss) && player.whoAmI == Main.myPlayer && !target.SpawnedFromStatue)
@@ -6061,10 +6227,21 @@ namespace CalamityMod.CalPlayer
}
}
damage = (int)((double)damage * damageMult);
#endregion
#region AdditiveBoosts
if (theBee && !isSummon)
if (oldDie)
{
float diceMult = Main.rand.NextFloat(0.8824f, 1.1565f);
if (proj.GetGlobalProjectile<CalamityGlobalProjectile>(mod).rogue || wearingRogueArmor)
{
float roll2 = Main.rand.NextFloat(0.8824f, 1.1565f);
diceMult = roll2 > diceMult ? roll2 : diceMult;
}
damage = (int)(damage * diceMult);
}
#endregion
#region AdditiveBoosts
if (theBee && !isSummon)
{
if (hasClassType)
damage += theBeeDamage;
@@ -6633,6 +6810,10 @@ namespace CalamityMod.CalPlayer
#region Fishing
public override void CatchFish(Item fishingRod, Item bait, int power, int liquidType, int poolSize, int worldLayer, int questFish, ref int caughtType, ref bool junk)
{
if (ZoneAstral && Main.rand.NextBool(25))
{
caughtType = mod.ItemType("UrsaSergeant");
}
Point point = player.Center.ToTileCoordinates();
bool abyssPosX = false;
if (CalamityWorld.abyssSide)
@@ -7284,8 +7465,21 @@ namespace CalamityMod.CalPlayer
}
}
}
}
if (ataxiaBlaze && Main.rand.NextBool(5))
}
if (inkBomb)
{
if (player.whoAmI == Main.myPlayer && !inkBombCooldown)
{
player.AddBuff(mod.BuffType("InkBombCooldown"), 1200);
rogueStealth += 0.5f;
for (int i = 0; i < 5; i++)
{
Main.PlaySound(2, (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y, 61);
int inkBomb = Projectile.NewProjectile(player.Center.X, player.Center.Y, Main.rand.NextFloat(-3f, 3f), Main.rand.NextFloat(-0f, -4f), mod.ProjectileType("InkBombProjectile"), 0, 0, player.whoAmI);
}
}
}
if (ataxiaBlaze && Main.rand.NextBool(5))
{
if (damage > 0)
{
@@ -9252,22 +9446,45 @@ namespace CalamityMod.CalPlayer
stealthGenMoving += 0.2f;
else
stealthGenMoving += 0.1f;
}
}
//
// Other code which affects stealth generation goes here.
// Increase stealthGenStandstill (default 1.0) to increase basic "stand still" stealth generation.
// Incrase stealthGenMoving (default 0.0) to increase stealth generation while moving.
// Increase stealthGenMultiplier (default 1.0) to provide a global % boost to all stealth generation.
//
bool standstill = Math.Abs(player.velocity.X) < 0.1f && Math.Abs(player.velocity.Y) < 0.1f && !player.mount.Active;
// You get 100% stealth regen while standing still and not on a mount. Otherwise, you get your stealth regeneration while moving.
bool standstill = Math.Abs(player.velocity.X) < 0.1f && Math.Abs(player.velocity.Y) < 0.1f && !player.mount.Active;
if (standstill)
return stealthGenStandstill * stealthGenMultiplier;
else
return stealthGenMoving * stealthGenMultiplier;
}
// Stealth gen acceleration
float stealthScaleCap = eclipseMirror ? 40f : 25f;
if (standstill && (eclipseMirror || darkGodSheath))
{
if (eclipseMirror)
stealthGenAcceleration = stealthGenAcceleration < stealthScaleCap ? stealthGenAcceleration * 1.2f : stealthScaleCap;
if (darkGodSheath)
stealthGenAcceleration = stealthGenAcceleration < stealthScaleCap ? stealthGenAcceleration + 0.15f : stealthScaleCap;
}
else
{
stealthGenAcceleration = 1f;
}
//
// Other code which affects stealth generation goes here.
// Increase stealthGenStandstill (default 1.0) to increase basic "stand still" stealth generation.
// Incrase stealthGenMoving (default 0.0) to increase stealth generation while moving.
// Increase stealthGenMultiplier (default 1.0) to provide a global % boost to all stealth generation.
//
// You get 100% stealth regen while standing still and not on a mount. Otherwise, you get your stealth regeneration while moving.
if (standstill)
{
if (eclipseMirror || darkGodSheath)
return stealthGenStandstill * stealthGenMultiplier * stealthGenAcceleration;
else
return stealthGenStandstill * stealthGenMultiplier;
}
else
{
return stealthGenMoving * stealthGenMultiplier;
}
}
public bool StealthStrikeAvailable()
{
@@ -10418,6 +10635,30 @@ namespace CalamityMod.CalPlayer
}
return meleeSpeedBonus;
}
#endregion
}
#endregion
#region Misc Stuff
/// <summary>
/// Returns the range at which an abyss enemy can detect the player
/// </summary>
/// <param name="defaultRange">The default detection range</param>
/// <param name="anechoicRange">The detection range set by the player having anechoic plating/coating</param>
/// <returns></returns>
public float GetAbyssAggro(float defaultRange, float anechoicRange)
{
/* ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating ||
Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 200f : 600f) *
(Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f) *
(Main.player[npc.target].GetCalamityPlayer().abyssalMirror ? 0.7f : 1f) *
(Main.player[npc.target].GetCalamityPlayer().eclipseMirror ? 0.3f : 1f) */
float range = anechoicPlating || anechoicCoating ? anechoicRange : defaultRange;
range *= fishAlert ? 3f : 1f;
range *= abyssalMirror ? 0.65f : 1f;
range *= eclipseMirror ? 0.3f : 1f;
return range;
}
#endregion
}
}
+173 -14
View File
@@ -56,8 +56,11 @@ namespace CalamityMod
public static Texture2D AstralSky;
public static Effect CustomShader;
// Lists
public static IList<string> donatorList;
// DR data structure
public static SortedDictionary<int, float> DRValues;
// Lists
public static IList<string> donatorList;
public static List<int> rangedProjectileExceptionList;
public static List<int> projectileMinionList;
public static List<int> enemyImmunityList;
@@ -87,6 +90,7 @@ namespace CalamityMod
public static List<int> revengeanceEnemyBuffList;
public static List<int> revengeanceProjectileBuffList;
public static List<int> revengeanceLifeStealExceptionList;
public static List<int> movementImpairImmuneList;
public static List<int> trapProjectileList;
public static List<int> scopedWeaponList;
public static List<int> trueMeleeBoostExceptionList;
@@ -138,6 +142,8 @@ namespace CalamityMod
Config.Load();
SetupLists();
SetupVanillaDR();
SetupThoriumBossDR(ModLoader.GetMod("ThoriumMod"));
CalamityLocalization.AddLocalizations();
}
@@ -217,8 +223,10 @@ namespace CalamityMod
AstralCactusGlowTexture = null;
AstralSky = null;
donatorList = null;
DRValues?.Clear();
DRValues = null;
donatorList = null;
rangedProjectileExceptionList = null;
projectileMinionList = null;
enemyImmunityList = null;
@@ -247,6 +255,7 @@ namespace CalamityMod
revengeanceEnemyBuffList = null;
revengeanceProjectileBuffList = null;
revengeanceLifeStealExceptionList = null;
movementImpairImmuneList = null;
trapProjectileList = null;
scopedWeaponList = null;
trueMeleeBoostExceptionList = null;
@@ -1469,6 +1478,10 @@ namespace CalamityMod
NPCID.MoonLordCore
};
movementImpairImmuneList = new List<int>()
{
NPCID.QueenBee,
};
trapProjectileList = new List<int>()
{
@@ -2041,17 +2054,163 @@ namespace CalamityMod
}
}
}
#endregion
#endregion
#region Music
public override void UpdateMusic(ref int music, ref MusicPriority priority)
#region Vanilla Enemy DR
private void SetupVanillaDR()
{
DRValues = new SortedDictionary<int, float> {
{ NPCID.AngryBonesBig, 0.2f },
{ NPCID.AngryBonesBigHelmet, 0.2f },
{ NPCID.AngryBonesBigMuscle, 0.2f },
{ NPCID.AnomuraFungus, 0.1f },
{ NPCID.Antlion, 0.1f },
{ NPCID.Arapaima, 0.1f },
{ NPCID.ArmoredSkeleton, 0.15f },
{ NPCID.ArmoredViking, 0.1f },
{ NPCID.BigMimicCorruption, 0.3f },
{ NPCID.BigMimicCrimson, 0.3f },
{ NPCID.BigMimicHallow, 0.3f },
{ NPCID.BigMimicJungle, 0.3f }, // unused vanilla enemy
{ NPCID.BlueArmoredBones, 0.2f },
{ NPCID.BlueArmoredBonesMace, 0.2f },
{ NPCID.BlueArmoredBonesNoPants, 0.2f },
{ NPCID.BlueArmoredBonesSword, 0.2f },
{ NPCID.BoneLee, 0.2f },
{ NPCID.Crab, 0.05f },
{ NPCID.Crawdad, 0.2f },
{ NPCID.Crawdad2, 0.2f },
{ NPCID.CultistBoss, 0.05f },
{ NPCID.DD2Betsy, 0.1f },
{ NPCID.DD2OgreT2, 0.1f },
{ NPCID.DD2OgreT3, 0.15f },
{ NPCID.DeadlySphere, 0.4f },
{ NPCID.DiabolistRed, 0.2f },
{ NPCID.DiabolistWhite, 0.2f },
{ NPCID.DungeonGuardian, 0.999999f },
{ NPCID.DungeonSpirit, 0.2f },
{ NPCID.ElfCopter, 0.15f },
{ NPCID.Everscream, 0.1f },
{ NPCID.FlyingAntlion, 0.05f },
{ NPCID.GiantCursedSkull, 0.2f },
{ NPCID.GiantShelly, 0.2f },
{ NPCID.GiantShelly2, 0.2f },
{ NPCID.GiantTortoise, 0.35f },
{ NPCID.Golem, 0.25f },
{ NPCID.GolemFistLeft, 0.25f },
{ NPCID.GolemFistRight, 0.25f },
{ NPCID.GolemHead, 0.25f },
{ NPCID.GolemHeadFree, 0.25f },
{ NPCID.GraniteFlyer, 0.1f },
{ NPCID.GraniteGolem, 0.15f },
{ NPCID.GreekSkeleton, 0.1f },
{ NPCID.HellArmoredBones, 0.2f },
{ NPCID.HellArmoredBonesMace, 0.2f },
{ NPCID.HellArmoredBonesSpikeShield, 0.2f },
{ NPCID.HellArmoredBonesSword, 0.2f },
{ NPCID.IceGolem, 0.1f },
{ NPCID.IceQueen, 0.1f },
{ NPCID.IceTortoise, 0.35f },
{ NPCID.HeadlessHorseman, 0.05f },
{ NPCID.MartianDrone, 0.2f },
{ NPCID.MartianSaucer, 0.2f },
{ NPCID.MartianSaucerCannon, 0.2f },
{ NPCID.MartianSaucerCore, 0.2f },
{ NPCID.MartianSaucerTurret, 0.2f },
{ NPCID.MartianTurret, 0.2f },
{ NPCID.MartianWalker, 0.35f },
{ NPCID.Mimic, 0.3f },
{ NPCID.MoonLordCore, 0.05f },
{ NPCID.MoonLordFreeEye, 0.05f },
{ NPCID.MoonLordHand, 0.05f },
{ NPCID.MoonLordHead, 0.05f },
{ NPCID.Mothron, 0.2f },
{ NPCID.MothronEgg, 0.5f },
{ NPCID.MourningWood, 0.1f },
{ NPCID.Necromancer, 0.2f },
{ NPCID.NecromancerArmored, 0.2f },
{ NPCID.Paladin, 0.45f },
{ NPCID.PirateCaptain, 0.05f },
{ NPCID.PirateShipCannon, 0.15f },
{ NPCID.PossessedArmor, 0.25f },
{ NPCID.PresentMimic, 0.3f },
{ NPCID.PrimeCannon, 0.2f },
{ NPCID.PrimeLaser, 0.2f },
{ NPCID.PrimeSaw, 0.25f },
{ NPCID.PrimeVice, 0.25f },
{ NPCID.Probe, 0.25f },
{ NPCID.Pumpking, 0.1f },
{ NPCID.QueenBee, 0.05f },
{ NPCID.RaggedCaster, 0.2f },
{ NPCID.RaggedCasterOpenCoat, 0.2f },
{ NPCID.Retinazer, 0.2f },
{ NPCID.RustyArmoredBonesAxe, 0.2f },
{ NPCID.RustyArmoredBonesFlail, 0.2f },
{ NPCID.RustyArmoredBonesSword, 0.2f },
{ NPCID.RustyArmoredBonesSwordNoArmor, 0.2f },
{ NPCID.SandElemental, 0.1f },
{ NPCID.SantaNK1, 0.35f },
{ NPCID.SeaSnail, 0.05f },
{ NPCID.SkeletonArcher, 0.1f },
{ NPCID.SkeletonCommando, 0.2f },
{ NPCID.SkeletonSniper, 0.2f },
{ NPCID.SkeletronHand, 0.05f },
{ NPCID.SkeletronHead, 0.05f },
{ NPCID.SkeletronPrime, 0.25f },
{ NPCID.Spazmatism, 0.2f },
{ NPCID.TacticalSkeleton, 0.2f },
{ NPCID.TheDestroyer, 0.1f },
{ NPCID.TheDestroyerBody, 0.2f },
{ NPCID.TheDestroyerTail, 0.35f },
{ NPCID.TheHungry, 0.1f },
{ NPCID.UndeadViking, 0.1f },
{ NPCID.WalkingAntlion, 0.1f },
{ NPCID.WallofFlesh, 0.5f },
};
}
#endregion
#region Thorium Boss DR
private void SetupThoriumBossDR(Mod thorium)
{
if (thorium is null || !Config.RevengeanceAndDeathThoriumBossBuff)
return;
void ThoriumDR(string npcName, float dr) { DRValues.Add(thorium.NPCType(npcName), dr); }
ThoriumDR("Viscount", 0.05f);
ThoriumDR("BoreanStrider", 0.05f);
ThoriumDR("FallenDeathBeholder", 0.05f);
ThoriumDR("Lich", 0.05f);
ThoriumDR("AbyssionReleased", 0.05f);
ThoriumDR("CryoCore", 0.1f);
ThoriumDR("BioCore", 0.1f);
ThoriumDR("PyroCore", 0.1f);
ThoriumDR("Aquaius", 0.1f);
ThoriumDR("ThePrimeScouter", 0.2f);
ThoriumDR("FallenDeathBeholder2", 0.2f);
ThoriumDR("SlagFury", 0.2f);
ThoriumDR("Aquaius2", 0.2f);
ThoriumDR("GraniteEnergyStorm", 0.2f);
ThoriumDR("TheBuriedWarrior", 0.25f);
ThoriumDR("TheBuriedWarrior1", 0.25f);
ThoriumDR("TheBuriedWarrior2", 0.25f);
ThoriumDR("LichHeadless", 0.25f);
ThoriumDR("AbyssionCracked", 0.25f);
ThoriumDR("Omnicide", 0.3f);
ThoriumDR("Abyssion", 0.35f);
}
#endregion
#region Music
public override void UpdateMusic(ref int music, ref MusicPriority priority)
{
Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic");
if (Main.musicVolume != 0)
{
if (Main.myPlayer != -1 && !Main.gameMenu && Main.LocalPlayer.active)
{
if (Main.LocalPlayer.GetModPlayer<CalamityPlayer>(this).ZoneCalamity)
Player p = Main.LocalPlayer;
if (p.InCalamity())
{
if (!CalamityPlayer.areThereAnyDamnBosses)
{
@@ -2062,7 +2221,7 @@ namespace CalamityMod
priority = MusicPriority.Environment;
}
}
if (Main.LocalPlayer.GetModPlayer<CalamityPlayer>(this).ZoneSunkenSea)
if (p.InSunkenSea())
{
if (!CalamityPlayer.areThereAnyDamnBosses)
{
@@ -2073,7 +2232,7 @@ namespace CalamityMod
priority = MusicPriority.Environment;
}
}
if (Main.LocalPlayer.GetModPlayer<CalamityPlayer>(this).ZoneAstral)
if (p.InAstral())
{
if (!CalamityPlayer.areThereAnyDamnBosses)
{
@@ -2084,7 +2243,7 @@ namespace CalamityMod
priority = MusicPriority.Environment;
}
}
if (Main.LocalPlayer.GetModPlayer<CalamityPlayer>(this).ZoneAbyssLayer1 || Main.LocalPlayer.GetModPlayer<CalamityPlayer>(this).ZoneAbyssLayer2)
if (p.InAbyss(1) || p.InAbyss(2))
{
if (!CalamityPlayer.areThereAnyDamnBosses)
{
@@ -2095,7 +2254,7 @@ namespace CalamityMod
priority = MusicPriority.BiomeHigh;
}
}
if (Main.LocalPlayer.GetModPlayer<CalamityPlayer>(this).ZoneAbyssLayer3)
if (p.InAbyss(3))
{
if (!CalamityPlayer.areThereAnyDamnBosses)
{
@@ -2106,7 +2265,7 @@ namespace CalamityMod
priority = MusicPriority.BiomeHigh;
}
}
if (Main.LocalPlayer.GetModPlayer<CalamityPlayer>(this).ZoneAbyssLayer4)
if (p.InAbyss(4))
{
if (!CalamityPlayer.areThereAnyDamnBosses)
{
@@ -2117,7 +2276,7 @@ namespace CalamityMod
priority = MusicPriority.BiomeHigh;
}
}
if (Main.LocalPlayer.GetModPlayer<CalamityPlayer>(this).ZoneSulphur)
if (p.InSulphur())
{
if (!CalamityPlayer.areThereAnyDamnBosses)
{
@@ -2152,7 +2311,7 @@ namespace CalamityMod
public override object Call(params object[] args)
{
return ModSupport.Call(args);
return ModCalls.Call(args);
}
#endregion
+52
View File
@@ -0,0 +1,52 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Items.Accessories
{
public class AbyssalMirror : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Abyssal Mirror");
Tooltip.SetDefault("Light does not reach the depths of the ocean\n" +
"Significantly reduces enemy aggression, even in the abyss\n" +
"15% increased stealth regeneration while moving\n" +
"Grants a slight chance to evade attacks, releasing a cloud of lumenyl fluid which damages and stuns nearby enemies\n" +
"Evading an attack grants a lot of stealth\n" +
"This evade has a 20s cooldown before it can occur again");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.value = Item.buyPrice(0, 6, 0, 0);
item.rare = 8;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.GetModPlayer<CalamityPlayer>(mod);
modPlayer.stealthGenMoving += 0.15f;
modPlayer.abyssalMirror = true;
player.aggro -= 450;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.GetItem("MirageMirror"));
recipe.AddIngredient(mod.GetItem("InkBomb"));
recipe.AddIngredient(ItemID.SpectreBar, 8);
recipe.AddIngredient(ItemID.BlackBelt);
recipe.AddIngredient(mod.GetItem("DepthCells"), 5);
recipe.AddIngredient(mod.GetItem("Lumenite"), 5);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

+52
View File
@@ -0,0 +1,52 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Items.Accessories
{
public class DarkGodsSheath : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Dark God's Sheath");
Tooltip.SetDefault("+100 maximum stealth\n" +
"Stealth regeneration rate increases while standing still\n" +
"Stealth strikes have a 100% critical hit chance\n" +
"Stealth strikes only expend 50% of your max stealth\n" +
"6% increased rogue damage, and 6% increased rogue crit chance");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.value = Item.buyPrice(0, 26, 0, 0);
item.rare = 9;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.GetModPlayer<CalamityPlayer>(mod);
modPlayer.stealthStrikeAlwaysCrits = true;
modPlayer.stealthStrikeHalfCost = true;
modPlayer.rogueStealthMax += 1;
modPlayer.darkGodSheath = true;
modPlayer.throwingCrit += 6;
modPlayer.throwingDamage += 0.06f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.ItemType("SilencingSheath"));
recipe.AddIngredient(mod.ItemType("RuinMedallion"));
recipe.AddIngredient(mod.ItemType("MeldiateBar"), 5);
recipe.AddIngredient(mod.ItemType("Stardust"), 25);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

+3 -1
View File
@@ -12,7 +12,8 @@ namespace CalamityMod.Items.Accessories
DisplayName.SetDefault("Deific Amulet");
Tooltip.SetDefault("Taking damage makes you move very fast for a short time\n" +
"Increases armor penetration by 10 and immune time after being struck\n" +
"Provides light underwater and causes stars to fall when damaged\n" +
"Provides light underwater and provides a small amount of light in the abyss\n" +
"Causes stars to fall when damaged\n" +
"Reduces the cooldown of healing potions");
}
@@ -29,6 +30,7 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.GetCalamityPlayer();
modPlayer.dAmulet = true;
modPlayer.jellyfishNecklace = true;
}
public override void AddRecipes()
+60
View File
@@ -0,0 +1,60 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Items.Accessories
{
public class EclipseMirror : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Eclipse Mirror");
Tooltip.SetDefault("Its reflection shows naught but darkness\n" +
"+100 maximum stealth\n" +
"8% increased rogue damage, and 8% increased rogue crit chance\n" +
"Vastly reduces enemy aggression, even in the abyss\n" +
"20% increased stealth regeneration while moving\n" +
"Stealth regeneration rate exponentially increases while standing still\n" +
"Stealth strikes have a 100% critical hit chance\n" +
"Stealth strikes only expend 50% of your max stealth\n" +
"Grants a small chance to evade attacks in a blast of darksun light, which inflicts extreme damage in a wide area\n" +
"Evading an attack grants full stealth\n" +
"This evade has a 20s cooldown before it can occur again");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.value = Item.buyPrice(0, 22, 0, 0);
item.GetGlobalItem<CalamityGlobalItem>(mod).postMoonLordRarity = 15;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.GetModPlayer<CalamityPlayer>(mod);
modPlayer.stealthGenMoving += 0.2f;
modPlayer.rogueStealthMax += 1;
modPlayer.eclipseMirror = true;
modPlayer.stealthStrikeAlwaysCrits = true;
modPlayer.stealthStrikeHalfCost = true;
modPlayer.throwingCrit += 8;
modPlayer.throwingDamage += 0.08f;
player.aggro -= 700;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.GetItem("AbyssalMirror"));
recipe.AddIngredient(mod.GetItem("DarkGodsSheath"));
recipe.AddIngredient(mod.GetItem("DarksunFragment"), 10);
recipe.AddIngredient(mod.GetItem("NightmareFuel"), 5);
recipe.AddIngredient(mod.GetItem("EndothermicEnergy"), 5);
recipe.AddTile(mod.GetTile("DraedonsForge"));
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

+51
View File
@@ -0,0 +1,51 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Items.Accessories
{
public class FeatherCrown : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Feather Crown");
Tooltip.SetDefault("15% increased rogue projectile velocity\n" +
"Stealth strikes cause feathers to fall from the sky on enemy hits");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.value = Item.buyPrice(0, 0, 80, 0);
item.rare = 4;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.GetModPlayer<CalamityPlayer>(mod);
modPlayer.throwingVelocity += 0.15f;
modPlayer.featherCrown = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.GoldCrown);
recipe.AddIngredient(mod.ItemType("AerialiteBar"), 6);
recipe.AddIngredient(ItemID.Feather, 8);
recipe.AddTile(TileID.SkyMill);
recipe.SetResult(this);
recipe.AddRecipe();
recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.PlatinumCrown);
recipe.AddIngredient(mod.ItemType("AerialiteBar"), 6);
recipe.AddIngredient(ItemID.Feather, 8);
recipe.AddTile(TileID.SkyMill);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+36
View File
@@ -0,0 +1,36 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Items.Accessories
{
public class InkBomb : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ink Bomb");
Tooltip.SetDefault("Throws several ink bombs when hit that explode in a confusing cloud of ink\n" +
"Gain a lot of stealth when struck\n" +
"This effect has a 20s cooldown before it can occur again");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.value = Item.buyPrice(0, 3, 0, 0);
item.rare = 3;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.GetModPlayer<CalamityPlayer>(mod);
modPlayer.inkBomb = true;
}
public override void AddRecipes()
{
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

+53
View File
@@ -0,0 +1,53 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Items.Accessories
{
public class MirageMirror : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Mirage Mirror");
Tooltip.SetDefault("Bend light around you\n" +
"Reduces enemy aggression outside of the abyss\n" +
"10% increased stealth regeneration while moving");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.value = Item.buyPrice(0, 2, 0, 0);
item.rare = 2;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.GetModPlayer<CalamityPlayer>(mod);
modPlayer.stealthGenMoving += 0.1f;
player.aggro -= 200;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.MagicMirror);
recipe.AddIngredient(ItemID.BlackLens);
recipe.AddIngredient(ItemID.Bone, 50);
recipe.AddTile(TileID.TinkerersWorkbench);
recipe.SetResult(this);
recipe.AddRecipe();
recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.IceMirror);
recipe.AddIngredient(ItemID.BlackLens);
recipe.AddIngredient(ItemID.Bone, 50);
recipe.AddTile(TileID.TinkerersWorkbench);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

+45
View File
@@ -0,0 +1,45 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Items.Accessories
{
public class MoonstoneCrown : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Moonstone Crown");
Tooltip.SetDefault("15% increased rogue projectile velocity\n" +
"Stealth strikes summon lunar flares on enemy hits\n" +
"Rogue projectiles very occasionally summon moon sigils behind them");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.value = Item.buyPrice(0, 18, 0, 0);
item.GetGlobalItem<CalamityGlobalItem>(mod).postMoonLordRarity = 12;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.GetModPlayer<CalamityPlayer>(mod);
modPlayer.throwingVelocity += 0.15f;
modPlayer.moonCrown = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.ItemType("FeatherCrown"));
recipe.AddIngredient(ItemID.LunarBar, 5);
recipe.AddIngredient(mod.ItemType("GalacticaSingularity"), 5);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+33
View File
@@ -0,0 +1,33 @@
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Items.Accessories
{
public class OldDie : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Old Die");
Tooltip.SetDefault("Increases randomness of attack damage \n" +
"'Lucky for you, the curse doesn't affect you.Mostly.'");
}
public override void SetDefaults()
{
item.width = 24;
item.height = 26;
item.rare = 3;
item.value = Item.buyPrice(0, 40, 0, 0);
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.GetCalamityPlayer();
modPlayer.oldDie = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

+3 -1
View File
@@ -11,7 +11,8 @@ namespace CalamityMod.Items.Accessories
DisplayName.SetDefault("Rampart of Deities");
Tooltip.SetDefault("Taking damage makes you move very fast for a short time\n" +
"Increases armor penetration by 20 and immune time after being struck\n" +
"Provides light underwater and causes stars to fall when damaged\n" +
"Provides light underwater and provides a small amount of light in the abyss\n" +
"Causes stars to fall when damaged\n" +
"Absorbs 25% of damage done to players on your team\n" +
"Only active above 25% life\n" +
"Grants immunity to knockback and reduces the cooldown of healing potions\n" +
@@ -34,6 +35,7 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.GetCalamityPlayer();
modPlayer.dAmulet = true;
modPlayer.rampartOfDeities = true;
modPlayer.jellyfishNecklace = true;
}
public override void AddRecipes()
+45
View File
@@ -0,0 +1,45 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Items.Accessories
{
public class RuinMedallion : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ruin Medallion");
Tooltip.SetDefault("Stealth strikes only expend 50% of your max stealth\n" +
"6% increased rogue damage, and 6% increased rogue crit chance");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.value = Item.buyPrice(0, 13, 0, 0);
item.rare = 6;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.GetModPlayer<CalamityPlayer>(mod);
modPlayer.stealthStrikeHalfCost = true;
modPlayer.throwingCrit += 6;
modPlayer.throwingDamage += 0.06f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.ItemType("CoinofDeceit"));
recipe.AddIngredient(mod.ItemType("UnholyCore"), 4);
recipe.AddIngredient(mod.ItemType("EssenceofChaos"), 2);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

+52
View File
@@ -0,0 +1,52 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Items.Accessories
{
public class SilencingSheath : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Silencing Sheath");
Tooltip.SetDefault("+50 maximum stealth\n" +
"10% increased stealth regeneration while standing still");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.value = Item.buyPrice(0, 2, 0, 0);
item.rare = 2;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.GetModPlayer<CalamityPlayer>(mod);
modPlayer.rogueStealthMax += 0.5f;
modPlayer.stealthGenStandstill += 0.1f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DemoniteBar, 8);
recipe.AddIngredient(ItemID.Silk, 10);
recipe.AddIngredient(ItemID.ShadowScale, 3);
recipe.AddTile(TileID.TinkerersWorkbench);
recipe.SetResult(this);
recipe.AddRecipe();
recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.CrimtaneBar, 8);
recipe.AddIngredient(ItemID.Silk, 10);
recipe.AddIngredient(ItemID.TissueSample, 3);
recipe.AddTile(TileID.TinkerersWorkbench);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

+36
View File
@@ -0,0 +1,36 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Items.Accessories
{
public class UrsaSergeant : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ursa Sergeant");
Tooltip.SetDefault("+20 defense but 20% reduced movement speed\n" +
"Immune to Astral Infection and Feral Bite\n" +
"Increased regeneration at lower health");
}
public override void SetDefaults()
{
item.width = 36;
item.height = 26;
item.value = Item.buyPrice(0, 24, 0, 0);
item.rare = 8;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.GetCalamityPlayer();
modPlayer.ursaSergeant = true;
player.statDefense += 20;
player.buffImmune[mod.BuffType("AstralInfectionDebuff")] = true;
player.buffImmune[148] = true; //Feral Bite
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 776 B

+1
View File
@@ -87,6 +87,7 @@ namespace CalamityMod.Items.Accessories.Wings
}
}
player.wingTimeMax = 80;
player.noFallDmg = true;
}
public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
@@ -60,6 +60,7 @@ namespace CalamityMod.Items.Accessories.Wings
player.fireWalk = true;
player.lavaMax += 240;
player.wingTimeMax = 280;
player.noFallDmg = true;
modPlayer.IBoots = !hideVisual;
modPlayer.elysianFire = !hideVisual;
modPlayer.cTracers = true;
@@ -49,6 +49,7 @@ namespace CalamityMod.Items.Accessories.Wings
Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player);
}
player.wingTimeMax = 180;
player.noFallDmg = true;
}
public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
+1
View File
@@ -46,6 +46,7 @@ namespace CalamityMod.Items.Accessories.Wings
Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player);
}
player.wingTimeMax = 361;
player.noFallDmg = true;
}
public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
@@ -60,6 +60,7 @@ namespace CalamityMod.Items.Accessories.Wings
player.fireWalk = true;
player.lavaMax += 240;
player.wingTimeMax = 160;
player.noFallDmg = true;
modPlayer.IBoots = !hideVisual;
modPlayer.elysianFire = !hideVisual;
modPlayer.eTracers = true;
+1
View File
@@ -62,6 +62,7 @@ namespace CalamityMod.Items.Accessories.Wings
}
}
player.wingTimeMax = 120;
player.noFallDmg = true;
}
public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
+1
View File
@@ -60,6 +60,7 @@ namespace CalamityMod.Items.Accessories.Wings
player.fireWalk = true;
player.lavaMax += 240;
player.wingTimeMax = 120;
player.noFallDmg = true;
modPlayer.IBoots = !hideVisual;
modPlayer.sTracers = true;
}
+1
View File
@@ -28,6 +28,7 @@ namespace CalamityMod.Items.Accessories.Wings
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.wingTimeMax = 60;
player.noFallDmg = true;
}
public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
@@ -49,6 +49,7 @@ namespace CalamityMod.Items.Accessories.Wings
Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player);
}
player.wingTimeMax = 150;
player.noFallDmg = true;
}
public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
+1
View File
@@ -60,6 +60,7 @@ namespace CalamityMod.Items.Accessories.Wings
Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player);
}
player.wingTimeMax = 210;
player.noFallDmg = true;
}
public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
+1
View File
@@ -49,6 +49,7 @@ namespace CalamityMod.Items.Accessories.Wings
Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player);
}
player.wingTimeMax = 180;
player.noFallDmg = true;
}
public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
+1
View File
@@ -54,6 +54,7 @@ namespace CalamityMod.Items.Armor
player.noFallDmg = true;
player.moveSpeed += 0.05f;
player.GetCalamityPlayer().throwingCrit += 5;
player.GetCalamityPlayer().wearingRogueArmor = true;
}
public override void UpdateEquip(Player player)
+2 -1
View File
@@ -44,7 +44,8 @@ namespace CalamityMod.Items.Armor
player.moveSpeed += 0.25f;
player.allDamage += 0.28f;
modPlayer.AllCritBoost(21);
}
player.GetCalamityPlayer().wearingRogueArmor = true;
}
public override void UpdateEquip(Player player)
{
+1
View File
@@ -50,6 +50,7 @@ namespace CalamityMod.Items.Armor
modPlayer.ataxiaVolley = true;
modPlayer.rogueStealthMax = 1.2f;
player.GetCalamityPlayer().throwingDamage += 0.05f;
player.GetCalamityPlayer().wearingRogueArmor = true;
}
public override void UpdateEquip(Player player)
+1
View File
@@ -54,6 +54,7 @@ namespace CalamityMod.Items.Armor
modPlayer.silvaThrowing = true;
modPlayer.auricSet = true;
modPlayer.rogueStealthMax = 1.6f;
modPlayer.wearingRogueArmor = true;
player.thorns += 3f;
player.lavaMax += 240;
player.ignoreWater = true;
+2 -1
View File
@@ -40,7 +40,7 @@ namespace CalamityMod.Items.Armor
player.setBonus = "Summoner Tarragon, Bloodflare, God Slayer, and Silva armor effects\n" +
"All projectiles spawn healing auric orbs on enemy hits\n" +
"Max run speed and acceleration boosted by 10%\n" +
"120% increased minion damage";
"+1 max minion and 120% increased minion damage";
CalamityPlayer modPlayer = player.GetCalamityPlayer();
modPlayer.tarraSet = true;
modPlayer.tarraSummon = true;
@@ -56,6 +56,7 @@ namespace CalamityMod.Items.Armor
player.ignoreWater = true;
player.crimsonRegen = true;
player.minionDamage += 1.2f;
player.maxMinions++;
if (player.lavaWet)
{
player.statDefense += 30;
+1
View File
@@ -41,6 +41,7 @@ namespace CalamityMod.Items.Armor
modPlayer.bloodflareSet = true;
modPlayer.bloodflareThrowing = true;
modPlayer.rogueStealthMax = 1.35f;
modPlayer.wearingRogueArmor = true;
player.setBonus = "Greatly increases life regen\n" +
"Enemies below 50% life have a chance to drop hearts when struck\n" +
"Enemies above 50% life have a chance to drop mana stars when struck\n" +
+1
View File
@@ -53,6 +53,7 @@ namespace CalamityMod.Items.Armor
modPlayer.daedalusSplit = true;
modPlayer.rogueStealthMax = 1.1f;
player.GetCalamityPlayer().throwingDamage += 0.05f;
player.GetCalamityPlayer().wearingRogueArmor = true;
}
public override void UpdateEquip(Player player)
+1
View File
@@ -43,6 +43,7 @@ namespace CalamityMod.Items.Armor
"This makes them do 25% more damage but they also take 125% more damage";
CalamityPlayer modPlayer = player.GetCalamityPlayer();
modPlayer.dsSetBonus = true;
modPlayer.wearingRogueArmor = true;
if (player.whoAmI == Main.myPlayer && !modPlayer.chibii)
{
modPlayer.redDevil = true;
+1
View File
@@ -39,6 +39,7 @@ namespace CalamityMod.Items.Armor
modPlayer.godSlayer = true;
modPlayer.godSlayerThrowing = true;
modPlayer.rogueStealthMax = 1.4f;
modPlayer.wearingRogueArmor = true;
player.setBonus = "You will survive fatal damage and will be healed 150 HP if an attack would have killed you\n" +
"This effect can only occur once every 45 seconds\n" +
"While the cooldown for this effect is active you gain a 10% increase to all damage\n" +
+2 -1
View File
@@ -56,7 +56,8 @@ namespace CalamityMod.Items.Armor
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, mod.ProjectileType("Shellfish"), (int)((double)1500 * player.minionDamage), 0f, Main.myPlayer, 0f, 0f);
}
}
}
player.GetCalamityPlayer().wearingRogueArmor = true;
}
public override void AddRecipes()
{
+1
View File
@@ -57,6 +57,7 @@ Abyssal madness increases damage, critical strike chance, and tentacle aggressio
This effect has a 30 second cooldown";
player.armorPenetration += 50;
player.GetCalamityPlayer().wearingRogueArmor = true;
//raise rev caps
player.GetModPlayer<CalamityPlayer>().omegaBlueSet = true;
+1
View File
@@ -47,6 +47,7 @@ namespace CalamityMod.Items.Armor
"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.GetCalamityPlayer().throwingDamage += 0.05f;
player.GetCalamityPlayer().wearingRogueArmor = true;
}
public override void UpdateEquip(Player player)
+1
View File
@@ -39,6 +39,7 @@ namespace CalamityMod.Items.Armor
modPlayer.silvaSet = true;
modPlayer.silvaThrowing = true;
modPlayer.rogueStealthMax = 1.5f;
modPlayer.wearingRogueArmor = true;
player.setBonus = "You are immune to almost all debuffs\n" +
"All projectiles spawn healing leaf orbs on enemy hits\n" +
"Max run speed and acceleration boosted by 5%\n" +
+1
View File
@@ -42,6 +42,7 @@ namespace CalamityMod.Items.Armor
modPlayer.rogueStealthMax = 1.05f;
player.doubleJumpSail = true;
player.jumpBoost = true;
player.GetCalamityPlayer().wearingRogueArmor = true;
}
public override void UpdateEquip(Player player)
+2 -1
View File
@@ -44,7 +44,8 @@ namespace CalamityMod.Items.Armor
modPlayer.tarraSet = true;
modPlayer.tarraThrowing = true;
modPlayer.rogueStealthMax = 1.3f;
player.setBonus = "Reduces enemy spawn rates\n" +
modPlayer.wearingRogueArmor = true;
player.setBonus = "Reduces enemy spawn rates\n" +
"Increased heart pickup range\n" +
"Enemies have a chance to drop extra hearts on death\n" +
"After every 25 rogue critical hits you will gain 5 seconds of damage immunity\n" +
+1
View File
@@ -41,6 +41,7 @@ namespace CalamityMod.Items.Armor
CalamityPlayer modPlayer = player.GetCalamityPlayer();
modPlayer.victideSet = true;
modPlayer.rogueStealthMax = 1f;
modPlayer.wearingRogueArmor = true;
player.ignoreWater = true;
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
{
+1
View File
@@ -37,6 +37,7 @@ namespace CalamityMod.Items.Armor
{
player.statDefense += 5; //14
}
player.GetCalamityPlayer().wearingRogueArmor = true;
}
public override void UpdateEquip(Player player)
+1
View File
@@ -55,6 +55,7 @@ namespace CalamityMod.Items.Armor
}
player.GetCalamityPlayer().throwingDamage += 0.09f;
player.GetCalamityPlayer().throwingVelocity += 0.09f;
player.GetCalamityPlayer().wearingRogueArmor = true;
}
public override void UpdateEquip(Player player)
@@ -2,6 +2,7 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Projectiles.Rogue;
namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
@@ -38,10 +39,12 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
speedY *= 0.7f; //since the barrel is heavy
Vector2 initialVelocity = new Vector2(speedX, speedY);
bool canUseStealthStrike = player.GetCalamityPlayer().StealthStrikeAvailable();
//unitY additive is do it doesn't exploe initially
Projectile.NewProjectile(position - Vector2.UnitY * 12f, initialVelocity, type,damage,knockBack,player.whoAmI, canUseStealthStrike.ToInt());
int p = Projectile.NewProjectile(position - Vector2.UnitY * 12f, initialVelocity, type,damage,knockBack,player.whoAmI);
if (player.GetCalamityPlayer().StealthStrikeAvailable())
Main.projectile[p].GetCalamityProj().stealthStrike = true;
return false;
}
}
}
}
@@ -40,7 +40,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
if (player.GetCalamityPlayer().StealthStrikeAvailable()) //setting the stealth strike
{
Projectile.NewProjectile(position, new Vector2(speedX, speedY), mod.ProjectileType("BloodsoakedCrashax"), damage, knockBack, player.whoAmI, 0f, 1f);
int p = Projectile.NewProjectile(position, new Vector2(speedX, speedY), mod.ProjectileType("BloodsoakedCrashax"), damage, knockBack, player.whoAmI, 0f, 1f);
Main.projectile[p].GetCalamityProj().stealthStrike = true;
return false;
}
return true;
@@ -45,7 +45,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
if (player.GetCalamityPlayer().StealthStrikeAvailable())
{
initialVelocity *= 2f;
Projectile.NewProjectile(position, initialVelocity, mod.ProjectileType("BouncingEyeballProjectileStealthStrike"),damage,knockBack,player.whoAmI);
int p = Projectile.NewProjectile(position, initialVelocity, mod.ProjectileType("BouncingEyeballProjectileStealthStrike"),damage,knockBack,player.whoAmI);
Main.projectile[p].GetCalamityProj().stealthStrike = true;
}
else
{
@@ -40,7 +40,9 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
Vector2 velocity = new Vector2(speedX, speedY);
float strikeValue = player.GetCalamityPlayer().StealthStrikeAvailable().ToInt(); //0 if false, 1 if true
Projectile.NewProjectile(position, velocity, mod.ProjectileType("CelestialReaperProjectile"), damage, knockBack, player.whoAmI, strikeValue);
int p = Projectile.NewProjectile(position, velocity, mod.ProjectileType("CelestialReaperProjectile"), damage, knockBack, player.whoAmI, strikeValue);
if (player.GetCalamityPlayer().StealthStrikeAvailable())
Main.projectile[p].GetCalamityProj().stealthStrike = true;
return false;
}
}
@@ -41,7 +41,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
if (player.GetCalamityPlayer().StealthStrikeAvailable())
{
Projectile.NewProjectile(position, new Vector2(speedX, speedY), mod.ProjectileType("CinquedeaProj"), damage, knockBack, player.whoAmI, 0f, 1f);
int p = Projectile.NewProjectile(position, new Vector2(speedX, speedY), mod.ProjectileType("CinquedeaProj"), damage, knockBack, player.whoAmI, 0f, 1f);
Main.projectile[p].GetCalamityProj().stealthStrike = true;
return false;
}
return true;
@@ -39,7 +39,9 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
Vector2 velocity = new Vector2(speedX, speedY);
float strikeValue = player.GetCalamityPlayer().StealthStrikeAvailable().ToInt(); //0 if false, 1 if true
Projectile.NewProjectile(position, velocity, mod.ProjectileType("ConsecratedWaterProjectile"), damage, knockBack, player.whoAmI, ai1:strikeValue);
int p = Projectile.NewProjectile(position, velocity, mod.ProjectileType("ConsecratedWaterProjectile"), damage, knockBack, player.whoAmI, ai1:strikeValue);
if (player.GetCalamityPlayer().StealthStrikeAvailable())
Main.projectile[p].GetCalamityProj().stealthStrike = true;
return false;
}
public override void AddRecipes()
@@ -45,15 +45,16 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
if (player.GetCalamityPlayer().StealthStrikeAvailable())
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("EclipsesStealth"), damage, knockBack, player.whoAmI, 0f, 0f);
}
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("EclipsesStealth"), damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[p].GetCalamityProj().stealthStrike = true;
}
else
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
}
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
+3 -1
View File
@@ -50,7 +50,9 @@ Stealth strikes are super fast and pierce infinitely");
ai1 = 1f;
}
Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, ai1);
int p = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, ai1);
if (player.GetCalamityPlayer().StealthStrikeAvailable())
Main.projectile[p].GetCalamityProj().stealthStrike = true;
return false;
}
@@ -39,7 +39,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
if (player.GetCalamityPlayer().StealthStrikeAvailable())
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 1f);
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 1f);
Main.projectile[p].GetCalamityProj().stealthStrike = true;
return false;
}
return true;
+2 -1
View File
@@ -44,7 +44,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
for (int i = 0; i <3; i++)
{
Vector2 perturbedspeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(spread));
Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, mod.ProjectileType("Kylieproj"), item.damage, item.knockBack, player.whoAmI,0f,1f);
int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, mod.ProjectileType("Kylieproj"), item.damage, item.knockBack, player.whoAmI,0f,1f);
Main.projectile[proj].GetCalamityProj().stealthStrike = true;
spread -= 10;
}
return false;
@@ -39,7 +39,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
if (player.GetCalamityPlayer().StealthStrikeAvailable())
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 1f);
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 1f);
Main.projectile[p].GetCalamityProj().stealthStrike = true;
return false;
}
return true;
@@ -44,7 +44,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
for (int i = 0; i < 3; i++)
{
Vector2 perturbedspeed = new Vector2(speedX * 1.4f, speedY * 1.4f).RotatedBy(MathHelper.ToRadians(spread));
Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, mod.ProjectileType<Projectiles.Rogue.MonkeyDart>(), item.damage, item.knockBack, player.whoAmI,1);
int p = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, mod.ProjectileType<Projectiles.Rogue.MonkeyDart>(), item.damage, item.knockBack, player.whoAmI,1);
Main.projectile[p].GetCalamityProj().stealthStrike = true;
spread -= 7;
}
return false;
@@ -44,8 +44,9 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
if (player.GetCalamityPlayer().StealthStrikeAvailable())
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("ScourgeoftheSeasStealth"), damage, knockBack, player.whoAmI, 0f, 0f);
}
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("ScourgeoftheSeasStealth"), damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[p].GetCalamityProj().stealthStrike = true;
}
else
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
@@ -57,7 +57,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
if (player.GetCalamityPlayer().StealthStrikeAvailable())
{
Projectile.NewProjectile(position, new Vector2(speedX * 1.6f, speedY * 1.6f), mod.ProjectileType("Stormfrontproj"), damage, knockBack, player.whoAmI, 0, 40f);
int p = Projectile.NewProjectile(position, new Vector2(speedX * 1.6f, speedY * 1.6f), mod.ProjectileType("Stormfrontproj"), damage, knockBack, player.whoAmI, 0, 40f);
Main.projectile[p].GetCalamityProj().stealthStrike = true;
return false;
}
else
@@ -39,7 +39,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
//Check if stealth is full
if (player.GetCalamityPlayer().StealthStrikeAvailable())
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("Brick"), item.damage, item.knockBack, player.whoAmI, 1);
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("Brick"), item.damage, item.knockBack, player.whoAmI, 1);
Main.projectile[p].GetCalamityProj().stealthStrike = true;
return false;
}
return true;
@@ -41,8 +41,9 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
if (player.GetCalamityPlayer().StealthStrikeAvailable())
{
Projectile.NewProjectile(position.X, position.Y, (int) ((double)speedX * 1.2), (int) ((double)speedY * 1.2), mod.ProjectileType("ButcherKnife"), (int) ((double)damage * 3), knockBack, Main.myPlayer);
if (Main.rand.NextBool(3))
int p = Projectile.NewProjectile(position.X, position.Y, (int) ((double)speedX * 1.2), (int) ((double)speedY * 1.2), mod.ProjectileType("ButcherKnife"), (int) ((double)damage * 3), knockBack, Main.myPlayer);
Main.projectile[p].GetCalamityProj().stealthStrike = true;
if (Main.rand.NextBool(3))
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("Fork"), (int) ((double)damage * 1.1), knockBack * 2f, Main.myPlayer);
}
+5
View File
@@ -1814,6 +1814,7 @@ namespace CalamityMod.Items
{
CalamityPlayer modPlayer = player.GetCalamityPlayer();
modPlayer.rogueStealthMax = 1f;
modPlayer.wearingRogueArmor = true;
player.GetCalamityPlayer().throwingDamage += 0.1f;
player.GetCalamityPlayer().throwingVelocity += 0.1f;
player.statDefense += 5;
@@ -1827,6 +1828,7 @@ namespace CalamityMod.Items
{
CalamityPlayer modPlayer = player.GetCalamityPlayer();
modPlayer.rogueStealthMax = 1f;
modPlayer.wearingRogueArmor = true;
player.GetCalamityPlayer().throwingDamage += 0.05f;
player.GetCalamityPlayer().throwingCrit += 5;
player.statDefense += 2;
@@ -2181,6 +2183,9 @@ namespace CalamityMod.Items
if (item.type == ItemID.WormScarf)
player.endurance -= 0.07f;
if (item.type == ItemID.RoyalGel)
modPlayer.royalGel = true;
if (item.type == ItemID.CelestialStone || item.type == ItemID.CelestialShell || (item.type == ItemID.MoonStone && !Main.dayTime) ||
(item.type == ItemID.SunStone && Main.dayTime))
{
+5 -1
View File
@@ -1,7 +1,11 @@
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items;
namespace CalamityMod.Items.Patreon
{
@@ -39,7 +43,7 @@ namespace CalamityMod.Items.Patreon
public override Vector2? HoldoutOffset()
{
return new Vector2(-15, 10);
return new Vector2(-15, 5);
}
public override bool CanUseItem(Player player)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

After

Width:  |  Height:  |  Size: 331 B

+25
View File
@@ -0,0 +1,25 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Banners
{
public class PiggyBanner : ModItem
{
public override void SetDefaults()
{
item.width = 10;
item.height = 24;
item.maxStack = 99;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.rare = 1;
item.value = Item.buyPrice(0, 0, 10, 0);
item.createTile = mod.TileType("MonsterBanner");
item.placeStyle = 108;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

+5 -1
View File
@@ -1,7 +1,11 @@
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items;
namespace CalamityMod.Items.Weapons.AbyssWeapons
{
@@ -35,7 +39,7 @@ namespace CalamityMod.Items.Weapons.AbyssWeapons
public override Vector2? HoldoutOffset()
{
return new Vector2(-5, 0);
return new Vector2(-10, -5);
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
+10
View File
@@ -1,6 +1,11 @@
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items;
namespace CalamityMod.Items.Weapons.Astral
{
@@ -33,6 +38,11 @@ namespace CalamityMod.Items.Weapons.Astral
item.useAmmo = 97;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-5, 0);
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("AstralRound"), damage, knockBack, player.whoAmI, 0f, 0f);
+10
View File
@@ -1,6 +1,11 @@
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items;
namespace CalamityMod.Items.Weapons.Bumblebirb
{
@@ -33,6 +38,11 @@ namespace CalamityMod.Items.Weapons.Bumblebirb
item.GetGlobalItem<CalamityGlobalItem>(mod).postMoonLordRarity = 12;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-5, 0);
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
float SpeedX = speedX + 5f * 0.05f;
+10
View File
@@ -1,6 +1,11 @@
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items;
namespace CalamityMod.Items.Weapons.Crabulon
{
@@ -32,6 +37,11 @@ namespace CalamityMod.Items.Weapons.Crabulon
item.useAmmo = 97;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-5, 0);
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("FungiOrb"), damage, knockBack, player.whoAmI, 0f, 0f);
+3
View File
@@ -1,6 +1,7 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Projectiles;
namespace CalamityMod.Items.Weapons
{
@@ -72,6 +73,7 @@ namespace CalamityMod.Items.Weapons
int flare = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 0.75), knockBack, player.whoAmI, 0.0f, 0.0f);
Main.projectile[flare].penetrate = 1;
Main.projectile[flare].timeLeft = 600;
Main.projectile[flare].GetGlobalProjectile<CalamityGlobalProjectile>(mod).forceRanged = true;
}
return false;
}
@@ -85,6 +87,7 @@ namespace CalamityMod.Items.Weapons
float SpeedX = speedX + (float) Main.rand.Next(-40, 41) * 0.05f;
float SpeedY = speedY + (float) Main.rand.Next(-40, 41) * 0.05f;
int projectile = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f);
Main.projectile[projectile].GetGlobalProjectile<CalamityGlobalProjectile>(mod).forceRanged = true;
Main.projectile[projectile].timeLeft = 200;
}
return false;
+4 -4
View File
@@ -40,19 +40,19 @@ namespace CalamityMod.Items.Weapons
item.shootSpeed = 14.6f;
item.useAmmo = 23;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-15, 0);
}
public override bool ConsumeAmmo(Player player)
{
if (Main.rand.Next(0, 100) < 50)
return false;
return true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
@@ -63,4 +63,4 @@ namespace CalamityMod.Items.Weapons
recipe.AddRecipe();
}
}
}
}
+1 -1
View File
@@ -56,7 +56,7 @@ namespace CalamityMod.Items.Weapons
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(BuffID.OnFire, 400);
target.AddBuff(BuffID.OnFire, 360);
}
}
}
+5 -1
View File
@@ -1,7 +1,11 @@
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items;
namespace CalamityMod.Items.Weapons
{
@@ -36,7 +40,7 @@ namespace CalamityMod.Items.Weapons
public override Vector2? HoldoutOffset()
{
return new Vector2(-5, 0);
return new Vector2(-10, 0);
}
public override bool ConsumeAmmo(Player player)
+10
View File
@@ -1,6 +1,11 @@
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items;
namespace CalamityMod.Items.Weapons.Perforators
{
@@ -33,6 +38,11 @@ namespace CalamityMod.Items.Weapons.Perforators
item.useAmmo = 97;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-7, 0);
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("BloodClotFriendly"), damage, knockBack, player.whoAmI, 0f, 0f);
+7 -7
View File
@@ -8,7 +8,7 @@ namespace CalamityMod.Items.Weapons.RareVariants
public class Infinity : ModItem
{
internal int rotation = 0;
internal int limit = 1;
internal bool limit = true;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Infinity");
@@ -63,7 +63,7 @@ namespace CalamityMod.Items.Weapons.RareVariants
int shot2 = Projectile.NewProjectile(position.X, position.Y, num8.X, num8.Y, type, damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[shot2].timeLeft = 180;
//Code to constantly make the shooting go side to side to make the helix
if (limit == 1)
if (limit)
{
rotation += 2;
}
@@ -73,11 +73,11 @@ namespace CalamityMod.Items.Weapons.RareVariants
}
if (rotation >= 15)
{
limit = 0;
limit = false;
}
else if (rotation <= -15)
{
limit = 1;
limit = true;
}
return false;
}
@@ -90,7 +90,7 @@ namespace CalamityMod.Items.Weapons.RareVariants
Main.projectile[shot1].timeLeft = 180;
int shot2 = Projectile.NewProjectile(position.X, position.Y, num8.X, num8.Y, mod.ProjectileType("ChargedBlast"), damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[shot2].timeLeft = 180;
if (limit == 1)
if (limit)
{
rotation += 2;
}
@@ -100,11 +100,11 @@ namespace CalamityMod.Items.Weapons.RareVariants
}
if (rotation >= 15)
{
limit = 0;
limit = false;
}
else if (rotation <= -15)
{
limit = 1;
limit = true;
}
return false;
}
+10
View File
@@ -1,6 +1,11 @@
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items;
namespace CalamityMod.Items.Weapons
{
@@ -35,6 +40,11 @@ namespace CalamityMod.Items.Weapons
item.GetGlobalItem<CalamityGlobalItem>(mod).postMoonLordRarity = 14;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
float SpeedX = speedX + (float)Main.rand.Next(-5, 6) * 0.05f;
+10
View File
@@ -1,6 +1,11 @@
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items;
namespace CalamityMod.Items.Weapons
{
@@ -32,6 +37,11 @@ namespace CalamityMod.Items.Weapons
item.useAmmo = 97;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("SlagRound"), damage, knockBack, player.whoAmI, 0f, 0f);
Loaded 100 of 288 files, more files were not shown because too many files have changed in this diff. Show more