… | |
… | |
183 | |
183 | |
184 | /* Find all other teleporters within range. This range |
184 | /* Find all other teleporters within range. This range |
185 | * should really be setable by some object attribute instead of |
185 | * should really be setable by some object attribute instead of |
186 | * using hard coded values. |
186 | * using hard coded values. |
187 | */ |
187 | */ |
188 | unordered_mapwalk (teleporter, -5, -5, 5, 5) |
188 | unordered_mapwalk (mapwalk_buf, teleporter, -5, -5, 5, 5) |
189 | { |
189 | { |
190 | mapspace &ms = m->at (nx, ny); |
190 | mapspace &ms = m->at (nx, ny); |
191 | |
191 | |
192 | for (object *tmp = ms.top; tmp; tmp = tmp->below) |
192 | for (object *tmp = ms.top; tmp; tmp = tmp->below) |
193 | if (tmp->type == tele_type) |
193 | if (tmp->type == tele_type) |
… | |
… | |
417 | CLEAR_FLAG (who, FLAG_UNAGGRESSIVE); /* the sucker don't like you anymore */ |
417 | CLEAR_FLAG (who, FLAG_UNAGGRESSIVE); /* the sucker don't like you anymore */ |
418 | who->enemy = pusher; |
418 | who->enemy = pusher; |
419 | return 1; |
419 | return 1; |
420 | } |
420 | } |
421 | else |
421 | else |
422 | new_draw_info_format (NDI_UNIQUE, 0, pusher, "You avoid attacking %s.", &who->name); |
422 | new_draw_info_format (NDI_UNIQUE, 0, pusher, "You avoid attacking %s. H<You have to run if you wish to attack unnagressive NPCs.>", &who->name); |
423 | } |
423 | } |
424 | |
424 | |
425 | /* now, lets test stand still. we NEVER can push stand_still monsters. */ |
425 | /* now, let's test stand still. we NEVER can push stand_still monsters. */ |
426 | if (QUERY_FLAG (who, FLAG_STAND_STILL)) |
426 | if (QUERY_FLAG (who, FLAG_STAND_STILL)) |
427 | { |
427 | { |
428 | new_draw_info_format (NDI_UNIQUE, 0, pusher, "You can't push %s.", &who->name); |
428 | new_draw_info_format (NDI_UNIQUE, 0, pusher, "You can't push %s. H<You simply can't.>", &who->name); |
429 | return 0; |
429 | return 0; |
430 | } |
430 | } |
431 | |
431 | |
432 | /* This block is basically if you are pushing friendly but |
432 | /* This block is basically if you are pushing friendly but |
433 | * non pet creaturs. |
433 | * non pet creaturs. |
… | |
… | |
450 | |
450 | |
451 | /* If we get here, the push succeeded. |
451 | /* If we get here, the push succeeded. |
452 | * Let everyone know the status. |
452 | * Let everyone know the status. |
453 | */ |
453 | */ |
454 | if (who->type == PLAYER) |
454 | if (who->type == PLAYER) |
455 | { |
|
|
456 | new_draw_info_format (NDI_UNIQUE, 0, who, "%s pushed you.", &pusher->name); |
455 | new_draw_info_format (NDI_UNIQUE, 0, who, "%s pushed you.", &pusher->name); |
457 | } |
456 | |
458 | if (pusher->type == PLAYER) |
457 | if (pusher->type == PLAYER) |
459 | { |
|
|
460 | new_draw_info_format (NDI_UNIQUE, 0, pusher, "You pushed %s back.", &who->name); |
458 | new_draw_info_format (NDI_UNIQUE, 0, pusher, "You pushed %s back.", &who->name); |
461 | } |
|
|
462 | |
459 | |
463 | return 1; |
460 | return 1; |
464 | } |
461 | } |