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
This commit is contained in:
Robbie Gorey 2020-08-21 21:16:49 -04:00 committed by GitHub
parent c4f60e4e69
commit 0367c92279
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -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);

View file

@ -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;
}