Merge remote-tracking branch 'origin/master'

This commit is contained in:
Shaun Bennett 2015-04-21 00:20:40 -04:00
commit 2b8137fc66
13 changed files with 63 additions and 32 deletions

View File

@ -102,8 +102,6 @@ public class AntiHack extends MiniPlugin
_movementDetectors.add(new Speed(this));
_combatDetectors.add(new Reach(this));
_enabled = false;
}
public static void Initialize(JavaPlugin plugin, Punish punish, Portal portal, PreferencesManager preferences, CoreClientManager clientManager)

View File

@ -41,6 +41,23 @@ public class PunishCommand extends CommandBase<Punish>
final String finalReason = reason;
//Match exact online first
Player target = UtilPlayer.searchExact(playerName);
if (target != null)
{
Plugin.GetRepository().LoadPunishClient(playerName, new Callback<PunishClientToken>()
{
public void run(PunishClientToken clientToken)
{
Plugin.LoadClient(clientToken);
new PunishPage(Plugin, caller, playerName, finalReason);
}
});
return;
}
//Check repo
Plugin.GetRepository().MatchPlayerName(new Callback<List<String>>()
{
public void run(List<String> matches)

View File

@ -50,7 +50,7 @@ public class SmokeArrow extends SkillActive
SetDesc(new String[]
{
"Your next arrow will give Blindness",
"to target for #4#1 seconds."
"and Slow 2 to target for #3#1 seconds."
});
}
@ -127,6 +127,7 @@ public class SmokeArrow extends SkillActive
//Confuse
double dur = 3 + level;
Factory.Condition().Factory().Blind(GetName(), damagee, damager, dur, 0, true, true, true);
Factory.Condition().Factory().Slow(GetName(), damagee, damager, dur, 1, true, true, true, true);
//Effect
damagee.getWorld().playSound(damagee.getLocation(), Sound.BLAZE_BREATH, 2.5f, 2.0f);

View File

@ -18,7 +18,7 @@ public class Colossus extends Skill
SetDesc(new String[]
{
"You are so huge that you take",
"#25#25 % less knockback from attacks."
"#15#20 % less knockback from attacks."
});
}
@ -36,7 +36,7 @@ public class Colossus extends Skill
//Damage
event.AddMod(damagee.getName(), GetName(), 0, false);
event.AddKnockback(GetName(), 0.75 - 0.25*level);
event.AddKnockback(GetName(), 0.85 - 0.20*level);
}
@Override

View File

@ -37,6 +37,8 @@ public class DwarfToss extends SkillActive
private HashSet<Player> _used = new HashSet<Player>();
private NautHashMap<Player, LivingEntity> _holding = new NautHashMap<Player, LivingEntity>();
private NautHashMap<Player, Long> _time = new NautHashMap<Player, Long>();
private long _chargeTime = 2500;
public DwarfToss(SkillFactory skills, String name, ClassType classType, SkillType skillType,
int cost, int levels,
@ -58,7 +60,9 @@ public class DwarfToss extends SkillActive
"Release Block to throw with #1.2#0.2 velocity.",
"",
"Players you are holding cannot harm",
"you, or be harmed by others."
"you, or be harmed by others.",
"",
"Takes 2.5 seconds to fully charge."
});
}
@ -302,14 +306,21 @@ public class DwarfToss extends SkillActive
for (final Player cur : throwSet)
{
final LivingEntity target = _holding.remove(cur);
_time.remove(cur);
long time = _time.remove(cur);
int level = getLevel(cur);
//Time Reduce
double timeScale = 1;
if (time < _chargeTime)
{
timeScale = Math.max(0.25, ((double)time/(double)_chargeTime));
}
//Throw
cur.eject();
target.leaveVehicle();
final double mult = 1.2 + (0.2 * level);
final double mult = (1.2 + (0.2 * level)) * timeScale;
//Delay
Bukkit.getScheduler().scheduleSyncDelayedTask(Factory.getPlugin(), new Runnable()
{

View File

@ -40,7 +40,7 @@ public class DefensiveStance extends SkillActive
SetDesc(new String[]
{
"While Blocking, you are immune to all",
"While Blocking, you take 75% less",
"damage from attacks infront of you."
});
}
@ -116,10 +116,7 @@ public class DefensiveStance extends SkillActive
}
//Damage
if (event.GetCause() == DamageCause.ENTITY_ATTACK)
event.AddMult(GetName(), GetName(), 0.1, false);
else
event.SetCancelled(GetName() + " Defense");
event.AddMult(GetName(), GetName(), 0.25, false);
//Effect
damagee.getWorld().playSound(damagee.getLocation(), Sound.ZOMBIE_METAL, 1f, 2f);

View File

@ -45,7 +45,7 @@ public class ArcticArmor extends Skill
"",
"Create a freezing area around you",
"in a #3#1 Block radius. Allies inside",
"this area receive Protection 2.",
"this area receive Protection 1.",
"",
"You are permanently immune to the",
"Slowing effect of snow."
@ -176,7 +176,7 @@ public class ArcticArmor extends Skill
//Protection
for (Player other : UtilPlayer.getNearby(cur.getLocation(), 3 + getLevel(cur)))
if (!Factory.Relation().canHurt(cur, other) || other.equals(cur))
Factory.Condition().Factory().Protection(GetName(), other, cur, 1.9, 1, false, true, true);
Factory.Condition().Factory().Protection(GetName(), other, cur, 1.9, 0, false, true, true);
}
}

