World Processor: SetRuleI unitCrashDamage Implemented
This commit is contained in:
@@ -1515,7 +1515,7 @@ public class LExecutor{
|
|||||||
state.rules.bannedUnits.remove(u);
|
state.rules.bannedUnits.remove(u);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case unitHealth, unitBuildSpeed, unitMineSpeed, unitCost, unitDamage, blockHealth, blockDamage, buildSpeed, rtsMinSquad, rtsMinWeight -> {
|
case unitHealth, unitBuildSpeed, unitCrashDamage, unitMineSpeed, unitCost, unitDamage, blockHealth, blockDamage, buildSpeed, rtsMinSquad, rtsMinWeight -> {
|
||||||
Team team = p1.team();
|
Team team = p1.team();
|
||||||
if(team != null){
|
if(team != null){
|
||||||
float num = value.numf();
|
float num = value.numf();
|
||||||
@@ -1523,6 +1523,7 @@ public class LExecutor{
|
|||||||
case buildSpeed -> team.rules().buildSpeedMultiplier = Mathf.clamp(num, 0.001f, 50f);
|
case buildSpeed -> team.rules().buildSpeedMultiplier = Mathf.clamp(num, 0.001f, 50f);
|
||||||
case unitHealth -> team.rules().unitHealthMultiplier = Math.max(num, 0.001f);
|
case unitHealth -> team.rules().unitHealthMultiplier = Math.max(num, 0.001f);
|
||||||
case unitBuildSpeed -> team.rules().unitBuildSpeedMultiplier = Mathf.clamp(num, 0f, 50f);
|
case unitBuildSpeed -> team.rules().unitBuildSpeedMultiplier = Mathf.clamp(num, 0f, 50f);
|
||||||
|
case unitCrashDamage -> team.rules().unitCrashDamageMultiplier = Math.max(num, 0f);
|
||||||
case unitMineSpeed -> team.rules().unitMineSpeedMultiplier = Math.max(num, 0f);
|
case unitMineSpeed -> team.rules().unitMineSpeedMultiplier = Math.max(num, 0f);
|
||||||
case unitCost -> team.rules().unitCostMultiplier = Math.max(num, 0f);
|
case unitCost -> team.rules().unitCostMultiplier = Math.max(num, 0f);
|
||||||
case unitDamage -> team.rules().unitDamageMultiplier = Math.max(num, 0f);
|
case unitDamage -> team.rules().unitDamageMultiplier = Math.max(num, 0f);
|
||||||
|
|||||||
@@ -1552,7 +1552,7 @@ public class LStatements{
|
|||||||
fields(table, "w", p3, s -> p3 = s);
|
fields(table, "w", p3, s -> p3 = s);
|
||||||
fields(table, "h", p4, s -> p4 = s);
|
fields(table, "h", p4, s -> p4 = s);
|
||||||
}
|
}
|
||||||
case buildSpeed, unitHealth, unitBuildSpeed, unitMineSpeed, unitCost, unitDamage, blockHealth, blockDamage, rtsMinSquad, rtsMinWeight -> {
|
case buildSpeed, unitHealth, unitBuildSpeed, unitCrashDamage, unitMineSpeed, unitCost, unitDamage, blockHealth, blockDamage, rtsMinSquad, rtsMinWeight -> {
|
||||||
if(p1.equals("0")){
|
if(p1.equals("0")){
|
||||||
p1 = "@sharded";
|
p1 = "@sharded";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public enum LogicRule{
|
|||||||
buildSpeed,
|
buildSpeed,
|
||||||
unitHealth,
|
unitHealth,
|
||||||
unitBuildSpeed,
|
unitBuildSpeed,
|
||||||
|
unitCrashDamage,
|
||||||
unitMineSpeed,
|
unitMineSpeed,
|
||||||
unitCost,
|
unitCost,
|
||||||
unitDamage,
|
unitDamage,
|
||||||
|
|||||||
Reference in New Issue
Block a user