Skip to content

Commit

Permalink
Merge pull request #2497 from planetarium/release/160
Browse files Browse the repository at this point in the history
Release 160
  • Loading branch information
U-lis authored Jul 8, 2024
2 parents e8faa14 + 3e041be commit 4e9d8dd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Lib9c
Submodule Lib9c updated 99 files
+1,054 −0 .Lib9c.Tests/Action/AdventureBoss/ClaimAdventureBossRewardTest.cs
+310 −0 .Lib9c.Tests/Action/AdventureBoss/ExploreAdventureBossTest.cs
+238 −0 .Lib9c.Tests/Action/AdventureBoss/SweepAdventureBossTest.cs
+210 −0 .Lib9c.Tests/Action/AdventureBoss/UnlockFloorTest.cs
+545 −0 .Lib9c.Tests/Action/AdventureBoss/WantedTest.cs
+11 −0 .Lib9c.Tests/Action/ExceptionTest.cs
+377 −0 .Lib9c.Tests/Action/Scenario/GrimoireScenarioTest.cs
+127 −0 .Lib9c.Tests/Helper/AdventureBossHelperTest.cs
+182 −0 .Lib9c.Tests/Model/AdventureBoss/AdventureBossSimulatorTest.cs
+0 −254 .Lib9c.Tests/Model/ItemNotificationTest.cs
+27 −0 .Lib9c.Tests/Model/Mail/AdventureBossRaffleWinnerMailTest.cs
+68 −163 .Lib9c.Tests/Policy/BlockPolicyTest.cs
+34 −0 .Lib9c.Tests/TableData/AdventureBoss/AdventureBossContributionRewardSheetTest.cs
+34 −0 .Lib9c.Tests/TableData/AdventureBoss/AdventureBossWantedRewardSheetTest.cs
+3 −1 .Lib9c.Tests/TableData/Summon/SummonSheetTest.cs
+16 −0 .Lib9c.Tests/TableSheets.cs
+1 −1 .Libplanet
+4 −61 Lib9c.Policy/Policy/BlockPolicySource.cs
+223 −0 Lib9c/Action/AdventureBoss/ClaimAdventureBossReward.cs
+361 −0 Lib9c/Action/AdventureBoss/ExploreAdventureBoss.cs
+246 −0 Lib9c/Action/AdventureBoss/SweepAdventureBoss.cs
+170 −0 Lib9c/Action/AdventureBoss/UnlockFloor.cs
+165 −0 Lib9c/Action/AdventureBoss/Wanted.cs
+21 −0 Lib9c/Action/Exceptions/AdventureBoss/AlreadyClaimedException.cs
+21 −0 Lib9c/Action/Exceptions/AdventureBoss/ClaimExpiredException.cs
+21 −0 Lib9c/Action/Exceptions/AdventureBoss/InsufficientStakingException.cs
+21 −0 Lib9c/Action/Exceptions/AdventureBoss/InvalidAdventureBossSeasonException.cs
+21 −0 Lib9c/Action/Exceptions/AdventureBoss/InvalidBountyException.cs
+21 −0 Lib9c/Action/Exceptions/AdventureBoss/MaxInvestmentCountExceededException.cs
+21 −0 Lib9c/Action/Exceptions/AdventureBoss/PreviousBountyException.cs
+21 −0 Lib9c/Action/Exceptions/AdventureBoss/SeasonInProgressException.cs
+24 −0 Lib9c/Action/Exceptions/EmptyRewardException.cs
+7 −1 Lib9c/Addresses.cs
+348 −0 Lib9c/Battle/AdventureBoss/AdventureBossSimulator.cs
+5 −0 Lib9c/Battle/WeightedSelector.cs
+25 −0 Lib9c/Data/AdventureBossGameData.cs
+1 −0 Lib9c/GameConfig.cs
+402 −0 Lib9c/Helper/AdventureBossHelper.cs
+93 −0 Lib9c/Model/AdventureBoss/BountyBoard.cs
+88 −0 Lib9c/Model/AdventureBoss/ExploreBoard.cs
+51 −0 Lib9c/Model/AdventureBoss/Explorer.cs
+36 −0 Lib9c/Model/AdventureBoss/ExplorerList.cs
+44 −0 Lib9c/Model/AdventureBoss/Investor.cs
+40 −0 Lib9c/Model/AdventureBoss/SeasonInfo.cs
+27 −0 Lib9c/Model/BattleStatus/AdventureBoss/Breakthrough.cs
+22 −0 Lib9c/Model/BattleStatus/AdventureBoss/StageBuff.cs
+1 −1 Lib9c/Model/Character/CharacterBase.cs
+1 −0 Lib9c/Model/Character/EnemyPlayer.cs
+8 −0 Lib9c/Model/Character/Player.cs
+6 −0 Lib9c/Model/IStage.cs
+23 −0 Lib9c/Model/Item/Grimoire.cs
+0 −56 Lib9c/Model/Item/Inventory.cs
+5 −0 Lib9c/Model/Item/ItemFactory.cs
+3 −0 Lib9c/Model/Item/ItemType.cs
+36 −0 Lib9c/Model/Mail/AdventureBossRaffleWinnerMail.cs
+1 −0 Lib9c/Model/Mail/IMail.cs
+2 −0 Lib9c/Model/Mail/Mail.cs
+5 −0 Lib9c/Model/State/AvatarState.cs
+144 −2 Lib9c/Model/State/GameConfigState.cs
+182 −0 Lib9c/Module/AdventureBossModule.cs
+8 −0 Lib9c/TableCSV/AdventureBoss.meta
+5 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossContributionRewardSheet.csv
+7 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossContributionRewardSheet.csv.meta
+81 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossFloorFirstRewardSheet.csv
+7 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossFloorFirstRewardSheet.csv.meta
+81 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossFloorPointSheet.csv
+7 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossFloorPointSheet.csv.meta
+81 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossFloorSheet.csv
+7 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossFloorSheet.csv.meta
+81 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossFloorWaveSheet.csv
+7 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossFloorWaveSheet.csv.meta
+10 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossNcgRewardRatioSheet.csv
+7 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossNcgRewardRatioSheet.csv.meta
+5 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossSheet.csv
+7 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossSheet.csv.meta
+13 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossUnlockFloorCostSheet.csv
+7 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossUnlockFloorCostSheet.csv.meta
+5 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossWantedRewardSheet.csv
+7 −0 Lib9c/TableCSV/AdventureBoss/AdventureBossWantedRewardSheet.csv.meta
+5 −1 Lib9c/TableCSV/Character/CharacterSheet.csv
+2 −1 Lib9c/TableCSV/Crystal/CrystalEquipmentGrindingSheet.csv
+9 −1 Lib9c/TableCSV/GameConfigSheet.csv
+2 −1 Lib9c/TableCSV/Item/EquipmentItemSheet.csv
+2 −1 Lib9c/TableCSV/Item/ItemRequirementSheet.csv
+2 −1 Lib9c/TableCSV/Item/MaterialItemSheet.csv
+19 −0 Lib9c/TableCSV/Skill/SkillBuffSheet.csv
+8 −3 Lib9c/TableCSV/Skill/SkillSheet.csv
+141 −128 Lib9c/TableCSV/Skill/StatBuffSheet.csv
+49 −0 Lib9c/TableData/AdventureBoss/AdventureBossContributionRewardSheet.cs
+40 −0 Lib9c/TableData/AdventureBoss/AdventureBossFloorFirstRewardSheet.cs
+31 −0 Lib9c/TableData/AdventureBoss/AdventureBossFloorPointSheet.cs
+120 −0 Lib9c/TableData/AdventureBoss/AdventureBossFloorSheet.cs
+102 −0 Lib9c/TableData/AdventureBoss/AdventureBossFloorWaveSheet.cs
+29 −0 Lib9c/TableData/AdventureBoss/AdventureBossNcgRewardRatioSheet.cs
+62 −0 Lib9c/TableData/AdventureBoss/AdventureBossSheet.cs
+32 −0 Lib9c/TableData/AdventureBoss/AdventureBossUnlockFloorCostSheet.cs
+52 −0 Lib9c/TableData/AdventureBoss/AdventureBossWantedRewardSheet.cs
+1 −1 Lib9c/TableData/Summon/SummonSheet.cs
+0 −47 Lib9c/TableData/UnlockHelper.cs
23 changes: 20 additions & 3 deletions NineChronicles.Headless.Tests/GraphTypes/StandaloneMutationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -903,14 +903,31 @@ public async Task StageTransaction()
StandaloneContextFx.BlockChain = service.Swarm?.BlockChain;

