Neues Beispiel.
Change-Id: I3f40097a2848cddb995b7af47b8ebc68e1832463
diff --git a/README b/README
index 9f4cdba..497d366 100644
--- a/README
+++ b/README
@@ -60,6 +60,9 @@
9. Ein Raum mit einem NPC, der eine persoenliche Waffe und einen
Spezialangriff nutzt.
room/huette9.c, npc/zwerg5.c
+10. Ein Raum mit einem NPC, dessen Waffe auf eine andere Weise "persoenlich",
+ naemlich in diesem Fall nur fuer ihn zu zuecken, ist.
+ room/huette10.c, npc/zwerg6.c
B. Unser erster eigener NPC
@@ -73,8 +76,10 @@
npc/zwerg3.c
4. Ein Zwerg mit eigenem Defend().
npc/zwerg4.c
-5. Ein Zwerg mit eigenem Attack().
+5. Ein Zwerg mit eigenem Attack() und einer speziellen Waffe.
npc/zwerg5.c
+5. Ein Zwerg mit einer speziellen Waffe.
+ npc/zwerg6.c
C. Unsere ersten eigenen Gegenstaende
@@ -88,4 +93,7 @@
obj/krempel.c
4. Eine Waffe, die ihren Besitzer mehr Schaden macht. Ausserdem ein Beispiel
fuer eine Prop, die per Inline-Closure gesetzt wird.
+ obj/axt2.c
+5. Eine Waffe, die nur fuer einen NPC zu zuecken ist, nicht fuer Spieler.
+ obj/axt3.c
diff --git a/npc/zwerg6.c b/npc/zwerg6.c
new file mode 100644
index 0000000..38faad5
--- /dev/null
+++ b/npc/zwerg6.c
@@ -0,0 +1,33 @@
+inherit "/std/npc";
+
+#include <new_skills.h>
+#include __PATH__(1)"defs.h"
+
+
+private int ausholen;
+
+protected void create() {
+ if (!clonep()) {
+ set_next_reset(-1);
+ return;
+ }
+ ::create();
+
+ create_default_npc(20, 600);
+
+ SetProp(P_SHORT, "Ein angriffslustiger Zwerg");
+ SetProp(P_LONG, BSLF(
+ "Diesmal ist Kawumms Axt noch spezieller. Da seine Haende und auch die "
+ "Axt komisch geformt sind, kann nur er sie zuecken."));
+ SetProp(P_NAME, "Kawumm");
+ SetProp(P_ARTICLE, 0);
+ SetProp(P_GENDER, MALE);
+
+ AddId(({"zwerg", "kawumm"}));
+ SetProp(P_ALIGN, 100);
+ SetProp(P_RACE, "Zwerg");
+ SetProp(P_SIZE, 102);
+
+ AddItem(__PATH__(1)"obj/axt3", REFRESH_NONE|CLONE_WIELD);
+}
+
diff --git a/obj/axt3.c b/obj/axt3.c
new file mode 100644
index 0000000..bd06baf
--- /dev/null
+++ b/obj/axt3.c
@@ -0,0 +1,49 @@
+/*
+ Eine andere Moeglichkeit, eine Waffe nur fuer einen NPC zur Verfuegung zu
+ stellen ist ein wenig frustrierender fuer Spieler. Man sollte Beispiele
+ wie dieses nicht ungeprueft uebernehmen. Waffen, die kein Spieler zuecken
+ kann, stossen meist nicht auf sehr hohen Enthusiasmus beim Spieler, die
+ betreffende Gegend mehrmals zu aufzusuchen.
+*/
+inherit "/std/weapon";
+
+#include __PATH__(1)"defs.h"
+
+
+protected void create() {
+ if (!clonep()) {
+ set_next_reset(-1);
+ return;
+ }
+ ::create();
+
+ SetProp(P_SHORT, "Eine besondere Axt");
+ SetProp(P_LONG, BSLF(
+ "Dies ist die Axt von Kawumm, dem Zwerg. Niemand kann so damit zuhauen "
+ "wie er."));
+
+ SetProp(P_NAME, "Axt");
+ SetProp(P_GENDER, FEMALE);
+ AddId(({"axt"}));
+
+ SetProp(P_WC, 180);
+ SetProp(P_WEAPON_TYPE, WT_AXE);
+ SetProp(P_DAM_TYPE, DT_SLASH);
+ SetProp(P_NR_HANDS, 1);
+
+ SetProp(P_RESTRICTIONS, ([SR_FUN: "wield_check"]));
+
+ SetProp(P_VALUE, 200);
+ SetProp(P_WEIGHT, 3250);
+ SetProp(P_SIZE, 90);
+
+ SetProp(P_MATERIAL, ([MAT_STEEL:100]));
+}
+
+public mixed wield_check() {
+ if (interactive(ENV())
+ return BSLF(
+ "Dies ist Kawumms persoenliche Axt. Sie ist so dermassen unhandlich, "
+ "dass Du sie nicht zuecken kannst.");
+ return 1;
+}
diff --git a/room/huette10.c b/room/huette10.c
new file mode 100644
index 0000000..ee45541
--- /dev/null
+++ b/room/huette10.c
@@ -0,0 +1,18 @@
+inherit "/std/room";
+
+#include __PATH__(1)"defs.h"
+
+
+protected void create() {
+ ::create();
+
+ SetProp(P_INT_SHORT, "Eine schummrige Huette");
+ SetProp(P_INT_LONG, BSLF(
+ "Und wieder ist der Raum nicht sonderlich interessant."));
+
+ SetProp(P_LIGHT, 1);
+ SetProp(P_INDOORS, 1);
+ SetProp(P_LIGHT_TYPE, LT_GLOWING);
+
+ AddItem(__PATH__(1)"npc/zwerg6", REFRESH_DESTRUCT);
+}