back_recharge
parent
dae028d07f
commit
b816997e38
|
@ -73,6 +73,7 @@ public class ExplorerMapLogic {
|
||||||
}
|
}
|
||||||
//怪物的初始血量
|
//怪物的初始血量
|
||||||
int mapMonsterForce = exploreConfig.getMonsterForce();
|
int mapMonsterForce = exploreConfig.getMonsterForce();
|
||||||
|
//玩家掉血
|
||||||
float ratio = (float) explorerInfo.getPlayerHp() /explorerInfo.getEnemyHp() ;
|
float ratio = (float) explorerInfo.getPlayerHp() /explorerInfo.getEnemyHp() ;
|
||||||
SExploreFight exploreFightData = SExploreFight.getConfigByFightDownAndFightUp(ratio);
|
SExploreFight exploreFightData = SExploreFight.getConfigByFightDownAndFightUp(ratio);
|
||||||
if (exploreFightData == null) {
|
if (exploreFightData == null) {
|
||||||
|
@ -86,6 +87,12 @@ public class ExplorerMapLogic {
|
||||||
explorerInfo.setPlayerHp(explorerInfo.getPlayerHp() - reducePlayer);
|
explorerInfo.setPlayerHp(explorerInfo.getPlayerHp() - reducePlayer);
|
||||||
LOGGER.info("玩家掉血:=》{},剩余血量-》{}", reducePlayer, explorerInfo.getPlayerHp());
|
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);
|
int reduceMonster = (int) (mapMonsterForce * reduceRatio);
|
||||||
explorerInfo.setEnemyHp(explorerInfo.getEnemyHp() - (reduceMonster));
|
explorerInfo.setEnemyHp(explorerInfo.getEnemyHp() - (reduceMonster));
|
||||||
LOGGER.info("怪物掉血:=》{},剩余血量-》{}", reduceMonster, explorerInfo.getEnemyHp());
|
LOGGER.info("怪物掉血:=》{},剩余血量-》{}", reduceMonster, explorerInfo.getEnemyHp());
|
||||||
|
|
Loading…
Reference in New Issue