back_recharge
xuexinpeng 2021-12-29 19:16:02 +08:00
parent dae028d07f
commit b816997e38
1 changed files with 7 additions and 0 deletions

View File

@ -73,6 +73,7 @@ public class ExplorerMapLogic {
}
//怪物的初始血量
int mapMonsterForce = exploreConfig.getMonsterForce();
//玩家掉血
float ratio = (float) explorerInfo.getPlayerHp() /explorerInfo.getEnemyHp() ;
SExploreFight exploreFightData = SExploreFight.getConfigByFightDownAndFightUp(ratio);
if (exploreFightData == null) {
@ -86,6 +87,12 @@ public class ExplorerMapLogic {
explorerInfo.setPlayerHp(explorerInfo.getPlayerHp() - reducePlayer);
LOGGER.info("玩家掉血:=》{},剩余血量-》{}", reducePlayer, explorerInfo.getPlayerHp());
//怪物掉血
ratio = (float) explorerInfo.getEnemyHp()/explorerInfo.getPlayerHp();
exploreFightData = SExploreFight.getConfigByFightDownAndFightUp(ratio);
if (exploreFightData == null) {
return;
}
reduceRatio = exploreFightData.getLoseFight();
int reduceMonster = (int) (mapMonsterForce * reduceRatio);
explorerInfo.setEnemyHp(explorerInfo.getEnemyHp() - (reduceMonster));
LOGGER.info("怪物掉血:=》{},剩余血量-》{}", reduceMonster, explorerInfo.getEnemyHp());