mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Fix Charged FireBlast difficulty issues
This commit is contained in:
parent
ab9fa1b63c
commit
290696879d
2 changed files with 24 additions and 14 deletions
|
@ -33,7 +33,7 @@ public class AvatarState {
|
||||||
private static int fireResistancePower = config.getInt("Abilities.AvatarState.PotionEffects.FireResistance.Power") - 1;
|
private static int fireResistancePower = config.getInt("Abilities.AvatarState.PotionEffects.FireResistance.Power") - 1;
|
||||||
private static long duration = config.getLong("Abilities.AvatarState.Duration");
|
private static long duration = config.getLong("Abilities.AvatarState.Duration");
|
||||||
|
|
||||||
private static final double factor = config.getDouble("Abilities.AvatarState.PowerMultiplier");
|
public static final double factor = config.getDouble("Abilities.AvatarState.PowerMultiplier");
|
||||||
|
|
||||||
Player player;
|
Player player;
|
||||||
|
|
||||||
|
|
|
@ -201,20 +201,30 @@ public class Fireball {
|
||||||
explosion = player.getWorld().spawn(location, TNTPrimed.class);
|
explosion = player.getWorld().spawn(location, TNTPrimed.class);
|
||||||
explosion.setFuseTicks(0);
|
explosion.setFuseTicks(0);
|
||||||
float yield = 1;
|
float yield = 1;
|
||||||
switch (player.getWorld().getDifficulty()) {
|
if (!AvatarState.isAvatarState(player)) {
|
||||||
case PEACEFUL:
|
if (Methods.isDay(player.getWorld())) {
|
||||||
yield *= 2.;
|
Methods.firebendingDayAugment(yield, player.getWorld());
|
||||||
break;
|
} else {
|
||||||
case EASY:
|
yield *= 1.;
|
||||||
yield *= 2.;
|
}
|
||||||
break;
|
} else {
|
||||||
case NORMAL:
|
yield *= AvatarState.factor;
|
||||||
yield *= 1.;
|
// yield = AvatarState.getValue(yield);
|
||||||
break;
|
|
||||||
case HARD:
|
|
||||||
yield *= 3. / 4.;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
// switch (player.getWorld().getDifficulty()) {
|
||||||
|
// case PEACEFUL:
|
||||||
|
// yield *= 2.;
|
||||||
|
// break;
|
||||||
|
// case EASY:
|
||||||
|
// yield *= 2.;
|
||||||
|
// break;
|
||||||
|
// case NORMAL:
|
||||||
|
// yield *= 1.;
|
||||||
|
// break;
|
||||||
|
// case HARD:
|
||||||
|
// yield *= 3. / 4.;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
explosion.setYield(yield);
|
explosion.setYield(yield);
|
||||||
explosions.put(explosion, this);
|
explosions.put(explosion, this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue