This commit is contained in:
Andrew Marheine committed 2020-07-08 22:06:50 -05:00
commit d6e0e6bf4e
279 files changed
+3532 -3042

No files matched your search

+3 -2
View File
@@ -8,8 +8,9 @@ namespace CalamityMod.Buffs.Potions
public override void SetDefaults()
{
DisplayName.SetDefault("Penumbra");
Description.SetDefault("Stealth regenerates at 10% speed while moving\n" +
"The boost increases to 20% at night and to 30% during an eclipse");
Description.SetDefault("Stealth regenerates 15% faster while moving\n" +
"At night, stealth additionally regenerates 15% faster while standing still\n" +
"Both boosts increase to 20% during a solar eclipse");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
+115 -95
View File
@@ -115,6 +115,7 @@ namespace CalamityMod.CalPlayer
public double trueMeleeDamage = 0D;
public double contactDamageReduction = 0D;
public double projectileDamageReduction = 0D;
public bool brimlashBusterBoost = false;
#endregion
#region External variables -- Only set by Mod.Call
@@ -164,7 +165,8 @@ namespace CalamityMod.CalPlayer
public int ammoReductionRanged = 0;
public int ammoReductionRogue = 0;
public int armorPenetrationStat = 0;
public int wingFlightTimeStat = 0;
public float wingFlightTimeStat = 0f;
public float jumpSpeedStat = 0f;
public int adrenalineChargeStat = 0;
public int rageDamageStat = 0;
public int moveSpeedStat = 0;
@@ -195,9 +197,7 @@ namespace CalamityMod.CalPlayer
public int tarraLifeAuraTimer = 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;
@@ -211,6 +211,7 @@ namespace CalamityMod.CalPlayer
public int hurtSoundTimer = 0;
public int danceOfLightCharge = 0;
public int shadowPotCooldown = 0;
public int dogTextCooldown = 0;
#endregion
#region Sound
@@ -464,6 +465,7 @@ namespace CalamityMod.CalPlayer
public bool shadowMinions = false;
public bool tearMinions = false;
public bool alchFlask = false;
public bool reducedPlagueDmg = false;
public bool abaddon = false;
public bool community = false;
public bool fleshTotem = false;
@@ -488,6 +490,7 @@ namespace CalamityMod.CalPlayer
public bool aquaticEmblem = false;
public bool darkSunRing = false;
public bool calamityRing = false;
public bool voidOfExtinction = false;
public bool eArtifact = false;
public bool dArtifact = false;
public bool gArtifact = false;
@@ -1073,8 +1076,6 @@ namespace CalamityMod.CalPlayer
{ "rogueLevel", rogueLevel },
{ "exactRogueLevel", exactRogueLevel },
{ "deathCount", deathCount },
{ "moneyStolenByBandit", moneyStolenByBandit },
{ "reforges", reforges },
{ "deathModeUnderworldTime", deathModeUnderworldTime },
{ "deathModeBlizzardTime", deathModeBlizzardTime }
};
@@ -1131,8 +1132,13 @@ namespace CalamityMod.CalPlayer
sCalDeathCount = tag.GetInt("sCalDeathCount");
sCalKillCount = tag.GetInt("sCalKillCount");
deathCount = tag.GetInt("deathCount");
moneyStolenByBandit = tag.GetInt("moneyStolenByBandit");
reforges = tag.GetInt("reforges");
// These two variables are no longer used, as the code was moved into CalamityWorld.cs to support multiplayer.
// As a result, their values are simply fed into a discard.
_ = tag.GetInt("moneyStolenByBandit");
_ = tag.GetInt("reforges");
deathModeUnderworldTime = tag.GetInt("deathModeUnderworldTime");
deathModeBlizzardTime = tag.GetInt("deathModeBlizzardTime");
@@ -1156,8 +1162,13 @@ namespace CalamityMod.CalPlayer
sCalDeathCount = reader.ReadInt32();
sCalKillCount = reader.ReadInt32();
deathCount = reader.ReadInt32();
moneyStolenByBandit = reader.ReadInt32();
reforges = reader.ReadInt32();
// These two variables are no longer used, as the code was moved into CalamityWorld.cs to support multiplayer.
// As a result, their values are simply fed into a discard.
_ = reader.ReadInt32(); // moneyStolenByBandit
_ = reader.ReadInt32(); // reforges
deathModeUnderworldTime = reader.ReadInt32();
deathModeBlizzardTime = reader.ReadInt32();
@@ -1519,6 +1530,7 @@ namespace CalamityMod.CalPlayer
shadowMinions = false;
tearMinions = false;
alchFlask = false;
reducedPlagueDmg = false;
abaddon = false;
community = false;
stressPills = false;
@@ -1536,6 +1548,7 @@ namespace CalamityMod.CalPlayer
harpyWingBoost = false; //harpy wings + harpy ring
darkSunRing = false;
calamityRing = false;
voidOfExtinction = false;
eArtifact = false;
dArtifact = false;
gArtifact = false;
@@ -1954,6 +1967,7 @@ namespace CalamityMod.CalPlayer
galileoCooldown = 0;
soundCooldown = 0;
shadowPotCooldown = 0;
dogTextCooldown = 0;
rage = 0;
adrenaline = 0;
raiderStack = 0;
@@ -1968,7 +1982,6 @@ namespace CalamityMod.CalPlayer
acidRoundMultiplier = 1D;
externalAbyssLight = 0;
externalColdImmunity = externalHeatImmunity = false;
reforges = 0;
polarisBoostCounter = 0;
spectralVeilImmunity = 0;
jetPackCooldown = 0;
@@ -2283,6 +2296,7 @@ namespace CalamityMod.CalPlayer
KameiBladeUseDelay = 0;
lastProjectileHit = null;
brimlashBusterBoost = false;
if (CalamityWorld.bossRushActive)
{
@@ -5194,26 +5208,19 @@ namespace CalamityMod.CalPlayer
float num13 = target.position.X + (float)(target.width / 2) - vector.X;
float num14 = target.position.Y + (float)(target.height / 2) - vector.Y;
num13 += (float)Main.rand.Next(-100, 101);
float num15 = 25f;
int projectileType = Main.rand.Next(3);
if (projectileType == 0)
{
projectileType = ModContent.ProjectileType<AstralStar>();
}
else if (projectileType == 1)
{
projectileType = ProjectileID.HallowStar;
}
else
{
projectileType = ModContent.ProjectileType<FallenStarProj>();
}
float speed = 25f;
int projectileType = Utils.SelectRandom(Main.rand, new int[]
{
ModContent.ProjectileType<AstralStar>(),
ProjectileID.HallowStar,
ModContent.ProjectileType<FallenStarProj>()
});
float num16 = (float)Math.Sqrt((double)(num13 * num13 + num14 * num14));
num16 = num15 / num16;
num16 = speed / num16;
num13 *= num16;
num14 *= num16;
int num17 = Projectile.NewProjectile(x, y, num13, num14, projectileType, 120, 5f, player.whoAmI, 0f, 0f);
Main.projectile[num17].ranged = false;
Main.projectile[num17].Calamity().forceTypeless = true;
}
}
if (bloodflareMelee && item.melee)
@@ -5285,7 +5292,7 @@ namespace CalamityMod.CalPlayer
return;
bool isTrueMelee = proj.Calamity().trueMelee;
bool isSummon = proj.minion || proj.sentry || CalamityMod.projectileMinionList.Contains(proj.type) || ProjectileID.Sets.MinionShot[proj.type] || ProjectileID.Sets.SentryShot[proj.type];
bool isSummon = proj.IsSummon();
bool hasClassType = proj.melee || proj.ranged || proj.magic || isSummon || proj.Calamity().rogue;
Item heldItem = player.ActiveItem();
@@ -5538,20 +5545,24 @@ namespace CalamityMod.CalPlayer
#endregion
#region MultiplicativeReductions
// Fearmonger armor makes you immune to the summoner cross-class nerf
// Forbidden armor makes you immune when holding the respective helmet's preferred weapon type
// Fearmonger armor reduces the summoner cross-class nerf
// Forbidden armor reduces said nerf when holding the respective helmet's preferred weapon type
// Profaned Soul Crystal encourages use of other weapons, nerfing the damage would not make sense.
bool forbidden = player.head == ArmorIDs.Head.AncientBattleArmor && player.body == ArmorIDs.Body.AncientBattleArmor && player.legs == ArmorIDs.Legs.AncientBattleArmor;
if (isSummon && !fearmongerSet && !profanedCrystalBuffs &&
(!forbidden || !heldItem.magic) && (!forbiddenCirclet || !heldItem.Calamity().rogue))
bool reducedNerf = fearmongerSet || (forbidden && heldItem.magic) || (forbiddenCirclet && heldItem.Calamity().rogue);
double summonNerfMult = 0.5;
if (reducedNerf)
summonNerfMult = 0.75;
if (isSummon && !profanedCrystalBuffs)
{
if (heldItem.type > ItemID.None)
{
if (!heldItem.summon &&
(heldItem.melee || heldItem.ranged || heldItem.magic || heldItem.Calamity().rogue) &&
heldItem.hammer == 0 && heldItem.pick == 0 && heldItem.axe == 0 && heldItem.useStyle != 0)
heldItem.hammer == 0 && heldItem.pick == 0 && heldItem.axe == 0 && heldItem.useStyle != 0 &&
!heldItem.accessory && heldItem.ammo == AmmoID.None)
{
damage = (int)(damage * 0.75);
damage = (int)(damage * summonNerfMult);
}
}
}
@@ -5569,9 +5580,7 @@ namespace CalamityMod.CalPlayer
damage = (int)(damage * 0.7);
break;
}
if (proj.type == ModContent.ProjectileType<VeriumBulletProj>())
damage = (int)(damage * 0.8);
else if (proj.type == ModContent.ProjectileType<AcidBulletProj>() && heldItem.type == ModContent.ItemType<P90>())
if (proj.type == ModContent.ProjectileType<AcidBulletProj>() && heldItem.type == ModContent.ItemType<P90>())
damage = (int)(damage * 0.75);
}
if (proj.type == ProjectileID.SpectreWrath && player.ghostHurt)
@@ -5636,22 +5645,15 @@ namespace CalamityMod.CalPlayer
float num13 = target.position.X + (float)(target.width / 2) - vector.X;
float num14 = target.position.Y + (float)(target.height / 2) - vector.Y;
num13 += (float)Main.rand.Next(-100, 101);
float num15 = 25f;
int projectileType = Main.rand.Next(3);
if (projectileType == 0)
{
projectileType = ModContent.ProjectileType<AstralStar>();
}
else if (projectileType == 1)
{
projectileType = ProjectileID.HallowStar;
}
else
{
projectileType = ProjectileID.FallingStar;
}
float speed = 25f;
int projectileType = Utils.SelectRandom(Main.rand, new int[]
{
ModContent.ProjectileType<AstralStar>(),
ProjectileID.HallowStar,
ModContent.ProjectileType<FallenStarProj>()
});
float num16 = (float)Math.Sqrt((double)(num13 * num13 + num14 * num14));
num16 = num15 / num16;
num16 = speed / num16;
num13 *= num16;
num14 *= num16;
int num17 = Projectile.NewProjectile(x, y, num13, num14, projectileType, 120, 5f, player.whoAmI, 0f, 0f);
@@ -5717,7 +5719,7 @@ namespace CalamityMod.CalPlayer
Main.projectile[fire].netUpdate = true;
}
}
if (umbraphileSet && proj.Calamity().rogue && (Main.rand.NextBool(4) || proj.Calamity().stealthStrike))
if (umbraphileSet && proj.Calamity().rogue && (Main.rand.NextBool(4) || proj.Calamity().stealthStrike) && proj.type != ModContent.ProjectileType<UmbraphileBoom>())
{
Projectile.NewProjectile(proj.Center.X, proj.Center.Y, 0f, 0f, ModContent.ProjectileType<UmbraphileBoom>(), CalamityUtils.DamageSoftCap(proj.damage * 0.25, 50), 0f, player.whoAmI, 0f, 0f);
}
@@ -5967,7 +5969,7 @@ namespace CalamityMod.CalPlayer
if (corrEffigy)
contactDamageReduction -= 0.2;
if (calamityRing)
if (calamityRing && !voidOfExtinction)
contactDamageReduction -= 0.15;
// 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50%
@@ -6196,7 +6198,7 @@ namespace CalamityMod.CalPlayer
if (corrEffigy)
projectileDamageReduction -= 0.2;
if (calamityRing)
if (calamityRing && !voidOfExtinction)
projectileDamageReduction -= 0.15;
// 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50%
@@ -7761,8 +7763,8 @@ namespace CalamityMod.CalPlayer
float xPos = Main.rand.NextBool(2) ? player.Center.X + 100 : player.Center.X - 100;
Vector2 vector2 = new Vector2(xPos, player.Center.Y + Main.rand.Next(-100, 101));
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
int spore1 = Projectile.NewProjectile(vector2.X, vector2.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), 590, fDamage, 1.25f, player.whoAmI, 0f, 0f);
int spore2 = Projectile.NewProjectile(vector2.X, vector2.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), 590, fDamage, 1.25f, player.whoAmI, 0f, 0f);
int spore1 = Projectile.NewProjectile(vector2.X, vector2.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ProjectileID.TruffleSpore, fDamage, 1.25f, player.whoAmI, 0f, 0f);
int spore2 = Projectile.NewProjectile(vector2.X, vector2.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ProjectileID.TruffleSpore, fDamage, 1.25f, player.whoAmI, 0f, 0f);
Main.projectile[spore1].timeLeft = 120;
Main.projectile[spore2].timeLeft = 120;
}
@@ -8156,11 +8158,11 @@ namespace CalamityMod.CalPlayer
Rectangle rectangle = new Rectangle((int)((double)player.position.X + (double)player.velocity.X * 0.5 - 4.0), (int)((double)player.position.Y + (double)player.velocity.Y * 0.5 - 4.0), player.width + 8, player.height + 8);
for (int i = 0; i < Main.maxNPCs; i++)
{
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].immune[player.whoAmI] <= 0)
NPC npc = Main.npc[i];
if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0)
{
NPC nPC = Main.npc[i];
Rectangle rect = nPC.getRect();
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
Rectangle rect = npc.getRect();
if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc)))
{
float num = 50f * player.AverageDamage();
float num2 = 3f;
@@ -8188,11 +8190,11 @@ namespace CalamityMod.CalPlayer
}
if (player.whoAmI == Main.myPlayer)
{
player.ApplyDamageToNPC(nPC, (int)num, num2, direction, crit);
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
}
if (nPC.immune[player.whoAmI] < 6)
nPC.immune[player.whoAmI] = 6;
nPC.AddBuff(ModContent.BuffType<GlacialState>(), 300);
if (npc.immune[player.whoAmI] < 6)
npc.immune[player.whoAmI] = 6;
npc.AddBuff(ModContent.BuffType<GlacialState>(), 300);
player.immune = true;
player.immuneNoBlink = true;
if (player.immuneTime < 4)
@@ -8210,11 +8212,11 @@ namespace CalamityMod.CalPlayer
Rectangle rectangle = new Rectangle((int)((double)player.position.X + (double)player.velocity.X * 0.5 - 4.0), (int)((double)player.position.Y + (double)player.velocity.Y * 0.5 - 4.0), player.width + 8, player.height + 8);
for (int i = 0; i < Main.maxNPCs; i++)
{
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].immune[player.whoAmI] <= 0)
NPC npc = Main.npc[i];
if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0)
{
NPC nPC = Main.npc[i];
Rectangle rect = nPC.getRect();
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
Rectangle rect = npc.getRect();
if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc)))
{
float num = 1500f * player.AverageDamage();
float num2 = 15f;
@@ -8242,13 +8244,13 @@ namespace CalamityMod.CalPlayer
}
if (player.whoAmI == Main.myPlayer)
{
player.ApplyDamageToNPC(nPC, (int)num, num2, direction, crit);
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyExplosionSupreme>(), (int)(1000 * player.AverageDamage()), 20f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyEruption>(), (int)(780 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f);
}
if (nPC.immune[player.whoAmI] < 6)
nPC.immune[player.whoAmI] = 6;
nPC.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
if (npc.immune[player.whoAmI] < 6)
npc.immune[player.whoAmI] = 6;
npc.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
player.immune = true;
player.immuneNoBlink = true;
if (player.immuneTime < 4)
@@ -8266,11 +8268,11 @@ namespace CalamityMod.CalPlayer
Rectangle rectangle = new Rectangle((int)((double)player.position.X + (double)player.velocity.X * 0.5 - 4.0), (int)((double)player.position.Y + (double)player.velocity.Y * 0.5 - 4.0), player.width + 8, player.height + 8);
for (int i = 0; i < Main.maxNPCs; i++)
{
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].immune[player.whoAmI] <= 0)
NPC npc = Main.npc[i];
if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0)
{
NPC nPC = Main.npc[i];
Rectangle rect = nPC.getRect();
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
Rectangle rect = npc.getRect();
if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc)))
{
float num = 500f * player.AverageDamage();
float num2 = 12f;
@@ -8298,12 +8300,12 @@ namespace CalamityMod.CalPlayer
}
if (player.whoAmI == Main.myPlayer)
{
player.ApplyDamageToNPC(nPC, (int)num, num2, direction, crit);
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyExplosionSupreme>(), (int)(500 * player.AverageDamage()), 15f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyEruption>(), (int)(380 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f);
}
if (nPC.immune[player.whoAmI] < 6)
nPC.immune[player.whoAmI] = 6;
if (npc.immune[player.whoAmI] < 6)
npc.immune[player.whoAmI] = 6;
player.immune = true;
player.immuneNoBlink = true;
if (player.immuneTime < 4)
@@ -8321,11 +8323,11 @@ namespace CalamityMod.CalPlayer
Rectangle rectangle = new Rectangle((int)((double)player.position.X + (double)player.velocity.X * 0.5 - 4.0), (int)((double)player.position.Y + (double)player.velocity.Y * 0.5 - 4.0), player.width + 8, player.height + 8);
for (int i = 0; i < Main.maxNPCs; i++)
{
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].immune[player.whoAmI] <= 0)
NPC npc = Main.npc[i];
if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0)
{
NPC nPC = Main.npc[i];
Rectangle rect = nPC.getRect();
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
Rectangle rect = npc.getRect();
if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc)))
{
float num = 100f * player.AverageDamage();
float num2 = 9f;
@@ -8353,11 +8355,11 @@ namespace CalamityMod.CalPlayer
}
if (player.whoAmI == Main.myPlayer)
{
player.ApplyDamageToNPC(nPC, (int)num, num2, direction, crit);
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyExplosion>(), (int)(100 * player.AverageDamage()), 15f, Main.myPlayer, 0f, 0f);
}
if (nPC.immune[player.whoAmI] < 6)
nPC.immune[player.whoAmI] = 6;
if (npc.immune[player.whoAmI] < 6)
npc.immune[player.whoAmI] = 6;
player.immune = true;
player.immuneNoBlink = true;
if (player.immuneTime < 4)
@@ -8375,11 +8377,11 @@ namespace CalamityMod.CalPlayer
Rectangle rectangle = new Rectangle((int)(player.position.X + player.velocity.X * 0.5f - 4f), (int)(player.position.Y + player.velocity.Y * 0.5f - 4f), player.width + 8, player.height + 8);
for (int i = 0; i < Main.maxNPCs; i++)
{
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].immune[player.whoAmI] <= 0)
NPC npc = Main.npc[i];
if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0)
{
NPC nPC = Main.npc[i];
Rectangle rect = nPC.getRect();
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
Rectangle rect = npc.getRect();
if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc)))
{
float num = 50f * player.MinionDamage();
float num2 = 3f;
@@ -8395,11 +8397,11 @@ namespace CalamityMod.CalPlayer
}
if (player.whoAmI == Main.myPlayer)
{
player.ApplyDamageToNPC(nPC, (int)num, num2, direction, crit);
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
}
if (nPC.immune[player.whoAmI] < 6)
nPC.immune[player.whoAmI] = 6;
nPC.AddBuff(ModContent.BuffType<Plague>(), 300);
if (npc.immune[player.whoAmI] < 6)
npc.immune[player.whoAmI] = 6;
npc.AddBuff(ModContent.BuffType<Plague>(), 300);
player.immune = true;
player.immuneNoBlink = true;
if (player.immuneTime < 4)
@@ -9619,6 +9621,23 @@ namespace CalamityMod.CalPlayer
}
});
public static readonly PlayerLayer DyeInvisibilityFix = new PlayerLayer("CalamityMod", "DyeInvisibilityFix", PlayerLayer.Arms, (PlayerDrawInfo drawInfo) =>
{
Player drawPlayer = drawInfo.drawPlayer;
CalamityPlayer modPlayer = drawPlayer.Calamity();
if (!drawPlayer.invis ||
drawPlayer.itemAnimation > 0)
{
return;
}
for (int i = 0; i < Main.playerDrawData.Count; i++)
{
var copy = Main.playerDrawData[i];
copy.shader = 0; // There's no other easy solution here to my knowledge since DrawData is a value type.
Main.playerDrawData[i] = copy;
}
});
public override void ModifyDrawInfo(ref PlayerDrawInfo drawInfo)
{
if (drawInfo.shadow != 0f)
@@ -9945,7 +9964,7 @@ namespace CalamityMod.CalPlayer
Texture2D robotTexture = ModContent.GetTexture("CalamityMod/Projectiles/Summon/AndromedaSmall");
Rectangle frame = new Rectangle(0, robotEntityInstance.CurrentFrame * 54, robotTexture.Width, robotTexture.Height / 21);
DrawData drawData = new DrawData(robotTexture,
drawPlayer.Center + new Vector2(0f, -8f) - Main.screenPosition,
drawPlayer.Center + new Vector2(drawPlayer.direction == 1 ? -24 : -10, -8f) - Main.screenPosition,
frame,
Color.White,
0f,
@@ -9988,6 +10007,7 @@ namespace CalamityMod.CalPlayer
list.Add(ColdDivinityOverlay);
list.Add(StratusSphereDrawing);
list.Add(IbanDevRobot);
list.Add(DyeInvisibilityFix);
}
public PlayerLayer clAfterAll = new PlayerLayer("Calamity", "clAfterAll", PlayerLayer.MiscEffectsFront, delegate (PlayerDrawInfo drawInfo)
+2
View File
@@ -97,6 +97,8 @@ namespace CalamityMod.CalPlayer
CalamityUtils.AddWithCondition<int>(fishList, ItemID.FlarefinKoi, !modPlayer.ZoneCalamity);
CalamityUtils.AddWithCondition<int>(fishList, ItemID.Obsidifish, !modPlayer.ZoneCalamity);
CalamityUtils.AddWithCondition<int>(fishList, ModContent.ItemType<CoastalDemonfish>(), modPlayer.ZoneCalamity);
CalamityUtils.AddWithCondition<int>(fishList, ModContent.ItemType<Shadowfish>(), modPlayer.ZoneCalamity);
CalamityUtils.AddWithCondition<int>(fishList, ModContent.ItemType<BrimstoneFish>(), modPlayer.ZoneCalamity);
}
else if (water)
{
+143 -179
View File
@@ -205,7 +205,7 @@ namespace CalamityMod.CalPlayer
player.lifeRegen = 0;
player.lifeRegenTime = 0;
lifeRegenLost += modPlayer.alchFlask ? 10 : 20;
lifeRegenLost += modPlayer.reducedPlagueDmg ? 10 : 20;
}
if (modPlayer.bBlood)
@@ -391,7 +391,7 @@ namespace CalamityMod.CalPlayer
if (player.whoAmI == Main.myPlayer && modPlayer.bloodfinTimer <= 0)
{
modPlayer.bloodfinTimer = 30;
if (player.statLife <= (int)(player.statLifeMax2 * 0.75))
if (player.statLife <= (int)(player.statLifeMax2 * 0.75) && !CalamityWorld.ironHeart)
player.statLife += 1;
}
}
@@ -713,188 +713,152 @@ namespace CalamityMod.CalPlayer
player.lifeRegen += 1;
// Standing still healing bonuses (all exclusive with vanilla Shiny Stone)
if (!player.shinyStone)
{
int lifeRegenTimeMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 450 : 1800;
int lifeRegenMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 1 : 4;
float lifeRegenLifeRegenTimeMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 8f : 30f;
if (!player.shinyStone)
{
int lifeRegenTimeMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 450 : 1800;
int lifeRegenMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 1 : 4;
float lifeRegenLifeRegenTimeMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 8f : 30f;
if (Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0)
{
if (modPlayer.shadeRegen)
{
if (player.lifeRegenTime > 90 && player.lifeRegenTime < lifeRegenTimeMaxBoost)
player.lifeRegenTime = lifeRegenTimeMaxBoost;
if (Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0)
{
bool boostedRegen = false;
bool noSunlight = false;
if (modPlayer.shadeRegen)
{
boostedRegen = true;
if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife)
{
if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(30))
{
int num5 = Dust.NewDust(player.position, player.width, player.height, 173, 0f, 0f, 200, default, 1f);
Main.dust[num5].noGravity = true;
Main.dust[num5].velocity *= 0.75f;
Main.dust[num5].fadeIn = 1.3f;
Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
vector.Normalize();
vector *= (float)Main.rand.Next(50, 100) * 0.04f;
Main.dust[num5].velocity = vector;
vector.Normalize();
vector *= 34f;
Main.dust[num5].position = player.Center - vector;
}
}
}
else if (modPlayer.cFreeze)
{
boostedRegen = true;
if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife)
{
if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(30))
{
int num5 = Dust.NewDust(player.position, player.width, player.height, 67, 0f, 0f, 200, new Color(150, Main.DiscoG, 255), 0.75f);
Main.dust[num5].noGravity = true;
Main.dust[num5].velocity *= 0.75f;
Main.dust[num5].fadeIn = 1.3f;
Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
vector.Normalize();
vector *= (float)Main.rand.Next(50, 100) * 0.04f;
Main.dust[num5].velocity = vector;
vector.Normalize();
vector *= 34f;
Main.dust[num5].position = player.Center - vector;
}
}
}
else if (modPlayer.draedonsHeart)
{
boostedRegen = true;
if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife)
{
if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(2))
{
int num5 = Dust.NewDust(player.position, player.width, player.height, 107, 0f, 0f, 200, default, 1f);
Main.dust[num5].noGravity = true;
Main.dust[num5].velocity *= 0.75f;
Main.dust[num5].fadeIn = 1.3f;
Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
vector.Normalize();
vector *= (float)Main.rand.Next(50, 100) * 0.04f;
Main.dust[num5].velocity = vector;
vector.Normalize();
vector *= 34f;
Main.dust[num5].position = player.Center - vector;
}
}
}
else if (modPlayer.photosynthesis)
{
boostedRegen = true;
if (!Main.dayTime)
noSunlight = true;
if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife)
{
if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(2))
{
int num5 = Dust.NewDust(player.position, player.width, player.height, 244, 0f, 0f, 200, default, 1f);
Main.dust[num5].noGravity = true;
Main.dust[num5].velocity *= 0.75f;
Main.dust[num5].fadeIn = 1.3f;
Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
vector.Normalize();
vector *= (float)Main.rand.Next(50, 100) * 0.04f;
Main.dust[num5].velocity = vector;
vector.Normalize();
vector *= 34f;
Main.dust[num5].position = player.Center - vector;
}
}
}
if (boostedRegen)
{
int lifeRegenTimeMaxBoost2 = !noSunlight ? lifeRegenTimeMaxBoost : (lifeRegenTimeMaxBoost / 5);
int lifeRegenMaxBoost2 = !noSunlight ? lifeRegenMaxBoost : (lifeRegenMaxBoost / 5);
float lifeRegenLifeRegenTimeMaxBoost2 = !noSunlight ? lifeRegenLifeRegenTimeMaxBoost : (lifeRegenLifeRegenTimeMaxBoost / 5);
player.lifeRegenTime += lifeRegenMaxBoost;
player.lifeRegen += lifeRegenMaxBoost;
if (player.lifeRegenTime > 90 && player.lifeRegenTime < lifeRegenTimeMaxBoost2)
player.lifeRegenTime = lifeRegenTimeMaxBoost2;
float num3 = player.lifeRegenTime * 2.5f; // lifeRegenTime max is 3600
num3 /= 300f;
if (num3 > 0f)
{
if (num3 > lifeRegenLifeRegenTimeMaxBoost)
num3 = lifeRegenLifeRegenTimeMaxBoost;
player.lifeRegenTime += lifeRegenMaxBoost2;
player.lifeRegen += lifeRegenMaxBoost2;
player.lifeRegen += (int)num3;
}
float num3 = player.lifeRegenTime * 2.5f; // lifeRegenTime max is 3600
num3 /= 300f;
if (num3 > 0f)
{
if (num3 > lifeRegenLifeRegenTimeMaxBoost2)
num3 = lifeRegenLifeRegenTimeMaxBoost2;
if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife)
{
player.lifeRegenCount++;
if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(30))
{
int num5 = Dust.NewDust(player.position, player.width, player.height, 173, 0f, 0f, 200, default, 1f);
Main.dust[num5].noGravity = true;
Main.dust[num5].velocity *= 0.75f;
Main.dust[num5].fadeIn = 1.3f;
Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
vector.Normalize();
vector *= (float)Main.rand.Next(50, 100) * 0.04f;
Main.dust[num5].velocity = vector;
vector.Normalize();
vector *= 34f;
Main.dust[num5].position = player.Center - vector;
}
}
}
else if (modPlayer.cFreeze)
{
if (player.lifeRegenTime > 90 && player.lifeRegenTime < lifeRegenTimeMaxBoost)
player.lifeRegenTime = lifeRegenTimeMaxBoost;
player.lifeRegenTime += lifeRegenMaxBoost;
player.lifeRegen += lifeRegenMaxBoost;
float num3 = (player.lifeRegenTime * 2.5f); // lifeRegenTime max is 3600
num3 /= 300f;
if (num3 > 0f)
{
if (num3 > lifeRegenLifeRegenTimeMaxBoost)
num3 = lifeRegenLifeRegenTimeMaxBoost;
player.lifeRegen += (int)num3;
}
if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife)
{
player.lifeRegenCount++;
if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(30))
{
int num5 = Dust.NewDust(player.position, player.width, player.height, 67, 0f, 0f, 200, new Color(150, Main.DiscoG, 255), 0.75f);
Main.dust[num5].noGravity = true;
Main.dust[num5].velocity *= 0.75f;
Main.dust[num5].fadeIn = 1.3f;
Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
vector.Normalize();
vector *= (float)Main.rand.Next(50, 100) * 0.04f;
Main.dust[num5].velocity = vector;
vector.Normalize();
vector *= 34f;
Main.dust[num5].position = player.Center - vector;
}
}
}
else if (modPlayer.draedonsHeart)
{
if (player.lifeRegenTime > 90 && player.lifeRegenTime < lifeRegenTimeMaxBoost)
player.lifeRegenTime = lifeRegenTimeMaxBoost;
player.lifeRegenTime += lifeRegenMaxBoost;
player.lifeRegen += lifeRegenMaxBoost;
float num3 = player.lifeRegenTime * 2.5f; // lifeRegenTime max is 3600
num3 /= 300f;
if (num3 > 0f)
{
if (num3 > lifeRegenLifeRegenTimeMaxBoost)
num3 = lifeRegenLifeRegenTimeMaxBoost;
player.lifeRegen += (int)num3;
}
if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife)
{
player.lifeRegenCount++;
if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(2))
{
int num5 = Dust.NewDust(player.position, player.width, player.height, 107, 0f, 0f, 200, default, 1f);
Main.dust[num5].noGravity = true;
Main.dust[num5].velocity *= 0.75f;
Main.dust[num5].fadeIn = 1.3f;
Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
vector.Normalize();
vector *= (float)Main.rand.Next(50, 100) * 0.04f;
Main.dust[num5].velocity = vector;
vector.Normalize();
vector *= 34f;
Main.dust[num5].position = player.Center - vector;
}
}
}
else if (modPlayer.photosynthesis)
{
int lifeRegenTimeMaxBoost2 = Main.dayTime ? lifeRegenTimeMaxBoost : (lifeRegenTimeMaxBoost / 5);
int lifeRegenMaxBoost2 = Main.dayTime ? lifeRegenMaxBoost : (lifeRegenMaxBoost / 5);
float lifeRegenLifeRegenTimeMaxBoost2 = Main.dayTime ? lifeRegenLifeRegenTimeMaxBoost : (lifeRegenLifeRegenTimeMaxBoost / 5);
if (player.lifeRegenTime > 90 && player.lifeRegenTime < lifeRegenTimeMaxBoost2)
player.lifeRegenTime = lifeRegenTimeMaxBoost2;
player.lifeRegenTime += lifeRegenMaxBoost2;
player.lifeRegen += lifeRegenMaxBoost2;
float num3 = player.lifeRegenTime * 2.5f; // lifeRegenTime max is 3600
num3 /= 300f;
if (num3 > 0f)
{
if (num3 > lifeRegenLifeRegenTimeMaxBoost2)
num3 = lifeRegenLifeRegenTimeMaxBoost2;
player.lifeRegen += (int)num3;
}
if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife)
{
player.lifeRegenCount++;
if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(2))
{
int num5 = Dust.NewDust(player.position, player.width, player.height, 244, 0f, 0f, 200, default, 1f);
Main.dust[num5].noGravity = true;
Main.dust[num5].velocity *= 0.75f;
Main.dust[num5].fadeIn = 1.3f;
Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
vector.Normalize();
vector *= (float)Main.rand.Next(50, 100) * 0.04f;
Main.dust[num5].velocity = vector;
vector.Normalize();
vector *= 34f;
Main.dust[num5].position = player.Center - vector;
}
}
}
}
else if (modPlayer.camper && player.statLife < modPlayer.actualMaxLife)
{
player.lifeRegen = (int)((player.lifeRegen * 2) * 1.75f);
player.lifeRegenCount = player.lifeRegenCount > 30 ? player.lifeRegenCount : 30;
player.lifeRegenCount++;
if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(2))
{
int num5 = Dust.NewDust(player.position, player.width, player.height, 12, 0f, 0f, 200, Color.OrangeRed, 1f);
Main.dust[num5].noGravity = true;
Main.dust[num5].velocity *= 0.75f;
Main.dust[num5].fadeIn = 1.3f;
Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
vector.Normalize();
vector *= (float)Main.rand.Next(50, 100) * 0.04f;
Main.dust[num5].velocity = vector;
vector.Normalize();
vector *= 34f;
Main.dust[num5].position = player.Center - vector;
}
}
}
player.lifeRegen += (int)num3;
}
if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife)
{
player.lifeRegenCount++;
}
}
else if (modPlayer.camper && player.statLife < modPlayer.actualMaxLife)
{
float camperRegenMult = CalamityPlayer.areThereAnyDamnBosses ? 1.3f : 1.75f;
int camperCap = CalamityPlayer.areThereAnyDamnBosses ? 20 : 30;
player.lifeRegen = (int)((player.lifeRegen * 2) * camperRegenMult);
player.lifeRegenCount = player.lifeRegenCount > camperCap ? player.lifeRegenCount : camperCap;
player.lifeRegenCount++;
if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(2))
{
int num5 = Dust.NewDust(player.position, player.width, player.height, 12, 0f, 0f, 200, Color.OrangeRed, 1f);
Main.dust[num5].noGravity = true;
Main.dust[num5].velocity *= 0.75f;
Main.dust[num5].fadeIn = 1.3f;
Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
vector.Normalize();
vector *= (float)Main.rand.Next(50, 100) * 0.04f;
Main.dust[num5].velocity = vector;
vector.Normalize();
vector *= 34f;
Main.dust[num5].position = player.Center - vector;
}
}
}
}
if (CalamityWorld.revenge)
{
+21 -3
View File
@@ -8,6 +8,7 @@ using CalamityMod.Dusts;
using CalamityMod.Items.Armor;
using CalamityMod.Items.Fishing.AstralCatches;
using CalamityMod.Items.Fishing.FishingRods;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.NPCs;
using CalamityMod.NPCs.AcidRain;
@@ -342,7 +343,7 @@ namespace CalamityMod.CalPlayer
if(player.Calamity().andromedaState == AndromedaPlayerState.LargeRobot)
{
player.width = 152;
player.width = 80;
player.height = 212;
player.position.Y -= 170;
}
@@ -983,6 +984,8 @@ namespace CalamityMod.CalPlayer
modPlayer.titanBoost--;
if (modPlayer.prismaticLasers > 0)
modPlayer.prismaticLasers--;
if (modPlayer.dogTextCooldown > 0)
modPlayer.dogTextCooldown--;
if (modPlayer.titanCooldown > 0)
modPlayer.titanCooldown--;
@@ -1813,7 +1816,7 @@ namespace CalamityMod.CalPlayer
modPlayer.gSabatonFall = 300;
modPlayer.gSabatonCooldown = 480; //8 second cooldown
player.gravity *= 2f;
Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X, player.velocity.Y, ModContent.ProjectileType<SabatonSlam>(), 0, 0, player.whoAmI);
Projectile.NewProjectile(player.Center.X, player.Center.Y + (player.height / 5f), player.velocity.X, player.velocity.Y, ModContent.ProjectileType<SabatonSlam>(), 0, 0, player.whoAmI);
}
}
if (modPlayer.gSabatonCooldown == 1) //dust when ready to use again
@@ -2668,6 +2671,12 @@ namespace CalamityMod.CalPlayer
modPlayer.planarSpeedBoost = 0;
}
if (modPlayer.brimlashBusterBoost)
{
if (player.ActiveItem().type != ModContent.ItemType<BrimlashBuster>())
modPlayer.brimlashBusterBoost = false;
}
if (modPlayer.etherealExtorter)
{
bool ZoneForest = !modPlayer.ZoneAbyss && !modPlayer.ZoneSulphur && !modPlayer.ZoneAstral && !modPlayer.ZoneCalamity &&
@@ -3359,6 +3368,7 @@ namespace CalamityMod.CalPlayer
player.npcTypeNoAggro[ModContent.NPCType<PerennialSlime>()] = true;
player.npcTypeNoAggro[ModContent.NPCType<PlaguedJungleSlime>()] = true;
player.npcTypeNoAggro[ModContent.NPCType<AstralSlime>()] = true;
player.npcTypeNoAggro[ModContent.NPCType<GammaSlime>()] = true;
// LATER -- When Wulfrum Slimes start being definitely robots, remove this immunity.
player.npcTypeNoAggro[ModContent.NPCType<WulfrumSlime>()] = true;
}
@@ -3761,6 +3771,10 @@ namespace CalamityMod.CalPlayer
if (player.endurance > 0f)
player.endurance = 1f - (1f / (1f + player.endurance));
// Very similar scaling to damage reduction. Ex. Frog Leg goes from 48% jump speed to 38%
//if (player.jumpSpeedBoost > 0f)
// player.jumpSpeedBoost = (1f - 1f / (1f + (player.jumpSpeedBoost / 10f))) * 10f
if (modPlayer.yharonLore && !CalamityWorld.defiled)
{
if (player.wingTimeMax < 50000)
@@ -3837,7 +3851,11 @@ namespace CalamityMod.CalPlayer
modPlayer.manaRegenStat = player.manaRegen;
modPlayer.armorPenetrationStat = player.armorPenetration;
modPlayer.moveSpeedStat = (int)((player.moveSpeed - 1f) * 100f);
modPlayer.wingFlightTimeStat = player.wingTimeMax;
modPlayer.wingFlightTimeStat = player.wingTimeMax / 60f;
float trueJumpSpeedBoost = player.jumpSpeedBoost +
(player.wereWolf ? 0.2f : 0f) +
(player.jumpBoost ? 1.5f : 0f);
modPlayer.jumpSpeedStat = trueJumpSpeedBoost * 20f;
modPlayer.adrenalineChargeStat = 45 -
(modPlayer.adrenalineBoostOne ? 10 : 0) -
(modPlayer.adrenalineBoostTwo ? 10 : 0) -
+7 -1
View File
@@ -64,7 +64,7 @@ namespace CalamityMod
[BackgroundColor(192, 54, 64, 192)]
[Label("Lock Meter Positions")]
[DefaultValue(false)]
[DefaultValue(true)]
[Tooltip("Prevents clicking on the Stealth, Rage and Adrenaline Meters.\nThis stops them from being dragged around with the mouse.")]
public bool MeterPosLock { get; set; }
@@ -116,6 +116,12 @@ namespace CalamityMod
[Tooltip("Increases the player's mining speed by 75%.\nThis does not affect drills.")]
public bool MiningSpeedBoost { get; set; }
[Label("Boss Zen")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
[Tooltip("While a boss is alive, all players receive the Boss Zen buff which drastically reduces enemy spawn rates.")]
public bool BossZen { get; set; }
[Label("Never Weaken Reactive Boss DR")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(false)]
+8
View File
@@ -181,6 +181,7 @@ namespace CalamityMod
public static List<int> revengeanceProjectileBuffList5Percent;
public static List<int> revengeanceLifeStealExceptionList;
public static List<int> movementImpairImmuneList;
public static List<int> needsDebuffIconDisplayList;
public static List<int> trapProjectileList;
public static List<int> scopedWeaponList;
public static List<int> boomerangList;
@@ -414,6 +415,7 @@ namespace CalamityMod
revengeanceProjectileBuffList5Percent = null;
revengeanceLifeStealExceptionList = null;
movementImpairImmuneList = null;
needsDebuffIconDisplayList = null;
trapProjectileList = null;
scopedWeaponList = null;
boomerangList = null;
@@ -704,6 +706,7 @@ namespace CalamityMod
ModContent.ProjectileType<StreamGougeProj>(),
ModContent.ProjectileType<TenebreusTidesProjectile>(),
ModContent.ProjectileType<TerraLanceProjectile>(),
ModContent.ProjectileType<TyphonsGreedStaff>(),
ModContent.ProjectileType<UrchinSpearProjectile>(),
ModContent.ProjectileType<YateveoBloomSpear>()
};
@@ -1977,6 +1980,11 @@ namespace CalamityMod
NPCID.QueenBee,
};
needsDebuffIconDisplayList = new List<int>()
{
NPCID.WallofFleshEye
};
trapProjectileList = new List<int>()
{
ProjectileID.PoisonDartTrap,
+15 -1
View File
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using Terraria;
using Terraria.DataStructures;
using Terraria.ModLoader;
@@ -10,7 +11,7 @@ namespace CalamityMod.Items.Accessories
{
DisplayName.SetDefault("Aero Stone");
Tooltip.SetDefault("One of the ancient relics\n" +
"Increases movement speed by 10%, jump speed by 100%, and all damage by 3%");
"Increases movement speed by 10%, jump speed by 20%, and all damage by 3%");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(4, 8));
}
@@ -23,6 +24,19 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
bool autoJump = Main.player[Main.myPlayer].autoJump;
string jumpAmt = autoJump ? "5" : "20";
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "Increases movement speed by 10%, jump speed by " + jumpAmt + "%, and all damage by 3%";
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, 0f, 0.425f, 0.425f);
+1
View File
@@ -30,6 +30,7 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.alchFlask = true;
modPlayer.reducedPlagueDmg = true;
}
public override void AddRecipes()
+2
View File
@@ -14,6 +14,8 @@ namespace CalamityMod.Items.Accessories
"Grants the ability to dash; dashing into an attack will cause you to dodge it\n" +
"After a dodge you will be granted a buff to all damage, melee speed, and all crit chance for a short time\n" +
"After a successful dodge you must wait 15 seconds before you can dodge again\n" +
"This cooldown will be twice as long if you have Chaos State\n" +
"While on cooldown, Chaos State will last twice as long\n" +
"Revengeance drop");
}
+3 -3
View File
@@ -9,10 +9,10 @@ namespace CalamityMod.Items.Accessories
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Dragon Scales");
Tooltip.SetDefault("Causes all rogue projectiles to emit a slow fireball as it travels\n" +
Tooltip.SetDefault("Only a living dragon holds true treasure\n" +
"Rogue projectiles create slow fireballs as they travel\n" +
"Stealth strikes create infernados on death\n" +
"After Yharon is dead, you are granted 10% movement speed and acceleration\n" +
"'Only a living dragon holds true treasure'");
"After Yharon is dead, you gain 10% movement speed and acceleration");
}
public override void SetDefaults()
+3 -1
View File
@@ -14,7 +14,9 @@ namespace CalamityMod.Items.Accessories
Tooltip.SetDefault("True melee strikes deal 30% more damage\n" +
"Grants the ability to dash; dashing into an attack will cause you to dodge it\n" +
"After a dodge you will be granted a buff to all damage, melee speed, and all crit chance for a short time\n" +
"After a successful dodge you must wait 13 seconds before you can dodge again");
"After a successful dodge you must wait 13 seconds before you can dodge again\n" +
"This cooldown will be 50 percent longer if you have Chaos State\n" +
"While on cooldown, Chaos State will be 50 percent longer");
}
public override void SetDefaults()
+17 -3
View File
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,7 +12,7 @@ namespace CalamityMod.Items.Accessories
{
DisplayName.SetDefault("Grand Gelatin");
Tooltip.SetDefault("10% increased movement speed\n" +
"200% increased jump speed\n" +
"40% increased jump speed\n" +
"+20 max life and mana\n" +
"Standing still boosts life and mana regen");
}
@@ -25,13 +26,26 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
bool autoJump = Main.player[Main.myPlayer].autoJump;
string jumpAmt = autoJump ? "10" : "40";
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = jumpAmt + "% increased jump speed";
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.moveSpeed += 0.1f;
player.jumpSpeedBoost += player.autoJump ? 0.5f : 2.0f;
player.jumpSpeedBoost += player.autoJump ? 0.5f : 2f;
player.statLifeMax2 += 20;
player.statManaMax2 += 20;
if ((double)Math.Abs(player.velocity.X) < 0.05 && (double)Math.Abs(player.velocity.Y) < 0.05 && player.itemAnimation == 0)
if (Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0)
{
player.lifeRegen += 2;
player.manaRegenBonus += 2;
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories
DisplayName.SetDefault("Heart of the Elements");
Tooltip.SetDefault("The heart of the world\n" +
"Increases max life by 20, life regen by 1, and all damage by 8%\n" +
"Increases movement speed by 10% and jump speed by 100%\n" +
"Increases movement speed by 10% and jump speed by 20%\n" +
"Increases damage reduction by 5%\n" +
"Increases max mana by 50 and reduces mana usage by 5%\n" +
"You grow flowers on the grass beneath you, chance to grow very random dye plants on grassless dirt\n" +
+1
View File
@@ -51,6 +51,7 @@ namespace CalamityMod.Items.Accessories
modPlayer.uberBees = true;
player.strongBees = true;
modPlayer.alchFlask = true;
modPlayer.reducedPlagueDmg = true;
int plagueCounter = 0;
Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), 0.1f, 2f, 0.2f);
int num = ModContent.BuffType<Plague>();
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories
"Poison, Freeze, Chill, Frostburn, and Venom immunity\n" +
"Honey-like life regen with no speed penalty, +20 max life and mana\n" +
"Most bee/hornet enemies and projectiles do 75% damage to you\n" +
"120% increased jump speed and 12% increased movement speed\n" +
"24% increased jump speed and 12% increased movement speed\n" +
"Standing still boosts life and mana regen\n" +
"Increased defense and damage reduction when submerged in liquid\n" +
"Increased movement speed when submerged in liquid\n" +
+7 -5
View File
@@ -62,7 +62,8 @@ namespace CalamityMod.Items.Accessories
int lifeRegen = modPlayer.lifeRegenStat;
int manaRegen = modPlayer.manaRegenStat;
int armorPenetration = modPlayer.armorPenetrationStat;
int wingFlightTime = modPlayer.wingFlightTimeStat;
string wingFlightTime = modPlayer.wingFlightTimeStat.ToString("n2");
string jumpSpeed = modPlayer.jumpSpeedStat.ToString("n2");
int moveSpeed = modPlayer.moveSpeedStat;
int lightLevel = modPlayer.abyssLightLevelStat;
int breathLoss = modPlayer.abyssBreathLossStat;
@@ -124,10 +125,11 @@ namespace CalamityMod.Items.Accessories
// Generic stats always render.
sb.Append("Defense: ").Append(defense);
sb.Append(" | DR: ").Append(DR).Append("%\n");
sb.Append("Life Regen: ").Append(lifeRegen);
sb.Append(" | Armor Penetration: ").Append(armorPenetration).Append("\n");
sb.Append("Wing Flight Time: ").Append(wingFlightTime);
sb.Append(" | DR: ").Append(DR).Append("%");
sb.Append(" | Life Regen: ").Append(lifeRegen).Append("\n");
sb.Append("Armor Penetration: ").Append(armorPenetration);
sb.Append(" | Wing Flight Time: ").Append(wingFlightTime).Append(" seconds\n");
sb.Append("Jump Speed Boost: ").Append(jumpSpeed).Append("%");
sb.Append(" | Movement Speed Boost: ").Append(moveSpeed).Append("%\n\n");
sb.Append(CalamityWorld.death ? "Abyss/Cave Light Strength: " : "Abyss Light Strength: ").Append(lightLevel).Append("\n\n");
+2 -1
View File
@@ -12,7 +12,8 @@ namespace CalamityMod.Items.Accessories
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Statis' Void Sash");
Tooltip.SetDefault("Increases jump speed and allows constant jumping\n" +
Tooltip.SetDefault("24% increased jump speed and allows constant jumping\n" +
"Increases fall damage resistance by 50 blocks\n" +
"Can climb walls, dash, and dodge attacks\n" +
"Dashes leave homing scythes in your wake\n" +
"Toggle visibility of this accessory to enable/disable the dash");
+2 -1
View File
@@ -11,7 +11,8 @@ namespace CalamityMod.Items.Accessories
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Statis' Ninja Belt");
Tooltip.SetDefault("Increases jump speed and allows constant jumping\n" +
Tooltip.SetDefault("8% increased jump speed and allows constant jumping\n" +
"Increased fall damage resistance by 35 blocks\n" +
"Can climb walls, dash, and dodge attacks\n" +
"Toggle visibility of this accessory to enable/disable the dash");
}
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories
{
DisplayName.SetDefault("The Absorber");
Tooltip.SetDefault("12% increased movement speed\n" +
"120% increased jump speed\n" +
"24% increased jump speed\n" +
"+20 max life and mana\n" +
"Standing still boosts life and mana regen\n" +
"Increased defense and damage reduction when submerged in liquid\n" +
+20 -6
View File
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
@@ -8,23 +9,36 @@ namespace CalamityMod.Items.Accessories
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Vital Jelly");
Tooltip.SetDefault("10% increased movement speed\n" +
"200% increased jump speed");
Tooltip.SetDefault("20% increased movement speed\n" +
"24% increased jump speed");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 24;
item.value = CalamityGlobalItem.Rarity4BuyPrice;
item.rare = 4;
item.value = CalamityGlobalItem.Rarity3BuyPrice;
item.rare = 3;
item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
bool autoJump = Main.player[Main.myPlayer].autoJump;
string jumpAmt = autoJump ? "6" : "24";
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = jumpAmt + "% increased jump speed";
}
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.moveSpeed += 0.1f;
player.jumpSpeedBoost += player.autoJump ? 0.5f : 2.0f;
player.moveSpeed += 0.2f;
player.jumpSpeedBoost += player.autoJump ? 0.3f : 1.2f;
}
}
}
+1
View File
@@ -55,6 +55,7 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.calamityRing = true;
modPlayer.voidOfExtinction = true;
player.lavaRose = true;
player.lavaMax += 240;
player.allDamage += 0.15f;
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories.Wings
"Acceleration multiplier: 1.75\n" +
"Good vertical speed\n" +
"Flight time: 120\n" +
"20% increased movement speed and 40% increased jump speed while wearing the Astral Armor");
"20% increased movement speed and 8% increased jump speed while wearing the Astral Armor");
}
public override void SetDefaults()
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories.Wings
"Acceleration multiplier: 1\n" +
"Good vertical speed\n" +
"Flight time: 75\n" +
"Increases jump height and allows auto-jump\n" +
"16% increased jump speed and allows auto-jump\n" +
"Grants the player cloud, blizzard, and sandstorm mid-air jumps");
}
+1 -1
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Accessories.Wings
"Acceleration multiplier: 1\n" +
"Average vertical speed\n" +
"Flight time: 60\n" +
"25% increased jump speed while wearing the Aerospec armor");
"5% increased jump speed while wearing the Aerospec armor");
}
public override void SetDefaults()
+2 -2
View File
@@ -13,13 +13,13 @@ namespace CalamityMod.Items.Accessories.Wings
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Xeroc Wings");
DisplayName.SetDefault("Exodus Wings");
Tooltip.SetDefault("Highly radioactive\n" +
"Horizontal speed: 8.5\n" +
"Acceleration multiplier: 2\n" +
"Good vertical speed\n" +
"Flight time: 180\n" +
"5% increased rogue damage and critical strike chance while wearing the Xeroc Armor");
"5% increased rogue damage and critical strike chance while wearing the Empyrean Armor");
}
public override void SetDefaults()
+1 -1
View File
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Ammo
item.rare = 1;
item.shoot = ModContent.ProjectileType<AccelerationBulletProj>();
item.shootSpeed = 1f;
item.ammo = 97;
item.ammo = AmmoID.Bullet;
}
public override void AddRecipes()
+3 -2
View File
@@ -9,7 +9,8 @@ namespace CalamityMod.Items.Ammo
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Verium Bullet");
Tooltip.SetDefault("There is no escape!");
Tooltip.SetDefault("There is no escape!\n" +
"Homes in after striking an enemy");
}
public override void SetDefaults()
@@ -25,7 +26,7 @@ namespace CalamityMod.Items.Ammo
item.rare = 3;
item.shoot = ModContent.ProjectileType<VeriumBulletProj>();
item.shootSpeed = 16f;
item.ammo = 97;
item.ammo = AmmoID.Bullet;
}
public override void AddRecipes()
+1 -1
View File
@@ -53,7 +53,7 @@ namespace CalamityMod.Items.Armor
public override void UpdateArmorSet(Player player)
{
player.setBonus = @"30% increased minion damage
Minions deal full damage while wielding weaponry
The minion damage nerf while wielding weaponry is reduced
Immunity to all forms of frost and flame
All minion attacks grant colossal life regeneration
15% increased damage reduction during the Pumpkin and Frost Moons
+1 -1
View File
@@ -48,7 +48,7 @@ namespace CalamityMod.Items.Armor
player.setBonus = "Press " + hotkey + " to call an ancient storm to the cursor location\n" +
"The ancient storm costs " + stormMana + " mana and benefits from both summon and rogue bonuses\n" +
"Rogue stealth strikes spawn homing eaters on enemy hits\n" +
"Minions deal full damage while wielding rogue weapons\n" +
"The minion damage nerf is reduced while wielding rogue weapons\n" +
"Rogue and summon attacks will scale off of the stat with a higher boost\n" +
"Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" +
"Once you have built max stealth, you will be able to perform a Stealth Strike\n" +
+2 -2
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Armor
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Plague Reaper Vest");
Tooltip.SetDefault("Immunity to the Plague\n" +
Tooltip.SetDefault("Reduces the damage caused to you by the plague\n" +
"15% increased ranged damage and 5% increased ranged critical strike chance");
}
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Armor
{
player.rangedDamage += 0.15f;
player.rangedCrit += 5;
player.buffImmune[ModContent.BuffType<Plague>()] = true;
player.Calamity().reducedPlagueDmg = true;
}
public override void AddRecipes()
+2 -2
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Armor
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Plaguebringer Carapace");
Tooltip.SetDefault("Immunity to the Plague\n" +
Tooltip.SetDefault("Reduces the damage caused to you by the plague\n" +
"12% increased minion damage and +1 max minions\n" +
"Friendly bees inflict the plague");
}
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Armor
player.Calamity().plaguebringerCarapace = true;
player.maxMinions += 2;
player.minionDamage += 0.12f;
player.buffImmune[ModContent.BuffType<Plague>()] = true;
player.Calamity().reducedPlagueDmg = true;
}
public override void AddRecipes()
+1 -1
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Armor
DisplayName.SetDefault("Prismatic Greaves");
Tooltip.SetDefault("10% increased magic damage and 12% increased magic crit\n" +
"20% decreased non-magic damage\n" +
"Increases flight time and jump speed by 10%");
"10% increased flight time and 2% increased jump speed");
}
public override void SetDefaults()
+2 -1
View File
@@ -34,7 +34,8 @@ namespace CalamityMod.Items.Armor
public override void UpdateArmorSet(Player player)
{
player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" +
"Grants an extra jump and increased jump height";
"Grants an extra jump and increased jump height\n" +
"30% increased jump speed";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.statigelSet = true;
player.doubleJumpSail = true;
+2 -1
View File
@@ -34,7 +34,8 @@ namespace CalamityMod.Items.Armor
public override void UpdateArmorSet(Player player)
{
player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" +
"Grants an extra jump and increased jump height";
"Grants an extra jump and increased jump height\n" +
"30% increased jump speed";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.statigelSet = true;
player.doubleJumpSail = true;
+2 -1
View File
@@ -34,7 +34,8 @@ namespace CalamityMod.Items.Armor
public override void UpdateArmorSet(Player player)
{
player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" +
"Grants an extra jump and increased jump height";
"Grants an extra jump and increased jump height\n" +
"30% increased jump speed";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.statigelSet = true;
player.doubleJumpSail = true;
+2 -1
View File
@@ -37,7 +37,8 @@ namespace CalamityMod.Items.Armor
player.setBonus = "18% increased minion damage\n" +
"Summons a mini slime god to fight for you, the type depends on what world evil you have\n" +
"When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" +
"Grants an extra jump and increased jump height";
"Grants an extra jump and increased jump height\n" +
"30% increased jump speed";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.statigelSet = true;
modPlayer.slimeGod = true;
+1
View File
@@ -35,6 +35,7 @@ namespace CalamityMod.Items.Armor
{
player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" +
"Grants an extra jump and increased jump height\n" +
"30% increased jump speed\n" +
"Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" +
"Once you have built max stealth, you will be able to perform a Stealth Strike\n" +
"Rogue stealth only reduces when you attack, it does not reduce while moving\n" +
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -32,7 +33,7 @@ namespace CalamityMod.Items.Armor
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<Stardust>(), 14);
recipe.AddIngredient(ModContent.ItemType<AstralMonolith>(), 14);
recipe.AddIngredient(ModContent.ItemType<TitanHeart>());
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -33,7 +34,7 @@ namespace CalamityMod.Items.Armor
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<Stardust>(), 20);
recipe.AddIngredient(ModContent.ItemType<AstralMonolith>(), 20);
recipe.AddIngredient(ModContent.ItemType<TitanHeart>());
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
+2 -1
View File
@@ -1,5 +1,6 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -54,7 +55,7 @@ namespace CalamityMod.Items.Armor
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<Stardust>(), 10);
recipe.AddIngredient(ModContent.ItemType<AstralMonolith>(), 10);
recipe.AddIngredient(ModContent.ItemType<TitanHeart>());
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
+1 -1
View File
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor
player.setBonus = "Increased life regen and melee damage while submerged in liquid\n" +
"When using any weapon you have a 10% chance to throw a returning seashell projectile\n" +
"This seashell does true damage and does not benefit from any damage class\n" +
"Slightly reduces breath loss in the abyss";
"Provides increased underwater mobility and slightly reduces breath loss in the abyss";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.victideSet = true;
player.ignoreWater = true;
+1 -1
View File
@@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor
"Summons a sea urchin to protect you\n" +
"When using any weapon you have a 10% chance to throw a returning seashell projectile\n" +
"This seashell does true damage and does not benefit from any damage class\n" +
"Slightly reduces breath loss in the abyss";
"Provides increased underwater mobility and slightly reduces breath loss in the abyss";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.victideSet = true;
modPlayer.urchin = true;
+1 -1
View File
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor
player.setBonus = "Increased life regen and magic damage while submerged in liquid\n" +
"When using any weapon you have a 10% chance to throw a returning seashell projectile\n" +
"This seashell does true damage and does not benefit from any damage class\n" +
"Slightly reduces breath loss in the abyss";
"Provides increased underwater mobility and slightly reduces breath loss in the abyss";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.victideSet = true;
player.ignoreWater = true;
+1 -1
View File
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor
player.setBonus = "Increased life regen and ranged damage while submerged in liquid\n" +
"When using any weapon you have a 10% chance to throw a returning seashell projectile\n" +
"This seashell does true damage and does not benefit from any damage class\n" +
"Slightly reduces breath loss in the abyss";
"Provides increased underwater mobility and slightly reduces breath loss in the abyss";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.victideSet = true;
player.ignoreWater = true;
+24 -26
View File
@@ -154,12 +154,12 @@ namespace CalamityMod.Items
item.defense = 41; //7 more defense
else if (item.type == ItemID.SolarFlareLeggings)
item.defense = 24; //4 more defense
else if (item.type == ItemID.GladiatorHelmet) //total defense pre-buff = 7 post-buff = 21
item.defense = 4; //2 more defense
else if (item.type == ItemID.GladiatorHelmet) //total defense pre-buff = 7 post-buff = 15
item.defense = 3; //1 more defense
else if (item.type == ItemID.GladiatorBreastplate)
item.defense = 7; //4 more defense
item.defense = 5; //2 more defense
else if (item.type == ItemID.GladiatorLeggings)
item.defense = 5; //3 more defense
item.defense = 4; //2 more defense
else if (item.type == ItemID.HallowedPlateMail) //total defense pre-buff = 31, 50, 35 post-buff = 36, 55, 40
item.defense = 18; //3 more defense
else if (item.type == ItemID.HallowedGreaves)
@@ -878,16 +878,17 @@ namespace CalamityMod.Items
return false;
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<GiantIbanRobotOfDoom>()] > 0 &&
item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (item.Calamity().rogue || item.magic || item.ranged || item.melee))
if (player.ownedProjectileCounts[ModContent.ProjectileType<GiantIbanRobotOfDoom>()] > 0)
{
if (player.altFunctionUse == 0)
if (item.type == ItemID.WireKite)
return false;
if (item.pick > 0 && item.axe > 0 && item.hammer > 0)
return false;
if (item.Calamity().rogue || item.magic || item.ranged || item.melee)
{
return PerformAndromedaAttacks(item, player);
}
else
{
return AltFunctionUse(item, player);
if (player.altFunctionUse == 0)
return PerformAndromedaAttacks(item, player);
else return false;
}
}
@@ -1721,7 +1722,7 @@ namespace CalamityMod.Items
{
if (line2.mod == "Terraria" && line2.Name == "SetBonus")
{
line2.text += "\nMinions deal full damage while wielding magic weapons";
line2.text += "\nThe minion damage nerf is reduced while wielding magic weapons";
}
}
}
@@ -1732,7 +1733,7 @@ namespace CalamityMod.Items
{
if (line2.mod == "Terraria" && line2.Name == "Defense")
{
line2.text = "4 defense\n" +
line2.text = "3 defense\n" +
"3% increased rogue damage";
}
}
@@ -1743,7 +1744,7 @@ namespace CalamityMod.Items
{
if (line2.mod == "Terraria" && line2.Name == "Defense")
{
line2.text = "7 defense\n" +
line2.text = "5 defense\n" +
"3% increased rogue critical strike chance";
}
}
@@ -1754,7 +1755,7 @@ namespace CalamityMod.Items
{
if (line2.mod == "Terraria" && line2.Name == "Defense")
{
line2.text = "5 defense\n" +
line2.text = "4 defense\n" +
"3% increased rogue velocity";
}
}
@@ -2050,7 +2051,7 @@ Provides heat and cold protection in Death Mode";
"Flight time: 100\n" +
"Gills effect and you can move freely through liquids\n" +
"You fall faster while submerged in liquid\n" +
"20% increased movement speed and 180% increased jump speed";
"20% increased movement speed and 36% increased jump speed";
}
}
}
@@ -2112,7 +2113,7 @@ Provides heat and cold protection in Death Mode";
"Average vertical speed\n" +
"Flight time: 140\n" +
"At night or during an eclipse, you will gain the following boosts:\n" +
"10% increased movement speed, 100% increased jump speed,\n" +
"10% increased movement speed, 20% increased jump speed,\n" +
"+15 defense, 10% increased damage, and 5% increased critical strike chance";
}
}
@@ -2208,7 +2209,7 @@ Provides heat and cold protection in Death Mode";
"Average vertical speed\n" +
"Flight time: 160\n" +
"+5 defense, 5% increased damage, " +
"10% increased movement speed and 120% increased jump speed";
"10% increased movement speed and 24% increased jump speed";
}
}
}
@@ -2934,8 +2935,8 @@ Provides heat and cold protection in Death Mode";
modPlayer.wearingRogueArmor = true;
player.Calamity().throwingDamage += 0.05f;
player.Calamity().throwingVelocity += 0.1f;
player.statDefense += 5;
player.setBonus = "+5 defense\n" +
player.statDefense += 3;
player.setBonus = "+3 defense\n" +
"5% increased rogue damage and 10% increased velocity\n" +
"Rogue stealth builds while not attacking and not moving, up to a max of 70\n" +
"Once you have built max stealth, you will be able to perform a Stealth Strike\n" +
@@ -3506,11 +3507,8 @@ Provides heat and cold protection in Death Mode";
{
int value = item.value;
ItemLoader.ReforgePrice(item, ref value, ref Main.LocalPlayer.discount);
if (Main.LocalPlayer.Calamity().reforges <= 9) //to be reset later
{
Main.LocalPlayer.Calamity().moneyStolenByBandit += value / 5;
Main.LocalPlayer.Calamity().reforges++;
}
CalamityWorld.MoneyStolenByBandit += value / 5;
CalamityWorld.Reforges++;
}
}
#endregion
+26 -17
View File
@@ -1,6 +1,7 @@
using CalamityMod.NPCs.SlimeGod;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
@@ -13,23 +14,21 @@ namespace CalamityMod.Items.DifficultyItems
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Revengeance");
Tooltip.SetDefault("Activates Revengeance Mode, can only be used in expert mode.\n" +
"Activates rage. When rage is maxed press V to activate rage mode.\n" +
Tooltip.SetDefault("Enables/disables Revengeance Mode, can only be used in expert mode.\n" +
"RAGE TOOLTIP LINE HERE\n" +
"You gain rage whenever you take damage or hit an enemy with a true melee weapon.\n" +
"Activates adrenaline. When adrenaline is maxed press B to activate adrenaline mode.\n" +
"ADRENALINE TOOLTIP LINE HERE\n" +
"You gain adrenaline whenever a boss is alive. Getting hit drops adrenaline back to 0.\n" +
"All enemies drop 50% more cash.\n" +
"All enemies drop 50% more cash and spawn 15% more frequently\n" +
"Certain enemies and projectiles deal between 5% and 25% more damage.\n" +
"Makes certain enemies immune to life steal and nerfs the effectiveness of life steal.\n" +
"Increases enemy damage by 25% and spawn rates by 15%.\n" +
"Nerfs the effectiveness of the Titanium Armor set bonus.\n" +
"Makes life regen scale with your current HP, the higher your HP the lower your life regen (this is not based on max HP).\n" +
"Reduces maximum asphalt run speed by 33%.\n" +
"Increases Nurse healing price.\n" +
"Asphalt run speed is reduced by 33%, and the Nurse's healing cost is increased\n" +
"Allows certain enemies to inflict the Horror and Marked debuffs.\n" +
"Before you have killed your first boss you take 20% less damage from everything.\n" +
"Changes ALL boss AIs and some enemy AIs in vanilla and the Calamity Mod.\n" +
"DO NOT USE IF A BOSS IS ALIVE!\n" +
"Can be toggled on and off.");
"Using this while a boss is alive will instantly kill you and despawn the boss.");
}
public override void SetDefaults()
@@ -44,25 +43,35 @@ namespace CalamityMod.Items.DifficultyItems
item.consumable = false;
}
public override bool CanUseItem(Player player)
public override void ModifyTooltips(List<TooltipLine> list)
{
if (!Main.expertMode || CalamityWorld.bossRushActive)
string rageKey = CalamityMod.RageHotKey.TooltipHotkeyString();
string adrenKey = CalamityMod.AdrenalineHotKey.TooltipHotkeyString();
foreach (TooltipLine line2 in list)
{
return false;
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
line2.text = "Activates rage. When rage is maxed press " + rageKey + " to activate rage mode.";
}
if (line2.mod == "Terraria" && line2.Name == "Tooltip3")
{
line2.text = "Activates adrenaline. When adrenaline is maxed press " + adrenKey + " to activate adrenaline mode.";
}
}
return true;
}
public override bool CanUseItem(Player player) => Main.expertMode && !CalamityWorld.bossRushActive;
public override bool UseItem(Player player)
{
for (int doom = 0; doom < Main.npc.Length; doom++)
{
if ((Main.npc[doom].active && (Main.npc[doom].boss || Main.npc[doom].type == NPCID.EaterofWorldsHead || Main.npc[doom].type == NPCID.EaterofWorldsTail || Main.npc[doom].type == ModContent.NPCType<SlimeGodRun>() ||
Main.npc[doom].type == ModContent.NPCType<SlimeGodRunSplit>() || Main.npc[doom].type == ModContent.NPCType<SlimeGod>() || Main.npc[doom].type == ModContent.NPCType<SlimeGodSplit>())) || CalamityWorld.DoGSecondStageCountdown > 0)
NPC npc = Main.npc[doom];
if ((npc.active && (npc.boss || npc.type == NPCID.EaterofWorldsHead || npc.type == NPCID.EaterofWorldsTail || npc.type == ModContent.NPCType<SlimeGodRun>() || npc.type == ModContent.NPCType<SlimeGodRunSplit>() || npc.type == ModContent.NPCType<SlimeGod>() || npc.type == ModContent.NPCType<SlimeGodSplit>())) || CalamityWorld.DoGSecondStageCountdown > 0)
{
player.KillMe(PlayerDeathReason.ByCustomReason(player.name + " tried to change the rules."), 1000.0, 0, false);
Main.npc[doom].active = Main.npc[doom].friendly;
Main.npc[doom].netUpdate = true;
npc.active = npc.friendly;
npc.netUpdate = true;
}
}
if (!CalamityWorld.revenge)
@@ -2,6 +2,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Buffs.Potions;
using CalamityMod.World;
using System.Collections.Generic;
namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
@@ -38,14 +39,16 @@ The life regen boost is stronger if below 75% health");
public override void OnConsumeItem(Player player)
{
player.statLife += 240;
int healAmt = CalamityWorld.ironHeart ? 0 : 240;
player.statLife += healAmt;
if (player.statLife > player.statLifeMax2)
{
player.statLife = player.statLifeMax2;
}
if (Main.myPlayer == player.whoAmI)
{
player.HealEffect(240, true);
if (!CalamityWorld.ironHeart)
player.HealEffect(healAmt, true);
}
player.AddBuff(ModContent.BuffType<BloodfinBoost>(), 600);
@@ -63,7 +66,7 @@ The life regen boost is stronger if below 75% health");
// Forces the "Restores X life" tooltip to display the actual life restored instead of zero (due to the previous function).
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
tooltips.Find(line => line.Name == "HealLife").text = "Restores " + item.healLife + " life";
tooltips.Find(line => line.Name == "HealLife").text = "Restores " + (CalamityWorld.ironHeart ? 0 : item.healLife) + " life";
}
}
}
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
DropHelper.DropItem(player, ModContent.ItemType<DemonicBoneAsh>(), 3, 5);
DropHelper.DropItemCondition(player, ModContent.ItemType<EssenceofChaos>(), Main.hardMode, 0.5f, 5, 15);
DropHelper.DropItemCondition(player, ModContent.ItemType<BlightedLens>(), Main.hardMode, 0.15f, 2, 6);
DropHelper.DropItemCondition(player, ModContent.ItemType<UnholyCore>(), NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3, 0.5f, 5, 15);
DropHelper.DropItemCondition(player, ModContent.ItemType<UnholyCore>(), CalamityWorld.downedBrimstoneElemental, 0.5f, 5, 15);
DropHelper.DropItemCondition(player, ModContent.ItemType<Bloodstone>(), CalamityWorld.downedProvidence, 0.25f, 8, 10);
// Weapons (none)
+2 -3
View File
@@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Aquatic Scourge");
Tooltip.SetDefault("A horror born of pollution and insatiable hunger; based on size alone this was merely a juvenile.\n" +
"These scourge creatures are the largest aquatic predators and very rarely do they frequent such shallow waters.\n" +
"Place in your inventory to gain immunity to the sulphurous waters and increase the stat gains from the Well Fed buff.\n" +
"However, without the Well Fed buff your stats will decrease due to your insatiable hunger.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to gain immunity to the sulphurous waters and increase the stat gains from the Well Fed buff.\n" +
"However, without the Well Fed buff your stats will decrease due to your insatiable hunger.");
}
public override void SetDefaults()
+1 -2
View File
@@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Astrum Aureus");
Tooltip.SetDefault("A titanic cyborg infected by a star-borne disease expelled from the belly of an ancient god.\n" +
"The destruction of this creature will not prevent the spread of the disease.\n" +
"Place in your inventory to gain increased jump speed in space.\n" +
"This effect only occurs if the item is favorited.");
"Favorite this item to gain 10% increased jump speed in space.");
}
public override void SetDefaults()
+1 -2
View File
@@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Astrum Deus");
Tooltip.SetDefault("God of the stars and largest vessel for the Astral Infection.\n" +
"Though struck down from its place among the stars its remnants have gathered strength, aiming to take its rightful place in the cosmos once more.\n" +
"Place in your inventory to gain increased movement speed in space.\n" +
"This effect only occurs if the item is favorited.");
"Favorite this item to gain increased movement speed in space.");
}
public override void SetDefaults()
@@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Brimstone Elemental");
Tooltip.SetDefault("The most powerful of the elementals, bent on exacting revenge upon the bloody inferno that demolished her home.\n" +
"Finally put to rest, she will suffer no longer from the grief caused by the deaths of her people.\n" +
"Place in your inventory to improve the inferno potion effect.\n" +
"This effect only occurs if the item is favorited.");
"Favorite this item to improve the inferno potion effect.");
}
public override void SetDefaults()
+1 -2
View File
@@ -15,8 +15,7 @@ namespace CalamityMod.Items.LoreItems
Tooltip.SetDefault("The witch unrivaled. Perhaps the only one amongst my cohorts to have ever given me cause for doubt.\n" +
"Now that you have defeated her your destiny is clear.\n" +
"Come now, face me.\n" +
"Place in your inventory to die instantly from every hit.\n" +
"This effect only occurs if the item is favorited.");
"Favorite this item to die instantly from every hit.");
}
public override void SetDefaults()
+3 -2
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Calamitas Clone");
Tooltip.SetDefault("You are indeed stronger than I thought.\n" +
"Though the bloody inferno still lingers, observing your progress.\n" +
"Place in your inventory to gain a boost to your minion slots but at the cost of reduced max health.");
"Favorite this item to gain a boost to your minion slots but at the cost of reduced max health.");
}
public override void SetDefaults()
@@ -33,7 +33,8 @@ namespace CalamityMod.Items.LoreItems
public override void UpdateInventory(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.calamitasLore = true;
if (item.favorited)
modPlayer.calamitasLore = true;
}
public override void AddRecipes()
+3 -2
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("The Corruption");
Tooltip.SetDefault("The rotten and forever-deteriorating landscape of infected life, brought upon by a deadly microbe long ago.\n" +
"It is rumored that the microbe was created through experimentation by a long-dead race, predating the Terrarians.\n" +
"Place in your inventory to prevent hive cysts from spawning.");
"Favorite this item to prevent hive cysts from spawning.");
}
public override void SetDefaults()
@@ -32,7 +32,8 @@ namespace CalamityMod.Items.LoreItems
public override void UpdateInventory(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.corruptionLore = true;
if (item.favorited)
modPlayer.corruptionLore = true;
}
public override void AddRecipes()
+2 -3
View File
@@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Crabulon");
Tooltip.SetDefault("A crab and its mushrooms, a love story.\n" +
"It's interesting how creatures can adapt given certain circumstances.\n" +
"Place in your inventory to gain the Mushy buff while underground or in the mushroom biome.\n" +
"However, your movement speed will be decreased while in these areas due to you being covered in fungi.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to gain the Mushy buff while underground or in the mushroom biome.\n" +
"However, your movement speed will be decreased while in these areas due to you being covered in fungi.");
}
public override void SetDefaults()
+3 -2
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("The Crimson");
Tooltip.SetDefault("This bloody hell, spawned from a formless mass of flesh that fell from the stars eons ago.\n" +
"It is now home to many hideous creatures, spawned from the pumping blood and lurching organs deep within.\n" +
"Place in your inventory to prevent perforator cysts from spawning.");
"Favorite this item to prevent perforator cysts from spawning.");
}
public override void SetDefaults()
@@ -32,7 +32,8 @@ namespace CalamityMod.Items.LoreItems
public override void UpdateInventory(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.crimsonLore = true;
if (item.favorited)
modPlayer.crimsonLore = true;
}
public override void AddRecipes()
+1 -2
View File
@@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Cryogen");
Tooltip.SetDefault("The archmage's prison.\n" +
"I am unsure if it has grown weaker over the decades of imprisonment.\n" +
"Place in your inventory to gain a frost dash that freezes enemies, at the cost of slightly reduced defense due to your brittle body.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to gain a frost dash that freezes enemies, at the cost of slightly reduced defense due to your brittle body.");
}
public override void SetDefaults()
+2 -3
View File
@@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems
Tooltip.SetDefault("The great sea worm appears to have survived the extreme heat and has even adapted to it.\n" +
"What used to be a majestic beast swimming through the water has now become a dried-up and\n" +
"gluttonous husk, constantly on a voracious search for its next meal.\n" +
"Place in your inventory for an increase to defense while in the desert or sunken sea.\n" +
"However, you will deal decreased damage while in these areas due to being a husk of your former self.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item for an increase to defense while in the desert or sunken sea.\n" +
"However, you will deal decreased damage while in these areas due to being a husk of your former self.");
}
public override void SetDefaults()
+2 -3
View File
@@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("The Destroyer");
Tooltip.SetDefault("A machine brought to life by the mighty souls of warriors, and built to excavate massive tunnels in planets to gather resources.\n" +
"Could have proven useful if Draedon didn't have an obsession with turning everything into a tool of destruction.\n" +
"Place in your inventory to gain a boost to your pick speed.\n" +
"However, your max acceleration is decreased slightly due to you feeling heavier.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to gain a boost to your pick speed.\n" +
"However, your max acceleration is decreased slightly due to you feeling heavier.");
}
public override void SetDefaults()
+2 -3
View File
@@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("The Devourer of Gods");
Tooltip.SetDefault("This serpent’s power to assimilate the abilities and energy of those it consumed is unique in almost all the known cosmos, save for its lesser brethren.\n" +
"I would have soon had to eliminate it as a threat had it been given more time and creatures to feast upon.\n" +
"Place in your inventory to boost the power of your true melee strikes by 25%.\n" +
"However, due to your reckless nature you will take increased damage.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to boost the power of your true melee strikes by 25%.\n" +
"However, due to your reckless nature you will take increased damage.");
}
public override void SetDefaults()
+2 -3
View File
@@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Duke Fishron");
Tooltip.SetDefault("The mutant terror of the sea was once the trusted companion of an old king; he tamed it using its favorite treat.\n" +
"Long ago, the creature flew in desperation from the raging bloody inferno consuming its home, ultimately finding its way to the ocean.\n" +
"Place in your inventory for an increase to all damage, crit and movement speed while submerged in liquid.\n" +
"However, while not submerged in liquid you will have slightly decreased damage, crit and movement speed due to feeling dried out.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item for an increase to all damage, crit and movement speed while submerged in liquid.\n" +
"However, while not submerged in liquid you will have slightly decreased damage, crit and movement speed due to feeling dried out.");
}
public override void SetDefaults()
+2 -3
View File
@@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("The Eater of Worlds");
Tooltip.SetDefault("Perhaps it was just a giant worm infected by the microbe, given centuries to feed and grow its festering body.\n" +
"Seems likely, given the origins of this place.\n" +
"Deadly microbes spawn around you while this is placed in your inventory.\n" +
"However, you will have decreased life regen due to your skin rotting off.\n" +
"These effects only occur if the item is favorited.");
"Deadly microbes spawn around you while this item is favorited.\n" +
"However, you will have decreased life regen due to your skin rotting off.");
}
public override void SetDefaults()
+2 -3
View File
@@ -12,9 +12,8 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("The Eye of Cthulhu");
Tooltip.SetDefault("That eye...how peculiar.\n" +
"I sensed it watching you more intensely as you grew stronger.\n" +
"Place in your inventory for night vision at night.\n" +
"However, your vision is reduced during the day.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item for night vision at night.\n" +
"However, your vision is reduced during the day.");
}
public override void SetDefaults()
+1 -2
View File
@@ -13,8 +13,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Golem");
Tooltip.SetDefault("A primitive construct.\n" +
"I admire the lihzahrd race for their ingenuity, though finding faith in such a flawed idol would invariably lead to their downfall.\n" +
"Place in your inventory to gain increased defense while standing still.\n" +
"This effect only occurs if the item is favorited.");
"Favorite this item to gain increased defense while standing still.");
}
public override void SetDefaults()
+2 -3
View File
@@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("The Hive Mind");
Tooltip.SetDefault("A hive of clustered microbial-infected flesh.\n" +
"I do not believe killing it will lessen the corruption here.\n" +
"Place in your inventory for all of your projectiles to inflict cursed flames when in the corruption.\n" +
"However, enemy spawn rates will be greatly reduced while in the corruption due to your overwhelmingly-putrid odor.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item for all of your projectiles to inflict cursed flames when in the corruption.\n" +
"However, enemy spawn rates will be greatly reduced while in the corruption due to your overwhelmingly-putrid odor.");
}
public override void SetDefaults()
+17 -3
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -12,9 +13,8 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("King Slime");
Tooltip.SetDefault("Only a fool could be caught by this pitiful excuse for a hunter.\n" +
"Unfortunately, our world has no shortage of those.\n" +
"Place in your inventory to gain a slight movement speed and jump boost.\n" +
"However, your defense is slightly reduced due to your gelatinous body.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to gain 5% increased movement speed and 2% increased jump speed.\n" +
"However, your defense is reduced by 3 due to your gelatinous body.");
}
public override void SetDefaults()
@@ -25,6 +25,20 @@ namespace CalamityMod.Items.LoreItems
item.consumable = false;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
bool autoJump = Main.player[Main.myPlayer].autoJump;
string hasJumpBoost = "Place in your inventory to gain 5% increased movement speed and 2% increased jump speed.";
string noJumpBoost = "Place in your inventory to gain 5% increased movement speed.";
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip2")
{
line2.text = autoJump ? noJumpBoost : hasJumpBoost;
}
}
}
public override bool CanUseItem(Player player)
{
return false;
@@ -14,10 +14,9 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Leviathan and Siren");
Tooltip.SetDefault("An odd pair of creatures; one seeking companionship and the other seeking sustenance.\n" +
"Perhaps two genetic misfits outcast from their homes that found comfort in assisting one another.\n" +
"Place in your inventory to gain increased max health while wearing the siren heart and treasure detect while wearing the strange orb.\n" +
"Favorite this item to gain increased max health while wearing the siren heart and treasure detect while wearing the strange orb.\n" +
"Allows the young siren pet to move normally while outside of liquids.\n" +
"However, if you're not submerged in liquid you will have decreased defense and damage reduction.\n" +
"These effects only occur if the item is favorited.");
"However, if you're not submerged in liquid you will have decreased defense and damage reduction.");
}
public override void SetDefaults()
+2 -3
View File
@@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems
Tooltip.SetDefault("The gifted one that terminated my grand summoning so long ago with his uncanny powers over the arcane.\n" +
"Someone I once held in such contempt for his actions is now...deceased, his sealing ritual undone...prepare for the end.\n" +
"Your impending doom approaches...\n" +
"Place in your inventory for an increase to all stats during the lunar event.\n" +
"However, your vision is decreased due to eldritch knowledge damaging your mind.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item for an increase to all stats during the lunar event.\n" +
"However, your vision is decreased due to eldritch knowledge damaging your mind.");
}
public override void SetDefaults()
+2 -3
View File
@@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems
Tooltip.SetDefault("What a waste.\n" +
"Had it been fully restored it would have been a force to behold, but what you fought was an empty shell.\n" +
"However, that doesn't diminish the immense potential locked within it, released upon its death.\n" +
"Place in your inventory to gain an improved Gravity Globe that gives you an increase to all stats while upside down.\n" +
"However, while not upside down you have permanent featherfall.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to gain an improved Gravity Globe that gives you an increase to all stats while upside down.\n" +
"However, while not upside down you have permanent featherfall.");
}
public override void SetDefaults()
+3 -2
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("The Ocean");
Tooltip.SetDefault("Take care to not disturb the deep waters of this world.\n" +
"You may awaken something more terrifying than death itself.\n" +
"Place in your inventory to prevent the mysterious siren lure from spawning.");
"Favorite this item to prevent the mysterious siren lure from spawning.");
}
public override void SetDefaults()
@@ -33,7 +33,8 @@ namespace CalamityMod.Items.LoreItems
public override void UpdateInventory(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.oceanLore = true;
if (item.favorited)
modPlayer.oceanLore = true;
}
public override void AddRecipes()
+1 -2
View File
@@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Old Duke");
Tooltip.SetDefault("Strange, to find out that the mutant terror of the seas was not alone in its unique biology.\n" +
"Perhaps I was mistaken to classify the creature from its relation to pigrons alone.\n" +
"Place in your inventory to convert negative effects from the Acid Rain debuff to positive effects.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to convert negative effects from the Acid Rain debuff to positive effects.");
}
public override void SetDefaults()
+2 -3
View File
@@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems
{
DisplayName.SetDefault("The Perforators and their Hive");
Tooltip.SetDefault("An abomination of comingled flesh, bone, and organ, infested primarily by blood-slurping worms.\n" +
"Place in your inventory for all of your projectiles to inflict ichor when in the crimson.\n" +
"However, enemy spawn rates will be greatly increased while in the crimson due to your body excreting a sweet-smelling pus.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item for all of your projectiles to inflict ichor when in the crimson.\n" +
"However, enemy spawn rates will be greatly increased while in the crimson due to your body excreting a sweet-smelling pus.");
}
public override void SetDefaults()
@@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("The Plaguebringer Goliath");
Tooltip.SetDefault("A horrific amalgam of steel, flesh, and infection, capable of destroying an entire civilization in just one onslaught.\n" +
"Its plague nuke barrage can leave an entire area uninhabitable for months. A shame that it came to this but the plague must be contained.\n" +
"Place in your inventory to gain increased wing flight time, but at the cost of reduced life regen.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to gain increased wing flight time, but at the cost of reduced life regen.");
}
public override void SetDefaults()
+1 -2
View File
@@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems
Tooltip.SetDefault("Well done, you killed a plant.\n" +
"It was used as a vessel to house the spirits of those unfortunate enough to find their way down here.\n" +
"I wish you luck in dealing with the fallout.\n" +
"Place in your inventory to gain increased item grab range.\n" +
"This effect only occurs if the item is favorited.");
"Favorite this item to gain increased item grab range.");
}
public override void SetDefaults()
+1 -2
View File
@@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Polterghast");
Tooltip.SetDefault("A creature born of hatred and anger, formed by countless human souls with all of their energy entirely devoted to consuming others.\n" +
"It seems a waste to have had such a potent source of power ravage mindlessly through these empty halls.\n" +
"Place in your inventory to gain increased item grab range.\n" +
"This effect only occurs if the item is favorited.");
"Favorite this item to gain increased item grab range.");
}
public override void SetDefaults()
+2 -3
View File
@@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Providence, the Profaned Goddess");
Tooltip.SetDefault("A core surrounded by stone and flame, a simple origin and a simple goal.\n" +
"What would have become of us had she not been defeated is a frightening concept to consider.\n" +
"Place in your inventory to imbue all projectiles with profaned flames, causing them to inflict extra damage.\n" +
"However, your max life is decreased due to a part of your soul being required to fuel the profaned flames.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to imbue all projectiles with profaned flames, causing them to inflict extra damage.\n" +
"However, your max life is decreased due to a part of your soul being required to fuel the profaned flames.");
}
public override void SetDefaults()
+1 -2
View File
@@ -12,8 +12,7 @@ namespace CalamityMod.Items.LoreItems
{
DisplayName.SetDefault("Queen Bee");
Tooltip.SetDefault("As crude as the giant insects are they can prove useful in certain situations...given the ability to control them.\n" +
"Place in your inventory to make small bees and weak hornets friendly.\n" +
"This effect only occurs if the item is favorited.");
"Favorite this item to make small bees and weak hornets friendly.");
}
public override void SetDefaults()
+1 -2
View File
@@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Ravager");
Tooltip.SetDefault("The flesh golem constructed using twisted necromancy during the time of my conquest to counter my unstoppable forces.\n" +
"Its creators were slaughtered by it moments after its conception. It is for the best that it has been destroyed.\n" +
"Place in your inventory to gain an increase to all damage, but at the cost of reduced wing flight time.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to gain an increase to all damage, but at the cost of reduced wing flight time.");
}
public override void SetDefaults()
+2 -3
View File
@@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Skeletron");
Tooltip.SetDefault("The curse is said to only affect the elderly.\n" +
"After they are afflicted they become an immortal vessel for an ancient demon of the underworld.\n" +
"Place in your inventory to gain increased damage while in the dungeon.\n" +
"However, your max health is decreased due to Skeletron's curse.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to gain increased damage while in the dungeon.\n" +
"However, your max health is decreased due to Skeletron's curse.");
}
public override void SetDefaults()
+2 -3
View File
@@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Skeletron Prime");
Tooltip.SetDefault("What a silly and pointless contraption for something created with the essence of pure terror.\n" +
"Draedon obviously took several liberties with its design...I am not impressed.\n" +
"Place in your inventory to gain a boost to your armor penetration.\n" +
"However, your max acceleration is decreased due to you feeling heavier.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to gain a boost to your armor penetration.\n" +
"However, your max acceleration is decreased due to you feeling heavier.");
}
public override void SetDefaults()
+2 -3
View File
@@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("The Slime God");
Tooltip.SetDefault("It is a travesty, one of the most threatening biological terrors ever created.\n" +
"If this creature were allowed to combine every slime on the planet it would become nearly unstoppable.\n" +
"Place in your inventory to become slimed and able to slide around on tiles quickly, at the cost of reduced defense.\n" +
"This effect makes dashing more difficult and does not work with mounts.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to become slimed and able to slide around on tiles quickly, at the cost of reduced defense.\n" +
"This effect makes dashing more difficult and does not work with mounts.");
}
public override void SetDefaults()
+2 -3
View File
@@ -13,10 +13,9 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("The Twins");
Tooltip.SetDefault("The bio-mechanical watchers of the night, originally created as security using the souls extracted from human eyes.\n" +
"These creatures did not belong in this world, it's best to be rid of them.\n" +
"Place in your inventory to gain invisibility and rogue bonuses at night.\n" +
"Favorite this item to gain invisibility and rogue bonuses at night.\n" +
"However, your defense is reduced while above 50% life due to you feeling softer.\n" +
"Your max acceleration is reduced while below 50% life due to you feeling heavier.\n" +
"These effects only occur if the item is favorited.");
"Your max acceleration is reduced while below 50% life due to you feeling heavier.");
}
public override void SetDefaults()
+3 -2
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("The Underworld");
Tooltip.SetDefault("These obsidian and hellstone towers were once home to thousands of...'people'.\n" +
"Unfortunately for them, they were twisted by their inner demons until they were beyond saving.\n" +
"Place in your inventory to prevent voodoo demons from spawning.");
"Favorite this item to prevent voodoo demons from dropping voodoo dolls.");
}
public override void SetDefaults()
@@ -32,7 +32,8 @@ namespace CalamityMod.Items.LoreItems
public override void UpdateInventory(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.underworldLore = true;
if (item.favorited)
modPlayer.underworldLore = true;
}
public override void AddRecipes()
+1 -2
View File
@@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems
Tooltip.SetDefault("I see the deed is done.\n" +
"The unholy amalgamation of flesh and hatred has been defeated.\n" +
"Prepare to face the terrors that lurk in the light and dark parts of this world.\n" +
"Place in your inventory to gain increased item grab range.\n" +
"This effect only occurs if the item is favorited.");
"Favorite this item to gain increased item grab range.");
}
public override void SetDefaults()
+1 -2
View File
@@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems
DisplayName.SetDefault("Jungle Dragon, Yharon");
Tooltip.SetDefault("I would not be able to bear a world without my faithful companion by my side.\n" +
"Fortunately, fate will have it so that it is a world I shall never have to see, for better or for worse.\n" +
"Place in your inventory to gain nearly-infinite wing flight time, but at the cost of a 25% decrease to all damage.\n" +
"These effects only occur if the item is favorited.");
"Favorite this item to gain nearly-infinite wing flight time, but at the cost of a 25% decrease to all damage.");
}
public override void SetDefaults()
+62 -35
View File
@@ -1,46 +1,73 @@
using CalamityMod.Items.Placeables.Ores;
using CalamityMod.Tiles;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Tiles;
namespace CalamityMod.Items.Materials
{
public class CruptixBar : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Scoria Bar");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 6));
Tooltip.SetDefault("The smoke feels warm\n" +
"Looks funky when placed"); //explaining the texture shown when placed. same bug as red lightning container and ectoheart tbh
}
public class CruptixBar : ModItem
{
private int frameCounter = 0;
private int frame = 0;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Scoria Bar");
Tooltip.SetDefault("The smoke feels warm");
}
public override void SetDefaults()
{
item.createTile = ModContent.TileType<ChaoticBarPlaced>();
item.noUseGraphic = true; //no use graphic because animated things swing their entire sheet
item.useStyle = ItemUseStyleID.SwingThrow;
item.useTurn = true;
item.useAnimation = 15;
item.useTime = 10;
item.autoReuse = true;
item.consumable = true;
item.width = 30;
item.height = 24;
item.maxStack = 999;
item.value = Item.sellPrice(gold: 1, silver: 20);
item.rare = 8;
}
public override void SetDefaults()
{
item.createTile = ModContent.TileType<ChaoticBarPlaced>();
item.useStyle = ItemUseStyleID.SwingThrow;
item.useTurn = true;
item.useAnimation = 15;
item.useTime = 10;
item.autoReuse = true;
item.consumable = true;
item.width = 40;
item.height = 52;
item.maxStack = 999;
item.value = Item.sellPrice(gold: 1, silver: 20);
item.rare = 8;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<ChaoticOre>(), 5);
recipe.AddTile(TileID.AdamantiteForge);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
internal Rectangle GetCurrentFrame()
{
int frameAmt = 6;
if (frameCounter >= 6)
{
frameCounter = -1;
frame = frame == frameAmt - 1 ? 0 : frame + 1;
}
frameCounter++;
return new Rectangle(0, item.height * frame, item.width, item.height);
}
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/CruptixBar_Animated");
spriteBatch.Draw(texture, position, GetCurrentFrame(), Color.White, 0f, origin, scale, SpriteEffects.None, 0);
return false;
}
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/CruptixBar_Animated");
spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<ChaoticOre>(), 5);
recipe.AddTile(TileID.AdamantiteForge);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 910 B

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

