@@ -43,9 +43,12 @@ public class CombustBeam extends CombustionAbility implements AddonAbility {
4343 private double minPower ;
4444 @ Attribute ("MaxPower" )
4545 private double maxPower ;
46+ @ Attribute ("MaxDamage" )
47+ private double maxDamage ;
48+ @ Attribute ("MinDamage" )
49+ private double minDamage ;
4650
47- private double power , rotation , angleCheck ;
48- private double health ;
51+ private double power , rotation , angleCheck , damage , health ;
4952 private long chargeTime , revertTime ;
5053 private int counter ;
5154 private boolean charging , charged ;
@@ -69,6 +72,8 @@ public CombustBeam(Player player) {
6972 this .maxAngle = ProjectAddons .instance .getConfig ().getDouble ("Abilities.Fire.CombustBeam.Maximum.Angle" );
7073 this .minPower = ProjectAddons .instance .getConfig ().getDouble ("Abilities.Fire.CombustBeam.Minimum.Power" );
7174 this .maxPower = ProjectAddons .instance .getConfig ().getDouble ("Abilities.Fire.CombustBeam.Maximum.Power" );
75+ this .minDamage = ProjectAddons .instance .getConfig ().getDouble ("Abilities.Fire.CombustBeam.Minimum.Damage" );
76+ this .maxDamage = ProjectAddons .instance .getConfig ().getDouble ("Abilities.Fire.CombustBeam.Maximum.Damage" );
7277 this .range = ProjectAddons .instance .getConfig ().getDouble ("Abilities.Fire.CombustBeam.Range" );
7378 this .revertTime = ProjectAddons .instance .getConfig ().getLong ("Abilities.Fire.CombustBeam.RevertTime" );
7479 this .health = player .getHealth ();
@@ -115,6 +120,7 @@ public void progress() {
115120 this .chargeTime = maxChargeTime ;
116121 this .angleCheck = minAngle ;
117122 this .power = maxPower ;
123+ this .damage = maxDamage ;
118124 this .charged = true ;
119125 GeneralMethods .displayColoredParticle ("ff2424" , player .getEyeLocation ().add (player .getEyeLocation ().getDirection ().normalize ()), 1 , 0.4 , 0.4 , 0.4 );
120126 player .addPotionEffect (new PotionEffect (PotionEffectType .SLOW , 10 , 5 ));
@@ -127,6 +133,7 @@ public void progress() {
127133
128134 this .angleCheck = maxAngle - (maxAngle - minAngle ) * percent ;
129135 this .power = minPower + (maxPower - minPower ) * percent ;
136+ this .damage = minDamage + (maxDamage - minDamage ) * percent ;
130137 this .charged = true ;
131138
132139 ActionBar .sendActionBar (ChatColor .RED + (Math .round (percent * 100 ) + "%" ), player );
@@ -220,7 +227,7 @@ public void explode() {
220227 for (Entity e : GeneralMethods .getEntitiesAroundPoint (curr , power )) {
221228 if (e instanceof LivingEntity ) {
222229 double knockback = power / (0.3 + e .getLocation ().distance (curr ));
223- DamageHandler .damageEntity (e , power , this );
230+ DamageHandler .damageEntity (e , damage , this );
224231 e .setVelocity (GeneralMethods .getDirection (curr , e .getLocation ().add (0 , 1 , 0 )).normalize ().multiply (knockback ));
225232 }
226233 }
0 commit comments