| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -28,7 +28,6 @@ import engine.net.client.ClientConnection; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.net.client.msg.*; | 
					 | 
					 | 
					 | 
					import engine.net.client.msg.*; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.objects.*; | 
					 | 
					 | 
					 | 
					import engine.objects.*; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.powers.*; | 
					 | 
					 | 
					 | 
					import engine.powers.*; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.powers.effectmodifiers.AbstractEffectModifier; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.powers.poweractions.AbstractPowerAction; | 
					 | 
					 | 
					 | 
					import engine.powers.poweractions.AbstractPowerAction; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.powers.poweractions.TrackPowerAction; | 
					 | 
					 | 
					 | 
					import engine.powers.poweractions.TrackPowerAction; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.server.MBServerStatics; | 
					 | 
					 | 
					 | 
					import engine.server.MBServerStatics; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -170,25 +169,6 @@ public enum PowersManager { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if(pc == null) | 
					 | 
					 | 
					 | 
					        if(pc == null) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return; | 
					 | 
					 | 
					 | 
					            return; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if(pc.isBoxed){ | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            AbstractWorldObject tar = getTarget(msg); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if(tar != null && tar.getObjectType().equals(GameObjectType.PlayerCharacter) && !tar.equals(pc)) { | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                RecyclePowerMsg rpm = new RecyclePowerMsg(msg.getPowerUsedID()); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), rpm); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                // Send Fail to cast message
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                sendPowerMsg(pc, 2, msg); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (pc.isCasting()) { | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    pc.update(false); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                } | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                pc.setIsCasting(false); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                ChatManager.chatSystemInfo(pc, " You Are PvE Flagged: Cannot Attack Players."); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if(!pc.isFlying() && powersBaseByToken.get(msg.getPowerUsedID()) != null && powersBaseByToken.get(msg.getPowerUsedID()).isSpell) //cant be sitting if flying
 | 
					 | 
					 | 
					 | 
					        if(!pc.isFlying() && powersBaseByToken.get(msg.getPowerUsedID()) != null && powersBaseByToken.get(msg.getPowerUsedID()).isSpell) //cant be sitting if flying
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            CombatManager.toggleSit(false,origin); | 
					 | 
					 | 
					 | 
					            CombatManager.toggleSit(false,origin); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -1125,7 +1105,7 @@ public enum PowersManager { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    continue; | 
					 | 
					 | 
					 | 
					                    continue; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                // If something blocks the action, then stop
 | 
					 | 
					 | 
					 | 
					                // If something blocks the action, then stop
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (ab.blocked(target, pb, trains)) { | 
					 | 
					 | 
					 | 
					                if (ab.blocked(target, pb, trains, null)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    PowersManager.sendEffectMsg(playerCharacter, 5, ab, pb); | 
					 | 
					 | 
					 | 
					                    PowersManager.sendEffectMsg(playerCharacter, 5, ab, pb); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    continue; | 
					 | 
					 | 
					 | 
					                    continue; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -1312,7 +1292,7 @@ public enum PowersManager { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    continue; | 
					 | 
					 | 
					 | 
					                    continue; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                // If something blocks the action, then stop
 | 
					 | 
					 | 
					 | 
					                // If something blocks the action, then stop
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (ab.blocked(target, pb, trains)) | 
					 | 
					 | 
					 | 
					                if (ab.blocked(target, pb, trains, null)) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    continue; | 
					 | 
					 | 
					 | 
					                    continue; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                // TODO handle overwrite stack order here
 | 
					 | 
					 | 
					 | 
					                // TODO handle overwrite stack order here
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                String stackType = ab.getStackType(); | 
					 | 
					 | 
					 | 
					                String stackType = ab.getStackType(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -1947,7 +1927,7 @@ public enum PowersManager { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (trains < ab.getMinTrains() || trains > ab.getMaxTrains()) | 
					 | 
					 | 
					 | 
					            if (trains < ab.getMinTrains() || trains > ab.getMaxTrains()) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                continue; | 
					 | 
					 | 
					 | 
					                continue; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            // If something blocks the action, then stop
 | 
					 | 
					 | 
					 | 
					            // If something blocks the action, then stop
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (ab.blocked(target, pb, trains)) | 
					 | 
					 | 
					 | 
					            if (ab.blocked(target, pb, trains, null)) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                // sendPowerMsg(pc, 5, msg);
 | 
					 | 
					 | 
					 | 
					                // sendPowerMsg(pc, 5, msg);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                continue; | 
					 | 
					 | 
					 | 
					                continue; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            // TODO handle overwrite stack order here
 | 
					 | 
					 | 
					 | 
					            // TODO handle overwrite stack order here
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |