mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
All changes up to 0.9.7
This commit is contained in:
parent
6c6d2710e3
commit
bb1c85ea4a
@ -1,5 +1,13 @@
|
||||
Changelog:
|
||||
#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
|
||||
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
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.entity.CraftEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.block.BlockDamageEvent;
|
||||
import org.bukkit.event.block.BlockFromToEvent;
|
||||
|
@ -424,29 +424,27 @@ public class mcCombat {
|
||||
if(mcLoadProperties.pvpxp && !mcParty.getInstance().inSameParty(attacker, defender)){
|
||||
mcUsers.getProfile(attacker).addArcheryGather((event.getDamage() * 3) * mcLoadProperties.pvpxprewardmodifier);
|
||||
}
|
||||
/*
|
||||
* DAZE PROC
|
||||
*/
|
||||
Location loc = defender.getLocation();
|
||||
if(Math.random() * 10 > 5){
|
||||
loc.setPitch(90);
|
||||
} else {
|
||||
loc.setPitch(-90);
|
||||
}
|
||||
/*
|
||||
* Check the proc
|
||||
*/
|
||||
if(mcUsers.getProfile(attacker).getArcheryInt() >= 300 && mcUsers.getProfile(attacker).getArcheryInt() < 400){
|
||||
if(Math.random() * 10 > 7){
|
||||
if(mcUsers.getProfile(attacker).getArcheryInt() >= 1000){
|
||||
if(Math.random() * 1000 <= 500){
|
||||
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){
|
||||
} else if(Math.random() * 2000 <= mcUsers.getProfile(attacker).getArcheryInt()){
|
||||
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)
|
||||
event.setDamage(calculateDamage(event, 1));
|
||||
if(mcUsers.getProfile(attacker).getArcheryInt() >= 250 && mcUsers.getProfile(attacker).getArcheryInt() < 575)
|
||||
@ -570,7 +568,11 @@ public class mcCombat {
|
||||
Player player = (Player)x;
|
||||
player.sendMessage(ChatColor.DARK_RED + "You were CRITICALLY hit!");
|
||||
}
|
||||
if(x instanceof Player){
|
||||
event.setDamage(event.getDamage() * 2 - event.getDamage() / 2);
|
||||
} else {
|
||||
event.setDamage(event.getDamage() * 2);
|
||||
}
|
||||
attacker.sendMessage(ChatColor.RED+"CRITICAL HIT!");
|
||||
}
|
||||
} else if(Math.random() * 1000 <= mcUsers.getProfile(attacker).getAxesInt()){
|
||||
@ -578,7 +580,11 @@ public class mcCombat {
|
||||
Player player = (Player)x;
|
||||
player.sendMessage(ChatColor.DARK_RED + "You were CRITICALLY hit!");
|
||||
}
|
||||
if(x instanceof Player){
|
||||
event.setDamage(event.getDamage() * 2 - event.getDamage() / 2);
|
||||
} else {
|
||||
event.setDamage(event.getDamage() * 2);
|
||||
}
|
||||
attacker.sendMessage(ChatColor.RED+"CRITICAL HIT!");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.gmail.nossr50;
|
||||
|
||||
import net.minecraft.server.EntityLiving;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.entity.CraftEntity;
|
||||
import org.bukkit.entity.Animals;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Monster;
|
||||
@ -36,6 +39,9 @@ public class mcEntityListener extends EntityListener {
|
||||
}
|
||||
}
|
||||
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();
|
||||
DamageCause type = event.getCause();
|
||||
/*
|
||||
@ -155,6 +161,7 @@ public class mcEntityListener extends EntityListener {
|
||||
mcUsers.getProfile(herpderp).setRecentlyHurt(30);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void onEntityDeath(EntityDeathEvent event) {
|
||||
Entity x = event.getEntity();
|
||||
mcSkills.getInstance().arrowRetrievalCheck(x);
|
||||
|
@ -3,13 +3,25 @@ package com.gmail.nossr50;
|
||||
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 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(){
|
||||
String propertiesFile = mcMMO.maindirectory + "mcmmo.properties";
|
||||
mcProperties properties = new mcProperties(propertiesFile);
|
||||
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);
|
||||
abilityDurabilityLoss = properties.getInteger("abilityDurabilityLoss", 2);
|
||||
feathersConsumedByChimaeraWing = properties.getInteger("feathersConsumedByChimaeraWing", 10);
|
||||
|
@ -275,7 +275,7 @@ public class mcSkills {
|
||||
mcUsers.getProfile(player).decreaseSkullSplitterTicks();
|
||||
if(mcUsers.getProfile(player).getSkullSplitterTicks() <= 0){
|
||||
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**");
|
||||
}
|
||||
}
|
||||
@ -288,7 +288,7 @@ public class mcSkills {
|
||||
mcUsers.getProfile(player).decreaseTreeFellerTicks();
|
||||
if(mcUsers.getProfile(player).getTreeFellerTicks() <= 0){
|
||||
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**");
|
||||
}
|
||||
}
|
||||
@ -301,7 +301,7 @@ public class mcSkills {
|
||||
mcUsers.getProfile(player).decreaseSuperBreakerTicks();
|
||||
if(mcUsers.getProfile(player).getSuperBreakerTicks() <= 0){
|
||||
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**");
|
||||
}
|
||||
}
|
||||
@ -314,7 +314,7 @@ public class mcSkills {
|
||||
mcUsers.getProfile(player).decreaseGigaDrillBreakerTicks();
|
||||
if(mcUsers.getProfile(player).getGigaDrillBreakerTicks() <= 0){
|
||||
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**");
|
||||
}
|
||||
}
|
||||
@ -327,7 +327,7 @@ public class mcSkills {
|
||||
mcUsers.getProfile(player).decreaseSerratedStrikesTicks();
|
||||
if(mcUsers.getProfile(player).getSerratedStrikesTicks() <= 0){
|
||||
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**");
|
||||
}
|
||||
}
|
||||
@ -340,7 +340,7 @@ public class mcSkills {
|
||||
mcUsers.getProfile(player).decreaseBerserkTicks();
|
||||
if(mcUsers.getProfile(player).getBerserkTicks() <= 0){
|
||||
mcUsers.getProfile(player).setBerserkMode(false);
|
||||
mcUsers.getProfile(player).setBerserkCooldown(120);
|
||||
mcUsers.getProfile(player).setBerserkCooldown(mcLoadProperties.berserkCooldown);
|
||||
player.sendMessage(ChatColor.RED+"**Berserk has worn off**");
|
||||
}
|
||||
}
|
||||
|
@ -271,6 +271,12 @@ public class mcm {
|
||||
float skillvalue = (float)mcUsers.getProfile(player).getArcheryInt();
|
||||
String percentage = String.valueOf((skillvalue / 1000) * 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.DARK_GRAY+"XP GAIN: "+ChatColor.WHITE+"Attacking Monsters");
|
||||
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+"Arrow Retrieval: "+ChatColor.GREEN+"Chance to retrieve arrows from corpses");
|
||||
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 for Ignition: "+ChatColor.YELLOW+percentagefire+"%");
|
||||
player.sendMessage(ChatColor.RED+"Damage+ (Rank"+rank+"): Bonus "+rank+" damage");
|
||||
|
@ -1,3 +1,3 @@
|
||||
name: mcMMO
|
||||
main: com.gmail.nossr50.mcMMO
|
||||
version: 0.9.6
|
||||
version: 0.9.7
|
Loading…
Reference in New Issue
Block a user