This commit is contained in:
Andrew Marheine committed 2019-12-08 14:22:49 -06:00
commit 23d8f98ee5
529 files changed
+6934 -2040

No files matched your search

+11
View File
@@ -47,6 +47,17 @@ namespace CalamityMod.Buffs
}
}
public override void Update(int type, NPC npc, ref int buffIndex)
{
if (type == BuffID.Webbed)
{
if (npc.Calamity().webbed < npc.buffTime[buffIndex])
npc.Calamity().webbed = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
}
}
public override void ModifyBuffTip(int type, ref string tip, ref int rare)
{
if (type == BuffID.NebulaUpDmg1)
+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs
{
DisplayName.SetDefault("Blood Frenzy");
Description.SetDefault("Contact damage is reduced and melee stats are greatly increased");
Main.debuff[Type] = false;
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
longerExpertDebuff = false;
+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs
{
DisplayName.SetDefault("Elysian Guard");
Description.SetDefault("Movement speed reduced, other stats buffed");
Main.debuff[Type] = false;
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
+1
View File
@@ -12,6 +12,7 @@ namespace CalamityMod.Buffs.StatBuffs
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
longerExpertDebuff = false;
}
@@ -12,6 +12,7 @@ namespace CalamityMod.Buffs.StatBuffs
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
longerExpertDebuff = false;
}
@@ -12,6 +12,7 @@ namespace CalamityMod.Buffs.StatBuffs
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
longerExpertDebuff = false;
}
@@ -12,6 +12,7 @@ namespace CalamityMod.Buffs.StatBuffs
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
longerExpertDebuff = false;
}
+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs
{
DisplayName.SetDefault("Tarragon Cloak");
Description.SetDefault("Contact damage is reduced");
Main.debuff[Type] = false;
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
longerExpertDebuff = false;
+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs
{
DisplayName.SetDefault("Tarragon Immunity");
Description.SetDefault("You are immune");
Main.debuff[Type] = false;
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
longerExpertDebuff = false;
+421 -89
View File
@@ -62,6 +62,11 @@ using Terraria.ModLoader.IO;
namespace CalamityMod.CalPlayer
{
public enum GaelSwitchPhase
{
LoseRage = 0,
None = 1
}
public class CalamityPlayer : ModPlayer
{
#region Variables
@@ -110,16 +115,17 @@ namespace CalamityMod.CalPlayer
public int hInfernoBoost = 0;
public int pissWaterBoost = 0;
public int gaelRageCooldown = 0;
public int gaelBloodShotCooldown = 0;
public int packetTimer = 0;
public int bloodflareHeartTimer = 180;
public int bloodflareManaTimer = 180;
public int moneyStolenByBandit = 0;
public int polarisBoostCounter = 0;
public int reforges = 0;
public int gaelSwipes = 0;
public float modStealth = 1f;
public float aquaticBoost = 1f;
public float shieldInvinc = 5f;
public GaelSwitchPhase gaelSwitchTimer = 0;
// Sound
public bool playRogueStealthSound = false;
@@ -161,6 +167,7 @@ namespace CalamityMod.CalPlayer
public float throwingDamage = 1f;
public float throwingVelocity = 1f;
public int throwingCrit = 4;
public bool throwingAmmoCost75 = false;
public bool throwingAmmoCost66 = false;
public bool throwingAmmoCost50 = false;
@@ -369,6 +376,7 @@ namespace CalamityMod.CalPlayer
public bool ursaSergeant = false;
public bool thiefsDime = false;
public bool dynamoStemCells = false;
public bool etherealExtorter = false;
//public bool dukeScales = false;
public bool sandWaifu = false;
public bool sandBoobWaifu = false;
@@ -395,6 +403,14 @@ namespace CalamityMod.CalPlayer
public bool electricianGlove = false;
public bool bloodyGlove = false;
public bool filthyGlove = false;
public bool sandCloak = false;
public int sandCloakCooldown = 0;
public bool spectralVeil = false;
public int spectralVeilImmunity = 0;
public bool plaguedFuelPack = false;
public int plaguedFuelPackCooldown = 0;
public int plaguedFuelPackDash = 0;
public int plaguedFuelPackDirection = 0;
// Armor Set
public bool victideSet = false;
@@ -591,6 +607,7 @@ namespace CalamityMod.CalPlayer
public bool polarisBoostTwo = false;
public bool polarisBoostThree = false;
public bool bloodfinBoost = false;
public int bloodfinTimer = 30;
// Minion
public bool resButterfly = false;
@@ -861,6 +878,7 @@ namespace CalamityMod.CalPlayer
throwingDamage = 1f;
throwingVelocity = 1f;
throwingCrit = 4;
throwingAmmoCost75 = false;
throwingAmmoCost66 = false;
throwingAmmoCost50 = false;
@@ -870,6 +888,7 @@ namespace CalamityMod.CalPlayer
thirdSage = false;
if (player.immuneTime == 0)
thirdSageH = false;
perfmini = false;
akato = false;
leviPet = false;
@@ -1067,6 +1086,7 @@ namespace CalamityMod.CalPlayer
ursaSergeant = false;
thiefsDime = false;
dynamoStemCells = false;
etherealExtorter = false;
//dukeScales = false;
daedalusReflect = false;
@@ -1140,6 +1160,9 @@ namespace CalamityMod.CalPlayer
electricianGlove = false;
bloodyGlove = false;
filthyGlove = false;
sandCloak = false;
spectralVeil = false;
plaguedFuelPack = false;
alcoholPoisoning = false;
shadowflame = false;
@@ -1328,7 +1351,8 @@ namespace CalamityMod.CalPlayer
#region Debuffs
//distanceFromBoss = -1;
gaelRageCooldown = 0;
gaelBloodShotCooldown = 0;
gaelSwipes = 0;
gaelSwitchTimer = (GaelSwitchPhase)0;
stress = 0;
adrenaline = 0;
adrenalineMaxTimer = 300;
@@ -1384,6 +1408,11 @@ namespace CalamityMod.CalPlayer
moonCrownCooldown = 0;
featherCrownCooldown = 0;
sulphurPoison = false;
sandCloakCooldown = 0;
spectralVeilImmunity = 0;
plaguedFuelPackCooldown = 0;
plaguedFuelPackDash = 0;
plaguedFuelPackDirection = 0;
#endregion
#region Rogue
@@ -1394,6 +1423,7 @@ namespace CalamityMod.CalPlayer
throwingDamage = 1f;
throwingVelocity = 1f;
throwingCrit = 4;
throwingAmmoCost75 = false;
throwingAmmoCost66 = false;
throwingAmmoCost50 = false;
#endregion
@@ -1487,6 +1517,7 @@ namespace CalamityMod.CalPlayer
polarisBoostTwo = false;
polarisBoostThree = false;
bloodfinBoost = false;
bloodfinTimer = 0;
revivify = false;
healCounter = 300;
#endregion
@@ -1567,6 +1598,7 @@ namespace CalamityMod.CalPlayer
elysianGuard = false;
#endregion
if (CalamityWorld.bossRushActive)
{
if (!CalamityGlobalNPC.AnyLivingPlayers())
@@ -1704,17 +1736,16 @@ namespace CalamityMod.CalPlayer
{
CalamityPlayer modOther = other.Calamity();
// efficiently short circuits to false if there are any discrepancies
// TODO -- order this list by how frequently players are in these various biomes
return ZoneSunkenSea == modOther.ZoneSunkenSea &&
ZoneCalamity == modOther.ZoneCalamity &&
ZoneAstral == modOther.ZoneAstral &&
ZoneSulphur == modOther.ZoneSulphur &&
ZoneAbyss == modOther.ZoneAbyss &&
ZoneAbyssLayer1 == modOther.ZoneAbyssLayer1 &&
ZoneAbyssLayer2 == modOther.ZoneAbyssLayer2 &&
// least common biomes checked first so it short circuits as rapidly as possible
return ZoneAbyssLayer4 == modOther.ZoneAbyssLayer4 &&
ZoneAbyssLayer3 == modOther.ZoneAbyssLayer3 &&
ZoneAbyssLayer4 == modOther.ZoneAbyssLayer4;
ZoneAbyssLayer2 == modOther.ZoneAbyssLayer2 &&
ZoneAbyssLayer1 == modOther.ZoneAbyssLayer1 &&
ZoneCalamity == modOther.ZoneCalamity &&
ZoneSulphur == modOther.ZoneSulphur &&
ZoneSunkenSea == modOther.ZoneSunkenSea &&
ZoneAbyss == modOther.ZoneAbyss &&
ZoneAstral == modOther.ZoneAstral;
}
public override void CopyCustomBiomesTo(Player other)
@@ -1854,6 +1885,87 @@ namespace CalamityMod.CalPlayer
}
}
}
if (CalamityMod.SandCloakHotkey.JustPressed && sandCloak && Main.myPlayer == player.whoAmI && player.Calamity().rogueStealth >= player.Calamity().rogueStealthMax * 0.25f &&
wearingRogueArmor && player.Calamity().rogueStealthMax > 0 && sandCloakCooldown == 0)
{
sandCloakCooldown = 900;
player.Calamity().rogueStealth -= player.Calamity().rogueStealthMax * 0.25f;
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<SandCloakVeil>(), 7, 8, player.whoAmI, 0, 0);
Main.PlaySound(2, player.position, 45);
}
if (CalamityMod.SpectralVeilHotKey.JustPressed && spectralVeil && Main.myPlayer == player.whoAmI && player.Calamity().rogueStealth >= player.Calamity().rogueStealthMax * 0.25f &&
wearingRogueArmor && player.Calamity().rogueStealthMax > 0)
{
float teleportRange = 320f;
Vector2 teleportLocation;
teleportLocation.X = (float)Main.mouseX + Main.screenPosition.X;
if (player.gravDir == 1f)
{
teleportLocation.Y = (float)Main.mouseY + Main.screenPosition.Y - (float)player.height;
}
else
{
teleportLocation.Y = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY;
}
teleportLocation.X -= (float)(player.width / 2);
Vector2 playerToTeleport = teleportLocation - player.position;
if (playerToTeleport.Length() > teleportRange)
{
playerToTeleport.Normalize();
playerToTeleport *= teleportRange;
teleportLocation = player.position + playerToTeleport;
}
if (teleportLocation.X > 50f && teleportLocation.X < (float)(Main.maxTilesX * 16 - 50) && teleportLocation.Y > 50f && teleportLocation.Y < (float)(Main.maxTilesY * 16 - 50))
{
int x = (int)(teleportLocation.X / 16f);
int y = (int)(teleportLocation.Y / 16f);
if (!Collision.SolidCollision(teleportLocation, player.width, player.height))
{
player.Calamity().rogueStealth -= player.Calamity().rogueStealthMax * 0.25f;
player.Teleport(teleportLocation, 1, 0);
NetMessage.SendData(65, -1, -1, null, 0, (float)player.whoAmI, teleportLocation.X, teleportLocation.Y, 1, 0, 0);
if (player.chaosState)
{
player.statLife -= player.statLifeMax2 / 7;
PlayerDeathReason damageSource = PlayerDeathReason.ByOther(13);
if (player.statLife <= 0)
{
player.KillMe(damageSource, 1.0, 0, false);
}
}
player.AddBuff(BuffID.ChaosState, 360, true);
int numDust = 40;
Vector2 step = playerToTeleport / numDust;
for (int i = 0; i < numDust; i++)
{
int dustIndex = Dust.NewDust(player.Center - (step * i), 1, 1, 21, step.X, step.Y);
Main.dust[dustIndex].noGravity = true;
Main.dust[dustIndex].noLight = true;
}
player.immune = true;
player.immuneTime = 120;
spectralVeilImmunity = 120;
for (int k = 0; k < player.hurtCooldowns.Length; k++)
{
player.hurtCooldowns[k] = player.immuneTime;
}
}
}
}
if (CalamityMod.PlaguePackHotKey.JustPressed && plaguedFuelPack && Main.myPlayer == player.whoAmI && player.Calamity().rogueStealth >= player.Calamity().rogueStealthMax * 0.25f &&
wearingRogueArmor && player.Calamity().rogueStealthMax > 0 && plaguedFuelPackCooldown == 0 && !player.mount.Active)
{
plaguedFuelPackCooldown = 90;
plaguedFuelPackDash = 10;
plaguedFuelPackDirection = player.direction;
player.Calamity().rogueStealth -= player.Calamity().rogueStealthMax * 0.25f;
Main.PlaySound(2, player.position, 66);
Main.PlaySound(2, player.position, 34);
}
if (CalamityMod.BossBarToggleHotKey.JustPressed)
{
if (drawBossHPBar)
@@ -2030,44 +2142,33 @@ namespace CalamityMod.CalPlayer
Dust.NewDust(player.Center + angle.ToRotationVector2() * 160f, 0, 0, 218, 0f, 0f, 100, default, 1f);
}
gaelRageCooldown = 60 * GaelsGreatsword.SkullsplosionCooldownSeconds;
int damage2 = 15;
if (CalamityWorld.downedYharon)
{
damage2 = GaelsGreatsword.PostYharonDamage;
}
else if (NPC.downedMoonlord)
{
damage2 = GaelsGreatsword.PostMoonLordDamage;
}
else if (Main.hardMode)
{
damage2 = GaelsGreatsword.HardmodeDamage;
}
float rageRatio = (float)stress / stressMax;
int damage = (int)((stress == stressMax ? GaelsGreatsword.MaxRageBoost : rageRatio * GaelsGreatsword.RageBoostMultiplier) * damage2);
int damage = (int)(rageRatio * GaelsGreatsword.MaxRageBoost * GaelsGreatsword.BaseDamage);
float skullCount = 5f;
float skullSpeed = 5f;
if (CalamityWorld.downedYharon)
{
skullCount = 20f;
skullSpeed = 16f;
skullSpeed = 12f;
}
else if (NPC.downedMoonlord)
{
skullCount = 13f;
skullSpeed = 13f;
skullSpeed = 10f;
}
else if (Main.hardMode)
{
skullCount = 9f;
skullSpeed = 8.75f;
skullSpeed = 6.8f;
}
for (float i = 0; i < skullCount; i += 1f)
{
float angle = MathHelper.TwoPi * i / skullCount;
Vector2 initialVelocity = angle.ToRotationVector2() * skullSpeed;
int projectileIndex = Projectile.NewProjectile(player.Center + initialVelocity * 3f, initialVelocity, ModContent.ProjectileType<GaelSkull>(), damage, 2f, player.whoAmI);
Vector2 initialVelocity = angle.ToRotationVector2().RotatedByRandom(MathHelper.ToRadians(12f)) * skullSpeed * new Vector2(0.82f, 1.5f) *
Main.rand.NextFloat(0.8f, 1.2f) * (i < skullCount / 2 ? 0.25f : 1f);
int projectileIndex = Projectile.NewProjectile(player.Center + initialVelocity * 3f, initialVelocity, ModContent.ProjectileType<GaelSkull2>(), damage, 2f, player.whoAmI);
Main.projectile[projectileIndex].tileCollide = false;
Main.projectile[projectileIndex].localAI[1] = (Main.projectile[projectileIndex].velocity.Y < 0f).ToInt();
}
stress = 0;
}
@@ -2945,6 +3046,16 @@ namespace CalamityMod.CalPlayer
#endregion
#region MiscEffects
if (player.HeldItem.type == ModContent.ItemType<GaelsGreatsword>())
{
gaelSwitchTimer = GaelSwitchPhase.LoseRage;
stress += (int)MathHelper.Min(5, 10000 - stress);
}
else if (player.HeldItem.type != ModContent.ItemType<GaelsGreatsword>() && gaelSwitchTimer == GaelSwitchPhase.LoseRage)
{
stress = 0;
gaelSwitchTimer = GaelSwitchPhase.None;
}
if (Config.ProficiencyEnabled)
{
GetExactLevelUp();
@@ -3213,6 +3324,10 @@ namespace CalamityMod.CalPlayer
{
player.maxFallSpeed *= 1.1f;
}
if (etherealExtorter && player.ZoneSkyHeight)
{
player.maxFallSpeed *= 1.25f;
}
}
if (normalityRelocator)
{
@@ -3319,6 +3434,14 @@ namespace CalamityMod.CalPlayer
featherCrownCooldown--;
if (moonCrownCooldown > 0)
moonCrownCooldown--;
if (sandCloakCooldown > 0)
sandCloakCooldown--;
if (spectralVeilImmunity > 0)
spectralVeilImmunity--;
if (plaguedFuelPackCooldown > 0)
plaguedFuelPackCooldown--;
if (plaguedFuelPackDash > 0)
plaguedFuelPackDash--;
if (ataxiaDmg > 0f)
ataxiaDmg -= 1.5f;
if (ataxiaDmg < 0f)
@@ -3335,8 +3458,6 @@ namespace CalamityMod.CalPlayer
aBulwarkRareMeleeBoostTimer--;
if (bossRushImmunityFrameCurseTimer > 0)
bossRushImmunityFrameCurseTimer--;
if (gaelBloodShotCooldown > 0)
gaelBloodShotCooldown--;
if (gaelRageCooldown > 0)
gaelRageCooldown--;
@@ -3867,6 +3988,110 @@ namespace CalamityMod.CalPlayer
}
}
}
if (spectralVeil && spectralVeilImmunity > 0)
{
Rectangle sVeilRectangle = 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 (sVeilRectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
{
if (player.whoAmI == Main.myPlayer)
{
player.noKnockback = true;
rogueStealth = rogueStealthMax;
spectralVeilImmunity = 0;
for (int k = 0; k < player.hurtCooldowns.Length; k++)
{
player.hurtCooldowns[k] = player.immuneTime;
}
Vector2 sVeilDustDir = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f));
sVeilDustDir.Normalize();
sVeilDustDir *= 0.5f;
for (int j = 0; j < 20; j++)
{
int sVeilDustIndex1 = Dust.NewDust(player.Center, 1, 1, 21, sVeilDustDir.X * j, sVeilDustDir.Y * j);
int sVeilDustIndex2 = Dust.NewDust(player.Center, 1, 1, 21, -sVeilDustDir.X * j, -sVeilDustDir.Y * j);
Main.dust[sVeilDustIndex1].noGravity = false;
Main.dust[sVeilDustIndex1].noLight = false;
Main.dust[sVeilDustIndex2].noGravity = false;
Main.dust[sVeilDustIndex2].noLight = false;
}
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y);
}
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 (sVeilRectangle.Intersects(rect))
{
if (player.whoAmI == Main.myPlayer)
{
player.noKnockback = true;
rogueStealth = rogueStealthMax;
spectralVeilImmunity = 0;
for (int k = 0; k < player.hurtCooldowns.Length; k++)
{
player.hurtCooldowns[k] = player.immuneTime;
}
Vector2 sVeilDustDir = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f));
sVeilDustDir.Normalize();
sVeilDustDir *= 0.5f;
for (int j = 0; j < 20; j++)
{
int sVeilDustIndex1 = Dust.NewDust(player.Center, 1, 1, 21, sVeilDustDir.X * j, sVeilDustDir.Y * j);
int sVeilDustIndex2 = Dust.NewDust(player.Center, 1, 1, 21, -sVeilDustDir.X * j, -sVeilDustDir.Y * j);
Main.dust[sVeilDustIndex1].noGravity = false;
Main.dust[sVeilDustIndex1].noLight = false;
Main.dust[sVeilDustIndex2].noGravity = false;
Main.dust[sVeilDustIndex2].noLight = false;
}
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y);
}
break;
}
}
}
}
if (plaguedFuelPack && plaguedFuelPackDash > 0)
{
if (plaguedFuelPackDash > 1)
player.velocity = new Vector2(plaguedFuelPackDirection, -1) * 25;
else
player.velocity = new Vector2(plaguedFuelPackDirection, -1) * 5;
int numClouds = Main.rand.Next(2, 10);
for (int i = 0; i < numClouds; i++)
{
Vector2 cloudVelocity = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1));
cloudVelocity.Normalize();
cloudVelocity *= Main.rand.NextFloat(0f, 1f);
int projectile = Projectile.NewProjectile(player.Center, cloudVelocity, ModContent.ProjectileType<PlaguedFuelPackCloud>(), 20, 0, player.whoAmI, 0, 0);
Main.projectile[projectile].timeLeft = Main.rand.Next(75, 125);
}
for (int i = 0; i < 3; i++)
{
int dust = Dust.NewDust(player.Center, 1, 1, 89, player.velocity.X * -0.1f, player.velocity.Y * -0.1f, 100, default, 3.5f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 1.2f;
Main.dust[dust].velocity.Y -= 0.15f;
}
}
#endregion
#region StandingStillEffects
@@ -4354,6 +4579,84 @@ namespace CalamityMod.CalPlayer
{
player.Calamity().throwingCrit += 10;
}
if (etherealExtorter)
{
bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor;
if (player.ZoneUnderworldHeight && !ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.inventory[player.selectedItem].type))
{
player.endurance += 0.03f;
}
if ((player.ZoneDesert || player.ZoneUndergroundDesert) && CalamityMod.daggerList.Contains(player.inventory[player.selectedItem].type))
{
player.scope = true;
}
if (ZoneSunkenSea)
{
player.gills = true;
player.ignoreWater = true;
}
if (player.ZoneSnow && CalamityMod.iceWeaponList.Contains(player.inventory[player.selectedItem].type))
{
player.statDefense += 5;
}
if (ZoneAstral)
{
if (player.wingTimeMax > 0)
player.wingTimeMax = (int)((double)player.wingTimeMax * 1.05);
}
if (player.ZoneJungle && CalamityMod.natureWeaponList.Contains(player.inventory[player.selectedItem].type))
{
player.AddBuff(165, 5, true); //Dryad's Blessing
}
if (ZoneAbyss)
{
player.blind = true;
player.headcovered = true;
player.blackout = true;
if (player.FindBuffIndex(BuffID.Shine) > -1)
{ player.ClearBuff(BuffID.Shine); }
if (player.FindBuffIndex(BuffID.NightOwl) > -1)
{ player.ClearBuff(BuffID.NightOwl); }
player.nightVision = false;
shine = false;
player.allDamage += 0.2f;
AllCritBoost(5);
player.statDefense += 8;
player.endurance += 0.05f;
}
if (player.ZoneRockLayerHeight && ZoneForest && CalamityMod.flaskBombList.Contains(player.inventory[player.selectedItem].type))
{
player.blackBelt = true;
}
if (player.ZoneHoly)
{
player.maxMinions += 1;
player.manaCost *= 0.9f;
player.ammoCost75 = true; //25% chance to not use ranged ammo
throwingAmmoCost75 = true; //25% chance to not consume rogue consumables
}
if (player.ZoneBeach)
{
player.moveSpeed += 0.05f;
}
if (player.ZoneGlowshroom)
{
player.statDefense += 3;
}
if (player.ZoneMeteor)
{
gravityNormalizer = true;
player.slowFall = true;
}
if (Main.moonPhase == 0) //full moon
{
player.fishingSkill += 30;
}
if (Main.moonPhase == 6) //first quarter
{
player.discount = true;
}
}
if (harpyRing)
{
if (player.wingTimeMax > 0)
@@ -4958,7 +5261,7 @@ namespace CalamityMod.CalPlayer
player.npcTypeNoAggro[ModContent.NPCType<PerennialSlime>()] = true;
player.npcTypeNoAggro[ModContent.NPCType<PlaguedJungleSlime>()] = true;
player.npcTypeNoAggro[ModContent.NPCType<AstralSlime>()] = true;
// TODO -- When Wulfrum Slimes start being definitely robots, remove this immunity.
// LATER -- When Wulfrum Slimes start being definitely robots, remove this immunity.
player.npcTypeNoAggro[ModContent.NPCType<WulfrumSlime>()] = true;
}
@@ -5216,6 +5519,7 @@ namespace CalamityMod.CalPlayer
(silvaSet ? 0.05f : 0f) +
(eTracers ? 0.05f : 0f) +
(blueCandle ? 0.05f : 0f) +
(etherealExtorter && player.ZoneBeach ? 0.05f : 0f) +
((deepDiver && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) ? 0.15f : 0f) +
(rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f);
@@ -5229,6 +5533,7 @@ namespace CalamityMod.CalPlayer
(cTracers ? 0.1f : 0f) +
(silvaSet ? 0.05f : 0f) +
(eTracers ? 0.05f : 0f) +
(etherealExtorter && player.ZoneBeach ? 0.05f : 0f) +
((stressPills || laudanum || draedonsHeart) ? 0.05f : 0f) +
((deepDiver && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) ? 0.15f : 0f) +
(rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f);
@@ -5590,6 +5895,11 @@ namespace CalamityMod.CalPlayer
item.Calamity().rogue && item.useTime > 3)
return 1.1f;
}
if (etherealExtorter)
{
if (Main.moonPhase == 1 && item.Calamity().rogue && item.useTime > 3) //Waning gibbous
return 1.1f;
}
return 1f;
}
#endregion
@@ -5615,18 +5925,7 @@ namespace CalamityMod.CalPlayer
}
if (item.type == ModContent.ItemType<GaelsGreatsword>())
{
if (CalamityWorld.downedYharon)
{
add += GaelsGreatsword.PostYharonDamage / (float)GaelsGreatsword.BaseDamage - 1f;
}
else if (NPC.downedMoonlord)
{
add += GaelsGreatsword.PostMoonLordDamage / (float)GaelsGreatsword.BaseDamage - 1f;
}
else if (Main.hardMode)
{
add += GaelsGreatsword.HardmodeDamage / (float)GaelsGreatsword.BaseDamage - 1f;
}
add += GaelsGreatsword.BaseDamage / (float)GaelsGreatsword.BaseDamage - 1f;
}
if (flamethrowerBoost && item.ranged && (item.useAmmo == 23 || item.type == ModContent.ItemType<DragoonDrizzlefish>()))
{
@@ -5644,6 +5943,10 @@ namespace CalamityMod.CalPlayer
{
add += 0.1f;
}
if (etherealExtorter && player.ZoneDungeon && item.Calamity().rogue && !item.consumable)
{
add += 0.05f;
}
if (theBee && player.statLife >= player.statLifeMax2)
{
@@ -5693,6 +5996,14 @@ namespace CalamityMod.CalPlayer
if (moscowMule)
{
knockback *= 1.09f;
}
bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor;
if (etherealExtorter)
{
if (player.ZoneOverworldHeight && ZoneForest)
{
knockback *= 1.15f;
}
}
}
#endregion
@@ -6230,6 +6541,26 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffID.Midas, 120, false);
}
}
if (etherealExtorter)
{
if (ZoneSunkenSea)
{
target.AddBuff(ModContent.BuffType<TemporalSadness>(), 60, false);
}
if (ZoneSulphur)
{
target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 120, false);
target.AddBuff(ModContent.BuffType<Irradiated>(), 300, false);
}
if (Main.moonPhase == 6) //first quarter
{
target.AddBuff(BuffID.Midas, 120, false);
}
if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.inventory[player.selectedItem].type))
{
target.AddBuff(ModContent.BuffType<AbyssalFlames>(), 240, false);
}
}
}
}
#endregion
@@ -6886,7 +7217,33 @@ namespace CalamityMod.CalPlayer
}
if ((filthyGlove || electricianGlove) && proj.Calamity().stealthStrike && proj.Calamity().rogue)
{
damageMult += 0.01;
damageMult += 0.1;
}
if (etherealExtorter && proj.Calamity().rogue)
{
bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor;
if (Main.moonPhase == 7 && crit) //Waxing Gibbous
{
damageMult += 0.05;
}
if (Main.moonPhase == 5) //Waxing Cresent
{
if (proj.penetrate == -1)
damageMult += 0.1;
else if (proj.penetrate >= 5)
damageMult += 0.08;
else if (proj.penetrate == 4)
damageMult += 0.06;
else if (proj.penetrate == 3)
damageMult += 0.03;
else if (proj.penetrate == 2)
damageMult += 0.02;
}
if (player.ZoneDirtLayerHeight && ZoneForest)
{
if (Main.rand.NextBool(20) && !crit) //5% chance to minicrit
damageMult += 0.5;
}
}
damage = (int)((double)damage * damageMult);
@@ -6930,6 +7287,15 @@ namespace CalamityMod.CalPlayer
int penetratedDefense = Math.Min(penetratableDefense, 10);
damage += (int)(0.5f * penetratedDefense);
}
if (proj.Calamity().rogue && etherealExtorter)
{
if (CalamityMod.boomerangProjList.Contains(proj.type) && player.ZoneCorrupt)
{
int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0);
int penetratedDefense = Math.Min(penetratableDefense, 6);
damage += (int)(0.5f * penetratedDefense);
}
}
#endregion
#region MultiplicativeReductions
@@ -7265,33 +7631,6 @@ namespace CalamityMod.CalPlayer
#region Modify Hit By NPC
public override void ModifyHitByNPC(NPC npc, ref int damage, ref bool crit)
{
if (player.HeldItem.type == ModContent.ItemType<GaelsGreatsword>()
&& npc.active && npc.CanBeChasedBy() && player.altFunctionUse == 2 && Main.rand.NextBool(2))
{
int direction = -1;
if (npc.Center.X < player.Center.X)
{
direction = 1;
}
int damage2 = 15;
if (CalamityWorld.downedYharon)
{
damage2 = GaelsGreatsword.PostYharonDamage;
}
else if (NPC.downedMoonlord)
{
damage2 = GaelsGreatsword.PostMoonLordDamage;
}
else if (Main.hardMode)
{
damage2 = GaelsGreatsword.HardmodeDamage;
}
player.ApplyDamageToNPC(npc, damage2 * 5, 5, -direction, false);
player.immune = true;
player.immuneNoBlink = true;
player.immuneTime = 4;
damage = 0;
}
int bossRushDamage = (Main.expertMode ? 500 : 300) + (CalamityWorld.bossRushStage * 2);
if (CalamityWorld.bossRushActive)
{
@@ -7370,23 +7709,11 @@ namespace CalamityMod.CalPlayer
int dustIndex = Dust.NewDust(proj.position, proj.width, proj.height, 31, 0f, 0f, 0, default(Color), 1f);
Main.dust[dustIndex].velocity *= 0.3f;
}
int damage2 = 15;
if (CalamityWorld.downedYharon)
{
damage2 = GaelsGreatsword.PostYharonDamage;
}
else if (NPC.downedMoonlord)
{
damage2 = GaelsGreatsword.PostMoonLordDamage;
}
else if (Main.hardMode)
{
damage2 = GaelsGreatsword.HardmodeDamage;
}
int damage2 = GaelsGreatsword.BaseDamage;
proj.hostile = false;
proj.friendly = true;
proj.velocity *= -1f;
proj.damage = damage2 * 5;
proj.damage = damage2;
proj.penetrate = 1;
player.immune = true;
player.immuneNoBlink = true;
@@ -10798,7 +11125,7 @@ namespace CalamityMod.CalPlayer
fullBright = true;
}
}
if (mushy)
if (mushy || (etherealExtorter && player.ZoneGlowshroom))
{
if (Main.rand.NextBool(6) && drawInfo.shadow == 0f)
{
@@ -11005,6 +11332,11 @@ namespace CalamityMod.CalPlayer
stealthGenMoving += 0.2f;
}
if (etherealExtorter && Main.moonPhase == 3) //Waning Crescent
{
stealthGenMoving += 0.1f;
}
bool standstill = Math.Abs(player.velocity.X) < 0.1f && Math.Abs(player.velocity.Y) < 0.1f && !player.mount.Active;
// Stealth gen acceleration
+12 -1
View File
@@ -287,7 +287,15 @@ namespace CalamityMod.CalPlayer
player.lifeRegen += 5;
player.lifeRegenTime += 10;
}
}
if (modPlayer.bloodfinTimer > 0)
{ modPlayer.bloodfinTimer--; }
if (player.whoAmI == Main.myPlayer && modPlayer.bloodfinTimer <= 0)
{
modPlayer.bloodfinTimer = 30;
if (player.statLife <= (int)((double)player.statLifeMax2 * 0.75))
player.statLife += 1;
}
}
if (modPlayer.celestialJewel || modPlayer.astralArcanum)
{
@@ -577,6 +585,9 @@ namespace CalamityMod.CalPlayer
player.lifeRegen += 2;
}
if (modPlayer.etherealExtorter || player.ZoneGlowshroom)
player.lifeRegen += 1;
if (!player.shinyStone)
{
int lifeRegenTimeMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 450 : 1800;
+208 -5
View File
@@ -15,6 +15,7 @@ using CalamityMod.Items.Fishing.AstralCatches;
using CalamityMod.Items.Fishing.SunkenSeaCatches;
using CalamityMod.Items.Fishing.FishingRods;
using CalamityMod.Localization;
using CalamityMod.NPCs;
using CalamityMod.NPCs.Abyss;
using CalamityMod.NPCs.AquaticScourge;
using CalamityMod.NPCs.Astral;
@@ -46,7 +47,10 @@ using CalamityMod.NPCs.SupremeCalamitas;
using CalamityMod.NPCs.Yharon;
using CalamityMod.Projectiles.Boss;
using CalamityMod.Projectiles.Enemy;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Skies;
using CalamityMod.Tiles.Abyss;
using CalamityMod.Tiles.Furniture;
@@ -84,7 +88,7 @@ namespace CalamityMod
{
public class CalamityMod : Mod
{
// TODO -- I have been advised by Jopo that Mods should never contain static variables
// CONSIDER -- I have been advised by Jopo that Mods should never contain static variables
// Hotkeys
public static ModHotKey NormalityRelocatorHotKey;
@@ -97,6 +101,9 @@ namespace CalamityMod
public static ModHotKey BossBarToggleHotKey;
public static ModHotKey BossBarToggleSmallTextHotKey;
public static ModHotKey MomentumCapacitatorHotkey;
public static ModHotKey SandCloakHotkey;
public static ModHotKey SpectralVeilHotKey;
public static ModHotKey PlaguePackHotKey;
// Boss Spawners
public static int ghostKillCount = 0;
@@ -162,6 +169,11 @@ namespace CalamityMod
public static List<int> daggerList;
public static List<int> flaskBombList;
public static List<int> spikyBallList;
public static List<int> boomerangProjList;
public static List<int> javelinProjList;
public static List<int> daggerProjList;
public static List<int> flaskBombProjList;
public static List<int> spikyBallProjList;
public static List<int> noGravityList;
public static List<int> lavaFishList;
public static List<int> highTestFishList;
@@ -192,6 +204,9 @@ namespace CalamityMod
AstralTeleportHotKey = RegisterHotKey("Astral Teleport", "P");
AstralArcanumUIHotkey = RegisterHotKey("Astral Arcanum UI Toggle", "O");
MomentumCapacitatorHotkey = RegisterHotKey("Momentom Capacitater Effect", "U");
SandCloakHotkey = RegisterHotKey("Sand Cloak Effect", "C");
SpectralVeilHotKey = RegisterHotKey("Spectral Veil Teleport", "Z");
PlaguePackHotKey = RegisterHotKey("Plagued Fuel Pack Dash", "Q");
BossBarToggleHotKey = RegisterHotKey("Boss Health Bar Toggle", "NumPad0");
BossBarToggleSmallTextHotKey = RegisterHotKey("Boss Health Bar Small Text Toggle", "NumPad1");
@@ -204,6 +219,8 @@ namespace CalamityMod
BossHealthBarManager.Load(this);
TileFraming.Load();
Config.Load();
SetupLists();
@@ -280,6 +297,9 @@ namespace CalamityMod
AstralTeleportHotKey = null;
AstralArcanumUIHotkey = null;
MomentumCapacitatorHotkey = null;
SandCloakHotkey = null;
SpectralVeilHotKey = null;
PlaguePackHotKey = null;
BossBarToggleHotKey = null;
BossBarToggleSmallTextHotKey = null;
@@ -333,6 +353,11 @@ namespace CalamityMod
daggerList = null;
flaskBombList = null;
spikyBallList = null;
boomerangProjList = null;
javelinProjList = null;
daggerProjList = null;
flaskBombProjList = null;
spikyBallProjList = null;
noGravityList = null;
lavaFishList = null;
highTestFishList = null;
@@ -349,6 +374,8 @@ namespace CalamityMod
BossHealthBarManager.Unload();
base.Unload();
TileFraming.Unload();
AstralArcanumUI.Unload();
base.Unload();
@@ -833,6 +860,8 @@ namespace CalamityMod
ModContent.ItemType<ProfanedTrident>(),
ModContent.ItemType<TheBurningSky>(),
ModContent.ItemType<TotalityBreakers>(),
ModContent.ItemType<ProfanedPartisan>(),
ModContent.ItemType<BlastBarrel>(),
ModContent.ItemType<HeliumFlash>()
};
@@ -878,6 +907,7 @@ namespace CalamityMod
ModContent.ItemType<IceStar>(),
ModContent.ItemType<Icebreaker>(),
ModContent.ItemType<KelvinCatalyst>(),
ModContent.ItemType<FrostcrushValari>(),
//Cryonic Bar set stuff, could potentially be removed
ModContent.ItemType<Trinity>(),
ModContent.ItemType<Shimmerspark>(),
@@ -995,6 +1025,7 @@ namespace CalamityMod
ModContent.ItemType<GacruxianMollusk>(),
ModContent.ItemType<PolarisParrotfish>(),
ModContent.ItemType<SparklingEmpress>(),
ModContent.ItemType<NastyCholla>(),
ModContent.ItemType<YateveoBloom>()
};
@@ -1728,6 +1759,7 @@ namespace CalamityMod
ModContent.ItemType<AccretionDisk>(),
ModContent.ItemType<EnchantedAxe>(),
ModContent.ItemType<EpidemicShredder>(),
ModContent.ItemType<Equanimity>(),
ModContent.ItemType<Eradicator>(),
ModContent.ItemType<TruePaladinsHammer>(),
ModContent.ItemType<FlameScythe>(),
@@ -1743,9 +1775,49 @@ namespace CalamityMod
ModContent.ItemType<Pwnagehammer>(),
ModContent.ItemType<SandDollar>(),
ModContent.ItemType<SeashellBoomerang>(),
ModContent.ItemType<Shroomerang>(),
ModContent.ItemType<StellarContemptRogue>(),
ModContent.ItemType<TriactisTruePaladinianMageHammerofMight>(),
ModContent.ItemType<Valediction>()
ModContent.ItemType<Valediction>(),
ModContent.ItemType<FrostcrushValari>(),
ModContent.ItemType<DefectiveSphere>()
};
boomerangProjList = new List<int>()
{
ModContent.ProjectileType<AccretionDiskProj>(),
ModContent.ProjectileType<AccretionDisk2>(),
ModContent.ProjectileType<BlazingStarProj>(),
ModContent.ProjectileType<CelestusBoomerang>(),
ModContent.ProjectileType<BrimbladeProj>(),
ModContent.ProjectileType<Brimblade2>(),
ModContent.ProjectileType<EnchantedAxeProj>(),
ModContent.ProjectileType<EpidemicShredderProjectile>(),
ModContent.ProjectileType<EquanimityProj>(),
ModContent.ProjectileType<EradicatorProjectile>(),
ModContent.ProjectileType<FlameScytheProjectile>(),
ModContent.ProjectileType<GhoulishGougerBoomerang>(),
ModContent.ProjectileType<GlaiveProj>(),
ModContent.ProjectileType<KylieBoomerang>(),
ModContent.ProjectileType<MangroveChakramProjectile>(),
ModContent.ProjectileType<MoltenAmputatorProj>(),
ModContent.ProjectileType<OPHammer>(),
ModContent.ProjectileType<SandDollarProj>(),
ModContent.ProjectileType<SeashellBoomerangProjectile>(),
ModContent.ProjectileType<ShroomerangProj>(),
ModContent.ProjectileType<TriactisOPHammer>(),
ModContent.ProjectileType<ValedictionBoomerang>(),
ModContent.ProjectileType<GalaxySmasherHammer>(),
ModContent.ProjectileType<KelvinCatalystBoomerang>(),
ModContent.ProjectileType<NanoblackMain>(),
ModContent.ProjectileType<StellarContemptHammer>(),
ModContent.ProjectileType<IcebreakerHammer>(),
ModContent.ProjectileType<PwnagehammerProj>(),
ModContent.ProjectileType<ValariBoomerang>(),
ModContent.ProjectileType<SphereSpiked>(),
ModContent.ProjectileType<SphereBladed>(),
ModContent.ProjectileType<SphereYellow>(),
ModContent.ProjectileType<ButcherKnife>()
};
javelinList = new List<int>()
@@ -1765,11 +1837,34 @@ namespace CalamityMod
ModContent.ItemType<SpearofPaleolith>(),
ModContent.ItemType<XerocPitchfork>(),
ModContent.ItemType<PhantasmalRuin>(),
ModContent.ItemType<PhantomLance>(),
ModContent.ItemType<ProfanedPartisan>()
};
javelinProjList = new List<int>()
{
ModContent.ProjectileType<CrystalPiercerProjectile>(),
ModContent.ProjectileType<DuneHopperProjectile>(),
ModContent.ProjectileType<EclipsesFallMain>(),
ModContent.ProjectileType<EclipsesStealth>(),
ModContent.ProjectileType<IchorSpearProj>(),
ModContent.ProjectileType<InfernalSpearProjectile>(),
ModContent.ProjectileType<LuminousStrikerProj>(),
ModContent.ProjectileType<PalladiumJavelinProjectile>(),
ModContent.ProjectileType<PhantasmalRuinProj>(),
ModContent.ProjectileType<PhantomLanceProj>(),
ModContent.ProjectileType<ProfanedPartisanproj>(),
ModContent.ProjectileType<ScarletDevilProjectile>(),
ModContent.ProjectileType<ScourgeoftheDesertProj>(),
ModContent.ProjectileType<ScourgeoftheSeasProjectile>(),
ModContent.ProjectileType<SpearofDestinyProjectile>(),
ModContent.ProjectileType<SpearofPaleolithProj>(),
ModContent.ProjectileType<XerocPitchforkProjectile>()
};
daggerList = new List<int>()
{
ModContent.ItemType<AshenStalactite>(),
ModContent.ItemType<CobaltKunai>(),
ModContent.ItemType<FeatherKnife>(),
ModContent.ItemType<GelDart>(),
@@ -1792,7 +1887,51 @@ namespace CalamityMod
ModContent.ItemType<StellarKnife>(),
ModContent.ItemType<StormfrontRazor>(),
ModContent.ItemType<TimeBolt>(),
ModContent.ItemType<LunarKunai>()
ModContent.ItemType<LunarKunai>(),
ModContent.ItemType<GildedDagger>(),
ModContent.ItemType<GleamingDagger>(),
ModContent.ItemType<EmpyreanKnives>(),
ModContent.ItemType<RoyalKnives>()
};
daggerProjList = new List<int>()
{
ModContent.ProjectileType<AshenStalactiteProj>(),
ModContent.ProjectileType<AshenStalagmiteProj>(),
ModContent.ProjectileType<CinquedeaProj>(),
ModContent.ProjectileType<CobaltKunaiProjectile>(),
ModContent.ProjectileType<CosmicKunaiProj>(),
ModContent.ProjectileType<CrystallineProj>(),
ModContent.ProjectileType<Crystalline2>(),
ModContent.ProjectileType<CursedDaggerProj>(),
ModContent.ProjectileType<EmpyreanKnife>(),
ModContent.ProjectileType<FeatherKnifeProjectile>(),
ModContent.ProjectileType<GelDartProjectile>(),
ModContent.ProjectileType<GildedDaggerProj>(),
ModContent.ProjectileType<GleamingDaggerProj>(),
ModContent.ProjectileType<IllustriousKnife>(),
ModContent.ProjectileType<LunarKunaiProj>(),
ModContent.ProjectileType<MalachiteProj>(),
ModContent.ProjectileType<MalachiteBolt>(),
ModContent.ProjectileType<MonkeyDart>(),
ModContent.ProjectileType<MycorootProj>(),
ModContent.ProjectileType<MythrilKnifeProjectile>(),
ModContent.ProjectileType<OrichalcumSpikedGemstoneProjectile>(),
ModContent.ProjectileType<PrismallineProj>(),
ModContent.ProjectileType<Prismalline2>(),
ModContent.ProjectileType<Prismalline3>(),
ModContent.ProjectileType<QuasarKnife>(),
ModContent.ProjectileType<Quasar2>(),
ModContent.ProjectileType<RadiantStarKnife>(),
ModContent.ProjectileType<RadiantStar2>(),
ModContent.ProjectileType<ShatteredSunKnife>(),
ModContent.ProjectileType<ShatteredSun2>(),
ModContent.ProjectileType<ShatteredSun3>(),
ModContent.ProjectileType<StellarKnifeProj>(),
ModContent.ProjectileType<StormfrontRazorProjectile>(),
ModContent.ProjectileType<TarragonThrowingDartProjectile>(),
ModContent.ProjectileType<TimeBoltKnife>(),
ModContent.ProjectileType<WulfrumKnifeProj>()
};
flaskBombList = new List<int>()
@@ -1803,18 +1942,46 @@ namespace CalamityMod
ModContent.ItemType<DuststormInABottle>(),
ModContent.ItemType<SeafoamBomb>(),
ModContent.ItemType<ConsecratedWater>(),
ModContent.ItemType<DesecratedWater>(),
ModContent.ItemType<BouncingBetty>(),
ModContent.ItemType<TotalityBreakers>(),
ModContent.ItemType<BlastBarrel>()
};
flaskBombProjList = new List<int>()
{
ModContent.ProjectileType<BallisticPoisonBombProj>(),
ModContent.ProjectileType<BlastBarrelProjectile>(),
ModContent.ProjectileType<BouncingBettyProjectile>(),
ModContent.ProjectileType<BrackishFlaskProj>(),
ModContent.ProjectileType<DuststormInABottleProj>(),
ModContent.ProjectileType<PlaguenadeProj>(),
ModContent.ProjectileType<SeafoamBombProj>(),
ModContent.ProjectileType<TotalityFlask>(),
ModContent.ProjectileType<ConsecratedWaterProjectile>(),
ModContent.ProjectileType<DesecratedWaterProj>()
};
spikyBallList = new List<int>()
{
ModContent.ItemType<BouncySpikyBall>(),
ModContent.ItemType<GodsParanoia>(),
ModContent.ItemType<NastyCholla>(),
ModContent.ItemType<HellsSun>(),
ModContent.ItemType<SkyStabber>(),
ModContent.ItemType<StickySpikyBall>()
ModContent.ItemType<StickySpikyBall>(),
ModContent.ItemType<WebBall>()
};
spikyBallProjList = new List<int>()
{
ModContent.ProjectileType<BouncyBol>(),
ModContent.ProjectileType<GodsParanoiaProj>(),
ModContent.ProjectileType<HellsSunProj>(),
ModContent.ProjectileType<NastyChollaBol>(),
ModContent.ProjectileType<StickyBol>(),
ModContent.ProjectileType<SkyStabberProj>(),
ModContent.ProjectileType<WebBallBol>()
};
noGravityList = new List<int>()
@@ -2011,6 +2178,7 @@ namespace CalamityMod
ModContent.TileType<BotanicChandelier>(),
ModContent.TileType<BotanicLamp>(),
ModContent.TileType<BotanicLantern>(),
ModContent.TileType<CosmiliteBasinTile>(),
ModContent.TileType<CosmiliteCandle>(),
ModContent.TileType<CosmiliteCandelabra>(),
ModContent.TileType<CosmiliteChandelier>(),
@@ -3121,6 +3289,32 @@ namespace CalamityMod
case CalamityModMessageType.DeathCountSync:
Main.player[reader.ReadInt32()].Calamity().HandleDeathCount(reader);
break;
case CalamityModMessageType.RevengeanceBoolSync:
bool revActive = reader.ReadBoolean();
CalamityWorld.revenge = revActive;
break;
case CalamityModMessageType.DeathBoolSync:
bool revActive2 = reader.ReadBoolean();
CalamityWorld.revenge = revActive2;
bool deathActive = reader.ReadBoolean();
CalamityWorld.death = deathActive;
break;
case CalamityModMessageType.DefiledBoolSync:
bool defiledActive = reader.ReadBoolean();
CalamityWorld.defiled = defiledActive;
break;
case CalamityModMessageType.IronHeartBoolSync:
bool ironHeartActive = reader.ReadBoolean();
CalamityWorld.ironHeart = ironHeartActive;
break;
case CalamityModMessageType.ArmageddonBoolSync:
bool armaActive = reader.ReadBoolean();
CalamityWorld.armageddon = armaActive;
break;
case CalamityModMessageType.NPCRegenerationSync:
byte npcIndex = reader.ReadByte();
Main.npc[npcIndex].lifeRegen = reader.ReadInt32();
break;
default:
Logger.Warn("Unknown Message type: " + msgType);
break;
@@ -3142,7 +3336,9 @@ namespace CalamityMod
public static void UpdateServerBoolean()
{
if (Main.netMode == NetmodeID.Server)
{
NetMessage.SendData(7, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
}
}
#endregion
}
@@ -3174,7 +3370,14 @@ namespace CalamityMod
DoGCountdownSync,
BossSpawnCountdownSync,
BossTypeSync,
DeathCountSync
DeathCountSync,
RevengeanceBoolSync,
DeathBoolSync,
DefiledBoolSync,
IronHeartBoolSync,
ArmageddonBoolSync,
DemonTrophyBoolSync,
NPCRegenerationSync
//DistanceFromBossSync
}
}
+39
View File
@@ -0,0 +1,39 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class EtherealExtorter : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ethereal Extorter");
Tooltip.SetDefault(@"Infuses souls into your weapons and body generating different boosts that vary with the environment
Rogue projectiles rarely explode into homing souls
10% rogue damage but reduced life regen");
}
public override void SetDefaults()
{
item.width = 28;
item.height = 32;
item.accessory = true;
item.value = Item.buyPrice(0, 24, 0, 0);
item.rare = 8;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.etherealExtorter = true;
modPlayer.throwingDamage += 0.1f;
player.lifeRegen -= 1; //canceled out in mushroom biome btw
if (Main.moonPhase == 4) //new moon
{
modPlayer.rogueStealthMax += 0.1f;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

+35
View File
@@ -0,0 +1,35 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class PlaguedFuelPack : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Plagued Fuel Pack");
Tooltip.SetDefault("*5 increased rogue damage\n" +
"15% increased rogue projectile velocity\n" +
"Press [Hotkey] to consume 25% of your maximum stealth to perform a swift upwards/diagonal dash which leaves a trail of plagued clouds\n" +
"This effect has a 3 second cooldown before it can be used again");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 36;
item.value = Item.buyPrice(0, 24, 0, 0);
item.rare = 8;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.Calamity().throwingDamage += 0.08f;
player.Calamity().throwingVelocity += 0.15f;
player.Calamity().plaguedFuelPack = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

+34
View File
@@ -0,0 +1,34 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class SandCloak : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Sand Cloak");
Tooltip.SetDefault("+1 defense and 5% increased movement speed\n" +
"Press C to consume 25% of your maximum stealth to create a protective dust veil which provides +6 defense and +2 life regen\n" +
"This effect has a 30 second cooldown before it can be used again");
}
public override void SetDefaults()
{
item.width = 30;
item.height = 44;
item.value = Item.buyPrice(0, 2, 0, 0);
item.rare = 2;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.statDefense += 1;
player.moveSpeed += 0.05f;
player.Calamity().sandCloak = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

+1 -9
View File
@@ -35,15 +35,7 @@ namespace CalamityMod.Items.Accessories
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.AddRecipeGroup("Boss2Material", 3);
recipe.AddTile(TileID.TinkerersWorkbench);
recipe.SetResult(this);
recipe.AddRecipe();
+32
View File
@@ -0,0 +1,32 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class SpectralVeil : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Spectral Veil");
Tooltip.SetDefault("The inside of the cloak is full of teeth...\n" +
"Press Z to consume 25% of your maximum stealth to perform a short range teleport and render you momentarily invulnerable\n" +
"If you dodge something while invulnerable, you instantly gain full stealth");
}
public override void SetDefaults()
{
item.width = 30;
item.height = 38;
item.value = Item.buyPrice(1, 40, 0, 0);
item.Calamity().postMoonLordRarity = 13;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.Calamity().spectralVeil = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

+1
View File
@@ -61,6 +61,7 @@ namespace CalamityMod.Items.Accessories.Wings
player.pickSpeed -= 0.05f;
player.allDamage += 0.05f;
player.wingTimeMax = 100;
player.noFallDmg = true;
}
}
}
-1
View File
@@ -16,7 +16,6 @@ namespace CalamityMod.Items.Ammo
public override void SetDefaults()
{
item.ammo = AmmoID.Solution;
// TODO -- what is even happening here
item.shoot = ModContent.ProjectileType<AstralSpray>() - ProjectileID.PureSpray;
item.width = 10;
item.height = 12;
+1 -1
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Ammo.FiniteUse
item.rare = 8;
item.shoot = ModContent.ProjectileType<ExplosiveShotgunShell>();
item.shootSpeed = 12f;
item.ammo = ModContent.ItemType<ExplosiveShells>(); // TODO -- would item.type work here
item.ammo = ModContent.ItemType<ExplosiveShells>(); // CONSIDER -- Would item.type work here instead of a self reference?
}
}
}
+1 -1
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Ammo.FiniteUse
item.rare = 8;
item.shoot = ModContent.ProjectileType<GrenadeRound>();
item.shootSpeed = 12f;
item.ammo = ModContent.ItemType<GrenadeRounds>(); // TODO -- would item.type work here
item.ammo = ModContent.ItemType<GrenadeRounds>(); // CONSIDER -- Would item.type work here instead of a self reference?
}
}
}
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Ammo.FiniteUse
item.rare = 8;
item.shoot = ModContent.ProjectileType<MagnumRound>();
item.shootSpeed = 12f;
item.ammo = ModContent.ItemType<MagnumRounds>(); // TODO -- would item.type work here
item.ammo = ModContent.ItemType<MagnumRounds>(); // CONSIDER -- Would item.type work here instead of a self reference?
}
}
}
+2 -2
View File
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Armor
player.Calamity().throwingVelocity += 0.10f;
}
/*public override void AddRecipes()
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<SolarVeil>(), 12);
@@ -63,6 +63,6 @@ namespace CalamityMod.Items.Armor
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}*/
}
}
}
+21 -6
View File
@@ -290,9 +290,14 @@ namespace CalamityMod.Items
{
if (item.ranged && !rogue && Main.rand.Next(0, 100) >= 80)
{
double damageMult = 1.0;
damageMult = (double)(item.useTime) / 30.0;
double newDamage = (double)damage * 2 * damageMult;
if (player.whoAmI == Main.myPlayer)
{
Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, ModContent.ProjectileType<Minibirb>(), (int)((double)damage * 2), 2f, player.whoAmI, 0f, 0f);
Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, ModContent.ProjectileType<Minibirb>(), (int)newDamage, 2f, player.whoAmI, 0f, 0f);
}
}
}
@@ -450,6 +455,10 @@ namespace CalamityMod.Items
{
return false;
}
if ((item.type == ItemID.ShinePotion || item.type == ItemID.NightOwlPotion) && (modPlayer.etherealExtorter && modPlayer.ZoneAbyss))
{
return false;
}
if ((item.type == ItemID.SuperAbsorbantSponge || item.type == ItemID.EmptyBucket) && modPlayer.ZoneAbyss)
{
return false;
@@ -846,7 +855,7 @@ namespace CalamityMod.Items
}
}
}
if (item.type == ItemID.IronHelmet || item.type == ItemID.IronChainmail || item.type == ItemID.IronGreaves)
if (item.type == ItemID.AncientIronHelmet || item.type == ItemID.IronHelmet || item.type == ItemID.IronChainmail || item.type == ItemID.IronGreaves)
{
foreach (TooltipLine line2 in tooltips)
{
@@ -886,7 +895,7 @@ namespace CalamityMod.Items
}
}
}
if (item.type == ItemID.GoldHelmet || item.type == ItemID.GoldChainmail || item.type == ItemID.GoldGreaves)
if (item.type == ItemID.AncientGoldHelmet || item.type == ItemID.GoldHelmet || item.type == ItemID.GoldChainmail || item.type == ItemID.GoldGreaves)
{
foreach (TooltipLine line2 in tooltips)
{
@@ -1919,6 +1928,11 @@ Grants immunity to fire blocks, and temporary immunity to lava";
DropHelper.DropItemCondition(player, ModContent.ItemType<CounterScarf>(), CalamityWorld.revenge);
break;
// Queen Bee
case ItemID.QueenBeeBossBag:
DropHelper.DropItem(player, ModContent.ItemType<HardenedHoneycomb>(), 50, 75);
break;
// Skeletron
case ItemID.SkeletronBossBag:
DropHelper.DropItemChance(player, ModContent.ItemType<ClothiersWrath>(), DropHelper.RareVariantDropRateInt);
@@ -1987,7 +2001,7 @@ Grants immunity to fire blocks, and temporary immunity to lava";
return "Copper";
if (head.type == ItemID.TinHelmet && body.type == ItemID.TinChainmail && legs.type == ItemID.TinGreaves)
return "Tin";
if (head.type == ItemID.IronHelmet && body.type == ItemID.IronChainmail && legs.type == ItemID.IronGreaves)
if ((head.type == ItemID.IronHelmet || head.type == ItemID.AncientIronHelmet) && body.type == ItemID.IronChainmail && legs.type == ItemID.IronGreaves)
return "Iron";
if (head.type == ItemID.LeadHelmet && body.type == ItemID.LeadChainmail && legs.type == ItemID.LeadGreaves)
return "Lead";
@@ -1995,7 +2009,7 @@ Grants immunity to fire blocks, and temporary immunity to lava";
return "Silver";
if (head.type == ItemID.TungstenHelmet && body.type == ItemID.TungstenChainmail && legs.type == ItemID.TungstenGreaves)
return "Tungsten";
if (head.type == ItemID.GoldHelmet && body.type == ItemID.GoldChainmail && legs.type == ItemID.GoldGreaves)
if ((head.type == ItemID.GoldHelmet || head.type == ItemID.AncientGoldHelmet) && body.type == ItemID.GoldChainmail && legs.type == ItemID.GoldGreaves)
return "Gold";
if (head.type == ItemID.PlatinumHelmet && body.type == ItemID.PlatinumChainmail && legs.type == ItemID.PlatinumGreaves)
return "Platinum";
@@ -2414,7 +2428,8 @@ Grants immunity to fire blocks, and temporary immunity to lava";
(modPlayer.soaring ? 0.1f : 0f) +
(modPlayer.holyWrath ? 0.05f : 0f) +
(modPlayer.profanedRage ? 0.05f : 0f) +
(modPlayer.draconicSurge ? 0.15f : 0f);
(modPlayer.draconicSurge ? 0.15f : 0f) +
(modPlayer.etherealExtorter && modPlayer.ZoneAstral ? 0.05f : 0f);
if (flightSpeedMult > 1.2f)
flightSpeedMult = 1.2f;
+8
View File
@@ -72,6 +72,14 @@ namespace CalamityMod.Items.DifficultyItems
}
CalamityMod.UpdateServerBoolean();
if (Main.netMode == NetmodeID.Server)
{
var netMessage = mod.GetPacket();
netMessage.Write((uint)CalamityModMessageType.ArmageddonBoolSync);
netMessage.Write(CalamityWorld.armageddon);
netMessage.Send();
}
return true;
}
+8
View File
@@ -86,6 +86,14 @@ namespace CalamityMod.Items.DifficultyItems
}
CalamityMod.UpdateServerBoolean();
if (Main.netMode == NetmodeID.Server)
{
var netMessage = mod.GetPacket();
netMessage.Write((byte)CalamityModMessageType.DeathBoolSync);
netMessage.Write(CalamityWorld.death);
netMessage.Send();
}
return true;
}
+10
View File
@@ -83,6 +83,16 @@ namespace CalamityMod.Items.DifficultyItems
}
CalamityMod.UpdateServerBoolean();
if (Main.netMode == NetmodeID.Server)
{
var netMessage = mod.GetPacket();
netMessage.Write((byte)CalamityModMessageType.RevengeanceBoolSync);
netMessage.Write(CalamityWorld.revenge);
netMessage.Write((byte)CalamityModMessageType.DefiledBoolSync);
netMessage.Write(CalamityWorld.defiled);
netMessage.Send();
}
return true;
}
+8
View File
@@ -83,6 +83,14 @@ namespace CalamityMod.Items.DifficultyItems
}
}
CalamityMod.UpdateServerBoolean();
if (Main.netMode == NetmodeID.Server)
{
var netMessage = mod.GetPacket();
netMessage.Write((byte)CalamityModMessageType.IronHeartBoolSync);
netMessage.Write(CalamityWorld.ironHeart);
netMessage.Send();
}
return true;
}
}
+7
View File
@@ -31,6 +31,13 @@ namespace CalamityMod.Items.DifficultyItems
{
CalamityWorld.demonMode = true;
CalamityMod.UpdateServerBoolean();
if (Main.netMode == NetmodeID.Server)
{
var netMessage = mod.GetPacket();
netMessage.Write((byte)CalamityModMessageType.DemonTrophyBoolSync);
netMessage.Write(CalamityWorld.demonMode);
netMessage.Send();
}
return true;
}
}
+7
View File
@@ -128,6 +128,13 @@ namespace CalamityMod.Items.DifficultyItems
}
CalamityMod.UpdateServerBoolean();
if (Main.netMode == NetmodeID.Server)
{
var netMessage = mod.GetPacket();
netMessage.Write((byte)CalamityModMessageType.RevengeanceBoolSync);
netMessage.Write(CalamityWorld.revenge);
netMessage.Send();
}
}
return true;
}
@@ -11,8 +11,9 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Bloodfin");
Tooltip.SetDefault("Boosts life regen for 10 seconds\n" +
"Angiogenesis");
Tooltip.SetDefault(@"Grants a buff that boosts life regen for 10 seconds
The life regen boost is stronger if below 75% health
Angiogenesis");
}
public override void SetDefaults()
@@ -31,8 +32,6 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
item.consumable = true;
item.healLife = 240;
item.potion = true;
item.buffType = ModContent.BuffType<BloodfinBoost>();
item.buffTime = 600;
}
public override bool CanUseItem(Player player)
+2 -2
View File
@@ -62,7 +62,7 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
}
// Equipment
DropHelper.DropItemFromSetCondition(player, Main.hardMode, 0.2f,
DropHelper.DropItemFromSetCondition(player, NPC.downedBoss3, 0.25f,
ModContent.ItemType<StrangeOrb>(),
ModContent.ItemType<DepthCharm>(),
ModContent.ItemType<IronBoots>(),
@@ -85,7 +85,7 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
DropHelper.DropItemChance(player, ModContent.ItemType<AnechoicCoating>(), 10, 1, 3);
if (Main.hardMode)
{
DropHelper.DropItem(player, Main.rand.Next(100) >= 49 ? ItemID.GreaterHealingPotion: ItemID.GreaterManaPotion, 5, 10);
DropHelper.DropItem(player, Main.rand.Next(100) >= 49 ? ItemID.GreaterHealingPotion : ItemID.GreaterManaPotion, 5, 10);
}
else
{
@@ -0,0 +1,41 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Tiles.FurnitureCosmilite;
using CalamityMod.Tiles.Furniture.CraftingStations;
namespace CalamityMod.Items.Placeables.FurnitureCosmilite
{
public class CosmiliteBasin : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Cosmilite Basin");
}
public override void SetDefaults()
{
item.width = 8;
item.height = 10;
item.maxStack = 999;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.createTile = ModContent.TileType<CosmiliteBasinTile>();
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<CosmiliteBrick>(), 10);
recipe.AddIngredient(ItemID.IronBar, 5);
recipe.anyIronBar = true;
recipe.SetResult(this, 1);
recipe.AddTile(ModContent.TileType<DraedonsForge>());
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

@@ -29,14 +29,7 @@ namespace CalamityMod.Items.Placeables.FurnitureSilva
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<SilvaCrystal>(), 4);
recipe.AddIngredient(ModContent.ItemType<EffulgentFeather>(), 4);
recipe.AddIngredient(ItemID.GoldBar);
recipe.SetResult(this);
recipe.AddTile(ModContent.TileType<SilvaBasin>());
recipe.AddRecipe();
recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<SilvaCrystal>(), 4);
recipe.AddIngredient(ModContent.ItemType<EffulgentFeather>(), 4);
recipe.AddIngredient(ItemID.PlatinumBar);
recipe.AddRecipeGroup("AnyGoldBar");
recipe.SetResult(this);
recipe.AddTile(ModContent.TileType<SilvaBasin>());
recipe.AddRecipe();
@@ -27,15 +27,7 @@ namespace CalamityMod.Items.Placeables.FurnitureSilva
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<SilvaCrystal>(), 8);
recipe.AddIngredient(ItemID.GoldBar);
recipe.anyIronBar = true;
recipe.SetResult(this);
recipe.AddTile(ModContent.TileType<SilvaBasin>());
recipe.AddRecipe();
recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<SilvaCrystal>(), 8);
recipe.AddIngredient(ItemID.PlatinumBar);
recipe.anyIronBar = true;
recipe.AddRecipeGroup("AnyGoldBar");
recipe.SetResult(this);
recipe.AddTile(ModContent.TileType<SilvaBasin>());
recipe.AddRecipe();
@@ -27,15 +27,7 @@ namespace CalamityMod.Items.Placeables.FurnitureSilva
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<SilvaCrystal>(), 10);
recipe.AddIngredient(ItemID.GoldBar, 3);
recipe.anyIronBar = true;
recipe.AddIngredient(ItemID.Glass, 6);
recipe.SetResult(this);
recipe.AddTile(ModContent.TileType<SilvaBasin>());
recipe.AddRecipe();
recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<SilvaCrystal>(), 10);
recipe.AddIngredient(ItemID.PlatinumBar, 3);
recipe.AddRecipeGroup("AnyGoldBar", 3);
recipe.anyIronBar = true;
recipe.AddIngredient(ItemID.Glass, 6);
recipe.SetResult(this);
+3 -4
View File
@@ -26,15 +26,14 @@ namespace CalamityMod.Items.Potions
item.UseSound = SoundID.Item3;
item.consumable = true;
item.value = Item.buyPrice(0, 4, 50, 0);
item.buffType = BuffID.WellFed;
item.buffTime = 108000;
item.buffType = BuffID.MagicPower;
item.buffTime = 21600;
}
public override void OnConsumeItem(Player player)
{
player.AddBuff(BuffID.ManaRegeneration, 21600);
player.AddBuff(BuffID.MagicPower, 21600);
player.AddBuff(BuffID.WellFed, 108000);
player.AddBuff(BuffID.ManaRegeneration, 21600);
}
}
}
+1 -1
View File
@@ -34,7 +34,7 @@ namespace CalamityMod.Items
return true;
}
// TODO -- Make Super Dummies work in multiplayer by spawning correctly.
// DEFECT -- Make Super Dummies work in multiplayer by spawning correctly.
public override bool UseItem(Player player)
{
if (player.altFunctionUse == 2)
+1
View File
@@ -50,6 +50,7 @@ namespace CalamityMod.Items.TreasureBags
DropHelper.DropItemChance(player, ModContent.ItemType<Fungicide>(), 3);
DropHelper.DropItemChance(player, ModContent.ItemType<HyphaeRod>(), 3);
DropHelper.DropItemChance(player, ModContent.ItemType<Mycoroot>(), 3);
DropHelper.DropItemChance(player, ModContent.ItemType<Shroomerang>(), 3);
// Equipment
DropHelper.DropItem(player, ModContent.ItemType<FungalClump>());
+2 -2
View File
@@ -39,10 +39,10 @@ namespace CalamityMod.Items.Weapons.Magic
item.Calamity().postMoonLordRarity = 13;
}
public override Vector2? HoldoutOrigin()
/*public override Vector2? HoldoutOrigin()
{
return new Vector2(15, 15);
}
}*/
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
+2 -2
View File
@@ -38,10 +38,10 @@ namespace CalamityMod.Items.Weapons.Magic
item.Calamity().postMoonLordRarity = 13;
}
public override Vector2? HoldoutOrigin()
/*public override Vector2? HoldoutOrigin()
{
return new Vector2(15, 15);
}
}*/
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
+1 -1
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
public class HeliumFlash : ModItem
{
public static int BaseDamage = 1900;
public static int BaseDamage = 1280;
public static float Speed = 15f;
public override void SetStaticDefaults()
+2 -2
View File
@@ -39,10 +39,10 @@ namespace CalamityMod.Items.Weapons.Magic
item.Calamity().postMoonLordRarity = 14;
}
public override Vector2? HoldoutOrigin()
/*public override Vector2? HoldoutOrigin()
{
return new Vector2(15, 15);
}
}*/
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
+2 -2
View File
@@ -41,10 +41,10 @@ namespace CalamityMod.Items.Weapons.Magic
item.Calamity().postMoonLordRarity = 17;
}
public override Vector2? HoldoutOrigin()
/*public override Vector2? HoldoutOrigin()
{
return new Vector2(30, 30);
}
}*/
public override bool AltFunctionUse(Player player)
{
+1 -1
View File
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee
crit = false;
}
// TODO -- Providence specifically is immune to Coldheart Icicle. There is probably a better way to do this
// LATER -- Providence specifically is immune to Coldheart Icicle. There is probably a better way to do this
public override void ModifyHitNPC(Player player, NPC target, ref int damage, ref float knockBack, ref bool crit)
{
damage = 1;
+68 -151
View File
@@ -1,10 +1,13 @@
using CalamityMod.Projectiles.Melee;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.GameInput;
using Terraria.Graphics.Capture;
using Terraria.ModLoader;
using Terraria.World.Generation;
namespace CalamityMod.Items.Weapons.Melee
{
@@ -12,65 +15,37 @@ namespace CalamityMod.Items.Weapons.Melee
{
//Help, they're forcing me to slave away at Calamity until I die! - Dominic
public int SwingType;
//Weapon attribute constants
public static readonly int BaseDamage = 8;
public static readonly int BaseDamage = 11145;
public static readonly int HardmodeDamage = 24;
public static readonly float TrueMeleeBoost = 2.5f;
public static readonly int PostMoonLordDamage = 270;
public static readonly int PostYharonDamage = 10000;
public static readonly float TrueMeleeBoostPreHardmode = 1.75f;
public static readonly float TrueMeleeBoostHardmode = 2.5f;
public static readonly float GiantSkullDamageMultiplier = 1.5f;
//Weapon projectile attribute constants
public static readonly int BaseSearchDistance = 400;
public static readonly int SearchDistance = 1450;
public static readonly int HardmodeSearchDistance = 660;
public static readonly int ImmunityFrames = 2;
public static readonly int PostMoonLordSearchDistance = 940;
public static readonly int PostYharonSearchDistance = 1450;
public static readonly int BaseImmunityFrames = 11;
public static readonly int HardmodeImmunityFrames = 7;
public static readonly int PostMoonLordImmunityFrames = 4;
public static readonly int PostYharonImmunityFrames = 2;
public static readonly int SkullsplosionCooldownSeconds = 10;
public static readonly int PreMoonlordPenetrate = 3; //Infinite after Moon lord is dead
public static readonly int SkullsplosionCooldownSeconds = 30;
//Skull ring attribute constants
public static readonly float MaxRageBoost = 2.5f;
public static readonly float RageBoostMultiplier = 1.5f;
public static readonly float MaxRageBoost = 1.5f;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Gael's Greatsword");
Tooltip.SetDefault("Raises the player's damage reduction by 10% when wielding this sword\n" +
"There are three random attacks that can occur when the blade is swung\n" +
"The first attack releases two blood-skulls that home in\n" +
"The second attack releases an enormous slow-moving skull\n" +
"This slow-moving skull becomes weaker with time and lasts for around 4 seconds seconds\n" +
"The second attack causes a true melee strike with increased damage\n" +
"If you're below 50% life, swings release blood droplets\n" +
"Pressing the Rage Key while holding this weapon resets Rage to 0 and releases a circle of\n" +
"Slow-moving blood skulls. If Rage is full, the skulls do way more damage. Otherwise, the skull's damage is\n" +
"related to the amount of rage sacrificed\n" +
"This effect has a " + SkullsplosionCooldownSeconds + " second cooldown.\n" +
"The user can right click with the sword to deflect projectiles and enemy attacks 50% of the time");
Tooltip.SetDefault("First swing fires homing skulls\n" +
"Second swing fires a giant, powerful skull\n" +
"Third swing deals massive damage\n" +
"Constantly generates rage when in use\n" +
"[Swings leave behind exploding blood trails [Below 50% health]]\n" +
"[Right click to swipe the sword, reflecting projectiles at a 50% chance]\n" +
"[Activating Rage Mode releases an enormous barrage of skulls]\n" +
"'Give me that thing, your dark soul'");
}
//NOTE: GetWeaponDamage is in the CalamityPlayer file
public override void SetDefaults()
@@ -114,134 +89,63 @@ namespace CalamityMod.Items.Weapons.Melee
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
SwingType = Main.rand.Next(3);
//Almost entirely Ultimus Cleaver code. Feel free to clean it up if you wish.
if (player.whoAmI == Main.myPlayer &&
player.statLife < player.statLifeMax * 0.5 &&
player.Calamity().gaelBloodShotCooldown == 0)
if (CalamityUtils.CountProjectiles(ModContent.ProjectileType<LightningThing>()) < 3 &&
player.statLife <= player.statLifeMax2 * 0.5f)
{
float velocityY = 0f;
float velocityX = 0f;
float spawnAdditiveY = 0f;
float spawnAdditiveX = 0f;
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.8))
Point origin = (player.Center + Main.rand.Next(-300, 301) * Vector2.UnitX).ToTileCoordinates();
Point p;
if (WorldUtils.Find(origin, Searches.Chain(new Searches.Down(400), new GenCondition[]
{
velocityY = -7f;
new Conditions.IsSolid()
}), out p))
{
Projectile.NewProjectile(p.ToWorldCoordinates(8f, 0f), Vector2.Zero, ModContent.ProjectileType<LightningThing>(), 0, 0f, player.whoAmI);
}
if (player.direction == -1)
}
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.5))
{
player.Calamity().gaelSwipes++;
if (player.statLife <= player.statLifeMax2 * 0.5f)
{
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.9))
for (int i = 0; i < 170; i++)
{
spawnAdditiveX -= 8f;
float r = (float)Math.Sqrt(Main.rand.NextDouble());
float t = Main.rand.NextFloat() * MathHelper.TwoPi;
Vector2 dustSpawn = t.ToRotationVector2() * r * item.Size;
if (dustSpawn.X > item.width / 2)
{
Dust.NewDustPerfect(player.MountedCenter + dustSpawn.RotatedBy(player.itemRotation) * player.direction, 218, Vector2.Zero).noGravity = true;
}
else
{
//Don't waste this version of "i" just because we failed. Decrease so that we can try again.
i--;
continue;
}
if (Main.rand.NextBool(100))
{
Projectile.NewProjectile(player.MountedCenter + dustSpawn.RotatedBy(player.itemRotation) * player.direction, Vector2.Zero, ModContent.ProjectileType<GaelExplosion>(), BaseDamage, 0f, player.whoAmI);
}
}
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7))
{
spawnAdditiveX -= 6f;
}
}
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7))
{
spawnAdditiveX = 26f;
}
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.6))
{
velocityY = -6f;
velocityX = 2f;
}
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.4))
{
velocityY = -4f;
velocityX = 4f;
}
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.3))
{
spawnAdditiveX -= 4f;
spawnAdditiveY -= 20f;
}
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.2))
{
velocityY = -2f;
velocityX = 6f;
}
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.1))
{
velocityX = 7f;
}
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.1))
{
spawnAdditiveY += 6f;
}
velocityY *= 1.35f;
velocityX *= 1.35f;
spawnAdditiveX *= (float)player.direction * Main.rand.NextFloat(0.9f, 1.1f);
spawnAdditiveY *= player.gravDir;
Projectile.NewProjectile((float)(hitbox.X + hitbox.Width / 2) + spawnAdditiveX, (float)(hitbox.Y + hitbox.Height / 2) + spawnAdditiveY,
(float)player.direction * velocityX, velocityY * player.gravDir, ModContent.ProjectileType<GaelSpark>(), (int)((float)item.damage * 0.35f * player.meleeDamage), 0f, player.whoAmI, 0f, 0f);
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.9))
{
player.Calamity().gaelBloodShotCooldown = 30;
}
}
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit)
{
//True melee boost
if (SwingType == 2)
if (player.Calamity().gaelSwipes % 3 == 2)
{
damage = (int)((Main.hardMode ? TrueMeleeBoostHardmode : TrueMeleeBoostPreHardmode) * damage);
damage = (int)(TrueMeleeBoost * damage);
}
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
//This is mostly from a function in Player.cs which handles the Brand of the Inferno alt click effect
//attackCD = The attack countdown. Can reflect attacks from projectiles and hostile npcs while > 0
//shield_parry_cooldown = A simple count down variable for effects.
if (player.altFunctionUse == 2)
{
bool shieldRaised = false;
if (player.selectedItem != 58 && player.controlUseTile && !player.tileInteractionHappened && player.releaseUseItem && !player.controlUseItem && !player.mouseInterface && !CaptureManager.Instance.Active && !Main.HoveringOverAnNPC && !Main.SmartInteractShowingGenuine
&& player.inventory[player.selectedItem].type == ModContent.ItemType<GaelsGreatsword>() && !player.mount.Active && (player.itemAnimation == 0 || PlayerInput.Triggers.JustPressed.MouseRight))
{
shieldRaised = true;
}
if (player.shield_parry_cooldown > 0)
{
player.shield_parry_cooldown--;
if (player.shield_parry_cooldown == 1)
{
Main.PlaySound(25, -1, -1, 1, 1f, 0f);
for (int i = 0; i < 10; i++)
{
int dustIndex = Dust.NewDust(player.Center + new Vector2((float)(player.direction * 6 + ((player.direction == -1) ? -10 : 0)), -14f), 10, 16, 45, 0f, 0f, 255, new Color(255, 100, 0, 127), (float)Main.rand.NextFloat(1f, 1.6f));
Main.dust[dustIndex].noLight = true;
Main.dust[dustIndex].noGravity = true;
Main.dust[dustIndex].velocity *= 0.5f;
}
}
}
if (shieldRaised != player.shieldRaised)
{
player.shieldRaised = shieldRaised;
if (player.shieldRaised)
{
player.itemAnimation = 0;
player.itemTime = 0;
player.reuseDelay = 0;
}
else
{
player.shield_parry_cooldown = 15;
if (player.attackCD < 30)
{
player.attackCD = 30;
}
}
}
//CalamityPlayer.cs line 7373. Thank me later.
return false;
}
switch (SwingType)
switch (player.Calamity().gaelSwipes % 3)
{
//Two small, quick skulls
case 0:
@@ -255,7 +159,20 @@ namespace CalamityMod.Items.Weapons.Melee
break;
//Giant, slow, fading skull
case 1:
int projectileIndex = Projectile.NewProjectile(position, new Vector2(speedX,speedY) * 0.5f, type, damage * 2, knockBack, player.whoAmI, ai1:1f);
int largeSkullDmg = damage * 2;
if (CalamityWorld.downedYharon)
{
largeSkullDmg = (int)((float)damage * 1.5f);
}
else if (NPC.downedMoonlord)
{
largeSkullDmg = damage * 2;
}
else if (Main.hardMode)
{
largeSkullDmg = damage * 2;
}
int projectileIndex = Projectile.NewProjectile(position, new Vector2(speedX,speedY) * 0.5f, type, largeSkullDmg, knockBack, player.whoAmI, ai1:1f);
Main.projectile[projectileIndex].scale = 1.75f;
break;
}
+1 -1
View File
@@ -63,7 +63,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Main.PlaySound(2, (int)player.position.X, (int)player.position.Y, 14);
// TODO -- HiveBombExplosion doesn't exist. Is it supposed to?
// DEFECT -- HiveBombExplosion does not exist.
// Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<HiveBombExplosion>(), (int)((float)item.damage * player.meleeDamage), knockback, Main.myPlayer);
for (int num621 = 0; num621 < 30; num621++)
+74
View File
@@ -0,0 +1,74 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class TerraDiskMelee : ModItem
{
public static int BaseDamage = 70;
public static float Speed = 12f;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Terra Disk");
Tooltip.SetDefault(@"Throws a disk that has a chance to generate several disks if enemies are near it
A max of three disks can be active at a time");
}
public override void SetDefaults()
{
item.width = 46;
item.height = 46;
item.damage = BaseDamage;
item.knockBack = 4f;
item.useAnimation = 16;
item.useTime = 16;
item.autoReuse = true;
item.noMelee = true;
item.noUseGraphic = true;
item.useStyle = 1;
item.UseSound = SoundID.Item1;
item.value = Item.buyPrice(0, 80, 0, 0);
item.rare = 8;
item.melee = true;
item.shoot = ModContent.ProjectileType<TerraDiskProjectile>();
item.shootSpeed = Speed;
}
public override bool CanUseItem(Player player)
{
if (player.ownedProjectileCounts[item.shoot] >= 3)
{
return false;
}
else
{
return true;
}
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
Main.projectile[proj].Calamity().forceMelee = true;
return false;
}
/*public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.SetResult(this);
recipe.AddIngredient(ModContent.ItemType<SeashellBoomerangMelee>());
recipe.AddIngredient(ModContent.ItemType<LivingShard>(), 8);
recipe.AddTile(TileID.MythrilAnvil);
recipe.AddRecipe();
}*/
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

+2 -2
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
item.damage = 18;
item.damage = 9;
item.ranged = true;
item.width = 56;
item.height = 28;
@@ -70,7 +70,7 @@ namespace CalamityMod.Items.Weapons.Ranged
{
float SpeedX = speedX + (float)Main.rand.Next(-50, 51) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-50, 51) * 0.05f;
int flare = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 0.75), knockBack, player.whoAmI, 0.0f, 0.0f);
int flare = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 1.6), knockBack, player.whoAmI, 0.0f, 0.0f);
Main.projectile[flare].penetrate = 1;
Main.projectile[flare].timeLeft = 600;
Main.projectile[flare].Calamity().forceRanged = true;
+54
View File
@@ -0,0 +1,54 @@
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class AshenStalactite : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ashen Stalactite");
Tooltip.SetDefault("Throws a fast, small stalactite that crumbles to dust after travelling a short distance\n" +
"Stealth strikes cause a larger, more damaging stalagmite to be thrown which travels slower and further before crumbling to damaging dust");
}
public override void SafeSetDefaults()
{
item.width = 36;
item.height = 34;
item.damage = 50;
item.noMelee = true;
item.noUseGraphic = true;
item.useAnimation = 18;
item.useStyle = 1;
item.useTime = 20;
item.knockBack = 1f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.maxStack = 1;
item.value = Item.buyPrice(0, 1, 0, 0);
item.rare = 3;
item.shoot = ModContent.ProjectileType<AshenStalactiteProj>();
item.shootSpeed = 15f;
item.Calamity().rogue = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.Calamity().StealthStrikeAvailable())
{
int stealthType = ModContent.ProjectileType<AshenStalagmiteProj>();
float stealthSpeedMult = 0.6f;
float stealthDamageMult = 1.15f;
float stealthKnockbackMult = 2.5f;
int p = Projectile.NewProjectile(position.X, position.Y, speedX * stealthSpeedMult, speedY * stealthSpeedMult, stealthType, (int)(damage * stealthDamageMult), (int)(knockBack * stealthKnockbackMult), player.whoAmI, 0f, 1f);
Main.projectile[p].Calamity().stealthStrike = true;
return false;
}
return true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 628 B

+62
View File
@@ -0,0 +1,62 @@
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class BouncySpikyBall : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Bouncy Spiky Ball");
Tooltip.SetDefault(@"Throws a very bouncy ball that richochets off walls and enemies
Receives a small boost in damage and velocity after bouncing off an enemy
Stealth strikes provide a bigger boost after richocheting");
}
public override void SafeSetDefaults()
{
item.width = 14;
item.damage = 10;
item.noMelee = true;
item.noUseGraphic = true;
item.useAnimation = 18;
item.useStyle = 1;
item.useTime = 18;
item.knockBack = 1f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.consumable = true;
item.maxStack = 999;
item.height = 14;
item.value = Item.buyPrice(0, 0, 1, 0);
item.rare = 1;
item.shoot = ModContent.ProjectileType<BouncyBol>();
item.shootSpeed = 8f;
item.Calamity().rogue = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[stealth].Calamity().stealthStrike = true;
return false;
}
return true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.SpikyBall, 3);
recipe.AddIngredient(ItemID.PinkGel);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this, 3);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

+1 -1
View File
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Rogue
recipe.AddIngredient(ModContent.ItemType<ShatteredSun>());
recipe.AddIngredient(ModContent.ItemType<ExecutionersBlade>());
recipe.AddIngredient(ModContent.ItemType<Pwnagehammer>());
recipe.AddIngredient(ModContent.ItemType<LuminousStriker>());
recipe.AddIngredient(ModContent.ItemType<PhantasmalRuin>());
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 4);
recipe.AddTile(ModContent.TileType<DraedonsForge>());
recipe.SetResult(this);
+55
View File
@@ -0,0 +1,55 @@
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class DeepWounder : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Deep Wounder");
Tooltip.SetDefault("Throws an abyssal hatchet that inflicts Armor Crunch and Marked for Death to the enemies it hits\n" +
"Stealth strikes cause the hatchet to be thrown faster and trail water, inflicting Crush Depth in addition to the other debuffs");
}
public override void SafeSetDefaults()
{
item.width = 52;
item.damage = 125;
item.noMelee = true;
item.noUseGraphic = true;
item.useAnimation = 23;
item.useStyle = 1;
item.useTime = 23;
item.knockBack = 3f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.height = 48;
item.maxStack = 1;
item.rare = 7;
item.value = Item.buyPrice(0, 60, 0, 0);
item.shoot = ModContent.ProjectileType<DeepWounderProjectile>();
item.shootSpeed = 14f;
item.Calamity().rogue = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.Calamity().StealthStrikeAvailable())
{
float stealthSpeedMult = 1.5f;
Vector2 velocity = new Vector2(speedX, speedY);
velocity.Normalize();
velocity *= item.shootSpeed * stealthSpeedMult;
int p = Projectile.NewProjectile(position.X, position.Y, velocity.X, velocity.Y, type, damage, knockBack, player.whoAmI, 0f, 1f);
Main.projectile[p].Calamity().stealthStrike = true;
return false;
}
return true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 823 B

