コード例 #1
0
ファイル: RecipeFactory.cs プロジェクト: CanisBolt/SimpleRPG
        static RecipeFactory()
        {
            recipeList = new List <AlchemyRecipe>();

            AlchemyRecipe smallHealingPotion = new AlchemyRecipe("Small Healing Potion", World.AlchemyRecipeIDSmallHealingPotion, ItemsFactory.ItemByID(World.ItemIDSmallHealingPotion));

            smallHealingPotion.AddIngredient(World.MaterialIDHealingGrass, 2);

            AlchemyRecipe smallManaPotion = new AlchemyRecipe("Small Mana Potion", World.AlchemyRecipeIDSmallManaPotion, ItemsFactory.ItemByID(World.ItemIDSmallManaPotion));

            smallManaPotion.AddIngredient(World.EnemyLootIDRatTail, 2);
            smallManaPotion.AddIngredient(World.EnemyLootIDSnakeFang, 1);

            recipeList.Add(smallHealingPotion);
            recipeList.Add(smallManaPotion);
        }
コード例 #2
0
ファイル: AlchemyRecipe.cs プロジェクト: CanisBolt/SimpleRPG
 public void AddIngredient(int itemID, int quantity)
 {
     RequiredToCraft.Add(ItemsFactory.ItemByID(itemID), quantity);
 }