Commit of decompiled and "updated" code.

This commit is contained in:
Big Duckie
2022-07-03 14:13:26 -06:00
parent 3d34e53842
commit e1441e74a5
731 changed files with 18423 additions and 0 deletions
+72
View File
@@ -0,0 +1,72 @@
using FabusMod.Projectiles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Ranged.Bows;
public class LunarBow : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Lunar Bow");
Tooltip.SetDefault("[c/B6FF00:Autoshoots, doesn't require ammo]\nGrants the [c/13A2DA:Shattered Moon's Grace] buff when shooting, reducing fall speed\nUsing <right> while under max HP grants the [c/5EDF85:Shattered Moon's Blessing] buff, which has the following effects:\n - Heals the player rapidly for 2 seconds, but disables the use of items\n - Grants [c/9CE53B:Shattered Moon's Rejuvenation] after 2 seconds, healing 100 HP over 10 seconds\n[c/5EDF85:Shattered Moon's Blessing] has a cooldown of [c/CA4646:50 seconds] once the effect ends");
}
public override void SetDefaults()
{
Item.damage = 240;
Item.width = 27;
Item.height = 69;
Item.useTime = 9;
Item.useAnimation = 9;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 0f;
Item.value = Item.sellPrice(0, 15, 60, 0);
Item.expert = true;
Item.UseSound = SoundID.Item5;
Item.autoReuse = true;
Item.shootSpeed = 50f;
Item.shoot = ModContent.ProjectileType<LunarBolt>();
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse == 2)
{
if (!player.HasBuff(ModContent.BuffType<Buffs.LunarBow.ShatteredMoonsCurse>()) && player.statLife < player.statLifeMax2)
{
player.AddBuff(ModContent.BuffType<Buffs.LunarBow.ShatteredMoonsBlessing>(), 140, true);
}
player.AddBuff(ModContent.BuffType<Buffs.LunarBow.ShatteredMoonsGrace>(), 10, true);
}
else
{
player.AddBuff(ModContent.BuffType<Buffs.LunarBow.ShatteredMoonsGrace>(), 10, true);
}
return true;
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(4f, 0f);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ItemID.LifeFruit, 5);
val.AddIngredient(ItemID.LifeCrystal, 5);
val.AddIngredient(ItemID.FragmentVortex, 14);
val.AddTile(TileID.LunarCraftingStation);
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

+71
View File
@@ -0,0 +1,71 @@
using FabusMod.Projectiles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Ranged.Bows;
public class LunarRainBow : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Lunar Rain-Bow");
Tooltip.SetDefault("[c/B6FF00:Autoshoots, doesn't require ammo]\nGrants the [c/E6A6CF:Spectral Moon's Grace] buff when shooting, reducing fall speed and nullifying knockback \nUsing <right> while under max HP grants the [c/82E8E8:Spectral Moonlight] buff, which has the following effects:\n - Heals the player rapidly for 2 seconds and grants immunity, but disables the use of items\n - Grants [c/6DE5D8:Spectral Moon's Rejuvenation] after 2 seconds, healing 200 HP over 10 seconds and increasing ranged crit rate by 60\n[c/82E8E8:Spectral Moonlight] has a cooldown of [c/BF5E3B:50 seconds] once the effect ends");
}
public override void SetDefaults()
{
Item.damage = 320;
Item.width = 27;
Item.height = 69;
Item.useTime = 7;
Item.useAnimation = 7;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 0f;
Item.value = Item.sellPrice(2, 70, 0, 0);
Item.expert = true;
Item.UseSound = SoundID.Item5;
Item.autoReuse = true;
Item.shootSpeed = 50f;
Item.shoot = ModContent.ProjectileType<SpectralMoonBolt>();
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse == 2)
{
if (!player.HasBuff(ModContent.BuffType<Buffs.LunarBow.SpectralMoonsCurse>()) && player.statLife < player.statLifeMax2)
{
player.AddBuff(ModContent.BuffType<Buffs.LunarBow.SpectralMoonlight>(), 140, true);
}
player.AddBuff(ModContent.BuffType<Buffs.LunarBow.SpectralMoonsGrace>(), 10, true);
}
else
{
player.AddBuff(ModContent.BuffType<Buffs.LunarBow.SpectralMoonsGrace>(), 10, true);
}
return true;
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(4f, 0f);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<LunarBow>());
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 14);
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

