主线怪物削弱bug修复

master_haizei
grimm 2023-12-25 16:39:16 +08:00
parent dafff04cff
commit 6a087e99bd
2 changed files with 6 additions and 2 deletions

View File

@ -125,14 +125,18 @@ public class MainLineOrInnerDemonFightHandler implements IFightEventProcesor {
*
*/
public static double getDownNum(int uid, int type){
int nowInt = TimeUtils.nowInt();
// 耗时(分)/ 减少比例
int[] timeDowns = SSpecialConfig.getIntegerArrayValue("Level_Time_Down");
// 最大减少比例
int maxDown = SSpecialConfig.getIntegerValue("Level_Time_Maxdown");
// 失败时间
int failTime = getFailTime(uid, type);
if (failTime == 0){
failTime = nowInt;
}
// 按照分钟计算减免系数
int minutesTime = failTime / 1000 / timeDowns[0];
int minutesTime = (nowInt - failTime) / 60 / timeDowns[0];
// 万分比
double downTime = 1 - (Math.min(minutesTime * timeDowns[1], maxDown) / 10000d);
LOGGER.info("关卡挑战战力降低日志uid{},类型:{},系数:{}",uid, type, downTime);

View File

@ -580,10 +580,10 @@ public class CBean2Proto {
StringBuilder monsterSkillList = new StringBuilder(); //火风水地光暗
float[] damageReduceFactor = sMonsterConfig.getElementDamageReduceFactor();
monsterPropertyList.append(sMonsterConfig.getLevel()).append("#"); //等级
monsterPropertyList.append(curHp).append("#"); //生命
// 减免系数
double downNum = MainLineOrInnerDemonFightHandler.getDownNum(uid, type);
// 只减免前这四项
monsterPropertyList.append(Math.round(curHp * downNum)).append("#"); //生命
monsterPropertyList.append(Math.round(sMonsterConfig.getHp() * downNum)).append("#"); //最大生命
monsterPropertyList.append(Math.round(sMonsterConfig.getAttack() * downNum)).append("#");//攻击力
monsterPropertyList.append(Math.round(sMonsterConfig.getPhysicalDefence() * downNum)).append("#"); //护甲