+65 -44
View File
@@ -9,52 +9,73 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.PermanentBoosters
{
public class Ectoheart : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ectoheart");
Tooltip.SetDefault("Permanently makes Adrenaline Mode take 5 less seconds to charge\n" +
"Revengeance drop");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(8, 3));
}
{
private int frameCounter = 0;
private int frame = 0;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ectoheart");
Tooltip.SetDefault("Permanently makes Adrenaline Mode take 5 less seconds to charge\n" +
"Revengeance drop");
}
public override void SetDefaults()
{
item.width = 42;
item.height = 44;
item.useAnimation = 30;
item.useTime = 30;
item.useStyle = ItemUseStyleID.HoldingUp;
item.UseSound = SoundID.Item122;
item.consumable = true;
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.PureGreen;
}
public override void SetDefaults()
{
item.width = 42;
item.height = 44;
item.useAnimation = 30;
item.useTime = 30;
item.useStyle = ItemUseStyleID.HoldingUp;
item.UseSound = SoundID.Item122;
item.consumable = true;
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.PureGreen;
}
public override bool CanUseItem(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.adrenalineBoostThree)
{
return false;
}
return true;
}
public override bool CanUseItem(Player player) => !player.Calamity().adrenalineBoostThree;
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
CalamityUtils.DrawItemGlowmask(item, spriteBatch, 3, rotation, ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/EctoheartGlow"));
}
internal Rectangle GetCurrentFrame(bool frameCounterUp = true)
{
int frameAmt = 3;
if (frameCounter >= 8)
{
frameCounter = -1;
frame = frame == frameAmt - 1 ? 0 : frame + 1;
}
if (frameCounterUp)
frameCounter++;
return new Rectangle(0, item.height * frame, item.width, item.height);
}
public override bool UseItem(Player player)
{
if (player.itemAnimation > 0 && player.itemTime == 0)
{
player.itemTime = item.useTime;
CalamityPlayer modPlayer = player.Calamity();
modPlayer.adrenalineBoostThree = true;
}
return true;
}
}
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/Ectoheart_Animated");
spriteBatch.Draw(texture, position, GetCurrentFrame(), Color.White, 0f, origin, scale, SpriteEffects.None, 0);
return false;
}
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/Ectoheart_Animated");
spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
return false;
}
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/EctoheartGlow");
spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(false), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
public override bool UseItem(Player player)
{
if (player.itemAnimation > 0 && player.itemTime == 0)
{
player.itemTime = item.useTime;
CalamityPlayer modPlayer = player.Calamity();
modPlayer.adrenalineBoostThree = true;
}
return true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -1,4 +1,6 @@
using CalamityMod.CalPlayer;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
@@ -6,48 +8,74 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.PermanentBoosters
{
public class RedLightningContainer : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Red Lightning Container");
Tooltip.SetDefault("Permanently makes Rage Mode do 15% more damage\n" +
"Revengeance drop");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 6));
}
public class RedLightningContainer : ModItem
{
private int frameCounter = 0;
private int frame = 0;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Red Lightning Container");
Tooltip.SetDefault("Permanently makes Rage Mode do 15% more damage\n" +
"Revengeance drop");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.useAnimation = 30;
item.useTime = 30;
item.useStyle = ItemUseStyleID.HoldingUp;
item.UseSound = SoundID.Item122;
item.consumable = true;
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.Turquoise;
}
public override void SetDefaults()
{
item.width = 30;
item.height = 40;
item.useAnimation = 30;
item.useTime = 30;
item.useStyle = ItemUseStyleID.HoldingUp;
item.UseSound = SoundID.Item122;
item.consumable = true;
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.Turquoise;
}
public override bool CanUseItem(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.rageBoostThree)
{
return false;
}
return true;
}
public override bool CanUseItem(Player player) => !player.Calamity().rageBoostThree;
public override bool UseItem(Player player)
{
if (player.itemAnimation > 0 && player.itemTime == 0)
{
player.itemTime = item.useTime;
CalamityPlayer modPlayer = player.Calamity();
modPlayer.rageBoostThree = true;
}
return true;
}
}
internal Rectangle GetCurrentFrame(bool frameCounterUp = true)
{
int frameAmt = 6;
if (frameCounter >= 5)
{
frameCounter = -1;
frame = frame == frameAmt - 1 ? 0 : frame + 1;
}
if (frameCounterUp)
frameCounter++;
return new Rectangle(0, item.height * frame, item.width, item.height);
}
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/RedLightningContainer_Animated");
spriteBatch.Draw(texture, position, GetCurrentFrame(), Color.White, 0f, origin, scale, SpriteEffects.None, 0);
return false;
}
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/RedLightningContainer_Animated");
spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
return false;
}
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/RedLightningContainerGlow");
spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(false), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
public override bool UseItem(Player player)
{
if (player.itemAnimation > 0 && player.itemTime == 0)
{
player.itemTime = item.useTime;
CalamityPlayer modPlayer = player.Calamity();
modPlayer.rageBoostThree = true;
}
return true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 903 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

+11 -1
View File
@@ -1,5 +1,6 @@
using Terraria.ModLoader;
using CalamityMod.Items.Placeables.Walls;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables
{
@@ -25,5 +26,14 @@ namespace CalamityMod.Items.Placeables
item.value = 1000;
item.rare = 3;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<BrimstoneSlagWall>(), 4);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
+1 -1
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Placeables.Furniture
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Effigy of Decay");
Tooltip.SetDefault("When placed down, nearby players can breath underwater\n" +
Tooltip.SetDefault("When placed down, nearby players can breathe underwater\n" +
"This effect does not work in the abyss\n" +
"Nearby players are also immune to the sulphuric poisoning");
}
+6 -3
View File
@@ -1,4 +1,5 @@
using CalamityMod.Buffs.Alcohol;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
@@ -40,7 +41,8 @@ Reduces defense by 2 and movement speed by 5%");
public override void OnConsumeItem(Player player)
{
player.statLife += 100;
int healAmt = CalamityWorld.ironHeart ? 0 : 100;
player.statLife += healAmt;
player.statMana += 100;
if (player.statLife > player.statLifeMax2)
{
@@ -53,7 +55,8 @@ Reduces defense by 2 and movement speed by 5%");
player.AddBuff(BuffID.ManaSickness, Player.manaSickTime, true);
if (Main.myPlayer == player.whoAmI)
{
player.HealEffect(100, true);
if (!CalamityWorld.ironHeart)
player.HealEffect(healAmt, true);
player.ManaEffect(100);
}
player.AddBuff(ModContent.BuffType<GrapeBeerBuff>(), 3600);
@@ -68,7 +71,7 @@ Reduces defense by 2 and movement speed by 5%");
// Forces the "Restores X life" tooltip to display the actual life restored instead of zero (due to the previous function).
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
tooltips.Find(line => line.Name == "HealLife").text = "Restores " + item.healLife + " life";
tooltips.Find(line => line.Name == "HealLife").text = "Restores " + (CalamityWorld.ironHeart ? 0 : item.healLife) + " life";
}
}
}
Loaded 100 of 279 files, more files were not shown because too many files have changed in this diff. Show more