All changes up to 0.9.7

This commit is contained in:
nossr50 2011-03-23 10:53:54 -07:00
parent 6c6d2710e3
commit bb1c85ea4a
8 changed files with 69 additions and 28 deletions

View File

@ -1,5 +1,13 @@
Changelog: Changelog:
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code# #Versions without changelogs probably had very small misc fixes, like tweaks to the source code#
Version 0.9.7
Procs/XP Gain will no longer happen when the Entity is immune to damage (Thanks EdwardHand!)
Axes critical damage versus players reduced to 150% damage from 200% damage
Fixed bug where Daze might not proc
Changed archery Daze to follow smooth transition
Added archery Daze chance info to /archery
Cooldown lengths are now customizable, they are in seconds and multiplied by 2 by mcMMO
Version 0.9.6 Version 0.9.6
Timer checks for player being null before adding them to the mcUsers system Timer checks for player being null before adding them to the mcUsers system
Cooldowns will now show how much time is remaining when trying to use their respective abilities Cooldowns will now show how much time is remaining when trying to use their respective abilities

View File

@ -5,6 +5,7 @@ import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.craftbukkit.entity.CraftEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.block.BlockDamageEvent; import org.bukkit.event.block.BlockDamageEvent;
import org.bukkit.event.block.BlockFromToEvent; import org.bukkit.event.block.BlockFromToEvent;

View File

@ -424,29 +424,27 @@ public class mcCombat {
if(mcLoadProperties.pvpxp && !mcParty.getInstance().inSameParty(attacker, defender)){ if(mcLoadProperties.pvpxp && !mcParty.getInstance().inSameParty(attacker, defender)){
mcUsers.getProfile(attacker).addArcheryGather((event.getDamage() * 3) * mcLoadProperties.pvpxprewardmodifier); mcUsers.getProfile(attacker).addArcheryGather((event.getDamage() * 3) * mcLoadProperties.pvpxprewardmodifier);
} }
Location loc = defender.getLocation(); /*
* DAZE PROC
*/
Location loc = defender.getLocation();
if(Math.random() * 10 > 5){ if(Math.random() * 10 > 5){
loc.setPitch(90); loc.setPitch(90);
} else { } else {
loc.setPitch(-90); loc.setPitch(-90);
} }
/* if(mcUsers.getProfile(attacker).getArcheryInt() >= 1000){
* Check the proc if(Math.random() * 1000 <= 500){
*/ defender.teleportTo(loc);
if(mcUsers.getProfile(attacker).getArcheryInt() >= 300 && mcUsers.getProfile(attacker).getArcheryInt() < 400){ defender.sendMessage(ChatColor.DARK_RED+"Touched Fuzzy. Felt Dizzy.");
if(Math.random() * 10 > 7){ attacker.sendMessage("Target was "+ChatColor.DARK_RED+"Dazed");
defender.teleportTo(loc); }
defender.sendMessage(ChatColor.DARK_RED+"Touched Fuzzy. Felt Dizzy."); } else if(Math.random() * 2000 <= mcUsers.getProfile(attacker).getArcheryInt()){
attacker.sendMessage("Target was "+ChatColor.DARK_RED+"Dazed"); defender.teleportTo(loc);
} defender.sendMessage(ChatColor.DARK_RED+"Touched Fuzzy. Felt Dizzy.");
} attacker.sendMessage("Target was "+ChatColor.DARK_RED+"Dazed");
if(mcUsers.getProfile(attacker).getArcheryInt() >= 600){ }
if(Math.random() * 10 > 4){
defender.teleportTo(loc);
defender.sendMessage(ChatColor.DARK_RED+"Touched Fuzzy. Felt Dizzy.");
attacker.sendMessage("Target was "+ChatColor.DARK_RED+"Dazed");
}
}
if(mcUsers.getProfile(attacker).getArcheryInt() >= 50 && mcUsers.getProfile(attacker).getArcheryInt() < 250) if(mcUsers.getProfile(attacker).getArcheryInt() >= 50 && mcUsers.getProfile(attacker).getArcheryInt() < 250)
event.setDamage(calculateDamage(event, 1)); event.setDamage(calculateDamage(event, 1));
if(mcUsers.getProfile(attacker).getArcheryInt() >= 250 && mcUsers.getProfile(attacker).getArcheryInt() < 575) if(mcUsers.getProfile(attacker).getArcheryInt() >= 250 && mcUsers.getProfile(attacker).getArcheryInt() < 575)
@ -570,7 +568,11 @@ public class mcCombat {
Player player = (Player)x; Player player = (Player)x;
player.sendMessage(ChatColor.DARK_RED + "You were CRITICALLY hit!"); player.sendMessage(ChatColor.DARK_RED + "You were CRITICALLY hit!");
} }
event.setDamage(event.getDamage() * 2); if(x instanceof Player){
event.setDamage(event.getDamage() * 2 - event.getDamage() / 2);
} else {
event.setDamage(event.getDamage() * 2);
}
attacker.sendMessage(ChatColor.RED+"CRITICAL HIT!"); attacker.sendMessage(ChatColor.RED+"CRITICAL HIT!");
} }
} else if(Math.random() * 1000 <= mcUsers.getProfile(attacker).getAxesInt()){ } else if(Math.random() * 1000 <= mcUsers.getProfile(attacker).getAxesInt()){
@ -578,7 +580,11 @@ public class mcCombat {
Player player = (Player)x; Player player = (Player)x;
player.sendMessage(ChatColor.DARK_RED + "You were CRITICALLY hit!"); player.sendMessage(ChatColor.DARK_RED + "You were CRITICALLY hit!");
} }
event.setDamage(event.getDamage() * 2); if(x instanceof Player){
event.setDamage(event.getDamage() * 2 - event.getDamage() / 2);
} else {
event.setDamage(event.getDamage() * 2);
}
attacker.sendMessage(ChatColor.RED+"CRITICAL HIT!"); attacker.sendMessage(ChatColor.RED+"CRITICAL HIT!");
} }
} }

