Don't move creatures when they're attacking
This may have resulted in a double-attack per turn
This commit is contained in:
		
							parent
							
								
									5c6ba40019
								
							
						
					
					
						commit
						262fc7fb41
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -36,7 +36,7 @@ stepGormlak pe@(Positioned pos creature) = do
 | 
			
		|||
      then do
 | 
			
		||||
        charPos <- use characterPosition
 | 
			
		||||
        if isUnit (pos `diffPositions` charPos)
 | 
			
		||||
          then attackCharacter $> charPos
 | 
			
		||||
          then attackCharacter $> pos
 | 
			
		||||
          else pure $ pos `stepTowards` charPos
 | 
			
		||||
    else do
 | 
			
		||||
      lines <- uses entities $ linesOfSight pos (Creature.visionRadius creature)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue