Fix Charged FireBlast difficulty issues

This commit is contained in:
MistPhizzle 2014-07-22 21:36:40 -04:00
parent ab9fa1b63c
commit 290696879d
2 changed files with 24 additions and 14 deletions

View file

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

View file

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