Merge branch '1.4' into umbrella-touchups

This commit is contained in:
ben-tk committed 2022-10-05 16:02:16 -04:00
commit f0eab4e13a
18 files changed
+66 -81

No files matched your search

+3 -1
View File
@@ -8,6 +8,8 @@ namespace CalamityMod.Buffs
{
public class CalamityGlobalBuff : GlobalBuff
{
public const byte ModdedFlaskEnchant = 99;
public override void Update(int type, Player player, ref int buffIndex)
{
if (type == BuffID.Archery)
@@ -164,7 +166,7 @@ namespace CalamityMod.Buffs
case BuffID.WeaponImbueIchor:
case BuffID.WeaponImbueNanites:
case BuffID.WeaponImbuePoison:
tip = "Rogue and " + tip;
tip = tip.Insert(tip.IndexOf("Melee") + 5, ", Whip, and Rogue");
break;
case BuffID.WeaponImbueConfetti:
+2 -2
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Potions
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Weapon Imbue: Brimstone");
Description.SetDefault("Melee and Rogue attacks ignite enemies with brimstone flames");
Description.SetDefault("Melee, Whip, and Rogue attacks ignite enemies with brimstone flames");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
@@ -22,7 +22,7 @@ namespace CalamityMod.Buffs.Potions
{
player.Calamity().aWeapon = true;
// A very large number to indicate it's a modded Flask
player.meleeEnchant = 99;
player.meleeEnchant = CalamityGlobalBuff.ModdedFlaskEnchant;
}
}
}
+2 -2
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Potions
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Weapon Imbue: Crumbling");
Description.SetDefault("Melee and Rogue attacks reduce enemy damage reduction");
Description.SetDefault("Melee, Whip, and Rogue attacks reduce enemy damage reduction");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
@@ -22,7 +22,7 @@ namespace CalamityMod.Buffs.Potions
{
player.Calamity().armorCrumbling = true;
// A very large number to indicate it's a modded Flask
player.meleeEnchant = 99;
player.meleeEnchant = CalamityGlobalBuff.ModdedFlaskEnchant;
}
}
}
+2 -10
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Summon
public override void SetStaticDefaults()
{
DisplayName.SetDefault("The Profaned Soul");
Description.SetDefault("The healer will heal your wounds!");
Description.SetDefault("The Profaned Babs will fight for and defend you!");
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
//Main.persistentBuff[Type] = true;
@@ -34,18 +34,10 @@ namespace CalamityMod.Buffs.Summon
Player player = Main.player[Main.myPlayer];
bool offense = player.Calamity().gOffense;
bool defense = player.Calamity().gDefense;
if (player.Calamity().profanedCrystal && (!player.Calamity().profanedCrystalBuffs && !DownedBossSystem.downedSCal))
if (player.Calamity().profanedCrystal && (!player.Calamity().profanedCrystalBuffs && (!DownedBossSystem.downedSCal || !DownedBossSystem.downedExoMechs)))
{
tip = "The Profaned Babs will accompany you!";
}
else if (offense && defense)
{
tip = "The Profaned Babs will fight for and defend you!";
}
else if (offense || defense)
{
tip = "The " + (offense ? "Offensive" : "Defensive") + " Duo will " + (offense ? "fight for and heal you!" : "protect and heal you!");
}
}
}
}
+1 -1
View File
@@ -4270,7 +4270,7 @@ namespace CalamityMod.CalPlayer
{
if (Main.rand.NextBool(3))
{
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<BrimstoneFlame>(), Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, default, 0.75f);
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<BrimstoneFlame>(), Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, default, 1f);
}
}
if (armorCrumbling)
+14 -28
View File
@@ -976,12 +976,6 @@ namespace CalamityMod.CalPlayer
Player.endurance += 0.025f +
(attack ? 0.025f : 0f);
}
if (attack)
{
Player.GetDamage<SummonDamageClass>() += 0.1f +
(defend ? 0.05f : 0f);
}
}
// You always get the max minions, even during the effect of the burnout debuff
@@ -3095,36 +3089,28 @@ namespace CalamityMod.CalPlayer
if (Player.FindBuffIndex(ModContent.BuffType<ProfanedBabs>()) == -1 && !profanedCrystalBuffs)
Player.AddBuff(ModContent.BuffType<ProfanedBabs>(), 3600, true);
bool crystal = profanedCrystal && !profanedCrystalForce;
bool summonSet = tarraSummon || bloodflareSummon || silvaSummon || dsSetBonus || omegaBlueSet || fearmongerSet;
int guardianAmt = 1;
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] < guardianAmt)
Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -6f, ModContent.ProjectileType<MiniGuardianHealer>(), 0, 0f, Main.myPlayer, 0f, 0f);
if (crystal || Player.maxMinions >= 10)
{
gDefense = true;
gDefense = true;
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] < guardianAmt)
{
int guardian = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -3f, ModContent.ProjectileType<MiniGuardianDefense>(), 1, 1f, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(guardian))
Main.projectile[guardian].originalDamage = 1;
}
}
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] < guardianAmt)
{
int guardian = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -3f, ModContent.ProjectileType<MiniGuardianDefense>(), 1, 1f, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(guardian))
Main.projectile[guardian].originalDamage = 1;
}
if (crystal || summonSet)
{
gOffense = true;
gOffense = true;
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] < guardianAmt)
{
int guardian = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -1f, ModContent.ProjectileType<MiniGuardianAttack>(), 1, 1f, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(guardian))
Main.projectile[guardian].originalDamage = 1;
}
}
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] < guardianAmt)
{
int guardian = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -1f, ModContent.ProjectileType<MiniGuardianAttack>(), 1, 1f, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(guardian))
Main.projectile[guardian].originalDamage = 1;
}
}
}
+3 -3
View File
@@ -17,9 +17,9 @@ namespace CalamityMod.Items.Accessories
SacrificeTotal = 1;
DisplayName.SetDefault("Profaned Soul Artifact");
Tooltip.SetDefault("Purity\n" +
"Summons a healer guardian which heals for a certain amount of health every few seconds\n" +
"Summons a defensive guardian if you have at least 10 minion slots, which boosts your movement speed and your damage resistance\n" +
"Summons an offensive guardian if you are wearing the tarragon summon set (or stronger), which boosts your summon damage and your minion slots\n" +
"Summons a healer guardian, which heals for a certain amount of health every few seconds\n" +
"Summons a defensive guardian, which boosts your movement speed and damage resistance\n" +
"Summons an offensive guardian, which boosts your minion slots\n" +
"If you get hit, most of their effects will disappear for 5 seconds");
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6));
ItemID.Sets.AnimatesAsSoul[Type] = true;
+4
View File
@@ -135,6 +135,10 @@ namespace CalamityMod.Items
if (item.maxStack == 30 || item.maxStack == 50 || item.maxStack == 75 || item.maxStack == 99 || item.maxStack == 999)
item.maxStack = 9999;
// Having more than this causes integer overflow
if (item.type == ItemID.PlatinumCoin)
item.maxStack = 2147;
// Shield of Cthulhu cannot be enchanted (it is an accessory with a damage value).
// TODO -- there are better ways to do this. Just stop letting accessories be enchanted, even if they do have a damage value.
if (item.type == ItemID.EoCShield)
+8 -8
View File
@@ -531,22 +531,22 @@ namespace CalamityMod.Items
// Flasks apply to Rogue weapons
#region Rogue Flask Tooltips
if (item.type == ItemID.FlaskofCursedFlames)
EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks inflict enemies with cursed flames");
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue"));
if (item.type == ItemID.FlaskofFire)
EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks set enemies on fire");
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue"));
if (item.type == ItemID.FlaskofGold)
EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks make enemies drop more gold");
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue"));
if (item.type == ItemID.FlaskofIchor)
EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks decrease enemy defense");
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue"));
if (item.type == ItemID.FlaskofNanites)
EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks confuse enemies");
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue"));
// party flask is unique because it affects ALL projectiles in Calamity, not just "also rogue ones"
if (item.type == ItemID.FlaskofParty)
EditTooltipByNum(0, (line) => line.Text = "All attacks cause confetti to appear");
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("Melee and Whip", "All"));
if (item.type == ItemID.FlaskofPoison)
EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks poison enemies");
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue"));
if (item.type == ItemID.FlaskofVenom)
EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks inflict Venom on enemies");
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue"));
#endregion
// Rebalances to vanilla item stats
+3 -8
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.Items
IItemTweak[] trueMeleeNoSpeed = Do(TrueMeleeNoSpeed);
IItemTweak[] pointBlank = Do(PointBlank);
IItemTweak[] autoReuse = Do(AutoReuse);
IItemTweak[] maxStack999 = Do(MaxStack(999));
IItemTweak[] maxStack9999 = Do(MaxStack(9999));
IItemTweak[] nonConsumableBossSummon = Do(MaxStack(1), NotConsumable, UseTimeExact(10));
// Please keep this strictly alphabetical. It's the only way to keep it sane. Thanks in advance.
@@ -79,8 +79,6 @@ namespace CalamityMod.Items
{ ItemID.BorealWoodBow, Do(PointBlank, DamageRatio(1.1f)) },
{ ItemID.BorealWoodHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) },
{ ItemID.BorealWoodSword, Do(AutoReuse, UseTurn) },
{ ItemID.BouncyBomb, maxStack999 },
{ ItemID.BouncyDynamite, maxStack999 },
{ ItemID.BreakerBlade, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(97)) },
{ ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, AxePower(150), UseTimeExact(3), TileBoostExact(+0)) },
{ ItemID.CactusPickaxe, Do(PickPower(34), UseTimeExact(9)) },
@@ -175,7 +173,6 @@ namespace CalamityMod.Items
{ ItemID.DiamondStaff, Do(DamageExact(26)) },
{ ItemID.Drax, Do(TrueMeleeNoSpeed, PickPower(200), AxePower(110), UseTimeExact(4), TileBoostExact(+1)) },
{ ItemID.DyeTradersScimitar, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageRatio(1.33f)) },
{ ItemID.Dynamite, maxStack999 },
{ ItemID.EbonwoodBow, Do(PointBlank, DamageRatio(1.1f)) },
{ ItemID.EbonwoodHammer, Do(HammerPower(25), UseTimeExact(9), TileBoostExact(+0)) },
{ ItemID.EbonwoodSword, Do(AutoReuse, UseTurn) },
@@ -229,7 +226,7 @@ namespace CalamityMod.Items
{ ItemID.GreenPhasesaber, Do(ScaleRatio(1.5f), DamageExact(72), UseExact(20)) },
{ ItemID.GreenSolution, Do(Value(Item.buyPrice(silver: 5))) },
{ ItemID.GrenadeLauncher, Do(DamageRatio(1.5f)) },
{ ItemID.GuideVoodooDoll, maxStack999 },
{ ItemID.GuideVoodooDoll, maxStack9999 },
{ ItemID.Gungnir, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(92), ShootSpeedRatio(1.25f)) },
{ ItemID.HallowedGreaves, Do(DefenseDelta(+2)) },
{ ItemID.HallowedPlateMail, Do(DefenseDelta(+3)) },
@@ -483,8 +480,6 @@ namespace CalamityMod.Items
{ ItemID.Starfury, autoReuse },
{ ItemID.PortableStool, Do(Value(Item.sellPrice(copper: 20))) }, // Step Stool
{ ItemID.StarWrath, Do(DamageRatio(0.9f), AttackSpeedExact(0.33f)) },
{ ItemID.StickyBomb, maxStack999 },
{ ItemID.StickyDynamite, maxStack999 },
{ ItemID.StormTigerStaff, Do(AutoReuse, DamageExact(49), UseExact(20)) }, // Desert Tiger Staff
{ ItemID.StylistKilLaKillScissorsIWish, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(33)) },
{ ItemID.SuspiciousLookingEye, nonConsumableBossSummon },
@@ -926,7 +921,7 @@ namespace CalamityMod.Items
#region Max Stack
internal class MaxStackRule : IItemTweak // max stack plus - calamity style
{
internal readonly int newMaxStack = 999;
internal readonly int newMaxStack = 9999;
public MaxStackRule(int stk) => newMaxStack = stk;
public bool AppliesTo(Item it) => true;
+1 -2
View File
@@ -12,8 +12,7 @@ namespace CalamityMod.Items.Potions
{
SacrificeTotal = 20;
DisplayName.SetDefault("Flask of Crumbling");
Tooltip.SetDefault("Melee and Whip attacks inflict Armor Crunch on enemies\n" +
"Rogue attacks inflict Armor Crunch on enemies");
Tooltip.SetDefault("Melee, Whip, and Rogue attacks inflict Armor Crunch on enemies");
}
public override void SetDefaults()
+1 -2
View File
@@ -14,8 +14,7 @@ namespace CalamityMod.Items.Potions
{
SacrificeTotal = 20;
DisplayName.SetDefault("Flask of Brimstone");
Tooltip.SetDefault("Melee and Whip attacks inflict Brimstone Flames on enemies\n" +
"Rogue attacks inflict Brimstone Flames on enemies");
Tooltip.SetDefault("Melee, Whip, and Rogue attacks inflict Brimstone Flames on enemies");
}
public override void SetDefaults()
+1 -1
View File
@@ -66,7 +66,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 80;
Item.height = 114;
Item.damage = 640;
Item.damage = 825;
Item.useStyle = ItemUseStyleID.Swing;
Item.useTime = BaseUseTime;
Item.useAnimation = BaseUseTime;
+8 -3
View File
@@ -122,7 +122,8 @@ namespace CalamityMod
internal class WeakReferenceSupport
{
public const string CalamityWikiURL = "calamitymod.wiki.gg";
public const string CalamityWikiURLOld = "calamitymod.wiki.gg";
public const string CalamityWikiURL = "https://calamitymod.wiki.gg/wiki/{}";
private static readonly Dictionary<string, float> BossDifficulty = new Dictionary<string, float>
{
@@ -186,8 +187,12 @@ namespace CalamityMod
if (wiki is null)
return;
wiki.Call("AddModURL", calamity, CalamityWikiURL);
wiki.Call("0", calamity, CalamityWikiURL);
bool oldVersion = wiki.Version < new Version(2, 4, 7, 5);
wiki.Call("AddModURL", calamity, oldVersion ? CalamityWikiURLOld : CalamityWikiURL);
wiki.Call(0, calamity, oldVersion ? CalamityWikiURLOld : CalamityWikiURL);
wiki.Call("AddWikiTexture", calamity, ModContent.Request<Texture2D>("CalamityMod/ModSupport/WikiThisIcon"));
wiki.Call(3, calamity, ModContent.Request<Texture2D>("CalamityMod/ModSupport/WikiThisIcon"));
// Clear up name conflicts
void ItemRedirect(int item, string pageName)
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

+4 -2
View File
@@ -958,8 +958,10 @@ namespace CalamityMod.NPCs
// Sage Poison
if (sagePoisonTime > 0)
{
int baseSagePoisonDoTValue = (int)(90 * sicknessDamageMult);
ApplyDPSDebuff(baseSagePoisonDoTValue, npc.Calamity().sagePoisonDamage, ref npc.lifeRegen, ref damage);
// npc.Calamity().sagePoisonDamage = 20 * (float)(Math.Pow(totalSageSpirits, 0.73D) + Math.Pow(totalSageSpirits, 1.1D)) * 0.5f
// See SageNeedle.cs for details
int baseSagePoisonDoTValue = (int)(npc.Calamity().sagePoisonDamage * sicknessDamageMult);
ApplyDPSDebuff(baseSagePoisonDoTValue, baseSagePoisonDoTValue / 5, ref npc.lifeRegen, ref damage);
}
// Kami Debuff from Yanmei's Knife
+3 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.CalPlayer;
using CalamityMod.Dusts;
@@ -2260,7 +2261,7 @@ namespace CalamityMod.Projectiles
Main.dust[index].velocity *= 0.25f;
}
break;
case 99:
case CalamityGlobalBuff.ModdedFlaskEnchant:
int dustType = player.Calamity().aWeapon ? ModContent.DustType<BrimstoneFlame>() : DustID.Stone;
if (Main.rand.NextBool(4))
{
+6 -6
View File
@@ -47,12 +47,12 @@ namespace CalamityMod.Projectiles.Summon
// at around 344 allocated slots.
float averageDamageMultiplier = (float)(Math.Pow(totalSageSpirits, 0.73D) + Math.Pow(totalSageSpirits, 1.1D)) * 0.5f;
// 1 slot provides 40 DoT.
// 2 slots provide 76 DoT.
// 3 slots provide 111 DoT.
// 4 slots provide 146 DoT.
// 5 slots provide 182 DoT.
int sagePoisonDamage = (int)(40 * averageDamageMultiplier);
// 1 slot provides 20 DoT.
// 2 slots provide 38 DoT.
// 3 slots provide 56 DoT.
// 4 slots provide 73 DoT.
// 5 slots provide 91 DoT.
int sagePoisonDamage = (int)(20 * averageDamageMultiplier);
target.AddBuff(ModContent.BuffType<SagePoison>(), 300);
target.Calamity().sagePoisonDamage = sagePoisonDamage;
}