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

View file

@ -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:
if (!AvatarState.isAvatarState(player)) {
if (Methods.isDay(player.getWorld())) {
Methods.firebendingDayAugment(yield, player.getWorld());
} else {
yield *= 1.;
break;
case HARD:
yield *= 3. / 4.;
break;
}
} 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);
}