From 290696879dec62c43587980f505149bb41e18691 Mon Sep 17 00:00:00 2001 From: MistPhizzle Date: Tue, 22 Jul 2014 21:36:40 -0400 Subject: [PATCH] Fix Charged FireBlast difficulty issues --- .../ProjectKorra/Ability/AvatarState.java | 2 +- .../ProjectKorra/firebending/Fireball.java | 36 ++++++++++++------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/com/projectkorra/ProjectKorra/Ability/AvatarState.java b/src/com/projectkorra/ProjectKorra/Ability/AvatarState.java index a9b645f7..1bb7f505 100644 --- a/src/com/projectkorra/ProjectKorra/Ability/AvatarState.java +++ b/src/com/projectkorra/ProjectKorra/Ability/AvatarState.java @@ -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; diff --git a/src/com/projectkorra/ProjectKorra/firebending/Fireball.java b/src/com/projectkorra/ProjectKorra/firebending/Fireball.java index 79ef9ad4..2c1c91f7 100644 --- a/src/com/projectkorra/ProjectKorra/firebending/Fireball.java +++ b/src/com/projectkorra/ProjectKorra/firebending/Fireball.java @@ -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); }