Fixed low rank on attack map completion
This commit is contained in:
@@ -26,8 +26,10 @@ public class Stats{
|
|||||||
public RankResult calculateRank(Zone zone, boolean launched){
|
public RankResult calculateRank(Zone zone, boolean launched){
|
||||||
float score = 0;
|
float score = 0;
|
||||||
|
|
||||||
//each new launch period adds onto the rank 'points'
|
if(launched && zone.getRules().attackMode){
|
||||||
if(wavesLasted >= zone.conditionWave){
|
score += 3f;
|
||||||
|
}else if(wavesLasted >= zone.conditionWave){
|
||||||
|
//each new launch period adds onto the rank 'points'
|
||||||
score += (float)((wavesLasted - zone.conditionWave) / zone.launchPeriod + 1) * 1.2f;
|
score += (float)((wavesLasted - zone.conditionWave) / zone.launchPeriod + 1) * 1.2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package io.anuke.mindustry.ui.dialogs;
|
package io.anuke.mindustry.ui.dialogs;
|
||||||
|
|
||||||
import io.anuke.arc.Core;
|
import io.anuke.arc.*;
|
||||||
import io.anuke.mindustry.core.GameState.State;
|
import io.anuke.mindustry.core.GameState.*;
|
||||||
import io.anuke.mindustry.game.Stats.RankResult;
|
import io.anuke.mindustry.game.Stats.*;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.*;
|
||||||
import io.anuke.mindustry.type.Item;
|
import io.anuke.mindustry.type.*;
|
||||||
import io.anuke.mindustry.type.Item.Icon;
|
import io.anuke.mindustry.type.Item.*;
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user