Skip to content

Commit

Permalink
Merge pull request #3058 from planetarium/v200250-latest-data
Browse files Browse the repository at this point in the history
Update v200250 Latest Data
  • Loading branch information
eugene-doobu authored Dec 27, 2024
2 parents 85d94f0 + 0a49e8a commit 198a730
Show file tree
Hide file tree
Showing 32 changed files with 3,854 additions and 1,314 deletions.
40 changes: 20 additions & 20 deletions .Lib9c.Tests/Action/AdventureBoss/ClaimAdventureBossRewardTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ public static IEnumerable<object[]> GetWantedTestData()
NcgReward = 0 * NCG, // No Wanted Raffle
ItemReward = new Dictionary<int, int>
{
{ 600201, 168 },
{ 600202, 18 },
{ 600201, 336 },
{ 600202, 36 },
{ 600203, 0 },
},
FavReward = new Dictionary<int, int>
Expand All @@ -158,9 +158,9 @@ public static IEnumerable<object[]> GetWantedTestData()
ItemReward = new Dictionary<int, int>
{
{
600201, 168
600201, 336
}, // (200*1.2) * 0.7 / 0.5 * (120/240)
{ 600202, 18 }, // (200*1.2) * 0.3 / 2 * (120/240)
{ 600202, 36 }, // (200*1.2) * 0.3 / 2 * (120/240)
{ 600203, 0 },
},
FavReward = new Dictionary<int, int>
Expand All @@ -180,9 +180,9 @@ public static IEnumerable<object[]> GetWantedTestData()
ItemReward = new Dictionary<int, int>
{
{
600201, 140
600201, 280
}, // (300*1.2) * 0.7 / 0.5 * (100/360)
{ 600202, 15 }, // (300*1.2) * 0.3 / 2 * (100/360)
{ 600202, 30 }, // (300*1.2) * 0.3 / 2 * (100/360)
{ 600203, 0 },
},
FavReward = new Dictionary<int, int>
Expand All @@ -203,7 +203,7 @@ public static IEnumerable<object[]> GetExploreTestData()
NcgReward = (5 + 15) * NCG, // 5NCG for raffle, 15NCG for 15% distribution
ItemReward = new Dictionary<int, int>
{
{ 600201, 80 }, // 100AP * 0.4 Exchange / 0.5 ratio * 100% contribution
{ 600201, 160 }, // 100AP * 0.4 Exchange / 0.5 ratio * 100% contribution
{ 600202, 0 },
{ 600203, 0 },
},
Expand All @@ -229,7 +229,7 @@ public static IEnumerable<object[]> GetExploreTestData()
ItemReward = new Dictionary<int, int>
{
{
600201, 79
600201, 159
}, // total 200 AP * 0.4 Exchange / 0.5 ratio * 50% contribution
{ 600202, 0 },
{ 600203, 0 },
Expand All @@ -253,7 +253,7 @@ public static IEnumerable<object[]> GetExploreTestData()
ItemReward = new Dictionary<int, int>
{
{
600201, 79
600201, 159
}, // Total 200 AP * 0.4 Exchange / 1.5 Ratio * 50% Contribution
{ 600202, 0 },
{ 600203, 0 },
Expand All @@ -275,7 +275,7 @@ public static IEnumerable<object[]> GetExploreTestData()
NcgReward = 5 * NCG,
ItemReward = new Dictionary<int, int>
{
{ 600201, 80 },
{ 600201, 160 },
{ 600202, 0 },
{ 600203, 0 },
},
Expand All @@ -298,8 +298,8 @@ public static IEnumerable<object[]> GetPrevRewardTestData()
NcgReward = 0 * NCG, // No NCG Reward
ItemReward = new Dictionary<int, int>
{
{ 600201, 168 },
{ 600202, 18 },
{ 600201, 336 },
{ 600202, 36 },
{ 600203, 0 },
},
FavReward = new Dictionary<int, int>
Expand All @@ -317,7 +317,7 @@ public static IEnumerable<object[]> GetPrevRewardTestData()
NcgReward = 20 * NCG, // 5NCG for explore raffle, 15NCG for 15% distribution
ItemReward = new Dictionary<int, int>
{
{ 600201, 80 },
{ 600201, 160 },
{ 600202, 0 },
{ 600203, 0 },
},
Expand All @@ -337,8 +337,8 @@ public static IEnumerable<object[]> GetPrevRewardTestData()
NcgReward = 20 * NCG,
ItemReward = new Dictionary<int, int>
{
{ 600201, 248 },
{ 600202, 18 },
{ 600201, 496 },
{ 600202, 36 },
{ 600203, 0 },
},
FavReward = new Dictionary<int, int>
Expand Down Expand Up @@ -468,10 +468,10 @@ public void WantedMultipleSeason()
},
ItemReward = new Dictionary<int, int>
{
{ 600201, 168 }, // 100NCG * 1.2 * 0.7 Fixed / 0.5 Ratio for season 1
{ 600201, 336 }, // 100NCG * 1.2 * 0.7 Fixed / 0.5 Ratio for season 1
// 100NCG * 1.2 * 0.3 Random / 2 Ratio for season 1
// 100NCG * 1.3 * 0.3 Random / 2 Ratio for season 3
{ 600202, 36 },
{ 600202, 72 },
{ 600203, 0 },
},
};
Expand Down Expand Up @@ -752,7 +752,7 @@ public void ExploreMultipleSeason()
ItemReward = new Dictionary<int, int>
{
{
600201, 80
600201, 160
}, // (100 AP * 0.4 Exchange / 0.5 Ratio * 100% contribution) for season 1
{ 600202, 0 },
{ 600203, 0 },
Expand Down Expand Up @@ -891,8 +891,8 @@ public void AllReward()
},
ItemReward = new Dictionary<int, int>
{
{ 600201, 248 },
{ 600202, 18 },
{ 600201, 496 },
{ 600202, 36 },
{ 600203, 0 },
},
};
Expand Down
4 changes: 2 additions & 2 deletions .Lib9c.Tests/Action/AdventureBoss/SweepAdventureBossTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static IEnumerable<object[]> GetExecuteMemberData()
};
yield return new object[]
{
1, 100, 99, null, new[] { (600301, 3), (600302, 0), (600303, 0), (600304, 0), },
1, 100, 99, null, new[] { (600301, 5), (600302, 0), (600303, 0), (600304, 0), },
};
yield return new object[]
{
Expand All @@ -108,7 +108,7 @@ public static IEnumerable<object[]> GetExecuteMemberData()
};
yield return new object[]
{
20, 20, 0, null, new[] { (600301, 9), (600302, 10), (600303, 8), (600304, 8), },
20, 20, 0, null, new[] { (600301, 15), (600302, 18), (600303, 14), (600304, 14), },
};
}

