Skip to content

Conversation

@SomeGuyEight
Copy link
Contributor

Hey! Here is the changes I made to implement min/maxLevel & handicap functionality. I have tested everything on the Fabric 1.5 1.20.1 version. There were no errors there & everything functioned as expected. Some colors & property names may not be what you would prefer, so feel free to change them as you see fit. I did my best to name everything off of it's functionality. Feel free to reach out if you have any questions!

Here are the differences between Fabric & Forge in the updates I made:

1. ChallengeConfig files
    a. Formating of properties is different
2. ChallengeCommand files
    a. Only how the properties are formatted -> ".get()" used in Forge

Here are the individual changes made to each of the six files:

ChallengeConfig:
    - Added DEFAULT_HANDICAP/"defaultHandicap" to config

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

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
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