+60
View File
@@ -0,0 +1,60 @@
using FabusMod.Projectiles.Arrows;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Ranged.Bows;
public class PiercingBow : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Piercing Bow");
Tooltip.SetDefault("Converts Wooden Arrows into Piercing Arrows");
}
public override void SetDefaults()
{
Item.damage = 10;
Item.width = 18;
Item.height = 32;
Item.useTime = 27;
Item.useAnimation = 27;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 2f;
Item.value = Item.sellPrice(0, 0, 15, 0);
Item.rare = ItemRarityID.White;
Item.UseSound = SoundID.Item5;
Item.autoReuse = false;
Item.shoot = ProjectileID.PurificationPowder;
Item.shootSpeed = 7f;
Item.useAmmo = AmmoID.Arrow;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (type == 1)
{
type = ModContent.ProjectileType<PiercingArrow>();
}
return true;
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ItemID.WoodenBow, 1);
val.AddIngredient(ItemID.IronBow, 1);
val.AddTile(TileID.Anvils);
val.Register();
Recipe val2 = CreateRecipe();
val2.AddIngredient(ItemID.WoodenBow, 1);
val2.AddIngredient(ItemID.LeadBow, 1);
val2.AddTile(TileID.Anvils);
val2.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

@@ -0,0 +1,70 @@
using FabusMod.Projectiles.Arrows;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows;
public class DemonsBow : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Demon's Bow");
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots Hellfire Arrows (except with <right>) \nPressing <right> fires 6 demonic arrows in quick succession, but it has lower damage and a 2 second cooldown");
}
public override void SetDefaults()
{
Item.damage = 34;
Item.width = 18;
Item.height = 38;
Item.useTime = 16;
Item.useAnimation = 16;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 3f;
Item.value = Item.sellPrice(0, 3, 0, 0);
Item.expert = true;
Item.UseSound = SoundID.Item5;
Item.autoReuse = true;
Item.shootSpeed = 16f;
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
Item.useStyle = ItemUseStyleID.Shoot;
Item.useTime = 4;
Item.useAnimation = 24;
Item.damage = 30;
Item.reuseDelay = 60;
Item.shoot = ModContent.ProjectileType<DemonArrow>();
}
else
{
Item.reuseDelay = 0;
Item.useStyle = ItemUseStyleID.Shoot;
Item.useTime = 16;
Item.useAnimation = 16;
Item.damage = 34;
Item.shoot = ProjectileID.HellfireArrow;
}
return CanUseItem(player);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<StormBow>());
val.AddIngredient(ModContent.ItemType<StonePlatedBow>());
val.AddIngredient(ItemID.HellstoneBar, 6);
val.AddTile(TileID.Anvils);
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

@@ -0,0 +1,69 @@
using FabusMod.Projectiles.Arrows;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows;
public class GoldenKabuki : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Golden Kabuki");
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots Holy Arrows (except with <right>) \nPressing <right> fires 16 spiritual, golden arrows in quick succession, but it has lower damage and a 1 second cooldown");
}
public override void SetDefaults()
{
Item.damage = 58;
Item.width = 18;
Item.height = 38;
Item.useTime = 12;
Item.useAnimation = 12;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 3f;
Item.value = Item.sellPrice(0, 22, 0, 0);
Item.expert = true;
Item.UseSound = SoundID.Item5;
Item.autoReuse = true;
Item.shootSpeed = 18f;
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
Item.useStyle = ItemUseStyleID.Shoot;
Item.useTime = 2;
Item.useAnimation = 32;
Item.damage = 54;
Item.reuseDelay = 30;
Item.shoot = ModContent.ProjectileType<GoldenSpiritArrow>();
}
else
{
Item.reuseDelay = 0;
Item.useStyle = ItemUseStyleID.Shoot;
Item.useTime = 12;
Item.useAnimation = 12;
Item.damage = 58;
Item.shoot = ProjectileID.HolyArrow;
}
return CanUseItem(player);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<Kabuki>());
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6);
val.AddTile(TileID.MythrilAnvil);
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

