mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
Merge pull request #85 from Carbogen/master
Added missing things to ChiCombos
This commit is contained in:
commit
7e6b967512
6 changed files with 32 additions and 9 deletions
|
@ -1469,6 +1469,12 @@ public class Commands {
|
|||
s.sendMessage(Methods.getAirColor() + "IceBullet" + ChatColor.WHITE + ": Using a large cavern of ice, you can punch ice shards at your opponent causing moderate damage. To rapid fire, you must alternate between Left clicking and right clicking with IceBlast.");
|
||||
s.sendMessage(ChatColor.GOLD + "WaterBubble (Tap Shift) > IceBlast (Hold Shift) > IceBlast (Left Click) > Wait for ice to Form > Then alternate between Left and Right click with IceBlast");
|
||||
}
|
||||
if (args[1].equalsIgnoreCase("ChiCombo"))
|
||||
{
|
||||
s.sendMessage(ChatColor.GOLD + "ChiCombos:");
|
||||
s.sendMessage(Methods.getChiColor() + "Immobilize" + ChatColor.WHITE + ": Deliver a series of strikes to an enemy to temporarely immobilize them.");
|
||||
s.sendMessage(ChatColor.GOLD + "QuickStrike > SwiftKick > QuickStrike > QuickStrike");
|
||||
}
|
||||
if (Methods.abilityExists(args[1])) {
|
||||
String ability = Methods.getAbility(args[1]);
|
||||
if (Methods.isAirAbility(ability)) {
|
||||
|
|
|
@ -729,9 +729,11 @@ public class ConfigManager {
|
|||
|
||||
config.addDefault("Abilities.Chi.SwiftKick.Enabled", true);
|
||||
config.addDefault("Abilities.Chi.SwiftKick.Description", "SwiftKick allows a chiblocker to swiftly kick an enemy, potentially blocking their chi. The chiblocker must be in the air to use this ability.");
|
||||
config.addDefault("Abilities.Chi.SwiftKick.damage", 4);
|
||||
config.addDefault("Abilities.Chi.SwiftKick.Damage", 4);
|
||||
config.addDefault("Abilities.Chi.SwiftKick.ChiBlockChance", 30);
|
||||
|
||||
config.addDefault("Abilities.Chi.ChiCombo.ParalyzeDuration", 10000);
|
||||
|
||||
config.addDefault("Storage.engine", "sqlite");
|
||||
|
||||
config.addDefault("Storage.MySQL.host", "localhost");
|
||||
|
|
|
@ -25,6 +25,7 @@ public class ChiComboManager
|
|||
public static List<List<ChiCombo>> knownCombos = new ArrayList<List<ChiCombo>>();
|
||||
public static List<Entity> paralyzed = new ArrayList<Entity>();
|
||||
public static HashMap<Entity, Location> paralyzedLocations = new HashMap<Entity, Location>();
|
||||
public static long paralysisDuration = ProjectKorra.plugin.getConfig().getLong("Abilities.Chi.ChiCombo.ParalyzeDuration");
|
||||
|
||||
public ChiComboManager()
|
||||
{
|
||||
|
@ -38,6 +39,9 @@ public class ChiComboManager
|
|||
|
||||
public static void addCombo(Player player, ChiCombo combo)
|
||||
{
|
||||
if(!player.hasPermission("bending.ability.ChiCombo"))
|
||||
return;
|
||||
|
||||
if(!instances.containsKey(player))
|
||||
instances.put(player, new ArrayList<ChiCombo>());
|
||||
instances.get(player).add(combo);
|
||||
|
@ -95,7 +99,7 @@ public class ChiComboManager
|
|||
&& combo.get(2) == ChiCombo.QuickStrike
|
||||
&& combo.get(3) == ChiCombo.QuickStrike)
|
||||
{
|
||||
paralyzeTarget(player, 10000);
|
||||
paralyzeTarget(player, paralysisDuration);
|
||||
}
|
||||
|
||||
instances.remove(player);
|
||||
|
|
|
@ -6,10 +6,14 @@ import org.bukkit.entity.Entity;
|
|||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.chiblocking.ChiComboManager.ChiCombo;
|
||||
|
||||
public class QuickStrike
|
||||
{
|
||||
public static int damage = ProjectKorra.plugin.getConfig().getInt("Abilities.Chi.QuickStrike.Damage");
|
||||
public static int blockChance = ProjectKorra.plugin.getConfig().getInt("Abilities.Chi.QuickStrike.ChiBlockChance");
|
||||
|
||||
public QuickStrike(Player player)
|
||||
{
|
||||
if(!isEligible(player))
|
||||
|
@ -20,9 +24,9 @@ public class QuickStrike
|
|||
if(e == null)
|
||||
return;
|
||||
|
||||
Methods.damageEntity(player, e, 2);
|
||||
Methods.damageEntity(player, e, damage);
|
||||
|
||||
if(Methods.rand.nextInt(100) < 20 && e instanceof Player)
|
||||
if(Methods.rand.nextInt(100) < blockChance && e instanceof Player)
|
||||
{
|
||||
ChiPassive.blockChi((Player) e);
|
||||
}
|
||||
|
|
|
@ -6,23 +6,27 @@ import org.bukkit.entity.Entity;
|
|||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.chiblocking.ChiComboManager.ChiCombo;
|
||||
|
||||
public class SwiftKick
|
||||
{
|
||||
public static int damage = ProjectKorra.plugin.getConfig().getInt("Abilities.Chi.SwiftKick.Damage");
|
||||
public static int blockChance = ProjectKorra.plugin.getConfig().getInt("Abilities.Chi.ChiCombo.ChiBlockChance");
|
||||
|
||||
public SwiftKick(Player player)
|
||||
{
|
||||
if(!isEligible(player))
|
||||
return;
|
||||
|
||||
Entity e = Methods.getTargetedEntity(player, 2, new ArrayList<Entity>());
|
||||
Entity e = Methods.getTargetedEntity(player, 4, new ArrayList<Entity>());
|
||||
|
||||
if(e == null)
|
||||
return;
|
||||
|
||||
Methods.damageEntity(player, e, 4);
|
||||
Methods.damageEntity(player, e, damage);
|
||||
|
||||
if(Methods.rand.nextInt(100) < 30 && e instanceof Player)
|
||||
if(Methods.rand.nextInt(100) < blockChance && e instanceof Player)
|
||||
{
|
||||
ChiPassive.blockChi((Player) e);
|
||||
}
|
||||
|
@ -49,8 +53,8 @@ public class SwiftKick
|
|||
if(Methods.getBendingPlayer(player.getName()).isOnCooldown("SwiftKick"))
|
||||
return false;
|
||||
|
||||
// if(player.isOnGround())
|
||||
// return false;
|
||||
if(player.isOnGround())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -143,6 +143,9 @@ permissions:
|
|||
bending.ability.Smokescreen: true
|
||||
bending.ability.WarriorStance: true
|
||||
bending.ability.AcrobatStance: true
|
||||
bending.ability.QuickStrike: true
|
||||
bending.ability.SwiftKick: true
|
||||
bending.ability.ChiCombo: true
|
||||
bending.chi.passive: true
|
||||
bending.chi.grapplinghook: true
|
||||
bending.avatar:
|
||||
|
|
Loading…
Reference in a new issue