View File

@ -1,6 +1,9 @@
package com.gmail.nossr50; package com.gmail.nossr50;
import net.minecraft.server.EntityLiving;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.craftbukkit.entity.CraftEntity;
import org.bukkit.entity.Animals; import org.bukkit.entity.Animals;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.Monster; import org.bukkit.entity.Monster;
@ -36,6 +39,9 @@ public class mcEntityListener extends EntityListener {
} }
} }
public void onEntityDamage(EntityDamageEvent event) { public void onEntityDamage(EntityDamageEvent event) {
CraftEntity cEntity = (CraftEntity)event.getEntity();
EntityLiving entity = (EntityLiving)cEntity.getHandle();
if(entity.noDamageTicks < entity.maxNoDamageTicks/2.0F){
Entity x = event.getEntity(); Entity x = event.getEntity();
DamageCause type = event.getCause(); DamageCause type = event.getCause();
/* /*
@ -154,6 +160,7 @@ public class mcEntityListener extends EntityListener {
Player herpderp = (Player)x; Player herpderp = (Player)x;
mcUsers.getProfile(herpderp).setRecentlyHurt(30); mcUsers.getProfile(herpderp).setRecentlyHurt(30);
} }
}
} }
public void onEntityDeath(EntityDeathEvent event) { public void onEntityDeath(EntityDeathEvent event) {
Entity x = event.getEntity(); Entity x = event.getEntity();

View File

@ -3,13 +3,25 @@ package com.gmail.nossr50;
public class mcLoadProperties { public class mcLoadProperties {
public static Boolean toolsLoseDurabilityFromAbilities, pvpxp, miningrequirespickaxe, woodcuttingrequiresaxe, pvp, eggs, apples, myspawnclearsinventory, cake, music, diamond, glowstone, slowsand, sulphur, netherrack, bones, coal, clay, anvilmessages; public static Boolean toolsLoseDurabilityFromAbilities, pvpxp, miningrequirespickaxe, woodcuttingrequiresaxe, pvp, eggs, apples, myspawnclearsinventory, cake, music, diamond, glowstone, slowsand, sulphur, netherrack, bones, coal, clay, anvilmessages;
public static String mcability, mcmmo, mcc, mcrefresh, mcitem, mcgod, stats, mmoedit, ptp, party, myspawn, setmyspawn, whois, invite, accept, clearmyspawn; public static String mcability, mcmmo, mcc, mcrefresh, mcitem, mcgod, stats, mmoedit, ptp, party, myspawn, setmyspawn, whois, invite, accept, clearmyspawn;
public static int abilityDurabilityLoss, feathersConsumedByChimaeraWing, pvpxprewardmodifier, repairdiamondlevel, globalxpmodifier, miningxpmodifier, repairxpmodifier, woodcuttingxpmodifier, unarmedxpmodifier, herbalismxpmodifier, excavationxpmodifier, archeryxpmodifier, swordsxpmodifier, axesxpmodifier, acrobaticsxpmodifier; public static int superBreakerCooldown, gigaDrillBreakerCooldown, treeFellerCooldown, berserkCooldown, serratedStrikeCooldown, skullSplitterCooldown, abilityDurabilityLoss, feathersConsumedByChimaeraWing, pvpxprewardmodifier, repairdiamondlevel, globalxpmodifier, miningxpmodifier, repairxpmodifier, woodcuttingxpmodifier, unarmedxpmodifier, herbalismxpmodifier, excavationxpmodifier, archeryxpmodifier, swordsxpmodifier, axesxpmodifier, acrobaticsxpmodifier;
public static void loadMain(){ public static void loadMain(){
String propertiesFile = mcMMO.maindirectory + "mcmmo.properties"; String propertiesFile = mcMMO.maindirectory + "mcmmo.properties";
mcProperties properties = new mcProperties(propertiesFile); mcProperties properties = new mcProperties(propertiesFile);
properties.load(); properties.load();
/*
* COOLDOWN CONTROL
*/
superBreakerCooldown = properties.getInteger("superBreakerCooldown", 120);
gigaDrillBreakerCooldown = properties.getInteger("gigaDrillBreakerCooldown", 120);
treeFellerCooldown = properties.getInteger("treeFellerCooldown", 120);
berserkCooldown = properties.getInteger("berserkCooldown", 120);
serratedStrikeCooldown = properties.getInteger("serratedStrikeCooldown", 120);
skullSplitterCooldown = properties.getInteger("skullSplitterCooldown", 120);
/*
* OTHER
*/
toolsLoseDurabilityFromAbilities = properties.getBoolean("toolsLoseDurabilityFromAbilities", true); toolsLoseDurabilityFromAbilities = properties.getBoolean("toolsLoseDurabilityFromAbilities", true);
abilityDurabilityLoss = properties.getInteger("abilityDurabilityLoss", 2); abilityDurabilityLoss = properties.getInteger("abilityDurabilityLoss", 2);
feathersConsumedByChimaeraWing = properties.getInteger("feathersConsumedByChimaeraWing", 10); feathersConsumedByChimaeraWing = properties.getInteger("feathersConsumedByChimaeraWing", 10);

View File

@ -275,7 +275,7 @@ public class mcSkills {
mcUsers.getProfile(player).decreaseSkullSplitterTicks(); mcUsers.getProfile(player).decreaseSkullSplitterTicks();
if(mcUsers.getProfile(player).getSkullSplitterTicks() <= 0){ if(mcUsers.getProfile(player).getSkullSplitterTicks() <= 0){
mcUsers.getProfile(player).setSkullSplitterMode(false); mcUsers.getProfile(player).setSkullSplitterMode(false);
mcUsers.getProfile(player).setSkullSplitterCooldown(120); mcUsers.getProfile(player).setSkullSplitterCooldown(mcLoadProperties.skullSplitterCooldown);
player.sendMessage(ChatColor.RED+"**Skull Splitter has worn off**"); player.sendMessage(ChatColor.RED+"**Skull Splitter has worn off**");
} }
} }
@ -288,7 +288,7 @@ public class mcSkills {
mcUsers.getProfile(player).decreaseTreeFellerTicks(); mcUsers.getProfile(player).decreaseTreeFellerTicks();
if(mcUsers.getProfile(player).getTreeFellerTicks() <= 0){ if(mcUsers.getProfile(player).getTreeFellerTicks() <= 0){
mcUsers.getProfile(player).setTreeFellerMode(false); mcUsers.getProfile(player).setTreeFellerMode(false);
mcUsers.getProfile(player).setTreeFellerCooldown(120); mcUsers.getProfile(player).setTreeFellerCooldown(mcLoadProperties.treeFellerCooldown);
player.sendMessage(ChatColor.RED+"**Tree Feller has worn off**"); player.sendMessage(ChatColor.RED+"**Tree Feller has worn off**");
} }
} }
@ -301,7 +301,7 @@ public class mcSkills {
mcUsers.getProfile(player).decreaseSuperBreakerTicks(); mcUsers.getProfile(player).decreaseSuperBreakerTicks();
if(mcUsers.getProfile(player).getSuperBreakerTicks() <= 0){ if(mcUsers.getProfile(player).getSuperBreakerTicks() <= 0){
mcUsers.getProfile(player).setSuperBreakerMode(false); mcUsers.getProfile(player).setSuperBreakerMode(false);
mcUsers.getProfile(player).setSuperBreakerCooldown(120); mcUsers.getProfile(player).setSuperBreakerCooldown(mcLoadProperties.superBreakerCooldown);
player.sendMessage(ChatColor.RED+"**Super Breaker has worn off**"); player.sendMessage(ChatColor.RED+"**Super Breaker has worn off**");
} }
} }
@ -314,7 +314,7 @@ public class mcSkills {
mcUsers.getProfile(player).decreaseGigaDrillBreakerTicks(); mcUsers.getProfile(player).decreaseGigaDrillBreakerTicks();
if(mcUsers.getProfile(player).getGigaDrillBreakerTicks() <= 0){ if(mcUsers.getProfile(player).getGigaDrillBreakerTicks() <= 0){
mcUsers.getProfile(player).setGigaDrillBreakerMode(false); mcUsers.getProfile(player).setGigaDrillBreakerMode(false);
mcUsers.getProfile(player).setGigaDrillBreakerCooldown(120); mcUsers.getProfile(player).setGigaDrillBreakerCooldown(mcLoadProperties.gigaDrillBreakerCooldown);
player.sendMessage(ChatColor.RED+"**You feel spiral energy leaving you**"); player.sendMessage(ChatColor.RED+"**You feel spiral energy leaving you**");
} }
} }
@ -327,7 +327,7 @@ public class mcSkills {
mcUsers.getProfile(player).decreaseSerratedStrikesTicks(); mcUsers.getProfile(player).decreaseSerratedStrikesTicks();
if(mcUsers.getProfile(player).getSerratedStrikesTicks() <= 0){ if(mcUsers.getProfile(player).getSerratedStrikesTicks() <= 0){
mcUsers.getProfile(player).setSerratedStrikesMode(false); mcUsers.getProfile(player).setSerratedStrikesMode(false);
mcUsers.getProfile(player).setSerratedStrikesCooldown(120); mcUsers.getProfile(player).setSerratedStrikesCooldown(mcLoadProperties.serratedStrikeCooldown);
player.sendMessage(ChatColor.RED+"**Serrated Strikes has worn off**"); player.sendMessage(ChatColor.RED+"**Serrated Strikes has worn off**");
} }
} }
@ -340,7 +340,7 @@ public class mcSkills {
mcUsers.getProfile(player).decreaseBerserkTicks(); mcUsers.getProfile(player).decreaseBerserkTicks();
if(mcUsers.getProfile(player).getBerserkTicks() <= 0){ if(mcUsers.getProfile(player).getBerserkTicks() <= 0){
mcUsers.getProfile(player).setBerserkMode(false); mcUsers.getProfile(player).setBerserkMode(false);
mcUsers.getProfile(player).setBerserkCooldown(120); mcUsers.getProfile(player).setBerserkCooldown(mcLoadProperties.berserkCooldown);
player.sendMessage(ChatColor.RED+"**Berserk has worn off**"); player.sendMessage(ChatColor.RED+"**Berserk has worn off**");
} }
} }

