From 0367c92279fe58fccd1656ae726af8308b0e6236 Mon Sep 17 00:00:00 2001 From: Robbie Gorey <59033980+Aztlon@users.noreply.github.com> Date: Fri, 21 Aug 2020 21:16:49 -0400 Subject: [PATCH] Add config option for Lightning on FireJet (#1083) ## Additions * Added a configurable boolean for Lightning called "AllowOnFireJet" with a default of true, which allows the use of Lightning while on FireJet * Closes #1082 --- .../projectkorra/configuration/ConfigManager.java | 1 + .../projectkorra/firebending/lightning/Lightning.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/projectkorra/projectkorra/configuration/ConfigManager.java b/src/com/projectkorra/projectkorra/configuration/ConfigManager.java index 389137f6..14ab9d63 100644 --- a/src/com/projectkorra/projectkorra/configuration/ConfigManager.java +++ b/src/com/projectkorra/projectkorra/configuration/ConfigManager.java @@ -1456,6 +1456,7 @@ public class ConfigManager { config.addDefault("Abilities.Fire.Lightning.SelfHitWater", true); config.addDefault("Abilities.Fire.Lightning.SelfHitClose", false); config.addDefault("Abilities.Fire.Lightning.ArcOnIce", false); + config.addDefault("Abilities.Fire.Lightning.AllowOnFireJet", true); config.addDefault("Abilities.Fire.WallOfFire.Enabled", true); config.addDefault("Abilities.Fire.WallOfFire.Range", 3); diff --git a/src/com/projectkorra/projectkorra/firebending/lightning/Lightning.java b/src/com/projectkorra/projectkorra/firebending/lightning/Lightning.java index 93393abc..0250b97f 100644 --- a/src/com/projectkorra/projectkorra/firebending/lightning/Lightning.java +++ b/src/com/projectkorra/projectkorra/firebending/lightning/Lightning.java @@ -35,6 +35,7 @@ public class Lightning extends LightningAbility { private boolean hitIce; private boolean selfHitWater; private boolean selfHitClose; + private boolean allowOnFireJet; @Attribute("ArcOnIce") private boolean arcOnIce; private int waterArcs; @@ -110,6 +111,7 @@ public class Lightning extends LightningAbility { this.waterArcs = getConfig().getInt("Abilities.Fire.Lightning.WaterArcs"); this.chargeTime = getConfig().getLong("Abilities.Fire.Lightning.ChargeTime"); this.cooldown = getConfig().getLong("Abilities.Fire.Lightning.Cooldown"); + this.allowOnFireJet = getConfig().getBoolean("Abilities.Fire.Lightning.AllowOnFireJet"); this.range = this.getDayFactor(this.range); this.subArcChance = this.getDayFactor(this.subArcChance); @@ -182,7 +184,7 @@ public class Lightning extends LightningAbility { } else if (!this.bPlayer.canBendIgnoreCooldowns(this)) { this.remove(); return; - } else if (CoreAbility.hasAbility(player, FireJet.class)){ + } else if (CoreAbility.hasAbility(player, FireJet.class) && !allowOnFireJet){ this.removeWithTasks(); return; }