Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 1 | P_REAL_RACE |
| 2 | =========== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 6 | |
| 7 | P_REAL_RACE "real_race" |
| 8 | |
| 9 | DEFINIERT IN |
| 10 | ------------ |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 11 | |
| 12 | /sys/living/description.h |
| 13 | |
| 14 | BESCHREIBUNG |
| 15 | ------------ |
Zesstra | 3d5121f | 2018-10-15 20:06:40 +0200 | [diff] [blame^] | 16 | |
| 17 | Diese Property enthaelt die Rasse des Livings. Sie darf nicht durch |
| 18 | Shadows ueberschrieben werden. |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 19 | |
| 20 | Wirklich interessant ist sie, wenn ein Spieler sich tarnt. Dort kann |
| 21 | man mit dieser Property trotz Tarnung feststellen, welche Rasse der |
| 22 | Spieler hat. |
| 23 | |
| 24 | Bei NPC enthaelt sie den gleichen Wert wie P_RACE. Wenn P_REAL_RACE |
| 25 | allerdings gesetzt wird, kann man damit einen getarnten NPC simu- |
| 26 | lieren, da dann P_RACE und P_REAL_RACE voneinander abweichen. |
| 27 | |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 28 | |
| 29 | BEISPIEL |
| 30 | -------- |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 31 | |
Zesstra | 3d5121f | 2018-10-15 20:06:40 +0200 | [diff] [blame^] | 32 | .. code-block:: pike |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 33 | |
Zesstra | 3d5121f | 2018-10-15 20:06:40 +0200 | [diff] [blame^] | 34 | // Ein Zwerg mag Zwergenbrot, fuer Elfen ist es giftig. Selbst wenn der |
| 35 | // Elf sich als Zwerg tarnt, wird ihm durch lembas sicher uebel werden: |
| 36 | int futter(string arg) { |
| 37 | notify_fail("Was willst Du essen?\n"); |
| 38 | if(!arg || !id(arg)) return 0; |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 39 | |
Zesstra | 3d5121f | 2018-10-15 20:06:40 +0200 | [diff] [blame^] | 40 | notify_fail("Du kannst nichts mehr essen.\n"); |
| 41 | if(!this_player()->eat_food(55)) return 0; |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 42 | |
Zesstra | 3d5121f | 2018-10-15 20:06:40 +0200 | [diff] [blame^] | 43 | write("Du isst ein Stueck Zwegenbrot. Du versuchst es zumindest!\n"); |
| 44 | say(sprintf("%s beisst in ein Stueck Zwergenbrot. Zahnschmerz!!!\n", |
| 45 | this_player()->Name())); |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 46 | |
Zesstra | 3d5121f | 2018-10-15 20:06:40 +0200 | [diff] [blame^] | 47 | switch( this_player()->QueryProp(P_REAL_RACE) ) |
| 48 | { |
| 49 | case "Zwerg": |
| 50 | if ((this_player()->QueryProp(P_RACE))!="Zwerg") |
| 51 | write("Zur Tarnung spuckst Du etwas von dem Brot aus!\n"); |
| 52 | this_player()->buffer_hp(100,10); |
| 53 | this_player()->buffer_sp(100,10); |
| 54 | break; |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 55 | |
Zesstra | 3d5121f | 2018-10-15 20:06:40 +0200 | [diff] [blame^] | 56 | case "Elf": |
| 57 | write("Das Zwergenbrot brennt wie Feuer auf Deiner Zunge!"); |
| 58 | // Getarnt? |
| 59 | if ((this_player()->QueryProp(P_RACE))!="Elf") |
| 60 | write(" Deine Tarnung nutzt Dir da wenig.\n" |
| 61 | else |
| 62 | write("\n"); |
| 63 | this_player()->restore_spell_points(-100); |
| 64 | this_player()->do_damage(100,this_object()); |
| 65 | break; |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 66 | |
Zesstra | 3d5121f | 2018-10-15 20:06:40 +0200 | [diff] [blame^] | 67 | default: |
| 68 | write("Du bekommst nur wenig davon herunter..\n"); |
| 69 | this_player()->buffer_hp(10,1); |
| 70 | this_player()->buffer_sp(10,2); |
| 71 | break; |
| 72 | } |
| 73 | remove(); |
| 74 | return 1; |
| 75 | } |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 76 | |
| 77 | |
| 78 | |
| 79 | SIEHE AUCH |
| 80 | ---------- |
Zesstra | 3d5121f | 2018-10-15 20:06:40 +0200 | [diff] [blame^] | 81 | |
| 82 | :doc:`P_RACE` |
| 83 | /std/living/description.c, /sys/living/description.h, |
Zesstra | 1862697 | 2017-01-31 10:38:27 +0100 | [diff] [blame] | 84 | |
| 85 | |
Zesstra | 3d5121f | 2018-10-15 20:06:40 +0200 | [diff] [blame^] | 86 | Last modified: 15.10.2018 Zesstra |