var pk = new PrivateKey();
ActionBase action = new ApprovePledge
ActionBase patronPrepareAction = new PrepareRewardAssets
{
PatronAddress = new PrivateKey().Address
RewardPoolAddress = MeadConfig.PatronAddress,
Assets = new List<FungibleAssetValue>
{
1 * Currencies.Mead,
},
};
var tx = Transaction.Create(0, pk, BlockChain.Genesis.Hash, new[] { action.PlainValue });
var tx = Transaction.Create(0, pk, BlockChain.Genesis.Hash, new[] { patronPrepareAction.PlainValue });
var payload = ByteUtil.Hex(tx.Serialize());
var stageTxMutation = $"mutation {{ stageTransaction(payload: \"{payload}\") }}";
var stageTxResult = await ExecuteQueryAsync(stageTxMutation);
Assert.Null(stageTxResult.Errors);

var block = service.BlockChain.ProposeBlock(ProposerPrivateKey, null);
service.BlockChain.Append(block, GenerateBlockCommit(1, block.Hash, new List<PrivateKey>() { ProposerPrivateKey }));

ActionBase action = new ApprovePledge
{
PatronAddress = new PrivateKey().Address
};
tx = Transaction.Create(0, pk, BlockChain.Genesis.Hash, new[] { action.PlainValue });
payload = ByteUtil.Hex(tx.Serialize());
stageTxMutation = $"mutation {{ stageTransaction(payload: \"{payload}\") }}";
stageTxResult = await ExecuteQueryAsync(stageTxMutation);
var error = Assert.Single(stageTxResult.Errors!);
Assert.Contains("gas", error.Message);
}
Expand Down
2 changes: 1 addition & 1 deletion NineChronicles.Headless/ArenaParticipantsWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public static List<ArenaParticipant> GetArenaParticipants(IWorldState worldState
{
var (avatarAddr, score, rank) = tuple;
var runeStates = worldState.GetRuneState(avatarAddr, out _);
var avatar = worldState.GetAvatarState(avatarAddr);
var avatar = worldState.GetAvatarState(avatarAddr, getWorldInformation: false, getQuestList: false);
var itemSlotState =
worldState.GetLegacyState(ItemSlotState.DeriveAddress(avatarAddr, BattleType.Arena)) is
List itemSlotList
Expand Down

0 comments on commit 4e9d8dd

Please sign in to comment.