+100
View File
@@ -0,0 +1,100 @@
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class DefectiveSphere : RogueWeapon
{
public static int BaseDamage = 80;
public static float Speed = 15f;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Defective Sphere");
Tooltip.SetDefault(@"Fires a variety deadly spheres with different effects
Stacks up to 5
Stealth strikes launch all 4 sphere types at once");
}
public override void SafeSetDefaults()
{
item.width = 42;
item.height = 44;
item.damage = BaseDamage;
item.knockBack = 5f;
item.useAnimation = 13;
item.useTime = 13;
item.autoReuse = true;
item.noMelee = true;
item.noUseGraphic = true;
item.maxStack = 5;
item.useStyle = 1;
item.UseSound = SoundID.Item15; //phaseblade sound effect
item.value = Item.buyPrice(0, 16, 0, 0);
item.rare = 8;
item.Calamity().rogue = true;
item.shoot = ModContent.ProjectileType<SphereSpiked>();
item.shootSpeed = Speed;
}
public override bool CanUseItem(Player player)
{
int UseMax = item.stack;
if (player.Calamity().StealthStrikeAvailable())
{
return true;
}
else if ((player.ownedProjectileCounts[item.shoot] + player.ownedProjectileCounts[ModContent.ProjectileType<SphereBladed>()] + player.ownedProjectileCounts[ModContent.ProjectileType<SphereYellow>()] + player.ownedProjectileCounts[ModContent.ProjectileType<SphereBlue>()]) >= UseMax)
{
return false;
}
else
{
return true;
}
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int sphereType = type;
if (Main.rand.NextBool(4))
sphereType = ModContent.ProjectileType<SphereBladed>();
else if (Main.rand.NextBool(3))
sphereType = ModContent.ProjectileType<SphereYellow>();
else if (Main.rand.NextBool(2))
sphereType = ModContent.ProjectileType<SphereBlue>();
float SpeedX = speedX + (float)Main.rand.Next(-30, 31) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-30, 31) * 0.05f;
float SpeedX2 = speedX + (float)Main.rand.Next(-30, 31) * 0.05f;
float SpeedY2 = speedY + (float)Main.rand.Next(-30, 31) * 0.05f;
float SpeedX3 = speedX + (float)Main.rand.Next(-30, 31) * 0.05f;
float SpeedY3 = speedY + (float)Main.rand.Next(-30, 31) * 0.05f;
float SpeedX4 = speedX + (float)Main.rand.Next(-30, 31) * 0.05f;
float SpeedY4 = speedY + (float)Main.rand.Next(-30, 31) * 0.05f;
if (player.Calamity().StealthStrikeAvailable())
{
int stealth = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage / 2, knockBack, player.whoAmI, 0f, 0f);
int stealth2 = Projectile.NewProjectile(position.X, position.Y, SpeedX2, SpeedY2, ModContent.ProjectileType<SphereBladed>(), damage / 2, knockBack, player.whoAmI, 0f, 0f);
int stealth3 = Projectile.NewProjectile(position.X, position.Y, SpeedX3, SpeedY3, ModContent.ProjectileType<SphereYellow>(), damage / 2, knockBack, player.whoAmI, 0f, 0f);
int stealth4 = Projectile.NewProjectile(position.X, position.Y, SpeedX4, SpeedY4, ModContent.ProjectileType<SphereBlue>(), damage / 2, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[stealth].Calamity().stealthStrike = true;
Main.projectile[stealth2].Calamity().stealthStrike = true;
Main.projectile[stealth3].Calamity().stealthStrike = true;
Main.projectile[stealth4].Calamity().stealthStrike = true;
}
else
{
Projectile.NewProjectile(position, new Vector2(speedX, speedY), sphereType, damage, knockBack, player.whoAmI, 0f, 0f);
}
return false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

+62
View File
@@ -0,0 +1,62 @@
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class DesecratedWater : RogueWeapon
{
public const int BaseDamage = 55;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Desecrated Water");
Tooltip.SetDefault(@"Throws an unholy flask of water that explodes into an explosion of bubbles on death
Stealth strikes spawn additional bubbles that inflict Ichor and Cursed Inferno");
}
public override void SafeSetDefaults()
{
item.damage = BaseDamage;
item.width = 22;
item.height = 24;
item.useAnimation = 29;
item.useTime = 29;
item.noMelee = true;
item.noUseGraphic = true;
item.useStyle = ItemUseStyleID.SwingThrow;
item.knockBack = 4.5f;
item.rare = 6;
item.UseSound = SoundID.Item106;
item.autoReuse = true;
item.value = Item.buyPrice(gold: 48); //sell price of 9 gold 60 silver
item.shoot = ModContent.ProjectileType<DesecratedWaterProj>();
item.shootSpeed = 12f;
item.Calamity().rogue = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[stealth].Calamity().stealthStrike = true;
return false;
}
return true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddRecipeGroup("AnyEvilWater", 100);
recipe.AddIngredient(ItemID.HallowedBar, 5);
recipe.AddRecipeGroup("CursedFlameIchor", 5);
recipe.AddIngredient(ItemID.SoulofLight, 7);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

+7 -6
View File
@@ -20,12 +20,12 @@ Stealth strikes release more souls and leave behind souls as they travel");
public override void SafeSetDefaults()
{
item.width = 34;
item.damage = 90;
item.damage = 80;
item.noMelee = true;
item.consumable = true;
item.noUseGraphic = true;
item.useAnimation = 14;
item.useTime = 14;
item.useAnimation = 16;
item.useTime = 16;
item.useStyle = 1;
item.knockBack = 6f;
item.UseSound = SoundID.Item1;
@@ -53,10 +53,11 @@ Stealth strikes release more souls and leave behind souls as they travel");
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<SolarVeil>());
recipe.AddIngredient(ItemID.Ectoplasm);
recipe.AddIngredient(ModContent.ItemType<SolarVeil>(), 2);
recipe.AddIngredient(ItemID.Silk, 3);
recipe.AddIngredient(ItemID.Ectoplasm, 5);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this, 5);
recipe.SetResult(this, 100);
recipe.AddRecipe();
}
}
+82
View File
@@ -0,0 +1,82 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class FrostcrushValari : RogueWeapon
{
public static float Speed = 15f;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Frostcrush Valari");
Tooltip.SetDefault(@"Fires a long ranged boomerang that explodes into icicles on hit
Stealth strikes throws three short ranged boomerangs along with a spread of icicles");
}
public override void SafeSetDefaults()
{
item.damage = 70;
item.knockBack = 12;
item.thrown = true;
item.crit = 16;
item.value = Item.buyPrice(0, 60, 0, 0);
item.rare = 7;
item.useTime = 19;
item.useAnimation = 19;
item.width = 32;
item.height = 46;
item.useStyle = 1;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.shootSpeed = Speed;
item.shoot = ModContent.ProjectileType<ValariBoomerang>();
item.noMelee = true;
item.noUseGraphic = true;
item.Calamity().rogue = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
CalamityPlayer modPlayer = Main.player[Main.myPlayer].Calamity();
//If stealth is full, shoot a spread of 3 boomerangs with reduced range and 6 to 10 icicles
if (modPlayer.StealthStrikeAvailable())
{
int spread = 10;
for (int i = 0; i < 3; i++)
{
Vector2 perturbedspeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(spread));
int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, damage, knockBack, player.whoAmI, 0f, 1f);
Main.projectile[proj].Calamity().stealthStrike = true;
spread -= 10;
}
int spread2 = 3;
for (int i = 0; i < Main.rand.Next(6,11); i++)
{
Vector2 perturbedspeed = new Vector2(speedX + Main.rand.Next(-3,4), speedY + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread2));
Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, (Main.rand.NextBool(2) ? ModContent.ProjectileType<Valaricicle>() : ModContent.ProjectileType<Valaricicle2>()), damage / 2, 0f, player.whoAmI, 0f, 0f);
spread2 -= Main.rand.Next(1,4);
}
return false;
}
return true;
}
/*public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<Kylie>());
recipe.AddIngredient(ModContent.ItemType<CryoBar>(), 6);
recipe.AddIngredient(ModContent.ItemType<Voidstone>(), 40);
recipe.AddIngredient(ModContent.ItemType<CoreofEleum>(), 5);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}*/
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

