blob: 06e029d9ac249d1b9fbf8717aed1889d5d80e292 [file] [log] [blame]
notstrom2c844922018-12-03 10:40:03 +01001/*
2 Eine andere Moeglichkeit, eine Waffe nur fuer einen NPC zur Verfuegung zu
3 stellen ist ein wenig frustrierender fuer Spieler. Man sollte Beispiele
4 wie dieses nicht ungeprueft uebernehmen. Waffen, die kein Spieler zuecken
5 kann, stossen meist nicht auf sehr hohen Enthusiasmus beim Spieler, die
6 betreffende Gegend mehrmals zu aufzusuchen.
7*/
8inherit "/std/weapon";
9
notstromb83480d2018-12-03 10:41:27 +010010#include <new_skills.h>
notstrom2c844922018-12-03 10:40:03 +010011#include __PATH__(1)"defs.h"
12
13
14protected void create() {
15 if (!clonep()) {
16 set_next_reset(-1);
17 return;
18 }
19 ::create();
20
21 SetProp(P_SHORT, "Eine besondere Axt");
22 SetProp(P_LONG, BSLF(
23 "Dies ist die Axt von Kawumm, dem Zwerg. Niemand kann so damit zuhauen "
24 "wie er."));
25
26 SetProp(P_NAME, "Axt");
27 SetProp(P_GENDER, FEMALE);
28 AddId(({"axt"}));
29
30 SetProp(P_WC, 180);
31 SetProp(P_WEAPON_TYPE, WT_AXE);
32 SetProp(P_DAM_TYPE, DT_SLASH);
33 SetProp(P_NR_HANDS, 1);
34
notstrom08627362018-12-03 22:41:58 +010035 /* "Restriktionen" bezieht sich hier konkret auf das Zuecken der Waffe.
36 In diesem Beispiel wird das anhand der Function wield_check()
37 ueberprueft, die sich in DIESEM Objekt befinden muss: */
notstrom2c844922018-12-03 10:40:03 +010038 SetProp(P_RESTRICTIONS, ([SR_FUN: "wield_check"]));
39
40 SetProp(P_VALUE, 200);
41 SetProp(P_WEIGHT, 3250);
42 SetProp(P_SIZE, 90);
43
44 SetProp(P_MATERIAL, ([MAT_STEEL:100]));
45}
46
notstrome4c98142018-12-03 13:42:57 +010047public string wield_check() {
notstrom958ddb62018-12-03 23:09:58 +010048 if (loadname(ENV()) != __PATH__(1)"npc/zwerg4")
notstrom2c844922018-12-03 10:40:03 +010049 return BSLF(
50 "Dies ist Kawumms persoenliche Axt. Sie ist so dermassen unhandlich, "
51 "dass Du sie nicht zuecken kannst.");
notstrom18985db2018-12-03 13:32:07 +010052 return 0;
notstrom2c844922018-12-03 10:40:03 +010053}