View File

@ -48,7 +48,7 @@ public class IcePrison extends SkillActive implements IThrown
{
"Launch an icy orb. When it collides,",
"it creates a hollow sphere of ice",
"thats lasts for #1#1.5 seconds.",
"thats lasts for #2#1 seconds.",
});
}
@ -148,7 +148,7 @@ public class IcePrison extends SkillActive implements IThrown
if (!UtilBlock.airFoliage(freeze))
return;
long time = 2500 + (1500 * level);
long time = 2500 + (1000 * level);
int yDiff = freeze.getY() - mid.getY();

View File

@ -78,8 +78,8 @@ public class LightningOrb extends SkillActive implements IThrown
"Launch a lightning orb. Upon a direct",
"hit with player, or #5#-0.4 seconds, it will",
"strike all enemies within #3#0.5 Blocks ",
"with lightning, giving them Slow 3",
"for #2#1 seconds."
"with lightning, giving them Slow 2",
"for 4 seconds."
});
}
@ -179,7 +179,7 @@ public class LightningOrb extends SkillActive implements IThrown
if (cur.equals(player))
continue;
Factory.Condition().Factory().Slow(GetName(), cur, player, 2 + (1 * level), 2, false, true, true, true);
Factory.Condition().Factory().Slow(GetName(), cur, player, 4, 1, false, true, true, true);
}
Bukkit.getPluginManager().callEvent(new LightningOrbEvent(player, struck));

View File

@ -55,7 +55,7 @@ public class HealingShot extends SkillActive
{
"Prepare a healing shot;",
"Your next arrow will give its target",
"Regeneration 2 for #3#2 seconds,",
"Regeneration 2 for #5#1 seconds,",
"and remove all negative effects."
});
}

View File

@ -24,8 +24,12 @@ public class Longshot extends Skill
SetDesc(new String[]
{
"Arrows do an additional 1 damage", "for every #4#-0.5 Blocks they travelled,",
"however, their base damage is", "reduced by 3.", "", "Maximum of #6#6 additional damage."
"Arrows do an additional 1 damage",
"for every #4#-0.5 Blocks they travelled,",
"however, their base damage is",
"reduced by 5.",
"",
"Maximum of #6#6 additional damage."
});
}
@ -70,8 +74,11 @@ public class Longshot extends Skill
double length = UtilMath.offset(loc, projectile.getLocation());
// Damage
double damage = Math.min(6 + 6 * level, (length / (4 - 0.5 * level)) - 3);
double damage = Math.min(6 + 6 * level, (length / (4 - 0.5 * level)) - 5);
if (damage < 0)
damage = 0;
event.AddMod(damager.getName(), GetName(), damage, damage > 0);
}

View File

@ -61,7 +61,7 @@ public class WolfsPounce extends SkillChargeSword
public void DoSkillCustom(Player player, float charge)
{
//Action
UtilAction.velocity(player, 0.4 + (1.4*charge), 0.2, 0.2 + (0.7*charge), true);
UtilAction.velocity(player, 0.4 + (1.4*charge), 0.2, 0.3 + (0.8*charge), true);
_live.put(player, System.currentTimeMillis());
//Inform

View File

@ -142,7 +142,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
//Passive C
AddSkill(new BreakFall(this, "Break Fall", ClassType.Global, SkillType.GlobalPassive, 1, 3));
AddSkill(new Resistance(this, "Resistance", ClassType.Global, SkillType.GlobalPassive, 1, 3));
AddSkill(new Cooldown(this, "Quick Recovery", ClassType.Global, SkillType.GlobalPassive, 1, 3));
//AddSkill(new Cooldown(this, "Quick Recovery", ClassType.Global, SkillType.GlobalPassive, 1, 3));
//AddSkill(new Rations(this, "Rations", ClassType.Global, SkillType.GlobalPassive, 1, 2));
AddSkill(new Fitness(this, "Mana Pool", ClassType.Mage, SkillType.GlobalPassive, 1, 3));
@ -301,7 +301,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
AddSkill(new Riposte(this, "Riposte", ClassType.Knight, SkillType.Sword,
1, 5,
0, 0,
10000, -1000, false,
11000, -1000, false,
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
@ -331,7 +331,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
AddSkill(new ShieldSmash(this, "Shield Smash", ClassType.Knight, SkillType.Axe,
1, 5,
0, 0,
8000, -1000, true,
10000, -1000, true,
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
@ -434,7 +434,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
AddSkill(new GlacialBlade(this, "Glacial Blade", ClassType.Mage, SkillType.PassiveB,
1, 3,
16, -2,
1300, -300, false,
1200, -200, false,
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
@ -476,7 +476,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
AddSkill(new HealingShot(this, "Healing Shot", ClassType.Ranger, SkillType.Bow,
1, 4,
0, 0,
20000, -2000, true,
20000, -3000, true,
new Material[] {Material.BOW},
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
@ -504,7 +504,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
AddSkill(new RopedArrow(this, "Roped Arrow", ClassType.Ranger, SkillType.Bow,
1, 4,
0, 0,
10000, -1500, false,
9000, -1000, false,
new Material[] {Material.BOW},
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));