+3 -3
View File
@@ -18,12 +18,12 @@ namespace CalamityMod.Items.Weapons.Rogue
public override void SafeSetDefaults()
{
item.width = 40;
item.damage = 15;
item.damage = 14;
item.noMelee = true;
item.noUseGraphic = true;
item.useAnimation = 15;
item.useAnimation = 18;
item.useStyle = 1;
item.useTime = 15;
item.useTime = 18;
item.knockBack = 1f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
+3 -3
View File
@@ -18,12 +18,12 @@ namespace CalamityMod.Items.Weapons.Rogue
public override void SafeSetDefaults()
{
item.width = 40;
item.damage = 15;
item.damage = 14;
item.noMelee = true;
item.noUseGraphic = true;
item.useAnimation = 15;
item.useAnimation = 18;
item.useStyle = 1;
item.useTime = 15;
item.useTime = 18;
item.knockBack = 1f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
+3 -3
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Rogue
{
public class GodsParanoia : RogueWeapon
{
private static int damage = 250;
private static int damage = 125;
private static int knockBack = 5;
public override void SetStaticDefaults()
@@ -63,9 +63,9 @@ Right click to delete all existing spiky balls");
}
else
{
int UseMax = item.stack - 1;
int UseMax = item.stack;
if (player.ownedProjectileCounts[item.shoot] > UseMax)
if (player.ownedProjectileCounts[item.shoot] >= UseMax)
{
return false;
}
+64
View File
@@ -0,0 +1,64 @@
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class HardenedHoneycomb : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Hardened Honeycomb");
Tooltip.SetDefault(@"Fires a honeycomb that shatters into fragments
Grants the honey buff to players it touches
Stealth strikes can bounce off walls and enemies");
}
public override void SafeSetDefaults()
{
item.width = 30;
item.damage = 25;
item.noMelee = true;
item.consumable = true;
item.noUseGraphic = true;
item.useAnimation = 21;
item.useTime = 21;
item.useStyle = 1;
item.knockBack = 3f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.height = 32;
item.maxStack = 999;
item.value = 300;
item.rare = 3;
item.shoot = ModContent.ProjectileType<Honeycomb>();
item.shootSpeed = 10f;
item.Calamity().rogue = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[stealth].Calamity().stealthStrike = true;
Main.projectile[stealth].penetrate = 3;
return false;
}
return true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Hive);
recipe.AddIngredient(ItemID.CrispyHoneyBlock);
recipe.AddIngredient(ItemID.BeeWax);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this, 5);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 546 B

+2 -2
View File
@@ -64,9 +64,9 @@ namespace CalamityMod.Items.Weapons.Rogue
}
else
{
int UseMax = item.stack - 1;
int UseMax = item.stack;
if (player.ownedProjectileCounts[item.shoot] > UseMax)
if (player.ownedProjectileCounts[item.shoot] >= UseMax)
{
return false;
}
+80
View File
@@ -0,0 +1,80 @@
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class JawsOfOblivion : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Jaws of Oblivion");
Tooltip.SetDefault("Throws a tight spread of six venomous reaper fangs that stick in enemies\n" +
"Stealth strikes cause the teeth to emit a crushing shockwave on impact\n" +
"You're gonna need a bigger boat");
}
public override void SafeSetDefaults()
{
item.width = 42;
item.damage = 438;
item.noMelee = true;
item.noUseGraphic = true;
item.useAnimation = 15;
item.useStyle = 1;
item.useTime = 15;
item.knockBack = 1f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.height = 40;
item.maxStack = 1;
item.value = Item.buyPrice(1, 40, 0, 0);
item.rare = 10;
item.shoot = ModContent.ProjectileType<JawsProjectile>();
item.shootSpeed = 25f;
item.Calamity().postMoonLordRarity = 13;
item.Calamity().rogue = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
float spreadAngle = MathHelper.ToRadians(2.5f);
Vector2 direction = new Vector2(speedX, speedY);
Vector2 baseDirection = direction.RotatedBy(-spreadAngle * 2.5f);
for (int i = 0; i < 6; i++)
{
Vector2 currentDirection = baseDirection.RotatedBy(spreadAngle * i);
currentDirection = currentDirection.RotatedBy(MathHelper.ToRadians(Main.rand.NextFloat(-1f, 1f)));
if (player.Calamity().StealthStrikeAvailable())
{
int p = Projectile.NewProjectile(position.X, position.Y, currentDirection.X, currentDirection.Y, type, damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[p].Calamity().stealthStrike = true;
}
else
{
int p = Projectile.NewProjectile(position.X, position.Y, currentDirection.X, currentDirection.Y, type, (int)(damage * 1.5f), 10, player.whoAmI, 0f, 0f);
}
}
return false;
}
/*
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<LeviathanTeeth>());
recipe.AddIngredient(ModContent.ItemType<ReaperTooth>(), 6);
recipe.AddIngredient(ModContent.ItemType<Lumenite>(), 15);
recipe.AddIngredient(ModContent.ItemType<RuinousSoul>(), 2);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this, 1);
recipe.AddRecipe();
}
*/
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

+1 -1
View File
@@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Rogue
for (int i = 0; i < 3; i++)
{
Vector2 perturbedspeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(spread));
int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType<KylieBoomerang>(), item.damage, item.knockBack, player.whoAmI, 0f, 1f);
int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType<KylieBoomerang>(), damage, knockBack, player.whoAmI, 0f, 1f);
Main.projectile[proj].Calamity().stealthStrike = true;
spread -= 10;
}
+85
View File
@@ -0,0 +1,85 @@
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class LeviathanTeeth : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Leviathan Teeth");
Tooltip.SetDefault("Rapidly throws a variety of poisonous fangs that stick to enemies\n" +
"Stealth strikes cause 3 very fast teeth to be thrown, ignoring gravity and inflicting extreme knockback");
}
public override void SafeSetDefaults()
{
item.width = 36;
item.damage = 94;
item.noMelee = true;
item.noUseGraphic = true;
item.useAnimation = 10;
item.useStyle = 1;
item.useTime = 10;
item.knockBack = 1f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.height = 38;
item.maxStack = 1;
item.value = Item.buyPrice(0, 60, 0, 0);
item.rare = 7;
item.shoot = ModContent.ProjectileType<LeviathanTooth>();
item.shootSpeed = 12f;
item.Calamity().rogue = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
bool stealthStrike = false;
int teethCount;
if (player.Calamity().StealthStrikeAvailable())
{
teethCount = 3;
stealthStrike = true;
}
else
{
teethCount = Main.rand.Next(1, 4);
}
float spreadAngle = MathHelper.ToRadians(10);
for (int i = 0; i < teethCount; i++)
{
float toothType = Main.rand.Next(0, 3);
int projectileType = type;
switch (toothType)
{
case 1:
projectileType = ModContent.ProjectileType<LeviathanTooth2>();
break;
case 2:
projectileType = ModContent.ProjectileType<LeviathanTooth3>();
break;
}
float offsetSpeedX = speedX + Main.rand.NextFloat(-4f, 4f);
float offsetSpeedY = speedY + Main.rand.NextFloat(-4f, 4f);
if (stealthStrike)
{
int p = Projectile.NewProjectile(position.X, position.Y, offsetSpeedX * 1.5f, offsetSpeedY * 1.5f, projectileType, damage, 10f, player.whoAmI, 0f, 0f);
Main.projectile[p].Calamity().stealthStrike = true;
}
else
{
int p = Projectile.NewProjectile(position.X, position.Y, offsetSpeedX, offsetSpeedY, projectileType, damage, knockBack, player.whoAmI, 0f, 0f);
}
}
return false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

+1 -1
View File
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Rogue
item.UseSound = SoundID.Item1;
item.useTime = 20;
item.useAnimation = 20;
item.value = Item.buyPrice(0, 0, 1, 0);
item.value = Item.buyPrice(0, 0, 4, 0);
item.rare = 7;
item.shootSpeed = 8f;
item.shoot = ModContent.ProjectileType<MonkeyDart>();
+3 -3
View File
@@ -47,7 +47,7 @@ Stealth strikes throw five at once");
for (int i = 0; i < 5; i++)
{
Vector2 perturbedspeed = new Vector2(speedX + Main.rand.Next(-3,4), speedY + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread));
int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, item.damage, item.knockBack, player.whoAmI, 0f, 0f);
int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[proj].Calamity().stealthStrike = true;
spread -= Main.rand.Next(1,4);
}
@@ -56,13 +56,13 @@ Stealth strikes throw five at once");
return true;
}
/*public override void AddRecipes()
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Cactus, 2);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this, 15);
recipe.AddRecipe();
}*/
}
}
}
+4 -4
View File
@@ -29,8 +29,8 @@ Stealth strikes summon ghost clones instead of lost souls");
item.noUseGraphic = true;
item.value = Item.buyPrice(1, 40, 0, 0);
item.useTime = 15;
item.useAnimation = 15;
item.useTime = 25;
item.useAnimation = 25;
item.UseSound = SoundID.Item1;
item.rare = 10;
item.Calamity().postMoonLordRarity = 13;
@@ -52,7 +52,7 @@ Stealth strikes summon ghost clones instead of lost souls");
return true;
}
/*public override void AddRecipes()
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<LuminousStriker>());
@@ -62,6 +62,6 @@ Stealth strikes summon ghost clones instead of lost souls");
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}*/
}
}
}
+68
View File
@@ -0,0 +1,68 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;
namespace CalamityMod.Items.Weapons.Rogue
{
public class PhantomLance : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Phantom Lance");
Tooltip.SetDefault(@"Fires a spectral javelin that rapidly releases lost souls
Fades away and slows down over time
Lost souls released later deal less damage
Stealth strikes don't slow down and souls always deal full damage");
}
public override void SafeSetDefaults()
{
item.damage = 75;
item.knockBack = 5f;
item.width = 62;
item.height = 68;
item.useStyle = 1;
item.noMelee = true;
item.noUseGraphic = true;
item.value = Item.buyPrice(0, 0, 50, 0);
item.rare = 8;
item.useTime = 19;
item.useAnimation = 19;
item.maxStack = 999;
item.UseSound = SoundID.Item1;
item.consumable = true;
item.Calamity().rogue = true;
item.autoReuse = true;
item.shootSpeed = 10f;
item.shoot = ModContent.ProjectileType<PhantomLanceProj>();
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[stealth].Calamity().stealthStrike = true;
return false;
}
return true;
}
/*public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.SpectreBar, 2);
recipe.AddIngredient(ModContent.ItemType<CruptixBar>());
recipe.AddIngredient(ModContent.ItemType<CalamityDust>(), 2);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this, 100);
recipe.AddRecipe();
}*/
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

