fix: Fixes LearnAllRecipes (#1104)
This commit is contained in:
parent
31fb29cf0b
commit
a9f7f2b7e9
13 changed files with 4357 additions and 4346 deletions
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using Server.Commands;
|
using Server.Commands;
|
||||||
using Server.Factions;
|
using Server.Factions;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
|
using Server.Logging;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
using Server.Utilities;
|
using Server.Utilities;
|
||||||
|
|
||||||
|
|
@ -25,6 +26,8 @@ namespace Server.Engines.Craft
|
||||||
|
|
||||||
public class CraftItem
|
public class CraftItem
|
||||||
{
|
{
|
||||||
|
private static readonly ILogger logger = LogFactory.GetLogger(typeof(CraftItem));
|
||||||
|
|
||||||
private static readonly Dictionary<Type, int> _itemIds = new();
|
private static readonly Dictionary<Type, int> _itemIds = new();
|
||||||
|
|
||||||
private static readonly int[] m_HeatSources =
|
private static readonly int[] m_HeatSources =
|
||||||
|
|
@ -174,8 +177,8 @@ namespace Server.Engines.Craft
|
||||||
{
|
{
|
||||||
if (Recipe != null)
|
if (Recipe != null)
|
||||||
{
|
{
|
||||||
Console.WriteLine(
|
logger.Warning(
|
||||||
"Warning: Attempted add of recipe #{0} to the crafting of {1} in CraftSystem {2}.",
|
"Attempted add of recipe #{Id} to the crafting of {ItemTypeName} in CraftSystem {CraftSystem}.",
|
||||||
id,
|
id,
|
||||||
ItemType.Name,
|
ItemType.Name,
|
||||||
system
|
system
|
||||||
|
|
@ -190,16 +193,7 @@ namespace Server.Engines.Craft
|
||||||
{
|
{
|
||||||
var number = ItemIDOf(type);
|
var number = ItemIDOf(type);
|
||||||
|
|
||||||
if (number >= 0x4000)
|
return number + (number >= 0x4000 ? 1078872 : 1020000);
|
||||||
{
|
|
||||||
number += 1078872;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
number += 1020000;
|
|
||||||
}
|
|
||||||
|
|
||||||
return number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int ItemIDOf(Type type)
|
public static int ItemIDOf(Type type)
|
||||||
|
|
|
||||||
|
|
@ -3,99 +3,96 @@ using System.Collections.Generic;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
using Server.Targeting;
|
using Server.Targeting;
|
||||||
|
|
||||||
namespace Server.Engines.Craft
|
namespace Server.Engines.Craft;
|
||||||
|
|
||||||
|
public class Recipe
|
||||||
{
|
{
|
||||||
public class Recipe
|
private TextDefinition _td;
|
||||||
|
|
||||||
|
public Recipe(int id, CraftSystem system, CraftItem item)
|
||||||
{
|
{
|
||||||
private TextDefinition m_TD;
|
ID = id;
|
||||||
|
CraftSystem = system;
|
||||||
|
CraftItem = item;
|
||||||
|
|
||||||
public Recipe(int id, CraftSystem system, CraftItem item)
|
if (!Recipes.TryAdd(id, this))
|
||||||
{
|
{
|
||||||
ID = id;
|
throw new Exception("Attempting to create recipe with preexisting ID.");
|
||||||
CraftSystem = system;
|
}
|
||||||
CraftItem = item;
|
|
||||||
|
|
||||||
if (Recipes.ContainsKey(id))
|
LargestRecipeID = Math.Max(id, LargestRecipeID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Dictionary<int, Recipe> Recipes { get; } = new();
|
||||||
|
|
||||||
|
public static int LargestRecipeID { get; private set; }
|
||||||
|
|
||||||
|
public CraftSystem CraftSystem { get; set; }
|
||||||
|
|
||||||
|
public CraftItem CraftItem { get; set; }
|
||||||
|
|
||||||
|
public int ID { get; }
|
||||||
|
|
||||||
|
public TextDefinition TextDefinition => _td ??= new TextDefinition(CraftItem.NameNumber, CraftItem.NameString);
|
||||||
|
|
||||||
|
public static void Initialize()
|
||||||
|
{
|
||||||
|
CommandSystem.Register("LearnAllRecipes", AccessLevel.GameMaster, LearnAllRecipes_OnCommand);
|
||||||
|
CommandSystem.Register("ForgetAllRecipes", AccessLevel.GameMaster, ForgetAllRecipes_OnCommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Usage("LearnAllRecipes"), Description("Teaches a player all available recipes.")]
|
||||||
|
private static void LearnAllRecipes_OnCommand(CommandEventArgs e)
|
||||||
|
{
|
||||||
|
var m = e.Mobile;
|
||||||
|
m.SendMessage("Target a player to teach them all of the recipes.");
|
||||||
|
|
||||||
|
m.BeginTarget(
|
||||||
|
-1,
|
||||||
|
false,
|
||||||
|
TargetFlags.None,
|
||||||
|
(from, targeted) =>
|
||||||
{
|
{
|
||||||
throw new Exception("Attempting to create recipe with preexisting ID.");
|
if (targeted is PlayerMobile mobile)
|
||||||
|
{
|
||||||
|
foreach (var kvp in Recipes)
|
||||||
|
{
|
||||||
|
mobile.AcquireRecipe(kvp.Key);
|
||||||
|
}
|
||||||
|
|
||||||
|
from.SendMessage("You teach them all of the recipes.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
from.SendMessage("That is not a player!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Recipes.Add(id, this);
|
[Usage("ForgetAllRecipes"), Description("Makes a player forget all the recipes they've learned.")]
|
||||||
LargestRecipeID = Math.Max(id, LargestRecipeID);
|
private static void ForgetAllRecipes_OnCommand(CommandEventArgs e)
|
||||||
}
|
{
|
||||||
|
var m = e.Mobile;
|
||||||
|
m.SendMessage("Target a player to have them forget all of the recipes they've learned.");
|
||||||
|
|
||||||
public static Dictionary<int, Recipe> Recipes { get; } = new();
|
m.BeginTarget(
|
||||||
|
-1,
|
||||||
public static int LargestRecipeID { get; private set; }
|
false,
|
||||||
|
TargetFlags.None,
|
||||||
public CraftSystem CraftSystem { get; set; }
|
(from, targeted) =>
|
||||||
|
{
|
||||||
public CraftItem CraftItem { get; set; }
|
if (targeted is PlayerMobile mobile)
|
||||||
|
|
||||||
public int ID { get; }
|
|
||||||
|
|
||||||
public TextDefinition TextDefinition =>
|
|
||||||
m_TD ?? (m_TD = new TextDefinition(CraftItem.NameNumber, CraftItem.NameString));
|
|
||||||
|
|
||||||
public static void Initialize()
|
|
||||||
{
|
|
||||||
CommandSystem.Register("LearnAllRecipes", AccessLevel.GameMaster, LearnAllRecipes_OnCommand);
|
|
||||||
CommandSystem.Register("ForgetAllRecipes", AccessLevel.GameMaster, ForgetAllRecipes_OnCommand);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Usage("LearnAllRecipes"), Description("Teaches a player all available recipes.")]
|
|
||||||
private static void LearnAllRecipes_OnCommand(CommandEventArgs e)
|
|
||||||
{
|
|
||||||
var m = e.Mobile;
|
|
||||||
m.SendMessage("Target a player to teach them all of the recipes.");
|
|
||||||
|
|
||||||
m.BeginTarget(
|
|
||||||
-1,
|
|
||||||
false,
|
|
||||||
TargetFlags.None,
|
|
||||||
(from, targeted) =>
|
|
||||||
{
|
{
|
||||||
if (targeted is PlayerMobile mobile)
|
mobile.ResetRecipes();
|
||||||
{
|
|
||||||
foreach (var kvp in Recipes)
|
|
||||||
{
|
|
||||||
mobile.AcquireRecipe(kvp.Key);
|
|
||||||
}
|
|
||||||
|
|
||||||
from.SendMessage("You teach them all of the recipes.");
|
from.SendMessage("They forget all their recipes.");
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
from.SendMessage("That is not a player!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
else
|
||||||
}
|
|
||||||
|
|
||||||
[Usage("ForgetAllRecipes"), Description("Makes a player forget all the recipes they've learned.")]
|
|
||||||
private static void ForgetAllRecipes_OnCommand(CommandEventArgs e)
|
|
||||||
{
|
|
||||||
var m = e.Mobile;
|
|
||||||
m.SendMessage("Target a player to have them forget all of the recipes they've learned.");
|
|
||||||
|
|
||||||
m.BeginTarget(
|
|
||||||
-1,
|
|
||||||
false,
|
|
||||||
TargetFlags.None,
|
|
||||||
(from, targeted) =>
|
|
||||||
{
|
{
|
||||||
if (targeted is PlayerMobile mobile)
|
from.SendMessage("That is not a player!");
|
||||||
{
|
|
||||||
mobile.ResetRecipes();
|
|
||||||
|
|
||||||
from.SendMessage("They forget all their recipes.");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
from.SendMessage("That is not a player!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
}
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,315 +1,317 @@
|
||||||
using System;
|
using System;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
|
|
||||||
namespace Server.Engines.Craft
|
namespace Server.Engines.Craft;
|
||||||
|
|
||||||
|
public class DefAlchemy : CraftSystem
|
||||||
{
|
{
|
||||||
public class DefAlchemy : CraftSystem
|
private static readonly Type typeofPotion = typeof(BasePotion);
|
||||||
|
|
||||||
|
public static void Configure()
|
||||||
{
|
{
|
||||||
private static CraftSystem m_CraftSystem;
|
CraftSystem = new DefAlchemy();
|
||||||
|
}
|
||||||
|
|
||||||
private static readonly Type typeofPotion = typeof(BasePotion);
|
private DefAlchemy() : base(1, 1, 1.25)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
private DefAlchemy() : base(1, 1, 1.25) // base( 1, 1, 3.1 )
|
public override SkillName MainSkill => SkillName.Alchemy;
|
||||||
|
|
||||||
|
public override TextDefinition GumpTitle => 1044001;
|
||||||
|
|
||||||
|
public static CraftSystem CraftSystem { get; private set; }
|
||||||
|
|
||||||
|
public override double GetChanceAtMin(CraftItem item) => 0.0;
|
||||||
|
|
||||||
|
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
||||||
|
{
|
||||||
|
if (tool?.Deleted != false || tool.UsesRemaining < 0)
|
||||||
{
|
{
|
||||||
|
return 1044038; // You have worn out your tool!
|
||||||
}
|
}
|
||||||
|
|
||||||
public override SkillName MainSkill => SkillName.Alchemy;
|
if (!BaseTool.CheckAccessible(tool, from))
|
||||||
|
|
||||||
public override TextDefinition GumpTitle => 1044001;
|
|
||||||
|
|
||||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefAlchemy();
|
|
||||||
|
|
||||||
public override double GetChanceAtMin(CraftItem item) => 0.0;
|
|
||||||
|
|
||||||
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
|
||||||
{
|
{
|
||||||
if (tool?.Deleted != false || tool.UsesRemaining < 0)
|
return 1044263; // The tool must be on your person to use.
|
||||||
{
|
|
||||||
return 1044038; // You have worn out your tool!
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!BaseTool.CheckAccessible(tool, from))
|
|
||||||
{
|
|
||||||
return 1044263; // The tool must be on your person to use.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PlayCraftEffect(Mobile from)
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void PlayCraftEffect(Mobile from)
|
||||||
|
{
|
||||||
|
from.PlaySound(0x242);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool IsPotion(Type type) => typeofPotion.IsAssignableFrom(type);
|
||||||
|
|
||||||
|
public override int PlayEndingEffect(
|
||||||
|
Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality,
|
||||||
|
bool makersMark, CraftItem item
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (toolBroken)
|
||||||
{
|
{
|
||||||
from.PlaySound(0x242);
|
from.SendLocalizedMessage(1044038); // You have worn out your tool
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsPotion(Type type) => typeofPotion.IsAssignableFrom(type);
|
if (failed)
|
||||||
|
|
||||||
public override int PlayEndingEffect(
|
|
||||||
Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality,
|
|
||||||
bool makersMark, CraftItem item
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (toolBroken)
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(1044038); // You have worn out your tool
|
|
||||||
}
|
|
||||||
|
|
||||||
if (failed)
|
|
||||||
{
|
|
||||||
if (IsPotion(item.ItemType))
|
|
||||||
{
|
|
||||||
from.AddToBackpack(new Bottle());
|
|
||||||
return 500287; // You fail to create a useful potion.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1044043; // You failed to create the item, and some of your materials are lost.
|
|
||||||
}
|
|
||||||
|
|
||||||
from.PlaySound(0x240); // Sound of a filling bottle
|
|
||||||
|
|
||||||
if (IsPotion(item.ItemType))
|
if (IsPotion(item.ItemType))
|
||||||
{
|
{
|
||||||
if (quality == -1)
|
from.AddToBackpack(new Bottle());
|
||||||
{
|
return 500287; // You fail to create a useful potion.
|
||||||
return 1048136; // You create the potion and pour it into a keg.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 500279; // You pour the potion into a bottle...
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1044154; // You create the item.
|
return 1044043; // You failed to create the item, and some of your materials are lost.
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void InitCraftList()
|
from.PlaySound(0x240); // Sound of a filling bottle
|
||||||
|
|
||||||
|
if (IsPotion(item.ItemType))
|
||||||
{
|
{
|
||||||
int index;
|
if (quality == -1)
|
||||||
|
{
|
||||||
|
return 1048136; // You create the potion and pour it into a keg.
|
||||||
|
}
|
||||||
|
|
||||||
// Refresh Potion
|
return 500279; // You pour the potion into a bottle...
|
||||||
index = AddCraft(typeof(RefreshPotion), 1044530, 1044538, -25, 25.0, typeof(BlackPearl), 1044353, 1, 1044361);
|
}
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(TotalRefreshPotion),
|
|
||||||
1044530,
|
|
||||||
1044539,
|
|
||||||
25.0,
|
|
||||||
75.0,
|
|
||||||
typeof(BlackPearl),
|
|
||||||
1044353,
|
|
||||||
5,
|
|
||||||
1044361
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
|
|
||||||
// Agility Potion
|
return 1044154; // You create the item.
|
||||||
index = AddCraft(typeof(AgilityPotion), 1044531, 1044540, 15.0, 65.0, typeof(Bloodmoss), 1044354, 1, 1044362);
|
}
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(GreaterAgilityPotion),
|
|
||||||
1044531,
|
|
||||||
1044541,
|
|
||||||
35.0,
|
|
||||||
85.0,
|
|
||||||
typeof(Bloodmoss),
|
|
||||||
1044354,
|
|
||||||
3,
|
|
||||||
1044362
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
|
|
||||||
// Nightsight Potion
|
public override void InitCraftList()
|
||||||
index = AddCraft(
|
{
|
||||||
typeof(NightSightPotion),
|
int index;
|
||||||
1044532,
|
|
||||||
1044542,
|
|
||||||
-25.0,
|
|
||||||
25.0,
|
|
||||||
typeof(SpidersSilk),
|
|
||||||
1044360,
|
|
||||||
1,
|
|
||||||
1044368
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
|
|
||||||
// Heal Potion
|
// Refresh Potion
|
||||||
index = AddCraft(typeof(LesserHealPotion), 1044533, 1044543, -25.0, 25.0, typeof(Ginseng), 1044356, 1, 1044364);
|
index = AddCraft(typeof(RefreshPotion), 1044530, 1044538, -25, 25.0, typeof(BlackPearl), 1044353, 1, 1044361);
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
index = AddCraft(typeof(HealPotion), 1044533, 1044544, 15.0, 65.0, typeof(Ginseng), 1044356, 3, 1044364);
|
index = AddCraft(
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
typeof(TotalRefreshPotion),
|
||||||
index = AddCraft(typeof(GreaterHealPotion), 1044533, 1044545, 55.0, 105.0, typeof(Ginseng), 1044356, 7, 1044364);
|
1044530,
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
1044539,
|
||||||
|
25.0,
|
||||||
|
75.0,
|
||||||
|
typeof(BlackPearl),
|
||||||
|
1044353,
|
||||||
|
5,
|
||||||
|
1044361
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
|
||||||
// Strength Potion
|
// Agility Potion
|
||||||
index = AddCraft(
|
index = AddCraft(typeof(AgilityPotion), 1044531, 1044540, 15.0, 65.0, typeof(Bloodmoss), 1044354, 1, 1044362);
|
||||||
typeof(StrengthPotion),
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
1044534,
|
index = AddCraft(
|
||||||
1044546,
|
typeof(GreaterAgilityPotion),
|
||||||
25.0,
|
1044531,
|
||||||
75.0,
|
1044541,
|
||||||
typeof(MandrakeRoot),
|
35.0,
|
||||||
1044357,
|
85.0,
|
||||||
2,
|
typeof(Bloodmoss),
|
||||||
1044365
|
1044354,
|
||||||
);
|
3,
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
1044362
|
||||||
index = AddCraft(
|
);
|
||||||
typeof(GreaterStrengthPotion),
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
1044534,
|
|
||||||
1044547,
|
|
||||||
45.0,
|
|
||||||
95.0,
|
|
||||||
typeof(MandrakeRoot),
|
|
||||||
1044357,
|
|
||||||
5,
|
|
||||||
1044365
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
|
|
||||||
// Poison Potion
|
// Nightsight Potion
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(NightSightPotion),
|
||||||
|
1044532,
|
||||||
|
1044542,
|
||||||
|
-25.0,
|
||||||
|
25.0,
|
||||||
|
typeof(SpidersSilk),
|
||||||
|
1044360,
|
||||||
|
1,
|
||||||
|
1044368
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
|
||||||
|
// Heal Potion
|
||||||
|
index = AddCraft(typeof(LesserHealPotion), 1044533, 1044543, -25.0, 25.0, typeof(Ginseng), 1044356, 1, 1044364);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
index = AddCraft(typeof(HealPotion), 1044533, 1044544, 15.0, 65.0, typeof(Ginseng), 1044356, 3, 1044364);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
index = AddCraft(typeof(GreaterHealPotion), 1044533, 1044545, 55.0, 105.0, typeof(Ginseng), 1044356, 7, 1044364);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
|
||||||
|
// Strength Potion
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(StrengthPotion),
|
||||||
|
1044534,
|
||||||
|
1044546,
|
||||||
|
25.0,
|
||||||
|
75.0,
|
||||||
|
typeof(MandrakeRoot),
|
||||||
|
1044357,
|
||||||
|
2,
|
||||||
|
1044365
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(GreaterStrengthPotion),
|
||||||
|
1044534,
|
||||||
|
1044547,
|
||||||
|
45.0,
|
||||||
|
95.0,
|
||||||
|
typeof(MandrakeRoot),
|
||||||
|
1044357,
|
||||||
|
5,
|
||||||
|
1044365
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
|
||||||
|
// Poison Potion
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(LesserPoisonPotion),
|
||||||
|
1044535,
|
||||||
|
1044548,
|
||||||
|
-5.0,
|
||||||
|
45.0,
|
||||||
|
typeof(Nightshade),
|
||||||
|
1044358,
|
||||||
|
1,
|
||||||
|
1044366
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
index = AddCraft(typeof(PoisonPotion), 1044535, 1044549, 15.0, 65.0, typeof(Nightshade), 1044358, 2, 1044366);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(GreaterPoisonPotion),
|
||||||
|
1044535,
|
||||||
|
1044550,
|
||||||
|
55.0,
|
||||||
|
105.0,
|
||||||
|
typeof(Nightshade),
|
||||||
|
1044358,
|
||||||
|
4,
|
||||||
|
1044366
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(DeadlyPoisonPotion),
|
||||||
|
1044535,
|
||||||
|
1044551,
|
||||||
|
90.0,
|
||||||
|
140.0,
|
||||||
|
typeof(Nightshade),
|
||||||
|
1044358,
|
||||||
|
8,
|
||||||
|
1044366
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
|
||||||
|
// Cure Potion
|
||||||
|
index = AddCraft(typeof(LesserCurePotion), 1044536, 1044552, -10.0, 40.0, typeof(Garlic), 1044355, 1, 1044363);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
index = AddCraft(typeof(CurePotion), 1044536, 1044553, 25.0, 75.0, typeof(Garlic), 1044355, 3, 1044363);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
index = AddCraft(typeof(GreaterCurePotion), 1044536, 1044554, 65.0, 115.0, typeof(Garlic), 1044355, 6, 1044363);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
|
||||||
|
// Explosion Potion
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(LesserExplosionPotion),
|
||||||
|
1044537,
|
||||||
|
1044555,
|
||||||
|
5.0,
|
||||||
|
55.0,
|
||||||
|
typeof(SulfurousAsh),
|
||||||
|
1044359,
|
||||||
|
3,
|
||||||
|
1044367
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(ExplosionPotion),
|
||||||
|
1044537,
|
||||||
|
1044556,
|
||||||
|
35.0,
|
||||||
|
85.0,
|
||||||
|
typeof(SulfurousAsh),
|
||||||
|
1044359,
|
||||||
|
5,
|
||||||
|
1044367
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(GreaterExplosionPotion),
|
||||||
|
1044537,
|
||||||
|
1044557,
|
||||||
|
65.0,
|
||||||
|
115.0,
|
||||||
|
typeof(SulfurousAsh),
|
||||||
|
1044359,
|
||||||
|
10,
|
||||||
|
1044367
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
|
||||||
|
if (Core.SE)
|
||||||
|
{
|
||||||
|
index = AddCraft(typeof(SmokeBomb), 1044537, 1030248, 90.0, 120.0, typeof(Eggs), 1044477, 1, 1044253);
|
||||||
|
AddRes(index, typeof(Ginseng), 1044356, 3, 1044364);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
|
|
||||||
|
// Conflagration Potions
|
||||||
index = AddCraft(
|
index = AddCraft(
|
||||||
typeof(LesserPoisonPotion),
|
typeof(ConflagrationPotion),
|
||||||
1044535,
|
1044109,
|
||||||
1044548,
|
1072096,
|
||||||
-5.0,
|
|
||||||
45.0,
|
|
||||||
typeof(Nightshade),
|
|
||||||
1044358,
|
|
||||||
1,
|
|
||||||
1044366
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
index = AddCraft(typeof(PoisonPotion), 1044535, 1044549, 15.0, 65.0, typeof(Nightshade), 1044358, 2, 1044366);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(GreaterPoisonPotion),
|
|
||||||
1044535,
|
|
||||||
1044550,
|
|
||||||
55.0,
|
55.0,
|
||||||
105.0,
|
105.0,
|
||||||
typeof(Nightshade),
|
typeof(GraveDust),
|
||||||
1044358,
|
1023983,
|
||||||
4,
|
|
||||||
1044366
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(DeadlyPoisonPotion),
|
|
||||||
1044535,
|
|
||||||
1044551,
|
|
||||||
90.0,
|
|
||||||
140.0,
|
|
||||||
typeof(Nightshade),
|
|
||||||
1044358,
|
|
||||||
8,
|
|
||||||
1044366
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
|
|
||||||
// Cure Potion
|
|
||||||
index = AddCraft(typeof(LesserCurePotion), 1044536, 1044552, -10.0, 40.0, typeof(Garlic), 1044355, 1, 1044363);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
index = AddCraft(typeof(CurePotion), 1044536, 1044553, 25.0, 75.0, typeof(Garlic), 1044355, 3, 1044363);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
index = AddCraft(typeof(GreaterCurePotion), 1044536, 1044554, 65.0, 115.0, typeof(Garlic), 1044355, 6, 1044363);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
|
|
||||||
// Explosion Potion
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(LesserExplosionPotion),
|
|
||||||
1044537,
|
|
||||||
1044555,
|
|
||||||
5.0,
|
|
||||||
55.0,
|
|
||||||
typeof(SulfurousAsh),
|
|
||||||
1044359,
|
|
||||||
3,
|
|
||||||
1044367
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(ExplosionPotion),
|
|
||||||
1044537,
|
|
||||||
1044556,
|
|
||||||
35.0,
|
|
||||||
85.0,
|
|
||||||
typeof(SulfurousAsh),
|
|
||||||
1044359,
|
|
||||||
5,
|
5,
|
||||||
1044367
|
1044253
|
||||||
);
|
);
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
index = AddCraft(
|
index = AddCraft(
|
||||||
typeof(GreaterExplosionPotion),
|
typeof(GreaterConflagrationPotion),
|
||||||
1044537,
|
1044109,
|
||||||
1044557,
|
1072099,
|
||||||
65.0,
|
65.0,
|
||||||
115.0,
|
115.0,
|
||||||
typeof(SulfurousAsh),
|
typeof(GraveDust),
|
||||||
1044359,
|
1023983,
|
||||||
10,
|
10,
|
||||||
1044367
|
1044253
|
||||||
);
|
);
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
if (Core.SE)
|
// Confusion Blast Potions
|
||||||
{
|
index = AddCraft(
|
||||||
index = AddCraft(typeof(SmokeBomb), 1044537, 1030248, 90.0, 120.0, typeof(Eggs), 1044477, 1, 1044253);
|
typeof(ConfusionBlastPotion),
|
||||||
AddRes(index, typeof(Ginseng), 1044356, 3, 1044364);
|
1044109,
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
1072106,
|
||||||
|
55.0,
|
||||||
// Conflagration Potions
|
105.0,
|
||||||
index = AddCraft(
|
typeof(PigIron),
|
||||||
typeof(ConflagrationPotion),
|
1023978,
|
||||||
1044109,
|
5,
|
||||||
1072096,
|
1044253
|
||||||
55.0,
|
);
|
||||||
105.0,
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
typeof(GraveDust),
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
1023983,
|
index = AddCraft(
|
||||||
5,
|
typeof(GreaterConfusionBlastPotion),
|
||||||
1044253
|
1044109,
|
||||||
);
|
1072109,
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
65.0,
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
115.0,
|
||||||
index = AddCraft(
|
typeof(PigIron),
|
||||||
typeof(GreaterConflagrationPotion),
|
1023978,
|
||||||
1044109,
|
10,
|
||||||
1072099,
|
1044253
|
||||||
65.0,
|
);
|
||||||
115.0,
|
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
||||||
typeof(GraveDust),
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
1023983,
|
|
||||||
10,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
// Confusion Blast Potions
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(ConfusionBlastPotion),
|
|
||||||
1044109,
|
|
||||||
1072106,
|
|
||||||
55.0,
|
|
||||||
105.0,
|
|
||||||
typeof(PigIron),
|
|
||||||
1023978,
|
|
||||||
5,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(GreaterConfusionBlastPotion),
|
|
||||||
1044109,
|
|
||||||
1072109,
|
|
||||||
65.0,
|
|
||||||
115.0,
|
|
||||||
typeof(PigIron),
|
|
||||||
1023978,
|
|
||||||
10,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(Bottle), 1044529, 1, 500315);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,260 +1,262 @@
|
||||||
using System;
|
using System;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
|
|
||||||
namespace Server.Engines.Craft
|
namespace Server.Engines.Craft;
|
||||||
|
|
||||||
|
public class DefBowFletching : CraftSystem
|
||||||
{
|
{
|
||||||
public class DefBowFletching : CraftSystem
|
public static void Configure()
|
||||||
{
|
{
|
||||||
private static CraftSystem m_CraftSystem;
|
CraftSystem = new DefBowFletching();
|
||||||
|
}
|
||||||
|
|
||||||
private DefBowFletching() : base(1, 1, 1.25) // base( 1, 2, 1.7 )
|
private DefBowFletching() : base(1, 1, 1.25)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override SkillName MainSkill => SkillName.Fletching;
|
||||||
|
|
||||||
|
public override TextDefinition GumpTitle => 1044006;
|
||||||
|
|
||||||
|
public static CraftSystem CraftSystem { get; private set; }
|
||||||
|
|
||||||
|
public override CraftECA ECA => CraftECA.FiftyPercentChanceMinusTenPercent;
|
||||||
|
|
||||||
|
public override double GetChanceAtMin(CraftItem item) => 0.5;
|
||||||
|
|
||||||
|
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
||||||
|
{
|
||||||
|
if (tool?.Deleted != false || tool.UsesRemaining < 0)
|
||||||
{
|
{
|
||||||
|
return 1044038; // You have worn out your tool!
|
||||||
}
|
}
|
||||||
|
|
||||||
public override SkillName MainSkill => SkillName.Fletching;
|
if (!BaseTool.CheckAccessible(tool, from))
|
||||||
|
|
||||||
public override TextDefinition GumpTitle => 1044006;
|
|
||||||
|
|
||||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefBowFletching();
|
|
||||||
|
|
||||||
public override CraftECA ECA => CraftECA.FiftyPercentChanceMinusTenPercent;
|
|
||||||
|
|
||||||
public override double GetChanceAtMin(CraftItem item) => 0.5;
|
|
||||||
|
|
||||||
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
|
||||||
{
|
{
|
||||||
if (tool?.Deleted != false || tool.UsesRemaining < 0)
|
return 1044263; // The tool must be on your person to use.
|
||||||
{
|
|
||||||
return 1044038; // You have worn out your tool!
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!BaseTool.CheckAccessible(tool, from))
|
|
||||||
{
|
|
||||||
return 1044263; // The tool must be on your person to use.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PlayCraftEffect(Mobile from)
|
return 0;
|
||||||
{
|
}
|
||||||
// no animation
|
|
||||||
// if (from.Body.Type == BodyType.Human && !from.Mounted)
|
|
||||||
// from.Animate( 33, 5, 1, true, false, 0 );
|
|
||||||
|
|
||||||
from.PlaySound(0x55);
|
public override void PlayCraftEffect(Mobile from)
|
||||||
|
{
|
||||||
|
// no animation
|
||||||
|
// if (from.Body.Type == BodyType.Human && !from.Mounted)
|
||||||
|
// from.Animate( 33, 5, 1, true, false, 0 );
|
||||||
|
|
||||||
|
from.PlaySound(0x55);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int PlayEndingEffect(
|
||||||
|
Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality,
|
||||||
|
bool makersMark, CraftItem item
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (toolBroken)
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(1044038); // You have worn out your tool
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int PlayEndingEffect(
|
if (failed)
|
||||||
Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality,
|
|
||||||
bool makersMark, CraftItem item
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (toolBroken)
|
if (lostMaterial)
|
||||||
{
|
{
|
||||||
from.SendLocalizedMessage(1044038); // You have worn out your tool
|
return 1044043; // You failed to create the item, and some of your materials are lost.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (failed)
|
return 1044157; // You failed to create the item, but no materials were lost.
|
||||||
{
|
|
||||||
if (lostMaterial)
|
|
||||||
{
|
|
||||||
return 1044043; // You failed to create the item, and some of your materials are lost.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1044157; // You failed to create the item, but no materials were lost.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quality == 0)
|
|
||||||
{
|
|
||||||
return 502785; // You were barely able to make this item. It's quality is below average.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (makersMark && quality == 2)
|
|
||||||
{
|
|
||||||
return 1044156; // You create an exceptional quality item and affix your maker's mark.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quality == 2)
|
|
||||||
{
|
|
||||||
return 1044155; // You create an exceptional quality item.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1044154; // You create the item.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void InitCraftList()
|
if (quality == 0)
|
||||||
{
|
{
|
||||||
int index;
|
return 502785; // You were barely able to make this item. It's quality is below average.
|
||||||
|
}
|
||||||
|
|
||||||
// Materials
|
if (makersMark && quality == 2)
|
||||||
AddCraft(typeof(Kindling), 1044457, 1023553, 0.0, 00.0, typeof(Log), 1044041, 1, 1044351);
|
{
|
||||||
|
return 1044156; // You create an exceptional quality item and affix your maker's mark.
|
||||||
|
}
|
||||||
|
|
||||||
index = AddCraft(typeof(Shaft), 1044457, 1027124, 0.0, 40.0, typeof(Log), 1044041, 1, 1044351);
|
if (quality == 2)
|
||||||
|
{
|
||||||
|
return 1044155; // You create an exceptional quality item.
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1044154; // You create the item.
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void InitCraftList()
|
||||||
|
{
|
||||||
|
int index;
|
||||||
|
|
||||||
|
// Materials
|
||||||
|
AddCraft(typeof(Kindling), 1044457, 1023553, 0.0, 00.0, typeof(Log), 1044041, 1, 1044351);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(Shaft), 1044457, 1027124, 0.0, 40.0, typeof(Log), 1044041, 1, 1044351);
|
||||||
|
SetUseAllRes(index, true);
|
||||||
|
|
||||||
|
// Ammunition
|
||||||
|
index = AddCraft(typeof(Arrow), 1044565, 1023903, 0.0, 40.0, typeof(Shaft), 1044560, 1, 1044561);
|
||||||
|
AddRes(index, typeof(Feather), 1044562, 1, 1044563);
|
||||||
|
SetUseAllRes(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(Bolt), 1044565, 1027163, 0.0, 40.0, typeof(Shaft), 1044560, 1, 1044561);
|
||||||
|
AddRes(index, typeof(Feather), 1044562, 1, 1044563);
|
||||||
|
SetUseAllRes(index, true);
|
||||||
|
|
||||||
|
if (Core.SE)
|
||||||
|
{
|
||||||
|
index = AddCraft(typeof(FukiyaDarts), 1044565, 1030246, 50.0, 90.0, typeof(Log), 1044041, 1, 1044351);
|
||||||
SetUseAllRes(index, true);
|
SetUseAllRes(index, true);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
// Ammunition
|
|
||||||
index = AddCraft(typeof(Arrow), 1044565, 1023903, 0.0, 40.0, typeof(Shaft), 1044560, 1, 1044561);
|
|
||||||
AddRes(index, typeof(Feather), 1044562, 1, 1044563);
|
|
||||||
SetUseAllRes(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(Bolt), 1044565, 1027163, 0.0, 40.0, typeof(Shaft), 1044560, 1, 1044561);
|
|
||||||
AddRes(index, typeof(Feather), 1044562, 1, 1044563);
|
|
||||||
SetUseAllRes(index, true);
|
|
||||||
|
|
||||||
if (Core.SE)
|
|
||||||
{
|
|
||||||
index = AddCraft(typeof(FukiyaDarts), 1044565, 1030246, 50.0, 90.0, typeof(Log), 1044041, 1, 1044351);
|
|
||||||
SetUseAllRes(index, true);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Weapons
|
|
||||||
AddCraft(typeof(Bow), 1044566, 1025042, 30.0, 70.0, typeof(Log), 1044041, 7, 1044351);
|
|
||||||
AddCraft(typeof(Crossbow), 1044566, 1023919, 60.0, 100.0, typeof(Log), 1044041, 7, 1044351);
|
|
||||||
AddCraft(typeof(HeavyCrossbow), 1044566, 1025117, 80.0, 120.0, typeof(Log), 1044041, 10, 1044351);
|
|
||||||
|
|
||||||
if (Core.AOS)
|
|
||||||
{
|
|
||||||
AddCraft(typeof(CompositeBow), 1044566, 1029922, 70.0, 110.0, typeof(Log), 1044041, 7, 1044351);
|
|
||||||
AddCraft(typeof(RepeatingCrossbow), 1044566, 1029923, 90.0, 130.0, typeof(Log), 1044041, 10, 1044351);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Core.SE)
|
|
||||||
{
|
|
||||||
index = AddCraft(typeof(Yumi), 1044566, 1030224, 90.0, 130.0, typeof(Log), 1044041, 10, 1044351);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Core.ML)
|
|
||||||
{
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(BlightGrippedLongbow),
|
|
||||||
1044566,
|
|
||||||
1072907,
|
|
||||||
75.0,
|
|
||||||
125.0,
|
|
||||||
typeof(Log),
|
|
||||||
1044041,
|
|
||||||
20,
|
|
||||||
1044351
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(LardOfParoxysmus), 1032681, 1, 1053098);
|
|
||||||
AddRes(index, typeof(Blight), 1032675, 10, 1053098);
|
|
||||||
AddRes(index, typeof(Corruption), 1032676, 10, 1053098);
|
|
||||||
AddRareRecipe(index, 200);
|
|
||||||
ForceNonExceptional(index);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
|
|
||||||
/* TODO
|
|
||||||
index = AddCraft( typeof( FaerieFire ), 1044566, 1072908, 75.0, 125.0, typeof( Log ), 1044041, 20, 1044351 );
|
|
||||||
AddRes( index, typeof( LardOfParoxysmus ), 1032681, 1, 1053098 );
|
|
||||||
AddRes( index, typeof( Putrefication ), 1032678, 10, 1053098 );
|
|
||||||
AddRes( index, typeof( Taint ), 1032679, 10, 1053098 );
|
|
||||||
AddRareRecipe( index, 201 );
|
|
||||||
ForceNonExceptional( index );
|
|
||||||
SetNeededExpansion( index, Expansion.ML );
|
|
||||||
*/
|
|
||||||
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(SilvanisFeywoodBow),
|
|
||||||
1044566,
|
|
||||||
1072955,
|
|
||||||
75.0,
|
|
||||||
125.0,
|
|
||||||
typeof(Log),
|
|
||||||
1044041,
|
|
||||||
20,
|
|
||||||
1044351
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(LardOfParoxysmus), 1032681, 1, 1053098);
|
|
||||||
AddRes(index, typeof(Scourge), 1032677, 10, 1053098);
|
|
||||||
AddRes(index, typeof(Muculent), 1032680, 10, 1053098);
|
|
||||||
AddRareRecipe(index, 202);
|
|
||||||
ForceNonExceptional(index);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
|
|
||||||
/* TODO
|
|
||||||
index = AddCraft( typeof( MischiefMaker ), 1044566, 1072910, 75.0, 125.0, typeof( Log ), 1044041, 15, 1044351 );
|
|
||||||
AddRes( index, typeof( DreadHornMane ), 1032682, 1, 1053098 );
|
|
||||||
AddRes( index, typeof( Corruption ), 1032676, 10, 1053098 );
|
|
||||||
AddRes( index, typeof( Putrefication ), 1032678, 10, 1053098 );
|
|
||||||
AddRareRecipe( index, 203 );
|
|
||||||
ForceNonExceptional( index );
|
|
||||||
SetNeededExpansion( index, Expansion.ML );
|
|
||||||
*/
|
|
||||||
|
|
||||||
index = AddCraft(typeof(TheNightReaper), 1044566, 1072912, 75.0, 125.0, typeof(Log), 1044041, 10, 1044351);
|
|
||||||
AddRes(index, typeof(DreadHornMane), 1032682, 1, 1053098);
|
|
||||||
AddRes(index, typeof(Blight), 1032675, 10, 1053098);
|
|
||||||
AddRes(index, typeof(Scourge), 1032677, 10, 1053098);
|
|
||||||
AddRareRecipe(index, 204);
|
|
||||||
ForceNonExceptional(index);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(BarbedLongbow), 1044566, 1073505, 75.0, 125.0, typeof(Log), 1044041, 20, 1044351);
|
|
||||||
AddRes(index, typeof(FireRuby), 1026254, 1, 1053098);
|
|
||||||
AddRecipe(index, 205);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(SlayerLongbow), 1044566, 1073506, 75.0, 125.0, typeof(Log), 1044041, 20, 1044351);
|
|
||||||
AddRes(index, typeof(BrilliantAmber), 1026256, 1, 1053098);
|
|
||||||
AddRecipe(index, 206);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(FrozenLongbow), 1044566, 1073507, 75.0, 125.0, typeof(Log), 1044041, 20, 1044351);
|
|
||||||
AddRes(index, typeof(Turquoise), 1026250, 1, 1053098);
|
|
||||||
AddRecipe(index, 207);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(LongbowOfMight), 1044566, 1073508, 75.0, 125.0, typeof(Log), 1044041, 10, 1044351);
|
|
||||||
AddRes(index, typeof(BlueDiamond), 1026255, 1, 1053098);
|
|
||||||
AddRecipe(index, 208);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(RangersShortbow), 1044566, 1073509, 75.0, 125.0, typeof(Log), 1044041, 15, 1044351);
|
|
||||||
AddRes(index, typeof(PerfectEmerald), 1026251, 1, 1053098);
|
|
||||||
AddRecipe(index, 209);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(LightweightShortbow),
|
|
||||||
1044566,
|
|
||||||
1073510,
|
|
||||||
75.0,
|
|
||||||
125.0,
|
|
||||||
typeof(Log),
|
|
||||||
1044041,
|
|
||||||
15,
|
|
||||||
1044351
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(WhitePearl), 1026253, 1, 1053098);
|
|
||||||
AddRecipe(index, 210);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(MysticalShortbow), 1044566, 1073511, 75.0, 125.0, typeof(Log), 1044041, 15, 1044351);
|
|
||||||
AddRes(index, typeof(EcruCitrine), 1026252, 1, 1053098);
|
|
||||||
AddRecipe(index, 211);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(AssassinsShortbow),
|
|
||||||
1044566,
|
|
||||||
1073512,
|
|
||||||
75.0,
|
|
||||||
125.0,
|
|
||||||
typeof(Log),
|
|
||||||
1044041,
|
|
||||||
15,
|
|
||||||
1044351
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(DarkSapphire), 1026249, 1, 1053098);
|
|
||||||
AddRecipe(index, 212);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
}
|
|
||||||
|
|
||||||
MarkOption = true;
|
|
||||||
Repair = Core.AOS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Weapons
|
||||||
|
AddCraft(typeof(Bow), 1044566, 1025042, 30.0, 70.0, typeof(Log), 1044041, 7, 1044351);
|
||||||
|
AddCraft(typeof(Crossbow), 1044566, 1023919, 60.0, 100.0, typeof(Log), 1044041, 7, 1044351);
|
||||||
|
AddCraft(typeof(HeavyCrossbow), 1044566, 1025117, 80.0, 120.0, typeof(Log), 1044041, 10, 1044351);
|
||||||
|
|
||||||
|
if (Core.AOS)
|
||||||
|
{
|
||||||
|
AddCraft(typeof(CompositeBow), 1044566, 1029922, 70.0, 110.0, typeof(Log), 1044041, 7, 1044351);
|
||||||
|
AddCraft(typeof(RepeatingCrossbow), 1044566, 1029923, 90.0, 130.0, typeof(Log), 1044041, 10, 1044351);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Core.SE)
|
||||||
|
{
|
||||||
|
index = AddCraft(typeof(Yumi), 1044566, 1030224, 90.0, 130.0, typeof(Log), 1044041, 10, 1044351);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Core.ML)
|
||||||
|
{
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(BlightGrippedLongbow),
|
||||||
|
1044566,
|
||||||
|
1072907,
|
||||||
|
75.0,
|
||||||
|
125.0,
|
||||||
|
typeof(Log),
|
||||||
|
1044041,
|
||||||
|
20,
|
||||||
|
1044351
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(LardOfParoxysmus), 1032681, 1, 1053098);
|
||||||
|
AddRes(index, typeof(Blight), 1032675, 10, 1053098);
|
||||||
|
AddRes(index, typeof(Corruption), 1032676, 10, 1053098);
|
||||||
|
AddRareRecipe(index, 200);
|
||||||
|
ForceNonExceptional(index);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
|
||||||
|
/* TODO
|
||||||
|
index = AddCraft( typeof( FaerieFire ), 1044566, 1072908, 75.0, 125.0, typeof( Log ), 1044041, 20, 1044351 );
|
||||||
|
AddRes( index, typeof( LardOfParoxysmus ), 1032681, 1, 1053098 );
|
||||||
|
AddRes( index, typeof( Putrefication ), 1032678, 10, 1053098 );
|
||||||
|
AddRes( index, typeof( Taint ), 1032679, 10, 1053098 );
|
||||||
|
AddRareRecipe( index, 201 );
|
||||||
|
ForceNonExceptional( index );
|
||||||
|
SetNeededExpansion( index, Expansion.ML );
|
||||||
|
*/
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(SilvanisFeywoodBow),
|
||||||
|
1044566,
|
||||||
|
1072955,
|
||||||
|
75.0,
|
||||||
|
125.0,
|
||||||
|
typeof(Log),
|
||||||
|
1044041,
|
||||||
|
20,
|
||||||
|
1044351
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(LardOfParoxysmus), 1032681, 1, 1053098);
|
||||||
|
AddRes(index, typeof(Scourge), 1032677, 10, 1053098);
|
||||||
|
AddRes(index, typeof(Muculent), 1032680, 10, 1053098);
|
||||||
|
AddRareRecipe(index, 202);
|
||||||
|
ForceNonExceptional(index);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
|
||||||
|
/* TODO
|
||||||
|
index = AddCraft( typeof( MischiefMaker ), 1044566, 1072910, 75.0, 125.0, typeof( Log ), 1044041, 15, 1044351 );
|
||||||
|
AddRes( index, typeof( DreadHornMane ), 1032682, 1, 1053098 );
|
||||||
|
AddRes( index, typeof( Corruption ), 1032676, 10, 1053098 );
|
||||||
|
AddRes( index, typeof( Putrefication ), 1032678, 10, 1053098 );
|
||||||
|
AddRareRecipe( index, 203 );
|
||||||
|
ForceNonExceptional( index );
|
||||||
|
SetNeededExpansion( index, Expansion.ML );
|
||||||
|
*/
|
||||||
|
|
||||||
|
index = AddCraft(typeof(TheNightReaper), 1044566, 1072912, 75.0, 125.0, typeof(Log), 1044041, 10, 1044351);
|
||||||
|
AddRes(index, typeof(DreadHornMane), 1032682, 1, 1053098);
|
||||||
|
AddRes(index, typeof(Blight), 1032675, 10, 1053098);
|
||||||
|
AddRes(index, typeof(Scourge), 1032677, 10, 1053098);
|
||||||
|
AddRareRecipe(index, 204);
|
||||||
|
ForceNonExceptional(index);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(BarbedLongbow), 1044566, 1073505, 75.0, 125.0, typeof(Log), 1044041, 20, 1044351);
|
||||||
|
AddRes(index, typeof(FireRuby), 1026254, 1, 1053098);
|
||||||
|
AddRecipe(index, 205);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(SlayerLongbow), 1044566, 1073506, 75.0, 125.0, typeof(Log), 1044041, 20, 1044351);
|
||||||
|
AddRes(index, typeof(BrilliantAmber), 1026256, 1, 1053098);
|
||||||
|
AddRecipe(index, 206);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(FrozenLongbow), 1044566, 1073507, 75.0, 125.0, typeof(Log), 1044041, 20, 1044351);
|
||||||
|
AddRes(index, typeof(Turquoise), 1026250, 1, 1053098);
|
||||||
|
AddRecipe(index, 207);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(LongbowOfMight), 1044566, 1073508, 75.0, 125.0, typeof(Log), 1044041, 10, 1044351);
|
||||||
|
AddRes(index, typeof(BlueDiamond), 1026255, 1, 1053098);
|
||||||
|
AddRecipe(index, 208);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(RangersShortbow), 1044566, 1073509, 75.0, 125.0, typeof(Log), 1044041, 15, 1044351);
|
||||||
|
AddRes(index, typeof(PerfectEmerald), 1026251, 1, 1053098);
|
||||||
|
AddRecipe(index, 209);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(LightweightShortbow),
|
||||||
|
1044566,
|
||||||
|
1073510,
|
||||||
|
75.0,
|
||||||
|
125.0,
|
||||||
|
typeof(Log),
|
||||||
|
1044041,
|
||||||
|
15,
|
||||||
|
1044351
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(WhitePearl), 1026253, 1, 1053098);
|
||||||
|
AddRecipe(index, 210);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(MysticalShortbow), 1044566, 1073511, 75.0, 125.0, typeof(Log), 1044041, 15, 1044351);
|
||||||
|
AddRes(index, typeof(EcruCitrine), 1026252, 1, 1053098);
|
||||||
|
AddRecipe(index, 211);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(AssassinsShortbow),
|
||||||
|
1044566,
|
||||||
|
1073512,
|
||||||
|
75.0,
|
||||||
|
125.0,
|
||||||
|
typeof(Log),
|
||||||
|
1044041,
|
||||||
|
15,
|
||||||
|
1044351
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(DarkSapphire), 1026249, 1, 1053098);
|
||||||
|
AddRecipe(index, 212);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
}
|
||||||
|
|
||||||
|
MarkOption = true;
|
||||||
|
Repair = Core.AOS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,88 +1,90 @@
|
||||||
using System;
|
using System;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
|
|
||||||
namespace Server.Engines.Craft
|
namespace Server.Engines.Craft;
|
||||||
|
|
||||||
|
public class DefCartography : CraftSystem
|
||||||
{
|
{
|
||||||
public class DefCartography : CraftSystem
|
public static void Configure()
|
||||||
{
|
{
|
||||||
private static CraftSystem m_CraftSystem;
|
CraftSystem = new DefCartography();
|
||||||
|
}
|
||||||
|
|
||||||
private DefCartography() : base(1, 1, 1.25) // base( 1, 1, 3.0 )
|
private DefCartography() : base(1, 1, 1.25)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override SkillName MainSkill => SkillName.Cartography;
|
||||||
|
|
||||||
|
public override TextDefinition GumpTitle => 1044008;
|
||||||
|
|
||||||
|
public static CraftSystem CraftSystem { get; private set; }
|
||||||
|
|
||||||
|
public override double GetChanceAtMin(CraftItem item) => 0.0;
|
||||||
|
|
||||||
|
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
||||||
|
{
|
||||||
|
if (tool?.Deleted != false || tool.UsesRemaining < 0)
|
||||||
{
|
{
|
||||||
|
return 1044038; // You have worn out your tool!
|
||||||
}
|
}
|
||||||
|
|
||||||
public override SkillName MainSkill => SkillName.Cartography;
|
if (!BaseTool.CheckAccessible(tool, from))
|
||||||
|
|
||||||
public override TextDefinition GumpTitle => 1044008;
|
|
||||||
|
|
||||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefCartography();
|
|
||||||
|
|
||||||
public override double GetChanceAtMin(CraftItem item) => 0.0;
|
|
||||||
|
|
||||||
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
|
||||||
{
|
{
|
||||||
if (tool?.Deleted != false || tool.UsesRemaining < 0)
|
return 1044263; // The tool must be on your person to use.
|
||||||
{
|
|
||||||
return 1044038; // You have worn out your tool!
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!BaseTool.CheckAccessible(tool, from))
|
|
||||||
{
|
|
||||||
return 1044263; // The tool must be on your person to use.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PlayCraftEffect(Mobile from)
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void PlayCraftEffect(Mobile from)
|
||||||
|
{
|
||||||
|
from.PlaySound(0x249);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int PlayEndingEffect(
|
||||||
|
Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality,
|
||||||
|
bool makersMark, CraftItem item
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (toolBroken)
|
||||||
{
|
{
|
||||||
from.PlaySound(0x249);
|
from.SendLocalizedMessage(1044038); // You have worn out your tool
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int PlayEndingEffect(
|
if (failed)
|
||||||
Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality,
|
|
||||||
bool makersMark, CraftItem item
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (toolBroken)
|
if (lostMaterial)
|
||||||
{
|
{
|
||||||
from.SendLocalizedMessage(1044038); // You have worn out your tool
|
return 1044043; // You failed to create the item, and some of your materials are lost.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (failed)
|
return 1044157; // You failed to create the item, but no materials were lost.
|
||||||
{
|
|
||||||
if (lostMaterial)
|
|
||||||
{
|
|
||||||
return 1044043; // You failed to create the item, and some of your materials are lost.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1044157; // You failed to create the item, but no materials were lost.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quality == 0)
|
|
||||||
{
|
|
||||||
return 502785; // You were barely able to make this item. It's quality is below average.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (makersMark && quality == 2)
|
|
||||||
{
|
|
||||||
return 1044156; // You create an exceptional quality item and affix your maker's mark.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quality == 2)
|
|
||||||
{
|
|
||||||
return 1044155; // You create an exceptional quality item.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1044154; // You create the item.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void InitCraftList()
|
if (quality == 0)
|
||||||
{
|
{
|
||||||
AddCraft(typeof(LocalMap), 1044448, 1015230, 10.0, 70.0, typeof(BlankMap), 1044449, 1, 1044450);
|
return 502785; // You were barely able to make this item. It's quality is below average.
|
||||||
AddCraft(typeof(CityMap), 1044448, 1015231, 25.0, 85.0, typeof(BlankMap), 1044449, 1, 1044450);
|
|
||||||
AddCraft(typeof(SeaChart), 1044448, 1015232, 35.0, 95.0, typeof(BlankMap), 1044449, 1, 1044450);
|
|
||||||
AddCraft(typeof(WorldMap), 1044448, 1015233, 39.5, 99.5, typeof(BlankMap), 1044449, 1, 1044450);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (makersMark && quality == 2)
|
||||||
|
{
|
||||||
|
return 1044156; // You create an exceptional quality item and affix your maker's mark.
|
||||||
|
}
|
||||||
|
|
||||||
|
if (quality == 2)
|
||||||
|
{
|
||||||
|
return 1044155; // You create an exceptional quality item.
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1044154; // You create the item.
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void InitCraftList()
|
||||||
|
{
|
||||||
|
AddCraft(typeof(LocalMap), 1044448, 1015230, 10.0, 70.0, typeof(BlankMap), 1044449, 1, 1044450);
|
||||||
|
AddCraft(typeof(CityMap), 1044448, 1015231, 25.0, 85.0, typeof(BlankMap), 1044449, 1, 1044450);
|
||||||
|
AddCraft(typeof(SeaChart), 1044448, 1015232, 35.0, 95.0, typeof(BlankMap), 1044449, 1, 1044450);
|
||||||
|
AddCraft(typeof(WorldMap), 1044448, 1015233, 39.5, 99.5, typeof(BlankMap), 1044449, 1, 1044450);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,439 +1,437 @@
|
||||||
using System;
|
using System;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
|
|
||||||
namespace Server.Engines.Craft
|
namespace Server.Engines.Craft;
|
||||||
|
|
||||||
|
public class DefCooking : CraftSystem
|
||||||
{
|
{
|
||||||
public class DefCooking : CraftSystem
|
public static void Configure()
|
||||||
{
|
{
|
||||||
private static CraftSystem m_CraftSystem;
|
CraftSystem = new DefCooking();
|
||||||
|
}
|
||||||
|
|
||||||
private DefCooking() : base(1, 1, 1.25) // base( 1, 1, 1.5 )
|
private DefCooking() : base(1, 1, 1.25)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override SkillName MainSkill => SkillName.Cooking;
|
||||||
|
|
||||||
|
public override TextDefinition GumpTitle => 1044003;
|
||||||
|
|
||||||
|
public static CraftSystem CraftSystem { get; private set; }
|
||||||
|
|
||||||
|
public override CraftECA ECA => CraftECA.ChanceMinusSixtyToFourtyFive;
|
||||||
|
|
||||||
|
public override double GetChanceAtMin(CraftItem item) => 0.0;
|
||||||
|
|
||||||
|
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
||||||
|
{
|
||||||
|
if (tool?.Deleted != false || tool.UsesRemaining < 0)
|
||||||
{
|
{
|
||||||
|
return 1044038; // You have worn out your tool!
|
||||||
}
|
}
|
||||||
|
|
||||||
public override SkillName MainSkill => SkillName.Cooking;
|
// The tool must be on your person to use.
|
||||||
|
return !BaseTool.CheckAccessible(tool, from) ? 1044263 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
public override TextDefinition GumpTitle => 1044003;
|
public override void PlayCraftEffect(Mobile from)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefCooking();
|
public override int PlayEndingEffect(
|
||||||
|
Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality,
|
||||||
public override CraftECA ECA => CraftECA.ChanceMinusSixtyToFourtyFive;
|
bool makersMark, CraftItem item
|
||||||
|
)
|
||||||
public override double GetChanceAtMin(CraftItem item) => 0.0;
|
{
|
||||||
|
if (toolBroken)
|
||||||
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
|
||||||
{
|
{
|
||||||
if (tool?.Deleted != false || tool.UsesRemaining < 0)
|
from.SendLocalizedMessage(1044038); // You have worn out your tool
|
||||||
{
|
|
||||||
return 1044038; // You have worn out your tool!
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!BaseTool.CheckAccessible(tool, from))
|
|
||||||
{
|
|
||||||
return 1044263; // The tool must be on your person to use.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PlayCraftEffect(Mobile from)
|
if (failed)
|
||||||
{
|
{
|
||||||
|
if (lostMaterial)
|
||||||
|
{
|
||||||
|
return 1044043; // You failed to create the item, and some of your materials are lost.
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1044157; // You failed to create the item, but no materials were lost.
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int PlayEndingEffect(
|
if (quality == 0)
|
||||||
Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality,
|
|
||||||
bool makersMark, CraftItem item
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (toolBroken)
|
return 502785; // You were barely able to make this item. It's quality is below average.
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(1044038); // You have worn out your tool
|
|
||||||
}
|
|
||||||
|
|
||||||
if (failed)
|
|
||||||
{
|
|
||||||
if (lostMaterial)
|
|
||||||
{
|
|
||||||
return 1044043; // You failed to create the item, and some of your materials are lost.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1044157; // You failed to create the item, but no materials were lost.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quality == 0)
|
|
||||||
{
|
|
||||||
return 502785; // You were barely able to make this item. It's quality is below average.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (makersMark && quality == 2)
|
|
||||||
{
|
|
||||||
return 1044156; // You create an exceptional quality item and affix your maker's mark.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quality == 2)
|
|
||||||
{
|
|
||||||
return 1044155; // You create an exceptional quality item.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1044154; // You create the item.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void InitCraftList()
|
if (makersMark && quality == 2)
|
||||||
{
|
{
|
||||||
int index;
|
return 1044156; // You create an exceptional quality item and affix your maker's mark.
|
||||||
|
}
|
||||||
|
|
||||||
/* Begin Ingredients */
|
if (quality == 2)
|
||||||
index = AddCraft(typeof(SackFlour), 1044495, 1024153, 0.0, 100.0, typeof(WheatSheaf), 1044489, 2, 1044490);
|
{
|
||||||
SetNeedMill(index, true);
|
return 1044155; // You create an exceptional quality item.
|
||||||
|
}
|
||||||
|
|
||||||
index = AddCraft(typeof(Dough), 1044495, 1024157, 0.0, 100.0, typeof(SackFlour), 1044468, 1, 1044253);
|
return 1044154; // You create the item.
|
||||||
AddRes(index, typeof(BaseBeverage), 1046458, 1, 1044253);
|
}
|
||||||
|
|
||||||
index = AddCraft(typeof(SweetDough), 1044495, 1041340, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
public override void InitCraftList()
|
||||||
AddRes(index, typeof(JarHoney), 1044472, 1, 1044253);
|
{
|
||||||
|
int index;
|
||||||
|
|
||||||
index = AddCraft(typeof(CakeMix), 1044495, 1041002, 0.0, 100.0, typeof(SackFlour), 1044468, 1, 1044253);
|
/* Begin Ingredients */
|
||||||
AddRes(index, typeof(SweetDough), 1044475, 1, 1044253);
|
index = AddCraft(typeof(SackFlour), 1044495, 1024153, 0.0, 100.0, typeof(WheatSheaf), 1044489, 2, 1044490);
|
||||||
|
SetNeedMill(index, true);
|
||||||
|
|
||||||
index = AddCraft(typeof(CookieMix), 1044495, 1024159, 0.0, 100.0, typeof(JarHoney), 1044472, 1, 1044253);
|
index = AddCraft(typeof(Dough), 1044495, 1024157, 0.0, 100.0, typeof(SackFlour), 1044468, 1, 1044253);
|
||||||
AddRes(index, typeof(SweetDough), 1044475, 1, 1044253);
|
AddRes(index, typeof(BaseBeverage), 1046458, 1, 1044253);
|
||||||
|
|
||||||
if (Core.ML)
|
index = AddCraft(typeof(SweetDough), 1044495, 1041340, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
||||||
{
|
AddRes(index, typeof(JarHoney), 1044472, 1, 1044253);
|
||||||
index = AddCraft(typeof(CocoaButter), 1044495, 1079998, 0.0, 100.0, typeof(CocoaPulp), 1080530, 1, 1044253);
|
|
||||||
SetItemHue(index, 0x457);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(CocoaLiquor), 1044495, 1079999, 0.0, 100.0, typeof(CocoaPulp), 1080530, 1, 1044253);
|
index = AddCraft(typeof(CakeMix), 1044495, 1041002, 0.0, 100.0, typeof(SackFlour), 1044468, 1, 1044253);
|
||||||
AddRes(index, typeof(EmptyPewterBowl), 1025629, 1, 1044253);
|
AddRes(index, typeof(SweetDough), 1044475, 1, 1044253);
|
||||||
SetItemHue(index, 0x46A);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
}
|
|
||||||
/* End Ingredients */
|
|
||||||
|
|
||||||
/* Begin Preparations */
|
index = AddCraft(typeof(CookieMix), 1044495, 1024159, 0.0, 100.0, typeof(JarHoney), 1044472, 1, 1044253);
|
||||||
index = AddCraft(typeof(UnbakedQuiche), 1044496, 1041339, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
AddRes(index, typeof(SweetDough), 1044475, 1, 1044253);
|
||||||
AddRes(index, typeof(Eggs), 1044477, 1, 1044253);
|
|
||||||
|
|
||||||
// TODO: This must also support chicken and lamb legs
|
if (Core.ML)
|
||||||
index = AddCraft(typeof(UnbakedMeatPie), 1044496, 1041338, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
{
|
||||||
AddRes(index, typeof(RawRibs), 1044482, 1, 1044253);
|
index = AddCraft(typeof(CocoaButter), 1044495, 1079998, 0.0, 100.0, typeof(CocoaPulp), 1080530, 1, 1044253);
|
||||||
|
SetItemHue(index, 0x457);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
index = AddCraft(typeof(UncookedSausagePizza), 1044496, 1041337, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
index = AddCraft(typeof(CocoaLiquor), 1044495, 1079999, 0.0, 100.0, typeof(CocoaPulp), 1080530, 1, 1044253);
|
||||||
AddRes(index, typeof(Sausage), 1044483, 1, 1044253);
|
AddRes(index, typeof(EmptyPewterBowl), 1025629, 1, 1044253);
|
||||||
|
SetItemHue(index, 0x46A);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
}
|
||||||
|
/* End Ingredients */
|
||||||
|
|
||||||
index = AddCraft(typeof(UncookedCheesePizza), 1044496, 1041341, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
/* Begin Preparations */
|
||||||
AddRes(index, typeof(CheeseWheel), 1044486, 1, 1044253);
|
index = AddCraft(typeof(UnbakedQuiche), 1044496, 1041339, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
||||||
|
AddRes(index, typeof(Eggs), 1044477, 1, 1044253);
|
||||||
|
|
||||||
index = AddCraft(typeof(UnbakedFruitPie), 1044496, 1041334, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
// TODO: This must also support chicken and lamb legs
|
||||||
AddRes(index, typeof(Pear), 1044481, 1, 1044253);
|
index = AddCraft(typeof(UnbakedMeatPie), 1044496, 1041338, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
||||||
|
AddRes(index, typeof(RawRibs), 1044482, 1, 1044253);
|
||||||
|
|
||||||
index = AddCraft(typeof(UnbakedPeachCobbler), 1044496, 1041335, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
index = AddCraft(typeof(UncookedSausagePizza), 1044496, 1041337, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
||||||
AddRes(index, typeof(Peach), 1044480, 1, 1044253);
|
AddRes(index, typeof(Sausage), 1044483, 1, 1044253);
|
||||||
|
|
||||||
index = AddCraft(typeof(UnbakedApplePie), 1044496, 1041336, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
index = AddCraft(typeof(UncookedCheesePizza), 1044496, 1041341, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
||||||
AddRes(index, typeof(Apple), 1044479, 1, 1044253);
|
AddRes(index, typeof(CheeseWheel), 1044486, 1, 1044253);
|
||||||
|
|
||||||
index = AddCraft(typeof(UnbakedPumpkinPie), 1044496, 1041342, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
index = AddCraft(typeof(UnbakedFruitPie), 1044496, 1041334, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
||||||
AddRes(index, typeof(Pumpkin), 1044484, 1, 1044253);
|
AddRes(index, typeof(Pear), 1044481, 1, 1044253);
|
||||||
|
|
||||||
if (Core.SE)
|
index = AddCraft(typeof(UnbakedPeachCobbler), 1044496, 1041335, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
||||||
{
|
AddRes(index, typeof(Peach), 1044480, 1, 1044253);
|
||||||
index = AddCraft(
|
|
||||||
typeof(GreenTea),
|
|
||||||
1044496,
|
|
||||||
1030315,
|
|
||||||
80.0,
|
|
||||||
130.0,
|
|
||||||
typeof(GreenTeaBasket),
|
|
||||||
1030316,
|
|
||||||
1,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(BaseBeverage), 1046458, 1, 1044253);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(
|
index = AddCraft(typeof(UnbakedApplePie), 1044496, 1041336, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
||||||
typeof(WasabiClumps),
|
AddRes(index, typeof(Apple), 1044479, 1, 1044253);
|
||||||
1044496,
|
|
||||||
1029451,
|
|
||||||
70.0,
|
|
||||||
120.0,
|
|
||||||
typeof(BaseBeverage),
|
|
||||||
1046458,
|
|
||||||
1,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(WoodenBowlOfPeas), 1025633, 3, 1044253);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
|
|
||||||
index = AddCraft(
|
index = AddCraft(typeof(UnbakedPumpkinPie), 1044496, 1041342, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
||||||
typeof(SushiRolls),
|
AddRes(index, typeof(Pumpkin), 1044484, 1, 1044253);
|
||||||
1044496,
|
|
||||||
1030303,
|
|
||||||
90.0,
|
|
||||||
120.0,
|
|
||||||
typeof(BaseBeverage),
|
|
||||||
1046458,
|
|
||||||
1,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(RawFishSteak), 1044476, 10, 1044253);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(SushiPlatter),
|
|
||||||
1044496,
|
|
||||||
1030305,
|
|
||||||
90.0,
|
|
||||||
120.0,
|
|
||||||
typeof(BaseBeverage),
|
|
||||||
1046458,
|
|
||||||
1,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(RawFishSteak), 1044476, 10, 1044253);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (Core.SE)
|
||||||
|
{
|
||||||
index = AddCraft(
|
index = AddCraft(
|
||||||
typeof(TribalPaint),
|
typeof(GreenTea),
|
||||||
1044496,
|
1044496,
|
||||||
1040000,
|
1030315,
|
||||||
Core.ML ? 55.0 : 80.0,
|
80.0,
|
||||||
Core.ML ? 105.0 : 80.0,
|
130.0,
|
||||||
typeof(SackFlour),
|
typeof(GreenTeaBasket),
|
||||||
1044468,
|
1030316,
|
||||||
1,
|
1,
|
||||||
1044253
|
1044253
|
||||||
);
|
);
|
||||||
AddRes(index, typeof(TribalBerry), 1046460, 1, 1044253);
|
AddRes(index, typeof(BaseBeverage), 1046458, 1, 1044253);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
if (Core.SE)
|
|
||||||
{
|
|
||||||
index = AddCraft(typeof(EggBomb), 1044496, 1030249, 90.0, 120.0, typeof(Eggs), 1044477, 1, 1044253);
|
|
||||||
AddRes(index, typeof(SackFlour), 1044468, 3, 1044253);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
}
|
|
||||||
/* End Preparations */
|
|
||||||
|
|
||||||
/* Begin Baking */
|
|
||||||
index = AddCraft(typeof(BreadLoaf), 1044497, 1024156, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(Cookies), 1044497, 1025643, 0.0, 100.0, typeof(CookieMix), 1044474, 1, 1044253);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(Cake), 1044497, 1022537, 0.0, 100.0, typeof(CakeMix), 1044471, 1, 1044253);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(Muffins), 1044497, 1022539, 0.0, 100.0, typeof(SweetDough), 1044475, 1, 1044253);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(Quiche), 1044497, 1041345, 0.0, 100.0, typeof(UnbakedQuiche), 1044518, 1, 1044253);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(MeatPie), 1044497, 1041347, 0.0, 100.0, typeof(UnbakedMeatPie), 1044519, 1, 1044253);
|
|
||||||
SetNeedOven(index, true);
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
index = AddCraft(
|
index = AddCraft(
|
||||||
typeof(SausagePizza),
|
typeof(WasabiClumps),
|
||||||
1044497,
|
1044496,
|
||||||
1044517,
|
1029451,
|
||||||
0.0,
|
70.0,
|
||||||
100.0,
|
120.0,
|
||||||
typeof(UncookedSausagePizza),
|
typeof(BaseBeverage),
|
||||||
1044520,
|
1046458,
|
||||||
1,
|
1,
|
||||||
1044253
|
1044253
|
||||||
);
|
);
|
||||||
SetNeedOven(index, true);
|
AddRes(index, typeof(WoodenBowlOfPeas), 1025633, 3, 1044253);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
|
|
||||||
index = AddCraft(
|
index = AddCraft(
|
||||||
typeof(CheesePizza),
|
typeof(SushiRolls),
|
||||||
1044497,
|
1044496,
|
||||||
1044516,
|
1030303,
|
||||||
0.0,
|
90.0,
|
||||||
100.0,
|
120.0,
|
||||||
typeof(UncookedCheesePizza),
|
typeof(BaseBeverage),
|
||||||
1044521,
|
1046458,
|
||||||
1,
|
1,
|
||||||
1044253
|
1044253
|
||||||
);
|
);
|
||||||
SetNeedOven(index, true);
|
AddRes(index, typeof(RawFishSteak), 1044476, 10, 1044253);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
index = AddCraft(typeof(FruitPie), 1044497, 1041346, 0.0, 100.0, typeof(UnbakedFruitPie), 1044522, 1, 1044253);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(
|
index = AddCraft(
|
||||||
typeof(PeachCobbler),
|
typeof(SushiPlatter),
|
||||||
1044497,
|
1044496,
|
||||||
1041344,
|
1030305,
|
||||||
0.0,
|
90.0,
|
||||||
100.0,
|
120.0,
|
||||||
typeof(UnbakedPeachCobbler),
|
typeof(BaseBeverage),
|
||||||
1044523,
|
1046458,
|
||||||
1,
|
1,
|
||||||
1044253
|
1044253
|
||||||
);
|
);
|
||||||
SetNeedOven(index, true);
|
AddRes(index, typeof(RawFishSteak), 1044476, 10, 1044253);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
index = AddCraft(typeof(ApplePie), 1044497, 1041343, 0.0, 100.0, typeof(UnbakedApplePie), 1044524, 1, 1044253);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(PumpkinPie),
|
|
||||||
1044497,
|
|
||||||
1041348,
|
|
||||||
0.0,
|
|
||||||
100.0,
|
|
||||||
typeof(UnbakedPumpkinPie),
|
|
||||||
1046461,
|
|
||||||
1,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
|
|
||||||
if (Core.SE)
|
|
||||||
{
|
|
||||||
index = AddCraft(typeof(MisoSoup), 1044497, 1030317, 60.0, 110.0, typeof(RawFishSteak), 1044476, 1, 1044253);
|
|
||||||
AddRes(index, typeof(BaseBeverage), 1046458, 1, 1044253);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(WhiteMisoSoup),
|
|
||||||
1044497,
|
|
||||||
1030318,
|
|
||||||
60.0,
|
|
||||||
110.0,
|
|
||||||
typeof(RawFishSteak),
|
|
||||||
1044476,
|
|
||||||
1,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(BaseBeverage), 1046458, 1, 1044253);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(RedMisoSoup),
|
|
||||||
1044497,
|
|
||||||
1030319,
|
|
||||||
60.0,
|
|
||||||
110.0,
|
|
||||||
typeof(RawFishSteak),
|
|
||||||
1044476,
|
|
||||||
1,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(BaseBeverage), 1046458, 1, 1044253);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(AwaseMisoSoup),
|
|
||||||
1044497,
|
|
||||||
1030320,
|
|
||||||
60.0,
|
|
||||||
110.0,
|
|
||||||
typeof(RawFishSteak),
|
|
||||||
1044476,
|
|
||||||
1,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(BaseBeverage), 1046458, 1, 1044253);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
SetNeedOven(index, true);
|
|
||||||
}
|
|
||||||
/* End Baking */
|
|
||||||
|
|
||||||
/* Begin Barbecue */
|
|
||||||
index = AddCraft(typeof(CookedBird), 1044498, 1022487, 0.0, 100.0, typeof(RawBird), 1044470, 1, 1044253);
|
|
||||||
SetNeedHeat(index, true);
|
|
||||||
SetUseAllRes(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(ChickenLeg), 1044498, 1025640, 0.0, 100.0, typeof(RawChickenLeg), 1044473, 1, 1044253);
|
|
||||||
SetNeedHeat(index, true);
|
|
||||||
SetUseAllRes(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(FishSteak), 1044498, 1022427, 0.0, 100.0, typeof(RawFishSteak), 1044476, 1, 1044253);
|
|
||||||
SetNeedHeat(index, true);
|
|
||||||
SetUseAllRes(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(FriedEggs), 1044498, 1022486, 0.0, 100.0, typeof(Eggs), 1044477, 1, 1044253);
|
|
||||||
SetNeedHeat(index, true);
|
|
||||||
SetUseAllRes(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(LambLeg), 1044498, 1025642, 0.0, 100.0, typeof(RawLambLeg), 1044478, 1, 1044253);
|
|
||||||
SetNeedHeat(index, true);
|
|
||||||
SetUseAllRes(index, true);
|
|
||||||
|
|
||||||
index = AddCraft(typeof(Ribs), 1044498, 1022546, 0.0, 100.0, typeof(RawRibs), 1044485, 1, 1044253);
|
|
||||||
SetNeedHeat(index, true);
|
|
||||||
SetUseAllRes(index, true);
|
|
||||||
/* End Barbecue */
|
|
||||||
|
|
||||||
/* Begin Chocolatiering */
|
|
||||||
if (Core.ML)
|
|
||||||
{
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(DarkChocolate),
|
|
||||||
1080001,
|
|
||||||
1079994,
|
|
||||||
15.0,
|
|
||||||
100.0,
|
|
||||||
typeof(SackOfSugar),
|
|
||||||
1079997,
|
|
||||||
1,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(CocoaButter), 1079998, 1, 1044253);
|
|
||||||
AddRes(index, typeof(CocoaLiquor), 1079999, 1, 1044253);
|
|
||||||
SetItemHue(index, 0x465);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(MilkChocolate),
|
|
||||||
1080001,
|
|
||||||
1079995,
|
|
||||||
32.5,
|
|
||||||
107.5,
|
|
||||||
typeof(SackOfSugar),
|
|
||||||
1079997,
|
|
||||||
1,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(CocoaButter), 1079998, 1, 1044253);
|
|
||||||
AddRes(index, typeof(CocoaLiquor), 1079999, 1, 1044253);
|
|
||||||
AddRes(index, typeof(BaseBeverage), 1022544, 1, 1044253);
|
|
||||||
SetBeverageType(index, BeverageType.Milk);
|
|
||||||
SetItemHue(index, 0x461);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(WhiteChocolate),
|
|
||||||
1080001,
|
|
||||||
1079996,
|
|
||||||
52.5,
|
|
||||||
127.5,
|
|
||||||
typeof(SackOfSugar),
|
|
||||||
1079997,
|
|
||||||
1,
|
|
||||||
1044253
|
|
||||||
);
|
|
||||||
AddRes(index, typeof(CocoaButter), 1079998, 1, 1044253);
|
|
||||||
AddRes(index, typeof(Vanilla), 1080000, 1, 1044253);
|
|
||||||
AddRes(index, typeof(BaseBeverage), 1022544, 1, 1044253);
|
|
||||||
SetBeverageType(index, BeverageType.Milk);
|
|
||||||
SetItemHue(index, 0x47E);
|
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* End Chocolatiering */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(TribalPaint),
|
||||||
|
1044496,
|
||||||
|
1040000,
|
||||||
|
Core.ML ? 55.0 : 80.0,
|
||||||
|
Core.ML ? 105.0 : 80.0,
|
||||||
|
typeof(SackFlour),
|
||||||
|
1044468,
|
||||||
|
1,
|
||||||
|
1044253
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(TribalBerry), 1046460, 1, 1044253);
|
||||||
|
|
||||||
|
if (Core.SE)
|
||||||
|
{
|
||||||
|
index = AddCraft(typeof(EggBomb), 1044496, 1030249, 90.0, 120.0, typeof(Eggs), 1044477, 1, 1044253);
|
||||||
|
AddRes(index, typeof(SackFlour), 1044468, 3, 1044253);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
|
}
|
||||||
|
/* End Preparations */
|
||||||
|
|
||||||
|
/* Begin Baking */
|
||||||
|
index = AddCraft(typeof(BreadLoaf), 1044497, 1024156, 0.0, 100.0, typeof(Dough), 1044469, 1, 1044253);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(Cookies), 1044497, 1025643, 0.0, 100.0, typeof(CookieMix), 1044474, 1, 1044253);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(Cake), 1044497, 1022537, 0.0, 100.0, typeof(CakeMix), 1044471, 1, 1044253);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(Muffins), 1044497, 1022539, 0.0, 100.0, typeof(SweetDough), 1044475, 1, 1044253);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(Quiche), 1044497, 1041345, 0.0, 100.0, typeof(UnbakedQuiche), 1044518, 1, 1044253);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(MeatPie), 1044497, 1041347, 0.0, 100.0, typeof(UnbakedMeatPie), 1044519, 1, 1044253);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(SausagePizza),
|
||||||
|
1044497,
|
||||||
|
1044517,
|
||||||
|
0.0,
|
||||||
|
100.0,
|
||||||
|
typeof(UncookedSausagePizza),
|
||||||
|
1044520,
|
||||||
|
1,
|
||||||
|
1044253
|
||||||
|
);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(CheesePizza),
|
||||||
|
1044497,
|
||||||
|
1044516,
|
||||||
|
0.0,
|
||||||
|
100.0,
|
||||||
|
typeof(UncookedCheesePizza),
|
||||||
|
1044521,
|
||||||
|
1,
|
||||||
|
1044253
|
||||||
|
);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(FruitPie), 1044497, 1041346, 0.0, 100.0, typeof(UnbakedFruitPie), 1044522, 1, 1044253);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(PeachCobbler),
|
||||||
|
1044497,
|
||||||
|
1041344,
|
||||||
|
0.0,
|
||||||
|
100.0,
|
||||||
|
typeof(UnbakedPeachCobbler),
|
||||||
|
1044523,
|
||||||
|
1,
|
||||||
|
1044253
|
||||||
|
);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(ApplePie), 1044497, 1041343, 0.0, 100.0, typeof(UnbakedApplePie), 1044524, 1, 1044253);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(PumpkinPie),
|
||||||
|
1044497,
|
||||||
|
1041348,
|
||||||
|
0.0,
|
||||||
|
100.0,
|
||||||
|
typeof(UnbakedPumpkinPie),
|
||||||
|
1046461,
|
||||||
|
1,
|
||||||
|
1044253
|
||||||
|
);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
if (Core.SE)
|
||||||
|
{
|
||||||
|
index = AddCraft(typeof(MisoSoup), 1044497, 1030317, 60.0, 110.0, typeof(RawFishSteak), 1044476, 1, 1044253);
|
||||||
|
AddRes(index, typeof(BaseBeverage), 1046458, 1, 1044253);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(WhiteMisoSoup),
|
||||||
|
1044497,
|
||||||
|
1030318,
|
||||||
|
60.0,
|
||||||
|
110.0,
|
||||||
|
typeof(RawFishSteak),
|
||||||
|
1044476,
|
||||||
|
1,
|
||||||
|
1044253
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(BaseBeverage), 1046458, 1, 1044253);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(RedMisoSoup),
|
||||||
|
1044497,
|
||||||
|
1030319,
|
||||||
|
60.0,
|
||||||
|
110.0,
|
||||||
|
typeof(RawFishSteak),
|
||||||
|
1044476,
|
||||||
|
1,
|
||||||
|
1044253
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(BaseBeverage), 1046458, 1, 1044253);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(AwaseMisoSoup),
|
||||||
|
1044497,
|
||||||
|
1030320,
|
||||||
|
60.0,
|
||||||
|
110.0,
|
||||||
|
typeof(RawFishSteak),
|
||||||
|
1044476,
|
||||||
|
1,
|
||||||
|
1044253
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(BaseBeverage), 1046458, 1, 1044253);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
|
SetNeedOven(index, true);
|
||||||
|
}
|
||||||
|
/* End Baking */
|
||||||
|
|
||||||
|
/* Begin Barbecue */
|
||||||
|
index = AddCraft(typeof(CookedBird), 1044498, 1022487, 0.0, 100.0, typeof(RawBird), 1044470, 1, 1044253);
|
||||||
|
SetNeedHeat(index, true);
|
||||||
|
SetUseAllRes(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(ChickenLeg), 1044498, 1025640, 0.0, 100.0, typeof(RawChickenLeg), 1044473, 1, 1044253);
|
||||||
|
SetNeedHeat(index, true);
|
||||||
|
SetUseAllRes(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(FishSteak), 1044498, 1022427, 0.0, 100.0, typeof(RawFishSteak), 1044476, 1, 1044253);
|
||||||
|
SetNeedHeat(index, true);
|
||||||
|
SetUseAllRes(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(FriedEggs), 1044498, 1022486, 0.0, 100.0, typeof(Eggs), 1044477, 1, 1044253);
|
||||||
|
SetNeedHeat(index, true);
|
||||||
|
SetUseAllRes(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(LambLeg), 1044498, 1025642, 0.0, 100.0, typeof(RawLambLeg), 1044478, 1, 1044253);
|
||||||
|
SetNeedHeat(index, true);
|
||||||
|
SetUseAllRes(index, true);
|
||||||
|
|
||||||
|
index = AddCraft(typeof(Ribs), 1044498, 1022546, 0.0, 100.0, typeof(RawRibs), 1044485, 1, 1044253);
|
||||||
|
SetNeedHeat(index, true);
|
||||||
|
SetUseAllRes(index, true);
|
||||||
|
/* End Barbecue */
|
||||||
|
|
||||||
|
/* Begin Chocolatiering */
|
||||||
|
if (Core.ML)
|
||||||
|
{
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(DarkChocolate),
|
||||||
|
1080001,
|
||||||
|
1079994,
|
||||||
|
15.0,
|
||||||
|
100.0,
|
||||||
|
typeof(SackOfSugar),
|
||||||
|
1079997,
|
||||||
|
1,
|
||||||
|
1044253
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(CocoaButter), 1079998, 1, 1044253);
|
||||||
|
AddRes(index, typeof(CocoaLiquor), 1079999, 1, 1044253);
|
||||||
|
SetItemHue(index, 0x465);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(MilkChocolate),
|
||||||
|
1080001,
|
||||||
|
1079995,
|
||||||
|
32.5,
|
||||||
|
107.5,
|
||||||
|
typeof(SackOfSugar),
|
||||||
|
1079997,
|
||||||
|
1,
|
||||||
|
1044253
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(CocoaButter), 1079998, 1, 1044253);
|
||||||
|
AddRes(index, typeof(CocoaLiquor), 1079999, 1, 1044253);
|
||||||
|
AddRes(index, typeof(BaseBeverage), 1022544, 1, 1044253);
|
||||||
|
SetBeverageType(index, BeverageType.Milk);
|
||||||
|
SetItemHue(index, 0x461);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(WhiteChocolate),
|
||||||
|
1080001,
|
||||||
|
1079996,
|
||||||
|
52.5,
|
||||||
|
127.5,
|
||||||
|
typeof(SackOfSugar),
|
||||||
|
1079997,
|
||||||
|
1,
|
||||||
|
1044253
|
||||||
|
);
|
||||||
|
AddRes(index, typeof(CocoaButter), 1079998, 1, 1044253);
|
||||||
|
AddRes(index, typeof(Vanilla), 1080000, 1, 1044253);
|
||||||
|
AddRes(index, typeof(BaseBeverage), 1022544, 1, 1044253);
|
||||||
|
SetBeverageType(index, BeverageType.Milk);
|
||||||
|
SetItemHue(index, 0x47E);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* End Chocolatiering */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,123 +2,125 @@ using System;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
|
|
||||||
namespace Server.Engines.Craft
|
namespace Server.Engines.Craft;
|
||||||
|
|
||||||
|
public class DefGlassblowing : CraftSystem
|
||||||
{
|
{
|
||||||
public class DefGlassblowing : CraftSystem
|
public static void Configure()
|
||||||
{
|
{
|
||||||
private static CraftSystem m_CraftSystem;
|
CraftSystem = new DefGlassblowing();
|
||||||
|
}
|
||||||
|
|
||||||
private DefGlassblowing() : base(1, 1, 1.25) // base( 1, 2, 1.7 )
|
private DefGlassblowing() : base(1, 1, 1.25)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override SkillName MainSkill => SkillName.Alchemy;
|
||||||
|
|
||||||
|
public override TextDefinition GumpTitle => 1044622;
|
||||||
|
|
||||||
|
public static CraftSystem CraftSystem { get; private set; }
|
||||||
|
|
||||||
|
public override double GetChanceAtMin(CraftItem item) => item.ItemType == typeof(HollowPrism) ? 0.5 : 0.0;
|
||||||
|
|
||||||
|
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
||||||
|
{
|
||||||
|
if (tool?.Deleted != false || tool.UsesRemaining < 0)
|
||||||
{
|
{
|
||||||
|
return 1044038; // You have worn out your tool!
|
||||||
}
|
}
|
||||||
|
|
||||||
public override SkillName MainSkill => SkillName.Alchemy;
|
if (!BaseTool.CheckTool(tool, from))
|
||||||
|
|
||||||
public override TextDefinition GumpTitle => 1044622;
|
|
||||||
|
|
||||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefGlassblowing();
|
|
||||||
|
|
||||||
public override double GetChanceAtMin(CraftItem item) => item.ItemType == typeof(HollowPrism) ? 0.5 : 0.0;
|
|
||||||
|
|
||||||
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
|
||||||
{
|
{
|
||||||
if (tool?.Deleted != false || tool.UsesRemaining < 0)
|
return 1048146; // If you have a tool equipped, you must use that tool.
|
||||||
{
|
|
||||||
return 1044038; // You have worn out your tool!
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!BaseTool.CheckTool(tool, from))
|
|
||||||
{
|
|
||||||
return 1048146; // If you have a tool equipped, you must use that tool.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(from is PlayerMobile mobile && mobile.Glassblowing && mobile.Skills.Alchemy.Base >= 100.0))
|
|
||||||
{
|
|
||||||
return 1044634; // You havent learned glassblowing.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!BaseTool.CheckAccessible(tool, from))
|
|
||||||
{
|
|
||||||
return 1044263; // The tool must be on your person to use.
|
|
||||||
}
|
|
||||||
|
|
||||||
DefBlacksmithy.CheckAnvilAndForge(from, 2, out _, out var forge);
|
|
||||||
|
|
||||||
return forge ? 0 : 1044628; // You must be near a forge to blow glass.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PlayCraftEffect(Mobile from)
|
if (!(from is PlayerMobile mobile && mobile.Glassblowing && mobile.Skills.Alchemy.Base >= 100.0))
|
||||||
{
|
{
|
||||||
from.PlaySound(0x2B); // bellows
|
return 1044634; // You havent learned glassblowing.
|
||||||
|
|
||||||
// if (from.Body.Type == BodyType.Human && !from.Mounted)
|
|
||||||
// from.Animate( 9, 5, 1, true, false, 0 );
|
|
||||||
|
|
||||||
// new InternalTimer( from ).Start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int PlayEndingEffect(
|
if (!BaseTool.CheckAccessible(tool, from))
|
||||||
Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality,
|
|
||||||
bool makersMark, CraftItem item
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (toolBroken)
|
return 1044263; // The tool must be on your person to use.
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(1044038); // You have worn out your tool
|
|
||||||
}
|
|
||||||
|
|
||||||
if (failed)
|
|
||||||
{
|
|
||||||
if (lostMaterial)
|
|
||||||
{
|
|
||||||
return 1044043; // You failed to create the item, and some of your materials are lost.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1044157; // You failed to create the item, but no materials were lost.
|
|
||||||
}
|
|
||||||
|
|
||||||
from.PlaySound(0x41); // glass breaking
|
|
||||||
|
|
||||||
if (quality == 0)
|
|
||||||
{
|
|
||||||
return 502785; // You were barely able to make this item. It's quality is below average.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (makersMark && quality == 2)
|
|
||||||
{
|
|
||||||
return 1044156; // You create an exceptional quality item and affix your maker's mark.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quality == 2)
|
|
||||||
{
|
|
||||||
return 1044155; // You create an exceptional quality item.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1044154; // You create the item.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void InitCraftList()
|
DefBlacksmithy.CheckAnvilAndForge(from, 2, out _, out var forge);
|
||||||
|
|
||||||
|
return forge ? 0 : 1044628; // You must be near a forge to blow glass.
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void PlayCraftEffect(Mobile from)
|
||||||
|
{
|
||||||
|
from.PlaySound(0x2B); // bellows
|
||||||
|
|
||||||
|
// if (from.Body.Type == BodyType.Human && !from.Mounted)
|
||||||
|
// from.Animate( 9, 5, 1, true, false, 0 );
|
||||||
|
|
||||||
|
// new InternalTimer( from ).Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int PlayEndingEffect(
|
||||||
|
Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality,
|
||||||
|
bool makersMark, CraftItem item
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (toolBroken)
|
||||||
{
|
{
|
||||||
var index = AddCraft(typeof(Bottle), 1044050, 1023854, 52.5, 102.5, typeof(Sand), 1044625, 1, 1044627);
|
from.SendLocalizedMessage(1044038); // You have worn out your tool
|
||||||
SetUseAllRes(index, true);
|
}
|
||||||
|
|
||||||
AddCraft(typeof(SmallFlask), 1044050, 1044610, 52.5, 102.5, typeof(Sand), 1044625, 2, 1044627);
|
if (failed)
|
||||||
AddCraft(typeof(MediumFlask), 1044050, 1044611, 52.5, 102.5, typeof(Sand), 1044625, 3, 1044627);
|
{
|
||||||
AddCraft(typeof(CurvedFlask), 1044050, 1044612, 55.0, 105.0, typeof(Sand), 1044625, 2, 1044627);
|
if (lostMaterial)
|
||||||
AddCraft(typeof(LongFlask), 1044050, 1044613, 57.5, 107.5, typeof(Sand), 1044625, 4, 1044627);
|
|
||||||
AddCraft(typeof(LargeFlask), 1044050, 1044623, 60.0, 110.0, typeof(Sand), 1044625, 5, 1044627);
|
|
||||||
AddCraft(typeof(AniSmallBlueFlask), 1044050, 1044614, 60.0, 110.0, typeof(Sand), 1044625, 5, 1044627);
|
|
||||||
AddCraft(typeof(AniLargeVioletFlask), 1044050, 1044615, 60.0, 110.0, typeof(Sand), 1044625, 5, 1044627);
|
|
||||||
AddCraft(typeof(AniRedRibbedFlask), 1044050, 1044624, 60.0, 110.0, typeof(Sand), 1044625, 7, 1044627);
|
|
||||||
AddCraft(typeof(EmptyVialsWRack), 1044050, 1044616, 65.0, 115.0, typeof(Sand), 1044625, 8, 1044627);
|
|
||||||
AddCraft(typeof(FullVialsWRack), 1044050, 1044617, 65.0, 115.0, typeof(Sand), 1044625, 9, 1044627);
|
|
||||||
AddCraft(typeof(SpinningHourglass), 1044050, 1044618, 75.0, 125.0, typeof(Sand), 1044625, 10, 1044627);
|
|
||||||
|
|
||||||
if (Core.ML)
|
|
||||||
{
|
{
|
||||||
index = AddCraft(typeof(HollowPrism), 1044050, 1072895, 100.0, 150.0, typeof(Sand), 1044625, 8, 1044627);
|
return 1044043; // You failed to create the item, and some of your materials are lost.
|
||||||
SetNeededExpansion(index, Expansion.ML);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 1044157; // You failed to create the item, but no materials were lost.
|
||||||
|
}
|
||||||
|
|
||||||
|
from.PlaySound(0x41); // glass breaking
|
||||||
|
|
||||||
|
if (quality == 0)
|
||||||
|
{
|
||||||
|
return 502785; // You were barely able to make this item. It's quality is below average.
|
||||||
|
}
|
||||||
|
|
||||||
|
if (makersMark && quality == 2)
|
||||||
|
{
|
||||||
|
return 1044156; // You create an exceptional quality item and affix your maker's mark.
|
||||||
|
}
|
||||||
|
|
||||||
|
if (quality == 2)
|
||||||
|
{
|
||||||
|
return 1044155; // You create an exceptional quality item.
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1044154; // You create the item.
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void InitCraftList()
|
||||||
|
{
|
||||||
|
var index = AddCraft(typeof(Bottle), 1044050, 1023854, 52.5, 102.5, typeof(Sand), 1044625, 1, 1044627);
|
||||||
|
SetUseAllRes(index, true);
|
||||||
|
|
||||||
|
AddCraft(typeof(SmallFlask), 1044050, 1044610, 52.5, 102.5, typeof(Sand), 1044625, 2, 1044627);
|
||||||
|
AddCraft(typeof(MediumFlask), 1044050, 1044611, 52.5, 102.5, typeof(Sand), 1044625, 3, 1044627);
|
||||||
|
AddCraft(typeof(CurvedFlask), 1044050, 1044612, 55.0, 105.0, typeof(Sand), 1044625, 2, 1044627);
|
||||||
|
AddCraft(typeof(LongFlask), 1044050, 1044613, 57.5, 107.5, typeof(Sand), 1044625, 4, 1044627);
|
||||||
|
AddCraft(typeof(LargeFlask), 1044050, 1044623, 60.0, 110.0, typeof(Sand), 1044625, 5, 1044627);
|
||||||
|
AddCraft(typeof(AniSmallBlueFlask), 1044050, 1044614, 60.0, 110.0, typeof(Sand), 1044625, 5, 1044627);
|
||||||
|
AddCraft(typeof(AniLargeVioletFlask), 1044050, 1044615, 60.0, 110.0, typeof(Sand), 1044625, 5, 1044627);
|
||||||
|
AddCraft(typeof(AniRedRibbedFlask), 1044050, 1044624, 60.0, 110.0, typeof(Sand), 1044625, 7, 1044627);
|
||||||
|
AddCraft(typeof(EmptyVialsWRack), 1044050, 1044616, 65.0, 115.0, typeof(Sand), 1044625, 8, 1044627);
|
||||||
|
AddCraft(typeof(FullVialsWRack), 1044050, 1044617, 65.0, 115.0, typeof(Sand), 1044625, 9, 1044627);
|
||||||
|
AddCraft(typeof(SpinningHourglass), 1044050, 1044618, 75.0, 125.0, typeof(Sand), 1044625, 10, 1044627);
|
||||||
|
|
||||||
|
if (Core.ML)
|
||||||
|
{
|
||||||
|
index = AddCraft(typeof(HollowPrism), 1044050, 1072895, 100.0, 150.0, typeof(Sand), 1044625, 8, 1044627);
|
||||||
|
SetNeededExpansion(index, Expansion.ML);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -2,146 +2,148 @@ using System;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
|
|
||||||
namespace Server.Engines.Craft
|
namespace Server.Engines.Craft;
|
||||||
|
|
||||||
|
public class DefMasonry : CraftSystem
|
||||||
{
|
{
|
||||||
public class DefMasonry : CraftSystem
|
public static void Configure()
|
||||||
{
|
{
|
||||||
private static CraftSystem m_CraftSystem;
|
CraftSystem = new DefMasonry();
|
||||||
|
}
|
||||||
|
|
||||||
private DefMasonry() : base(1, 1, 1.25) // base( 1, 2, 1.7 )
|
private DefMasonry() : base(1, 1, 1.25)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override SkillName MainSkill => SkillName.Carpentry;
|
||||||
|
|
||||||
|
public override TextDefinition GumpTitle => 1044500;
|
||||||
|
|
||||||
|
public static CraftSystem CraftSystem { get; private set; }
|
||||||
|
|
||||||
|
public override double GetChanceAtMin(CraftItem item) => 0.0;
|
||||||
|
|
||||||
|
public override bool RetainsColorFrom(CraftItem item, Type type) => true;
|
||||||
|
|
||||||
|
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
||||||
|
{
|
||||||
|
if (tool?.Deleted != false || tool.UsesRemaining < 0)
|
||||||
{
|
{
|
||||||
|
return 1044038; // You have worn out your tool!
|
||||||
}
|
}
|
||||||
|
|
||||||
public override SkillName MainSkill => SkillName.Carpentry;
|
if (!BaseTool.CheckTool(tool, from))
|
||||||
|
|
||||||
public override TextDefinition GumpTitle => 1044500;
|
|
||||||
|
|
||||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefMasonry();
|
|
||||||
|
|
||||||
public override double GetChanceAtMin(CraftItem item) => 0.0;
|
|
||||||
|
|
||||||
public override bool RetainsColorFrom(CraftItem item, Type type) => true;
|
|
||||||
|
|
||||||
public override int CanCraft(Mobile from, BaseTool tool, Type itemType)
|
|
||||||
{
|
{
|
||||||
if (tool?.Deleted != false || tool.UsesRemaining < 0)
|
return 1048146; // If you have a tool equipped, you must use that tool.
|
||||||
{
|
|
||||||
return 1044038; // You have worn out your tool!
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!BaseTool.CheckTool(tool, from))
|
|
||||||
{
|
|
||||||
return 1048146; // If you have a tool equipped, you must use that tool.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(from is PlayerMobile mobile && mobile.Masonry && mobile.Skills.Carpentry.Base >= 100.0))
|
|
||||||
{
|
|
||||||
return 1044633; // You havent learned stonecraft.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!BaseTool.CheckAccessible(tool, from))
|
|
||||||
{
|
|
||||||
return 1044263; // The tool must be on your person to use.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PlayCraftEffect(Mobile from)
|
if (!(from is PlayerMobile mobile && mobile.Masonry && mobile.Skills.Carpentry.Base >= 100.0))
|
||||||
{
|
{
|
||||||
// no effects
|
return 1044633; // You haven't learned stonecraft.
|
||||||
// if (from.Body.Type == BodyType.Human && !from.Mounted)
|
|
||||||
// from.Animate( 9, 5, 1, true, false, 0 );
|
|
||||||
// new InternalTimer( from ).Start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int PlayEndingEffect(
|
if (!BaseTool.CheckAccessible(tool, from))
|
||||||
Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality,
|
|
||||||
bool makersMark, CraftItem item
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (toolBroken)
|
return 1044263; // The tool must be on your person to use.
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(1044038); // You have worn out your tool
|
|
||||||
}
|
|
||||||
|
|
||||||
if (failed)
|
|
||||||
{
|
|
||||||
if (lostMaterial)
|
|
||||||
{
|
|
||||||
return 1044043; // You failed to create the item, and some of your materials are lost.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1044157; // You failed to create the item, but no materials were lost.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quality == 0)
|
|
||||||
{
|
|
||||||
return 502785; // You were barely able to make this item. It's quality is below average.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (makersMark && quality == 2)
|
|
||||||
{
|
|
||||||
return 1044156; // You create an exceptional quality item and affix your maker's mark.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quality == 2)
|
|
||||||
{
|
|
||||||
return 1044155; // You create an exceptional quality item.
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1044154; // You create the item.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void InitCraftList()
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void PlayCraftEffect(Mobile from)
|
||||||
|
{
|
||||||
|
// no effects
|
||||||
|
// if (from.Body.Type == BodyType.Human && !from.Mounted)
|
||||||
|
// from.Animate( 9, 5, 1, true, false, 0 );
|
||||||
|
// new InternalTimer( from ).Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int PlayEndingEffect(
|
||||||
|
Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality,
|
||||||
|
bool makersMark, CraftItem item
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (toolBroken)
|
||||||
{
|
{
|
||||||
// Decorations
|
from.SendLocalizedMessage(1044038); // You have worn out your tool
|
||||||
AddCraft(typeof(Vase), 1044501, 1022888, 52.5, 102.5, typeof(Granite), 1044514, 1, 1044513);
|
}
|
||||||
AddCraft(typeof(LargeVase), 1044501, 1022887, 52.5, 102.5, typeof(Granite), 1044514, 3, 1044513);
|
|
||||||
|
|
||||||
if (Core.SE)
|
if (failed)
|
||||||
|
{
|
||||||
|
if (lostMaterial)
|
||||||
{
|
{
|
||||||
var index = AddCraft(typeof(SmallUrn), 1044501, 1029244, 82.0, 132.0, typeof(Granite), 1044514, 3, 1044513);
|
return 1044043; // You failed to create the item, and some of your materials are lost.
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
|
|
||||||
index = AddCraft(
|
|
||||||
typeof(SmallTowerSculpture),
|
|
||||||
1044501,
|
|
||||||
1029242,
|
|
||||||
82.0,
|
|
||||||
132.0,
|
|
||||||
typeof(Granite),
|
|
||||||
1044514,
|
|
||||||
3,
|
|
||||||
1044513
|
|
||||||
);
|
|
||||||
SetNeededExpansion(index, Expansion.SE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Furniture
|
return 1044157; // You failed to create the item, but no materials were lost.
|
||||||
AddCraft(typeof(StoneChair), 1044502, 1024635, 55.0, 105.0, typeof(Granite), 1044514, 4, 1044513);
|
|
||||||
AddCraft(typeof(MediumStoneTableEastDeed), 1044502, 1044508, 65.0, 115.0, typeof(Granite), 1044514, 6, 1044513);
|
|
||||||
AddCraft(typeof(MediumStoneTableSouthDeed), 1044502, 1044509, 65.0, 115.0, typeof(Granite), 1044514, 6, 1044513);
|
|
||||||
AddCraft(typeof(LargeStoneTableEastDeed), 1044502, 1044511, 75.0, 125.0, typeof(Granite), 1044514, 9, 1044513);
|
|
||||||
AddCraft(typeof(LargeStoneTableSouthDeed), 1044502, 1044512, 75.0, 125.0, typeof(Granite), 1044514, 9, 1044513);
|
|
||||||
|
|
||||||
// Statues
|
|
||||||
AddCraft(typeof(StatueSouth), 1044503, 1044505, 60.0, 120.0, typeof(Granite), 1044514, 3, 1044513);
|
|
||||||
AddCraft(typeof(StatueNorth), 1044503, 1044506, 60.0, 120.0, typeof(Granite), 1044514, 3, 1044513);
|
|
||||||
AddCraft(typeof(StatueEast), 1044503, 1044507, 60.0, 120.0, typeof(Granite), 1044514, 3, 1044513);
|
|
||||||
AddCraft(typeof(StatuePegasus), 1044503, 1044510, 70.0, 130.0, typeof(Granite), 1044514, 4, 1044513);
|
|
||||||
|
|
||||||
SetSubRes(typeof(Granite), 1044525);
|
|
||||||
|
|
||||||
AddSubRes(typeof(Granite), 1044525, 00.0, 1044514, 1044526);
|
|
||||||
AddSubRes(typeof(DullCopperGranite), 1044023, 65.0, 1044514, 1044527);
|
|
||||||
AddSubRes(typeof(ShadowIronGranite), 1044024, 70.0, 1044514, 1044527);
|
|
||||||
AddSubRes(typeof(CopperGranite), 1044025, 75.0, 1044514, 1044527);
|
|
||||||
AddSubRes(typeof(BronzeGranite), 1044026, 80.0, 1044514, 1044527);
|
|
||||||
AddSubRes(typeof(GoldGranite), 1044027, 85.0, 1044514, 1044527);
|
|
||||||
AddSubRes(typeof(AgapiteGranite), 1044028, 90.0, 1044514, 1044527);
|
|
||||||
AddSubRes(typeof(VeriteGranite), 1044029, 95.0, 1044514, 1044527);
|
|
||||||
AddSubRes(typeof(ValoriteGranite), 1044030, 99.0, 1044514, 1044527);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (quality == 0)
|
||||||
|
{
|
||||||
|
return 502785; // You were barely able to make this item. It's quality is below average.
|
||||||
|
}
|
||||||
|
|
||||||
|
if (makersMark && quality == 2)
|
||||||
|
{
|
||||||
|
return 1044156; // You create an exceptional quality item and affix your maker's mark.
|
||||||
|
}
|
||||||
|
|
||||||
|
if (quality == 2)
|
||||||
|
{
|
||||||
|
return 1044155; // You create an exceptional quality item.
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1044154; // You create the item.
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void InitCraftList()
|
||||||
|
{
|
||||||
|
// Decorations
|
||||||
|
AddCraft(typeof(Vase), 1044501, 1022888, 52.5, 102.5, typeof(Granite), 1044514, 1, 1044513);
|
||||||
|
AddCraft(typeof(LargeVase), 1044501, 1022887, 52.5, 102.5, typeof(Granite), 1044514, 3, 1044513);
|
||||||
|
|
||||||
|
if (Core.SE)
|
||||||
|
{
|
||||||
|
var index = AddCraft(typeof(SmallUrn), 1044501, 1029244, 82.0, 132.0, typeof(Granite), 1044514, 3, 1044513);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
|
|
||||||
|
index = AddCraft(
|
||||||
|
typeof(SmallTowerSculpture),
|
||||||
|
1044501,
|
||||||
|
1029242,
|
||||||
|
82.0,
|
||||||
|
132.0,
|
||||||
|
typeof(Granite),
|
||||||
|
1044514,
|
||||||
|
3,
|
||||||
|
1044513
|
||||||
|
);
|
||||||
|
SetNeededExpansion(index, Expansion.SE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Furniture
|
||||||
|
AddCraft(typeof(StoneChair), 1044502, 1024635, 55.0, 105.0, typeof(Granite), 1044514, 4, 1044513);
|
||||||
|
AddCraft(typeof(MediumStoneTableEastDeed), 1044502, 1044508, 65.0, 115.0, typeof(Granite), 1044514, 6, 1044513);
|
||||||
|
AddCraft(typeof(MediumStoneTableSouthDeed), 1044502, 1044509, 65.0, 115.0, typeof(Granite), 1044514, 6, 1044513);
|
||||||
|
AddCraft(typeof(LargeStoneTableEastDeed), 1044502, 1044511, 75.0, 125.0, typeof(Granite), 1044514, 9, 1044513);
|
||||||
|
AddCraft(typeof(LargeStoneTableSouthDeed), 1044502, 1044512, 75.0, 125.0, typeof(Granite), 1044514, 9, 1044513);
|
||||||
|
|
||||||
|
// Statues
|
||||||
|
AddCraft(typeof(StatueSouth), 1044503, 1044505, 60.0, 120.0, typeof(Granite), 1044514, 3, 1044513);
|
||||||
|
AddCraft(typeof(StatueNorth), 1044503, 1044506, 60.0, 120.0, typeof(Granite), 1044514, 3, 1044513);
|
||||||
|
AddCraft(typeof(StatueEast), 1044503, 1044507, 60.0, 120.0, typeof(Granite), 1044514, 3, 1044513);
|
||||||
|
AddCraft(typeof(StatuePegasus), 1044503, 1044510, 70.0, 130.0, typeof(Granite), 1044514, 4, 1044513);
|
||||||
|
|
||||||
|
SetSubRes(typeof(Granite), 1044525);
|
||||||
|
|
||||||
|
AddSubRes(typeof(Granite), 1044525, 00.0, 1044514, 1044526);
|
||||||
|
AddSubRes(typeof(DullCopperGranite), 1044023, 65.0, 1044514, 1044527);
|
||||||
|
AddSubRes(typeof(ShadowIronGranite), 1044024, 70.0, 1044514, 1044527);
|
||||||
|
AddSubRes(typeof(CopperGranite), 1044025, 75.0, 1044514, 1044527);
|
||||||
|
AddSubRes(typeof(BronzeGranite), 1044026, 80.0, 1044514, 1044527);
|
||||||
|
AddSubRes(typeof(GoldGranite), 1044027, 85.0, 1044514, 1044527);
|
||||||
|
AddSubRes(typeof(AgapiteGranite), 1044028, 90.0, 1044514, 1044527);
|
||||||
|
AddSubRes(typeof(VeriteGranite), 1044029, 95.0, 1044514, 1044527);
|
||||||
|
AddSubRes(typeof(ValoriteGranite), 1044030, 99.0, 1044514, 1044527);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue