Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement missing config options. #31

Merged
merged 4 commits into from
Jan 3, 2019
Merged

Implement missing config options. #31

merged 4 commits into from
Jan 3, 2019

Conversation

BONNe
Copy link
Member

@BONNe BONNe commented Jan 2, 2019

In this PR I add missing config option usage.

I implement sumTeamDeaths, maxDeaths and deathPenalty options.
It was necessary to change level calculation. Now it will calculate deathHandicap based on sumTeamDeaths and maxDeaths values. To implement deathPenalty I introduce a local variable that is calculated based on rawBlockCount and deathPenalty and use this variable to calculate level and points till next level.

Add TeamJoinEvent listener that checks if TeamJoinDeathReset is enabled and resets player death count.
Improved calculating death penalty. Death count now checks if it must include teamDeaths.
maxDeaths now is working, as deathHandicap will be set to minimal value from it and current deathCount.
Change level and pointsToNextLevel calculation. Now it will remove deathCount * deathPenalty points from rawBlockCount and use new value to calculate current level and points till next one.
Copy link
Member

@Poslovitch Poslovitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR's fine, but the resetting of deaths must be done in BentoBox.

@tastybento
Copy link
Member

@Poslovitch I think this is the correct place for this. The death calculations are all specific to this add-on.

@tastybento
Copy link
Member

Okay I see that some changes were made. Right now this works.

@tastybento tastybento merged commit 498c880 into BentoBoxWorld:develop Jan 3, 2019
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.

3 participants