Corrections for fastheal: Missing cancel action + out of range health.

This commit is contained in:
asofold 2013-10-01 23:13:02 +02:00
parent ce52c9fe7c
commit 3e38b087e6
3 changed files with 4 additions and 3 deletions

View File

@ -26,6 +26,7 @@ public class FastHeal extends Check {
// Reset.
data.fastHealVL *= 0.96;
// Only add a predefined amount to the buffer.
// TODO: Confine regain-conditions further? (e.g. if vl < 0.1)
data.fastHealBuffer = Math.min(cc.fastHealBuffer, data.fastHealBuffer + 50L);
}
else{

View File

@ -293,7 +293,7 @@ public class FightListener extends CheckListener implements JoinLeaveListener{
// It requested to "cancel" the players invulnerability, so set his noDamageTicks to 0.
damagedPlayer.setNoDamageTicks(0);
}
if (BridgeHealth.getHealth(damagedPlayer) == BridgeHealth.getMaxHealth(damagedPlayer)){
if (BridgeHealth.getHealth(damagedPlayer) >= BridgeHealth.getMaxHealth(damagedPlayer)){
// TODO: Might use the same FightData instance for GodMode.
if (damagedData.fastHealBuffer < 0){
// Reduce negative buffer with each full health.

View File

@ -26,7 +26,7 @@ public class DefaultConfig extends ConfigFile {
* NCP build needed for this config.
* (Should only increment with changing or removing paths.)
*/
public static final int buildNumber = 490;
public static final int buildNumber = 632;
// TODO: auto input full version or null to an extra variable or several [fail safe for other syntax checking]?
@ -337,7 +337,7 @@ public class DefaultConfig extends ConfigFile {
set(ConfPaths.FIGHT_FASTHEAL_CHECK, true);
set(ConfPaths.FIGHT_FASTHEAL_INTERVAL, 4000L);
set(ConfPaths.FIGHT_FASTHEAL_BUFFER, 1000L);
set(ConfPaths.FIGHT_FASTHEAL_ACTIONS, "cancel vl>10 cancel log:fastheal:0:10:i vl>30 log:fastheal:0:10:if");
set(ConfPaths.FIGHT_FASTHEAL_ACTIONS, "cancel vl>10 cancel log:fastheal:0:10:i vl>30 cancel log:fastheal:0:10:if");
set(ConfPaths.FIGHT_GODMODE_CHECK, true);
set(ConfPaths.FIGHT_GODMODE_LAGMINAGE, 1100); // TODO: ndt/2 => 500-600.