mirror of
https://github.com/YouHaveTrouble/YHTMod.git
synced 2026-05-12 05:56:56 +00:00
Merge branch 'master' of https://github.com/YouHaveTrouble/YHTMod into feat-thekey
This commit is contained in:
@@ -39,4 +39,4 @@ public class CopperSwordOnAStick : ModItem {
|
||||
.AddIngredient(ItemID.CopperShortsword)
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
-10
@@ -10,19 +10,16 @@ public class KatanaRedo : GlobalItem {
|
||||
|
||||
public override void ModifyTooltips(Item item, List<TooltipLine> tooltips)
|
||||
{
|
||||
if (item.type == ItemID.Katana) {
|
||||
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."));
|
||||
}
|
||||
|
||||
if (item.type != ItemID.Katana) return;
|
||||
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."));
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Item item, Player player) {
|
||||
if (item.type == ItemID.Katana) {
|
||||
return true;
|
||||
if (item.type != ItemID.Katana) {
|
||||
return base.AltFunctionUse(item, player);
|
||||
}
|
||||
|
||||
return base.AltFunctionUse(item, player);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool? UseItem(Item item, Player player) {
|
||||
@@ -52,4 +49,4 @@ public class KatanaRedo : GlobalItem {
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,4 +44,4 @@ public class MithrilPebbleOfPigSmiting : ModItem {
|
||||
Item.shootSpeed = 20f;
|
||||
Item.shoot = ModContent.ProjectileType<MithrilPebbleOfPigSmitingProjectile>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Creative;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using YHTMod.Buffs;
|
||||
using YHTMod.Projectiles.Weapons;
|
||||
|
||||
namespace YHTMod.Items;
|
||||
|
||||
public class ToclafaneStaff : ModItem {
|
||||
|
||||
public override void SetStaticDefaults() {
|
||||
DisplayName.SetDefault("Toclafane Staff");
|
||||
Tooltip.SetDefault("Summons a toclafane to remove population for you");
|
||||
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;
|
||||
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
|
||||
}
|
||||
|
||||
public override void SetDefaults() {
|
||||
Item.damage = 30;
|
||||
Item.knockBack = 3f;
|
||||
Item.mana = 10;
|
||||
Item.width = 32;
|
||||
Item.height = 32;
|
||||
Item.useTime = 36;
|
||||
Item.useAnimation = 36;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.value = Item.buyPrice(0, 30, 0, 0);
|
||||
Item.rare = ItemRarityID.Cyan;
|
||||
Item.UseSound = SoundID.Item44;
|
||||
Item.noMelee = true;
|
||||
Item.DamageType = DamageClass.Summon;
|
||||
Item.buffType = ModContent.BuffType<ToclafaneMinionBuff>();
|
||||
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) {
|
||||
player.AddBuff(Item.buffType, 2);
|
||||
position = Main.MouseWorld;
|
||||
return base.Shoot(player, source, position, velocity, type, damage, knockback);
|
||||
}
|
||||
|
||||
public override void AddRecipes() {
|
||||
CreateRecipe()
|
||||
.AddIngredient(ItemID.GuideVoodooDoll, 1)
|
||||
.AddIngredient(ItemID.HallowedBar, 15)
|
||||
.AddIngredient(ItemID.CopperWatch)
|
||||
.AddTile(TileID.MythrilAnvil)
|
||||
.Register();
|
||||
CreateRecipe()
|
||||
.AddIngredient(ItemID.GuideVoodooDoll, 1)
|
||||
.AddIngredient(ItemID.HallowedBar, 15)
|
||||
.AddIngredient(ItemID.TinWatch)
|
||||
.AddTile(TileID.MythrilAnvil)
|
||||
.Register();
|
||||
CreateRecipe()
|
||||
.AddIngredient(ItemID.GuideVoodooDoll, 1)
|
||||
.AddIngredient(ItemID.HallowedBar, 15)
|
||||
.AddIngredient(ItemID.SilverWatch)
|
||||
.AddTile(TileID.MythrilAnvil)
|
||||
.Register();
|
||||
CreateRecipe()
|
||||
.AddIngredient(ItemID.GuideVoodooDoll, 1)
|
||||
.AddIngredient(ItemID.HallowedBar, 15)
|
||||
.AddIngredient(ItemID.TungstenWatch)
|
||||
.AddTile(TileID.MythrilAnvil)
|
||||
.Register();
|
||||
CreateRecipe()
|
||||
.AddIngredient(ItemID.GuideVoodooDoll, 1)
|
||||
.AddIngredient(ItemID.HallowedBar, 15)
|
||||
.AddTile(TileID.MythrilAnvil)
|
||||
.AddIngredient(ItemID.GoldWatch)
|
||||
.Register();
|
||||
CreateRecipe()
|
||||
.AddIngredient(ItemID.GuideVoodooDoll, 1)
|
||||
.AddIngredient(ItemID.HallowedBar, 15)
|
||||
.AddIngredient(ItemID.PlatinumWatch)
|
||||
.AddTile(TileID.MythrilAnvil)
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 338 B |
Reference in New Issue
Block a user