![]() |
#1 |
Prophet
Join Date: Apr 2008
Posts: 2,924
![]() |
Stupid monster behavior when facing damaging terrain
Let's say you're in a corridor with a monster than can breathe fire powerfully and another monster that doesn't resist fire but is powerful enough to tank one breath. The monster breathes fire and lays down a lava tile like this (marked as '*'):
Code:
#x# #.######### #..@...*M.D ########### Now let's look at the opposite case: Code:
#x# #.######### #..D..M*..@ ########### This is absurd. Once on the damaging tile, the first check that should be made is "can M move forward normally?" If so there's no reason to force the monster to flee, it should simply continue forward. EDIT: this doesn't happen in V, as "monster hates grid" and "monster is damaged by terrain" are both identical; to properly fix a potential problem, just replace code for monster_taking_terrain_damage() by Code:
bool monster_taking_terrain_damage(struct monster *mon) { return monster_hates_grid(cave, mon, mon->grid); }
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant! Last edited by PowerWyrm; September 10, 2020 at 10:57. |
![]() |
![]() |
![]() |
#2 |
Prophet
Join Date: Apr 2008
Posts: 2,924
![]() |
Another stupid case:
Code:
##### ..... M.#.@ ..... ##### Code:
##### ..... M.*.@ ..... ##### EDIT: in get_move_advance(), player is chosen as target if player is in LOS of the monster; a check should be made vs damaging terrain to use an alternate route if it's the case.
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant! Last edited by PowerWyrm; September 10, 2020 at 11:00. |
![]() |
![]() |
![]() |
#3 |
Swordsman
Join Date: Mar 2012
Posts: 422
![]() |
In the game I just finished I was surprised to see even some of the most powerful uniques afraid to step into a single square of lava in order to get to me.
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Terrain | Nick | Vanilla | 45 | November 13, 2016 21:54 |
Monster behavior | fizzix | Vanilla | 4 | October 16, 2015 19:16 |
Terrain | Nick | Vanilla | 14 | February 22, 2014 23:07 |
Adding terrain to V | Therem Harth | Development | 14 | March 22, 2013 21:15 |
3.1.0beta monster behavior and a few other things | tigen | Vanilla | 3 | January 17, 2009 07:30 |