From 51e4e914f3373ca455e9b657dfafb386b71bc4c8 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 27 Oct 2019 19:23:49 -0400 Subject: [PATCH 01/12] shop shuffling --- NPCs/CalamityGlobalNPC.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index a9714e66b4..2bac88e127 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3518,8 +3518,6 @@ namespace CalamityMod.NPCs SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedHiveMind, Item.buyPrice(0, 10)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedHiveMind && Main.expertMode); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedSlimeGod, Item.buyPrice(0, 15)); - SetShopItem(ref shop, ref nextSlot, ItemID.PumpkinMoonMedallion, NPC.downedHalloweenKing, Item.buyPrice(0, 25)); - SetShopItem(ref shop, ref nextSlot, ItemID.NaughtyPresent, NPC.downedChristmasIceQueen, Item.buyPrice(0, 25)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType()); } @@ -3545,6 +3543,8 @@ namespace CalamityMod.NPCs SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), price: Item.buyPrice(copper: 10)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), price: Item.buyPrice(copper: 10)); SetShopItem(ref shop, ref nextSlot, ItemID.GoldenKey, Main.hardMode, Item.buyPrice(0, 5)); + SetShopItem(ref shop, ref nextSlot, ItemID.PumpkinMoonMedallion, NPC.downedHalloweenKing, Item.buyPrice(0, 25)); + SetShopItem(ref shop, ref nextSlot, ItemID.NaughtyPresent, NPC.downedChristmasIceQueen, Item.buyPrice(0, 25)); } if (type == NPCID.Painter) @@ -3562,7 +3562,6 @@ namespace CalamityMod.NPCs if (type == NPCID.Wizard) { - SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedCryogen, Item.buyPrice(0, 15)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedBrimstoneElemental, Item.buyPrice(0, 20)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedAstrageldon, Item.buyPrice(0, 25)); SetShopItem(ref shop, ref nextSlot, ItemID.MagicMissile, price: Item.buyPrice(0, 5)); From 13347389930fbff0624f5860256e8c087d6a6e85 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 27 Oct 2019 20:34:41 -0400 Subject: [PATCH 02/12] tooltip stuff --- Items/Accessories/Nanotech.cs | 1 + Items/Weapons/Rogue/SkyStabber.cs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Items/Accessories/Nanotech.cs b/Items/Accessories/Nanotech.cs index 920e11ec11..8d90aa58c3 100644 --- a/Items/Accessories/Nanotech.cs +++ b/Items/Accessories/Nanotech.cs @@ -13,6 +13,7 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Nanotech"); Tooltip.SetDefault("Rogue projectiles create nanoblades as they travel\n" + + "Stealth strikes summon lunar flares on enemy hits\n" + "Rogue weapons have a chance to instantly kill normal enemies\n" + "10% increased rogue damage, 5% increased rogue crit chance, and 15% increased rogue velocity\n" + "Whenever you crit an enemy with a rogue weapon your rogue damage increases\n" + diff --git a/Items/Weapons/Rogue/SkyStabber.cs b/Items/Weapons/Rogue/SkyStabber.cs index 99f7d107fc..0791b9ade4 100644 --- a/Items/Weapons/Rogue/SkyStabber.cs +++ b/Items/Weapons/Rogue/SkyStabber.cs @@ -17,8 +17,9 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetStaticDefaults() { DisplayName.SetDefault("Sky Stabber"); - // Todo: Possible addition of a stealth strike tooltip - Tooltip.SetDefault("Shoots a gravity-defying spiky ball. Stacks up to 4."); + Tooltip.SetDefault("Shoots a gravity-defying spiky ball. Stacks up to 4.\n" + + "Stealth strikes rain feathers onto enemies\n" + + "Right click to delete all existing spiky balls"); } public override void SafeSetDefaults() From e9eea68e927ff5278b697eed96d2869f14ad5f72 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 28 Oct 2019 10:29:45 -0400 Subject: [PATCH 03/12] Added Rogue stat calls to permanently slay AlchNPC issues --- ModSupport/ModCalls.cs | 134 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 121 insertions(+), 13 deletions(-) diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index 999bb47791..b4d27651b6 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -337,6 +337,53 @@ namespace CalamityMod } #endregion + #region Rogue Stats + /// + /// Gets a player's current rogue damage stat. + /// + /// The player whose rogue damage is being queried. + /// Current rogue damage boost. 1f is no bonus, 2f is +100%. + public static float GetRogueDamage(Player p) => p?.Calamity()?.throwingDamage ?? 1f; + + /// + /// Adds a flat amount of rogue damage stat to a player. This amount can be negative. + /// + /// The player whose rogue damage is being modified. + /// The amount of rogue damage to add or subtract (if negative). + /// + public static float AddRogueDamage(Player p, float add) => p is null ? 1f : (p.Calamity().throwingDamage += add); + + /// + /// Gets a player's current rogue critical strike chance. + /// + /// The player whose rogue crit is being queried. + /// Current rogue critical strike chance. 0 is no additional crit, 8 is +8% crit chance. + public static int GetRogueCrit(Player p) => p?.Calamity()?.throwingCrit ?? 0; + + /// + /// Adds a flat amount of rogue crit to a player. This amount can be negative. + /// + /// The player whose rogue crit is being modified. + /// The amount of rogue crit to add or subtract (if negative). + /// + public static int AddRogueCrit(Player p, int add) => p is null ? 0 : (p.Calamity().throwingCrit += add); + + /// + /// Gets a player's current rogue projectile velocity multiplier. + /// + /// The player whose rogue velocity is being queried. + /// Current rogue projectile velocity multiplier. 1f is no bonus, 2f doubles projectile speed. + public static float GetRogueVelocity(Player p) => p?.Calamity()?.throwingVelocity ?? 1f; + + /// + /// Adds a flat amount of rogue velocity stat to a player. This amount can be negative. + /// + /// The player whose rogue velocity is being modified. + /// The amount of rogue velocity to add or subtract (if negative). + /// + public static float AddRogueVelocity(Player p, float add) => p is null ? 1f : (p.Calamity().throwingVelocity += add); + #endregion + #region Player Armor Set Bonuses /// /// Returns whether the specified player has the set bonus corresponding to the given string. @@ -578,6 +625,15 @@ namespace CalamityMod #region Call public static object Call(params object[] args) { + static Player castPlayer(object o) + { + if (o is int) + return Main.player[(int)o]; + else if (o is Player) + return (Player)o; + return null; + } + if (args is null || args.Length <= 0) return new ArgumentNullException("ERROR: No function name specified. First argument must be a function name."); if (!(args[0] is string)) @@ -609,12 +665,7 @@ namespace CalamityMod return new ArgumentException("ERROR: The second argument to \"InZone\" must be a string."); if (!(args[1] is int) || !(args[1] is Player)) return new ArgumentException("ERROR: The first argument to \"InZone\" must be a Player or an int."); - - // If the argument is an int, get the corresponding player - if (args[1] is int) - p = Main.player[(int)args[1]]; - else if (args[1] is Player) - p = (Player)args[1]; + p = castPlayer(args[1]); return GetInZone(p, args[2].ToString()); case "Difficulty": @@ -627,6 +678,69 @@ namespace CalamityMod return new ArgumentException("ERROR: The argument to \"Difficulty\" must be a string."); return GetDifficultyActive(args[1].ToString()); + case "GetRogueDamage": + case "GetRogueDmg": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); + if (!(args[1] is int) || !(args[1] is Player)) + return new ArgumentException("ERROR: The argument to \"GetRogueDamage\" must be a Player or an int."); + return GetRogueDamage(castPlayer(args[1])); + + case "GetRogueCrit": + case "GetRogueCritChance": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); + if (!(args[1] is int) || !(args[1] is Player)) + return new ArgumentException("ERROR: The argument to \"GetRogueCrit\" must be a Player or an int."); + return GetRogueCrit(castPlayer(args[1])); + + case "GetRogueVelocity": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); + if (!(args[1] is int) || !(args[1] is Player)) + return new ArgumentException("ERROR: The argument to \"GetRogueVelocity\" must be a Player or an int."); + return GetRogueVelocity(castPlayer(args[1])); + + case "AddRogueDamage": + case "AddRogueDmg": + case "ModifyRogueDamage": + case "ModifyRogueDmg": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and rogue damage change as a float."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify rogue damage change as a float."); + if (!(args[2] is float)) + return new ArgumentException("ERROR: The second argument to \"AddRogueDamage\" must be a float."); + if (!(args[1] is int) || !(args[1] is Player)) + return new ArgumentException("ERROR: The first argument to \"AddRogueDamage\" must be a Player or an int."); + return AddRogueDamage(castPlayer(args[1]), (float)args[2]); + + case "AddRogueCrit": + case "AddRogueCritChance": + case "ModifyRogueCrit": + case "ModifyRogueCritChance": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and rogue crit change as an int."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify rogue crit change as a float."); + if (!(args[2] is int)) + return new ArgumentException("ERROR: The second argument to \"AddRogueCrit\" must be an int."); + if (!(args[1] is int) || !(args[1] is Player)) + return new ArgumentException("ERROR: The first argument to \"AddRogueCrit\" must be a Player or an int."); + return AddRogueCrit(castPlayer(args[1]), (int)args[2]); + + case "AddRogueVelocity": + case "ModifyRogueVelocity": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and rogue velocity change as a float."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify rogue velocity change as a float."); + if (!(args[2] is float)) + return new ArgumentException("ERROR: The second argument to \"AddRogueVelocity\" must be a float."); + if (!(args[1] is int) || !(args[1] is Player)) + return new ArgumentException("ERROR: The first argument to \"AddRogueVelocity\" must be a Player or an int."); + return AddRogueVelocity(castPlayer(args[1]), (float)args[2]); + case "SetBonus": case "SetBonusActive": case "HasSetBonus": @@ -640,13 +754,7 @@ namespace CalamityMod return new ArgumentException("ERROR: The second argument to \"SetBonus\" must be a string."); if (!(args[1] is int) || !(args[1] is Player)) return new ArgumentException("ERROR: The first argument to \"SetBonus\" must be a Player or an int."); - - // If the argument is an int, get the corresponding player - if (args[1] is int) - p = Main.player[(int)args[1]]; - else if (args[1] is Player) - p = (Player)args[1]; - return GetSetBonus(p, args[2].ToString()); + return GetSetBonus(castPlayer(args[1]), args[2].ToString()); case "DR": case "DamageReduction": From 3980246c6ce83fe9cab74b2e51fae17f490fc614 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 28 Oct 2019 12:00:05 -0400 Subject: [PATCH 04/12] Added set set bonus call for Fargo's. --- ModSupport/ModCalls.cs | 448 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 444 insertions(+), 4 deletions(-) diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index b4d27651b6..8776f3fdd9 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -2,7 +2,6 @@ using CalamityMod.CalPlayer; using CalamityMod.World; using System; using Terraria; -using Terraria.ModLoader; namespace CalamityMod { @@ -397,15 +396,23 @@ namespace CalamityMod setBonus = setBonus.ToLower(); + // TODO -- no summon set bonuses are written well. all use two bools, neither of which actually controls the function + // Victide - if (setBonus == "victide" || setBonus.StartsWith("victide_") || setBonus.StartsWith("victide ")) + if (setBonus == "victide_summon" || setBonus == "victide summon") + return mp.urchin; // the bool set directly by VictideHelmet.UpdateArmorSet + else if (setBonus == "victide" || setBonus.StartsWith("victide_") || setBonus.StartsWith("victide ")) return mp.victideSet; // Aerospec - if (setBonus == "aerospec" || setBonus.StartsWith("aerospec_") || setBonus.StartsWith("aerospec ")) + if (setBonus == "aerospec_summon" || setBonus == "aerospec summon") + return mp.valkyrie; // the bool set directly by AerospecHelmet.UpdateArmorSet + else if (setBonus == "aerospec" || setBonus.StartsWith("aerospec_") || setBonus.StartsWith("aerospec ")) return mp.aeroSet; // Statigel + if (setBonus == "statigel_summon" || setBonus == "statigel summon") + return mp.slimeGod; // the bool set directly by StatigelHood.UpdateArmorSet if (setBonus == "statigel" || setBonus.StartsWith("statigel_") || setBonus.StartsWith("statigel ")) return mp.statigelSet; @@ -609,10 +616,425 @@ namespace CalamityMod return false; } + + /// + /// Turns the set bonus corresponding to the given string on or off for the specified player. + /// + /// The player whose set bonuses are being toggled. + /// The set bonus to check for. + /// Whether the set bonus should be enabled (true) or disabled (false). + /// Whether any set bonus was adjusted. + public static bool SetSetBonus(Player p, string setBonus, bool enabled) + { + CalamityPlayer mp = p.Calamity(); + setBonus = setBonus.ToLower(); + + // Victide + if (setBonus == "victide_summon" || setBonus == "victide summon") + { + mp.victideSet = enabled; + mp.urchin = enabled; // TODO -- remove this when player.urchin actually controls victide summoner + return true; + } + else if (setBonus == "victide" || setBonus.StartsWith("victide_") || setBonus.StartsWith("victide ")) + { + mp.victideSet = true; + return true; + } + + // Aerospec + if (setBonus == "aerospec_summon" || setBonus == "aerospec summon") + { + mp.aeroSet = enabled; + mp.valkyrie = enabled; // TODO -- remove this when player.valkyrie actually controls aerospec summoner + return true; + } + else if (setBonus == "aerospec" || setBonus.StartsWith("aerospec_") || setBonus.StartsWith("aerospec ")) + { + mp.aeroSet = enabled; + return true; + } + + // Statigel + if (setBonus == "statigel_summon" || setBonus == "statigel summon") + { + mp.statigelSet = enabled; + mp.slimeGod = enabled; // TODO -- remove this when player.slimeGod actually controls statigel summoner + return true; + } + else if (setBonus == "statigel" || setBonus.StartsWith("statigel_") || setBonus.StartsWith("statigel ")) + { + mp.statigelSet = enabled; + return true; + } + + // Mollusk + if (setBonus == "mollusk") + { + mp.molluskSet = enabled; + return true; + } + + // Daedalus + switch (setBonus) + { + default: + break; + case "daedalus_melee": + case "daedalus melee": + mp.daedalusReflect = enabled; + return true; + case "daedalus_ranged": + case "daedalus ranged": + mp.daedalusShard = enabled; + return true; + case "daedalus_magic": + case "daedalus magic": + mp.daedalusAbsorb = enabled; + return true; + case "daedalus_summon": + case "daedalus summon": + mp.daedalusCrystal = enabled; // TODO -- remove this when player.daedalusCrystal actually controls daedalus summoner + return true; + case "daedalus_rogue": + case "daedalus rogue": + mp.daedalusSplit = enabled; + return true; + } + + // Reaver + switch (setBonus) + { + default: + break; + case "reaver_melee": + case "reaver melee": + mp.reaverBlast = enabled; + return true; + case "reaver_ranged": + case "reaver ranged": + mp.reaverDoubleTap = enabled; + return true; + case "reaver_magic": + case "reaver magic": + mp.reaverBurst = enabled; + return true; + case "reaver_summon": + case "reaver summon": + mp.reaverOrb = enabled; // TODO -- remove this when player.reaverOrb actually controls reaver summoner + return true; + case "reaver_rogue": + case "reaver rogue": + mp.reaverSpore = enabled; + return true; + } + + // Ataxia + switch (setBonus) + { + default: + break; + case "ataxia": + mp.ataxiaBlaze = enabled; + return true; + case "ataxia_melee": + case "ataxia melee": + mp.ataxiaBlaze = enabled; + mp.ataxiaGeyser = enabled; + return true; + case "ataxia_ranged": + case "ataxia ranged": + mp.ataxiaBlaze = enabled; + mp.ataxiaBolt = enabled; + return true; + case "ataxia_magic": + case "ataxia magic": + mp.ataxiaBlaze = enabled; + mp.ataxiaMage = enabled; + return true; + case "ataxia_summon": + case "ataxia summon": + mp.ataxiaBlaze = enabled; + mp.chaosSpirit = enabled; // TODO -- remove this when player.chaosSpirit actually controls ataxia summoner + return true; + case "ataxia_rogue": + case "ataxia rogue": + mp.ataxiaBlaze = enabled; + mp.ataxiaVolley = enabled; + return true; + } + + // Astral + if (setBonus == "astral") + { + mp.astralStarRain = enabled; + return true; + } + + // Xeroc + if (setBonus == "xeroc") + { + mp.xerocSet = enabled; + return true; + } + + // Tarragon + switch (setBonus) + { + default: + break; + case "tarragon": + mp.tarraSet = enabled; + return true; + case "tarragon_melee": + case "tarragon melee": + mp.tarraSet = enabled; + mp.tarraMelee = enabled; + return true; + case "tarragon_ranged": + case "tarragon ranged": + mp.tarraSet = enabled; + mp.tarraRanged = enabled; + return true; + case "tarragon_magic": + case "tarragon magic": + mp.tarraSet = enabled; + mp.tarraMage = enabled; + return true; + case "tarragon_summon": + case "tarragon summon": + mp.tarraSet = enabled; + mp.tarraSummon = enabled; // TODO -- remove this when player.tarraSummon actually controls life aura + return true; + case "tarragon_rogue": + case "tarragon rogue": + mp.tarraSet = enabled; + mp.tarraThrowing = enabled; + return true; + } + + // Bloodflare + switch (setBonus) + { + default: + break; + case "bloodflare": + mp.bloodflareSet = enabled; + return true; + case "bloodflare_melee": + case "bloodflare melee": + mp.bloodflareSet = enabled; + mp.bloodflareMelee = enabled; + return true; + case "bloodflare_ranged": + case "bloodflare ranged": + mp.bloodflareSet = enabled; + mp.bloodflareRanged = enabled; + return true; + case "bloodflare_magic": + case "bloodflare magic": + mp.bloodflareSet = enabled; + mp.bloodflareMage = enabled; + return true; + case "bloodflare_summon": + case "bloodflare summon": + mp.bloodflareSet = enabled; + mp.bloodflareSummon = enabled; // TODO -- remove this when player.bloodflareSummon actually controls bloodflare orbs + return true; + case "bloodflare_rogue": + case "bloodflare rogue": + mp.bloodflareSet = enabled; + mp.bloodflareThrowing = enabled; + return true; + } + + // Omega Blue + if (setBonus == "omegablue" || setBonus == "omega blue") + { + mp.omegaBlueSet = enabled; + return true; + } + + // God Slayer + switch (setBonus) + { + default: + break; + case "godslayer": + case "god slayer": + mp.godSlayer = enabled; + return true; + case "godslayer_melee": + case "godslayer melee": + case "god slayer melee": + mp.godSlayer = enabled; + mp.godSlayerDamage = enabled; // melee helm's unique damage reducing property + return true; + case "godslayer_ranged": + case "godslayer ranged": + case "god slayer ranged": + mp.godSlayer = enabled; + mp.godSlayerRanged = enabled; + return true; + case "godslayer_magic": + case "godslayer magic": + case "god slayer magic": + mp.godSlayer = enabled; + mp.godSlayerMage = enabled; + return true; + case "godslayer_summon": + case "godslayer summon": + case "god slayer summon": + mp.godSlayer = enabled; + mp.godSlayerSummon = enabled; // TODO -- remove this when player.godSlayerSummon actually controls mechworm + return true; + case "godslayer_rogue": + case "godslayer rogue": + case "god slayer rogue": + mp.godSlayer = enabled; + mp.godSlayerThrowing = enabled; + return true; + } + + // Silva + switch (setBonus) + { + default: + break; + case "silva": + mp.silvaSet = enabled; + return true; + case "silva_melee": + case "silva melee": + mp.silvaSet = enabled; + mp.silvaMelee = enabled; + return true; + case "silva_ranged": + case "silva ranged": + mp.silvaSet = enabled; + mp.silvaRanged = enabled; + return true; + case "silva_magic": + case "silva magic": + mp.silvaSet = enabled; + mp.silvaMage = enabled; + return true; + case "silva_summon": + case "silva summon": + mp.silvaSet = enabled; + mp.silvaSummon = enabled; // TODO -- remove this when player.silvaSummon actually controls silva crystl + return true; + case "silva_rogue": + case "silva rogue": + mp.silvaSet = enabled; + mp.silvaThrowing = enabled; + return true; + } + + // Auric Tesla (includes all components) + switch (setBonus) + { + default: + break; + case "auric": + case "aurictesla": + case "auric tesla": + mp.tarraSet = enabled; + mp.bloodflareSet = enabled; + mp.godSlayer = enabled; + mp.silvaSet = enabled; + mp.auricSet = enabled; + return true; + case "auric_melee": + case "auric melee": + case "aurictesla_melee": + case "aurictesla melee": + case "auric tesla melee": + mp.tarraSet = enabled; + mp.tarraMelee = enabled; + mp.bloodflareSet = enabled; + mp.bloodflareMelee = enabled; + mp.godSlayer = enabled; + mp.godSlayerDamage = enabled; + mp.silvaSet = enabled; + mp.silvaMelee = enabled; + mp.auricSet = enabled; + return true; + case "auric_ranged": + case "auric ranged": + case "aurictesla_ranged": + case "aurictesla ranged": + case "auric tesla ranged": + mp.tarraSet = enabled; + mp.tarraRanged = enabled; + mp.bloodflareSet = enabled; + mp.bloodflareRanged = enabled; + mp.godSlayer = enabled; + mp.godSlayerRanged = enabled; + mp.silvaSet = enabled; + mp.silvaRanged = enabled; + mp.auricSet = enabled; + return true; + case "auric_magic": + case "auric magic": + case "aurictesla_magic": + case "aurictesla magic": + case "auric tesla magic": + mp.tarraSet = enabled; + mp.tarraMage = enabled; + mp.bloodflareSet = enabled; + mp.bloodflareMage = enabled; + mp.godSlayer = enabled; + mp.godSlayerMage = enabled; + mp.silvaSet = enabled; + mp.silvaMage = enabled; + mp.auricSet = enabled; + return true; + case "auric_summon": + case "auric summon": + case "aurictesla_summon": + case "aurictesla summon": + case "auric tesla summon": + mp.tarraSet = enabled; + mp.tarraSummon = enabled; + mp.bloodflareSet = enabled; + mp.bloodflareSummon = enabled; + mp.godSlayer = enabled; + mp.godSlayerSummon = enabled; + mp.silvaSet = enabled; + mp.silvaSummon = enabled; + mp.auricSet = enabled; + return true; + case "auric_rogue": + case "auric rogue": + case "aurictesla_rogue": + case "aurictesla rogue": + case "auric tesla rogue": + mp.tarraSet = enabled; + mp.tarraThrowing = enabled; + mp.bloodflareSet = enabled; + mp.bloodflareThrowing = enabled; + mp.godSlayer = enabled; + mp.godSlayerThrowing = enabled; + mp.silvaSet = enabled; + mp.silvaThrowing = enabled; + mp.auricSet = enabled; + return true; + } + + // Demonshade + if (setBonus == "demonshade") + { + mp.dsSetBonus = enabled; + mp.rDevil = enabled; // TODO -- remove this when player.rDevil controls demonshade summoned minion + return true; + } + + return false; + } #endregion #region Set Damage Reduction - public static float SetDamageReduction(int npcID, float dr) { CalamityMod.DRValues.TryGetValue(npcID, out float oldDR); @@ -756,6 +1178,24 @@ namespace CalamityMod return new ArgumentException("ERROR: The first argument to \"SetBonus\" must be a Player or an int."); return GetSetBonus(castPlayer(args[1]), args[2].ToString()); + case "SetSetBonus": + case "ToggleSetBonus": + case "SetSetBonusActive": + case "ToggleSetBonusActive": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player), a set bonus name as a string, and a bool."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify a set bonus name as a string and a bool."); + if (args.Length < 4) + return new ArgumentNullException("ERROR: Must specify a bool."); + if (!(args[3] is bool)) + return new ArgumentException("ERROR: The third argument to \"SetSetBonus\" must be a bool."); + if (!(args[2] is string)) + return new ArgumentException("ERROR: The second argument to \"SetSetBonus\" must be a string."); + if (!(args[1] is int) || !(args[1] is Player)) + return new ArgumentException("ERROR: The first argument to \"SetSetBonus\" must be a Player or an int."); + return SetSetBonus(castPlayer(args[1]), args[2].ToString(), (bool)args[3]); + case "DR": case "DamageReduction": case "SetDR": From 07f07eb4cc9493f982303da479f43edbfe17bda9 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 28 Oct 2019 15:14:26 -0400 Subject: [PATCH 05/12] made the syringe obtainable --- Items/TreasureBags/PlaguebringerGoliathBag.cs | 1 + NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Items/TreasureBags/PlaguebringerGoliathBag.cs b/Items/TreasureBags/PlaguebringerGoliathBag.cs index 40decbf30a..5d47fd3c69 100644 --- a/Items/TreasureBags/PlaguebringerGoliathBag.cs +++ b/Items/TreasureBags/PlaguebringerGoliathBag.cs @@ -53,6 +53,7 @@ namespace CalamityMod.Items.TreasureBags DropHelper.DropItemChance(player, ModContent.ItemType(), 3); DropHelper.DropItemChance(player, ModContent.ItemType(), 3); // Blight Spewer DropHelper.DropItemChance(player, ModContent.ItemType(), 3); + DropHelper.DropItemChance(player, ModContent.ItemType(), 3); float malachiteChance = CalamityWorld.defiled ? DropHelper.DefiledDropRateFloat : DropHelper.LegendaryDropRateFloat; DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge, malachiteChance); diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 5870e7b9e5..c1fed72ff0 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -9,6 +9,7 @@ using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -1027,6 +1028,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); // Blight Spewer DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); // Equipment DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); From 5fdfe5edd00e097ebbf10b30a2f447e17a070fca Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 28 Oct 2019 15:33:53 -0400 Subject: [PATCH 06/12] weapon balancing --- Items/Weapons/Rogue/LunarKunai.cs | 2 +- Items/Weapons/Rogue/Sandslasher.cs | 2 +- Projectiles/Rogue/DukesDecapitatorProj.cs | 2 +- Projectiles/Rogue/LunarKunaiProj.cs | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Rogue/LunarKunai.cs b/Items/Weapons/Rogue/LunarKunai.cs index df5cecfd0a..fe14a46572 100644 --- a/Items/Weapons/Rogue/LunarKunai.cs +++ b/Items/Weapons/Rogue/LunarKunai.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Items.Weapons.Rogue num149 *= num80; float x4 = vector2.X; float y4 = vector2.Y; - int stealth = Projectile.NewProjectile(x4, y4, num148, num149, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); + int stealth = Projectile.NewProjectile(x4, y4, num148, num149, ModContent.ProjectileType(), (int)((double)item.damage * 0.75), knockBack, player.whoAmI, 0f, 0f); Main.projectile[stealth].Calamity().stealthStrike = true; } } diff --git a/Items/Weapons/Rogue/Sandslasher.cs b/Items/Weapons/Rogue/Sandslasher.cs index 64598fa324..5da0c90c6b 100644 --- a/Items/Weapons/Rogue/Sandslasher.cs +++ b/Items/Weapons/Rogue/Sandslasher.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Rogue { item.width = 40; item.height = 40; - item.damage = 60; + item.damage = 100; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 20; diff --git a/Projectiles/Rogue/DukesDecapitatorProj.cs b/Projectiles/Rogue/DukesDecapitatorProj.cs index 9fde3a35b8..b90e9597c2 100644 --- a/Projectiles/Rogue/DukesDecapitatorProj.cs +++ b/Projectiles/Rogue/DukesDecapitatorProj.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = -1; projectile.timeLeft = 600; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 10; + projectile.localNPCHitCooldown = 20; projectile.tileCollide = false; projectile.Calamity().rogue = true; } diff --git a/Projectiles/Rogue/LunarKunaiProj.cs b/Projectiles/Rogue/LunarKunaiProj.cs index 8a5dc2c938..7e215e1e9d 100644 --- a/Projectiles/Rogue/LunarKunaiProj.cs +++ b/Projectiles/Rogue/LunarKunaiProj.cs @@ -89,6 +89,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.width = (projectile.height = 32); projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + projectile.damage /= 4; for (int num194 = 0; num194 < 10; num194++) { int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 229, 0f, 0f, 0, default(Color), 1.5f); From 359a2cab9d006748a1828b614446bce15f8d3374 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 28 Oct 2019 15:39:08 -0400 Subject: [PATCH 07/12] king/queen statue --- NPCs/TownNPCs/DILF.cs | 6 +++--- NPCs/TownNPCs/FAP.cs | 6 +++--- NPCs/TownNPCs/SEAHOE.cs | 6 +++--- NPCs/TownNPCs/THIEF.cs | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/NPCs/TownNPCs/DILF.cs b/NPCs/TownNPCs/DILF.cs index 77869cff4e..3ca6eb7caa 100644 --- a/NPCs/TownNPCs/DILF.cs +++ b/NPCs/TownNPCs/DILF.cs @@ -179,10 +179,10 @@ namespace CalamityMod.NPCs.TownNPCs nextSlot++; } - // Make this Town NPC teleport to the King and/or Queen statue when triggered. - public override bool CanGoToStatue(bool toKingStatue) //I don't think you can differentiate male vs female with this. + // Make this Town NPC teleport to the King statue when triggered. + public override bool CanGoToStatue(bool toKingStatue) { - return true; + return toKingStatue; } public override void TownNPCAttackStrength(ref int damage, ref float knockback) diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index e29147051d..ea22cfd690 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -348,10 +348,10 @@ namespace CalamityMod.NPCs.TownNPCs nextSlot++; } - // Make this Town NPC teleport to the King and/or Queen statue when triggered. - public override bool CanGoToStatue(bool toKingStatue) //I don't think you can differentiate male vs female with this. + // Make this Town NPC teleport to the Queen statue when triggered. + public override bool CanGoToStatue(bool toKingStatue) { - return true; + return !toKingStatue; } public override void TownNPCAttackStrength(ref int damage, ref float knockback) diff --git a/NPCs/TownNPCs/SEAHOE.cs b/NPCs/TownNPCs/SEAHOE.cs index 62df4156d3..b1b1c9370f 100644 --- a/NPCs/TownNPCs/SEAHOE.cs +++ b/NPCs/TownNPCs/SEAHOE.cs @@ -297,10 +297,10 @@ namespace CalamityMod.NPCs.TownNPCs } } - // Make this Town NPC teleport to the King and/or Queen statue when triggered. - public override bool CanGoToStatue(bool toKingStatue) //I don't think you can differentiate male vs female with this. + // Make this Town NPC teleport to the King statue when triggered. + public override bool CanGoToStatue(bool toKingStatue) { - return true; + return toKingStatue; } public override void TownNPCAttackStrength(ref int damage, ref float knockback) diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index fdc0fcc605..ebbb3347f7 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -290,10 +290,10 @@ namespace CalamityMod.NPCs.TownNPCs } } - // Make this Town NPC teleport to the King and/or Queen statue when triggered. - public override bool CanGoToStatue(bool toKingStatue) //I don't think you can differentiate male vs female with this. + // Make this Town NPC teleport to the Queen statue when triggered. + public override bool CanGoToStatue(bool toKingStatue) { - return true; + return !toKingStatue; } public override void TownNPCAttackStrength(ref int damage, ref float knockback) From 329ae62fcae9f5a3888f5de7c49bb2c91758cf5e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 28 Oct 2019 20:39:07 -0400 Subject: [PATCH 08/12] I think this fixes it --- ModSupport/ModCalls.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index 8776f3fdd9..0486196b21 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -1047,7 +1047,7 @@ namespace CalamityMod #region Call public static object Call(params object[] args) { - static Player castPlayer(object o) + /*static*/ Player castPlayer(object o) { if (o is int) return Main.player[(int)o]; From b8cd3970e81f35b42c4976f9872f19a578f40a3f Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 28 Oct 2019 21:00:28 -0400 Subject: [PATCH 09/12] fixed statigel door not counting as a door --- CalamityMod.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CalamityMod.cs b/CalamityMod.cs index 9c183052ad..b7f63a90db 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1859,6 +1859,8 @@ namespace CalamityMod ModContent.TileType(), ModContent.TileType(), ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), ModContent.TileType(), ModContent.TileType(), ModContent.TileType() From 67227e843147cd0484e0602eb3fb8481124136f9 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 28 Oct 2019 21:19:19 -0400 Subject: [PATCH 10/12] mourningstar rarity/sell price fix --- Items/Weapons/Melee/Mourningstar.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Melee/Mourningstar.cs b/Items/Weapons/Melee/Mourningstar.cs index 725194adce..7b352bd348 100644 --- a/Items/Weapons/Melee/Mourningstar.cs +++ b/Items/Weapons/Melee/Mourningstar.cs @@ -30,11 +30,11 @@ namespace CalamityMod.Items.Weapons.Melee item.useStyle = 5; item.knockBack = 2.5f; item.UseSound = SoundID.Item116; - item.value = Item.buyPrice(1, 35, 0, 0); + item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; item.shootSpeed = 24f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() From 22f675edc1ef3d1f1c8bb29f5c1483faa1776cb2 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 28 Oct 2019 23:58:58 -0400 Subject: [PATCH 11/12] added rogue classification lists for me to use --- CalamityMod.cs | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/CalamityMod.cs b/CalamityMod.cs index b7f63a90db..4e102dc10e 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -152,6 +152,11 @@ namespace CalamityMod public static List chairList; public static List lightList; public static List doorList; + public static List boomerangList; + public static List javelinList; + public static List daggerList; + public static List flaskBombList; + public static List spikyBallList; public static List zombieList; public static List demonEyeList; @@ -314,6 +319,11 @@ namespace CalamityMod chairList = null; lightList = null; doorList = null; + boomerangList = null; + javelinList = null; + daggerList = null; + flaskBombList = null; + spikyBallList = null; zombieList = null; demonEyeList = null; @@ -1614,6 +1624,95 @@ namespace CalamityMod ModContent.ItemType() }; + boomerangList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + + javelinList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + }; + + daggerList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + + flaskBombList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + + spikyBallList = new List() //There's more to come + { + ModContent.ItemType() + }; + tableList = new List() { ModContent.TileType(), From 11a1735a02180d61382756afb1b6c4c3dd83fcf8 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 29 Oct 2019 17:15:27 -0400 Subject: [PATCH 12/12] e --- CalamityMod.cs | 2 +- Items/Weapons/Rogue/SkyStabber.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index 4e102dc10e..883ccb4ef2 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1702,7 +1702,7 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType() diff --git a/Items/Weapons/Rogue/SkyStabber.cs b/Items/Weapons/Rogue/SkyStabber.cs index 0791b9ade4..4c3e281c51 100644 --- a/Items/Weapons/Rogue/SkyStabber.cs +++ b/Items/Weapons/Rogue/SkyStabber.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.Calamity().rogue = true; item.noMelee = true; item.noUseGraphic = true; - item.channel = true; + //item.channel = true; item.width = 1; item.height = 1; item.useTime = 15;