@@ -0,0 +1,69 @@
using FabusMod.Projectiles.Arrows;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows;
public class Kabuki : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Kabuki");
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots Hellfire Arrows (except with <right>) \nPressing <right> fires 8 demonic arrows in quick succession, but it has lower damage and a 1.2 second cooldown");
}
public override void SetDefaults()
{
Item.damage = 42;
Item.width = 18;
Item.height = 38;
Item.useTime = 14;
Item.useAnimation = 14;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 3f;
Item.value = Item.sellPrice(0, 5, 40, 0);
Item.expert = true;
Item.UseSound = SoundID.Item5;
Item.autoReuse = true;
Item.shootSpeed = 18f;
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
Item.useStyle = ItemUseStyleID.Shoot;
Item.useTime = 3;
Item.useAnimation = 24;
Item.damage = 38;
Item.reuseDelay = 36;
Item.shoot = ModContent.ProjectileType<DemonArrow>();
}
else
{
Item.reuseDelay = 0;
Item.useStyle = ItemUseStyleID.Shoot;
Item.useTime = 14;
Item.useAnimation = 14;
Item.damage = 42;
Item.shoot = ProjectileID.HellfireArrow;
}
return CanUseItem(player);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<DemonsBow>());
val.AddIngredient(ItemID.HallowedBar, 6);
val.AddTile(TileID.MythrilAnvil);
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

@@ -0,0 +1,69 @@
using FabusMod.Projectiles.Arrows;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows;
public class RainBow : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Rain-Bow");
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots two Rainbow Arrows in quick succession (except with <right>) \nPressing <right> fires 18 Holy Arrows in quick succession, but it has lower damage and a 1 second cooldown");
}
public override void SetDefaults()
{
Item.damage = 90;
Item.width = 30;
Item.height = 50;
Item.useTime = 3;
Item.useAnimation = 6;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 3f;
Item.value = Item.sellPrice(1, 50, 0, 0);
Item.expert = true;
Item.UseSound = SoundID.Item5;
Item.autoReuse = true;
Item.shootSpeed = 20f;
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
Item.useStyle = ItemUseStyleID.Shoot;
Item.useTime = 2;
Item.useAnimation = 40;
Item.damage = 84;
Item.reuseDelay = 30;
Item.shoot = ProjectileID.HolyArrow;
}
else
{
Item.reuseDelay = 0;
Item.useStyle = ItemUseStyleID.Shoot;
Item.useTime = 3;
Item.useAnimation = 6;
Item.damage = 90;
Item.shoot = ModContent.ProjectileType<RainbowArrow>();
}
return CanUseItem(player);
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<GoldenKabuki>());
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 6);
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

@@ -0,0 +1,41 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows;
public class StonePlatedBow : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Stone-Plated Bow");
Tooltip.SetDefault("Doesn't use ammo\nAlways shoots Wooden Arrows");
}
public override void SetDefaults()
{
Item.damage = 5;
Item.width = 18;
Item.height = 38;
Item.useTime = 32;
Item.useAnimation = 32;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 0f;
Item.value = Item.sellPrice(0, 0, 5, 60);
Item.UseSound = SoundID.Item5;
Item.autoReuse = false;
Item.shootSpeed = 9f;
Item.shoot = ProjectileID.WoodenArrowFriendly;
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<Items.WeaponParts.UntreatedBowPart>(), 2);
val.AddIngredient(ItemID.StoneBlock, 4);
val.AddIngredient(ItemID.FallenStar, 1);
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.ReinforcedWorkBench>());
val.Register();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

@@ -0,0 +1,60 @@
using FabusMod.Projectiles.Arrows;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows;
public class StormBow : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Storm Bow");
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots Wooden Arrows (except with <right>) \nPressing <right> fires 6 Storm Arrows in quick succession, but it has lower damage and a 3 second cooldown");
}
public override void SetDefaults()
{
Item.damage = 24;
Item.width = 18;
Item.height = 38;
Item.useTime = 18;
Item.useAnimation = 18;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 2f;
Item.value = Item.sellPrice(0, 0, 60, 0);
Item.expert = true;
Item.UseSound = SoundID.Item5;
Item.autoReuse = true;
Item.shootSpeed = 16f;
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
Item.useStyle = ItemUseStyleID.Shoot;
Item.useTime = 4;
Item.useAnimation = 24;
Item.damage = 24;
Item.reuseDelay = 90;
Item.shoot = ModContent.ProjectileType<StormArrow>();
}
else
{
Item.reuseDelay = 0;
Item.useStyle = ItemUseStyleID.Shoot;
Item.useTime = 18;
Item.useAnimation = 18;
Item.damage = 28;
Item.shoot = ProjectileID.WoodenArrowFriendly;
}
return CanUseItem(player);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B