Add Visor Shard and RGBAlloy, rework Pete
This commit is contained in:
@@ -4,6 +4,7 @@ using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using ForgottenWawiTech.Content.Rarities;
|
||||
|
||||
namespace ForgottenWawiTech.Content.Items
|
||||
{
|
||||
@@ -11,8 +12,8 @@ namespace ForgottenWawiTech.Content.Items
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 10000;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.damage = 1;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.width = 40;
|
||||
Item.height = 40;
|
||||
Item.useTime = 100;
|
||||
@@ -20,7 +21,7 @@ namespace ForgottenWawiTech.Content.Items
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.knockBack = 6;
|
||||
Item.value = Item.buyPrice(gold: 20);
|
||||
Item.rare = ItemRarityID.Red;
|
||||
Item.rare = ModContent.RarityType<FWTDeveloperItem>();
|
||||
Item.UseSound = SoundID.Dig;
|
||||
Item.autoReuse = true;
|
||||
Item.noMelee = true;
|
||||
@@ -32,29 +33,23 @@ namespace ForgottenWawiTech.Content.Items
|
||||
// On shoot, fire Projectile ID 502 (the rainbow projectile) instead of the default ammo projectile
|
||||
public override bool Shoot(Player player, Terraria.DataStructures.EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockBack)
|
||||
{
|
||||
// If the player's name contains "Neptune" or "Otter", instakill the player.
|
||||
if (player.name.Contains("Neptune") || player.name.Contains("Otter"))
|
||||
// Kill the first player with a name containing "Neptune" or "Otter" (case insensitive) in multiplayer
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
{
|
||||
player.KillMe(Terraria.DataStructures.PlayerDeathReason.ByCustomReason(player.name + " was punished accordingly."), 10000, 0);
|
||||
return false;
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
{
|
||||
Player targetPlayer = Main.player[i];
|
||||
if (targetPlayer.active && (targetPlayer.name.ToLower().Contains("neptune") || targetPlayer.name.ToLower().Contains("otter")))
|
||||
{
|
||||
targetPlayer.KillMe(Terraria.DataStructures.PlayerDeathReason.ByCustomReason($"{targetPlayer.name} was vaporized!"), 99999, 0);
|
||||
NetMessage.SendData(MessageID.PlayerDeath, -1, -1, null, i);
|
||||
break; // Only kill one player per shot
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Block the weapon if there is a boss alive
|
||||
/* for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
NPC npc = Main.npc[i];
|
||||
if (npc.active && npc.boss)
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
Main.NewText("The Boulder Cannon refuses to fire while a boss is alive!", 255, 0, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} */
|
||||
|
||||
Terraria.Projectile.NewProjectile(source, position, velocity, 1013, damage, knockBack, player.whoAmI);
|
||||
|
||||
// If no such player was found, suicide.
|
||||
player.KillMe(Terraria.DataStructures.PlayerDeathReason.ByCustomReason($"{player.name} was consumed by power!"), 99999, 0);
|
||||
return false; // return false to prevent tModLoader from shooting the default projectile
|
||||
}
|
||||
|
||||
@@ -69,14 +64,5 @@ namespace ForgottenWawiTech.Content.Items
|
||||
position += muzzleOffset;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe recipe = CreateRecipe();
|
||||
recipe.AddIngredient(ItemID.BouncyBoulder, 100);
|
||||
recipe.AddIngredient(ItemID.LunarBar, 20);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 504 B |
@@ -0,0 +1,17 @@
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace ForgottenWawiTech.Content.Items.Materials
|
||||
{
|
||||
public class RGBAlloy : ModItem
|
||||
{
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 20;
|
||||
Item.height = 20;
|
||||
Item.maxStack = 9999;
|
||||
Item.rare = ItemRarityID.White;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace ForgottenWawiTech.Content.Items.Materials
|
||||
{
|
||||
public class VisorShard : ModItem
|
||||
{
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 20;
|
||||
Item.height = 20;
|
||||
Item.maxStack = 9999;
|
||||
Item.rare = ItemRarityID.White;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 504 B |
Reference in New Issue
Block a user