Open TerdyTheTerd opened 4 years ago
To clarify, this power is different than the max claimable chunks per player. A player might have 10 claimable chunks, but due to dying only has 5 claiming power, so they can only claim 5 of those 10 chunks. This is intended to serve as incentive to not die, as well as incentives for doing things that would increase the players power. Teams operate similarly, thus teams will need to monitor their claiming power levels and factor that into their decisions.
For now I've implemented a temporary solution to removing claims when the teams power level drops below a certain level, it will go through the teams claims and remove the claims with the least connected claims to them. This should represent the outer most claims. These will be removed in ascending order until the chunks claimed matches the teams claiming power.
One issue is that when a player joins a team the teams power does not update because the event that runs is on FTBLib. I will need to catch this and run the updateTeamPower method before passing the event on.
Add a power system to players and teams.
Each player can have up to 10 power, they gain or loose power based on events.
Teams have a total power, which is a sum of all members powers.
Teams can only claim chunks if they have enough power to do so.
If a teams power drops below their number of claimed chunks, then the outer most chunks/most recently claimed chunks will be unclaimed, and the team will be notified (owner if online)