diff --git a/core/src/mindustry/entities/bullet/LightningBulletType.java b/core/src/mindustry/entities/bullet/LightningBulletType.java index 6421eedb77..585737f758 100644 --- a/core/src/mindustry/entities/bullet/LightningBulletType.java +++ b/core/src/mindustry/entities/bullet/LightningBulletType.java @@ -28,7 +28,7 @@ public class LightningBulletType extends BulletType{ @Override public float estimateDPS(){ - return super.estimateDPS() * Math.max(lightningLength / 2f, 1); + return super.estimateDPS() * Math.max(lightningLength / 4f, 1); } @Override diff --git a/core/src/mindustry/game/GameStats.java b/core/src/mindustry/game/GameStats.java index 8108f2ddad..19d404c802 100644 --- a/core/src/mindustry/game/GameStats.java +++ b/core/src/mindustry/game/GameStats.java @@ -22,37 +22,12 @@ public class GameStats{ /** Friendly buildings destroyed. */ public int buildingsDestroyed; - //TODO fix - public RankResult calculateRank(Sector zone, boolean launched){ + //unused + public RankResult calculateRank(Sector sector){ float score = 0; - //TODO implement wave/attack mode based score - /* - if(launched && zone.getRules().attackMode){ - 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; - }*/ - - //TODO implement - int capacity = 3000;//zone.loadout.findCore().itemCapacity; - - //weigh used fractions - float frac = 0f; - Seq obtainable = zone.save == null ? new Seq<>() : zone.info.resources.select(i -> i instanceof Item).as(); - for(Item item : obtainable){ - frac += Mathf.clamp((float)itemsDelivered.get(item, 0) / capacity) / (float)obtainable.size; - } - - score += frac * 1.6f; - - if(!launched){ - score *= 0.5f; - } - - int rankIndex = Mathf.clamp((int)(score), 0, Rank.values().length - 1); - Rank rank = Rank.values()[rankIndex]; + int rankIndex = Mathf.clamp((int)score, 0, Rank.all.length - 1); + Rank rank = Rank.all[rankIndex]; String sign = Math.abs((rankIndex + 0.5f) - score) < 0.2f || rank.name().contains("S") ? "" : (rankIndex + 0.5f) < score ? "-" : "+"; return new RankResult(rank, sign); @@ -70,6 +45,8 @@ public class GameStats{ } public enum Rank{ - F, D, C, B, A, S, SS + F, D, C, B, A, S, SS; + + public static final Rank[] all = values(); } } diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 09c4f4bca4..9cfc8c1594 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -323,7 +323,7 @@ public class UnitType extends UnlockableContent{ //suicide enemy if(weapons.contains(w -> w.bullet.killShooter)){ //scale down DPS to be insignificant - dpsEstimate /= 40f; + dpsEstimate /= 20f; } } } diff --git a/core/src/mindustry/ui/dialogs/GameOverDialog.java b/core/src/mindustry/ui/dialogs/GameOverDialog.java index ceea590826..949125b93a 100644 --- a/core/src/mindustry/ui/dialogs/GameOverDialog.java +++ b/core/src/mindustry/ui/dialogs/GameOverDialog.java @@ -2,7 +2,6 @@ package mindustry.ui.dialogs; import arc.*; import mindustry.game.EventType.*; -import mindustry.game.GameStats.*; import mindustry.game.*; import mindustry.type.*; import mindustry.ui.*; @@ -78,11 +77,6 @@ public class GameOverDialog extends BaseDialog{ } } - if(state.hasSector()){ - RankResult result = state.stats.calculateRank(state.getSector(), true); - t.add(Core.bundle.format("stat.rank", result.rank + result.modifier)); - t.row(); - } }).pad(12); if(state.isCampaign()){ diff --git a/core/src/mindustry/ui/dialogs/MapsDialog.java b/core/src/mindustry/ui/dialogs/MapsDialog.java index 790f036efa..605a0bec1c 100644 --- a/core/src/mindustry/ui/dialogs/MapsDialog.java +++ b/core/src/mindustry/ui/dialogs/MapsDialog.java @@ -177,11 +177,14 @@ public class MapsDialog extends BaseDialog{ t.row(); t.add("@editor.author").padRight(10).color(Color.gray); t.row(); - t.add(!map.custom && map.author().isEmpty() ? "Anuke" : map.author()).growX().wrap().padTop(2); + t.add(!map.custom && map.tags.get("author", "").isEmpty() ? "Anuke" : map.author()).growX().wrap().padTop(2); t.row(); - t.add("@editor.description").padRight(10).color(Color.gray).top(); - t.row(); - t.add(map.description()).growX().wrap().padTop(2); + + if(!map.tags.get("description", "").isEmpty()){ + t.add("@editor.description").padRight(10).color(Color.gray).top(); + t.row(); + t.add(map.description()).growX().wrap().padTop(2); + } }).height(mapsize).width(mapsize); table.row(); diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 59a75babf2..8203f14dd9 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -617,7 +617,7 @@ public class Block extends UnlockableContent{ public ItemStack[] researchRequirements(){ ItemStack[] out = new ItemStack[requirements.length]; for(int i = 0; i < out.length; i++){ - int quantity = 60 + Mathf.round(Mathf.pow(requirements[i].amount, 1.15f) * 20 * researchCostMultiplier, 10); + int quantity = 60 + Mathf.round(Mathf.pow(requirements[i].amount, 1.12f) * 20 * researchCostMultiplier, 10); out[i] = new ItemStack(requirements[i].item, UI.roundAmount(quantity)); } diff --git a/desktop/src/mindustry/desktop/steam/SStats.java b/desktop/src/mindustry/desktop/steam/SStats.java index 9338aafc5b..6fb335ae26 100644 --- a/desktop/src/mindustry/desktop/steam/SStats.java +++ b/desktop/src/mindustry/desktop/steam/SStats.java @@ -7,7 +7,6 @@ import mindustry.*; import mindustry.content.*; import mindustry.entities.units.*; import mindustry.game.EventType.*; -import mindustry.game.GameStats.*; import mindustry.gen.*; import mindustry.type.*; @@ -242,10 +241,6 @@ public class SStats implements SteamUserStatsCallback{ if(Vars.state.rules.attackMode){ SStat.attacksWon.add(); } - - RankResult result = state.stats.calculateRank(state.getSector(), true); - if(result.rank == Rank.S) earnSRank.complete(); - if(result.rank == Rank.SS) earnSSRank.complete(); } if(state.rules.pvp){