mirror of
https://github.com/YouHaveTrouble/YHTMod.git
synced 2026-05-11 21:56:54 +00:00
icon and a tooltip line for when ambition is fully realized
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 693 B |
+23
-10
@@ -32,6 +32,7 @@ public class SummonersAmbition : ModItem {
|
|||||||
|
|
||||||
public override void ModifyTooltips(List<TooltipLine> tooltips) {
|
public override void ModifyTooltips(List<TooltipLine> tooltips) {
|
||||||
YhtPlayer player = Main.LocalPlayer.GetModPlayer<YhtPlayer>();
|
YhtPlayer player = Main.LocalPlayer.GetModPlayer<YhtPlayer>();
|
||||||
|
|
||||||
tooltips.Add(new TooltipLine(Mod, "SummonerAmbition",
|
tooltips.Add(new TooltipLine(Mod, "SummonerAmbition",
|
||||||
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.Tooltip",
|
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.Tooltip",
|
||||||
player.GetSummonersAmbitionMinionBonus())));
|
player.GetSummonersAmbitionMinionBonus())));
|
||||||
@@ -99,16 +100,22 @@ public class SummonersAmbition : ModItem {
|
|||||||
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.Skeletron")));
|
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.Skeletron")));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.SummonerAmbitions.Contains("wall_of_flesh")) {
|
|
||||||
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionWallOfFlesh",
|
|
||||||
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.WallOfFlesh")));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ModLoader.HasMod("CalamityMod") && player.SummonerAmbitions.Contains("slime_god")) {
|
if (ModLoader.HasMod("CalamityMod") && player.SummonerAmbitions.Contains("slime_god")) {
|
||||||
int id = ModContent.ItemType<CalamityMod.Items.LoreItems.LoreSlimeGod>();
|
int id = ModContent.ItemType<CalamityMod.Items.LoreItems.LoreSlimeGod>();
|
||||||
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionSlimeGod",
|
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionSlimeGod",
|
||||||
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.SlimeGod", "[i:" + id + "]")));
|
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.SlimeGod", "[i:" + id + "]")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.SummonerAmbitions.Contains("wall_of_flesh")) {
|
||||||
|
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionWallOfFlesh",
|
||||||
|
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.WallOfFlesh")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IsPreHardmodeRealized(player.Player)) {
|
||||||
|
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionPreHardmodeRealized",
|
||||||
|
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.PreHardmodeRealized")));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes() {
|
public override void AddRecipes() {
|
||||||
@@ -120,28 +127,34 @@ public class SummonersAmbition : ModItem {
|
|||||||
.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsPreHardmodeRealized(Player player) {
|
private static bool IsPreHardmodeRealized(Player player) {
|
||||||
YhtPlayer modPlayer = player.GetModPlayer<YhtPlayer>();
|
YhtPlayer modPlayer = player.GetModPlayer<YhtPlayer>();
|
||||||
|
|
||||||
HashSet<string> bossesToCheck = [
|
HashSet<string> bossesToCheck = [
|
||||||
"king_slime",
|
"king_slime",
|
||||||
"eye_of_cthulhu",
|
"eye_of_cthulhu",
|
||||||
"deerclops",
|
"deerclops",
|
||||||
"eater_of_worlds",
|
|
||||||
"brain_of_cthulhu",
|
|
||||||
"queen_bee",
|
"queen_bee",
|
||||||
"skeletron",
|
"skeletron",
|
||||||
"wall_of_flesh"
|
"wall_of_flesh"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (!modPlayer.SummonerAmbitions.Contains("eater_of_worlds") && !modPlayer.SummonerAmbitions.Contains("brain_of_cthulhu")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (ModLoader.HasMod("CalamityMod")) {
|
if (ModLoader.HasMod("CalamityMod")) {
|
||||||
bossesToCheck.Add("desert_scourge");
|
bossesToCheck.Add("desert_scourge");
|
||||||
bossesToCheck.Add("crabulon");
|
bossesToCheck.Add("crabulon");
|
||||||
bossesToCheck.Add("perforators");
|
|
||||||
bossesToCheck.Add("hive_mind");
|
|
||||||
bossesToCheck.Add("slime_god");
|
bossesToCheck.Add("slime_god");
|
||||||
|
|
||||||
|
if (!modPlayer.SummonerAmbitions.Contains("perforators") && !modPlayer.SummonerAmbitions.Contains("hive_mind")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return bossesToCheck.All(boss => modPlayer.SummonerAmbitions.Contains(boss));
|
return bossesToCheck.All(boss => modPlayer.SummonerAmbitions.Contains(boss));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 693 B |
@@ -95,6 +95,7 @@ Items: {
|
|||||||
Skeletron: "[i:4801] Increases minion knockback"
|
Skeletron: "[i:4801] Increases minion knockback"
|
||||||
WallOfFlesh: "[i:267] Increases max number of minions by 1"
|
WallOfFlesh: "[i:267] Increases max number of minions by 1"
|
||||||
SlimeGod: "{0} 10% increased whip size"
|
SlimeGod: "{0} 10% increased whip size"
|
||||||
|
PreHardmodeRealized: Fully realized. Seek greater heights.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user