Expand Down
30 changes: 12 additions & 18 deletions .Lib9c.Tests/Action/ClaimGiftsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ public ClaimGiftsTest()
_tableSheets = new TableSheets(tableCsv);
}

[Theory]
[InlineData(1)]
[InlineData(300)]
[InlineData(600)]
[InlineData(1200)]
public void Execute_Success(long blockIndex)
[Fact]
public void Execute_Success()
{
var agentAddress = new PrivateKey().Address;
var avatarAddress = Addresses.GetAvatarAddress(agentAddress, 0);
Expand All @@ -47,20 +43,18 @@ public void Execute_Success(long blockIndex)
_tableSheets.GetAvatarSheets(),
default);
var state = _state.SetAvatarState(avatarAddress, avatarState);

if (!_tableSheets.ClaimableGiftsSheet.TryFindRowByBlockIndex(blockIndex, out var row))
var row = _tableSheets.ClaimableGiftsSheet.Values.FirstOrDefault(r => r.StartedBlockIndex > 0L);
if (row is not null)
{
throw new Exception();
Execute(
state,
avatarAddress,
agentAddress,
row.Id,
row.StartedBlockIndex,
row.Items.ToArray()
);
}

Execute(
state,
avatarAddress,
agentAddress,
row.Id,
blockIndex,
row.Items.ToArray()
);
}

[Fact]
Expand Down
Loading

0 comments on commit 198a730

Please sign in to comment.