Browse Source

Small Icewall implementation improvement
- Now monsters will walk into an icewall from the south and west if they already started moving to that cell
* This will make it slightly easier to trap a monster in an icewall (this is official as can be seen in the videos I linked in the main commit)
* This only applies if the icewall_walk_block configuration setting was not set to 0 (disabled)

Playtester 10 years ago
parent
commit
753f4c5b31
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/map/unit.c

+ 3 - 1
src/map/unit.c

@@ -366,7 +366,9 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data
 	dx = dirx[(int)dir];
 	dy = diry[(int)dir];
 
-	if(map_getcell(bl->m,x+dx,y+dy,CELL_CHKNOPASS))
+	//Monsters will walk into an icewall from the west and south if they already started walking
+	if(map_getcell(bl->m,x+dx,y+dy,CELL_CHKNOPASS) 
+		&& (battle_config.icewall_walk_block == 0 || !map_getcell(bl->m,x+dx,y+dy,CELL_CHKICEWALL) || dx < 0 || dy < 0))
 		return unit_walktoxy_sub(bl);
 
 	//Monsters can only leave icewalls to the west and south