+1 -1
View File
@@ -18,7 +18,7 @@ Stealth strikes spawn smaller spears to fly along side it");
public override void SafeSetDefaults()
{
item.damage = 1500;
item.damage = 410;
item.knockBack = 8f;
item.crit += 15;
+5
View File
@@ -65,6 +65,11 @@ namespace CalamityMod.Items.Weapons.Rogue
if (Main.rand.Next(1, 101) > 66)
return false;
}
if (player.Calamity().throwingAmmoCost75)
{
if (Main.rand.Next(1, 101) > 75)
return false;
}
return true;
}
}
+9 -6
View File
@@ -37,13 +37,16 @@ namespace CalamityMod.Items.Weapons.Rogue
public override bool CanUseItem(Player player)
{
int launched = 0;
int UseMax = item.stack - 1;
foreach (Projectile projectile in Main.projectile)
if (projectile.type == item.shoot && projectile.owner == item.owner && projectile.active)
launched++;
return launched < item.stack;
if (player.ownedProjectileCounts[item.shoot] > UseMax)
{
return false;
}
else
{
return true;
}
}
}
}
+2 -2
View File
@@ -60,9 +60,9 @@ namespace CalamityMod.Items.Weapons.Rogue
}
else
{
int UseMax = item.stack - 1;
int UseMax = item.stack;
if (player.ownedProjectileCounts[item.shoot] > UseMax)
if (player.ownedProjectileCounts[item.shoot] >= UseMax)
{
return false;
}
+5 -4
View File
@@ -19,7 +19,7 @@ Stealth strikes throw seven at once and last a lot longer");
public override void SafeSetDefaults()
{
item.width = 14;
item.damage = 20;
item.damage = 12;
item.noMelee = true;
item.noUseGraphic = true;
item.maxStack = 999;
@@ -45,9 +45,10 @@ Stealth strikes throw seven at once and last a lot longer");
for (int i = 0; i < 7; i++)
{
Vector2 perturbedspeed = new Vector2(speedX + Main.rand.Next(-3,4), speedY + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread));
int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, item.damage, item.knockBack, player.whoAmI, 0f, 0f);
int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[proj].Calamity().stealthStrike = true;
Main.projectile[proj].timeLeft *= 4;
Main.projectile[proj].localNPCHitCooldown += 15;
spread -= Main.rand.Next(1,4);
}
return false;
@@ -55,7 +56,7 @@ Stealth strikes throw seven at once and last a lot longer");
return true;
}
/*public override void AddRecipes()
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.SpikyBall, 3);
@@ -63,6 +64,6 @@ Stealth strikes throw seven at once and last a lot longer");
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this, 3);
recipe.AddRecipe();
}*/
}
}
}
+74
View File
@@ -0,0 +1,74 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class TerraDisk : RogueWeapon
{
public static int BaseDamage = 70;
public static float Speed = 12f;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Terra Disk");
Tooltip.SetDefault(@"Throws a disk that has a chance to generate several disks if enemies are near it
A max of three disks can be active at a time");
}
public override void SafeSetDefaults()
{
item.width = 46;
item.height = 46;
item.damage = BaseDamage;
item.knockBack = 4f;
item.useAnimation = 16;
item.useTime = 16;
item.autoReuse = true;
item.noMelee = true;
item.noUseGraphic = true;
item.useStyle = 1;
item.UseSound = SoundID.Item1;
item.value = Item.buyPrice(0, 80, 0, 0);
item.rare = 8;
item.Calamity().rogue = true;
item.shoot = ModContent.ProjectileType<TerraDiskProjectile>();
item.shootSpeed = Speed;
}
public override bool CanUseItem(Player player)
{
if (player.ownedProjectileCounts[item.shoot] >= 3)
{
return false;
}
else
{
return true;
}
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
Main.projectile[proj].Calamity().forceRogue = true;
return false;
}
/*public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.SetResult(this);
recipe.AddIngredient(ModContent.ItemType<SeashellBoomerang>());
recipe.AddIngredient(ModContent.ItemType<LivingShard>(), 8);
recipe.AddTile(TileID.MythrilAnvil);
recipe.AddRecipe();
}*/
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

+2 -2
View File
@@ -26,8 +26,8 @@ namespace CalamityMod.Items.Weapons.Rogue
item.useStyle = 1;
item.knockBack = 10;
item.crit = 20;
item.value = Item.buyPrice(0, 0, 2, 0);
item.rare = 2;
item.value = Item.buyPrice(0, 0, 0, 50);
item.rare = 0;
item.maxStack = 999;
item.UseSound = SoundID.Item1;
item.consumable = true;
+1 -1
View File
@@ -54,7 +54,7 @@ Stealth strikes leak tar as they fly");
recipe.AddIngredient(ItemID.MolotovCocktail, 50);
recipe.AddIngredient(ModContent.ItemType<SolarVeil>(), 10);
recipe.AddIngredient(ModContent.ItemType<ConsecratedWater>());
//recipe.AddIngredient(ModContent.ItemType<DesecratedWater>());
recipe.AddIngredient(ModContent.ItemType<DesecratedWater>());
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
+59
View File
@@ -0,0 +1,59 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class WebBall : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Web Ball");
Tooltip.SetDefault(@"Throws a web-covered ball that covers enemies in cobwebs to slow them down
Stealth strikes slow enemies down longer");
}
public override void SafeSetDefaults()
{
item.width = 20;
item.damage = 12;
item.noMelee = true;
item.noUseGraphic = true;
item.maxStack = 999;
item.consumable = true;
item.useAnimation = 20;
item.useStyle = 1;
item.useTime = 20;
item.knockBack = 3f;
item.UseSound = SoundID.Item1;
item.height = 18;
item.value = Item.buyPrice(0, 0, 0, 30);
item.rare = 0;
item.shoot = ModContent.ProjectileType<WebBallBol>();
item.shootSpeed = 4f;
item.Calamity().rogue = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
{
int proj = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, item.damage, item.knockBack, player.whoAmI, 0f, 0f);
Main.projectile[proj].Calamity().stealthStrike = true;
return false;
}
return true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Cobweb, 3);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

