Skip to content

Conversation

@SomeGuyEight
Copy link
Contributor

This is a second version of the Pull Request 19.

This one includes a possible iteration on the FakeStore. The only error I get is related to the cast done, so while I am implementing a functional store, I made a kotlin versions of the fake store & classes that will fill the same purpose without casting.

I did some testing with battles & nothing seemed to be broken even with closing the game. The pokemon are still not considered wild as before. Hope this might help!

image

SomeGuyEight and others added 10 commits June 8, 2024 17:15
ChallengeCommand:
- Refactored ChallengeRequest record with min/max level & handicap
- Refactored ChallengeCommand.register to have 12 versions (TODO: Refactor to be more flexible & concise)
- Refactored ChallengeCommand.challengePlayer to include min/max level & handicap
- Added check in ChallengeCommand.challengePlayer to clamp minLevel to maxLevel
- Refactored notification format in ChallengeCommand.challengePlayer to display level range & handicap to challengedPlayer

ChallengeUtil:
- Refactored ChallengeUtil.createChallengeRequest to intake min/maxLevel & handicap
- Added method ChallengeUtil.getBattlePokemonAdjustedLevel to handle each individual pokemon level according to min/maxLevel, handicap, & clamp to (1,100)

LeadPokemonSelectionSession:
- Refactored LeadPokemonSelectionSession.beginBattle to use min/maxLevel & handicap to pokemon

LeadPokemonMenuProvider:
- Refactored LeadPokemonMenuProvider.setupPokemonRepresentation to apply min/maxLevel & handicap to pokemon

ChallengeBattleBuilder:
- Refactored ChallengeBattleBuilder.lvlxpvp to intake & pass min/maxLevel & handicap to ChallengeBattleBuilder.createBattleTeamFromParty
- Refactored ChallengeBattleBuilder.createBattleTeamFromParty to apply min/maxLevel & handicap to pokemon
build.gradle:
plugins:
- updated fabric-loom version -> 1.6-snapshot
- updated kotlin.jvm version -> 2.0.0
dependencies:
- added modImplementation for kotlin -> "net.fabricmc:fabric-language-kotlin:1.11.0+kotlin.2.0.0"

gradle.properties:
- updated -> loader_version=0.15.11
- updated -> fabric_version=0.92.2+1.20.1
- updated -> cloth_config_version=11.1.118

gradle-wrapper.properties:
- updated gradle to 8.7-> distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
Refactor -> Reformat of ChallengeCommand min/maxLevel & handicap inputs
…tore & FakeStorePosition without casting.

- Note: This should work unless some of the functions need to be called in the FakeStore.
- Possible refinement: We could trim out the playerUUID completely if it does not matter. The FakePlayerStore has a default value, but I am passing in the playerUUID if one is found b/c that is how the first iteration did it. I tested this with some basic battles including disconnecting & didn't run into any problems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant