|  |  |  | @ -41,9 +41,9 @@ import java.util.HashSet;@@ -41,9 +41,9 @@ import java.util.HashSet; | 
			
		
	
		
			
				
					|  |  |  |  | import static engine.math.FastMath.sqr; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | public class WpakPowerManager { | 
			
		
	
		
			
				
					|  |  |  |  |     public static HashMap<String, Effect> effect_data = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |  |     public static HashMap<Integer, PowerAction> power_actions = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |  |     public static HashMap<Integer, Power> powers = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |  |     public static HashMap<String, Effect> _effectsLookup = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |  |     public static HashMap<Integer, PowerAction> _powerActionLookup = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |  |     public static HashMap<Integer, Power> _powersLookup = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     private static JobScheduler js; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -98,7 +98,7 @@ public class WpakPowerManager {@@ -98,7 +98,7 @@ public class WpakPowerManager { | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         //lookup the power that was cast
 | 
			
		
	
		
			
				
					|  |  |  |  |         Power powerCast = powers.get(msg.getPowerUsedID()); | 
			
		
	
		
			
				
					|  |  |  |  |         Power powerCast = _powersLookup.get(msg.getPowerUsedID()); | 
			
		
	
		
			
				
					|  |  |  |  |         if (powerCast == null) { | 
			
		
	
		
			
				
					|  |  |  |  |             ChatManager.chatSayInfo(playerCharacter, "This power is not implemented yet."); | 
			
		
	
		
			
				
					|  |  |  |  |             return true; | 
			
		
	
	
		
			
				
					|  |  |  | @ -291,7 +291,7 @@ public class WpakPowerManager {@@ -291,7 +291,7 @@ public class WpakPowerManager { | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     public static void finishUsePower(PerformActionMsg msg, PlayerCharacter caster, AbstractWorldObject target) { | 
			
		
	
		
			
				
					|  |  |  |  |         Power powerUsed = powers.get(msg.getPowerUsedID()); | 
			
		
	
		
			
				
					|  |  |  |  |         Power powerUsed = _powersLookup.get(msg.getPowerUsedID()); | 
			
		
	
		
			
				
					|  |  |  |  |         if (powerUsed == null) | 
			
		
	
		
			
				
					|  |  |  |  |             return; | 
			
		
	
		
			
				
					|  |  |  |  |         if (powerUsed.maxMobTargets > 1 || powerUsed.maxPlayerTargets > 1) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -337,13 +337,17 @@ public class WpakPowerManager {@@ -337,13 +337,17 @@ public class WpakPowerManager { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         for (ActionEntry actionEntry : power.actionEntries) { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             Effect effect = effect_data.get(actionEntry.action_id); | 
			
		
	
		
			
				
					|  |  |  |  |             PowerAction powerAction = _powerActionLookup.get(actionEntry.action_id); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             if (effect == null) { | 
			
		
	
		
			
				
					|  |  |  |  |                 Logger.error("Null effect for " + actionEntry.action_id); | 
			
		
	
		
			
				
					|  |  |  |  |             if (powerAction == null) { | 
			
		
	
		
			
				
					|  |  |  |  |                 Logger.error("Null PowerAction for " + actionEntry.action_id); | 
			
		
	
		
			
				
					|  |  |  |  |                 continue; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             // Iterate effects for this powerAction and apply
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             for (Effect effect : powerAction.effects) { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 // Create pojo to hold effect/modifiers stored in AWO
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 AppliedEffect appliedEffect = new AppliedEffect(); | 
			
		
	
	
		
			
				
					|  |  |  | @ -364,7 +368,7 @@ public class WpakPowerManager {@@ -364,7 +368,7 @@ public class WpakPowerManager { | 
			
		
	
		
			
				
					|  |  |  |  |                 target._effects.put(effect, appliedEffect); | 
			
		
	
		
			
				
					|  |  |  |  |                 // target.updateBonuses()?
 | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     public static void sendPowerMsg(PlayerCharacter playerCharacter, int type, PerformActionMsg msg) { | 
			
		
	
	
		
			
				
					|  |  |  | 
 |