+12 -12
View File
@@ -445,7 +445,7 @@ namespace CalamityMod
setBonus = setBonus.ToLower();
// TODO -- no summon set bonuses are written well. all use two bools, neither of which actually controls the function
// LATER -- no summon set bonuses are written well. all use two bools, neither of which actually controls the function
// Victide
if (setBonus == "victide_summon" || setBonus == "victide summon")
@@ -682,7 +682,7 @@ namespace CalamityMod
if (setBonus == "victide_summon" || setBonus == "victide summon")
{
mp.victideSet = enabled;
mp.urchin = enabled; // TODO -- remove this when player.urchin actually controls victide summoner
mp.urchin = enabled; // LATER -- remove this when player.urchin actually controls victide summoner
return true;
}
else if (setBonus == "victide" || setBonus.StartsWith("victide_") || setBonus.StartsWith("victide "))
@@ -695,7 +695,7 @@ namespace CalamityMod
if (setBonus == "aerospec_summon" || setBonus == "aerospec summon")
{
mp.aeroSet = enabled;
mp.valkyrie = enabled; // TODO -- remove this when player.valkyrie actually controls aerospec summoner
mp.valkyrie = enabled; // LATER -- remove this when player.valkyrie actually controls aerospec summoner
return true;
}
else if (setBonus == "aerospec" || setBonus.StartsWith("aerospec_") || setBonus.StartsWith("aerospec "))
@@ -708,7 +708,7 @@ namespace CalamityMod
if (setBonus == "statigel_summon" || setBonus == "statigel summon")
{
mp.statigelSet = enabled;
mp.slimeGod = enabled; // TODO -- remove this when player.slimeGod actually controls statigel summoner
mp.slimeGod = enabled; // LATER -- remove this when player.slimeGod actually controls statigel summoner
return true;
}
else if (setBonus == "statigel" || setBonus.StartsWith("statigel_") || setBonus.StartsWith("statigel "))
@@ -743,7 +743,7 @@ namespace CalamityMod
return true;
case "daedalus_summon":
case "daedalus summon":
mp.daedalusCrystal = enabled; // TODO -- remove this when player.daedalusCrystal actually controls daedalus summoner
mp.daedalusCrystal = enabled; // LATER -- remove this when player.daedalusCrystal actually controls daedalus summoner
return true;
case "daedalus_rogue":
case "daedalus rogue":
@@ -770,7 +770,7 @@ namespace CalamityMod
return true;
case "reaver_summon":
case "reaver summon":
mp.reaverOrb = enabled; // TODO -- remove this when player.reaverOrb actually controls reaver summoner
mp.reaverOrb = enabled; // LATER -- remove this when player.reaverOrb actually controls reaver summoner
return true;
case "reaver_rogue":
case "reaver rogue":
@@ -804,7 +804,7 @@ namespace CalamityMod
case "ataxia_summon":
case "ataxia summon":
mp.ataxiaBlaze = enabled;
mp.chaosSpirit = enabled; // TODO -- remove this when player.chaosSpirit actually controls ataxia summoner
mp.chaosSpirit = enabled; // LATER -- remove this when player.chaosSpirit actually controls ataxia summoner
return true;
case "ataxia_rogue":
case "ataxia rogue":
@@ -853,7 +853,7 @@ namespace CalamityMod
case "tarragon_summon":
case "tarragon summon":
mp.tarraSet = enabled;
mp.tarraSummon = enabled; // TODO -- remove this when player.tarraSummon actually controls life aura
mp.tarraSummon = enabled; // LATER -- remove this when player.tarraSummon actually controls life aura
return true;
case "tarragon_rogue":
case "tarragon rogue":
@@ -888,7 +888,7 @@ namespace CalamityMod
case "bloodflare_summon":
case "bloodflare summon":
mp.bloodflareSet = enabled;
mp.bloodflareSummon = enabled; // TODO -- remove this when player.bloodflareSummon actually controls bloodflare orbs
mp.bloodflareSummon = enabled; // LATER -- remove this when player.bloodflareSummon actually controls bloodflare orbs
return true;
case "bloodflare_rogue":
case "bloodflare rogue":
@@ -935,7 +935,7 @@ namespace CalamityMod
case "godslayer summon":
case "god slayer summon":
mp.godSlayer = enabled;
mp.godSlayerSummon = enabled; // TODO -- remove this when player.godSlayerSummon actually controls mechworm
mp.godSlayerSummon = enabled; // LATER -- remove this when player.godSlayerSummon actually controls mechworm
return true;
case "godslayer_rogue":
case "godslayer rogue":
@@ -971,7 +971,7 @@ namespace CalamityMod
case "silva_summon":
case "silva summon":
mp.silvaSet = enabled;
mp.silvaSummon = enabled; // TODO -- remove this when player.silvaSummon actually controls silva crystl
mp.silvaSummon = enabled; // LATER -- remove this when player.silvaSummon actually controls silva crystal
return true;
case "silva_rogue":
case "silva rogue":
@@ -1075,7 +1075,7 @@ namespace CalamityMod
if (setBonus == "demonshade")
{
mp.dsSetBonus = enabled;
mp.rDevil = enabled; // TODO -- remove this when player.rDevil controls demonshade summoned minion
mp.rDevil = enabled; // LATER -- remove this when player.rDevil controls demonshade summoned minion
return true;
}
+16 -2
View File
@@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.AcidRain
npc.HitSound = SoundID.NPCHit1;
npc.DeathSound = SoundID.NPCDeath1;
aiType = NPCID.GlowingSnail;
animationType = NPCID.GlowingSnail;
//animationType = NPCID.GlowingSnail;
//banner = npc.type;
//bannerItem = ModContent.ItemType<RadiatorBanner>();
}
@@ -46,7 +46,7 @@ namespace CalamityMod.NPCs.AcidRain
{
if (npc.localAI[0] == 0f)
{
npc.catchItem = (Main.rand.NextBool(20)) ? (short)ModContent.ItemType<RadiatingCrystal>() : ItemID.None;
npc.catchItem = (Main.rand.NextBool(10)) ? (short)ModContent.ItemType<RadiatingCrystal>() : ItemID.None;
npc.localAI[0] = 1f;
npc.velocity.Y = -3f;
npc.netUpdate = true;
@@ -63,6 +63,20 @@ namespace CalamityMod.NPCs.AcidRain
}
}
public override void FindFrame(int frameHeight)
{
npc.frameCounter++;
if (npc.frameCounter > 8)
{
npc.frameCounter = 0;
npc.frame.Y += frameHeight;
if (npc.frame.Y > frameHeight * 2)
{
npc.frame.Y = 0;
}
}
}
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (spawnInfo.playerSafe || !spawnInfo.player.Calamity().ZoneSulphur || !Main.raining)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Loaded 100 of 529 files, more files were not shown because too many files have changed in this diff. Show more