RedstoneWincondition #274
@ -118,17 +118,20 @@ public class WinconditionPoints extends PercentWincondition implements Listener
|
||||
@Override
|
||||
protected void enable() {
|
||||
super.enable();
|
||||
points = 0;
|
||||
int ownBlocks = totalBlocks;
|
||||
int enemyBlocks = teamMap.get(Fight.getOpposite(fightTeam)).totalBlocks;
|
||||
|
||||
if(enemyBlocks == 0)
|
||||
TeamPoints opponent = teamMap.get(Fight.getOpposite(fightTeam));
|
||||
if(opponent.totalBlocks == 0)
|
||||
return;
|
||||
|
||||
if(enemyBlocks < ownBlocks) {
|
||||
setup(opponent.totalBlocks);
|
||||
opponent.setup(totalBlocks);
|
||||
}
|
||||
|
||||
private void setup(int enemyBlocks){
|
||||
points = 0;
|
||||
if(enemyBlocks < totalBlocks) {
|
||||
this.factor = 100; //Original mit 20 (20% = 0.2 ergeben 2000 Punkte
|
||||
} else {
|
||||
double f = 100.0 * ownBlocks / enemyBlocks;
|
||||
double f = 100.0 * totalBlocks / enemyBlocks;
|
||||
|
||||
if(f > 100)
|
||||
f = 100;
|
||||
|
@ -41,5 +41,4 @@ public class WinconditionRelativeWhitelistPercent extends PercentWincondition im
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren