diff --git a/utopia-gamification/src/main/kotlin/tw/waterballsa/utopia/utopiagamification/quest/domain/Mission.kt b/utopia-gamification/src/main/kotlin/tw/waterballsa/utopia/utopiagamification/quest/domain/Mission.kt index f7569812..b42f17a1 100644 --- a/utopia-gamification/src/main/kotlin/tw/waterballsa/utopia/utopiagamification/quest/domain/Mission.kt +++ b/utopia-gamification/src/main/kotlin/tw/waterballsa/utopia/utopiagamification/quest/domain/Mission.kt @@ -15,7 +15,6 @@ class Mission( ) { constructor(player: Player, quest: Quest) : this(randomUUID(), player, quest, IN_PROGRESS, null) - constructor(player: Player, quest: Quest, state: State) : this(randomUUID(), player, quest, state, null) var state: State = state private set diff --git a/utopia-gamification/src/main/kotlin/tw/waterballsa/utopia/utopiagamification/quest/listeners/presenters/ClaimMissionRewardPresenter.kt b/utopia-gamification/src/main/kotlin/tw/waterballsa/utopia/utopiagamification/quest/listeners/presenters/ClaimMissionRewardPresenter.kt index 60368d0d..2073f9a0 100644 --- a/utopia-gamification/src/main/kotlin/tw/waterballsa/utopia/utopiagamification/quest/listeners/presenters/ClaimMissionRewardPresenter.kt +++ b/utopia-gamification/src/main/kotlin/tw/waterballsa/utopia/utopiagamification/quest/listeners/presenters/ClaimMissionRewardPresenter.kt @@ -18,7 +18,6 @@ class ClaimMissionRewardPresenter : ClaimMissionRewardUsecase.Presenter { 目前等級:${mission.player.level} 目前經驗值:${mission.player.currentExp()}/${mission.player.level.toLevelRange().expLimit} """.trimIndent(), - mission.nextQuestId() ) } diff --git a/utopia-gamification/src/test/kotlin/tw/waterballsa/utopia/utopiagamification/quest/it/ClaimMissionRewardUsecaseTest.kt b/utopia-gamification/src/test/kotlin/tw/waterballsa/utopia/utopiagamification/quest/it/ClaimMissionRewardUsecaseTest.kt index a05431c0..ad2e7f60 100644 --- a/utopia-gamification/src/test/kotlin/tw/waterballsa/utopia/utopiagamification/quest/it/ClaimMissionRewardUsecaseTest.kt +++ b/utopia-gamification/src/test/kotlin/tw/waterballsa/utopia/utopiagamification/quest/it/ClaimMissionRewardUsecaseTest.kt @@ -16,6 +16,7 @@ import tw.waterballsa.utopia.utopiagamification.quest.usecase.ClaimMissionReward import tw.waterballsa.utopia.utopiagamification.repositories.MissionRepository import tw.waterballsa.utopia.utopiagamification.repositories.PlayerRepository import tw.waterballsa.utopia.utopiatestkit.annotations.UtopiaTest +import java.util.* @UtopiaTest class ClaimMissionRewardUsecaseTest @Autowired constructor( @@ -36,6 +37,8 @@ class ClaimMissionRewardUsecaseTest @Autowired constructor( 1.0f ) ) + private val completedMission = Mission(UUID.randomUUID(), playerA, quest, COMPLETED, null) + private val claimedMission = Mission(UUID.randomUUID(), playerA, quest, CLAIMED, null) @BeforeEach fun setup() { @@ -52,7 +55,6 @@ class ClaimMissionRewardUsecaseTest @Autowired constructor( @Test fun `test player claims mission rewards`() { //given - val completedMission = Mission(playerA, quest, COMPLETED) missionRepository.saveMission(completedMission) val request = ClaimMissionRewardUsecase.Request(playerA.id, quest.id) @@ -103,8 +105,7 @@ class ClaimMissionRewardUsecaseTest @Autowired constructor( ) @Test fun `test players cannot claim mission rewards repeatedly`() { - val mission = Mission(playerA, quest, CLAIMED) - missionRepository.saveMission(mission) + missionRepository.saveMission(claimedMission) val request = ClaimMissionRewardUsecase.Request(playerA.id, quest.id) val presenter = ClaimMissionRewardPresenter() diff --git a/wsa-bot-commands.md b/wsa-bot-commands.md index 6cd1f38c..c5339402 100644 --- a/wsa-bot-commands.md +++ b/wsa-bot-commands.md @@ -38,11 +38,6 @@ |:--------------:| ---------------------------------------------------------------------------------------------------------- | ----------- | | random lottery | number(INTEGER): Number of choose members per room.
role(ROLE): Only select specific role in this round | Lottery | -## rock-paper-scissors -| Commands | Arguments | Description | -|:-------------------:| --------- | ------------------------------------- | -| rock-paper-scissors | | start a new rock paper scissors game! | - ## roulette | Commands | Arguments | Description | |:--------:| --------- | --------------- | @@ -60,13 +55,21 @@ | weekly-messages-volume | channel-name(STRING): The channel to show the weekly messages volume | Show the weekly messages volume of the channel | ## quiz + | Commands | Arguments | Description | |:--------:| ----------------------------------------- | -------------------- | | quiz | name(STRING): The quiz you want to start. | The quiz for utopia. | ## utopia + | Commands | Arguments | Description | |:------------------:| ------------------------ | ------------------------------------- | | utopia first-quest | | get first quest | | utopia re-render | | re-render in_progress/completed quest | -| utopia leaderboard | options(STRING): my rank | leaderboard | \ No newline at end of file +| utopia leaderboard | options(STRING): my-rank | leaderboard | + +## rock-paper-scissors + +| Commands | Arguments | Description | +|:-------------------:| --------- | ------------------------------------- | +| rock-paper-scissors | | start a new rock paper scissors game! |