diff --git a/.Lib9c.Tests/Action/CustomEquipmentCraft/CustomEquipmentCraftTest.cs b/.Lib9c.Tests/Action/CustomEquipmentCraft/CustomEquipmentCraftTest.cs index f2cf3d3605..c136162a67 100644 --- a/.Lib9c.Tests/Action/CustomEquipmentCraft/CustomEquipmentCraftTest.cs +++ b/.Lib9c.Tests/Action/CustomEquipmentCraft/CustomEquipmentCraftTest.cs @@ -108,13 +108,13 @@ public CustomEquipmentCraftTest() { new () { - MinCp = 900, - MaxCp = 1000, + MinCp = 78811, + MaxCp = 118133, ItemSubType = ItemSubType.Weapon, ElementalType = ElementalType.Wind, }, }, - 10, null, + 21600, null, }; // Random Icon @@ -129,13 +129,13 @@ public CustomEquipmentCraftTest() { new () { - MinCp = 900, - MaxCp = 1000, + MinCp = 196780, + MaxCp = 236104, ItemSubType = ItemSubType.Weapon, - ElementalType = ElementalType.Wind, + ElementalType = ElementalType.Water, }, }, - 10, null, 8, + 21600, null, 17, }; // Move to next group with additional cost @@ -150,13 +150,13 @@ public CustomEquipmentCraftTest() { new () { - MinCp = 900, - MaxCp = 1000, + MinCp = 78811, + MaxCp = 118133, ItemSubType = ItemSubType.Weapon, ElementalType = ElementalType.Wind, }, }, - 10, null, + 21600, null, }; yield return new object?[] { @@ -169,13 +169,13 @@ public CustomEquipmentCraftTest() { new () { - MinCp = 9000, - MaxCp = 10000, + MinCp = 127372, + MaxCp = 166695, ItemSubType = ItemSubType.Weapon, ElementalType = ElementalType.Wind, }, }, - 12, null, + 21600 * 2, null, }; yield return new object?[] { @@ -188,13 +188,13 @@ public CustomEquipmentCraftTest() { new () { - MinCp = 90000, - MaxCp = 100000, + MinCp = 231654, + MaxCp = 270976, ItemSubType = ItemSubType.Weapon, ElementalType = ElementalType.Wind, }, }, - 15, null, + 21600 * 8, null, }; // Multiple slots @@ -210,20 +210,20 @@ public CustomEquipmentCraftTest() { new () { - MinCp = 900, - MaxCp = 1000, + MinCp = 78811, + MaxCp = 118133, ItemSubType = ItemSubType.Weapon, ElementalType = ElementalType.Wind, }, new () { - MinCp = 800, - MaxCp = 900, + MinCp = 196780, + MaxCp = 236104, ItemSubType = ItemSubType.Weapon, ElementalType = ElementalType.Wind, }, }, - 10, null, + 21600, null, }; yield return new object?[] { @@ -236,20 +236,20 @@ public CustomEquipmentCraftTest() { new () { - MinCp = 900, - MaxCp = 1000, + MinCp = 78811, + MaxCp = 118133, ItemSubType = ItemSubType.Weapon, ElementalType = ElementalType.Wind, }, new () { - MinCp = 800, - MaxCp = 900, + MinCp = 196780, + MaxCp = 236104, ItemSubType = ItemSubType.Weapon, ElementalType = ElementalType.Wind, }, }, - 10, null, + 21600, null, }; yield return new object?[] { @@ -264,34 +264,34 @@ public CustomEquipmentCraftTest() { new () { - MinCp = 500, - MaxCp = 600, + MinCp = 39487, + MaxCp = 78810, ItemSubType = ItemSubType.Weapon, - ElementalType = ElementalType.Water, + ElementalType = ElementalType.Normal, }, new () { - MinCp = 300, - MaxCp = 400, + MinCp = 78811, + MaxCp = 118133, ItemSubType = ItemSubType.Weapon, ElementalType = ElementalType.Wind, }, new () { - MinCp = 100, - MaxCp = 200, + MinCp = 39487, + MaxCp = 78810, ItemSubType = ItemSubType.Weapon, - ElementalType = ElementalType.Water, + ElementalType = ElementalType.Wind, }, new () { - MinCp = 900, - MaxCp = 1000, + MinCp = 39487, + MaxCp = 78810, ItemSubType = ItemSubType.Weapon, - ElementalType = ElementalType.Normal, + ElementalType = ElementalType.Fire, }, }, - 10, null, 4, + 21600, null, 22, }; } @@ -321,7 +321,7 @@ public CustomEquipmentCraftTest() { new List { - new () { RecipeId = 1, SlotIndex = 0, IconId = 10131001, }, + new () { RecipeId = 1, SlotIndex = 0, IconId = 10140000, }, }, true, 0, false, new List(), 0, typeof(NotEnoughRelationshipException), }; diff --git a/.Lib9c.Tests/Action/GrindingTest.cs b/.Lib9c.Tests/Action/GrindingTest.cs index ef136afcb7..1a83299bb3 100644 --- a/.Lib9c.Tests/Action/GrindingTest.cs +++ b/.Lib9c.Tests/Action/GrindingTest.cs @@ -326,11 +326,11 @@ public void CalculateMaterialReward(int[] equipmentIds, Dictionary exp ); Assert.Equal(expected.Count, actual.Count); - foreach (var (material, count) in actual) + foreach (var (material, actualCount) in actual) { - if (expected.TryGetValue(material.Id, out var actualCount)) + if (expected.TryGetValue(material.Id, out var expectedCount)) { - Assert.Equal(count, actualCount); + Assert.Equal(expectedCount, actualCount); } else { @@ -422,9 +422,9 @@ private class CalculateMaterialRewardData : IEnumerable new[] { 10750008, 10760000, 20160000, 20160003 }, new Dictionary { - { 306085, 15 }, - { 600401, 35 }, - { 600402, 21 }, + { 306085, 15 }, // 5 + 10 + 0 + 0 + { 600401, 12 }, // 0 + 0 + 2 + 10 + { 600402, 23 }, // 0 + 0 + 3 + 20 }, }, new object[] diff --git a/Lib9c/Helper/CustomCraftHelper.cs b/Lib9c/Helper/CustomCraftHelper.cs index 62a5367cf7..ebb6b2eff2 100644 --- a/Lib9c/Helper/CustomCraftHelper.cs +++ b/Lib9c/Helper/CustomCraftHelper.cs @@ -1,10 +1,8 @@ #nullable enable using System; using System.Collections.Generic; -using System.Collections.Immutable; using System.Linq; using System.Numerics; -using BTAI; using Libplanet.Action; using Nekoyume.Battle; using Nekoyume.Model.Item;