diff --git a/Changes/NPCLoot.cs b/Changes/NPCLoot.cs new file mode 100644 index 0000000..c2c0a66 --- /dev/null +++ b/Changes/NPCLoot.cs @@ -0,0 +1,19 @@ + +using Terraria; +using Terraria.GameContent.ItemDropRules; +using Terraria.ID; +using Terraria.ModLoader; +using YHTMod.Items; + + +namespace YHTMod.Changes; + +public class NpcLoot : GlobalNPC +{ + public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot) { + int id = npc.type; + if (NPCID.Sets.CountsAsCritter[id]) { + npcLoot.Add(ItemDropRule.Common(ModContent.ItemType(), 400, 1, 1)); + } + } +} \ No newline at end of file diff --git a/Items/CopperSwordOnAStick.cs b/Items/CopperSwordOnAStick.cs new file mode 100644 index 0000000..3376e81 --- /dev/null +++ b/Items/CopperSwordOnAStick.cs @@ -0,0 +1,42 @@ +using Terraria.GameContent.Creative; +using Terraria.ID; +using Terraria.ModLoader; +using YHTMod.Projectiles.Weapons; + +namespace YHTMod.Items; + +public class CopperSwordOnAStick : ModItem { + public override void SetStaticDefaults() { + DisplayName.SetDefault("Copper Sword On A Stick"); + CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1; + } + + public override void SetDefaults() { + Item.DamageType = DamageClass.Melee; + Item.damage = 3; + Item.width = 80; + Item.height = 80; + Item.useTime = 7; + Item.useAnimation = 7; + Item.useStyle = ItemUseStyleID.Rapier; + Item.knockBack = 2f; + Item.value = 100; + Item.rare = ItemRarityID.White; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + Item.crit = 1; + Item.noMelee = true; + Item.noUseGraphic = true; + + Item.shootSpeed = 1f; + Item.shoot = ModContent.ProjectileType(); + } + + public override void AddRecipes() { + CreateRecipe() + .AddIngredient(ItemID.Wood, 5) + .AddIngredient(ItemID.Rope, 5) + .AddIngredient(ItemID.CopperShortsword) + .Register(); + } +} \ No newline at end of file diff --git a/Items/CopperSwordOnAStick.png b/Items/CopperSwordOnAStick.png new file mode 100644 index 0000000..c6247a4 Binary files /dev/null and b/Items/CopperSwordOnAStick.png differ diff --git a/Items/MithrilPebbleOfPigSmiting.cs b/Items/MithrilPebbleOfPigSmiting.cs new file mode 100644 index 0000000..d2dd63f --- /dev/null +++ b/Items/MithrilPebbleOfPigSmiting.cs @@ -0,0 +1,47 @@ +using Terraria.GameContent.Creative; +using Terraria.ID; +using Terraria.ModLoader; +using YHTMod.Projectiles.Weapons; + +namespace YHTMod.Items; + +public class MithrilPebbleOfPigSmiting : ModItem { + 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 black smith 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 battle feild 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; + } + + public override void SetDefaults() { + Item.DamageType = DamageClass.Ranged; + Item.damage = 16; + Item.width = 8; + Item.height = 8; + Item.useTime = 20; + Item.useAnimation = 20; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 2f; + Item.value = 100; + Item.rare = ItemRarityID.Green; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + Item.crit = 2; + Item.noMelee = true; + Item.noUseGraphic = true; + + Item.shootSpeed = 20f; + Item.shoot = ModContent.ProjectileType(); + } +} \ No newline at end of file diff --git a/Items/MithrilPebbleOfPigSmiting.png b/Items/MithrilPebbleOfPigSmiting.png new file mode 100644 index 0000000..da1645e Binary files /dev/null and b/Items/MithrilPebbleOfPigSmiting.png differ diff --git a/Projectiles/Weapons/CopperSwordOnAStickProjectile.cs b/Projectiles/Weapons/CopperSwordOnAStickProjectile.cs new file mode 100644 index 0000000..f1c4b06 --- /dev/null +++ b/Projectiles/Weapons/CopperSwordOnAStickProjectile.cs @@ -0,0 +1,32 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace YHTMod.Projectiles.Weapons; + +class CopperSwordOnAStickProjectile : ModProjectile { + public override void SetDefaults() { + Projectile.width = 80; + Projectile.height = 80; + + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.DamageType = DamageClass.Melee; + Projectile.ownerHitCheck = true; + Projectile.extraUpdates = 1; + Projectile.timeLeft = 300; + Projectile.aiStyle = ProjAIStyleID.ShortSword; + } + + public override void AI() { + base.AI(); + float random = (float) (Random.Shared.NextDouble() / 5f); + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2 - MathHelper.PiOver4 * Projectile.spriteDirection; + Projectile.rotation += random; + DrawOriginOffsetX = 0; + DrawOffsetX = 0; + } +} \ No newline at end of file diff --git a/Projectiles/Weapons/CopperSwordOnAStickProjectile.png b/Projectiles/Weapons/CopperSwordOnAStickProjectile.png new file mode 100644 index 0000000..c99de4c Binary files /dev/null and b/Projectiles/Weapons/CopperSwordOnAStickProjectile.png differ diff --git a/Projectiles/Weapons/MithrilPebbleOfPigSmitingProjectile.cs b/Projectiles/Weapons/MithrilPebbleOfPigSmitingProjectile.cs new file mode 100644 index 0000000..61a292d --- /dev/null +++ b/Projectiles/Weapons/MithrilPebbleOfPigSmitingProjectile.cs @@ -0,0 +1,31 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace YHTMod.Projectiles.Weapons; + +class MithrilPebbleOfPigSmitingProjectile : ModProjectile { + public override void SetDefaults() { + Projectile.width = 8; + Projectile.height = 8; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.tileCollide = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.ownerHitCheck = true; + Projectile.extraUpdates = 1; + Projectile.timeLeft = 300; + Projectile.aiStyle = ProjAIStyleID.ThrownProjectile; + Projectile.light = 0.3f; + } + + public override void AI() { + base.AI(); + DrawOriginOffsetX = 0; + DrawOffsetX = 0; + int dust = Dust.NewDust(Projectile.Center, 1, 1, DustID.Mythril, 0f, 0f, 0, default(Color), 1f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 0.3f; + } +} \ No newline at end of file diff --git a/Projectiles/Weapons/MithrilPebbleOfPigSmitingProjectile.png b/Projectiles/Weapons/MithrilPebbleOfPigSmitingProjectile.png new file mode 100644 index 0000000..da1645e Binary files /dev/null and b/Projectiles/Weapons/MithrilPebbleOfPigSmitingProjectile.png differ diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json new file mode 100644 index 0000000..8da89ff --- /dev/null +++ b/Properties/launchSettings.json @@ -0,0 +1,16 @@ +{ + "profiles": { + "Terraria": { + "commandName": "Executable", + "executablePath": "dotnet", + "commandLineArgs": "$(tMLPath)", + "workingDirectory": "$(tMLSteamPath)" + }, + "TerrariaServer": { + "commandName": "Executable", + "executablePath": "dotnet", + "commandLineArgs": "$(tMLServerPath)", + "workingDirectory": "$(tMLSteamPath)" + } + } +} \ No newline at end of file diff --git a/YHTMod.cs b/YHTMod.cs new file mode 100644 index 0000000..de157c4 --- /dev/null +++ b/YHTMod.cs @@ -0,0 +1,9 @@ +using Terraria.ModLoader; + +namespace YHTMod { + public class YHTMod : Mod { + public YHTMod() { + + } + } +} \ No newline at end of file diff --git a/YHTMod.csproj b/YHTMod.csproj new file mode 100644 index 0000000..2f6bba4 --- /dev/null +++ b/YHTMod.csproj @@ -0,0 +1,13 @@ + + + + + YHTMod + net6.0 + AnyCPU + latest + + + + + \ No newline at end of file diff --git a/build.txt b/build.txt new file mode 100644 index 0000000..c933a4f --- /dev/null +++ b/build.txt @@ -0,0 +1,3 @@ +displayName = YHT Mod +author = YouHaveTrouble +version = 0.1 \ No newline at end of file diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..44b3632 --- /dev/null +++ b/description.txt @@ -0,0 +1 @@ +Bunch of random additions ranging from QoL to random references \ No newline at end of file diff --git a/global.json b/global.json new file mode 100644 index 0000000..87932f4 --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "rollForward": "latestMajor", + "allowPrerelease": true + } +} \ No newline at end of file diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..707e835 Binary files /dev/null and b/icon.png differ