速度公式修改
parent
4b324dbd2b
commit
7e8cbaa914
|
@ -1,3 +1,3 @@
|
|||
Id BornItem SpeedFormula InitialEnergy EnergyRecoverSpeed ActionPowerRormula
|
||||
int mut,int#int,2 mut,float#float,1 int int mut,int#int,1
|
||||
1 4#100|14#100|10001#1 0#0#0.3164#0 100 2 0#0#10#1
|
||||
Id BornItem SpeedFormula InitialEnergy EnergyRecoverSpeed ActionPowerRormula Speed
|
||||
int mut,int#int,2 mut,int#int,1 int int mut,int#int,1 mut,int#int,1
|
||||
1 4#100|14#100|10001#1 0#0#0.3164#0 100 2 0#0#10#1 70#100
|
||||
|
|
|
@ -20,6 +20,8 @@ public class SGameSetting implements BaseConfig {
|
|||
|
||||
private int[] actionPowerRormula;
|
||||
|
||||
private int[] speed;
|
||||
|
||||
private static SGameSetting gameSetting;
|
||||
|
||||
|
||||
|
@ -60,6 +62,10 @@ public class SGameSetting implements BaseConfig {
|
|||
return actionPowerRormula;
|
||||
}
|
||||
|
||||
public int[] getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public float calSpeed(float speed, int breakId){
|
||||
if(breakId == 0){
|
||||
return 0;
|
||||
|
|
|
@ -521,7 +521,9 @@ public class HeroLogic {
|
|||
float characterLevelPara = sHeroLevlConfig.getCharacterLevelPara();
|
||||
Map<Integer, Float> paraForHero = getParaForHero(hero);
|
||||
if(type == GlobalsDef.SPEED_TYPE){
|
||||
return (int)(baseValue * sHeroLevlConfig.getSpeedLevelPara() + SGameSetting.getGameSetting().calSpeed(baseValue, hero.getBreakId()));
|
||||
int[] speed = SGameSetting.getGameSetting().getSpeed();
|
||||
float randSpeedRatio = MathUtils.random(speed[0], speed[1]) / 100.0f;
|
||||
return (int)((baseValue * sHeroLevlConfig.getSpeedLevelPara() + SGameSetting.getGameSetting().calSpeed(baseValue, hero.getBreakId()))*randSpeedRatio);
|
||||
}
|
||||
return (int)(baseValue * ( 1 + paraForHero.get(GlobalsDef.RANKUP_PARA_TYPE)/10000.f) * characterLevelPara + baseValue * paraForHero.get(GlobalsDef.BREAK_PARA_TYPE)/10000.f);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue