mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
Limit Break Nerfs
This commit is contained in:
parent
c818bf82b0
commit
6c58e8a243
@ -1,5 +1,8 @@
|
||||
Version 2.1.95
|
||||
Added missing Chorus_Fruit & Chorus_Plant entries to Herbalism's Bonus Drops in config.yml (See notes)
|
||||
Limit Break damage bonuses now only apply to Players
|
||||
Limit Break now does dramatically less damage to players with lower grades of armor
|
||||
Updated in game text to reflect changes to Limit Break
|
||||
Fixed a bug preventing Wandering Traders from granting XP
|
||||
Fixed a bug that prevented Chorus Tree's from giving full XP if you broke anything other than the bottom block
|
||||
Fixed a bug which could cause Large Fern's to reward less XP
|
||||
@ -8,6 +11,7 @@ Version 2.1.95
|
||||
Added some protection to Acrobatics to prevent gaining too much XP in one Roll.
|
||||
Added 'Carrots, Cocoa, Potatoes, Wheat, Beetroots, Nether_Wart' to Herbalism in experience.yml (See notes)
|
||||
Removed the _Ripe entries from experience.yml (no longer used)
|
||||
Updated locale string 'Swords.SubSkill.SwordsLimitBreak.Description' & 'Swords.SubSkill.SwordsLimitBreak.Stat'
|
||||
Added missing 'Chorus_Flower' entry to herbalism in experience.yml
|
||||
Added some debug messages about XP gains if you are in debug mode
|
||||
Added some debug messages for Acrobatics if you are in debug mode
|
||||
|
@ -24,6 +24,7 @@ import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
@ -74,7 +75,7 @@ public final class CombatUtils {
|
||||
swordsManager.serratedStrikes(target, initialDamage, modifiers);
|
||||
}
|
||||
|
||||
if(canUseLimitBreak(player, SubSkillType.SWORDS_SWORDS_LIMIT_BREAK))
|
||||
if(canUseLimitBreak(player, target, SubSkillType.SWORDS_SWORDS_LIMIT_BREAK))
|
||||
{
|
||||
finalDamage+=getLimitBreakDamage(player, SubSkillType.SWORDS_SWORDS_LIMIT_BREAK);
|
||||
}
|
||||
@ -118,7 +119,7 @@ public final class CombatUtils {
|
||||
finalDamage+=axesManager.criticalHit(target, finalDamage);
|
||||
}
|
||||
|
||||
if(canUseLimitBreak(player, SubSkillType.AXES_AXES_LIMIT_BREAK))
|
||||
if(canUseLimitBreak(player, target, SubSkillType.AXES_AXES_LIMIT_BREAK))
|
||||
{
|
||||
finalDamage+=getLimitBreakDamage(player, SubSkillType.AXES_AXES_LIMIT_BREAK);
|
||||
}
|
||||
@ -157,7 +158,7 @@ public final class CombatUtils {
|
||||
unarmedManager.disarmCheck((Player) target);
|
||||
}
|
||||
|
||||
if(canUseLimitBreak(player, SubSkillType.UNARMED_UNARMED_LIMIT_BREAK))
|
||||
if(canUseLimitBreak(player, target, SubSkillType.UNARMED_UNARMED_LIMIT_BREAK))
|
||||
{
|
||||
finalDamage+=getLimitBreakDamage(player, SubSkillType.UNARMED_UNARMED_LIMIT_BREAK);
|
||||
}
|
||||
@ -225,7 +226,7 @@ public final class CombatUtils {
|
||||
archeryManager.retrieveArrows(target, arrow);
|
||||
}
|
||||
|
||||
if(canUseLimitBreak(player, SubSkillType.ARCHERY_ARCHERY_LIMIT_BREAK))
|
||||
if(canUseLimitBreak(player, target, SubSkillType.ARCHERY_ARCHERY_LIMIT_BREAK))
|
||||
{
|
||||
finalDamage+=getLimitBreakDamage(player, SubSkillType.ARCHERY_ARCHERY_LIMIT_BREAK);
|
||||
}
|
||||
@ -383,8 +384,61 @@ public final class CombatUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static int getLimitBreakDamage(Player player, SubSkillType subSkillType) {
|
||||
return RankUtils.getRank(player, subSkillType);
|
||||
public static int getLimitBreakDamage(Player player, Player defender, SubSkillType subSkillType) {
|
||||
int rawDamageBoost = RankUtils.getRank(player, subSkillType);
|
||||
int armorQualityLevel = getArmorQualityLevel(defender);
|
||||
|
||||
if(armorQualityLevel <= 4) {
|
||||
rawDamageBoost *= .25; //75% Nerf
|
||||
} else if(armorQualityLevel <= 8) {
|
||||
rawDamageBoost *= .50; //50% Nerf
|
||||
} else if(armorQualityLevel <= 12) {
|
||||
rawDamageBoost *= .75; //25% Nerf
|
||||
}
|
||||
|
||||
return rawDamageBoost;
|
||||
}
|
||||
|
||||
public static int getArmorQualityLevel(Player defender) {
|
||||
int armorQualityLevel = 0;
|
||||
|
||||
for(ItemStack itemStack : defender.getInventory().getArmorContents()) {
|
||||
if(itemStack != null) {
|
||||
armorQualityLevel += getArmorQuality(itemStack);
|
||||
}
|
||||
}
|
||||
|
||||
return armorQualityLevel;
|
||||
}
|
||||
|
||||
private static int getArmorQuality(ItemStack itemStack) {
|
||||
int quality = 0;
|
||||
|
||||
switch(itemStack.getType()) {
|
||||
case LEATHER_HELMET:
|
||||
case LEATHER_BOOTS:
|
||||
case LEATHER_CHESTPLATE:
|
||||
case LEATHER_LEGGINGS:
|
||||
return 1;
|
||||
case IRON_HELMET:
|
||||
case IRON_BOOTS:
|
||||
case IRON_CHESTPLATE:
|
||||
case IRON_LEGGINGS:
|
||||
return 2;
|
||||
case GOLDEN_HELMET:
|
||||
case GOLDEN_BOOTS:
|
||||
case GOLDEN_CHESTPLATE:
|
||||
case GOLDEN_LEGGINGS:
|
||||
return 3;
|
||||
case DIAMOND_HELMET:
|
||||
case DIAMOND_BOOTS:
|
||||
case DIAMOND_CHESTPLATE:
|
||||
case DIAMOND_LEGGINGS:
|
||||
return 6;
|
||||
default:
|
||||
return 1;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -392,9 +446,13 @@ public final class CombatUtils {
|
||||
* @param player target player
|
||||
* @return true if the player has access to the limit break
|
||||
*/
|
||||
public static boolean canUseLimitBreak(Player player, SubSkillType subSkillType) {
|
||||
return RankUtils.hasUnlockedSubskill(player, subSkillType)
|
||||
&& Permissions.isSubSkillEnabled(player, subSkillType);
|
||||
public static boolean canUseLimitBreak(Player player, LivingEntity target, SubSkillType subSkillType) {
|
||||
if(target instanceof Player) {
|
||||
return RankUtils.hasUnlockedSubskill(player, subSkillType)
|
||||
&& Permissions.isSubSkillEnabled(player, subSkillType);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -171,8 +171,8 @@ Archery.SubSkill.ArrowRetrieval.Name=Arrow Retrieval
|
||||
Archery.SubSkill.ArrowRetrieval.Description=Chance to retrieve arrows from corpses
|
||||
Archery.SubSkill.ArrowRetrieval.Stat=Arrow Recovery Chance
|
||||
Archery.SubSkill.ArcheryLimitBreak.Name=Archery Limit Break
|
||||
Archery.SubSkill.ArcheryLimitBreak.Description=Breaking your limits.
|
||||
Archery.SubSkill.ArcheryLimitBreak.Stat=Limit Break Bonus DMG
|
||||
Archery.SubSkill.ArcheryLimitBreak.Description=Breaking your limits. (PVP Only)
|
||||
Archery.SubSkill.ArcheryLimitBreak.Stat=Limit Break PVP DMG
|
||||
Archery.Listener=Archery:
|
||||
Archery.SkillName=ARCHERY
|
||||
#AXES
|
||||
@ -198,8 +198,8 @@ Axes.SubSkill.CriticalStrikes.Stat=Critical Strike Chance
|
||||
Axes.SubSkill.AxeMastery.Name=Axe Mastery
|
||||
Axes.SubSkill.AxeMastery.Description=Adds bonus DMG
|
||||
Axes.SubSkill.AxesLimitBreak.Name=Axes Limit Break
|
||||
Axes.SubSkill.AxesLimitBreak.Description=Breaking your limits.
|
||||
Axes.SubSkill.AxesLimitBreak.Stat=Limit Break Bonus DMG
|
||||
Axes.SubSkill.AxesLimitBreak.Description=Breaking your limits. (PVP Only)
|
||||
Axes.SubSkill.AxesLimitBreak.Stat=Limit Break PVP DMG
|
||||
Axes.SubSkill.ArmorImpact.Name=Armor Impact
|
||||
Axes.SubSkill.ArmorImpact.Description=Strike with enough force to shatter armor
|
||||
Axes.SubSkill.GreaterImpact.Name=Greater Impact
|
||||
@ -423,8 +423,8 @@ Swords.SubSkill.Stab.Name=Stab
|
||||
Swords.SubSkill.Stab.Description=Adds bonus damage to your attacks.
|
||||
Swords.SubSkill.Stab.Stat=Stab Damage
|
||||
Swords.SubSkill.SwordsLimitBreak.Name=Swords Limit Break
|
||||
Swords.SubSkill.SwordsLimitBreak.Description=Breaking your limits.
|
||||
Swords.SubSkill.SwordsLimitBreak.Stat=Limit Break Bonus DMG
|
||||
Swords.SubSkill.SwordsLimitBreak.Description=Breaking your limits. (PVP Only)
|
||||
Swords.SubSkill.SwordsLimitBreak.Stat=Limit Break PVP DMG
|
||||
Swords.SubSkill.Rupture.Stat=Rupture Chance
|
||||
Swords.SubSkill.Rupture.Stat.Extra=Rupture: [[GREEN]]{0} ticks [{1} DMG vs Player] [{2} DMG vs Mobs]
|
||||
Swords.Effect.4=Serrated Strikes Rupture+
|
||||
@ -502,8 +502,8 @@ Unarmed.SubSkill.Disarm.Name=Disarm
|
||||
Unarmed.SubSkill.Disarm.Description=Drops the foes item held in hand
|
||||
Unarmed.SubSkill.Disarm.Stat=Disarm Chance
|
||||
Unarmed.SubSkill.UnarmedLimitBreak.Name=Unarmed Limit Break
|
||||
Unarmed.SubSkill.UnarmedLimitBreak.Description=Breaking your limits.
|
||||
Unarmed.SubSkill.UnarmedLimitBreak.Stat=Limit Break Bonus DMG
|
||||
Unarmed.SubSkill.UnarmedLimitBreak.Description=Breaking your limits. (PVP Only)
|
||||
Unarmed.SubSkill.UnarmedLimitBreak.Stat=Limit Break PVP DMG
|
||||
Unarmed.SubSkill.IronArmStyle.Name=Iron Arm Style
|
||||
Unarmed.SubSkill.IronArmStyle.Description=Hardens your arm over time
|
||||
Unarmed.SubSkill.ArrowDeflect.Name=Arrow Deflect
|
||||
|
Loading…
Reference in New Issue
Block a user