0.2.0 commit

This commit is contained in:
mikx
2025-02-11 16:04:10 -05:00
commit b861945511
28 changed files with 843 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria;
namespace tMx.Content.Items.Materials
{
public class FrozenTablet : ModItem
{
public override void SetDefaults()
{
Item.ResearchUnlockCount = 666;
Item.value = Item.buyPrice(gold: 1);
Item.rare = ItemRarityID.Blue;
Item.material = true;
Item.maxStack = 666;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria;
namespace tMx.Content.Items.Materials
{
public class MoltenTablet : ModItem
{
public override void SetDefaults()
{
Item.ResearchUnlockCount = 666;
Item.value = Item.buyPrice(gold: 1);
Item.rare = ItemRarityID.Red;
Item.material = true;
Item.maxStack = 666;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

View File

@@ -0,0 +1,47 @@
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace tMx.Content.Items.Weapons.Boomrangs
{
public class MeteorHammer : ModItem
{
public override void SetDefaults()
{
Item.damage = 80;
Item.DamageType = DamageClass.Melee;
Item.width = 30;
Item.height = 30;
Item.useTime = 5;
Item.useAnimation = 10;
Item.noUseGraphic = true;
Item.useStyle = 1;
Item.knockBack = 3;
Item.value = 8;
Item.rare = ItemRarityID.Orange;
Item.shootSpeed = 12f;
Item.shoot = ModContent.ProjectileType<Content.Projectiles.MeteorHammerProjectile>();
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
}
public override void AddRecipes()
{
Recipe recipe = CreateRecipe();
recipe.AddIngredient(ItemID.DirtBlock, 10);
recipe.AddTile(TileID.WorkBenches);
recipe.Register();
}
public override bool CanUseItem(Player player) //this make that you can shoot only 1 boomerang at once
{
for (int i = 0; i < 1000; ++i)
{
if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == Item.shoot)
{
return false;
}
}
return true;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

37
Content/Items/tMxSword.cs Normal file
View File

@@ -0,0 +1,37 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace tMx.Content.Items
{
// This is a basic item template.
// Please see tModLoader's ExampleMod for every other example:
// https://github.com/tModLoader/tModLoader/tree/stable/ExampleMod
public class tMxSword : ModItem
{
// The Display Name and Tooltip of this item can be edited in the 'Localization/en-US_Mods.tMx.hjson' file.
public override void SetDefaults()
{
Item.damage = 50;
Item.DamageType = DamageClass.Melee;
Item.width = 40;
Item.height = 40;
Item.useTime = 20;
Item.useAnimation = 20;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 6;
Item.value = Item.buyPrice(silver: 1);
Item.rare = ItemRarityID.Blue;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
}
public override void AddRecipes()
{
Recipe recipe = CreateRecipe();
recipe.AddIngredient(ItemID.DirtBlock, 10);
recipe.AddTile(TileID.WorkBenches);
recipe.Register();
}
}
}

BIN
Content/Items/tMxSword.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B