Merge branch 'master' of ssh://dev1.mineplex.com:7999/min/Mineplex
This commit is contained in:
commit
98430be09e
@ -353,8 +353,8 @@ public class UtilPlayer
|
||||
if (health < 0)
|
||||
health = 0;
|
||||
|
||||
if (health > 20)
|
||||
health = 20;
|
||||
if (health > player.getMaxHealth())
|
||||
health = player.getMaxHealth();
|
||||
|
||||
player.setHealth(health);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public class Assassin extends Skill
|
||||
if (level == 0) return;
|
||||
|
||||
event.SetKnockback(false);
|
||||
event.AddMod(damager.getName(), "Assassin Class", 1, false);
|
||||
event.AddMod(damager.getName(), "Assassin Class", 0, false);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
|
@ -23,7 +23,7 @@ public class BackStab extends Skill
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Attacks from behind opponents",
|
||||
"deal #0.5#1.5 additional damage.",
|
||||
"deal #1#1 additional damage.",
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
public class ComboAttack extends Skill
|
||||
{
|
||||
private WeakHashMap<Player, Integer> _repeat = new WeakHashMap<Player, Integer>();
|
||||
private WeakHashMap<Player, Float> _repeat = new WeakHashMap<Player, Float>();
|
||||
private WeakHashMap<Player, Long> _last = new WeakHashMap<Player, Long>();
|
||||
|
||||
public ComboAttack(SkillFactory skills, String name, ClassType classType, SkillType skillType, int cost, int levels)
|
||||
@ -29,8 +29,8 @@ public class ComboAttack extends Skill
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Each time you attack, your damage",
|
||||
"increases by 1.",
|
||||
"Maximum of #1#1 bonus damage.",
|
||||
"increases by 0.5.",
|
||||
"Maximum of #0#1 bonus damage.",
|
||||
"",
|
||||
"Not attacking for #1.5#0.5 seconds clears",
|
||||
"your bonus damage."
|
||||
@ -54,13 +54,13 @@ public class ComboAttack extends Skill
|
||||
if (level == 0) return;
|
||||
|
||||
if (!_repeat.containsKey(damager))
|
||||
_repeat.put(damager, 0);
|
||||
_repeat.put(damager, 0.5f);
|
||||
|
||||
//Damage
|
||||
event.AddMod(damager.getName(), GetName(), _repeat.get(damager), true);
|
||||
|
||||
//Increase Repeat
|
||||
_repeat.put(damager, Math.min(1 + level, _repeat.get(damager) + 1));
|
||||
_repeat.put(damager, Math.min(level, _repeat.get(damager) + 0.5f));
|
||||
_last.put(damager, System.currentTimeMillis());
|
||||
|
||||
//Sound
|
||||
|
@ -53,10 +53,10 @@ public class MarkedForDeath extends SkillActive
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Your next arrow will mark players,",
|
||||
"making them take #4#1 more damage",
|
||||
"making them take #2#1 more damage",
|
||||
"from the next melee attack.",
|
||||
"",
|
||||
"Lasts for #2#2 seconds."
|
||||
"Lasts for #3#1 seconds."
|
||||
});
|
||||
}
|
||||
|
||||
@ -138,8 +138,8 @@ public class MarkedForDeath extends SkillActive
|
||||
UtilPlayer.message(damager, F.main(GetClassType().name(), "You hit " + F.name(UtilEnt.getName(damagee)) +" with " + F.skill(GetName(level)) + "."));
|
||||
|
||||
//Mark
|
||||
_markedTime.put(damagee, System.currentTimeMillis() + (2000 + 2000 * level));
|
||||
_markedDamage.put(damagee, 4 + level);
|
||||
_markedTime.put(damagee, System.currentTimeMillis() + (3000 + 1000 * level));
|
||||
_markedDamage.put(damagee, 2 + level);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
|
@ -49,8 +49,9 @@ public class BlockToss extends SkillCharge implements IThrown
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Hold Block to pick up a block,",
|
||||
"Release Block to throw it, dealing",
|
||||
"up to #2#1.6 damage.",
|
||||
"Release Block to throw it with",
|
||||
"#1#0.2 velocity, dealing up to",
|
||||
"#5#1 damage.",
|
||||
"",
|
||||
GetChargeString(),
|
||||
"",
|
||||
@ -186,7 +187,7 @@ public class BlockToss extends SkillCharge implements IThrown
|
||||
|
||||
//Throw
|
||||
cur.eject();
|
||||
double mult = Math.max(0.4, charge * (1 + 0.1 * level));
|
||||
double mult = Math.max(0.4, charge * (1 + 0.2 * level));
|
||||
|
||||
//Condition Indicators
|
||||
Factory.Condition().SetIndicatorVisibility(cur, true);
|
||||
@ -226,7 +227,7 @@ public class BlockToss extends SkillCharge implements IThrown
|
||||
|
||||
//Damage Event
|
||||
Factory.Damage().NewDamageEvent(target, data.GetThrower(), null,
|
||||
DamageCause.CUSTOM, 2 + (data.GetThrown().getVelocity().length() * 0.5 * getLevel(data.GetThrower())), true, true, false,
|
||||
DamageCause.CUSTOM, data.GetThrown().getVelocity().length() * 5, true, true, false,
|
||||
UtilEnt.getName(data.GetThrower()), GetName());
|
||||
|
||||
//Block to Item
|
||||
|
@ -23,7 +23,7 @@ public class CripplingBlow extends Skill
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Your powerflow axe blows give",
|
||||
"targets Slow #0#1 for #1#0.5 seconds,",
|
||||
"targets Slow #0#1 for #0.5#0.5 seconds,",
|
||||
"as well as no knockback."
|
||||
});
|
||||
}
|
||||
@ -53,7 +53,7 @@ public class CripplingBlow extends Skill
|
||||
if (level == 0) return;
|
||||
|
||||
//Stun
|
||||
Factory.Condition().Factory().Slow(GetName(), damagee, damager, 1 + 0.5 * level, level, false, true, true, true);
|
||||
Factory.Condition().Factory().Slow(GetName(), damagee, damager, 0.5 + 0.5 * level, level, false, true, true, true);
|
||||
|
||||
//Damage
|
||||
event.AddMod(damager.getName(), GetName(), 0, true);
|
||||
|
@ -51,7 +51,7 @@ public class FleshHook extends SkillActiveCharge implements IThrown
|
||||
GetChargeString(),
|
||||
"",
|
||||
"If Flesh Hook hits a player, it",
|
||||
"deals up to #2#2 damage, and rips them",
|
||||
"deals up to #1#2 damage, and rips them",
|
||||
"towards you with #1.2#0.2 velocity.",
|
||||
});
|
||||
}
|
||||
@ -151,7 +151,7 @@ public class FleshHook extends SkillActiveCharge implements IThrown
|
||||
|
||||
//Damage Event
|
||||
Factory.Damage().NewDamageEvent(target, player, null,
|
||||
DamageCause.CUSTOM, velocity * (2 + (2*level)), false, true, false,
|
||||
DamageCause.CUSTOM, 1 + velocity * (1 + (1*level)), false, true, false,
|
||||
player.getName(), GetName());
|
||||
|
||||
|
||||
|
@ -53,9 +53,7 @@ public class SeismicSlam extends SkillActive
|
||||
{
|
||||
"Jump up and slam back into the ground.",
|
||||
"Players within #4#1 Blocks take up to",
|
||||
"#3#1 damage and are thrown into the air.",
|
||||
"",
|
||||
"You receive Slow 2 for 6 seconds."
|
||||
"#2#1 damage and are thrown into the air.",
|
||||
});
|
||||
}
|
||||
|
||||
@ -108,7 +106,7 @@ public class SeismicSlam extends SkillActive
|
||||
_live.remove(player);
|
||||
|
||||
//Action
|
||||
HashMap<LivingEntity, Double> targets = UtilEnt.getInRadius(player.getLocation(), 5d + level);
|
||||
HashMap<LivingEntity, Double> targets = UtilEnt.getInRadius(player.getLocation(), 4d + level);
|
||||
for (LivingEntity cur : targets.keySet())
|
||||
{
|
||||
if (cur.equals(player))
|
||||
@ -116,7 +114,7 @@ public class SeismicSlam extends SkillActive
|
||||
|
||||
//Damage Event
|
||||
Factory.Damage().NewDamageEvent(cur, player, null,
|
||||
DamageCause.CUSTOM, (3+level) * targets.get(cur) + 0.5, false, true, false,
|
||||
DamageCause.CUSTOM, (2+level) * targets.get(cur) + 0.5, false, true, false,
|
||||
player.getName(), GetName());
|
||||
|
||||
//Velocity
|
||||
@ -131,9 +129,6 @@ public class SeismicSlam extends SkillActive
|
||||
if (cur instanceof Player)
|
||||
UtilPlayer.message((Player)cur, F.main(GetClassType().name(), F.name(player.getName()) +" hit you with " + F.skill(GetName(level)) + "."));
|
||||
}
|
||||
|
||||
//Slow
|
||||
Factory.Condition().Factory().Slow(GetName(), player, player, 6, 1, false, true, false, true);
|
||||
|
||||
//Effect
|
||||
player.getWorld().playSound(player.getLocation(), Sound.ZOMBIE_WOOD, 2f, 0.2f);
|
||||
|
@ -46,7 +46,7 @@ public class Stampede extends Skill
|
||||
"",
|
||||
"Attacking during stampede deals",
|
||||
"#0#0.5 bonus damage per speed level,",
|
||||
"and +80% knockback per speed level."
|
||||
"and +50% knockback per speed level."
|
||||
});
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ public class Stampede extends Skill
|
||||
|
||||
//Damage
|
||||
event.AddMod(damager.getName(), GetName(), str * (0.5 * level), true);
|
||||
event.AddKnockback(GetName(), 1 + 0.8 * str);
|
||||
event.AddKnockback(GetName(), 1 + 0.5 * str);
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(damager, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + "."));
|
||||
|
@ -50,8 +50,8 @@ public class Takedown extends SkillActive
|
||||
{
|
||||
"Hurl yourself towards an opponent.",
|
||||
"If you collide with them, you " + C.cWhite + "both",
|
||||
"take #2#2 damage and receive Slow 4",
|
||||
"for #2#1 seconds."
|
||||
"take #3#1 damage and receive Slow 4",
|
||||
"for #2.5#0.5 seconds."
|
||||
});
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ public class Takedown extends SkillActive
|
||||
public void DoTakeDown(Player damager, LivingEntity damagee)
|
||||
{
|
||||
int level = getLevel(damager);
|
||||
int damage = 2 + (2 * level);
|
||||
int damage = 3 + (level);
|
||||
|
||||
//Damage Event
|
||||
Factory.Damage().NewDamageEvent(damager, damagee, null,
|
||||
@ -175,8 +175,8 @@ public class Takedown extends SkillActive
|
||||
damager.getName(), GetName());
|
||||
|
||||
//Conditions
|
||||
Factory.Condition().Factory().Slow(GetName(), damagee, damager, 2 + level, 3, false, true, true, true);
|
||||
Factory.Condition().Factory().Slow(GetName(), damager, damager, 2 + level, 3, false, true, true, true);
|
||||
Factory.Condition().Factory().Slow(GetName(), damagee, damager, 2.5 + 0.5*level, 3, false, true, true, true);
|
||||
Factory.Condition().Factory().Slow(GetName(), damager, damager, 2.5 + 0.5*level, 3, false, true, true, true);
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(damager, F.main(GetClassType().name(), "You hit " + F.name(UtilEnt.getName(damagee)) + " with " + F.skill(GetName(level)) + "."));
|
||||
|
@ -45,7 +45,7 @@ public class HiltSmash extends SkillActive
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Smash the hilt of your sword into",
|
||||
"your opponent, dealing #3#1 damage",
|
||||
"your opponent, dealing #2#1 damage",
|
||||
"and Slow 4 for #0.5#0.5 seconds."
|
||||
});
|
||||
}
|
||||
@ -133,7 +133,7 @@ public class HiltSmash extends SkillActive
|
||||
|
||||
//Damage Event
|
||||
Factory.Damage().NewDamageEvent((LivingEntity)ent, player, null,
|
||||
DamageCause.ENTITY_ATTACK, 3 + level, false, true, false,
|
||||
DamageCause.ENTITY_ATTACK, 2 + level, false, true, false,
|
||||
player.getName(), GetName());
|
||||
|
||||
//Sound
|
||||
|
@ -96,7 +96,7 @@ public class ShieldSmash extends SkillActive
|
||||
Factory.Condition().Factory().Falling(GetName(), cur, player, 10, false, true);
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message((Player)cur, F.main(GetClassType().name(), F.name(player.getName()) +" hit you with " + F.skill(GetName(level)) + "."));
|
||||
UtilPlayer.message(cur, F.main(GetClassType().name(), F.name(player.getName()) +" hit you with " + F.skill(GetName(level)) + "."));
|
||||
}
|
||||
|
||||
if (hit)
|
||||
|
@ -24,9 +24,9 @@ public class Vengeance extends Skill
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"When you attack someone, your damage",
|
||||
"is increased by #0.5#0.5 for each time the",
|
||||
"is increased by #0#0.5 for each time the",
|
||||
"enemy hurt you since you last hit them,",
|
||||
"up to a maximum of #0#2 bonus damage."
|
||||
"up to a maximum of #0#1 bonus damage."
|
||||
});
|
||||
}
|
||||
|
||||
@ -99,9 +99,9 @@ public class Vengeance extends Skill
|
||||
|
||||
int hits = _vengeance.get(damager).remove(damagee.getName());
|
||||
|
||||
double damage = (double)hits * (0.5 + (0.5 * level));
|
||||
double damage = (double)hits * (0.5 * level);
|
||||
|
||||
damage = Math.min(damage, level * 2);
|
||||
damage = Math.min(damage, level * 1);
|
||||
|
||||
//Increase
|
||||
event.AddMod(damager.getName(), GetName(), damage, true);
|
||||
|
@ -39,8 +39,8 @@ public class Immolate extends Skill
|
||||
"Drop Axe/Sword to Toggle.",
|
||||
"",
|
||||
"Ignite yourself in flaming fury.",
|
||||
"You receive Strength #0#1 , Speed 1,",
|
||||
"Fire Resistance and take #0#1 more",
|
||||
"You receive Strength #1#1 , Speed 1,",
|
||||
"Fire Resistance and take #0#2 more",
|
||||
"damage from attacks.",
|
||||
"",
|
||||
"You leave a trail of fire, which",
|
||||
@ -51,7 +51,7 @@ public class Immolate extends Skill
|
||||
@Override
|
||||
public String GetEnergyString()
|
||||
{
|
||||
return "Energy: #13#-1 per Second";
|
||||
return "Energy: #15#-1 per Second";
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -117,7 +117,7 @@ public class Immolate extends Skill
|
||||
if (level == 0) return;
|
||||
|
||||
//Damage
|
||||
event.AddMod(GetName(), GetName() + " Weakness", level, true);
|
||||
event.AddMod(GetName(), GetName() + " Weakness", level*2, true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -187,7 +187,7 @@ public class Immolate extends Skill
|
||||
int level = getLevel(cur);
|
||||
|
||||
Factory.Condition().Factory().Speed(GetName(), cur, cur, 1.9, 0, false, true, true);
|
||||
Factory.Condition().Factory().Strength(GetName(), cur, cur, 1.9, level-1, false, true, true);
|
||||
Factory.Condition().Factory().Strength(GetName(), cur, cur, 1.9, level, false, true, true);
|
||||
Factory.Condition().Factory().FireResist(GetName(), cur, cur, 1.9, 0, false, true, true);
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public class MagmaBlade extends Skill
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Your sword deals an additional,",
|
||||
"#0#1 damage to burning opponents,",
|
||||
"#0.5#0.5 damage to burning opponents,",
|
||||
"but also extinguishes them.",
|
||||
});
|
||||
}
|
||||
@ -54,7 +54,7 @@ public class MagmaBlade extends Skill
|
||||
if (level == 0) return;
|
||||
|
||||
//Damage
|
||||
event.AddMod(damager.getName(), GetName(), level, true);
|
||||
event.AddMod(damager.getName(), GetName(), 0.5 + 0.5 * level, true);
|
||||
|
||||
//Effect
|
||||
damager.getWorld().playSound(damager.getLocation(), Sound.FIZZ, 0.8f, 0f);
|
||||
|
@ -37,7 +37,7 @@ public class Void extends Skill
|
||||
"use no energy to swing weapons.",
|
||||
"",
|
||||
"Reduces incoming damage by #1#1 , but",
|
||||
"burns #9#-1 Energy per 1 damage reduced."
|
||||
"burns #11#-1 Energy per 1 damage reduced."
|
||||
});
|
||||
}
|
||||
|
||||
@ -164,7 +164,7 @@ public class Void extends Skill
|
||||
int level = getLevel(damagee);
|
||||
if (level == 0) return;
|
||||
|
||||
double dmgToEnergy = 9 - level;
|
||||
double dmgToEnergy = 11 - level;
|
||||
int dmgLower = 1 + level;
|
||||
|
||||
int currentEnergy = (int)Factory.Energy().GetCurrent(damagee);
|
||||
|
@ -50,7 +50,7 @@ public class IncendiaryShot extends SkillActive
|
||||
{
|
||||
"Prepare an incendiary shot;",
|
||||
"Your next arrow will ignite",
|
||||
"its target for #3#1 seconds."
|
||||
"its target for #2#1 seconds."
|
||||
});
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ public class IncendiaryShot extends SkillActive
|
||||
if (level == 0) return;
|
||||
|
||||
//Ignite
|
||||
Factory.Condition().Factory().Ignite(GetName(), damagee, damager, 6, true, true);
|
||||
Factory.Condition().Factory().Ignite(GetName(), damagee, damager, 2 + level, true, true);
|
||||
|
||||
//Damage
|
||||
event.AddMod(damager.getName(), GetName(), 0, true);
|
||||
|
@ -40,14 +40,14 @@ public class Overcharge extends SkillChargeBow
|
||||
"",
|
||||
GetChargeString(),
|
||||
"",
|
||||
"Deals up to #2#2 bonus damage."
|
||||
"Deals up to #1#1 bonus damage."
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void DoSkillCustom(Player player, float charge, Arrow arrow)
|
||||
{
|
||||
double damage = charge * (2 + 2 * getLevel(player));
|
||||
double damage = charge * (1 + 1 * getLevel(player));
|
||||
_arrows.put(arrow, damage);
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ public class PinDown extends SkillActive
|
||||
Factory.Condition().Factory().Slow(GetName(), damagee, damager, dur, 3, false, true, true, true);
|
||||
|
||||
//Damage
|
||||
event.AddMod(damager.getName(), GetName(), 0, true);
|
||||
event.AddMod(damager.getName(), GetName(), -2, true);
|
||||
event.SetKnockback(false);
|
||||
|
||||
//Effect
|
||||
|
@ -172,7 +172,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
||||
//Sword
|
||||
AddSkill(new Evade(this, "Evade", ClassType.Assassin, SkillType.Sword,
|
||||
5, 4,
|
||||
30, -2,
|
||||
40, -2,
|
||||
0, 0, true,
|
||||
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||
@ -412,7 +412,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
||||
|
||||
//Passive A
|
||||
AddSkill(new ArcticArmor(this, "Arctic Armor", ClassType.Mage, SkillType.PassiveA, 5, 3));
|
||||
AddSkill(new Immolate(this, "Immolate", ClassType.Mage, SkillType.PassiveA, 5, 3));
|
||||
AddSkill(new Immolate(this, "Immolate", ClassType.Mage, SkillType.PassiveA, 10, 1));
|
||||
AddSkill(new Void(this, "Void", ClassType.Mage, SkillType.PassiveA, 5, 3));
|
||||
AddSkill(new LifeBonds(this, "Life Bonds", ClassType.Mage, SkillType.PassiveA, 5, 3));
|
||||
|
||||
|
@ -114,6 +114,24 @@ public class CombatComponent
|
||||
+ F.elem(GetTotalDamage() + "dmg") + "" + "] ["
|
||||
+ F.elem(GetBestWeapon()) + "] [" + F.time(time) + "]";
|
||||
}
|
||||
|
||||
public String Display(long _deathTime, CombatDamage damage)
|
||||
{
|
||||
// Time
|
||||
String time = "";
|
||||
if (_deathTime == 0)
|
||||
time = UtilTime.convertString(System.currentTimeMillis()
|
||||
- damage.GetTime(), 1, TimeUnit.FIT)
|
||||
+ " Ago";
|
||||
else
|
||||
time = UtilTime.convertString(_deathTime - damage.GetTime(), 1,
|
||||
TimeUnit.FIT) + " Prior";
|
||||
|
||||
//String
|
||||
return F.name(EntityName) + " ["
|
||||
+ F.elem(damage.GetDamage() + " dmg") + "" + "] ["
|
||||
+ F.elem(damage.GetName()) + "] [" + F.time(time) + "]";
|
||||
}
|
||||
|
||||
public boolean IsPlayer()
|
||||
{
|
||||
|
@ -4,11 +4,13 @@ public class CombatDamage
|
||||
{
|
||||
private String _name;
|
||||
private double _dmg;
|
||||
private long _time;
|
||||
|
||||
public CombatDamage(String name, double dmg)
|
||||
{
|
||||
_name = name;
|
||||
_dmg = dmg;
|
||||
_time = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public String GetName()
|
||||
@ -20,4 +22,9 @@ public class CombatDamage
|
||||
{
|
||||
return _dmg;
|
||||
}
|
||||
|
||||
public long GetTime()
|
||||
{
|
||||
return _time;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package mineplex.minecraft.game.core.combat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
@ -108,6 +110,44 @@ public class CombatLog
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
public LinkedList<String> DisplayAbsolute()
|
||||
{
|
||||
HashMap<Long, String> components = new HashMap<Long, String>();
|
||||
|
||||
for (CombatComponent cur : _damager)
|
||||
{
|
||||
for (CombatDamage dmg : cur.GetDamage())
|
||||
{
|
||||
components.put(dmg.GetTime(), cur.Display(_deathTime, dmg));
|
||||
}
|
||||
}
|
||||
|
||||
int id = components.size();
|
||||
LinkedList<String> out = new LinkedList<String>();
|
||||
|
||||
while (!components.isEmpty())
|
||||
{
|
||||
long bestTime = 0;
|
||||
String bestString = null;
|
||||
|
||||
for (long time : components.keySet())
|
||||
{
|
||||
if (time > bestTime || bestString == null)
|
||||
{
|
||||
bestTime = time;
|
||||
bestString = components.get(time);
|
||||
}
|
||||
}
|
||||
|
||||
components.remove(bestTime);
|
||||
|
||||
out.addFirst(F.desc("#" + id, bestString));
|
||||
id--;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
public CombatComponent GetKiller()
|
||||
{
|
||||
|
@ -387,7 +387,8 @@ public class CombatManager extends MiniPlugin
|
||||
CombatDeathEvent deathEvent = new CombatDeathEvent(event, Get(event.getEntity().getName()), log);
|
||||
UtilServer.getServer().getPluginManager().callEvent(deathEvent);
|
||||
|
||||
if (deathEvent.GetBroadcastType() == DeathMessageType.Detailed)
|
||||
|
||||
if (deathEvent.GetBroadcastType() == DeathMessageType.Detailed || deathEvent.GetBroadcastType() == DeathMessageType.Absolute)
|
||||
{
|
||||
//Display Simple
|
||||
for (Player cur : event.getEntity().getWorld().getPlayers())
|
||||
@ -454,7 +455,10 @@ public class CombatManager extends MiniPlugin
|
||||
}
|
||||
|
||||
//Self Detail
|
||||
UtilPlayer.message(event.getEntity(), log.Display());
|
||||
if (deathEvent.GetBroadcastType() == DeathMessageType.Absolute)
|
||||
UtilPlayer.message(event.getEntity(), log.DisplayAbsolute());
|
||||
else
|
||||
UtilPlayer.message(event.getEntity(), log.Display());
|
||||
}
|
||||
else if (deathEvent.GetBroadcastType() == DeathMessageType.Simple)
|
||||
{
|
||||
|
@ -2,6 +2,7 @@ package mineplex.minecraft.game.core.combat;
|
||||
|
||||
public enum DeathMessageType
|
||||
{
|
||||
Absolute,
|
||||
Detailed,
|
||||
Simple,
|
||||
None
|
||||
|
@ -492,6 +492,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
player.setSaturation(3f);
|
||||
player.setExhaustion(0f);
|
||||
|
||||
player.setMaxHealth(20);
|
||||
player.setHealth(20);
|
||||
|
||||
player.setFireTicks(0);
|
||||
|
@ -1,16 +1,8 @@
|
||||
package nautilus.game.arcade.game.games.champions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.combat.DeathMessageType;
|
||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitAssassin;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitBrute;
|
||||
@ -18,29 +10,17 @@ import nautilus.game.arcade.game.games.champions.kits.KitKnight;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitMage;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitRanger;
|
||||
import nautilus.game.arcade.game.games.common.Domination;
|
||||
import nautilus.game.arcade.game.games.common.dominate_data.CapturePoint;
|
||||
import nautilus.game.arcade.game.games.common.dominate_data.Emerald;
|
||||
import nautilus.game.arcade.game.games.common.dominate_data.Resupply;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.entity.ItemDespawnEvent;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
|
||||
|
||||
public class ChampionsDominate extends Domination
|
||||
{
|
||||
public ChampionsDominate(ArcadeManager manager)
|
||||
{
|
||||
super(manager, GameType.ChampionsDominate,
|
||||
|
||||
new Kit[]
|
||||
new Kit[]
|
||||
{
|
||||
new KitBrute(manager),
|
||||
new KitRanger(manager),
|
||||
@ -49,7 +29,7 @@ public class ChampionsDominate extends Domination
|
||||
new KitAssassin(manager),
|
||||
});
|
||||
|
||||
_help = new String[]
|
||||
_help = new String[]
|
||||
{
|
||||
"Capture Beacons faster with more people!",
|
||||
"Make sure you use all of your Skill/Item Tokens",
|
||||
@ -62,7 +42,7 @@ public class ChampionsDominate extends Domination
|
||||
"Iron Weapons deal 6 damage",
|
||||
"Diamond Weapons deal 5 damage",
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
this.Manager.GetDamage().UseSimpleWeaponDamage = false;
|
||||
}
|
||||
|
@ -11,9 +11,11 @@ import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.combat.DeathMessageType;
|
||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.TeamGame;
|
||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||
@ -53,6 +55,8 @@ public class ChampionsTDM extends TeamGame
|
||||
this.HungerSet = 20;
|
||||
this.WorldTimeSet = 2000;
|
||||
this.CompassEnabled = true;
|
||||
|
||||
this.Manager.GetDamage().UseSimpleWeaponDamage = false;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -92,6 +96,19 @@ public class ChampionsTDM extends TeamGame
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Health(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() != GameState.Live)
|
||||
return;
|
||||
|
||||
for (Player player : GetPlayers(true))
|
||||
{
|
||||
player.setMaxHealth(30);
|
||||
player.setHealth(player.getMaxHealth());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@EventHandler
|
||||
public void ScoreboardUpdate(UpdateEvent event)
|
||||
@ -141,7 +158,7 @@ public class ChampionsTDM extends TeamGame
|
||||
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(space)).setScore(pos++);
|
||||
|
||||
space += " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -160,4 +177,10 @@ public class ChampionsTDM extends TeamGame
|
||||
{
|
||||
// NOTHING
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeathMessageType GetDeathMessageType()
|
||||
{
|
||||
return DeathMessageType.Detailed;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user