Files
nethack/include
copperwater 2ee09b9210 Player can now displace peaceful monsters
Changes domove() code to allow displacing peaceful monsters.
Specifically, is_safepet() now returns true if the monster is peaceful.
Peacefuls are slightly pickier than pets about whether they consent to
being displaced: they will not displace if a goodpos() check fails for
the displaced space, or if there is a trap on the displaced space, or if
they are your quest leader. is_safepet should probably be renamed to
something else.

In the process of doing this, some other changes were made: the code now
checks whether the player and monster should be swapping places at all
first (previously it ran some code for displacing pets out of traps
first, which was a little weird if the displacement didn't actually
happen.)

In the original commit for this, I needed to guard the spoteffects()
call made in domove with a clause testing whether the player actually
moved; it was previously possible to fail to displace a monster and then
re-trigger a trap on the space you were still standing on. However, the
devteam has apparently put in an if (u.umoved) clause in the same place
and serving the same purpose.
2020-04-15 08:46:47 +03:00
..
2018-11-11 10:29:52 -05:00
2019-11-27 09:53:40 -08:00
2019-11-06 18:43:20 +02:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:15 +09:00
2020-02-26 00:24:37 -05:00
2015-10-17 13:15:46 +03:00
2019-04-19 12:42:35 -07:00
2020-01-29 09:56:43 -05:00
2020-02-12 14:35:37 -08:00
2018-04-25 15:00:13 -04:00
2020-04-13 14:58:12 -07:00
2015-05-25 09:21:31 +09:00
2019-05-12 14:51:26 -04:00
2020-03-15 11:57:34 +02:00
2018-04-25 15:00:13 -04:00
2020-01-29 10:29:37 -05:00
2018-12-15 19:31:42 -05:00
2015-05-25 09:21:15 +09:00
2020-03-04 10:41:57 -05:00
2019-03-06 11:37:52 -08:00
2019-01-28 10:02:08 +01:00
2018-04-25 16:54:50 -04:00
2015-05-25 09:21:15 +09:00
2018-04-25 15:00:13 -04:00
2018-04-25 15:00:13 -04:00
2015-10-17 13:15:46 +03:00
2019-05-11 11:10:00 +03:00
2018-04-25 16:54:50 -04:00
2019-11-27 01:27:11 -05:00
2018-04-25 15:00:13 -04:00
2019-06-18 21:50:51 -04:00
2015-05-25 09:21:31 +09:00
2020-04-06 06:12:25 -07:00
2020-03-27 17:47:07 -07:00
2020-04-05 12:44:25 +03:00
2019-01-13 17:19:39 -08:00
2015-05-25 09:21:31 +09:00
2020-02-13 21:24:24 -05:00
2020-01-26 02:58:18 -08:00
2020-01-12 22:02:36 -08:00
2020-04-11 10:14:05 -04:00
2019-11-02 22:53:46 -04:00
2018-10-21 08:45:55 -04:00
2019-10-08 13:26:39 -07:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:31 +09:00
2015-10-17 18:47:31 +03:00
2019-01-11 17:18:48 -08:00
2019-12-18 07:38:59 -05:00
2019-11-29 17:40:58 -05:00
2018-04-25 15:00:13 -04:00
2018-04-25 16:54:50 -04:00
2019-07-27 16:12:24 -07:00
2019-04-15 13:48:27 -07:00
2019-01-12 01:09:17 -05:00
2019-06-08 09:38:27 -04:00
2015-05-25 09:21:31 +09:00
2020-02-25 16:18:58 -08:00
2015-05-25 09:21:31 +09:00
2020-03-14 03:47:27 -07:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:31 +09:00