View File

@ -271,6 +271,12 @@ public class mcm {
float skillvalue = (float)mcUsers.getProfile(player).getArcheryInt(); float skillvalue = (float)mcUsers.getProfile(player).getArcheryInt();
String percentage = String.valueOf((skillvalue / 1000) * 100); String percentage = String.valueOf((skillvalue / 1000) * 100);
String percentagefire = String.valueOf((skillvalue / 1500) * 100); String percentagefire = String.valueOf((skillvalue / 1500) * 100);
String percentagedaze;
if(mcUsers.getProfile(player).getArcheryInt() < 1000){
percentagedaze = String.valueOf((skillvalue / 2000) * 100);
} else {
percentagedaze = "50";
}
player.sendMessage(ChatColor.RED+"-----[]"+ChatColor.GREEN+"ARCHERY"+ChatColor.RED+"[]-----"); player.sendMessage(ChatColor.RED+"-----[]"+ChatColor.GREEN+"ARCHERY"+ChatColor.RED+"[]-----");
player.sendMessage(ChatColor.DARK_GRAY+"XP GAIN: "+ChatColor.WHITE+"Attacking Monsters"); player.sendMessage(ChatColor.DARK_GRAY+"XP GAIN: "+ChatColor.WHITE+"Attacking Monsters");
player.sendMessage(ChatColor.RED+"---[]"+ChatColor.GREEN+"EFFECTS"+ChatColor.RED+"[]---"); player.sendMessage(ChatColor.RED+"---[]"+ChatColor.GREEN+"EFFECTS"+ChatColor.RED+"[]---");
@ -279,6 +285,7 @@ public class mcm {
player.sendMessage(ChatColor.DARK_AQUA+"Damage+: "+ChatColor.GREEN+"Modifies Damage"); player.sendMessage(ChatColor.DARK_AQUA+"Damage+: "+ChatColor.GREEN+"Modifies Damage");
player.sendMessage(ChatColor.DARK_AQUA+"Arrow Retrieval: "+ChatColor.GREEN+"Chance to retrieve arrows from corpses"); player.sendMessage(ChatColor.DARK_AQUA+"Arrow Retrieval: "+ChatColor.GREEN+"Chance to retrieve arrows from corpses");
player.sendMessage(ChatColor.RED+"---[]"+ChatColor.GREEN+"YOUR STATS"+ChatColor.RED+"[]---"); player.sendMessage(ChatColor.RED+"---[]"+ChatColor.GREEN+"YOUR STATS"+ChatColor.RED+"[]---");
player.sendMessage(ChatColor.RED+"Chance to Daze: "+ChatColor.YELLOW+percentagedaze+"%");
player.sendMessage(ChatColor.RED+"Chance to Retrieve Arrows: "+ChatColor.YELLOW+percentage+"%"); player.sendMessage(ChatColor.RED+"Chance to Retrieve Arrows: "+ChatColor.YELLOW+percentage+"%");
player.sendMessage(ChatColor.RED+"Chance for Ignition: "+ChatColor.YELLOW+percentagefire+"%"); player.sendMessage(ChatColor.RED+"Chance for Ignition: "+ChatColor.YELLOW+percentagefire+"%");
player.sendMessage(ChatColor.RED+"Damage+ (Rank"+rank+"): Bonus "+rank+" damage"); player.sendMessage(ChatColor.RED+"Damage+ (Rank"+rank+"): Bonus "+rank+" damage");

View File

@ -1,3 +1,3 @@
name: mcMMO name: mcMMO
main: com.gmail.nossr50.mcMMO main: com.gmail.nossr50.mcMMO
version: 0.9.6 version: 0.9.7