48 Commits

Author SHA1 Message Date
YouHaveTrouble 6f19bfa65f bump version 2026-04-29 22:57:39 +02:00
YouHaveTrouble 7925364a3d actually fix being unable to equip other accessories when ambition was equipped 2026-04-29 22:55:41 +02:00
YouHaveTrouble 1bfc61e5aa attempt to fix ambition accessories blocking other accessories from being equipped 2026-04-29 21:26:30 +02:00
YouHaveTrouble b9fc65dab2 mini reformat 2026-04-29 21:24:08 +02:00
YouHaveTrouble a1cc627246 bump version 2026-04-27 22:00:37 +02:00
YouHaveTrouble af61713ae4 fix desert scourge granting wrong credit id 2026-04-27 21:58:02 +02:00
YouHaveTrouble f208eab5be replace icons for warrior's ambition 2026-01-31 10:39:31 +01:00
YouHaveTrouble 54ae566a89 decide on defense values for calamity evil biome bosses for warrior 2026-01-30 19:16:43 +01:00
YouHaveTrouble 62ae36d4f0 an attempt at increasing melee weapon size 2026-01-30 19:16:17 +01:00
YouHaveTrouble ab37d7e410 fix references to summoner ambition 2026-01-30 18:04:33 +01:00
YouHaveTrouble 4aebc3a261 warrior's ambition item setup and locale 2026-01-28 18:22:14 +01:00
YouHaveTrouble d006a3fbaf add SlyFox to sprite credits 2026-01-27 20:13:11 +01:00
YouHaveTrouble e4a046734e fix running without calamity installed 2026-01-27 20:00:59 +01:00
YouHaveTrouble a40a3b624d bump version 2026-01-27 18:12:05 +01:00
YouHaveTrouble a338e92742 icon and a tooltip line for when ambition is fully realized 2026-01-27 18:10:28 +01:00
YouHaveTrouble a68b762f0a nimbuses spawned by summons are supposed to be friendly 2026-01-26 18:08:53 +01:00
YouHaveTrouble a545325b12 hive mind effect 2026-01-25 15:43:59 +01:00
YouHaveTrouble 09a89e7ed5 perforators bonus 2026-01-25 15:32:10 +01:00
YouHaveTrouble 28f132aca3 gather ideas for perforators and hive mind bonuses 2026-01-13 22:41:37 +01:00
YouHaveTrouble 808ce1ca15 more calamity integration and rebalancing 2026-01-12 18:39:31 +01:00
YouHaveTrouble 27898f341a first successful calamity boss perk integration 2026-01-11 16:48:13 +01:00
YouHaveTrouble 2511d7bfd0 only apply bonus whip damage if eye of cthulhu is killed 2026-01-11 14:47:58 +01:00
YouHaveTrouble c29ac8272f pre-hardmode realization now requires only one evil biome boss 2026-01-10 14:25:43 +01:00
YouHaveTrouble 9e1c05df46 fix typo 2026-01-07 19:15:57 +01:00
YouHaveTrouble 2dd603eb81 more specific types 2026-01-07 19:13:25 +01:00
YouHaveTrouble fff8b5e7f1 configure a code style that is not completely cursed 2026-01-07 19:08:34 +01:00
YouHaveTrouble a945f17711 there are multiple types of squirrels, so allow using all of them to craft summoner's ambition 2026-01-07 15:30:06 +01:00
YouHaveTrouble 9cb093d8df pre-hardmode summoner's ambition 2026-01-04 00:36:55 +01:00
YouHaveTrouble 65690a59f5 test implementation of ambition upgrade system 2026-01-03 03:42:54 +01:00
YouHaveTrouble 8bc637b9b8 fix a typo 2026-01-02 22:08:47 +01:00
YouHaveTrouble e797f803c1 fix calamity toclafane staff recipe requiring 2x souls of light and no souls of night 2026-01-02 20:17:23 +01:00
YouHaveTrouble ab5c5a2d84 bump version 2026-01-02 20:10:27 +01:00
YouHaveTrouble b252a8e3a0 use item groups in recipe and adjust recipe for calamity's altered progression 2026-01-02 19:48:09 +01:00
YouHaveTrouble c82f4648e9 make arcane missle less comically large when dropped 2026-01-02 19:05:06 +01:00
YouHaveTrouble 50d7f8b0d2 adapt ooga booga C# code style 2025-12-22 17:59:47 +01:00
YouHaveTrouble ee06338f22 bump version 2025-12-22 17:33:09 +01:00
YouHaveTrouble cc2849737c autoformatted locale 2025-12-22 17:29:21 +01:00
YouHaveTrouble e3f74c2e21 update to newest tmodloader version 2025-12-22 17:28:31 +01:00
YouHaveTrouble cc6d8d6dc2 version bump 2023-01-28 22:03:41 +01:00
YouHaveTrouble e300c3cddb Nerf katana teleport 2023-01-28 22:02:59 +01:00
YouHaveTrouble 8a9730f61f add discord link 2022-12-21 00:24:00 +01:00
YouHaveTrouble 4819ceee25 Merge pull request #3 from YouHaveTrouble/arcane-missle
Arcane missle accesory
2022-12-21 00:10:15 +01:00
YouHaveTrouble f46e4e1673 update descriptions 2022-12-21 00:08:21 +01:00
YouHaveTrouble bf556d059f arcane missle sprite 2022-12-21 00:08:02 +01:00
YouHaveTrouble eb1bf9014d working arcane missle 2022-12-14 23:45:26 +01:00
YouHaveTrouble 4a0f37f652 arcane missle initial logic 2022-12-07 23:44:15 +01:00
YouHaveTrouble 68025dd762 planera drops chlorophyte ore 2022-12-07 22:04:15 +01:00
YouHaveTrouble 4495fd9cc3 planera drops chlorophyte ore 2022-12-07 22:03:35 +01:00
35 changed files with 1302 additions and 273 deletions
+18
View File
@@ -0,0 +1,18 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace YHTMod.Buffs;
public class ShroomGlowDebuff : ModBuff {
public override void SetStaticDefaults() {
Main.debuff[Type] = true;
}
public override void Update(NPC npc, ref int buffIndex) {
if (Main.netMode == NetmodeID.MultiplayerClient || Main.netMode == NetmodeID.SinglePlayer) { // client-only
Lighting.AddLight(npc.Center, 0.1f, 0.3f, 0.6f);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

+31
View File
@@ -0,0 +1,31 @@
using Terraria;
using Terraria.Localization;
using Terraria.ModLoader;
namespace YHTMod.Buffs;
public class SummonerAmbitionBuff : ModBuff {
public override void SetStaticDefaults() {
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
}
public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare) {
YhtPlayer modPlayer = Main.LocalPlayer.TryGetModPlayer(out YhtPlayer mp) ? mp : null;
if (modPlayer == null) return;
tip = Language.GetTextValue("Mods.YHTMod.Buffs.SummonerAmbitionBuff.Description",
modPlayer.SummonerAmbitions.Count);
}
public override void Update(Player player, ref int buffIndex) {
YhtPlayer modPlayer = player.GetModPlayer<YhtPlayer>();
if (modPlayer.SummonerAmbition) {
player.buffTime[buffIndex] = 18000;
}
else {
player.DelBuff(buffIndex);
buffIndex--;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

+3 -5
View File
@@ -2,13 +2,10 @@ using Terraria;
using Terraria.ModLoader; using Terraria.ModLoader;
using YHTMod.Projectiles.Weapons; using YHTMod.Projectiles.Weapons;
namespace YHTMod.Buffs; namespace YHTMod.Buffs;
public class ToclafaneMinionBuff : ModBuff { public class ToclafaneMinionBuff : ModBuff {
public override void SetStaticDefaults() { public override void SetStaticDefaults() {
DisplayName.SetDefault("Summon Toclafane");
Description.SetDefault("It came from a parallel world to fight for its Master.");
Main.buffNoSave[Type] = true; Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true; Main.buffNoTimeDisplay[Type] = true;
} }
@@ -16,7 +13,8 @@ public class ToclafaneMinionBuff : ModBuff {
public override void Update(Player player, ref int buffIndex) { public override void Update(Player player, ref int buffIndex) {
if (player.ownedProjectileCounts[ModContent.ProjectileType<ToclafaneMinion>()] > 0) { if (player.ownedProjectileCounts[ModContent.ProjectileType<ToclafaneMinion>()] > 0) {
player.buffTime[buffIndex] = 18000; player.buffTime[buffIndex] = 18000;
} else { }
else {
player.DelBuff(buffIndex); player.DelBuff(buffIndex);
buffIndex--; buffIndex--;
} }
+31
View File
@@ -0,0 +1,31 @@
using Terraria;
using Terraria.Localization;
using Terraria.ModLoader;
namespace YHTMod.Buffs;
public class WarriorAmbitionBuff : ModBuff {
public override void SetStaticDefaults() {
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
}
public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare) {
YhtPlayer modPlayer = Main.LocalPlayer.TryGetModPlayer(out YhtPlayer mp) ? mp : null;
if (modPlayer == null) return;
tip = Language.GetTextValue("Mods.YHTMod.Buffs.WarriorAmbitionBuff.Description",
modPlayer.WarriorAmbitions.Count);
}
public override void Update(Player player, ref int buffIndex) {
YhtPlayer modPlayer = player.GetModPlayer<YhtPlayer>();
if (modPlayer.WarriorAmbition) {
player.buffTime[buffIndex] = 18000;
}
else {
player.DelBuff(buffIndex);
buffIndex--;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

+95
View File
@@ -0,0 +1,95 @@
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Chat;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace YHTMod.Changes;
[ExtendsFromMod("CalamityMod")]
public class BossKillListener : GlobalNPC {
private static readonly Dictionary<int, string> BossIds = new();
public override void Load() {
BossIds.Add(NPCID.KingSlime, "king_slime");
BossIds.Add(NPCID.EyeofCthulhu, "eye_of_cthulhu");
BossIds.Add(NPCID.EaterofWorldsHead, "eater_of_worlds");
BossIds.Add(NPCID.EaterofWorldsBody, "eater_of_worlds");
BossIds.Add(NPCID.EaterofWorldsTail, "eater_of_worlds");
BossIds.Add(NPCID.BrainofCthulhu, "brain_of_cthulhu");
BossIds.Add(NPCID.Deerclops, "deerclops");
BossIds.Add(NPCID.QueenBee, "queen_bee");
BossIds.Add(NPCID.SkeletronHead, "skeletron");
BossIds.Add(NPCID.WallofFlesh, "wall_of_flesh");
Mod calamity = CalamityHelper.GetCalamityMod();
if (calamity == null) return;
if (calamity.TryFind("DesertScourgeHead", out ModNPC desertScourgeHead)) {
BossIds.Add(desertScourgeHead.Type, "desert_scourge");
}
if (calamity.TryFind("Crabulon", out ModNPC crabulon)) {
BossIds.Add(crabulon.Type, "crabulon");
}
if (calamity.TryFind("PerforatorHive", out ModNPC perforatorHive)) {
BossIds.Add(perforatorHive.Type, "perforators");
}
if (calamity.TryFind("HiveMind", out ModNPC hiveMind)) {
BossIds.Add(hiveMind.Type, "hive_mind");
}
if (calamity.TryFind("SlimeGodCore", out ModNPC slimeGodCore)) {
BossIds.Add(slimeGodCore.Type, "slime_god");
}
}
public override void OnKill(NPC npc) {
string id = BossIds.GetValueOrDefault(npc.type, null);
switch (id) {
case null:
base.OnKill(npc);
return;
case "eater_of_worlds": {
int foundEaterSegments = 0;
foreach (NPC activeNpC in Main.ActiveNPCs) {
if (activeNpC.friendly || activeNpC.townNPC) continue;
if (activeNpC.type is not NPCID.EaterofWorldsBody
and not NPCID.EaterofWorldsHead
and not NPCID.EaterofWorldsTail
) continue;
if (++foundEaterSegments > 1) break;
}
if (foundEaterSegments > 1) {
base.OnKill(npc);
return;
}
break;
}
}
HandleBossKill(npc, id);
base.OnKill(npc);
}
private static void HandleBossKill(NPC npc, string bossKey) {
foreach (Player player in Main.ActivePlayers) {
YhtPlayer modPlayer = player.GetModPlayer<YhtPlayer>();
if (!npc.playerInteraction[player.whoAmI]) continue;
if (modPlayer.SummonerAmbition && modPlayer.SummonerAmbitions.Add(bossKey)) {
ChatHelper.SendChatMessageToClient(
NetworkText.FromLiteral("Your Summoner Ambition's potential grows stronger!"),
Color.MediumPurple,
player.whoAmI
);
} else if (modPlayer.WarriorAmbition && modPlayer.WarriorAmbitions.Add(bossKey)) {
ChatHelper.SendChatMessageToClient(
NetworkText.FromLiteral("Your Warrior Ambition's potential grows stronger!"),
Color.OrangeRed,
player.whoAmI
);
}
}
}
}
+37
View File
@@ -0,0 +1,37 @@
using System.Collections.Generic;
using Terraria.ModLoader;
namespace YHTMod.Changes;
[ExtendsFromMod("CalamityMod")]
public class CalamityHelper {
public static readonly CalamityHelper Instance = new();
private static Dictionary<string, int> _bossIconIds;
private static Mod _calamity;
private CalamityHelper() {
ModLoader.TryGetMod("CalamityMod", out Mod calamity);
_calamity = calamity;
if (_calamity == null) return;
_bossIconIds = new Dictionary<string, int> {
{ "desert_scourge", ModContent.TryFind("CalamityMod", "LoreDesertScourge", out ModItem item1) ? item1.Type : -1 },
{ "crabulon", ModContent.TryFind("CalamityMod", "LoreCrabulon", out ModItem item2) ? item2.Type : -1 },
{ "perforators", ModContent.TryFind("CalamityMod", "LorePerforators", out ModItem item3) ? item3.Type : -1 },
{ "hive_mind", ModContent.TryFind("CalamityMod", "LoreHiveMind", out ModItem item4) ? item4.Type : -1 },
{ "slime_god", ModContent.TryFind("CalamityMod", "LoreSlimeGod", out ModItem item5) ? item5.Type : -1 }
};
}
public static int GetBossIconId(string bossKey) {
return _bossIconIds.GetValueOrDefault(bossKey, -1);
}
public static Mod GetCalamityMod() {
return _calamity;
}
}
+13 -4
View File
@@ -1,19 +1,28 @@
using Terraria; using Terraria;
using Terraria.GameContent.ItemDropRules; using Terraria.GameContent.ItemDropRules;
using Terraria.ID; using Terraria.ID;
using Terraria.ModLoader; using Terraria.ModLoader;
using YHTMod.Items; using YHTMod.Items;
using YHTMod.Items.ArcaneMissile;
namespace YHTMod.Changes; namespace YHTMod.Changes;
public class NpcLoot : GlobalNPC public class NpcLoot : GlobalNPC {
{
public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot) { public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot) {
int id = npc.type; int id = npc.type;
if (NPCID.Sets.CountsAsCritter[id]) { if (NPCID.Sets.CountsAsCritter[id]) {
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<MithrilPebbleOfPigSmiting>(), 400, 1, 1)); npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<MithrilPebbleOfPigSmiting>(), 400));
}
switch (id) {
case NPCID.Plantera:
npcLoot.Add(ItemDropRule.Common(ItemID.ChlorophyteOre, 1, 60, 80));
break;
case NPCID.Tim:
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<ArcaneMissile>()));
break;
} }
} }
} }
+150
View File
@@ -0,0 +1,150 @@
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using YHTMod.Buffs;
using Vector2 = Microsoft.Xna.Framework.Vector2;
namespace YHTMod.Changes;
[ExtendsFromMod("CalamityMod")]
public class SummonerOnHitEffects : GlobalProjectile {
public override void OnSpawn(Projectile projectile, IEntitySource source) {
Mod calamity = CalamityHelper.GetCalamityMod();
if (calamity is null
|| source is not EntitySource_Parent { Entity: Projectile { friendly: true } parentProj }
|| parentProj.hostile
) {
base.OnSpawn(projectile, source);
return;
}
// Get Calamity projectile types safely
if (!calamity.TryFind("ShadeNimbusHostile", out ModProjectile shadeNimbus)
|| parentProj.type != shadeNimbus.Type
) {
base.OnSpawn(projectile, source);
return;
}
if (!calamity.TryFind("ShaderainHostile", out ModProjectile shaderainHostile) ||
projectile.type != shaderainHostile.Type) {
base.OnSpawn(projectile, source);
return;
}
projectile.friendly = true;
projectile.hostile = false;
projectile.DamageType = DamageClass.Summon;
projectile.damage = parentProj.damage;
base.OnSpawn(projectile, source);
}
public override void OnHitNPC(Projectile projectile, NPC target, NPC.HitInfo hit, int damageDone) {
Player player = Main.player[projectile.owner];
YhtPlayer modPlayer = player.GetModPlayer<YhtPlayer>();
// Player's own minions
if (projectile.minion && Main.myPlayer == projectile.owner) {
if (modPlayer.SummonerAmbition) {
HandleDeerclopsEffect(modPlayer, target, projectile);
HandleQueenBeeEffect(modPlayer, target);
HandlePerforatorsEffect(modPlayer, target, projectile);
HandleHiveMindEffect(modPlayer, target, projectile);
}
}
// Whips
if (modPlayer.SummonerAmbition && ProjectileID.Sets.IsAWhip[projectile.type]) {
if (modPlayer.SummonerAmbitions.Contains("eye_of_cthulhu")) {
projectile.damage = (int)(projectile.damage * 1.1);
}
if (ModLoader.HasMod("CalamityMod")) {
if (modPlayer.SummonerAmbitions.Contains("crabulon")) {
target.AddBuff(ModContent.BuffType<ShroomGlowDebuff>(), 5 * 60);
}
}
}
base.OnHitNPC(projectile, target, hit, damageDone);
}
private static void HandleDeerclopsEffect(YhtPlayer modPlayer, NPC target, Projectile projectile) {
Player player = modPlayer.Player;
if (!modPlayer.SummonerAmbitions.Contains("deerclops")) return;
if (modPlayer.SummonerAmbitionDeerclopsCooldown != 0) return;
if (!Main.rand.NextBool(10)) return;
modPlayer.SummonerAmbitionDeerclopsCooldown = 5 * 60;
Vector2 direction = new(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f));
direction.Normalize();
direction *= Main.rand.NextFloat(4f, 8f);
Projectile.NewProjectile(
player.GetSource_OnHit(target),
target.Center,
direction,
ProjectileID.InsanityShadowFriendly,
(int) (projectile.damage * 0.5),
0f,
projectile.owner
);
}
private static void HandleQueenBeeEffect(YhtPlayer modPlayer, NPC target) {
if (!modPlayer.SummonerAmbitions.Contains("queen_bee")) return;
if (!Main.rand.NextBool(4)) return;
target.AddBuff(BuffID.Poisoned, 5 * 60);
}
private static void HandlePerforatorsEffect(YhtPlayer modPlayer, NPC target, Projectile projectile) {
if (!ModLoader.HasMod("CalamityMod")) return;
if (!modPlayer.SummonerAmbitions.Contains("perforators")) return;
if (modPlayer.SummonerAmbitionPerforatorsCooldown != 0) return;
if (!Main.rand.NextBool(10)) return;
modPlayer.SummonerAmbitionPerforatorsCooldown = 20 * 60;
Vector2 direction = new(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f));
direction.Normalize();
direction *= Main.rand.NextFloat(4f, 5f);
int projectileType = ModContent.ProjectileType<CalamityMod.Projectiles.Boss.IchorBlob>();
int projectileId = Projectile.NewProjectile(
modPlayer.Player.GetSource_OnHit(target),
target.Center,
direction,
projectileType,
(int) (projectile.damage * 0.75f),
0f,
projectile.owner
);
Projectile blob = Main.projectile[projectileId];
blob.friendly = true;
blob.hostile = false;
blob.DamageType = DamageClass.Summon;
}
private static void HandleHiveMindEffect(YhtPlayer modPlayer, NPC target, Projectile projectile) {
if (!ModLoader.HasMod("CalamityMod")) return;
if (!modPlayer.SummonerAmbitions.Contains("hive_mind")) return;
if (modPlayer.SummonerAmbitionHiveMindCooldown != 0) return;
if (!Main.rand.NextBool(10)) return;
modPlayer.SummonerAmbitionHiveMindCooldown = 3 * 60;
int projectileType = ModContent.ProjectileType<CalamityMod.Projectiles.Boss.ShadeNimbusHostile>();
int projectileId = Projectile.NewProjectile(
modPlayer.Player.GetSource_OnHit(target),
target.Center,
new Vector2(0, -0.25f),
projectileType,
(int) (projectile.damage * 0.75f),
0f,
projectile.owner
);
Projectile blob = Main.projectile[projectileId];
blob.friendly = true;
blob.hostile = false;
blob.DamageType = DamageClass.Summon;
}
}
-47
View File
@@ -1,47 +0,0 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Chat;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using YHTMod.Items;
namespace YHTMod.Changes;
public class TheKeyBehavior : GlobalTile {
public override void RightClick(int i, int j, int type) {
if (type != TileID.Containers) {
base.RightClick(i, j, type);
return;
}
bool foundKey = false;
foreach (Item item in Main.LocalPlayer.inventory) {
if (item.type.Equals(ModContent.ItemType<TheKey>())) {
foundKey = true;
break;
}
}
ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral(foundKey.ToString()), Color.White);
if (!foundKey) {
return;
}
ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral("Found key!"), Color.White);
if (!Chest.IsLocked(i, j)) {
base.RightClick(i, j, type);
return;
}
Chest.Unlock(i, j);
if (Main.netMode == NetmodeID.MultiplayerClient)
NetMessage.SendData(MessageID.Unlock, number: 1, number2: 1f, number3: i, number4: j);
}
}
+51
View File
@@ -0,0 +1,51 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace YHTMod.Changes;
public class WarriorItemEffects : GlobalItem {
public override void UseItemHitbox(Item item, Player player, ref Rectangle hitbox, ref bool noHitbox) {
YhtPlayer modPlayer = player.GetModPlayer<YhtPlayer>();
if (!modPlayer.WarriorAmbition) {
base.UseItemHitbox(item, player, ref hitbox, ref noHitbox);
return;
}
if (item.DamageType == DamageClass.Melee && !item.noMelee) {
float scale = modPlayer.GetWarriorsAmbitionMeleeSizeBonus();
if (scale > 1f) {
int newW = (int)(hitbox.Width * scale);
int newH = (int)(hitbox.Height * scale);
int cx = hitbox.X + hitbox.Width / 2;
int cy = hitbox.Y + hitbox.Height / 2;
hitbox.X = cx - newW / 2;
hitbox.Y = cy - newH / 2;
hitbox.Width = newW;
hitbox.Height = newH;
}
}
base.UseItemHitbox(item, player, ref hitbox, ref noHitbox);
}
public override void HoldItem(Item item, Player player) {
YhtPlayer modPlayer = player.GetModPlayer<YhtPlayer>();
if (!modPlayer.WarriorAmbition) {
base.HoldItem(item, player);
return;
}
if (item.DamageType == DamageClass.Melee && !item.noMelee) {
float sizeBonus = modPlayer.GetWarriorsAmbitionMeleeSizeBonus();
if (sizeBonus >= 1f)
{
item.scale *= sizeBonus;
}
}
base.HoldItem(item, player);
}
}
+29
View File
@@ -0,0 +1,29 @@
using Terraria;
using Terraria.GameContent.Creative;
using Terraria.ID;
using Terraria.ModLoader;
namespace YHTMod.Items.ArcaneMissile;
public class ArcaneMissile : ModItem {
public override void SetStaticDefaults() {
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
}
public override void SetDefaults() {
Item.width = 32;
Item.height = 32;
Item.accessory = true;
Item.damage = 10;
Item.rare = ItemRarityID.LightRed;
Item.DamageType = DamageClass.Magic;
Item.noMelee = true;
Item.noUseGraphic = true;
}
public override void UpdateAccessory(Player player, bool hideVisual) {
player.GetModPlayer<YhtPlayer>().ArcaneMissile = Item.damage;
base.UpdateAccessory(player, hideVisual);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -0,0 +1,45 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace YHTMod.Items.ArcaneMissile;
public class ArcaneMissileBehavior : GlobalNPC {
public override void OnHitByProjectile(NPC npc, Projectile projectile, NPC.HitInfo hitInfo, int damage) {
if (!hitInfo.Crit) {
base.OnHitByProjectile(npc, projectile, hitInfo, damage);
return;
}
if (Main.netMode == NetmodeID.Server) {
return;
}
Player player = Main.LocalPlayer;
if (player.GetModPlayer<YhtPlayer>().ArcaneMissile != 0 && projectile.DamageType == DamageClass.Magic) {
// player just crit with magic weapon while having arcane missile accessory
Projectile proj = Projectile.NewProjectileDirect(
projectile.GetSource_FromThis("arcaneMissile"),
Main.LocalPlayer.position,
npc.position.DirectionFrom(Main.LocalPlayer.position),
ProjectileID.MagicMissile,
player.GetModPlayer<YhtPlayer>().ArcaneMissile,
0,
Main.LocalPlayer.whoAmI
);
proj.friendly = true;
proj.hostile = false;
proj.timeLeft = 300;
proj.maxPenetrate = 1;
proj.tileCollide = false;
proj.DamageType = DamageClass.Magic;
proj.aiStyle = ProjAIStyleID.MagicMissile;
// Prevent crits for the missiles
proj.CritChance = int.MinValue;
}
base.OnHitByProjectile(npc, projectile, hitInfo, damage);
}
}
-1
View File
@@ -7,7 +7,6 @@ namespace YHTMod.Items;
public class CopperSwordOnAStick : ModItem { public class CopperSwordOnAStick : ModItem {
public override void SetStaticDefaults() { public override void SetStaticDefaults() {
DisplayName.SetDefault("Copper Sword On A Stick");
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1; CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
} }
+22 -23
View File
@@ -7,46 +7,45 @@ using Terraria.ModLoader;
namespace YHTMod.Items; namespace YHTMod.Items;
public class KatanaRedo : GlobalItem { public class KatanaRedo : GlobalItem {
public override void ModifyTooltips(Item item, List<TooltipLine> tooltips) {
public override void ModifyTooltips(Item item, List<TooltipLine> tooltips)
{
if (item.type != ItemID.Katana) return; if (item.type != ItemID.Katana) return;
tooltips.Insert(5, new TooltipLine(YHTMod.GetInstance(), "flavor" , "Nothing personel kid.")); tooltips.Insert(5, new TooltipLine(YHTMod.GetInstance(), "flavor", "Nothing personel kid."));
tooltips.Insert(6, new TooltipLine(YHTMod.GetInstance(), "usage" , "Right click to teleport behind them.")); tooltips.Insert(6, new TooltipLine(YHTMod.GetInstance(), "usage", "Right click to teleport behind them."));
} }
public override bool AltFunctionUse(Item item, Player player) { public override bool AltFunctionUse(Item item, Player player) {
if (item.type != ItemID.Katana) { return item.type == ItemID.Katana || base.AltFunctionUse(item, player);
return base.AltFunctionUse(item, player);
}
return true;
} }
public override bool? UseItem(Item item, Player player) { public override bool? UseItem(Item item, Player player) {
if (item.type != ItemID.Katana || player.altFunctionUse != 2) return null; if (item.type != ItemID.Katana || player.altFunctionUse != 2) return null;
YhtPlayer yhtPlayer = player.GetModPlayer<YhtPlayer>();
if (yhtPlayer.KatanaTeleportCooldown > 0) return null;
yhtPlayer.KatanaTeleportCooldown = 300;
for (int i = 0; i < Main.maxNPCs; i++) { for (int i = 0; i < Main.maxNPCs; i++) {
NPC npc = Main.npc[i]; NPC npc = Main.npc[i];
if (!npc.CanBeChasedBy()) continue; if (!npc.CanBeChasedBy()) continue;
float between = Vector2.Distance(npc.Center, player.Center); float between = Vector2.Distance(npc.Center, player.Center);
bool inRange = between < 650; bool inRange = between < 650;
bool lineOfSight = Collision.CanHitLine(player.position, player.width, player.height, npc.position, bool lineOfSight = Collision.CanHitLine(player.position, player.width, player.height, npc.position,
npc.width, npc.height); npc.width, npc.height);
if (inRange && lineOfSight) { if (!inRange || !lineOfSight) continue;
Vector2 tpPos = npc.position; Vector2 tpPos = npc.position;
tpPos.X += -(npc.direction * npc.width + (player.width*2)); tpPos.X += -(npc.direction * npc.width + (player.width * 2));
if (Collision.TileCollision(tpPos, Vector2.Zero, player.width, player.height) != Vector2.Zero) return true; if (Collision.TileCollision(tpPos, Vector2.Zero, player.width, player.height) != Vector2.Zero) return true;
player.Teleport(tpPos, TeleportationStyleID.RodOfDiscord); player.Teleport(tpPos, TeleportationStyleID.RodOfDiscord);
player.velocity = Vector2.Zero; player.velocity = Vector2.Zero;
player.NinjaDodge(); player.NinjaDodge();
return true; return true;
}
} }
return null; return null;
} }
} }
-14
View File
@@ -7,20 +7,6 @@ namespace YHTMod.Items;
public class MithrilPebbleOfPigSmiting : ModItem { public class MithrilPebbleOfPigSmiting : ModItem {
public override void SetStaticDefaults() { public override void SetStaticDefaults() {
DisplayName.SetDefault("Mithril Pebble of Pig Smiting");
Tooltip.SetDefault(
"For you see long ago this pebble was forged in the fiery pits of Tartarus. By the grand blacksmith of Lucifer himself. In a time before the world began there were\n" +
"pigs that roamed the world of aincrad. They took what they pleased and did what they wanted. The humans tried to survive but the pigs were too powerful. Then a man stood against the hogs!\n" +
"His name... Well its not a Him its a Her...HER name...was...Akane! Lucifer crafted this mighty weapon for Akane. Amd she threw it Over and Over, Again and Again. She freed\n" +
"the humans but the pigs wouldn't give up! In a mighty battle Akane fell to the Hogs Hero, Becon! Like Bacon but with a 'E' instead of a 'A'. ANYWAY Becon used his Cleaver to strike\n" +
"down Akane. And the pebble fell. One of the hogs tried to pick it up but that hog died as soon as he touched the stone. Another Hero picked up the pebble. It was Akanes Apprentice. Sophie.\n" +
"The hogs ran from the battlefield as Sophie threw the pebble. Striking many of them down. But there were too many. After returning home Sophie trained hard and set off to find Becon.\n" +
"She killed hog after hog looking for him. One little piggy spilled and told her when he was. She made Becon, Into Bacon. Battle after battle the Hogs Became weaker. With time so did Sophie.\n" +
"She died because she ate too much Pork. And the Pebble was passed too Marjosa. He made a decision. Instead of killing them all. He made them walk on four legs. He would eat them and keep them\n" +
"locked up where they cant escape. Some Hogs rebelled but most of them went with it. Accepting defeat. Then as Marjosa was Hunting wild Hogs. 3 appeared at once. Taking him by surprise.\n" +
"They hit him with there sharp horns. Marjosa hit the with the Mighty Pebble killing them all but he was weak and far from anyone who could offer help. And Thus, Marjosa\n" +
"Guardian of the Pebble fell to his knees and passed from this world. Leaving behind the mighty weapon. For he knew. One day its power would be required once more.\n" +
"But the Legacy of the pebble lives on.");
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1; CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
} }
+163
View File
@@ -0,0 +1,163 @@
using System.Collections.Generic;
using System.Linq;
using Terraria;
using Terraria.GameContent.Creative;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using YHTMod.Changes;
namespace YHTMod.Items;
public class SummonersAmbition : ModItem {
public override void SetStaticDefaults() {
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
}
public override LocalizedText Tooltip => Language.GetText("");
public override void SetDefaults() {
Item.width = 32;
Item.height = 32;
Item.accessory = true;
Item.rare = ItemRarityID.White;
Item.noMelee = true;
Item.noUseGraphic = true;
ItemID.Sets.ShimmerTransformToItem[Type] = 0;
}
public override bool CanAccessoryBeEquippedWith(Item equippedItem, Item incomingItem, Player player) {
return !(YHTMod.GetAmbitionItems().Contains(incomingItem.type) && YHTMod.GetAmbitionItems().Contains(equippedItem.type));
}
public override void UpdateAccessory(Player player, bool hideVisual) {
YhtPlayer modPlayer = player.GetModPlayer<YhtPlayer>();
modPlayer.SummonerAmbition = true;
}
public override void ModifyTooltips(List<TooltipLine> tooltips) {
YhtPlayer player = Main.LocalPlayer.GetModPlayer<YhtPlayer>();
tooltips.Add(new TooltipLine(Mod, "SummonerAmbition",
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.Tooltip",
player.GetSummonersAmbitionMinionBonus())));
if (player.SummonerAmbitions.Contains("king_slime")) {
int bonus = 20;
if (ModLoader.HasMod("CalamityMod")) {
bonus = 10;
}
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionKingSlime",
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.KingSlime", bonus)));
}
if (ModLoader.HasMod("CalamityMod") && player.SummonerAmbitions.Contains("desert_scourge")) {
int id = CalamityHelper.GetBossIconId("desert_scourge");
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionDesertScourge",
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.DesertScourge", "[i:" + id + "]")));
}
if (player.SummonerAmbitions.Contains("eye_of_cthulhu")) {
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionEyeOfCthulhu",
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.EyeOfCthulhu")));
}
if (ModLoader.HasMod("CalamityMod") && player.SummonerAmbitions.Contains("crabulon")) {
int id = CalamityHelper.GetBossIconId("crabulon");
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionCrabulon",
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.Crabulon", "[i:" + id + "]")));
}
if (player.SummonerAmbitions.Contains("deerclops")) {
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionDeerclops",
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.Deerclops")));
}
if (player.SummonerAmbitions.Contains("eater_of_worlds")) {
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionEaterOfWorlds",
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.EaterOfWorlds")));
}
if (player.SummonerAmbitions.Contains("brain_of_cthulhu")) {
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionBrainOfCthulhu",
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.BrainOfCthulhu")));
}
if (ModLoader.HasMod("CalamityMod") && player.SummonerAmbitions.Contains("perforators")) {
int id = CalamityHelper.GetBossIconId("perforators");
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionPerforators",
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.Perforators", "[i:" + id + "]")));
}
if (ModLoader.HasMod("CalamityMod") && player.SummonerAmbitions.Contains("hive_mind")) {
int id = CalamityHelper.GetBossIconId("hive_mind");
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionHiveMind",
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.HiveMind", "[i:" + id + "]")));
}
if (player.SummonerAmbitions.Contains("queen_bee")) {
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionQueenBee",
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.QueenBee")));
}
if (player.SummonerAmbitions.Contains("skeletron")) {
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionSkeletron",
Language.GetTextValue("Mods.YHTMod.Items.SummonersAmbition.Skeletron")));
}
if (ModLoader.HasMod("CalamityMod") && player.SummonerAmbitions.Contains("slime_god")) {
int id = CalamityHelper.GetBossIconId("slime_god");
tooltips.Add(new TooltipLine(Mod, "SummonerAmbitionSlimeGod",
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() {
CreateRecipe()
.AddIngredient(ItemID.Rope, 5)
.AddRecipeGroup(RecipeGroupID.Squirrels)
.AddIngredient(ItemID.Acorn, 25)
.AddTile(TileID.WorkBenches)
.Register();
}
private static bool IsPreHardmodeRealized(Player player) {
YhtPlayer modPlayer = player.GetModPlayer<YhtPlayer>();
HashSet<string> bossesToCheck = [
"king_slime",
"eye_of_cthulhu",
"deerclops",
"queen_bee",
"skeletron",
"wall_of_flesh"
];
if (!modPlayer.SummonerAmbitions.Contains("eater_of_worlds") && !modPlayer.SummonerAmbitions.Contains("brain_of_cthulhu")) {
return false;
}
if (ModLoader.HasMod("CalamityMod")) {
bossesToCheck.Add("desert_scourge");
bossesToCheck.Add("crabulon");
bossesToCheck.Add("slime_god");
if (!modPlayer.SummonerAmbitions.Contains("perforators") && !modPlayer.SummonerAmbitions.Contains("hive_mind")) {
return false;
}
}
return bossesToCheck.All(boss => modPlayer.SummonerAmbitions.Contains(boss));
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

-14
View File
@@ -1,14 +0,0 @@
using Terraria.GameContent.Creative;
using Terraria.ModLoader;
namespace YHTMod.Items;
public class TheKey : ModItem {
public override void SetStaticDefaults() {
DisplayName.SetDefault("The Key");
Tooltip.SetDefault("Opens all locks.");
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
}
}
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

+40 -43
View File
@@ -3,22 +3,21 @@ using Terraria;
using Terraria.DataStructures; using Terraria.DataStructures;
using Terraria.GameContent.Creative; using Terraria.GameContent.Creative;
using Terraria.ID; using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader; using Terraria.ModLoader;
using YHTMod.Buffs; using YHTMod.Buffs;
using YHTMod.Projectiles.Weapons; using YHTMod.Projectiles.Weapons;
namespace YHTMod.Items; namespace YHTMod.Items;
public class ToclafaneStaff : ModItem { public class ToclafaneStaff : ModItem {
public override void SetStaticDefaults() { public override void SetStaticDefaults() {
DisplayName.SetDefault("Toclafane Staff"); ItemID.Sets.GamepadWholeScreenUseRange[Item.type] =
Tooltip.SetDefault("Summons a toclafane to remove population for you"); true; // This lets the player target anywhere on the whole screen while using a controller.
ItemID.Sets.GamepadWholeScreenUseRange[Item.type] = true; // This lets the player target anywhere on the whole screen while using a controller.
ItemID.Sets.LockOnIgnoresCollision[Item.type] = true; ItemID.Sets.LockOnIgnoresCollision[Item.type] = true;
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1; CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
} }
public override void SetDefaults() { public override void SetDefaults() {
Item.damage = 30; Item.damage = 30;
Item.knockBack = 3f; Item.knockBack = 3f;
@@ -37,48 +36,46 @@ public class ToclafaneStaff : ModItem {
Item.shoot = ModContent.ProjectileType<ToclafaneMinion>(); Item.shoot = ModContent.ProjectileType<ToclafaneMinion>();
} }
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity,
int type, int damage, float knockback) {
player.AddBuff(Item.buffType, 2); player.AddBuff(Item.buffType, 2);
position = Main.MouseWorld; position = Main.MouseWorld;
return base.Shoot(player, source, position, velocity, type, damage, knockback); return base.Shoot(player, source, position, velocity, type, damage, knockback);
} }
public override void AddRecipes() { public override void AddRecipes() {
CreateRecipe() RecipeGroup watchGroup = new RecipeGroup(() => Language.GetTextValue("Mods.YHTMod.Recipes.AnyWatch"),
.AddIngredient(ItemID.GuideVoodooDoll, 1) ItemID.GoldWatch,
.AddIngredient(ItemID.HallowedBar, 15) ItemID.SilverWatch,
.AddIngredient(ItemID.CopperWatch) ItemID.TinWatch,
.AddTile(TileID.MythrilAnvil) ItemID.CopperWatch,
.Register(); ItemID.PlatinumWatch,
CreateRecipe() ItemID.TungstenWatch
.AddIngredient(ItemID.GuideVoodooDoll, 1) );
.AddIngredient(ItemID.HallowedBar, 15) RecipeGroup.RegisterGroup("YHTMod:Watches", watchGroup);
.AddIngredient(ItemID.TinWatch)
.AddTile(TileID.MythrilAnvil) RecipeGroup tier2BarGroup = new RecipeGroup(() => Language.GetTextValue("Mods.YHTMod.Recipes.Tier2Bars"),
.Register(); ItemID.MythrilBar,
CreateRecipe() ItemID.OrichalcumBar
.AddIngredient(ItemID.GuideVoodooDoll, 1) );
.AddIngredient(ItemID.HallowedBar, 15) RecipeGroup.RegisterGroup("YHTMod:Tier2Bars", tier2BarGroup);
.AddIngredient(ItemID.SilverWatch)
.AddTile(TileID.MythrilAnvil) Recipe recipe = CreateRecipe();
.Register();
CreateRecipe() recipe.AddRecipeGroup(watchGroup);
.AddIngredient(ItemID.GuideVoodooDoll, 1) recipe.AddIngredient(ItemID.GuideVoodooDoll);
.AddIngredient(ItemID.HallowedBar, 15) recipe.AddTile(TileID.MythrilAnvil);
.AddIngredient(ItemID.TungstenWatch)
.AddTile(TileID.MythrilAnvil) // Calamity delays when you obtain hallowed bars, so use alternate recipe if Calamity is installed
.Register(); if (ModLoader.HasMod("CalamityMod")) {
CreateRecipe() recipe.AddRecipeGroup(tier2BarGroup, 35);
.AddIngredient(ItemID.GuideVoodooDoll, 1) recipe.AddIngredient(ItemID.SoulofLight, 10);
.AddIngredient(ItemID.HallowedBar, 15) recipe.AddIngredient(ItemID.SoulofNight, 10);
.AddTile(TileID.MythrilAnvil) }
.AddIngredient(ItemID.GoldWatch) else {
.Register(); recipe.AddIngredient(ItemID.HallowedBar, 15);
CreateRecipe() }
.AddIngredient(ItemID.GuideVoodooDoll, 1)
.AddIngredient(ItemID.HallowedBar, 15) recipe.Register();
.AddIngredient(ItemID.PlatinumWatch)
.AddTile(TileID.MythrilAnvil)
.Register();
} }
} }
+150
View File
@@ -0,0 +1,150 @@
using System.Collections.Generic;
using System.Linq;
using Terraria;
using Terraria.GameContent.Creative;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using YHTMod.Changes;
namespace YHTMod.Items;
public class WarriorsAmbition : ModItem {
public override void SetStaticDefaults() {
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
}
public override LocalizedText Tooltip => Language.GetText("");
public override void SetDefaults() {
Item.width = 32;
Item.height = 32;
Item.accessory = true;
Item.rare = ItemRarityID.White;
Item.noMelee = true;
Item.noUseGraphic = true;
ItemID.Sets.ShimmerTransformToItem[Type] = 0;
}
public override bool CanAccessoryBeEquippedWith(Item equippedItem, Item incomingItem, Player player) {
return !(YHTMod.GetAmbitionItems().Contains(incomingItem.type) && YHTMod.GetAmbitionItems().Contains(equippedItem.type));
}
public override void UpdateAccessory(Player player, bool hideVisual) {
YhtPlayer modPlayer = player.GetModPlayer<YhtPlayer>();
modPlayer.WarriorAmbition = true;
}
public override void ModifyTooltips(List<TooltipLine> tooltips) {
YhtPlayer player = Main.LocalPlayer.GetModPlayer<YhtPlayer>();
tooltips.Add(new TooltipLine(Mod, "WarriorsAmbition",
Language.GetTextValue("Mods.YHTMod.Items.WarriorAmbition.Tooltip")));
if (player.WarriorAmbitions.Contains("king_slime")) {
float bonus = 5f;
if (ModLoader.HasMod("CalamityMod")) {
bonus = 2.5f;
}
tooltips.Add(new TooltipLine(Mod, "WarriorAmbitionKingSlime",
Language.GetTextValue("Mods.YHTMod.Items.WarriorsAmbition.KingSlime", bonus)));
}
if (ModLoader.HasMod("CalamityMod") && player.WarriorAmbitions.Contains("desert_scourge")) {
int id = CalamityHelper.GetBossIconId("desert_scourge");
tooltips.Add(new TooltipLine(Mod, "WarriorAmbitionDesertScourge",
Language.GetTextValue("Mods.YHTMod.Items.WarriorsAmbition.DesertScourge", "[i:" + id + "]")));
}
if (player.WarriorAmbitions.Contains("eye_of_cthulhu")) {
tooltips.Add(new TooltipLine(Mod, "WarriorAmbitionEyeOfCthulhu",
Language.GetTextValue("Mods.YHTMod.Items.WarriorsAmbition.EyeOfCthulhu")));
}
if (ModLoader.HasMod("CalamityMod") && player.WarriorAmbitions.Contains("crabulon")) {
int id = CalamityHelper.GetBossIconId("crabulon");
tooltips.Add(new TooltipLine(Mod, "WarriorAmbitionCrabulon",
Language.GetTextValue("Mods.YHTMod.Items.WarriorsAmbition.Crabulon", "[i:" + id + "]")));
}
if (player.WarriorAmbitions.Contains("deerclops")) {
tooltips.Add(new TooltipLine(Mod, "WarriorAmbitionDeerclops",
Language.GetTextValue("Mods.YHTMod.Items.WarriorsAmbition.Deerclops")));
}
if (player.WarriorAmbitions.Contains("eater_of_worlds")) {
tooltips.Add(new TooltipLine(Mod, "WarriorAmbitionEaterOfWorlds",
Language.GetTextValue("Mods.YHTMod.Items.WarriorsAmbition.EaterOfWorlds")));
}
if (player.WarriorAmbitions.Contains("brain_of_cthulhu")) {
tooltips.Add(new TooltipLine(Mod, "WarriorAmbitionBrainOfCthulhu",
Language.GetTextValue("Mods.YHTMod.Items.WarriorsAmbition.BrainOfCthulhu")));
}
if (ModLoader.HasMod("CalamityMod") && player.WarriorAmbitions.Contains("perforators")) {
int id = CalamityHelper.GetBossIconId("perforators");
tooltips.Add(new TooltipLine(Mod, "WarriorAmbitionPerforators",
Language.GetTextValue("Mods.YHTMod.Items.WarriorsAmbition.Perforators", "[i:" + id + "]")));
}
if (ModLoader.HasMod("CalamityMod") && player.WarriorAmbitions.Contains("hive_mind")) {
int id = CalamityHelper.GetBossIconId("hive_mind");
tooltips.Add(new TooltipLine(Mod, "WarriorAmbitionHiveMind",
Language.GetTextValue("Mods.YHTMod.Items.WarriorsAmbition.HiveMind", "[i:" + id + "]")));
}
if (player.WarriorAmbitions.Contains("queen_bee")) {
tooltips.Add(new TooltipLine(Mod, "WarriorAmbitionQueenBee",
Language.GetTextValue("Mods.YHTMod.Items.WarriorsAmbition.QueenBee")));
}
if (player.WarriorAmbitions.Contains("skeletron")) {
tooltips.Add(new TooltipLine(Mod, "WarriorAmbitionSkeletron",
Language.GetTextValue("Mods.YHTMod.Items.WarriorsAmbition.Skeletron")));
}
if (player.WarriorAmbitions.Contains("wall_of_flesh")) {
tooltips.Add(new TooltipLine(Mod, "WarriorAmbitionWallOfFlesh",
Language.GetTextValue("Mods.YHTMod.Items.WarriorsAmbition.WallOfFlesh")));
}
if (ModLoader.HasMod("CalamityMod") && player.WarriorAmbitions.Contains("slime_god")) {
int id = CalamityHelper.GetBossIconId("slime_god");
tooltips.Add(new TooltipLine(Mod, "WarriorAmbitionSlimeGod",
Language.GetTextValue("Mods.YHTMod.Items.WarriorsAmbition.SlimeGod", "[i:" + id + "]")));
}
}
public override void AddRecipes() {
}
private static bool IsPreHardmodeRealized(Player player) {
YhtPlayer modPlayer = player.GetModPlayer<YhtPlayer>();
HashSet<string> bossesToCheck = [
"king_slime",
"eye_of_cthulhu",
"deerclops",
"queen_bee",
"skeletron",
"wall_of_flesh"
];
if (!modPlayer.WarriorAmbitions.Contains("eater_of_worlds") && !modPlayer.WarriorAmbitions.Contains("brain_of_cthulhu")) {
return false;
}
if (ModLoader.HasMod("CalamityMod")) {
bossesToCheck.Add("desert_scourge");
bossesToCheck.Add("crabulon");
bossesToCheck.Add("slime_god");
if (!modPlayer.WarriorAmbitions.Contains("perforators") && !modPlayer.WarriorAmbitions.Contains("hive_mind")) {
return false;
}
}
return bossesToCheck.All(boss => modPlayer.WarriorAmbitions.Contains(boss));
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

+140
View File
@@ -0,0 +1,140 @@
Recipes: {
AnyWatch: Any Watch
Tier2Bars: Tier 2 Hardmode Bars
}
Buffs: {
ToclafaneMinionBuff: {
DisplayName: Summon Toclafane
Description: It came from a parallel world to fight for its Master
}
SummonerAmbitionBuff: {
DisplayName: Summoner's Ambition
Description:
'''
Your power grows with your ambition
Essences absorbed: {0}
'''
}
ShroomGlowDebuff: {
DisplayName: Shroom Glow
Description:
'''
You are emitting a faint glow...
And smell like mushrooms.
'''
}
WarriorAmbitionBuff: {
DisplayName: Warrior's Ambition
Description:
'''
Your power grows with your ambition
Essences absorbed: {0}
'''
}
}
Items: {
ArcaneMissile: {
DisplayName: Arcane Missile
Tooltip:
'''
Magical projectile crits shoot a homing arcane missile
Arcane missiles cannot crit
'''
}
CopperSwordOnAStick: {
DisplayName: Copper Sword On A Stick
Tooltip: ""
}
MithrilPebbleOfPigSmiting: {
DisplayName: Mithril Pebble Of Pig Smiting
Tooltip:
'''
For you see long ago this pebble was forged in the fiery pits of Tartarus. By the grand blacksmith of Lucifer himself.
In a time before the world began there were pigs that roamed the world of Aincrad. They took what they pleased and did
what they wanted. The humans tried to survive but the pigs were too powerful. Then a man stood against the hogs! His
name... Well its not a Him its a Her...HER name...was...Akane! Lucifer crafted this mighty weapon for Akane. And she
threw it Over and Over, Again and Again. She freed the humans but the pigs wouldn't give up! In a mighty battle Akane
fell to the Hogs Hero, Becon! Like Bacon but with a 'E' instead of a 'A'. ANYWAY Becon used his Cleaver to strike down
Akane. And the pebble fell. One of the hogs tried to pick it up but that hog died as soon as he touched the stone.
Another Hero picked up the pebble. It was Akane's Apprentice. Sophie. The hogs ran from the battlefield as Sophie threw
the pebble. Striking many of them down. But there were too many. After returning home Sophie trained hard and set off
to find Becon. She killed hog after hog looking for him. One little piggy spilled and told her when he was. She made
Becon, Into Bacon. Battle after battle the Hogs Became weaker. With time so did Sophie. She died because she ate too
much Pork. And the Pebble was passed too Marjosa. He made a decision. Instead of killing them all. He made them walk
on four legs. He would eat them and keep them locked up where they cant escape. Some Hogs rebelled but most of them
went with it. Accepting defeat. Then as Marjosa was Hunting wild Hogs. 3 appeared at once. Taking him by surprise.
They hit him with there sharp horns. Marjosa hit the with the Mighty Pebble killing them all but he was weak and far
from anyone who could offer help. And Thus, Marjosa Guardian of the Pebble fell to his knees and passed from this
world. Leaving behind the mighty weapon. For he knew. One day its power would be required once more.
But the Legacy of the pebble lives on.
'''
}
ToclafaneStaff: {
DisplayName: Toclafane Staff
Tooltip: Summons a toclafane to remove population for you
}
SummonersAmbition: {
DisplayName: Summoner's Ambition
Tooltip:
'''
Grants Summoner's Ambition.
"For those who seek to lead."
{$CommonItemTooltip.IncreasesMaxMinionsBy@0}
'''
KingSlime: "[i:560] {0}% increased whip size"
DesertScourge: "{0} Increases maximum life by 5"
EyeOfCthulhu: "[i:43] Increases whip damage by 10%"
Crabulon: "{0} Enemies struck by whips glow slightly"
EaterOfWorlds: "[i:70] Summon damage penetrates 5 armor"
BrainOfCthulhu: "[i:1331] 5% increased minion damage"
HiveMind: "{0} Occasionally spawns Shade Nimbus to rain on enemies"
Perforators: "{0} Occasionally spawns ichor blobs on minion hits"
QueenBee: "[i:1133] Minion hits can inflict poison"
Deerclops: "[i:5120] Minion hits can spawn shadow hands"
Skeletron: "[i:4801] Increases minion knockback"
WallOfFlesh: "[i:267] Increases max number of minions by 1"
SlimeGod: "{0} 10% increased whip size"
PreHardmodeRealized: Fully realized. Seek greater heights.
}
WarriorsAmbition: {
DisplayName: Warriors Ambition
Tooltip:
'''
Grants Warrior's Ambition.
"For those who wish to face enemy head on."
{0} defense
'''
KingSlime: "[i:560] {0}% increased true melee weapon size"
DesertScourge: "{0} Increases maximum life by 10"
EyeOfCthulhu: "[i:43] Increases melee damage by 10%"
Crabulon: "{0} Enemies struck by whips glow slightly"
EaterOfWorlds: "[i:70] Melee damage penetrates 5 armor"
BrainOfCthulhu: "[i:1331] 5% increased true melee damage"
HiveMind: "{0} +2 defense"
Perforators: "{0} +2 defense"
QueenBee: "[i:1133] Damaging debuffs expire 5% faster on you"
Deerclops: "[i:5120] Melee hits can throw debris"
Skeletron: "[i:4801] Increases melee knockback"
WallOfFlesh: "[i:267] +5 defense"
SlimeGod: "{0} 2.5% increased true melee weapon size"
PreHardmodeRealized: Fully realized. Seek greater heights.
}
}
Projectiles: {
CopperSwordOnAStickProjectile.DisplayName: Copper Sword On A Stick
MithrilPebbleOfPigSmitingProjectile.DisplayName: Mithril Pebble Of Pig Smiting
ToclafaneMinion.DisplayName: Toclafane Minion
}
@@ -23,8 +23,9 @@ class CopperSwordOnAStickProjectile : ModProjectile {
public override void AI() { public override void AI() {
base.AI(); base.AI();
float random = (float) (Random.Shared.NextDouble() / 5f); float random = (float)(Random.Shared.NextDouble() / 5f);
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2 - MathHelper.PiOver4 * Projectile.spriteDirection; Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2 -
MathHelper.PiOver4 * Projectile.spriteDirection;
Projectile.rotation += random; Projectile.rotation += random;
DrawOriginOffsetX = 0; DrawOriginOffsetX = 0;
DrawOffsetX = 0; DrawOffsetX = 0;
+94 -102
View File
@@ -8,12 +8,10 @@ using YHTMod.Buffs;
namespace YHTMod.Projectiles.Weapons; namespace YHTMod.Projectiles.Weapons;
public class ToclafaneMinion : ModProjectile { public class ToclafaneMinion : ModProjectile {
private int _shootCooldown = 0;
private int shootCooldown = 0; private AttackMode _attackMode = AttackMode.Ranged;
private AttackMode attackMode = AttackMode.RANGED;
public override void SetStaticDefaults() { public override void SetStaticDefaults() {
DisplayName.SetDefault("Toclafane Minion");
// Sets the amount of frames this minion has on its spritesheet // Sets the amount of frames this minion has on its spritesheet
Main.projFrames[Projectile.type] = 8; Main.projFrames[Projectile.type] = 8;
// This is necessary for right-click targeting // This is necessary for right-click targeting
@@ -61,11 +59,11 @@ public class ToclafaneMinion : ModProjectile {
#region General behavior #region General behavior
if (shootCooldown > 0) { if (_shootCooldown > 0) {
shootCooldown = shootCooldown - 1; _shootCooldown = _shootCooldown - 1;
} }
attackMode = AttackMode.RANGED; _attackMode = AttackMode.Ranged;
Vector2 idlePosition = player.Center; Vector2 idlePosition = player.Center;
idlePosition.Y -= 48f; idlePosition.Y -= 48f;
@@ -87,18 +85,17 @@ public class ToclafaneMinion : ModProjectile {
} }
// If your minion is flying, you want to do this independently of any conditions // If your minion is flying, you want to do this independently of any conditions
float overlapVelocity = 0.04f; const float overlapVelocity = 0.04f;
for (int i = 0; i < Main.maxProjectiles; i++) { for (int i = 0; i < Main.maxProjectiles; i++) {
// Fix overlap with other minions // Fix overlap with other minions
Projectile other = Main.projectile[i]; Projectile other = Main.projectile[i];
if (i != Projectile.whoAmI && other.active && other.owner == Projectile.owner && if (i == Projectile.whoAmI || !other.active || other.owner != Projectile.owner ||
Math.Abs(Projectile.position.X - other.position.X) + !(Math.Abs(Projectile.position.X - other.position.X) +
Math.Abs(Projectile.position.Y - other.position.Y) < Projectile.width) { Math.Abs(Projectile.position.Y - other.position.Y) < Projectile.width)) continue;
if (Projectile.position.X < other.position.X) Projectile.velocity.X -= overlapVelocity; if (Projectile.position.X < other.position.X) Projectile.velocity.X -= overlapVelocity;
else Projectile.velocity.X += overlapVelocity; else Projectile.velocity.X += overlapVelocity;
if (Projectile.position.Y < other.position.Y) Projectile.velocity.Y -= overlapVelocity; if (Projectile.position.Y < other.position.Y) Projectile.velocity.Y -= overlapVelocity;
else Projectile.velocity.Y += overlapVelocity; else Projectile.velocity.Y += overlapVelocity;
}
} }
#endregion #endregion
@@ -125,21 +122,19 @@ public class ToclafaneMinion : ModProjectile {
if (!foundTarget) { if (!foundTarget) {
for (int i = 0; i < Main.maxNPCs; i++) { for (int i = 0; i < Main.maxNPCs; i++) {
NPC npc = Main.npc[i]; NPC npc = Main.npc[i];
if (npc.CanBeChasedBy()) { if (!npc.CanBeChasedBy()) continue;
float between = Vector2.Distance(npc.Center, Projectile.Center); float between = Vector2.Distance(npc.Center, Projectile.Center);
bool closest = Vector2.Distance(Projectile.Center, targetCenter) > between; bool closest = Vector2.Distance(Projectile.Center, targetCenter) > between;
bool inRange = between < distanceFromTarget; bool inRange = between < distanceFromTarget;
bool lineOfSight = Collision.CanHitLine(Projectile.position, Projectile.width, bool lineOfSight = Collision.CanHitLine(Projectile.position, Projectile.width,
Projectile.height, npc.position, npc.width, npc.height); Projectile.height, npc.position, npc.width, npc.height);
// Additional check for this specific minion behavior, otherwise it will stop attacking once it dashed through an enemy while flying though tiles afterwards // Additional check for this specific minion behavior, otherwise it will stop attacking once it dashed through an enemy while flying though tiles afterward
// The number depends on various parameters seen in the movement code below. Test different ones out until it works alright // The number depends on various parameters seen in the movement code below. Test different ones out until it works alright
bool closeThroughWall = between < 100f; bool closeThroughWall = between < 100f;
if (((closest && inRange) || !foundTarget) && (lineOfSight || closeThroughWall)) { if (((!closest || !inRange) && foundTarget) || (!lineOfSight && !closeThroughWall)) continue;
distanceFromTarget = between; distanceFromTarget = between;
targetCenter = npc.Center; targetCenter = npc.Center;
foundTarget = true; foundTarget = true;
}
}
} }
} }
@@ -162,18 +157,20 @@ public class ToclafaneMinion : ModProjectile {
Projectile.velocity = (Projectile.velocity * (inertia - 1) + direction) / inertia; Projectile.velocity = (Projectile.velocity * (inertia - 1) + direction) / inertia;
} }
if (distanceFromTarget <= 120f) { switch (distanceFromTarget) {
attackMode = AttackMode.MELEE; case <= 120f:
} _attackMode = AttackMode.Melee;
break;
if (distanceFromTarget > 120f && shootCooldown == 0) { case > 120f when _shootCooldown == 0: {
shootCooldown = 60; // 1 second between shots _shootCooldown = 60; // 1 second between shots
Projectile laser = Projectile.NewProjectileDirect(player.GetSource_FromThis(), Projectile.Center, Projectile laser = Projectile.NewProjectileDirect(player.GetSource_FromThis(), Projectile.Center,
direction, ProjectileID.DeathLaser, 30, Projectile.knockBack, Projectile.owner); direction, ProjectileID.DeathLaser, 30, Projectile.knockBack, Projectile.owner);
laser.friendly = true; laser.friendly = true;
laser.hostile = false; laser.hostile = false;
laser.penetrate = 5; laser.penetrate = 5;
attackMode = AttackMode.RANGED; _attackMode = AttackMode.Ranged;
break;
}
} }
} }
else { else {
@@ -211,66 +208,61 @@ public class ToclafaneMinion : ModProjectile {
// So it will lean slightly towards the direction it's moving // So it will lean slightly towards the direction it's moving
Projectile.rotation = Projectile.velocity.X * 0.05f; Projectile.rotation = Projectile.velocity.X * 0.05f;
int frameSpeed = 8; const int frameSpeed = 8;
Projectile.frameCounter++; Projectile.frameCounter++;
if (Projectile.frameCounter >= frameSpeed) { if (Projectile.frameCounter >= frameSpeed) {
Projectile.frameCounter = 0; Projectile.frameCounter = 0;
if (attackMode == AttackMode.MELEE) { switch (_attackMode) {
switch (Projectile.frame) { case AttackMode.Melee:
case 0: switch (Projectile.frame) {
Projectile.frame++; case 0:
break; case 1:
case 1: case 2:
Projectile.frame++; Projectile.frame++;
break; break;
case 2: case 3:
Projectile.frame++; Projectile.frame = 0;
break; break;
case 3: case 4:
Projectile.frame = 0; Projectile.frame = 1;
break; break;
case 4: case 5:
Projectile.frame = 1; Projectile.frame = 2;
break; break;
case 5: case 6:
Projectile.frame = 2; Projectile.frame = 3;
break; break;
case 6: case 7:
Projectile.frame = 3; Projectile.frame = 4;
break; break;
case 7: }
Projectile.frame = 4;
break;
}
}
if (attackMode == AttackMode.RANGED) { break;
switch (Projectile.frame) { case AttackMode.Ranged:
case 0: switch (Projectile.frame) {
Projectile.frame = 5; case 0:
break; Projectile.frame = 5;
case 1: break;
Projectile.frame = 6; case 1:
break; Projectile.frame = 6;
case 2: break;
Projectile.frame = 7; case 2:
break; Projectile.frame = 7;
case 3: break;
Projectile.frame = 4; case 3:
break; Projectile.frame = 4;
case 4: break;
Projectile.frame++; case 4:
break; case 5:
case 5: case 6:
Projectile.frame++; Projectile.frame++;
break; break;
case 6: case 7:
Projectile.frame++; Projectile.frame = 4;
break; break;
case 7: }
Projectile.frame = 4;
break; break;
}
} }
} }
@@ -279,8 +271,8 @@ public class ToclafaneMinion : ModProjectile {
#endregion #endregion
} }
enum AttackMode { private enum AttackMode {
MELEE, Melee,
RANGED Ranged,
} }
} }
+21 -11
View File
@@ -1,14 +1,24 @@
using System.Collections.Generic;
using Terraria.ModLoader; using Terraria.ModLoader;
using YHTMod.Items;
namespace YHTMod { namespace YHTMod;
public class YHTMod : Mod {
private static YHTMod mod;
public YHTMod() {
mod = this;
}
public static YHTMod GetInstance() { public class YHTMod : Mod {
return mod; private static YHTMod _mod;
}
} public YHTMod() {
} _mod = this;
}
public static YHTMod GetInstance() {
return _mod;
}
public static HashSet<int> GetAmbitionItems() {
return [
ModContent.ItemType<SummonersAmbition>(),
ModContent.ItemType<WarriorsAmbition>()
];
}
}
+4 -4
View File
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\tModLoader.targets" /> <Import Project="..\tModLoader.targets" />
<PropertyGroup> <PropertyGroup>
<AssemblyName>YHTMod</AssemblyName> <AssemblyName>YHTMod</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="tModLoader.CodeAssist" Version="0.1.*" /> <Reference Include="CalamityMod">
<HintPath>..\ModAssemblies\CalamityMod_v2.0.7.2.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
</Project> </Project>
+152
View File
@@ -0,0 +1,152 @@
using System;
using System.Collections.Generic;
using Terraria.ModLoader;
using Terraria.ModLoader.IO;
using YHTMod.Buffs;
namespace YHTMod;
public class YhtPlayer : ModPlayer {
public int ArcaneMissile = 0;
public int KatanaTeleportCooldown = 0;
public int SummonerAmbitionDeerclopsCooldown = 0;
public int SummonerAmbitionPerforatorsCooldown = 0;
public int SummonerAmbitionHiveMindCooldown = 0;
public bool SummonerAmbition = false;
public bool WarriorAmbition = false;
/**
* Set of boss and event ids for unlocking perks from Summoner's Ambition accessory
*/
public HashSet<string> SummonerAmbitions = [];
public HashSet<string> WarriorAmbitions = [];
public override void PreUpdate() {
KatanaTeleportCooldown = Math.Max(KatanaTeleportCooldown - 1, 0);
SummonerAmbitionDeerclopsCooldown = Math.Max(SummonerAmbitionDeerclopsCooldown - 1, 0);
SummonerAmbitionPerforatorsCooldown = Math.Max(SummonerAmbitionPerforatorsCooldown - 1, 0);
SummonerAmbitionHiveMindCooldown = Math.Max(SummonerAmbitionHiveMindCooldown - 1, 0);
}
public override void PostUpdateEquips() {
if (SummonerAmbition) {
Player.AddBuff(ModContent.BuffType<SummonerAmbitionBuff>(), 1);
Player.maxMinions += GetSummonersAmbitionMinionBonus();
if (SummonerAmbitions.Contains("king_slime")) {
if (ModLoader.HasMod("CalamityMod")) {
Player.whipRangeMultiplier += 0.1f;
}
else {
Player.whipRangeMultiplier += 0.2f;
}
}
if (ModLoader.HasMod("CalamityMod") && SummonerAmbitions.Contains("desert_scourge")) {
Player.statLifeMax2 += 5;
}
if (SummonerAmbitions.Contains("eater_of_worlds")) {
Player.GetArmorPenetration(DamageClass.Summon) += 5;
}
if (SummonerAmbitions.Contains("brain_of_cthulhu")) {
Player.GetDamage(DamageClass.Summon) += 0.05f;
}
if (SummonerAmbitions.Contains("skeletron")) {
Player.GetKnockback(DamageClass.Summon) += 0.1f;
}
if (ModLoader.HasMod("CalamityMod") && SummonerAmbitions.Contains("slime_god")) {
Player.whipRangeMultiplier += 0.1f;
}
}
if (WarriorAmbition) {
Player.AddBuff(ModContent.BuffType<WarriorAmbitionBuff>(), 1);
Player.statDefense += GetWarriorsAmbitionDefenseBonus();
if (ModLoader.HasMod("CalamityMod") && SummonerAmbitions.Contains("desert_scourge")) {
Player.statLifeMax2 += 10;
}
}
}
public bool hasAmbitionEquipped() {
if (SummonerAmbition) return true;
if (WarriorAmbition) return true;
return false;
}
public override void ResetEffects() {
ArcaneMissile = 0;
SummonerAmbition = false;
WarriorAmbition = false;
base.ResetEffects();
}
public override void SaveData(TagCompound tag) {
tag["summonerAmbitions"] = new List<string>(SummonerAmbitions);
tag["warriorAmbitions"] = new List<string>(WarriorAmbitions);
}
public override void LoadData(TagCompound tag) {
if (tag.ContainsKey("summonerAmbitions")) {
IList<string> list = tag.GetList<string>("summonerAmbitions");
SummonerAmbitions = new HashSet<string>(list);
}
if (tag.ContainsKey("warriorAmbitions")) {
IList<string> warriorList = tag.GetList<string>("warriorAmbitions");
WarriorAmbitions = new HashSet<string>(warriorList);
}
}
public int GetSummonersAmbitionMinionBonus() {
int amount = 1;
if (SummonerAmbitions.Contains("wall_of_flesh")) {
amount += 1;
}
return amount;
}
public int GetWarriorsAmbitionDefenseBonus() {
int amount = 2;
if (ModLoader.HasMod("CalamityMod") && SummonerAmbitions.Contains("perforators")) {
amount += 2;
}
if (ModLoader.HasMod("CalamityMod") && SummonerAmbitions.Contains("hive_mind")) {
amount += 2;
}
if (WarriorAmbitions.Contains("wall_of_flesh")) {
amount += 5;
}
return amount;
}
public float GetWarriorsAmbitionMeleeSizeBonus() {
float scale = 1f;
if (WarriorAmbitions.Contains("king_slime")) {
if (ModLoader.HasMod("CalamityMod")) {
scale += 0.025f;
}
else {
scale += 0.05f;
}
}
if (ModLoader.HasMod("CalamityMod") && WarriorAmbitions.Contains("slime_god")) {
scale += 0.025f;
}
return scale;
}
}
+2 -1
View File
@@ -1,3 +1,4 @@
displayName = YHT Mod displayName = YHT Mod
author = YouHaveTrouble author = YouHaveTrouble
version = 1.0.1 version = 1.3.2
weakReferences = CalamityMod@2.0.0.0
+3 -1
View File
@@ -1,7 +1,9 @@
Bunch of random additions ranging from QoL to random references Bunch of random additions ranging from QoL to random references
All new content and changes are documented on the wiki.
Wiki: https://github.com/YouHaveTrouble/YHTMod/wiki Wiki: https://github.com/YouHaveTrouble/YHTMod/wiki
Source: https://github.com/YouHaveTrouble/YHTMod Source: https://github.com/YouHaveTrouble/YHTMod
Code: YouHaveTrouble Code: YouHaveTrouble
Sprites: YouHaveTrouble, Patrxon Sprites: YouHaveTrouble, Patrxon, SlyFox
+5 -1
View File
@@ -1,7 +1,11 @@
A bunch of random additions ranging from QoL to random references A bunch of random additions ranging from QoL to random references
Steam workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=2897350075
Mod wiki: https://github.com/YouHaveTrouble/YHTMod/wiki Mod wiki: https://github.com/YouHaveTrouble/YHTMod/wiki
Discussion discord: [![Discord](https://img.shields.io/discord/821565102108573706?style=flat-square&color=%237289da&label=Discord)](https://discord.gg/j8KK5dGBps)
Code: YouHaveTrouble Code: YouHaveTrouble
Sprites: YouHaveTrouble, Patrxon Sprites: YouHaveTrouble, Patrxon, SlyFox