Small updates. Added /stats command. Updated ways to get Mysterious

essences. Lowered drop rate of other artifact items.
dev
sigonasr2 9 years ago
parent d72d498c36
commit 511a13f053
  1. BIN
      TwosideKeeper.jar
  2. 7
      src/plugin.yml
  3. 4
      src/sig/plugin/TwosideKeeper/AutoUpdatePlugin.java
  4. 4
      src/sig/plugin/TwosideKeeper/HelperStructures/Loot.java
  5. 62
      src/sig/plugin/TwosideKeeper/HelperStructures/MonsterDifficulty.java
  6. 68
      src/sig/plugin/TwosideKeeper/MonsterController.java
  7. 140
      src/sig/plugin/TwosideKeeper/TwosideKeeper.java

Binary file not shown.

@ -1,6 +1,6 @@
name: TwosideKeeper
main: sig.plugin.TwosideKeeper.TwosideKeeper
version: 3.4.7c
version: 3.4.7d
commands:
money:
description: Tells the player the amount of money they are holding.
@ -71,4 +71,9 @@ commands:
description: Teleports to a location in a specified world.
usage: /tp_world <world> <x> <y> <z>
permission: TwosideKeeper.tp_world
permission-message: No permissions!
stats:
description: Display statistics for damage and defense.
usage: /stats [username]
permission: TwosideKeeper.money
permission-message: No permissions!

@ -76,13 +76,13 @@ public class AutoUpdatePlugin implements Runnable {
DiscordMessageSender.sendItalicizedRawMessageDiscord("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(i).name+". The server will restart in 3 minutes!");
Bukkit.broadcastMessage("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(i).name+". The server will restart in 3 minutes!");
//Move the file to the new location.
try {
/*try {
FileUtils.copyFile(new File(TwosideKeeper.filesave,"updates/"+plugins.get(i).name),
new File(TwosideKeeper.filesave,"../"+plugins.get(i).name+".jar"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}*/
}
}
if (restarting) {

@ -83,7 +83,7 @@ public class Loot {
return enchantment_level;
}
private static ItemStack addEnchantments(ItemStack item, boolean hardened) {
public static ItemStack addEnchantments(ItemStack item, boolean hardened) {
if (GenericFunctions.isHarvestingTool(item)) {
item.addUnsafeEnchantment(Enchantment.DAMAGE_ALL, GetEnchantmentLevels(item.getType(),hardened));
item.addUnsafeEnchantment(Enchantment.DIG_SPEED, GetEnchantmentLevels(item.getType(),hardened));
@ -123,7 +123,7 @@ public class Loot {
if (Math.random()<0.2*HARDENED_ENCHANT_MULT && item.getType().toString().contains("HELMET")) {item.addUnsafeEnchantment(Enchantment.OXYGEN, 3);}
if (Math.random()<0.2*HARDENED_ENCHANT_MULT && item.getType().toString().contains("BOOTS")) {item.addUnsafeEnchantment(Enchantment.FROST_WALKER, GetEnchantmentLevels(item.getType(),hardened));}
if (Math.random()<0.08*HARDENED_ENCHANT_MULT) {item.addUnsafeEnchantment(Enchantment.THORNS, GetEnchantmentLevels(item.getType(),hardened));}
item.addUnsafeEnchantment(Enchantment.KNOCKBACK, 1);
//item.addUnsafeEnchantment(Enchantment.KNOCKBACK, 1);
if (Math.random()<0.001*HARDENED_ENCHANT_MULT) {item.addUnsafeEnchantment(Enchantment.MENDING, GetEnchantmentLevels(item.getType(),hardened));}
} else
if (item.getType()==Material.FISHING_ROD) {

@ -167,7 +167,7 @@ public enum MonsterDifficulty {
this.loot_regular.length>0) {
//This is a common roll.
ItemStack gen_loot = DistributeRandomLoot(this.loot_regular);
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 2);
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 4);
droplist.add(gen_loot);
}
//Rare Loot roll.
@ -175,21 +175,23 @@ public enum MonsterDifficulty {
this.loot_rare.length>0) {
//This is a common roll.
ItemStack gen_loot = DistributeRandomLoot(this.loot_rare);
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 2);
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 4);
droplist.add(gen_loot);
if (Math.random()<=0.2) {
switch (this) {
case DANGEROUS:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ANCIENT_ESSENCE));
break;
case DEADLY:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.LOST_ESSENCE));
break;
case HELLFIRE:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.DIVINE_ESSENCE));
break;
case NORMAL:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ARTIFACT_ESSENCE));
break;
case DANGEROUS:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ANCIENT_ESSENCE));
break;
case DEADLY:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.LOST_ESSENCE));
break;
case HELLFIRE:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.DIVINE_ESSENCE));
break;
case NORMAL:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ARTIFACT_ESSENCE));
break;
}
}
}
//Legendary Loot roll.
@ -197,33 +199,35 @@ public enum MonsterDifficulty {
this.loot_legendary.length>0) {
//This is a common roll.
ItemStack gen_loot = DistributeRandomLoot(this.loot_legendary);
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 2);
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 4);
droplist.add(gen_loot);
if (Math.random()<=0.2) {
switch (this) {
case DANGEROUS:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ANCIENT_CORE));
break;
case DEADLY:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.LOST_CORE));
break;
case HELLFIRE:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.DIVINE_CORE));
break;
case NORMAL:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ARTIFACT_CORE));
break;
case DANGEROUS:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ANCIENT_CORE));
break;
case DEADLY:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.LOST_CORE));
break;
case HELLFIRE:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.DIVINE_CORE));
break;
case NORMAL:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ARTIFACT_CORE));
break;
}
}
}
if (isBoss) { //50% of the time, we drop something great.
if (Math.random()<=0.5 && this.loot_legendary.length>0) {
ItemStack gen_loot = DistributeRandomLoot(this.loot_legendary);
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 2);
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 4);
droplist.add(gen_loot);
}
else
if (this.loot_rare.length>0) { //Consolation Prize.
ItemStack gen_loot = DistributeRandomLoot(this.loot_rare);
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 2);
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 4);
droplist.add(gen_loot);
}
}

