… | |
… | |
20 | * <http://www.gnu.org/licenses/>. |
20 | * <http://www.gnu.org/licenses/>. |
21 | * |
21 | * |
22 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | * The authors can be reached via e-mail to <support@deliantra.net> |
23 | */ |
23 | */ |
24 | |
24 | |
|
|
25 | //+GPL |
|
|
26 | |
25 | #include <global.h> |
27 | #include <global.h> |
26 | #include <sproto.h> |
28 | #include <sproto.h> |
27 | #include <spells.h> |
29 | #include <spells.h> |
28 | #include <skills.h> |
30 | #include <skills.h> |
29 | |
31 | |
… | |
… | |
508 | } /* If not scared */ |
510 | } /* If not scared */ |
509 | |
511 | |
510 | part = rv.part; |
512 | part = rv.part; |
511 | dir = rv.direction; |
513 | dir = rv.direction; |
512 | |
514 | |
|
|
515 | //-GPL |
|
|
516 | |
513 | // if the enemy is a player, we have los. if los says we |
517 | // if the enemy is a player, we have los. if los says we |
514 | // can directly reach the player, we do not deviate. |
518 | // can directly reach the player, we do not deviate. |
515 | // for non-players, we never deviate |
519 | // for non-players, we never deviate |
516 | if (op->stats.Wis >= 8 |
520 | if (op->stats.Wis >= 8 |
517 | && enemy->contr && enemy->contr->darkness_at (op->map, op->x, op->y) == LOS_BLOCKED) |
521 | && enemy->contr && enemy->contr->darkness_at (op->map, op->x, op->y) == LOS_BLOCKED) |
… | |
… | |
551 | //printf ("erasing smell %d\n", op->ms ().smell);//D |
555 | //printf ("erasing smell %d\n", op->ms ().smell);//D |
552 | unordered_mapwalk (op, -1, -1, 1, 1) |
556 | unordered_mapwalk (op, -1, -1, 1, 1) |
553 | m->at (nx, ny).smell = 0; |
557 | m->at (nx, ny).smell = 0; |
554 | } |
558 | } |
555 | } |
559 | } |
|
|
560 | |
|
|
561 | //+GPL |
556 | |
562 | |
557 | if (QUERY_FLAG (op, FLAG_SCARED) || QUERY_FLAG (op, FLAG_RUN_AWAY)) |
563 | if (QUERY_FLAG (op, FLAG_SCARED) || QUERY_FLAG (op, FLAG_RUN_AWAY)) |
558 | dir = absdir (dir + 4); |
564 | dir = absdir (dir + 4); |
559 | |
565 | |
560 | if (QUERY_FLAG (op, FLAG_CONFUSED)) |
566 | if (QUERY_FLAG (op, FLAG_CONFUSED)) |
… | |
… | |
1918 | return 0; |
1924 | return 0; |
1919 | |
1925 | |
1920 | return 1; |
1926 | return 1; |
1921 | } |
1927 | } |
1922 | |
1928 | |
|
|
1929 | //-GPL |