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 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;
|
||||
|
||||
|
|
|
@ -201,20 +201,30 @@ public class Fireball {
|
|||
explosion = player.getWorld().spawn(location, TNTPrimed.class);
|
||||
explosion.setFuseTicks(0);
|
||||
float yield = 1;
|
||||
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;
|
||||
if (!AvatarState.isAvatarState(player)) {
|
||||
if (Methods.isDay(player.getWorld())) {
|
||||
Methods.firebendingDayAugment(yield, player.getWorld());
|
||||
} else {
|
||||
yield *= 1.;
|
||||
}
|
||||
} else {
|
||||
yield *= AvatarState.factor;
|
||||
// yield = AvatarState.getValue(yield);
|
||||
}
|
||||
// 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);
|
||||
explosions.put(explosion, this);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue