Merge branch 'main' of http://git.hivekion.com:3000/liyudong/simulation-backend
This commit is contained in:
commit
0885d4e860
|
|
@ -134,8 +134,14 @@ public class BattleRootTask extends AbtParentTask {
|
||||||
teamLng = scenarioInfoOnTime.getTeam().getLng().toString();
|
teamLng = scenarioInfoOnTime.getTeam().getLng().toString();
|
||||||
if(scenarioInfoOnTime.getPerson().getCurrent() >0) {
|
if(scenarioInfoOnTime.getPerson().getCurrent() >0) {
|
||||||
//
|
//
|
||||||
deathConsume = RandomUtil.getSecureRandom().nextInt(2) * intervalDuringTime;
|
int deathParam = RandomUtil.getSecureRandom().nextInt(6);
|
||||||
injuredConsume = RandomUtil.getSecureRandom().nextInt(3) * intervalDuringTime;
|
int baseParam = deathParam/2;
|
||||||
|
if(deathParam !=0 ) {
|
||||||
|
deathConsume = Long.valueOf(deathParam % baseParam);
|
||||||
|
}else{
|
||||||
|
deathConsume =0L;
|
||||||
|
}
|
||||||
|
injuredConsume = Long.valueOf(RandomUtil.getSecureRandom().nextInt(3));
|
||||||
ammunitionConsume = intervalDuringTime * (0.1D + RandomUtil.getSecureRandom().nextDouble());
|
ammunitionConsume = intervalDuringTime * (0.1D + RandomUtil.getSecureRandom().nextDouble());
|
||||||
foodConsume = intervalDuringTime * FOOD_SPREED;
|
foodConsume = intervalDuringTime * FOOD_SPREED;
|
||||||
waterConsume = intervalDuringTime * WATER_SPREED;
|
waterConsume = intervalDuringTime * WATER_SPREED;
|
||||||
|
|
@ -485,6 +491,4 @@ public class BattleRootTask extends AbtParentTask {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user