mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 19:50:37 +00:00
Port fire abilities to new configuration system
This commit is contained in:
parent
d690b369c5
commit
b1d5130309
37 changed files with 869 additions and 250 deletions
|
@ -0,0 +1,38 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class BlazeConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final int Arc = 0;
|
||||||
|
public final double Range = 0;
|
||||||
|
public final double Speed = 0;
|
||||||
|
|
||||||
|
public final RingConfig RingConfig = new RingConfig();
|
||||||
|
|
||||||
|
public static class RingConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final int Range = 0;
|
||||||
|
public final double Angle = 0;
|
||||||
|
|
||||||
|
public final int AvatarState_Range = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlazeConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "Blaze";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class CombustionConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final double Damage = 0;
|
||||||
|
public final double Range = 0;
|
||||||
|
public final double Radius = 0;
|
||||||
|
public final double Speed = 0;
|
||||||
|
public final float ExplosivePower = 0;
|
||||||
|
public final boolean BreakBlocks = true;
|
||||||
|
|
||||||
|
public CombustionConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "Combustion";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class FireBlastConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final boolean Dissipate = true;
|
||||||
|
public final double Damage = 0;
|
||||||
|
public final double Range = 0;
|
||||||
|
public final double Speed = 0;
|
||||||
|
public final double CollisionRadius = 0;
|
||||||
|
public final double FireTicks = 0;
|
||||||
|
public final double Knockback = 0;
|
||||||
|
|
||||||
|
public final ChargedConfig ChargedConfig = new ChargedConfig();
|
||||||
|
|
||||||
|
public static class ChargedConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final long ChargeTime = 0;
|
||||||
|
public final boolean Dissipate = true;
|
||||||
|
public final boolean DamageBlocks = true;
|
||||||
|
public final double CollisionRadius = 0;
|
||||||
|
public final double Damage = 0;
|
||||||
|
public final double Range = 0;
|
||||||
|
public final double DamageRadius = 0;
|
||||||
|
public final double ExplosionRadius = 0;
|
||||||
|
public final double FireTicks = 0;
|
||||||
|
|
||||||
|
public final long AvatarState_ChargeTime = 0;
|
||||||
|
public final double AvatarState_Damage = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public FireBlastConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "FireBlast";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class FireBurstConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final long ChargeTime = 0;
|
||||||
|
public final boolean Ignite = true;
|
||||||
|
public final double Damage = 0;
|
||||||
|
public final double Range = 0;
|
||||||
|
public final double AngleTheta = 0;
|
||||||
|
public final double AnglePhi = 0;
|
||||||
|
public final double ParticlesPercentage = 0;
|
||||||
|
|
||||||
|
public final long AvatarState_Cooldown = 0;
|
||||||
|
public final long AvatarState_ChargeTime = 0;
|
||||||
|
public final double AvatarState_Damage = 0;
|
||||||
|
|
||||||
|
public FireBurstConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "FireBurst";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class FireJetConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final long Duration = 0;
|
||||||
|
public final double Speed = 0;
|
||||||
|
public final boolean ShowGliding = true;
|
||||||
|
|
||||||
|
public final boolean AvatarState_Toggle = true;
|
||||||
|
|
||||||
|
public FireJetConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "FireJet";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class FireKickConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final double Damage = 0;
|
||||||
|
public final double Range = 0;
|
||||||
|
public final double Speed = 0;
|
||||||
|
|
||||||
|
public final double AvatarState_Damage = 0;
|
||||||
|
public final double AvatarState_Range = 0;
|
||||||
|
|
||||||
|
public FireKickConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "FireKick";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire", "Combos" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class FireManipulationConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final StreamConfig StreamConfig = new StreamConfig();
|
||||||
|
|
||||||
|
public final ShieldConfig ShieldConfig = new ShieldConfig();
|
||||||
|
|
||||||
|
public static class StreamConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final double Range = 0;
|
||||||
|
public final double Damage = 0;
|
||||||
|
public final double Speed = 0;
|
||||||
|
public final int Particles = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ShieldConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final long MaxDuration = 0;
|
||||||
|
public final double Range = 0;
|
||||||
|
public final double Damage = 0;
|
||||||
|
public final int Particles = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public FireManipulationConfig() {
|
||||||
|
super(false, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "FireManipulation";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class FireShieldConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final DiscConfig DiscConfig = new DiscConfig();
|
||||||
|
|
||||||
|
public final ShieldConfig ShieldConfig = new ShieldConfig();
|
||||||
|
|
||||||
|
public static class DiscConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final long Duration = 0;
|
||||||
|
public final double Radius = 0;
|
||||||
|
public final double FireTicks = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ShieldConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final long Duration = 0;
|
||||||
|
public final double Radius = 0;
|
||||||
|
public final double FireTicks = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public FireShieldConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "FireShield";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class FireSpinConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final double Damage = 0;
|
||||||
|
public final double Range = 0;
|
||||||
|
public final double Speed = 0;
|
||||||
|
public final double Knockback = 0;
|
||||||
|
|
||||||
|
public final double AvatarState_Damage = 0;
|
||||||
|
public final double AvatarState_Range = 0;
|
||||||
|
public final double AvatarState_Knockback = 0;
|
||||||
|
|
||||||
|
public FireSpinConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "FireSpin";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire", "Combos" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class FireWheelConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final double Damage = 0;
|
||||||
|
public final double Range = 0;
|
||||||
|
public final double Speed = 0;
|
||||||
|
public final double FireTicks = 0;
|
||||||
|
public final int Height = 0;
|
||||||
|
|
||||||
|
public final double AvatarState_Damage = 0;
|
||||||
|
public final double AvatarState_Range = 0;
|
||||||
|
public final double AvatarState_Speed = 0;
|
||||||
|
public final double AvatarState_FireTicks = 0;
|
||||||
|
public final int AvatarState_Height = 0;
|
||||||
|
|
||||||
|
public FireWheelConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "FireWheel";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire", "Combos" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class HeatControlConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final CookConfig CookConfig = new CookConfig();
|
||||||
|
|
||||||
|
public final ExtinguishConfig ExtinguishConfig = new ExtinguishConfig();
|
||||||
|
|
||||||
|
public final MeltConfig MeltConfig = new MeltConfig();
|
||||||
|
|
||||||
|
public final SolidifyConfig SolidifyConfig = new SolidifyConfig();
|
||||||
|
|
||||||
|
public static class CookConfig {
|
||||||
|
|
||||||
|
public final long Interval = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ExtinguishConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final double Radius = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class MeltConfig {
|
||||||
|
|
||||||
|
public final double Range = 0;
|
||||||
|
public final double Radius = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class SolidifyConfig {
|
||||||
|
|
||||||
|
public final double MaxRadius = 0;
|
||||||
|
public final double Range = 0;
|
||||||
|
public final boolean Revert = true;
|
||||||
|
public final long RevertTime = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public HeatControlConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "HeatControl";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class IlluminationConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final double Range = 0;
|
||||||
|
public final byte LightThreshold = 0;
|
||||||
|
public final boolean Passive = true;
|
||||||
|
|
||||||
|
public IlluminationConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "Illumination";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class JetBlastConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final long Duration = 0;
|
||||||
|
public final double Speed = 0;
|
||||||
|
|
||||||
|
public JetBlastConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "JetBlast";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire", "Combos" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class JetBlazeConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final long Duration = 0;
|
||||||
|
public final double Damage = 0;
|
||||||
|
public final double Speed = 0;
|
||||||
|
public final double FireTicks = 0;
|
||||||
|
|
||||||
|
public final double AvatarState_Damage = 0;
|
||||||
|
public final double AvatarState_FireTicks = 0;
|
||||||
|
|
||||||
|
public JetBlazeConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "JetBlaze";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire", "Combos" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class LightningConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final long ChargeTime = 0;
|
||||||
|
public final double Damage = 0;
|
||||||
|
public final double Range = 0;
|
||||||
|
public final boolean SelfHitWater = true;
|
||||||
|
public final boolean SelfHitClose = true;
|
||||||
|
public final boolean ArcOnIce = true;
|
||||||
|
public final double MaxArcAngle = 0;
|
||||||
|
public final double SubArcChance = 0;
|
||||||
|
public final double ChainArcRange = 0;
|
||||||
|
public final double ChainArcChance = 0;
|
||||||
|
public final double WaterArcRange = 0;
|
||||||
|
public final double StunChance = 0;
|
||||||
|
public final long StunDuration = 0;
|
||||||
|
public final int MaxChainArcs = 0;
|
||||||
|
public final int WaterArcs = 0;
|
||||||
|
|
||||||
|
public final long AvatarState_Cooldown = 0;
|
||||||
|
public final long AvatarState_ChargeTime = 0;
|
||||||
|
public final double AvatarState_Damage = 0;
|
||||||
|
|
||||||
|
public LightningConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "Lightning";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.projectkorra.projectkorra.configuration.better.configs.abilities.fire;
|
||||||
|
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.AbilityConfig;
|
||||||
|
|
||||||
|
public class WallOfFireConfig extends AbilityConfig {
|
||||||
|
|
||||||
|
public final long Cooldown = 0;
|
||||||
|
public final long Duration = 0;
|
||||||
|
public final double Damage = 0;
|
||||||
|
public final long DamageInterval = 0;
|
||||||
|
public final int Height = 0;
|
||||||
|
public final int Width = 0;
|
||||||
|
public final int Range = 0;
|
||||||
|
public final long Interval = 0;
|
||||||
|
public final double MaxAngle = 0;
|
||||||
|
public final double FireTicks = 0;
|
||||||
|
|
||||||
|
public final long AvatarState_Duration = 0;
|
||||||
|
public final double AvatarState_Damage = 0;
|
||||||
|
public final int AvatarState_Height = 0;
|
||||||
|
public final int AvatarState_Width = 0;
|
||||||
|
public final double AvatarState_FireTicks = 0;
|
||||||
|
|
||||||
|
public WallOfFireConfig() {
|
||||||
|
super(true, "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "WallOfFire";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getParents() {
|
||||||
|
return new String[] { "Abilities", "Fire" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -7,8 +7,9 @@ import org.bukkit.util.Vector;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.BlazeConfig;
|
||||||
|
|
||||||
public class Blaze extends FireAbility {
|
public class Blaze extends FireAbility<BlazeConfig> {
|
||||||
|
|
||||||
@Attribute("Arc")
|
@Attribute("Arc")
|
||||||
private int arc;
|
private int arc;
|
||||||
|
@ -19,13 +20,13 @@ public class Blaze extends FireAbility {
|
||||||
@Attribute(Attribute.SPEED)
|
@Attribute(Attribute.SPEED)
|
||||||
private double speed;
|
private double speed;
|
||||||
|
|
||||||
public Blaze(final Player player) {
|
public Blaze(final BlazeConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
this.speed = 2;
|
this.speed = 2;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.Blaze.Cooldown");
|
this.cooldown = config.Cooldown;
|
||||||
this.arc = getConfig().getInt("Abilities.Fire.Blaze.Arc");
|
this.arc = config.Arc;
|
||||||
this.range = getConfig().getDouble("Abilities.Fire.Blaze.Range");
|
this.range = config.Range;
|
||||||
|
|
||||||
if (!this.bPlayer.canBend(this) || this.bPlayer.isOnCooldown("BlazeArc")) {
|
if (!this.bPlayer.canBend(this) || this.bPlayer.isOnCooldown("BlazeArc")) {
|
||||||
return;
|
return;
|
||||||
|
@ -50,7 +51,7 @@ public class Blaze extends FireAbility {
|
||||||
direction.setX(vx);
|
direction.setX(vx);
|
||||||
direction.setZ(vz);
|
direction.setZ(vz);
|
||||||
|
|
||||||
new BlazeArc(player, location, direction, this.range);
|
new BlazeArc(config, player, location, direction, this.range);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.start();
|
this.start();
|
||||||
|
|
|
@ -16,9 +16,10 @@ import com.projectkorra.projectkorra.Element;
|
||||||
import com.projectkorra.projectkorra.GeneralMethods;
|
import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.BlazeConfig;
|
||||||
import com.projectkorra.projectkorra.waterbending.plant.PlantRegrowth;
|
import com.projectkorra.projectkorra.waterbending.plant.PlantRegrowth;
|
||||||
|
|
||||||
public class BlazeArc extends FireAbility {
|
public class BlazeArc extends FireAbility<BlazeConfig> {
|
||||||
|
|
||||||
private static final long DISSIPATE_REMOVE_TIME = 400;
|
private static final long DISSIPATE_REMOVE_TIME = 400;
|
||||||
private static final Map<Block, Player> IGNITED_BLOCKS = new ConcurrentHashMap<>();
|
private static final Map<Block, Player> IGNITED_BLOCKS = new ConcurrentHashMap<>();
|
||||||
|
@ -35,10 +36,10 @@ public class BlazeArc extends FireAbility {
|
||||||
private Location location;
|
private Location location;
|
||||||
private Vector direction;
|
private Vector direction;
|
||||||
|
|
||||||
public BlazeArc(final Player player, final Location location, final Vector direction, final double range) {
|
public BlazeArc(final BlazeConfig config, final Player player, final Location location, final Vector direction, final double range) {
|
||||||
super(player);
|
super(config, player);
|
||||||
this.range = this.getDayFactor(range);
|
this.range = this.getDayFactor(range);
|
||||||
this.speed = getConfig().getLong("Abilities.Fire.Blaze.Speed");
|
this.speed = config.Speed;
|
||||||
this.interval = (long) (1000. / this.speed);
|
this.interval = (long) (1000. / this.speed);
|
||||||
this.origin = location.clone();
|
this.origin = location.clone();
|
||||||
this.location = this.origin.clone();
|
this.location = this.origin.clone();
|
||||||
|
|
|
@ -6,8 +6,9 @@ import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.BlazeConfig;
|
||||||
|
|
||||||
public class BlazeRing extends FireAbility {
|
public class BlazeRing extends FireAbility<BlazeConfig> {
|
||||||
|
|
||||||
@Attribute(Attribute.RANGE)
|
@Attribute(Attribute.RANGE)
|
||||||
private int range;
|
private int range;
|
||||||
|
@ -16,16 +17,16 @@ public class BlazeRing extends FireAbility {
|
||||||
private double angleIncrement;
|
private double angleIncrement;
|
||||||
private Location location;
|
private Location location;
|
||||||
|
|
||||||
public BlazeRing(final Player player) {
|
public BlazeRing(final BlazeConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
this.range = getConfig().getInt("Abilities.Fire.Blaze.Ring.Range");
|
this.range = config.RingConfig.Range;
|
||||||
this.angleIncrement = getConfig().getDouble("Abilities.Fire.Blaze.Ring.Angle");
|
this.angleIncrement = config.RingConfig.Angle;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.Blaze.Ring.Cooldown");
|
this.cooldown = config.RingConfig.Cooldown;
|
||||||
this.location = player.getLocation();
|
this.location = player.getLocation();
|
||||||
|
|
||||||
if (this.bPlayer.isAvatarState()) {
|
if (this.bPlayer.isAvatarState()) {
|
||||||
this.range = getConfig().getInt("Abilities.Avatar.AvatarState.Fire.Blaze.Ring.Range");
|
this.range = config.RingConfig.AvatarState_Range;
|
||||||
}
|
}
|
||||||
if (!this.bPlayer.canBend(this) || this.bPlayer.isOnCooldown("BlazeRing")) {
|
if (!this.bPlayer.canBend(this) || this.bPlayer.isOnCooldown("BlazeRing")) {
|
||||||
return;
|
return;
|
||||||
|
@ -45,7 +46,7 @@ public class BlazeRing extends FireAbility {
|
||||||
direction.setX(vx);
|
direction.setX(vx);
|
||||||
direction.setZ(vz);
|
direction.setZ(vz);
|
||||||
|
|
||||||
new BlazeArc(player, this.location, direction, this.range);
|
new BlazeArc(config, player, this.location, direction, this.range);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.start();
|
this.start();
|
||||||
|
|
|
@ -22,12 +22,14 @@ import com.projectkorra.projectkorra.ability.util.Collision;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||||
import com.projectkorra.projectkorra.command.Commands;
|
import com.projectkorra.projectkorra.command.Commands;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.FireBlastConfig;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.FireBurstConfig;
|
||||||
import com.projectkorra.projectkorra.firebending.util.FireDamageTimer;
|
import com.projectkorra.projectkorra.firebending.util.FireDamageTimer;
|
||||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
import com.projectkorra.projectkorra.waterbending.plant.PlantRegrowth;
|
import com.projectkorra.projectkorra.waterbending.plant.PlantRegrowth;
|
||||||
|
|
||||||
public class FireBlast extends FireAbility {
|
public class FireBlast extends FireAbility<FireBlastConfig> {
|
||||||
|
|
||||||
private static final int MAX_TICKS = 10000;
|
private static final int MAX_TICKS = 10000;
|
||||||
|
|
||||||
|
@ -60,8 +62,8 @@ public class FireBlast extends FireAbility {
|
||||||
private Vector direction;
|
private Vector direction;
|
||||||
private List<Block> safeBlocks;
|
private List<Block> safeBlocks;
|
||||||
|
|
||||||
public FireBlast(final Location location, final Vector direction, final Player player, final int damage, final List<Block> safeBlocks) {
|
public FireBlast(final FireBlastConfig config, final Location location, final Vector direction, final Player player, final double damage, final List<Block> safeBlocks) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
if (location.getBlock().isLiquid()) {
|
if (location.getBlock().isLiquid()) {
|
||||||
return;
|
return;
|
||||||
|
@ -69,7 +71,6 @@ public class FireBlast extends FireAbility {
|
||||||
|
|
||||||
this.setFields();
|
this.setFields();
|
||||||
this.safeBlocks = safeBlocks;
|
this.safeBlocks = safeBlocks;
|
||||||
this.damage = damage;
|
|
||||||
|
|
||||||
this.location = location.clone();
|
this.location = location.clone();
|
||||||
this.origin = location.clone();
|
this.origin = location.clone();
|
||||||
|
@ -80,8 +81,8 @@ public class FireBlast extends FireAbility {
|
||||||
this.start();
|
this.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public FireBlast(final Player player) {
|
public FireBlast(final FireBlastConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
if (this.bPlayer.isOnCooldown("FireBlast")) {
|
if (this.bPlayer.isOnCooldown("FireBlast")) {
|
||||||
return;
|
return;
|
||||||
|
@ -90,8 +91,7 @@ public class FireBlast extends FireAbility {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setFields();
|
this.setFields();
|
||||||
this.isFireBurst = false;
|
this.damage = this.getDayFactor(config.Damage);
|
||||||
this.damage = this.getDayFactor(getConfig().getDouble("Abilities.Fire.FireBlast.Damage"));
|
|
||||||
this.safeBlocks = new ArrayList<>();
|
this.safeBlocks = new ArrayList<>();
|
||||||
this.range = this.getDayFactor(this.range);
|
this.range = this.getDayFactor(this.range);
|
||||||
this.location = player.getEyeLocation();
|
this.location = player.getEyeLocation();
|
||||||
|
@ -104,19 +104,21 @@ public class FireBlast extends FireAbility {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setFields() {
|
private void setFields() {
|
||||||
this.isFireBurst = true;
|
this.isFireBurst = false;
|
||||||
this.powerFurnace = true;
|
this.powerFurnace = true;
|
||||||
this.showParticles = true;
|
this.showParticles = true;
|
||||||
this.fireBurstIgnite = getConfig().getBoolean("Abilities.Fire.FireBurst.Ignite");
|
|
||||||
this.dissipate = getConfig().getBoolean("Abilities.Fire.FireBlast.Dissipate");
|
this.fireBurstIgnite = false;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.FireBlast.Cooldown");
|
this.dissipate = config.Dissipate;
|
||||||
this.range = getConfig().getDouble("Abilities.Fire.FireBlast.Range");
|
this.cooldown = config.Cooldown;
|
||||||
this.speed = getConfig().getDouble("Abilities.Fire.FireBlast.Speed");
|
this.range = config.Range;
|
||||||
this.collisionRadius = getConfig().getDouble("Abilities.Fire.FireBlast.CollisionRadius");
|
this.speed = config.Speed;
|
||||||
this.fireTicks = getConfig().getDouble("Abilities.Fire.FireBlast.FireTicks");
|
this.collisionRadius = config.CollisionRadius;
|
||||||
this.knockback = getConfig().getDouble("Abilities.Fire.FireBlast.Knockback");
|
this.fireTicks = config.FireTicks;
|
||||||
this.flameRadius = getConfig().getDouble("Abilities.Fire.FireBlast.FlameParticleRadius");
|
this.knockback = config.Knockback;
|
||||||
this.smokeRadius = getConfig().getDouble("Abilities.Fire.FireBlast.SmokeParticleRadius");
|
this.flameRadius = config.FlameParticleRadius;
|
||||||
|
this.smokeRadius = config.SmokeParticleRadius;
|
||||||
|
|
||||||
this.random = new Random();
|
this.random = new Random();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,8 +423,12 @@ public class FireBlast extends FireAbility {
|
||||||
return this.isFireBurst;
|
return this.isFireBurst;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFireBurst(final boolean isFireBurst) {
|
public void setFireBurst(final FireBurstConfig config) {
|
||||||
this.isFireBurst = isFireBurst;
|
this.isFireBurst = config != null;
|
||||||
|
|
||||||
|
if (config != null) {
|
||||||
|
this.fireBurstIgnite = config.Ignite;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,10 +22,11 @@ import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.FireBlastConfig;
|
||||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
|
|
||||||
public class FireBlastCharged extends FireAbility {
|
public class FireBlastCharged extends FireAbility<FireBlastConfig> {
|
||||||
|
|
||||||
private static final Map<Entity, FireBlastCharged> EXPLOSIONS = new ConcurrentHashMap<>();
|
private static final Map<Entity, FireBlastCharged> EXPLOSIONS = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
@ -56,8 +57,8 @@ public class FireBlastCharged extends FireAbility {
|
||||||
private Location location;
|
private Location location;
|
||||||
private Vector direction;
|
private Vector direction;
|
||||||
|
|
||||||
public FireBlastCharged(final Player player) {
|
public FireBlastCharged(final FireBlastConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
if (!this.bPlayer.canBend(this) || hasAbility(player, FireBlastCharged.class)) {
|
if (!this.bPlayer.canBend(this) || hasAbility(player, FireBlastCharged.class)) {
|
||||||
return;
|
return;
|
||||||
|
@ -65,18 +66,18 @@ public class FireBlastCharged extends FireAbility {
|
||||||
|
|
||||||
this.charged = false;
|
this.charged = false;
|
||||||
this.launched = false;
|
this.launched = false;
|
||||||
this.canDamageBlocks = getConfig().getBoolean("Abilities.Fire.FireBlast.Charged.DamageBlocks");
|
this.canDamageBlocks = config.ChargedConfig.DamageBlocks;
|
||||||
this.dissipate = getConfig().getBoolean("Abilities.Fire.FireBlast.Dissipate");
|
this.dissipate = config.ChargedConfig.Dissipate;
|
||||||
this.chargeTime = getConfig().getLong("Abilities.Fire.FireBlast.Charged.ChargeTime");
|
this.chargeTime = config.ChargedConfig.ChargeTime;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.FireBlast.Charged.Cooldown");
|
this.cooldown = config.ChargedConfig.Cooldown;
|
||||||
this.time = System.currentTimeMillis();
|
this.time = System.currentTimeMillis();
|
||||||
this.interval = 25;
|
this.interval = 25;
|
||||||
this.collisionRadius = getConfig().getDouble("Abilities.Fire.FireBlast.Charged.CollisionRadius");
|
this.collisionRadius = config.ChargedConfig.CollisionRadius;
|
||||||
this.maxDamage = getConfig().getDouble("Abilities.Fire.FireBlast.Charged.Damage");
|
this.maxDamage = config.ChargedConfig.Damage;
|
||||||
this.range = getConfig().getDouble("Abilities.Fire.FireBlast.Charged.Range");
|
this.range = config.ChargedConfig.Range;
|
||||||
this.damageRadius = getConfig().getDouble("Abilities.Fire.FireBlast.Charged.DamageRadius");
|
this.damageRadius = config.ChargedConfig.DamageRadius;
|
||||||
this.explosionRadius = getConfig().getDouble("Abilities.Fire.FireBlast.Charged.ExplosionRadius");
|
this.explosionRadius = config.ChargedConfig.ExplosionRadius;
|
||||||
this.fireTicks = getConfig().getDouble("Abilities.Fire.FireBlast.Charged.FireTicks");
|
this.fireTicks = config.ChargedConfig.FireTicks;
|
||||||
this.innerRadius = this.damageRadius / 2;
|
this.innerRadius = this.damageRadius / 2;
|
||||||
|
|
||||||
if (isDay(player.getWorld())) {
|
if (isDay(player.getWorld())) {
|
||||||
|
@ -85,8 +86,8 @@ public class FireBlastCharged extends FireAbility {
|
||||||
this.range = this.getDayFactor(this.range);
|
this.range = this.getDayFactor(this.range);
|
||||||
}
|
}
|
||||||
if (this.bPlayer.isAvatarState()) {
|
if (this.bPlayer.isAvatarState()) {
|
||||||
this.chargeTime = getConfig().getLong("Abilities.Avatar.AvatarState.Fire.FireBlast.Charged.ChargeTime");
|
this.chargeTime = config.ChargedConfig.AvatarState_ChargeTime;
|
||||||
this.maxDamage = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.FireBlast.Charged.Damage");
|
this.maxDamage = config.ChargedConfig.AvatarState_ChargeTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!player.getEyeLocation().getBlock().isLiquid()) {
|
if (!player.getEyeLocation().getBlock().isLiquid()) {
|
||||||
|
|
|
@ -14,17 +14,20 @@ import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import com.projectkorra.projectkorra.ProjectKorra;
|
import com.projectkorra.projectkorra.ProjectKorra;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.ConfigManager;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.FireBlastConfig;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.FireBurstConfig;
|
||||||
|
|
||||||
public class FireBurst extends FireAbility {
|
public class FireBurst extends FireAbility<FireBurstConfig> {
|
||||||
|
|
||||||
@Attribute("Charged")
|
@Attribute("Charged")
|
||||||
private boolean charged;
|
private boolean charged;
|
||||||
@Attribute(Attribute.DAMAGE)
|
@Attribute(Attribute.DAMAGE)
|
||||||
private int damage;
|
private double damage;
|
||||||
@Attribute(Attribute.CHARGE_DURATION)
|
@Attribute(Attribute.CHARGE_DURATION)
|
||||||
private long chargeTime;
|
private long chargeTime;
|
||||||
@Attribute(Attribute.RANGE)
|
@Attribute(Attribute.RANGE)
|
||||||
private long range;
|
private double range;
|
||||||
@Attribute(Attribute.COOLDOWN)
|
@Attribute(Attribute.COOLDOWN)
|
||||||
private long cooldown;
|
private long cooldown;
|
||||||
private double angleTheta;
|
private double angleTheta;
|
||||||
|
@ -32,17 +35,17 @@ public class FireBurst extends FireAbility {
|
||||||
private double particlesPercentage;
|
private double particlesPercentage;
|
||||||
private ArrayList<FireBlast> blasts;
|
private ArrayList<FireBlast> blasts;
|
||||||
|
|
||||||
public FireBurst(final Player player) {
|
public FireBurst(final FireBurstConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
this.charged = false;
|
this.charged = false;
|
||||||
this.damage = getConfig().getInt("Abilities.Fire.FireBurst.Damage");
|
this.damage = config.Damage;
|
||||||
this.chargeTime = getConfig().getLong("Abilities.Fire.FireBurst.ChargeTime");
|
this.chargeTime = config.ChargeTime;
|
||||||
this.range = getConfig().getLong("Abilities.Fire.FireBurst.Range");
|
this.range = config.Range;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.FireBurst.Cooldown");
|
this.cooldown = config.Cooldown;
|
||||||
this.angleTheta = getConfig().getDouble("Abilities.Fire.FireBurst.AngleTheta");
|
this.angleTheta = config.AngleTheta;
|
||||||
this.anglePhi = getConfig().getDouble("Abilities.Fire.FireBurst.AnglePhi");
|
this.anglePhi = config.AnglePhi;
|
||||||
this.particlesPercentage = getConfig().getDouble("Abilities.Fire.FireBurst.ParticlesPercentage");
|
this.particlesPercentage = config.ParticlesPercentage;
|
||||||
this.blasts = new ArrayList<>();
|
this.blasts = new ArrayList<>();
|
||||||
|
|
||||||
if (!this.bPlayer.canBend(this) || hasAbility(player, FireBurst.class)) {
|
if (!this.bPlayer.canBend(this) || hasAbility(player, FireBurst.class)) {
|
||||||
|
@ -53,9 +56,9 @@ public class FireBurst extends FireAbility {
|
||||||
this.chargeTime /= getDayFactor();
|
this.chargeTime /= getDayFactor();
|
||||||
}
|
}
|
||||||
if (this.bPlayer.isAvatarState()) {
|
if (this.bPlayer.isAvatarState()) {
|
||||||
this.chargeTime = getConfig().getLong("Abilities.Avatar.AvatarState.Fire.FireBurst.Damage");
|
this.chargeTime = config.AvatarState_ChargeTime;
|
||||||
this.damage = getConfig().getInt("Abilities.Avatar.AvatarState.Fire.FireBurst.Damage");
|
this.damage = config.AvatarState_Damage;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Avatar.AvatarState.Fire.FireBurst.Cooldown");
|
this.cooldown = config.AvatarState_Cooldown;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.start();
|
this.start();
|
||||||
|
@ -90,8 +93,9 @@ public class FireBurst extends FireAbility {
|
||||||
final Vector direction = new Vector(x, z, y);
|
final Vector direction = new Vector(x, z, y);
|
||||||
|
|
||||||
if (direction.angle(vector) <= angle) {
|
if (direction.angle(vector) <= angle) {
|
||||||
final FireBlast fblast = new FireBlast(location, direction.normalize(), this.player, this.damage, safeBlocks);
|
final FireBlast fblast = new FireBlast(ConfigManager.getConfig(FireBlastConfig.class), location, direction.normalize(), this.player, this.damage, safeBlocks);
|
||||||
fblast.setRange(this.range);
|
fblast.setRange(this.range);
|
||||||
|
fblast.setFireBurst(config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,10 +163,11 @@ public class FireBurst extends FireAbility {
|
||||||
z = r * Math.cos(rtheta);
|
z = r * Math.cos(rtheta);
|
||||||
|
|
||||||
final Vector direction = new Vector(x, z, y);
|
final Vector direction = new Vector(x, z, y);
|
||||||
final FireBlast fblast = new FireBlast(location, direction.normalize(), this.player, this.damage, safeblocks);
|
final FireBlast fblast = new FireBlast(ConfigManager.getConfig(FireBlastConfig.class), location, direction.normalize(), this.player, this.damage, safeblocks);
|
||||||
|
|
||||||
fblast.setRange(this.range);
|
fblast.setRange(this.range);
|
||||||
fblast.setShowParticles(false);
|
fblast.setShowParticles(false);
|
||||||
|
fblast.setFireBurst(config);
|
||||||
this.blasts.add(fblast);
|
this.blasts.add(fblast);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -205,11 +210,11 @@ public class FireBurst extends FireAbility {
|
||||||
this.charged = charged;
|
this.charged = charged;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getDamage() {
|
public double getDamage() {
|
||||||
return this.damage;
|
return this.damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDamage(final int damage) {
|
public void setDamage(final double damage) {
|
||||||
this.damage = damage;
|
this.damage = damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,11 +226,11 @@ public class FireBurst extends FireAbility {
|
||||||
this.chargeTime = chargeTime;
|
this.chargeTime = chargeTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getRange() {
|
public double getRange() {
|
||||||
return this.range;
|
return this.range;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRange(final long range) {
|
public void setRange(final double range) {
|
||||||
this.range = range;
|
this.range = range;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,10 @@ import com.projectkorra.projectkorra.ability.ElementalAbility;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.airbending.AirSpout;
|
import com.projectkorra.projectkorra.airbending.AirSpout;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.FireJetConfig;
|
||||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
|
|
||||||
public class FireJet extends FireAbility {
|
public class FireJet extends FireAbility<FireJetConfig> {
|
||||||
|
|
||||||
@Attribute("AvatarStateToggle")
|
@Attribute("AvatarStateToggle")
|
||||||
private boolean avatarStateToggled;
|
private boolean avatarStateToggled;
|
||||||
|
@ -31,8 +32,8 @@ public class FireJet extends FireAbility {
|
||||||
private Boolean previousGlidingState;
|
private Boolean previousGlidingState;
|
||||||
private Boolean showGliding;
|
private Boolean showGliding;
|
||||||
|
|
||||||
public FireJet(final Player player) {
|
public FireJet(final FireJetConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
final FireJet oldJet = getAbility(player, FireJet.class);
|
final FireJet oldJet = getAbility(player, FireJet.class);
|
||||||
if (oldJet != null) {
|
if (oldJet != null) {
|
||||||
|
@ -47,11 +48,11 @@ public class FireJet extends FireAbility {
|
||||||
abil.remove();
|
abil.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.avatarStateToggled = getConfig().getBoolean("Abilities.Avatar.AvatarState.Fire.FireJet.IsAvatarStateToggle");
|
this.avatarStateToggled = config.AvatarState_Toggle;
|
||||||
this.duration = getConfig().getLong("Abilities.Fire.FireJet.Duration");
|
this.duration = config.Duration;
|
||||||
this.speed = getConfig().getDouble("Abilities.Fire.FireJet.Speed");
|
this.speed = config.Speed;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.FireJet.Cooldown");
|
this.cooldown = config.Cooldown;
|
||||||
this.showGliding = getConfig().getBoolean("Abilities.Fire.FireJet.ShowGliding");
|
this.showGliding = config.ShowGliding;
|
||||||
this.random = new Random();
|
this.random = new Random();
|
||||||
|
|
||||||
this.speed = this.getDayFactor(this.speed);
|
this.speed = this.getDayFactor(this.speed);
|
||||||
|
|
|
@ -14,10 +14,11 @@ import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import com.projectkorra.projectkorra.GeneralMethods;
|
import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.FireManipulationConfig;
|
||||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
|
|
||||||
public class FireManipulation extends FireAbility {
|
public class FireManipulation extends FireAbility<FireManipulationConfig> {
|
||||||
|
|
||||||
public static enum FireManipulationType {
|
public static enum FireManipulationType {
|
||||||
SHIFT, CLICK;
|
SHIFT, CLICK;
|
||||||
|
@ -49,8 +50,8 @@ public class FireManipulation extends FireAbility {
|
||||||
private Location origin;
|
private Location origin;
|
||||||
private Location focalPoint;
|
private Location focalPoint;
|
||||||
|
|
||||||
public FireManipulation(final Player player, final FireManipulationType fireManipulationType) {
|
public FireManipulation(final FireManipulationConfig config, final Player player, final FireManipulationType fireManipulationType) {
|
||||||
super(player);
|
super(config, player);
|
||||||
if (!this.bPlayer.canBend(this)) {
|
if (!this.bPlayer.canBend(this)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -62,17 +63,17 @@ public class FireManipulation extends FireAbility {
|
||||||
|
|
||||||
public void setFields() {
|
public void setFields() {
|
||||||
if (this.fireManipulationType == FireManipulationType.SHIFT) {
|
if (this.fireManipulationType == FireManipulationType.SHIFT) {
|
||||||
this.streamCooldown = getConfig().getLong("Abilities.Fire.FireManipulation.Stream.Cooldown");
|
this.streamCooldown = config.StreamConfig.Cooldown;
|
||||||
this.streamRange = getConfig().getDouble("Abilities.Fire.FireManipulation.Stream.Range");
|
this.streamRange = config.StreamConfig.Range;
|
||||||
this.streamDamage = getConfig().getDouble("Abilities.Fire.FireManipulation.Stream.Damage");
|
this.streamDamage = config.StreamConfig.Damage;
|
||||||
this.streamSpeed = getConfig().getDouble("Abilities.Fire.FireManipulation.Stream.Speed");
|
this.streamSpeed = config.StreamConfig.Speed;
|
||||||
this.streamParticles = getConfig().getInt("Abilities.Fire.FireManipulation.Stream.Particles");
|
this.streamParticles = config.StreamConfig.Particles;
|
||||||
|
|
||||||
this.shieldCooldown = getConfig().getLong("Abilities.Fire.FireManipulation.Shield.Cooldown");
|
this.shieldCooldown = config.ShieldConfig.Cooldown;
|
||||||
this.shieldRange = getConfig().getDouble("Abilities.Fire.FireManipulation.Shield.Range");
|
this.shieldRange = config.ShieldConfig.Range;
|
||||||
this.shieldDamage = getConfig().getDouble("Abilities.Fire.FireManipulation.Shield.Damage");
|
this.shieldDamage = config.ShieldConfig.Damage;
|
||||||
this.shieldParticles = getConfig().getInt("Abilities.Fire.FireManipulation.Shield.Particles");
|
this.shieldParticles = config.ShieldConfig.Particles;
|
||||||
this.maxDuration = getConfig().getLong("Abilities.Fire.FireManipulation.Shield.MaxDuration");
|
this.maxDuration = config.ShieldConfig.MaxDuration;
|
||||||
this.points = new ConcurrentHashMap<>();
|
this.points = new ConcurrentHashMap<>();
|
||||||
} else if (this.fireManipulationType == FireManipulationType.CLICK) {
|
} else if (this.fireManipulationType == FireManipulationType.CLICK) {
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,11 @@ import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.ability.util.Collision;
|
import com.projectkorra.projectkorra.ability.util.Collision;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.FireShieldConfig;
|
||||||
import com.projectkorra.projectkorra.firebending.util.FireDamageTimer;
|
import com.projectkorra.projectkorra.firebending.util.FireDamageTimer;
|
||||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
|
|
||||||
public class FireShield extends FireAbility {
|
public class FireShield extends FireAbility<FireShieldConfig> {
|
||||||
|
|
||||||
private boolean shield;
|
private boolean shield;
|
||||||
@Attribute("IgniteEntities")
|
@Attribute("IgniteEntities")
|
||||||
|
@ -44,23 +45,23 @@ public class FireShield extends FireAbility {
|
||||||
private Random random;
|
private Random random;
|
||||||
private int increment = 20;
|
private int increment = 20;
|
||||||
|
|
||||||
public FireShield(final Player player) {
|
public FireShield(final FireShieldConfig config, final Player player) {
|
||||||
this(player, false);
|
this(config, player, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FireShield(final Player player, final boolean shield) {
|
public FireShield(final FireShieldConfig config, final Player player, final boolean shield) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
this.shield = shield;
|
this.shield = shield;
|
||||||
this.ignite = true;
|
this.ignite = true;
|
||||||
this.discCooldown = getConfig().getLong("Abilities.Fire.FireShield.Disc.Cooldown");
|
this.discCooldown = config.DiscConfig.Cooldown;
|
||||||
this.discDuration = getConfig().getLong("Abilities.Fire.FireShield.Disc.Duration");
|
this.discDuration = config.DiscConfig.Duration;
|
||||||
this.discRadius = getConfig().getDouble("Abilities.Fire.FireShield.Disc.Radius");
|
this.discRadius = config.DiscConfig.Radius;
|
||||||
this.discFireTicks = getConfig().getDouble("Abilities.Fire.FireShield.Disc.FireTicks");
|
this.discFireTicks = config.DiscConfig.FireTicks;
|
||||||
this.shieldCooldown = getConfig().getLong("Abilities.Fire.FireShield.Shield.Cooldown");
|
this.shieldCooldown = config.ShieldConfig.Cooldown;
|
||||||
this.shieldDuration = getConfig().getLong("Abilities.Fire.FireShield.Shield.Duration");
|
this.shieldDuration = config.ShieldConfig.Duration;
|
||||||
this.shieldRadius = getConfig().getDouble("Abilities.Fire.FireShield.Shield.Radius");
|
this.shieldRadius = config.ShieldConfig.Radius;
|
||||||
this.shieldFireTicks = getConfig().getDouble("Abilities.Fire.FireShield.Shield.FireTicks");
|
this.shieldFireTicks = config.ShieldConfig.FireTicks;
|
||||||
this.random = new Random();
|
this.random = new Random();
|
||||||
|
|
||||||
if (hasAbility(player, FireShield.class) || this.bPlayer.isOnCooldown("FireShield")) {
|
if (hasAbility(player, FireShield.class) || this.bPlayer.isOnCooldown("FireShield")) {
|
||||||
|
|
|
@ -26,6 +26,9 @@ import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import com.projectkorra.projectkorra.ProjectKorra;
|
import com.projectkorra.projectkorra.ProjectKorra;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.ConfigManager;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.HeatControlConfig;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.water.PhaseChangeConfig;
|
||||||
import com.projectkorra.projectkorra.earthbending.lava.LavaFlow;
|
import com.projectkorra.projectkorra.earthbending.lava.LavaFlow;
|
||||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
import com.projectkorra.projectkorra.util.TempBlock;
|
import com.projectkorra.projectkorra.util.TempBlock;
|
||||||
|
@ -37,7 +40,7 @@ import com.projectkorra.projectkorra.waterbending.combo.IceWave;
|
||||||
import com.projectkorra.projectkorra.waterbending.ice.PhaseChange;
|
import com.projectkorra.projectkorra.waterbending.ice.PhaseChange;
|
||||||
import com.projectkorra.projectkorra.waterbending.multiabilities.WaterArmsSpear;
|
import com.projectkorra.projectkorra.waterbending.multiabilities.WaterArmsSpear;
|
||||||
|
|
||||||
public class HeatControl extends FireAbility {
|
public class HeatControl extends FireAbility<HeatControlConfig> {
|
||||||
|
|
||||||
public enum HeatControlType {
|
public enum HeatControlType {
|
||||||
COOK, EXTINGUISH, MELT, SOLIDIFY
|
COOK, EXTINGUISH, MELT, SOLIDIFY
|
||||||
|
@ -80,8 +83,8 @@ public class HeatControl extends FireAbility {
|
||||||
private Location solidifyLocation;
|
private Location solidifyLocation;
|
||||||
private Random randy;
|
private Random randy;
|
||||||
|
|
||||||
public HeatControl(final Player player, final HeatControlType heatControlType) {
|
public HeatControl(final HeatControlConfig config, final Player player, final HeatControlType heatControlType) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
this.heatControlType = heatControlType;
|
this.heatControlType = heatControlType;
|
||||||
this.setFields();
|
this.setFields();
|
||||||
|
@ -89,7 +92,7 @@ public class HeatControl extends FireAbility {
|
||||||
if (this.heatControlType == HeatControlType.COOK) {
|
if (this.heatControlType == HeatControlType.COOK) {
|
||||||
if (!isCookable(player.getInventory().getItemInMainHand().getType())) {
|
if (!isCookable(player.getInventory().getItemInMainHand().getType())) {
|
||||||
this.remove();
|
this.remove();
|
||||||
new HeatControl(player, HeatControlType.SOLIDIFY);
|
new HeatControl(config, player, HeatControlType.SOLIDIFY);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.start();
|
this.start();
|
||||||
|
@ -116,7 +119,7 @@ public class HeatControl extends FireAbility {
|
||||||
return;
|
return;
|
||||||
} else if (getLavaBlock(player, this.solidifyRange) == null) {
|
} else if (getLavaBlock(player, this.solidifyRange) == null) {
|
||||||
this.remove();
|
this.remove();
|
||||||
new HeatControl(player, HeatControlType.EXTINGUISH);
|
new HeatControl(config, player, HeatControlType.EXTINGUISH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,24 +132,24 @@ public class HeatControl extends FireAbility {
|
||||||
public void setFields() {
|
public void setFields() {
|
||||||
if (this.heatControlType == HeatControlType.COOK) {
|
if (this.heatControlType == HeatControlType.COOK) {
|
||||||
this.cookTime = System.currentTimeMillis();
|
this.cookTime = System.currentTimeMillis();
|
||||||
this.cookInterval = getConfig().getLong("Abilities.Fire.HeatControl.Cook.Interval");
|
this.cookInterval = config.CookConfig.Interval;
|
||||||
} else if (this.heatControlType == HeatControlType.EXTINGUISH) {
|
} else if (this.heatControlType == HeatControlType.EXTINGUISH) {
|
||||||
this.extinguishCooldown = getConfig().getLong("Abilities.Fire.HeatControl.Extinguish.Cooldown");
|
this.extinguishCooldown = config.ExtinguishConfig.Cooldown;
|
||||||
this.extinguishRadius = getConfig().getLong("Abilities.Fire.HeatControl.Extinguish.Radius");
|
this.extinguishRadius = config.ExtinguishConfig.Radius;
|
||||||
this.extinguishRadius = this.getDayFactor(this.extinguishRadius);
|
this.extinguishRadius = this.getDayFactor(this.extinguishRadius);
|
||||||
} else if (this.heatControlType == HeatControlType.MELT) {
|
} else if (this.heatControlType == HeatControlType.MELT) {
|
||||||
this.meltRange = getConfig().getDouble("Abilities.Fire.HeatControl.Melt.Range");
|
this.meltRange = config.MeltConfig.Range;
|
||||||
this.meltRadius = getConfig().getDouble("Abilities.Fire.HeatControl.Melt.Radius");
|
this.meltRadius = config.MeltConfig.Radius;
|
||||||
this.meltRange = this.getDayFactor(this.meltRange);
|
this.meltRange = this.getDayFactor(this.meltRange);
|
||||||
this.meltRadius = this.getDayFactor(this.meltRadius);
|
this.meltRadius = this.getDayFactor(this.meltRadius);
|
||||||
} else if (this.heatControlType == HeatControlType.SOLIDIFY) {
|
} else if (this.heatControlType == HeatControlType.SOLIDIFY) {
|
||||||
this.solidifyRadius = 1;
|
this.solidifyRadius = 1;
|
||||||
this.solidifyDelay = 50;
|
this.solidifyDelay = 50;
|
||||||
this.solidifyLastBlockTime = 0;
|
this.solidifyLastBlockTime = 0;
|
||||||
this.solidifyMaxRadius = getConfig().getDouble("Abilities.Fire.HeatControl.Solidify.MaxRadius");
|
this.solidifyMaxRadius = config.SolidifyConfig.MaxRadius;
|
||||||
this.solidifyRange = getConfig().getDouble("Abilities.Fire.HeatControl.Solidify.Range");
|
this.solidifyRange = config.SolidifyConfig.Range;
|
||||||
this.solidifyRevert = getConfig().getBoolean("Abilities.Fire.HeatControl.Solidify.Revert");
|
this.solidifyRevert = config.SolidifyConfig.Revert;
|
||||||
this.solidifyRevertTime = getConfig().getLong("Abilities.Fire.HeatControl.Solidify.RevertTime");
|
this.solidifyRevertTime = config.SolidifyConfig.RevertTime;
|
||||||
this.randy = new Random();
|
this.randy = new Random();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -319,7 +322,7 @@ public class HeatControl extends FireAbility {
|
||||||
if (TempBlock.isTempBlock(block)) {
|
if (TempBlock.isTempBlock(block)) {
|
||||||
final TempBlock tb = TempBlock.get(block);
|
final TempBlock tb = TempBlock.get(block);
|
||||||
if (PhaseChange.getFrozenBlocksMap().containsKey(tb)) {
|
if (PhaseChange.getFrozenBlocksMap().containsKey(tb)) {
|
||||||
new PhaseChange(player, PhaseChange.PhaseChangeType.MELT).melt(tb.getBlock());
|
new PhaseChange(ConfigManager.getConfig(PhaseChangeConfig.class), player, PhaseChange.PhaseChangeType.MELT).melt(tb.getBlock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,10 @@ import com.projectkorra.projectkorra.Element;
|
||||||
import com.projectkorra.projectkorra.GeneralMethods;
|
import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.IlluminationConfig;
|
||||||
import com.projectkorra.projectkorra.util.TempBlock;
|
import com.projectkorra.projectkorra.util.TempBlock;
|
||||||
|
|
||||||
public class Illumination extends FireAbility {
|
public class Illumination extends FireAbility<IlluminationConfig> {
|
||||||
|
|
||||||
private static final Map<TempBlock, Player> BLOCKS = new ConcurrentHashMap<>();
|
private static final Map<TempBlock, Player> BLOCKS = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
@ -25,17 +26,17 @@ public class Illumination extends FireAbility {
|
||||||
private long cooldown;
|
private long cooldown;
|
||||||
@Attribute(Attribute.RANGE)
|
@Attribute(Attribute.RANGE)
|
||||||
private double range;
|
private double range;
|
||||||
private int lightThreshold;
|
private byte lightThreshold;
|
||||||
private Material normalType;
|
private Material normalType;
|
||||||
private TempBlock block;
|
private TempBlock block;
|
||||||
private int oldLevel;
|
private byte oldLevel;
|
||||||
|
|
||||||
public Illumination(final Player player) {
|
public Illumination(final IlluminationConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
this.range = this.getDayFactor(getConfig().getDouble("Abilities.Fire.Illumination.Range"));
|
this.range = this.getDayFactor(config.Range);
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.Illumination.Cooldown");
|
this.cooldown = config.Cooldown;
|
||||||
this.lightThreshold = getConfig().getInt("Abilities.Fire.Illumination.LightThreshold");
|
this.lightThreshold = config.LightThreshold;
|
||||||
|
|
||||||
final Illumination oldIllumination = getAbility(player, Illumination.class);
|
final Illumination oldIllumination = getAbility(player, Illumination.class);
|
||||||
if (oldIllumination != null) {
|
if (oldIllumination != null) {
|
||||||
|
|
|
@ -15,12 +15,13 @@ import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import com.projectkorra.projectkorra.ability.AirAbility;
|
import com.projectkorra.projectkorra.ability.AirAbility;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.WallOfFireConfig;
|
||||||
import com.projectkorra.projectkorra.firebending.util.FireDamageTimer;
|
import com.projectkorra.projectkorra.firebending.util.FireDamageTimer;
|
||||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
import com.projectkorra.projectkorra.util.TempBlock;
|
import com.projectkorra.projectkorra.util.TempBlock;
|
||||||
|
|
||||||
public class WallOfFire extends FireAbility {
|
public class WallOfFire extends FireAbility<WallOfFireConfig> {
|
||||||
|
|
||||||
private boolean active;
|
private boolean active;
|
||||||
private int damageTick;
|
private int damageTick;
|
||||||
|
@ -47,20 +48,20 @@ public class WallOfFire extends FireAbility {
|
||||||
private Location origin;
|
private Location origin;
|
||||||
private List<Block> blocks;
|
private List<Block> blocks;
|
||||||
|
|
||||||
public WallOfFire(final Player player) {
|
public WallOfFire(final WallOfFireConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
this.active = true;
|
this.active = true;
|
||||||
this.maxAngle = getConfig().getDouble("Abilities.Fire.WallOfFire.MaxAngle");
|
this.maxAngle = config.MaxAngle;
|
||||||
this.interval = getConfig().getLong("Abilities.Fire.WallOfFire.Interval");
|
this.interval = config.Interval;
|
||||||
this.range = getConfig().getInt("Abilities.Fire.WallOfFire.Range");
|
this.range = config.Range;
|
||||||
this.height = getConfig().getInt("Abilities.Fire.WallOfFire.Height");
|
this.height = config.Height;
|
||||||
this.width = getConfig().getInt("Abilities.Fire.WallOfFire.Width");
|
this.width = config.Width;
|
||||||
this.damage = getConfig().getDouble("Abilities.Fire.WallOfFire.Damage");
|
this.damage = config.Damage;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.WallOfFire.Cooldown");
|
this.cooldown = config.Cooldown;
|
||||||
this.damageInterval = getConfig().getLong("Abilities.Fire.WallOfFire.DamageInterval");
|
this.damageInterval = config.DamageInterval;
|
||||||
this.duration = getConfig().getLong("Abilities.Fire.WallOfFire.Duration");
|
this.duration = config.Duration;
|
||||||
this.fireTicks = getConfig().getDouble("Abilities.Fire.WallOfFire.FireTicks");
|
this.fireTicks = config.FireTicks;
|
||||||
this.random = new Random();
|
this.random = new Random();
|
||||||
this.blocks = new ArrayList<>();
|
this.blocks = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -80,11 +81,11 @@ public class WallOfFire extends FireAbility {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.bPlayer.isAvatarState()) {
|
if (this.bPlayer.isAvatarState()) {
|
||||||
this.width = getConfig().getInt("Abilities.Avatar.AvatarState.Fire.WallOfFire.Width");
|
this.width = config.AvatarState_Width;
|
||||||
this.height = getConfig().getInt("Abilities.Avatar.AvatarState.Fire.WallOfFire.Height");
|
this.height = config.AvatarState_Height;
|
||||||
this.duration = getConfig().getLong("Abilities.Avatar.AvatarState.Fire.WallOfFire.Duration");
|
this.duration = config.AvatarState_Duration;
|
||||||
this.damage = getConfig().getInt("Abilities.Avatar.AvatarState.Fire.WallOfFire.Damage");
|
this.damage = config.AvatarState_Damage;
|
||||||
this.fireTicks = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.WallOfFire.FireTicks");
|
this.fireTicks = config.AvatarState_FireTicks;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.time = System.currentTimeMillis();
|
this.time = System.currentTimeMillis();
|
||||||
|
|
|
@ -28,6 +28,7 @@ import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
* stream for all their progress methods. If someone else was reliant on that,
|
* stream for all their progress methods. If someone else was reliant on that,
|
||||||
* they can use this ability instead.
|
* they can use this ability instead.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
public class FireComboStream extends BukkitRunnable {
|
public class FireComboStream extends BukkitRunnable {
|
||||||
private boolean useNewParticles;
|
private boolean useNewParticles;
|
||||||
private boolean cancelled;
|
private boolean cancelled;
|
||||||
|
|
|
@ -17,9 +17,11 @@ import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.ability.util.Collision;
|
import com.projectkorra.projectkorra.ability.util.Collision;
|
||||||
import com.projectkorra.projectkorra.ability.util.ComboManager.AbilityInformation;
|
import com.projectkorra.projectkorra.ability.util.ComboManager.AbilityInformation;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.ConfigManager;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.FireKickConfig;
|
||||||
import com.projectkorra.projectkorra.util.ClickType;
|
import com.projectkorra.projectkorra.util.ClickType;
|
||||||
|
|
||||||
public class FireKick extends FireAbility implements ComboAbility {
|
public class FireKick extends FireAbility<FireKickConfig> implements ComboAbility {
|
||||||
|
|
||||||
@Attribute(Attribute.COOLDOWN)
|
@Attribute(Attribute.COOLDOWN)
|
||||||
private long cooldown;
|
private long cooldown;
|
||||||
|
@ -34,8 +36,8 @@ public class FireKick extends FireAbility implements ComboAbility {
|
||||||
private ArrayList<LivingEntity> affectedEntities;
|
private ArrayList<LivingEntity> affectedEntities;
|
||||||
private ArrayList<BukkitRunnable> tasks;
|
private ArrayList<BukkitRunnable> tasks;
|
||||||
|
|
||||||
public FireKick(final Player player) {
|
public FireKick(final FireKickConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
if (!this.bPlayer.canBendIgnoreBindsCooldowns(this)) {
|
if (!this.bPlayer.canBendIgnoreBindsCooldowns(this)) {
|
||||||
return;
|
return;
|
||||||
|
@ -44,15 +46,15 @@ public class FireKick extends FireAbility implements ComboAbility {
|
||||||
this.affectedEntities = new ArrayList<>();
|
this.affectedEntities = new ArrayList<>();
|
||||||
this.tasks = new ArrayList<>();
|
this.tasks = new ArrayList<>();
|
||||||
|
|
||||||
this.damage = getConfig().getDouble("Abilities.Fire.FireKick.Damage");
|
this.damage = config.Damage;
|
||||||
this.range = getConfig().getDouble("Abilities.Fire.FireKick.Range");
|
this.range = config.Range;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.FireKick.Cooldown");
|
this.cooldown = config.Cooldown;
|
||||||
this.speed = getConfig().getLong("Abilities.Fire.FireKick.Speed");
|
this.speed = config.Speed;
|
||||||
|
|
||||||
if (this.bPlayer.isAvatarState()) {
|
if (this.bPlayer.isAvatarState()) {
|
||||||
this.cooldown = 0;
|
this.cooldown = 0;
|
||||||
this.damage = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.FireKick.Damage");
|
this.damage = config.AvatarState_Damage;
|
||||||
this.range = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.FireKick.Range");
|
this.range = config.AvatarState_Range;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.start();
|
this.start();
|
||||||
|
@ -185,7 +187,7 @@ public class FireKick extends FireAbility implements ComboAbility {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object createNewComboInstance(final Player player) {
|
public Object createNewComboInstance(final Player player) {
|
||||||
return new FireKick(player);
|
return new FireKick(ConfigManager.getConfig(FireKickConfig.class), player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -18,9 +18,11 @@ import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.ability.util.Collision;
|
import com.projectkorra.projectkorra.ability.util.Collision;
|
||||||
import com.projectkorra.projectkorra.ability.util.ComboManager.AbilityInformation;
|
import com.projectkorra.projectkorra.ability.util.ComboManager.AbilityInformation;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.ConfigManager;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.FireSpinConfig;
|
||||||
import com.projectkorra.projectkorra.util.ClickType;
|
import com.projectkorra.projectkorra.util.ClickType;
|
||||||
|
|
||||||
public class FireSpin extends FireAbility implements ComboAbility {
|
public class FireSpin extends FireAbility<FireSpinConfig> implements ComboAbility {
|
||||||
|
|
||||||
@Attribute(Attribute.COOLDOWN)
|
@Attribute(Attribute.COOLDOWN)
|
||||||
private long cooldown;
|
private long cooldown;
|
||||||
|
@ -36,8 +38,8 @@ public class FireSpin extends FireAbility implements ComboAbility {
|
||||||
private ArrayList<LivingEntity> affectedEntities;
|
private ArrayList<LivingEntity> affectedEntities;
|
||||||
private ArrayList<BukkitRunnable> tasks;
|
private ArrayList<BukkitRunnable> tasks;
|
||||||
|
|
||||||
public FireSpin(final Player player) {
|
public FireSpin(final FireSpinConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
if (!this.bPlayer.canBendIgnoreBindsCooldowns(this)) {
|
if (!this.bPlayer.canBendIgnoreBindsCooldowns(this)) {
|
||||||
return;
|
return;
|
||||||
|
@ -50,17 +52,17 @@ public class FireSpin extends FireAbility implements ComboAbility {
|
||||||
this.affectedEntities = new ArrayList<>();
|
this.affectedEntities = new ArrayList<>();
|
||||||
this.tasks = new ArrayList<>();
|
this.tasks = new ArrayList<>();
|
||||||
|
|
||||||
this.damage = getConfig().getDouble("Abilities.Fire.FireSpin.Damage");
|
this.damage = config.Damage;
|
||||||
this.range = getConfig().getDouble("Abilities.Fire.FireSpin.Range");
|
this.range = config.Range;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.FireSpin.Cooldown");
|
this.cooldown = config.Cooldown;
|
||||||
this.knockback = getConfig().getDouble("Abilities.Fire.FireSpin.Knockback");
|
this.knockback = config.Knockback;
|
||||||
this.speed = getConfig().getDouble("Abilities.Fire.FireSpin.Speed");
|
this.speed = config.Speed;
|
||||||
|
|
||||||
if (this.bPlayer.isAvatarState()) {
|
if (this.bPlayer.isAvatarState()) {
|
||||||
this.cooldown = 0;
|
this.cooldown = 0;
|
||||||
this.damage = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.FireSpin.Damage");
|
this.damage = config.AvatarState_Damage;
|
||||||
this.range = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.FireSpin.Range");
|
this.range = config.AvatarState_Range;
|
||||||
this.knockback = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.FireSpin.Knockback");
|
this.knockback = config.AvatarState_Knockback;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.start();
|
this.start();
|
||||||
|
@ -162,7 +164,7 @@ public class FireSpin extends FireAbility implements ComboAbility {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object createNewComboInstance(final Player player) {
|
public Object createNewComboInstance(final Player player) {
|
||||||
return new FireSpin(player);
|
return new FireSpin(ConfigManager.getConfig(FireSpinConfig.class), player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -18,12 +18,14 @@ import com.projectkorra.projectkorra.ability.ElementalAbility;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.ability.util.ComboManager.AbilityInformation;
|
import com.projectkorra.projectkorra.ability.util.ComboManager.AbilityInformation;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.ConfigManager;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.FireWheelConfig;
|
||||||
import com.projectkorra.projectkorra.firebending.util.FireDamageTimer;
|
import com.projectkorra.projectkorra.firebending.util.FireDamageTimer;
|
||||||
import com.projectkorra.projectkorra.util.ClickType;
|
import com.projectkorra.projectkorra.util.ClickType;
|
||||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
|
|
||||||
public class FireWheel extends FireAbility implements ComboAbility {
|
public class FireWheel extends FireAbility<FireWheelConfig> implements ComboAbility {
|
||||||
|
|
||||||
private Location origin;
|
private Location origin;
|
||||||
private Location location;
|
private Location location;
|
||||||
|
@ -43,20 +45,20 @@ public class FireWheel extends FireAbility implements ComboAbility {
|
||||||
private double damage;
|
private double damage;
|
||||||
private ArrayList<LivingEntity> affectedEntities;
|
private ArrayList<LivingEntity> affectedEntities;
|
||||||
|
|
||||||
public FireWheel(final Player player) {
|
public FireWheel(final FireWheelConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
if (this.bPlayer.isOnCooldown("FireWheel") && !this.bPlayer.isAvatarState()) {
|
if (this.bPlayer.isOnCooldown("FireWheel") && !this.bPlayer.isAvatarState()) {
|
||||||
this.remove();
|
this.remove();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.damage = getConfig().getDouble("Abilities.Fire.FireWheel.Damage");
|
this.damage = config.Damage;
|
||||||
this.range = getConfig().getDouble("Abilities.Fire.FireWheel.Range");
|
this.range = config.Range;
|
||||||
this.speed = getConfig().getDouble("Abilities.Fire.FireWheel.Speed");
|
this.speed = config.Speed;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.FireWheel.Cooldown");
|
this.cooldown = config.Cooldown;
|
||||||
this.fireTicks = getConfig().getDouble("Abilities.Fire.FireWheel.FireTicks");
|
this.fireTicks = config.FireTicks;
|
||||||
this.height = getConfig().getInt("Abilities.Fire.FireWheel.Height");
|
this.height = config.Height;
|
||||||
|
|
||||||
this.bPlayer.addCooldown(this);
|
this.bPlayer.addCooldown(this);
|
||||||
this.affectedEntities = new ArrayList<LivingEntity>();
|
this.affectedEntities = new ArrayList<LivingEntity>();
|
||||||
|
@ -73,11 +75,11 @@ public class FireWheel extends FireAbility implements ComboAbility {
|
||||||
|
|
||||||
if (this.bPlayer.isAvatarState()) {
|
if (this.bPlayer.isAvatarState()) {
|
||||||
this.cooldown = 0;
|
this.cooldown = 0;
|
||||||
this.damage = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.FireWheel.Damage");
|
this.damage = config.AvatarState_Damage;
|
||||||
this.range = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.FireWheel.Range");
|
this.range = config.AvatarState_Range;
|
||||||
this.speed = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.FireWheel.Speed");
|
this.speed = config.AvatarState_Speed;
|
||||||
this.fireTicks = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.FireWheel.FireTicks");
|
this.fireTicks = config.AvatarState_FireTicks;
|
||||||
this.height = getConfig().getInt("Abilities.Avatar.AvatarState.Fire.FireWheel.Height");
|
this.height = config.AvatarState_Height;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.radius = this.height - 1;
|
this.radius = this.height - 1;
|
||||||
|
@ -88,7 +90,7 @@ public class FireWheel extends FireAbility implements ComboAbility {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object createNewComboInstance(final Player player) {
|
public Object createNewComboInstance(final Player player) {
|
||||||
return new FireWheel(player);
|
return new FireWheel(ConfigManager.getConfig(FireWheelConfig.class), player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -11,11 +11,13 @@ import com.projectkorra.projectkorra.ability.ComboAbility;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.ability.util.ComboManager.AbilityInformation;
|
import com.projectkorra.projectkorra.ability.util.ComboManager.AbilityInformation;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.ConfigManager;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.JetBlastConfig;
|
||||||
import com.projectkorra.projectkorra.firebending.FireJet;
|
import com.projectkorra.projectkorra.firebending.FireJet;
|
||||||
import com.projectkorra.projectkorra.util.ClickType;
|
import com.projectkorra.projectkorra.util.ClickType;
|
||||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
|
|
||||||
public class JetBlast extends FireAbility implements ComboAbility {
|
public class JetBlast extends FireAbility<JetBlastConfig> implements ComboAbility {
|
||||||
|
|
||||||
private boolean firstTime;
|
private boolean firstTime;
|
||||||
private long time;
|
private long time;
|
||||||
|
@ -27,8 +29,8 @@ public class JetBlast extends FireAbility implements ComboAbility {
|
||||||
@Attribute(Attribute.DURATION)
|
@Attribute(Attribute.DURATION)
|
||||||
private long duration;
|
private long duration;
|
||||||
|
|
||||||
public JetBlast(final Player player) {
|
public JetBlast(final JetBlastConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
if (!this.bPlayer.canBendIgnoreBinds(this)) {
|
if (!this.bPlayer.canBendIgnoreBinds(this)) {
|
||||||
return;
|
return;
|
||||||
|
@ -38,9 +40,9 @@ public class JetBlast extends FireAbility implements ComboAbility {
|
||||||
this.time = System.currentTimeMillis();
|
this.time = System.currentTimeMillis();
|
||||||
this.tasks = new ArrayList<>();
|
this.tasks = new ArrayList<>();
|
||||||
|
|
||||||
this.speed = getConfig().getDouble("Abilities.Fire.JetBlast.Speed");
|
this.speed = config.Speed;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.JetBlast.Cooldown");
|
this.cooldown = config.Cooldown;
|
||||||
this.duration = getConfig().getLong("Abilities.Fire.JetBlast.Duration");
|
this.duration = config.Duration;
|
||||||
|
|
||||||
if (this.bPlayer.isAvatarState()) {
|
if (this.bPlayer.isAvatarState()) {
|
||||||
this.cooldown = 0;
|
this.cooldown = 0;
|
||||||
|
@ -51,7 +53,7 @@ public class JetBlast extends FireAbility implements ComboAbility {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object createNewComboInstance(final Player player) {
|
public Object createNewComboInstance(final Player player) {
|
||||||
return new JetBlast(player);
|
return new JetBlast(ConfigManager.getConfig(JetBlastConfig.class), player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -13,11 +13,13 @@ import com.projectkorra.projectkorra.ability.ComboAbility;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.ability.util.ComboManager.AbilityInformation;
|
import com.projectkorra.projectkorra.ability.util.ComboManager.AbilityInformation;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.ConfigManager;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.JetBlazeConfig;
|
||||||
import com.projectkorra.projectkorra.firebending.FireJet;
|
import com.projectkorra.projectkorra.firebending.FireJet;
|
||||||
import com.projectkorra.projectkorra.util.ClickType;
|
import com.projectkorra.projectkorra.util.ClickType;
|
||||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
|
|
||||||
public class JetBlaze extends FireAbility implements ComboAbility {
|
public class JetBlaze extends FireAbility<JetBlazeConfig> implements ComboAbility {
|
||||||
|
|
||||||
private boolean firstTime;
|
private boolean firstTime;
|
||||||
private int progressCounter;
|
private int progressCounter;
|
||||||
|
@ -36,8 +38,8 @@ public class JetBlaze extends FireAbility implements ComboAbility {
|
||||||
@Attribute(Attribute.DURATION)
|
@Attribute(Attribute.DURATION)
|
||||||
private long duration;
|
private long duration;
|
||||||
|
|
||||||
public JetBlaze(final Player player) {
|
public JetBlaze(final JetBlazeConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
if (!this.bPlayer.canBendIgnoreBinds(this)) {
|
if (!this.bPlayer.canBendIgnoreBinds(this)) {
|
||||||
return;
|
return;
|
||||||
|
@ -48,16 +50,16 @@ public class JetBlaze extends FireAbility implements ComboAbility {
|
||||||
this.affectedEntities = new ArrayList<>();
|
this.affectedEntities = new ArrayList<>();
|
||||||
this.tasks = new ArrayList<>();
|
this.tasks = new ArrayList<>();
|
||||||
|
|
||||||
this.damage = getConfig().getDouble("Abilities.Fire.JetBlaze.Damage");
|
this.damage = config.Damage;
|
||||||
this.duration = getConfig().getLong("Abilities.Fire.JetBlaze.Duration");
|
this.duration = config.Duration;
|
||||||
this.speed = getConfig().getDouble("Abilities.Fire.JetBlaze.Speed");
|
this.speed = config.Speed;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.JetBlaze.Cooldown");
|
this.cooldown = config.Cooldown;
|
||||||
this.fireTicks = getConfig().getDouble("Abilities.Fire.JetBlaze.FireTicks");
|
this.fireTicks = config.FireTicks;
|
||||||
|
|
||||||
if (this.bPlayer.isAvatarState()) {
|
if (this.bPlayer.isAvatarState()) {
|
||||||
this.cooldown = 0;
|
this.cooldown = 0;
|
||||||
this.damage = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.JetBlaze.Damage");
|
this.damage = config.AvatarState_Damage;
|
||||||
this.fireTicks = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.JetBlaze.FireTicks");
|
this.fireTicks = config.AvatarState_FireTicks;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.start();
|
this.start();
|
||||||
|
@ -65,7 +67,7 @@ public class JetBlaze extends FireAbility implements ComboAbility {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object createNewComboInstance(final Player player) {
|
public Object createNewComboInstance(final Player player) {
|
||||||
return new JetBlaze(player);
|
return new JetBlaze(ConfigManager.getConfig(JetBlazeConfig.class), player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -15,10 +15,11 @@ import com.projectkorra.projectkorra.ability.ElementalAbility;
|
||||||
import com.projectkorra.projectkorra.ability.util.Collision;
|
import com.projectkorra.projectkorra.ability.util.Collision;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.CombustionConfig;
|
||||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
|
|
||||||
public class Combustion extends CombustionAbility {
|
public class Combustion extends CombustionAbility<CombustionConfig> {
|
||||||
|
|
||||||
private static final int MAX_TICKS = 10000;
|
private static final int MAX_TICKS = 10000;
|
||||||
|
|
||||||
|
@ -41,21 +42,21 @@ public class Combustion extends CombustionAbility {
|
||||||
private Location origin;
|
private Location origin;
|
||||||
private Vector direction;
|
private Vector direction;
|
||||||
|
|
||||||
public Combustion(final Player player) {
|
public Combustion(final CombustionConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
if (hasAbility(player, Combustion.class) || !this.bPlayer.canBend(this)) {
|
if (hasAbility(player, Combustion.class) || !this.bPlayer.canBend(this)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ticks = 0;
|
this.ticks = 0;
|
||||||
this.breakBlocks = getConfig().getBoolean("Abilities.Fire.Combustion.BreakBlocks");
|
this.breakBlocks = config.BreakBlocks;
|
||||||
this.explosivePower = (float) getConfig().getDouble("Abilities.Fire.Combustion.ExplosivePower");
|
this.explosivePower = config.ExplosivePower;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.Combustion.Cooldown");
|
this.cooldown = config.Cooldown;
|
||||||
this.damage = getConfig().getDouble("Abilities.Fire.Combustion.Damage");
|
this.damage = config.Damage;
|
||||||
this.radius = getConfig().getDouble("Abilities.Fire.Combustion.Radius");
|
this.radius = config.Radius;
|
||||||
this.speed = getConfig().getDouble("Abilities.Fire.Combustion.Speed");
|
this.speed = config.Speed;
|
||||||
this.range = getConfig().getDouble("Abilities.Fire.Combustion.Range");
|
this.range = config.Range;
|
||||||
this.origin = player.getEyeLocation();
|
this.origin = player.getEyeLocation();
|
||||||
this.direction = player.getEyeLocation().getDirection().normalize();
|
this.direction = player.getEyeLocation().getDirection().normalize();
|
||||||
this.location = this.origin.clone();
|
this.location = this.origin.clone();
|
||||||
|
|
|
@ -16,10 +16,11 @@ import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import com.projectkorra.projectkorra.ProjectKorra;
|
import com.projectkorra.projectkorra.ProjectKorra;
|
||||||
import com.projectkorra.projectkorra.ability.LightningAbility;
|
import com.projectkorra.projectkorra.ability.LightningAbility;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.LightningConfig;
|
||||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||||
import com.projectkorra.projectkorra.util.MovementHandler;
|
import com.projectkorra.projectkorra.util.MovementHandler;
|
||||||
|
|
||||||
public class Lightning extends LightningAbility {
|
public class Lightning extends LightningAbility<LightningConfig> {
|
||||||
|
|
||||||
public static enum State {
|
public static enum State {
|
||||||
START, STRIKE, MAINBOLT
|
START, STRIKE, MAINBOLT
|
||||||
|
@ -39,7 +40,7 @@ public class Lightning extends LightningAbility {
|
||||||
@Attribute(Attribute.RANGE)
|
@Attribute(Attribute.RANGE)
|
||||||
private double range;
|
private double range;
|
||||||
@Attribute(Attribute.CHARGE_DURATION)
|
@Attribute(Attribute.CHARGE_DURATION)
|
||||||
private double chargeTime;
|
private long chargeTime;
|
||||||
@Attribute("SubArcChance")
|
@Attribute("SubArcChance")
|
||||||
private double subArcChance;
|
private double subArcChance;
|
||||||
@Attribute(Attribute.DAMAGE)
|
@Attribute(Attribute.DAMAGE)
|
||||||
|
@ -55,7 +56,7 @@ public class Lightning extends LightningAbility {
|
||||||
@Attribute("StunChance")
|
@Attribute("StunChance")
|
||||||
private double stunChance;
|
private double stunChance;
|
||||||
@Attribute("Stun" + Attribute.DURATION)
|
@Attribute("Stun" + Attribute.DURATION)
|
||||||
private double stunDuration;
|
private long stunDuration;
|
||||||
@Attribute("MaxArcAngle")
|
@Attribute("MaxArcAngle")
|
||||||
private double maxArcAngle;
|
private double maxArcAngle;
|
||||||
private double particleRotation;
|
private double particleRotation;
|
||||||
|
@ -70,8 +71,8 @@ public class Lightning extends LightningAbility {
|
||||||
private ArrayList<BukkitRunnable> tasks;
|
private ArrayList<BukkitRunnable> tasks;
|
||||||
private ArrayList<Location> locations;
|
private ArrayList<Location> locations;
|
||||||
|
|
||||||
public Lightning(final Player player) {
|
public Lightning(final LightningConfig config, final Player player) {
|
||||||
super(player);
|
super(config, player);
|
||||||
|
|
||||||
if (!this.bPlayer.canBend(this)) {
|
if (!this.bPlayer.canBend(this)) {
|
||||||
return;
|
return;
|
||||||
|
@ -92,22 +93,22 @@ public class Lightning extends LightningAbility {
|
||||||
this.tasks = new ArrayList<>();
|
this.tasks = new ArrayList<>();
|
||||||
this.locations = new ArrayList<>();
|
this.locations = new ArrayList<>();
|
||||||
|
|
||||||
this.selfHitWater = getConfig().getBoolean("Abilities.Fire.Lightning.SelfHitWater");
|
this.selfHitWater = config.SelfHitWater;
|
||||||
this.selfHitClose = getConfig().getBoolean("Abilities.Fire.Lightning.SelfHitClose");
|
this.selfHitClose = config.SelfHitClose;
|
||||||
this.arcOnIce = getConfig().getBoolean("Abilities.Fire.Lightning.ArcOnIce");
|
this.arcOnIce = config.ArcOnIce;
|
||||||
this.range = getConfig().getDouble("Abilities.Fire.Lightning.Range");
|
this.range = config.Range;
|
||||||
this.damage = getConfig().getDouble("Abilities.Fire.Lightning.Damage");
|
this.damage = config.Damage;
|
||||||
this.maxArcAngle = getConfig().getDouble("Abilities.Fire.Lightning.MaxArcAngle");
|
this.maxArcAngle = config.MaxArcAngle;
|
||||||
this.subArcChance = getConfig().getDouble("Abilities.Fire.Lightning.SubArcChance");
|
this.subArcChance = config.SubArcChance;
|
||||||
this.chainRange = getConfig().getDouble("Abilities.Fire.Lightning.ChainArcRange");
|
this.chainRange = config.ChainArcRange;
|
||||||
this.chainArcChance = getConfig().getDouble("Abilities.Fire.Lightning.ChainArcChance");
|
this.chainArcChance = config.ChainArcChance;
|
||||||
this.waterArcRange = getConfig().getDouble("Abilities.Fire.Lightning.WaterArcRange");
|
this.waterArcRange = config.WaterArcRange;
|
||||||
this.stunChance = getConfig().getDouble("Abilities.Fire.Lightning.StunChance");
|
this.stunChance = config.StunChance;
|
||||||
this.stunDuration = getConfig().getDouble("Abilities.Fire.Lightning.StunDuration");
|
this.stunDuration = config.StunDuration;
|
||||||
this.maxChainArcs = getConfig().getInt("Abilities.Fire.Lightning.MaxChainArcs");
|
this.maxChainArcs = config.MaxChainArcs;
|
||||||
this.waterArcs = getConfig().getInt("Abilities.Fire.Lightning.WaterArcs");
|
this.waterArcs = config.WaterArcs;
|
||||||
this.chargeTime = getConfig().getLong("Abilities.Fire.Lightning.ChargeTime");
|
this.chargeTime = config.ChargeTime;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Fire.Lightning.Cooldown");
|
this.cooldown = config.Cooldown;
|
||||||
|
|
||||||
this.range = this.getDayFactor(this.range);
|
this.range = this.getDayFactor(this.range);
|
||||||
this.subArcChance = this.getDayFactor(this.subArcChance);
|
this.subArcChance = this.getDayFactor(this.subArcChance);
|
||||||
|
@ -117,12 +118,12 @@ public class Lightning extends LightningAbility {
|
||||||
this.chainRange = this.getDayFactor(this.chainRange);
|
this.chainRange = this.getDayFactor(this.chainRange);
|
||||||
this.waterArcRange = this.getDayFactor(this.waterArcRange);
|
this.waterArcRange = this.getDayFactor(this.waterArcRange);
|
||||||
this.stunChance = this.getDayFactor(this.stunChance);
|
this.stunChance = this.getDayFactor(this.stunChance);
|
||||||
this.stunDuration = this.getDayFactor(this.stunDuration);
|
this.stunDuration = (long) this.getDayFactor(this.stunDuration);
|
||||||
|
|
||||||
if (this.bPlayer.isAvatarState()) {
|
if (this.bPlayer.isAvatarState()) {
|
||||||
this.chargeTime = getConfig().getLong("Abilities.Avatar.AvatarState.Fire.Lightning.ChargeTime");
|
this.chargeTime = config.AvatarState_ChargeTime;
|
||||||
this.cooldown = getConfig().getLong("Abilities.Avatar.AvatarState.Fire.Lightning.Cooldown");
|
this.cooldown = config.AvatarState_Cooldown;
|
||||||
this.damage = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.Lightning.Damage");
|
this.damage = config.AvatarState_Damage;
|
||||||
}
|
}
|
||||||
this.start();
|
this.start();
|
||||||
}
|
}
|
||||||
|
@ -139,7 +140,7 @@ public class Lightning extends LightningAbility {
|
||||||
|
|
||||||
if (Math.random() <= this.stunChance) {
|
if (Math.random() <= this.stunChance) {
|
||||||
final MovementHandler mh = new MovementHandler(lent, this);
|
final MovementHandler mh = new MovementHandler(lent, this);
|
||||||
mh.stopWithDuration((long) this.stunDuration, Element.LIGHTNING.getColor() + "* Electrocuted *");
|
mh.stopWithDuration(this.stunDuration, Element.LIGHTNING.getColor() + "* Electrocuted *");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -702,11 +703,11 @@ public class Lightning extends LightningAbility {
|
||||||
this.range = range;
|
this.range = range;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getChargeTime() {
|
public long getChargeTime() {
|
||||||
return this.chargeTime;
|
return this.chargeTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setChargeTime(final double chargeTime) {
|
public void setChargeTime(final long chargeTime) {
|
||||||
this.chargeTime = chargeTime;
|
this.chargeTime = chargeTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -766,11 +767,11 @@ public class Lightning extends LightningAbility {
|
||||||
this.stunChance = stunChance;
|
this.stunChance = stunChance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getStunDuration() {
|
public long getStunDuration() {
|
||||||
return this.stunDuration;
|
return this.stunDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStunDuration(final double stunDuration) {
|
public void setStunDuration(final long stunDuration) {
|
||||||
this.stunDuration = stunDuration;
|
this.stunDuration = stunDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,21 +5,24 @@ import org.bukkit.entity.Player;
|
||||||
import com.projectkorra.projectkorra.BendingPlayer;
|
import com.projectkorra.projectkorra.BendingPlayer;
|
||||||
import com.projectkorra.projectkorra.ability.CoreAbility;
|
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||||
import com.projectkorra.projectkorra.command.Commands;
|
import com.projectkorra.projectkorra.command.Commands;
|
||||||
import com.projectkorra.projectkorra.configuration.ConfigManager;
|
import com.projectkorra.projectkorra.configuration.better.ConfigManager;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.abilities.fire.IlluminationConfig;
|
||||||
|
import com.projectkorra.projectkorra.configuration.better.configs.properties.GeneralPropertiesConfig;
|
||||||
import com.projectkorra.projectkorra.earthbending.Tremorsense;
|
import com.projectkorra.projectkorra.earthbending.Tremorsense;
|
||||||
import com.projectkorra.projectkorra.firebending.Illumination;
|
import com.projectkorra.projectkorra.firebending.Illumination;
|
||||||
|
|
||||||
public class FirePassive {
|
public class FirePassive {
|
||||||
|
|
||||||
public static void handle(final Player player) {
|
public static void handle(final Player player) {
|
||||||
if (Commands.isToggledForAll && ConfigManager.defaultConfig.get().getBoolean("Properties.TogglePassivesWithAllBending")) {
|
if (Commands.isToggledForAll && ConfigManager.getConfig(GeneralPropertiesConfig.class).TogglePassivesWithAllBending) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
|
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
|
||||||
if (bPlayer != null && bPlayer.canBendPassive(CoreAbility.getAbility(Illumination.class)) && bPlayer.canUsePassive(CoreAbility.getAbility(Illumination.class))) {
|
if (bPlayer != null && bPlayer.canBendPassive(CoreAbility.getAbility(Illumination.class)) && bPlayer.canUsePassive(CoreAbility.getAbility(Illumination.class))) {
|
||||||
if (bPlayer != null && !CoreAbility.hasAbility(player, Illumination.class) && !CoreAbility.hasAbility(player, Tremorsense.class) && bPlayer.canBendIgnoreBinds(CoreAbility.getAbility("Illumination")) && ConfigManager.defaultConfig.get().getBoolean("Abilities.Fire.Illumination.Passive")) {
|
IlluminationConfig config = ConfigManager.getConfig(IlluminationConfig.class);
|
||||||
|
if (bPlayer != null && !CoreAbility.hasAbility(player, Illumination.class) && !CoreAbility.hasAbility(player, Tremorsense.class) && bPlayer.canBendIgnoreBinds(CoreAbility.getAbility("Illumination")) && config.Passive) {
|
||||||
if (bPlayer.isIlluminating()) {
|
if (bPlayer.isIlluminating()) {
|
||||||
new Illumination(player);
|
new Illumination(config, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue