Lifesteal and Regeneration Mechanic Update
+>"Regeneration" has been added. The regeneration stat can be seen in /stats. Regeneration will naturally heal your player by the amount displayed every 5 seconds if your hunger is full enough. +>The Regeneration Potion Effect now increases your Regeneration by 2 per level. +>Lifesteal now sends the stolen health amount to a Regeneration Pool. The Regeneration pool shows up in your action bar. +>Players with a Regeneration Pool will heal HP equal to your Regeneration every second, instead of every 5 seconds. This amount is then removed from your Regeneration pool. +>Barbarians will not fill their Regeneration Pool when lifestealing until they remove points from their Damage Pool first. Points from their Regeneration Pool get automatically converted to Damage Pool reduction. >Swapped the <player> and all/equip arguments for /stats when viewing other players. They are now /stats equip <player> and /stats all <player> ->The Regeneration stat from the Alikahn set has been nerfed significantly. ->Natural Regeneration Rate is no longer 2 Health + 5% of your Maximum Health. ->The Regeneration potion effect no longer increases the healing rate. ->Lifesteal no longer provides health directly to the player.
This commit is contained in:
parent
b14d73c4ac
commit
d8f2edd51e
@ -1,3 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/sig/plugin/TwosideKeeper/ActionBarBuffUpdater.java=UTF-8
|
||||
encoding//src/sig/plugin/TwosideKeeper/TwosideKeeper.java=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
|
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
name: TwosideKeeper
|
||||
main: sig.plugin.TwosideKeeper.TwosideKeeper
|
||||
version: 3.10.6b
|
||||
version: 3.10.7
|
||||
loadbefore: [aPlugin]
|
||||
commands:
|
||||
money:
|
||||
|
@ -62,6 +62,11 @@ public class ActionBarBuffUpdater{
|
||||
effectString.append(AppendAmplifier((int)(GenericFunctions.getSwiftAegisAmt((Player)p)-1)));
|
||||
effectString.append(" ");
|
||||
}
|
||||
if (pd.regenpool>0) {
|
||||
effectString.append(ChatColor.BLUE+""+ChatColor.BOLD+"✙");
|
||||
effectString.append(AppendAmplifier((int)(pd.regenpool)));
|
||||
effectString.append(" ");
|
||||
}
|
||||
}
|
||||
if (effectString.length()>0) {
|
||||
return effectString.toString()+ChatColor.RESET;
|
||||
|
@ -629,7 +629,7 @@ public class CustomDamage {
|
||||
}
|
||||
//GenericFunctions.knockOffGreed(p);
|
||||
castEruption(p,target,weapon);
|
||||
addHealthFromLifesteal(p,damage,weapon,reason);
|
||||
addRegenPoolFromLifesteal(p,damage,weapon,reason);
|
||||
triggerEliteHitEvent(p,target,damage);
|
||||
subtractWeaponDurability(p,weapon);
|
||||
aPlugin.API.showDamage(target, GetHeartAmount(damage));
|
||||
@ -1226,9 +1226,9 @@ public class CustomDamage {
|
||||
}
|
||||
}
|
||||
|
||||
private static void addHealthFromLifesteal(Player p, double damage, ItemStack weapon, String reason) {
|
||||
private static void addRegenPoolFromLifesteal(Player p, double damage, ItemStack weapon, String reason) {
|
||||
double lifestealamt = damage*calculateLifeStealAmount(p,weapon,reason);
|
||||
if ((p.getMaxHealth()-p.getHealth())<lifestealamt) {
|
||||
/*if ((p.getMaxHealth()-p.getHealth())<lifestealamt) {
|
||||
double remaining = lifestealamt - (p.getMaxHealth()-p.getHealth());
|
||||
if (PlayerMode.getPlayerMode(p)==PlayerMode.BARBARIAN) {
|
||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||
@ -1239,8 +1239,23 @@ public class CustomDamage {
|
||||
p.setHealth(p.getMaxHealth());
|
||||
} else {
|
||||
p.setHealth(p.getHealth()+lifestealamt);
|
||||
}*/
|
||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||
if (PlayerMode.getPlayerMode(p)==PlayerMode.BARBARIAN) {
|
||||
if (pd.damagepool>0) {
|
||||
double leftovers = 0;
|
||||
if (pd.regenpool>pd.damagepool) {
|
||||
pd.regenpool-=pd.damagepool;
|
||||
}
|
||||
pd.damagepool = Math.max(pd.damagepool-pd.regenpool, 0);
|
||||
} else {
|
||||
pd.regenpool += lifestealamt;
|
||||
}
|
||||
} else {
|
||||
pd.regenpool += lifestealamt;
|
||||
}
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
GenericFunctions.sendActionBarMessage(p, "");
|
||||
TwosideKeeper.log(p.getName()+" healed "+df.format(lifestealamt)+" dmg from Lifesteal.", 5);
|
||||
}
|
||||
|
||||
@ -2472,36 +2487,38 @@ public class CustomDamage {
|
||||
Player p = (Player)entity;
|
||||
LivingEntity shooter = getDamagerEntity(damager);
|
||||
List<Player> partymembers = TwosideKeeperAPI.getPartyMembers(p);
|
||||
for (int i=0;i<partymembers.size();i++) {
|
||||
Player check = partymembers.get(i);
|
||||
if (PartyManager.IsInSameParty(p, check)) {
|
||||
TwosideKeeper.log("In here",5);
|
||||
if (!PlayerMode.isDefender(p) && PlayerMode.isDefender(check) &&
|
||||
check.isBlocking() &&
|
||||
!p.equals(check) && (reason==null || !reason.equalsIgnoreCase("Cupid Set Tank"))) {
|
||||
//This is a defender. Transfer half the damage to them!
|
||||
dmg = dmg/2;
|
||||
//Send the rest of the damage to the defender.
|
||||
double defenderdmg = dmg;
|
||||
//defenderdmg=CalculateDamageReduction(dmg, check, entity);
|
||||
ApplyDamage(defenderdmg, shooter, check, null, "Defender Tank", IGNOREDODGE|IGNORE_DAMAGE_TICK);
|
||||
//TwosideKeeper.log("Damage was absorbed by "+check.getName()+". Took "+defenderdmg+" reduced damage. Original damage: "+dmg,0);
|
||||
break;
|
||||
} else
|
||||
if (!isCupidTank(p) && isCupidTank(check) &&
|
||||
!p.equals(check) && (reason==null || !reason.equalsIgnoreCase("Defender Tank"))) {
|
||||
//This is a defender. Transfer half the damage to them!
|
||||
double origdmg = dmg;
|
||||
dmg = origdmg-(origdmg*(ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(check), check, ItemSet.CUPID)/100d));
|
||||
//Send the rest of the damage to the defender.
|
||||
double defenderdmg = origdmg*(ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(check), check, ItemSet.CUPID)/100d);
|
||||
//defenderdmg=CalculateDamageReduction(dmg, check, entity);
|
||||
ApplyDamage(defenderdmg, shooter, check, null, "Cupid Set Tank", IGNOREDODGE|IGNORE_DAMAGE_TICK);
|
||||
//TwosideKeeper.log("Damage was absorbed by "+check.getName()+". Took "+defenderdmg+" reduced damage. Original damage: "+dmg,0);
|
||||
break;
|
||||
if (partymembers!=null) {
|
||||
for (int i=0;i<partymembers.size();i++) {
|
||||
Player check = partymembers.get(i);
|
||||
if (PartyManager.IsInSameParty(p, check)) {
|
||||
TwosideKeeper.log("In here",5);
|
||||
if (!PlayerMode.isDefender(p) && PlayerMode.isDefender(check) &&
|
||||
check.isBlocking() &&
|
||||
!p.equals(check) && (reason==null || !reason.equalsIgnoreCase("Cupid Set Tank"))) {
|
||||
//This is a defender. Transfer half the damage to them!
|
||||
dmg = dmg/2;
|
||||
//Send the rest of the damage to the defender.
|
||||
double defenderdmg = dmg;
|
||||
//defenderdmg=CalculateDamageReduction(dmg, check, entity);
|
||||
ApplyDamage(defenderdmg, shooter, check, null, "Defender Tank", IGNOREDODGE|IGNORE_DAMAGE_TICK);
|
||||
//TwosideKeeper.log("Damage was absorbed by "+check.getName()+". Took "+defenderdmg+" reduced damage. Original damage: "+dmg,0);
|
||||
break;
|
||||
} else
|
||||
if (!isCupidTank(p) && isCupidTank(check) &&
|
||||
!p.equals(check) && (reason==null || !reason.equalsIgnoreCase("Defender Tank"))) {
|
||||
//This is a defender. Transfer half the damage to them!
|
||||
double origdmg = dmg;
|
||||
dmg = origdmg-(origdmg*(ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(check), check, ItemSet.CUPID)/100d));
|
||||
//Send the rest of the damage to the defender.
|
||||
double defenderdmg = origdmg*(ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(check), check, ItemSet.CUPID)/100d);
|
||||
//defenderdmg=CalculateDamageReduction(dmg, check, entity);
|
||||
ApplyDamage(defenderdmg, shooter, check, null, "Cupid Set Tank", IGNOREDODGE|IGNORE_DAMAGE_TICK);
|
||||
//TwosideKeeper.log("Damage was absorbed by "+check.getName()+". Took "+defenderdmg+" reduced damage. Original damage: "+dmg,0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
TwosideKeeper.log("In here",5);
|
||||
}
|
||||
return dmg;
|
||||
@ -3143,7 +3160,15 @@ public class CustomDamage {
|
||||
|
||||
public static double getTransferDamage(Player p) {
|
||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||
return Math.max(0,15-GetDamageReductionFromDawntrackerPieces(p));
|
||||
double subtracted = 0;
|
||||
if (pd.regenpool>0) {
|
||||
subtracted = Math.max(15-GetDamageReductionFromDawntrackerPieces(p),1);
|
||||
pd.regenpool-=subtracted;
|
||||
if (pd.regenpool<1) {
|
||||
pd.regenpool=0;
|
||||
}
|
||||
}
|
||||
return Math.max(1,15-GetDamageReductionFromDawntrackerPieces(p)-subtracted);
|
||||
}
|
||||
|
||||
public static int GetDamageReductionFromDawntrackerPieces(Player p) {
|
||||
|
@ -22,7 +22,7 @@ public enum ItemSet {
|
||||
LORASYS(2,2, 0,0, 0,0, 0,0),
|
||||
JAMDAK(3,3, 5,1, 10,1, 10,2), //Graceful Dodge is in ticks.
|
||||
DARNYS(2,1, 10,5, 20,5, 1,1),
|
||||
ALIKAHN(3,1, 15,6, 30,10, 12,6),
|
||||
ALIKAHN(3,1, 15,6, 30,10, 1,1),
|
||||
LORASAADI(4,1, 4,2, 8,6, 8,3),
|
||||
MOONSHADOW(4,2, 1,1, 8,8, 15,7),
|
||||
GLADOMAIN(1,1, 12,10, 8,8, 1,1),
|
||||
@ -343,7 +343,7 @@ public enum ItemSet {
|
||||
case COMET:
|
||||
lore.add(ChatColor.BLUE+"Holiday Gear");
|
||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Health Regeneration to Party Members");
|
||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Regeneration to Party Members");
|
||||
break;
|
||||
case CUPID:
|
||||
lore.add(ChatColor.BLUE+"Holiday Gear");
|
||||
@ -483,7 +483,7 @@ public enum ItemSet {
|
||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Max Health");
|
||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Max Health");
|
||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+" Health Regen / 5 seconds");
|
||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+" Regen / 5 seconds");
|
||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Boosts All Modes of Ranger");
|
||||
lore.add(ChatColor.WHITE+" +50% Armor Penetration");
|
||||
lore.add(ChatColor.WHITE+" +15 Damage");
|
||||
|
@ -225,6 +225,12 @@ public class PartyManager {
|
||||
|
||||
public static List<Player> getPartyMembers(Player p) {
|
||||
int partynumb = GetCurrentParty(p);
|
||||
return parties.get(partynumb);
|
||||
if (parties.containsKey(partynumb)) {
|
||||
return parties.get(partynumb);
|
||||
} else {
|
||||
List<Player> members = new ArrayList<Player>();
|
||||
members.add(p);
|
||||
return members;
|
||||
}
|
||||
}
|
||||
}
|
@ -188,6 +188,7 @@ public class PlayerStructure {
|
||||
public long lastusedrocketbooster=0;
|
||||
public long lastActionBarMessageTime=0;
|
||||
public long lastsantabox2;
|
||||
public double regenpool=0;
|
||||
|
||||
//Needs the instance of the player object to get all other info. Only to be called at the beginning.
|
||||
@SuppressWarnings("deprecation")
|
||||
|
@ -812,6 +812,58 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final class PerformHealthRegeneration implements Runnable {
|
||||
public void run(){
|
||||
for (Player p : Bukkit.getOnlinePlayers()) {
|
||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||
if (p!=null &&
|
||||
!p.isDead() && //Um, don't heal them if they're dead...That's just weird.
|
||||
(pd.regenpool>0 || pd.last_regen_time+50<=TwosideKeeper.getServerTickTime())
|
||||
) {
|
||||
double regenamt = GetNaturalRegen(p);
|
||||
if (p.getHealth()<p.getMaxHealth() &&
|
||||
p.getFoodLevel()>=16) {
|
||||
GenericFunctions.HealEntity(p, regenamt);
|
||||
pd.last_regen_time=TwosideKeeper.getServerTickTime();
|
||||
}
|
||||
if (pd.regenpool>0) {
|
||||
double healamt = Math.min(pd.regenpool, regenamt);
|
||||
pd.regenpool = Math.max(pd.regenpool-regenamt, 0);
|
||||
GenericFunctions.HealEntity(p, healamt);
|
||||
GenericFunctions.sendActionBarMessage(p, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static double GetNaturalRegen(Player p) {
|
||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||
if (PlayerMode.getPlayerMode(p)==PlayerMode.SLAYER) {
|
||||
pd.slayermodehp=p.getHealth();
|
||||
return 0;
|
||||
} else {
|
||||
double totalregen = 0;
|
||||
final double baseregen = 1;
|
||||
final ItemStack[] equips = GenericFunctions.getEquipment(p);
|
||||
for (ItemStack equip : equips) {
|
||||
if (GenericFunctions.isArtifactEquip(equip)) {
|
||||
double regenamt = GenericFunctions.getAbilityValue(ArtifactAbility.HEALTH_REGEN, equip);
|
||||
totalregen += regenamt;
|
||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, equip)) {
|
||||
totalregen /= ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, equip)?2:1;
|
||||
}
|
||||
}
|
||||
}
|
||||
totalregen += ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.ALIKAHN, 4, 4)/2;
|
||||
totalregen += totalregen*pd.pctbonusregen;
|
||||
if (p.hasPotionEffect(PotionEffectType.REGENERATION)) {
|
||||
totalregen += (GenericFunctions.getPotionEffectLevel(PotionEffectType.REGENERATION, p)+1)*baseregen;
|
||||
}
|
||||
return totalregen+baseregen;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
@ -949,6 +1001,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
}
|
||||
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, new SetupPlayerMode(),0l,10l);
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, new PerformHealthRegeneration(),0l,10l);
|
||||
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, new ControlChargeZombies(), 5l, 5l);
|
||||
|
||||
@ -1137,29 +1190,29 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
else
|
||||
if (cmd.getName().equalsIgnoreCase("stats")) {
|
||||
if (args.length>=1) {
|
||||
if (args[0].equalsIgnoreCase("equip")) {
|
||||
showPlayerStats((Player)sender,"equip");
|
||||
} else
|
||||
if (args[0].equalsIgnoreCase("all")) {
|
||||
showPlayerStats((Player)sender,"all");
|
||||
} else
|
||||
if (args.length>=2) {
|
||||
if (Bukkit.getPlayer(args[0])!=null) {
|
||||
if (Bukkit.getPlayer(args[1])!=null) {
|
||||
//If we can grab their stats, then calculate it.
|
||||
Player p = Bukkit.getPlayer(args[0]);
|
||||
Player p = Bukkit.getPlayer(args[1]);
|
||||
sender.sendMessage("Displaying stats for "+ChatColor.YELLOW+p.getName());
|
||||
if (args[1].equalsIgnoreCase("equip")) {
|
||||
if (args[0].equalsIgnoreCase("equip")) {
|
||||
showPlayerStats(p,sender,"equip");
|
||||
} else
|
||||
if (args[1].equalsIgnoreCase("all")) {
|
||||
if (args[0].equalsIgnoreCase("all")) {
|
||||
showPlayerStats(p,sender,"all");
|
||||
} else {
|
||||
showPlayerStats(p,sender);
|
||||
}
|
||||
} else {
|
||||
sender.sendMessage("Player "+ChatColor.YELLOW+args[0]+" is not online!");
|
||||
sender.sendMessage("Player "+ChatColor.YELLOW+args[1]+" is not online!");
|
||||
}
|
||||
} else
|
||||
if (args[0].equalsIgnoreCase("equip")) {
|
||||
showPlayerStats((Player)sender,"equip");
|
||||
} else
|
||||
if (args[0].equalsIgnoreCase("all")) {
|
||||
showPlayerStats((Player)sender,"all");
|
||||
} else
|
||||
if (Bukkit.getPlayer(args[0])!=null) {
|
||||
//If we can grab their stats, then calculate it.
|
||||
Player p = Bukkit.getPlayer(args[0]);
|
||||
@ -1577,6 +1630,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
case "GIVEEXP":{
|
||||
AwakenedArtifact.addPotentialEXP(p.getEquipment().getItemInMainHand(), 50000, p);
|
||||
}break;
|
||||
case "REGENPOOL":{
|
||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||
pd.regenpool += Integer.parseInt(args[1]);
|
||||
}break;
|
||||
}
|
||||
}
|
||||
//LivingEntity m = MonsterController.convertMonster((Monster)p.getWorld().spawnEntity(p.getLocation(),EntityType.ZOMBIE), MonsterDifficulty.ELITE);
|
||||
@ -2109,11 +2166,11 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
}
|
||||
}
|
||||
private void RemoveUserFromWeatherWatch(Player p) {
|
||||
weather_watch_users.remove(p.getName());
|
||||
weather_watch_users.remove(p.getUniqueId().toString());
|
||||
}
|
||||
private void AddUserToWeatherWatch(Player p) {
|
||||
if (!weather_watch_users.contains(p.getName())) {
|
||||
weather_watch_users.add(p.getName());
|
||||
if (!weather_watch_users.contains(p.getUniqueId().toString())) {
|
||||
weather_watch_users.add(p.getUniqueId().toString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -4084,6 +4141,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
pd = PlayerStructure.GetPlayerStructure(p);
|
||||
pd.hasDied=true;
|
||||
pd.vendetta_amt=0.0;
|
||||
pd.regenpool=0;
|
||||
pd.lifestealstacks=0;
|
||||
pd.weaponcharges=0;
|
||||
//p.getInventory().clear();
|
||||
}
|
||||
for (int i=0;i<elitemonsters.size();i++) {
|
||||
@ -4708,6 +4768,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
}
|
||||
if (ev.getEntity() instanceof Player) {
|
||||
Player p = (Player)ev.getEntity();
|
||||
if (ev.getRegainReason()==RegainReason.MAGIC_REGEN) { //Disable all basic regen abilities.
|
||||
ev.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
if (PlayerMode.getPlayerMode(p)==PlayerMode.SLAYER) {
|
||||
ev.setCancelled(true);
|
||||
return;
|
||||
@ -8425,7 +8489,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
worldShopDistanceSquared = getConfig().getDouble("WORLD_SHOP_DIST");
|
||||
worldShopPriceMult = getConfig().getDouble("WORLD_SHOP_MULT");
|
||||
LAST_DEAL = getConfig().getInt("LAST_DEAL");
|
||||
weather_watch_users = getConfig().getStringList("WEATHER_WATCH_USERS");
|
||||
weather_watch_users = (List<String>)getConfig().getList("WEATHER_WATCH_USERS");
|
||||
if (getConfig().contains("ELITE_LOCATION_X")) {
|
||||
int x = getConfig().getInt("ELITE_LOCATION_X");
|
||||
int z = getConfig().getInt("ELITE_LOCATION_Z");
|
||||
@ -9233,6 +9297,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
} else {
|
||||
receiver.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Applied Damage: "+ChatColor.RESET+""+ChatColor.LIGHT_PURPLE+df.format(CustomDamage.CalculateDamage(store2,p,temporarychicken,p.getEquipment().getItemInMainHand(), "Test Damage")));
|
||||
}
|
||||
double healthregen = GetNaturalRegen(p)*2;
|
||||
if (all || healthregen>1) {
|
||||
receiver.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Regeneration: "+ChatColor.RESET+""+ChatColor.AQUA+df.format(healthregen)+" "+ChatColor.RESET+ChatColor.GRAY+"/ 5s");
|
||||
}
|
||||
pd.damagedata.actualtotaldmg=origdmg;
|
||||
pd.damagedata.breakdownlist=origmap;
|
||||
temporarychicken.remove();
|
||||
|
@ -246,7 +246,7 @@ final class runServerHeartbeat implements Runnable {
|
||||
|
||||
AdventurerModeSetExhaustion(p);
|
||||
|
||||
CalculateHealthRegeneration(serverTickTime, p, pd, equips);
|
||||
//CalculateHealthRegeneration(serverTickTime, p, pd, equips);
|
||||
|
||||
ResetSwordCombo(serverTickTime, p, pd);
|
||||
|
||||
@ -427,7 +427,7 @@ final class runServerHeartbeat implements Runnable {
|
||||
double transferdmg = CustomDamage.getTransferDamage(p)+(pd.damagepool*0.01);
|
||||
TwosideKeeper.log("Transfer Dmg is "+transferdmg+". Damage Pool: "+pd.damagepool, 5);
|
||||
CustomDamage.ApplyDamage(transferdmg, null, p, null, "Damage Pool", CustomDamage.IGNORE_DAMAGE_TICK|CustomDamage.TRUEDMG|CustomDamage.IGNOREDODGE);
|
||||
if (pd.damagepool-transferdmg<=0) {
|
||||
if (pd.damagepool-transferdmg<1) {
|
||||
pd.damagepool=0;
|
||||
} else {
|
||||
pd.damagepool-=transferdmg;
|
||||
@ -555,8 +555,8 @@ final class runServerHeartbeat implements Runnable {
|
||||
if (!TwosideKeeper.last_announced_storm) {
|
||||
TwosideKeeper.last_announced_storm=true;
|
||||
for (String user : TwosideKeeper.weather_watch_users) {
|
||||
if (Bukkit.getPlayer(user)!=null) {
|
||||
Player p = Bukkit.getPlayer(user);
|
||||
if (Bukkit.getPlayer(UUID.fromString(user))!=null) {
|
||||
Player p = Bukkit.getPlayer(UUID.fromString(user));
|
||||
p.sendMessage(ChatColor.ITALIC+""+ChatColor.GRAY+"A storm"+((Bukkit.getWorld("world").isThundering())?" (With Thunder)":"")+" is now occuring on the server. (Day "+(int)(TwosideKeeper.getServerTickTime()/48000)+")");
|
||||
}
|
||||
File config;
|
||||
|
Loading…
x
Reference in New Issue
Block a user