| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -11,13 +11,11 @@ package engine.powers; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.gameManager.DbManager; | 
					 | 
					 | 
					 | 
					import engine.gameManager.DbManager; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.gameManager.PowersManager; | 
					 | 
					 | 
					 | 
					import engine.gameManager.PowersManager; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					import engine.mbEnums; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.mbEnums.ModType; | 
					 | 
					 | 
					 | 
					import engine.mbEnums.ModType; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.mbEnums.SourceType; | 
					 | 
					 | 
					 | 
					import engine.mbEnums.SourceType; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.mbEnums.StackType; | 
					 | 
					 | 
					 | 
					import engine.mbEnums.StackType; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.objects.AbstractCharacter; | 
					 | 
					 | 
					 | 
					import engine.objects.*; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.objects.AbstractWorldObject; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.objects.PlayerBonuses; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.objects.Runegate; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import engine.powers.poweractions.AbstractPowerAction; | 
					 | 
					 | 
					 | 
					import engine.powers.poweractions.AbstractPowerAction; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import org.pmw.tinylog.Logger; | 
					 | 
					 | 
					 | 
					import org.pmw.tinylog.Logger; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -244,32 +242,20 @@ public class ActionsBase { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    //Add blocked types here
 | 
					 | 
					 | 
					 | 
					    //Add blocked types here
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public boolean blocked(AbstractWorldObject awo, PowersBase pb, int trains) { | 
					 | 
					 | 
					 | 
					    public boolean blocked(AbstractWorldObject awo) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (AbstractWorldObject.IsAbstractCharacter(awo)) { | 
					 | 
					 | 
					 | 
					        //Check for immunities
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            AbstractCharacter ac = (AbstractCharacter) awo; | 
					 | 
					 | 
					 | 
					        if (AbstractCharacter.IsAbstractCharacter(awo)){//awo.getObjectType() == mbEnums.GameObjectType.PlayerCharacter) {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            PlayerBonuses bonus = ac.getBonuses(); | 
					 | 
					 | 
					 | 
					            AbstractCharacter pcTarget = (AbstractCharacter) awo; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (bonus == null) | 
					 | 
					 | 
					 | 
					            PlayerBonuses tarBonus = pcTarget.getBonuses(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return false; | 
					 | 
					 | 
					 | 
					            SourceType source = SourceType.GetSourceType(this.stackType); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					            boolean immune = tarBonus.getBool(ModType.ImmuneTo, source); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //TODO make this more efficient then testing strings
 | 
					 | 
					 | 
					 | 
					            if(!immune){ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (this.stackType.equals("Stun") && bonus.getBool(ModType.ImmuneTo, SourceType.STUN)) | 
					 | 
					 | 
					 | 
					                mbEnums.DamageType damageType = mbEnums.DamageType.getDamageType(this.stackType); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return true; //Currently stun immune. Skip stun
 | 
					 | 
					 | 
					 | 
					                immune = pcTarget.getResists().immuneTo(damageType); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            else if (this.stackType.equals("Snare") && bonus.getBool(ModType.ImmuneTo, SourceType.Snare)) | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return true; //Currently snare immune. Skip snare
 | 
					 | 
					 | 
					 | 
					            if(immune){ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            else if (this.stackType.equals("Blindness") && bonus.getBool(ModType.ImmuneTo, SourceType.Blind)) | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return true; //Currently blind immune. Skip blind
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            else if (this.stackType.equals("PowerInhibitor") && bonus.getBool(ModType.ImmuneTo, SourceType.Powerblock)) | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return true; //Currently power block immune. Skip power block
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            else if (this.stackType.equals("Root") && bonus.getBool(ModType.ImmuneTo, SourceType.Root)) | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return true; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                //			else if (pb.isHeal() && (bonus.getByte("immuneTo.Heal")) >= trains)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                //				return true; //Currently shadowmantled. Skip heals
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            else if (this.stackType.equals("Flight") && bonus.getBool(ModType.NoMod, SourceType.Fly)) | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return true; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            else if (this.stackType.equals("Track") && bonus.getBool(ModType.CannotTrack, SourceType.None)) | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return true; | 
					 | 
					 | 
					 | 
					                return true; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            else | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return pb.vampDrain() && bonus.getBool(ModType.BlockedPowerType, SourceType.VAMPDRAIN); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return false; | 
					 | 
					 | 
					 | 
					        return false; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |