mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Minor tweaks.
This commit is contained in:
parent
38c3891533
commit
4392e6b9ab
@ -43,7 +43,7 @@ public class AcrobaticsManager extends SkillManager {
|
|||||||
* Handle the damage reduction and XP gain from the Dodge ability
|
* Handle the damage reduction and XP gain from the Dodge ability
|
||||||
*
|
*
|
||||||
* @param damage The amount of damage initially dealt by the event
|
* @param damage The amount of damage initially dealt by the event
|
||||||
* @return the modified event damage if the dodge was successful, the original event damage otherwise
|
* @return the modified event damage if the ability was successful, the original event damage otherwise
|
||||||
*/
|
*/
|
||||||
public int dodgeCheck(int damage) {
|
public int dodgeCheck(int damage) {
|
||||||
int modifiedDamage = Acrobatics.calculateModifiedDodgeDamage(damage, Acrobatics.dodgeDamageModifier);
|
int modifiedDamage = Acrobatics.calculateModifiedDodgeDamage(damage, Acrobatics.dodgeDamageModifier);
|
||||||
@ -73,13 +73,13 @@ public class AcrobaticsManager extends SkillManager {
|
|||||||
* Handle the damage reduction and XP gain from the Roll ability
|
* Handle the damage reduction and XP gain from the Roll ability
|
||||||
*
|
*
|
||||||
* @param damage The amount of damage initially dealt by the event
|
* @param damage The amount of damage initially dealt by the event
|
||||||
* @return the modified event damage if the roll was successful, the original event damage otherwise
|
* @return the modified event damage if the ability was successful, the original event damage otherwise
|
||||||
*/
|
*/
|
||||||
public int rollCheck(int damage) {
|
public int rollCheck(int damage) {
|
||||||
Player player = getPlayer();
|
Player player = getPlayer();
|
||||||
|
|
||||||
if (player.isSneaking() && Permissions.gracefulRoll(player)) {
|
if (player.isSneaking() && Permissions.gracefulRoll(player)) {
|
||||||
return gracefulRollCheck(player, damage);
|
return gracefulRollCheck(damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
int modifiedDamage = Acrobatics.calculateModifiedRollDamage(damage, Acrobatics.rollThreshold);
|
int modifiedDamage = Acrobatics.calculateModifiedRollDamage(damage, Acrobatics.rollThreshold);
|
||||||
@ -101,13 +101,13 @@ public class AcrobaticsManager extends SkillManager {
|
|||||||
* Handle the damage reduction and XP gain from the Graceful Roll ability
|
* Handle the damage reduction and XP gain from the Graceful Roll ability
|
||||||
*
|
*
|
||||||
* @param damage The amount of damage initially dealt by the event
|
* @param damage The amount of damage initially dealt by the event
|
||||||
* @return the modified event damage if the roll was successful, the original event damage otherwise
|
* @return the modified event damage if the ability was successful, the original event damage otherwise
|
||||||
*/
|
*/
|
||||||
private int gracefulRollCheck(Player player, int damage) {
|
private int gracefulRollCheck(int damage) {
|
||||||
int modifiedDamage = Acrobatics.calculateModifiedRollDamage(damage, Acrobatics.gracefulRollThreshold);
|
int modifiedDamage = Acrobatics.calculateModifiedRollDamage(damage, Acrobatics.gracefulRollThreshold);
|
||||||
|
|
||||||
if (!isFatal(modifiedDamage) && isSuccessfulRoll(Acrobatics.gracefulRollMaxChance, Acrobatics.gracefulRollMaxBonusLevel, Acrobatics.gracefulRollSuccessModifier)) {
|
if (!isFatal(modifiedDamage) && isSuccessfulRoll(Acrobatics.gracefulRollMaxChance, Acrobatics.gracefulRollMaxBonusLevel, Acrobatics.gracefulRollSuccessModifier)) {
|
||||||
player.sendMessage(LocaleLoader.getString("Acrobatics.Ability.Proc"));
|
getPlayer().sendMessage(LocaleLoader.getString("Acrobatics.Ability.Proc"));
|
||||||
applyXpGain(damage * Acrobatics.rollXpModifier);
|
applyXpGain(damage * Acrobatics.rollXpModifier);
|
||||||
|
|
||||||
return modifiedDamage;
|
return modifiedDamage;
|
||||||
|
Loading…
Reference in New Issue
Block a user