More work on Impact. Tweaked Unarmed's disarm chance to be 2x better.

This commit is contained in:
nossr50 2012-02-29 15:22:03 -08:00
parent ed2e9a993d
commit 0f8a418efd
5 changed files with 15 additions and 11 deletions

View File

@ -45,6 +45,7 @@ Version 1.3.00-dev
! Changed Unarmed to start with a +3 DMG (1 Heart = 2 DMG) bonus from Iron Arm Style to make leveling it more viable
! Changed Unarmed to gain bonus damage every 50 skill levels
! Changed Unarmed to gain more bonus damage total than before
! Changed Unarmed to disarm twice as often as before
! Changed Tree Feller to take down entire trees
! Changed mob spawn tracking to use Unique Entity ID instead of Entity Object
! Changed stats command name to mcstats for better plugin compatibility

View File

@ -83,8 +83,8 @@ public class Combat
Axes.axeCriticalCheck(attacker, event, pluginx); //Critical hit
//Impact
//if(event.getEntity() instanceof LivingEntity)
// Axes.impact(attacker, (LivingEntity)event.getEntity());
if(event.getEntity() instanceof LivingEntity)
Axes.impact(attacker, (LivingEntity)event.getEntity());
if (!(event instanceof FakeEntityDamageByEntityEvent) && PPa.getSkullSplitterMode())
Axes.applyAoeDamage(attacker, event, pluginx);
@ -99,6 +99,7 @@ public class Combat
Unarmed.unarmedBonus(attacker, event);
if(PPa.getBerserkMode())
event.setDamage(event.getDamage() + (event.getDamage() / 2));
if(target instanceof Player)
Unarmed.disarmProcCheck(attacker, (Player) target); //Disarm

View File

@ -26,7 +26,7 @@ public class UnarmedCommand implements CommandExecutor {
float skillvalue = (float) PP.getSkillLevel(SkillType.UNARMED);
if (PP.getSkillLevel(SkillType.UNARMED) < 1000)
percentage = String.valueOf((skillvalue / 4000) * 100);
percentage = String.valueOf((skillvalue / 2000) * 100);
else
percentage = "25";

View File

@ -17,6 +17,7 @@
package com.gmail.nossr50.skills;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
@ -25,6 +26,7 @@ import org.bukkit.entity.Wolf;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;
import org.bukkit.util.Vector;
import com.gmail.nossr50.Combat;
import com.gmail.nossr50.Users;
@ -94,7 +96,6 @@ public class Axes {
for(ItemStack x : targetPlayer.getInventory().getArmorContents())
{
System.out.println("[mcMMO] DEBUG: "+x.getType().toString());
if(x.getType() == Material.AIR)
{
emptySlots++;
@ -105,12 +106,13 @@ public class Axes {
if(emptySlots == 4)
{
didImpact = applyImpact(attacker, target);
if(didImpact)
targetPlayer.sendMessage("**HIT BY IMPACT**");
didImpact = applyImpact(target);
}
} else {
//Since mobs are technically unarmored this will always trigger
didImpact = applyImpact(target);
didImpact = applyImpact(attacker, target);
}
if(didImpact)
@ -119,12 +121,12 @@ public class Axes {
}
}
public static boolean applyImpact(LivingEntity target)
public static boolean applyImpact(Player attacker, LivingEntity target)
{
if(Math.random() * 100 > 75)
{
target.teleport(target.getLocation());
target.damage(2);
target.setVelocity(attacker.getLocation().getDirection().normalize().multiply(1.5D));
return true;
}
return false;

View File

@ -46,7 +46,7 @@ public class Unarmed {
{
if(skillLevel >= 1000)
{
if(Math.random() * 4000 <= 1000)
if(Math.random() * 2000 <= 1000)
{
ItemStack item = defender.getItemInHand();
if(item != null)
@ -59,7 +59,7 @@ public class Unarmed {
}
else
{
if(Math.random() * 4000 <= skillLevel)
if(Math.random() * 2000 <= skillLevel)
{
ItemStack item = defender.getItemInHand();
if(item != null)