@ -26,6 +26,7 @@ import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import sig.plugin.TwosideKeeper.HelperStructures.ItemRarity;
import sig.plugin.TwosideKeeper.HelperStructures.Loot;
import sig.plugin.TwosideKeeper.HelperStructures.MonsterDifficulty;
import sig.plugin.TwosideKeeper.HelperStructures.MonsterType;
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
@ -496,70 +497,7 @@ public class MonsterController {
return RandomizeEnchantments(item, ItemRarity.VANILLA);
}
private static ItemStack RandomizeEnchantments(ItemStack item, ItemRarity rarity) {
//Have a small chance to randomize every enchant with a random value too.
switch (rarity) {
case RARE:
{
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.PROTECTION_FIRE, (int)(Math.random()*4)+2);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, (int)(Math.random()*4)+2);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.PROTECTION_EXPLOSIONS, (int)(Math.random()*4)+2);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.PROTECTION_FALL, (int)(Math.random()*4)+2);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.PROTECTION_PROJECTILE, (int)(Math.random()*4)+2);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.OXYGEN, (int)(Math.random()*2)+2);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.WATER_WORKER, (int)(Math.random()*1)+1);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.THORNS, (int)(Math.random()*2)+2);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.DEPTH_STRIDER, (int)(Math.random()*2)+2);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.FROST_WALKER, (int)(Math.random()*1)+2);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.DURABILITY, (int)(Math.random()*2)+2);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.MENDING, (int)(Math.random()*1)+1);}
}break;
case EPIC:
{
if (Math.random()<=0.12) {item.addUnsafeEnchantment(Enchantment.PROTECTION_FIRE, (int)(Math.random()*7)+2);}
if (Math.random()<=0.12) {item.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, (int)(Math.random()*7)+2);}
if (Math.random()<=0.12) {item.addUnsafeEnchantment(Enchantment.PROTECTION_EXPLOSIONS, (int)(Math.random()*7)+2);}
if (Math.random()<=0.12) {item.addUnsafeEnchantment(Enchantment.PROTECTION_FALL, (int)(Math.random()*7)+2);}
if (Math.random()<=0.12) {item.addUnsafeEnchantment(Enchantment.PROTECTION_PROJECTILE, (int)(Math.random()*7)+2);}
if (Math.random()<=0.12) {item.addUnsafeEnchantment(Enchantment.OXYGEN, (int)(Math.random()*7)+2);}
if (Math.random()<=0.12) {item.addUnsafeEnchantment(Enchantment.WATER_WORKER, (int)(Math.random()*7)+2);}
if (Math.random()<=0.12) {item.addUnsafeEnchantment(Enchantment.THORNS, (int)(Math.random()*7)+2);}
if (Math.random()<=0.12) {item.addUnsafeEnchantment(Enchantment.DEPTH_STRIDER, (int)(Math.random()*7)+2);}
if (Math.random()<=0.12) {item.addUnsafeEnchantment(Enchantment.FROST_WALKER, (int)(Math.random()*7)+2);}
if (Math.random()<=0.12) {item.addUnsafeEnchantment(Enchantment.DURABILITY, (int)(Math.random()*7)+2);}
if (Math.random()<=0.12) {item.addUnsafeEnchantment(Enchantment.MENDING, (int)(Math.random()*1)+1);}
}break;
case LEGENDARY:
{
if (Math.random()<=0.16) {item.addUnsafeEnchantment(Enchantment.PROTECTION_FIRE, (int)(Math.random()*6)+5);}
if (Math.random()<=0.16) {item.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, (int)(Math.random()*6)+5);}
if (Math.random()<=0.16) {item.addUnsafeEnchantment(Enchantment.PROTECTION_EXPLOSIONS, (int)(Math.random()*6)+5);}
if (Math.random()<=0.16) {item.addUnsafeEnchantment(Enchantment.PROTECTION_FALL, (int)(Math.random()*6)+5);}
if (Math.random()<=0.16) {item.addUnsafeEnchantment(Enchantment.PROTECTION_PROJECTILE, (int)(Math.random()*6)+5);}
if (Math.random()<=0.16) {item.addUnsafeEnchantment(Enchantment.OXYGEN, (int)(Math.random()*6)+5);}
if (Math.random()<=0.16) {item.addUnsafeEnchantment(Enchantment.WATER_WORKER, (int)(Math.random()*6)+5);}
if (Math.random()<=0.16) {item.addUnsafeEnchantment(Enchantment.THORNS, (int)(Math.random()*6)+5);}
if (Math.random()<=0.16) {item.addUnsafeEnchantment(Enchantment.DEPTH_STRIDER, (int)(Math.random()*6)+5);}
if (Math.random()<=0.16) {item.addUnsafeEnchantment(Enchantment.FROST_WALKER, (int)(Math.random()*6)+5);}
if (Math.random()<=0.16) {item.addUnsafeEnchantment(Enchantment.DURABILITY, (int)(Math.random()*6)+5);}
if (Math.random()<=0.16) {item.addUnsafeEnchantment(Enchantment.MENDING, (int)(Math.random()*1)+1);}
}break;
default: //Vanilla.
{
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.PROTECTION_FIRE, (int)(Math.random()*5)+1);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, (int)(Math.random()*5)+1);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.PROTECTION_EXPLOSIONS, (int)(Math.random()*5)+1);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.PROTECTION_FALL, (int)(Math.random()*5)+1);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.PROTECTION_PROJECTILE, (int)(Math.random()*5)+1);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.OXYGEN, (int)(Math.random()*3)+1);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.WATER_WORKER, (int)(Math.random()*1)+1);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.THORNS, (int)(Math.random()*3)+1);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.DEPTH_STRIDER, (int)(Math.random()*3)+1);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.FROST_WALKER, (int)(Math.random()*2)+1);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.DURABILITY, (int)(Math.random()*3)+1);}
if (Math.random()<=0.08) {item.addUnsafeEnchantment(Enchantment.MENDING, (int)(Math.random()*1)+1);}
}break;
}
return item;
return Loot.addEnchantments(item, false);
}
public static boolean isZombieLeader(LivingEntity ent) {
@ -646,6 +584,8 @@ public class MonsterController {
m.setHealth(m.getMaxHealth());
if (m.getType()!=EntityType.ENDERMAN) {
m.setFireTicks(999999);
} else {
m.setFireTicks(120);
}
if (isAllowedToEquipItems(m)) {
m.getEquipment().clear();

@ -519,15 +519,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
PartyList.get(j).IsInSameRegion(p)) {
inParty=true;
//Do party cleanups.
} /*else
if (PartyList.get(j).IsInParty(p) &&
!PartyList.get(j).IsInSameRegion(p) &&
PartyList.get(j).PlayerCountInParty()==1) {
//We're the only one in the party...why not
//just move it?
inParty=true;
PartyList.get(j).UpdateRegion(p.getLocation());
}*/
}
}
//Alright, none exist. Try to make a new party.
@ -756,6 +748,22 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
sender.sendMessage("Wrong arguments!");
}
return true;
} else
if (cmd.getName().equalsIgnoreCase("stats")) {
if (args.length==1) {
if (Bukkit.getPlayer(args[0])!=null) {
//If we can grab their stats, then calculate it.
Player p = Bukkit.getPlayer(args[0]);
sender.sendMessage("Display stats for "+ChatColor.YELLOW+p.getName());
showPlayerStats(p);
} else {
sender.sendMessage("Player "+ChatColor.YELLOW+args[0]+" is not online!");
}
return true;
} else {
showPlayerStats((Player)sender);
return true;
}
}
} else {
//Implement console/admin version later (Let's you check any name's money.)
@ -788,6 +796,13 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
@EventHandler(priority=EventPriority.LOW)
public void onPlayerJoin(PlayerJoinEvent ev) {
//Remove stray members from the player's party.
for (int j=0;j<PartyList.size();j++) {
PartyList.get(j).RemoveStrayMembers();
}
for (int i=0;i<Bukkit.getOnlinePlayers().toArray().length;i++) {
Player p = (Player)Bukkit.getOnlinePlayers().toArray()[i];
if (p!=null) {
@ -796,7 +811,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
//MESSAGE: Sound.NOTE_STICKS, 0.6f, 0.85f);
}
}
pluginupdater.FetchPlugins();
if (SERVER_TYPE==ServerType.MAIN) {
pluginupdater.FetchPlugins();
}
playerdata.put(ev.getPlayer().getUniqueId(), new PlayerStructure(ev.getPlayer(),getServerTickTime()));
log("[TASK] New Player Data has been added. Size of array: "+playerdata.size(),4);
@ -4795,54 +4812,53 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
final PlayerStructure pd2=pd;
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
public void run() {
String MonsterName = pd2.target.getType().toString().toLowerCase();
if (pd2.target.getCustomName()!=null) {
MonsterName = pd2.target.getCustomName();
if (MonsterName.contains(ChatColor.DARK_RED+"Hellfire") &&
pd2.target.getType()!=EntityType.ENDERMAN) {
pd2.target.setFireTicks(99999);
}
if (pd2.target.getCustomName()!=null &&
!pd2.target.getCustomName().contains("Leader") &&
MonsterController.isZombieLeader(pd2.target)) {
pd2.target.setCustomName(pd2.target.getCustomName()+" Leader");
if (Bukkit.getPlayer(pd2.name)!=null) {
String MonsterName = pd2.target.getType().toString().toLowerCase();
if (pd2.target.getCustomName()!=null) {
MonsterName = pd2.target.getCustomName();
if (MonsterName.contains(ChatColor.DARK_RED+"Hellfire")) {
pd2.target.setFireTicks(99999);
}
if (pd2.target.getCustomName()!=null &&
!pd2.target.getCustomName().contains("Leader") &&
MonsterController.isZombieLeader(pd2.target)) {
pd2.target.setCustomName(pd2.target.getCustomName()+" Leader");
MonsterName = pd2.target.getCustomName();
}
} else {
MonsterName = GenericFunctions.CapitalizeFirstLetters(MonsterName.replace("_", " "));
}
} else {
MonsterName = GenericFunctions.CapitalizeFirstLetters(MonsterName.replace("_", " "));
}
final String finalMonsterName = MonsterName;
String heartdisplay = "", remainingheartdisplay = "";
int color1=0,color2=1;
double health=pd2.target.getHealth();
double maxhealth=pd2.target.getMaxHealth();
if (health>20) {
while (health>20) {
color1++;
color2++;
health-=20;
final String finalMonsterName = MonsterName;
String heartdisplay = "", remainingheartdisplay = "";
int color1=0,color2=1;
double health=pd2.target.getHealth();
double maxhealth=pd2.target.getMaxHealth();
if (health>20) {
while (health>20) {
color1++;
color2++;
health-=20;
}
}
}
for (int i=0;i<health/2;i++) {
remainingheartdisplay+=Character.toString((char)0x2665);
}
if (maxhealth>20) {
for (int i=0;i<10;i++) {
heartdisplay+=Character.toString((char)0x2665);
for (int i=0;i<health/2;i++) {
remainingheartdisplay+=Character.toString((char)0x2665);
}
} else {
for (int i=0;i<maxhealth/2;i++) {
heartdisplay+=Character.toString((char)0x2665);
if (maxhealth>20) {
for (int i=0;i<10;i++) {
heartdisplay+=Character.toString((char)0x2665);
}
} else {
for (int i=0;i<maxhealth/2;i++) {
heartdisplay+=Character.toString((char)0x2665);
}
}
}
ChatColor finalcolor = GetHeartColor(color1);
ChatColor finalcolor2 = GetHeartColor(color2);
final String finalheartdisplay=finalcolor2+((finalcolor2==ChatColor.MAGIC)?remainingheartdisplay.replace((char)0x2665, 'A'):remainingheartdisplay)+finalcolor+((finalcolor==ChatColor.MAGIC)?heartdisplay.substring(0, heartdisplay.length()-remainingheartdisplay.length()).replace((char)0x2665, 'A'):heartdisplay.substring(0, heartdisplay.length()-remainingheartdisplay.length()));
p.sendTitle(message1, finalMonsterName+" "+finalheartdisplay+" "+ChatColor.RESET+ChatColor.DARK_GRAY+"x"+(int)(pd2.target.getHealth()/20+1));
}}
ChatColor finalcolor = GetHeartColor(color1);
ChatColor finalcolor2 = GetHeartColor(color2);
final String finalheartdisplay=finalcolor2+((finalcolor2==ChatColor.MAGIC)?remainingheartdisplay.replace((char)0x2665, 'A'):remainingheartdisplay)+finalcolor+((finalcolor==ChatColor.MAGIC)?heartdisplay.substring(0, heartdisplay.length()-remainingheartdisplay.length()).replace((char)0x2665, 'A'):heartdisplay.substring(0, heartdisplay.length()-remainingheartdisplay.length()));
p.sendTitle(message1, finalMonsterName+" "+finalheartdisplay+" "+ChatColor.RESET+ChatColor.DARK_GRAY+"x"+(int)(pd2.target.getHealth()/20+1));
}}}
,1);
if (pd.title_task!=-1) {
Bukkit.getScheduler().cancelTask(pd.title_task);
@ -5416,6 +5432,24 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
},20*180);
}
public void showPlayerStats(Player p) {
PlayerStructure pd = (PlayerStructure)playerdata.get(p.getUniqueId());
double old_weapondmg = pd.prev_weapondmg;
double old_buffdmg = pd.prev_buffdmg;
double old_partydmg = pd.prev_partydmg;
double old_armordef = pd.prev_armordef;
double store1=CalculateDamageReduction(1,p,p);
double store2=old_weapondmg;
if (GenericFunctions.isWeapon(p.getEquipment().getItemInMainHand())) {
store2 = CalculateWeaponDamage(p,null);
}
pd.damagedealt=store2;
DecimalFormat df = new DecimalFormat("0.0");
p.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Base Damage: "+ChatColor.RESET+""+ChatColor.DARK_PURPLE+df.format(pd.damagedealt));
p.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Damage Reduction: "+ChatColor.RESET+""+ChatColor.DARK_AQUA+df.format((1.0-pd.damagereduction)*100)+"%");
}
public static ServerType getServerType() {
return SERVER_TYPE;
}

Loading…
Cancel
Save