blob: 4f69f8766aad6c9e0aecc7e197dd56309c7d2925 [file] [log] [blame]
notstrom2b580792018-12-03 10:12:20 +01001inherit "/std/npc";
2
3#include <new_skills.h>
4#include __PATH__(1)"defs.h"
5
6
7private int ausholen;
8
9protected void create() {
10 if (!clonep()) {
11 set_next_reset(-1);
12 return;
13 }
14 ::create();
15
16 create_default_npc(20, 600);
17
18 SetProp(P_SHORT, "Ein angriffslustiger Zwerg");
19 SetProp(P_LONG, BSLF(
20 "Diesmal hat Kawumm eine spezielle Axt, und er greift ab und zu staerker "
21 "an."));
22 SetProp(P_NAME, "Kawumm");
23 SetProp(P_ARTICLE, 0);
24 SetProp(P_GENDER, MALE);
25
26 AddId(({"zwerg", "kawumm"}));
27 SetProp(P_ALIGN, 100);
28 SetProp(P_RACE, "Zwerg");
29 SetProp(P_SIZE, 102);
30
31 SetProp(P_MURDER_MSG,
32 "He! Ich gehoere doch zu Notstroms Magiertutorial, %s.");
33 /* Wir setzen hier auch mal eine Kill-Message, dieser Zwerg koennte ja
34 sogar mal wen erwischen: */
35 SetProp(P_KILL_MSG,
36 "Kommt davon, wenn man sich an einem Magiertutorial vergreift, %s!");
37 SetProp(P_DIE_MSG, " kippt um wie eine leere Bierflasche.\n");
38
39 AddItem(__PATH__(1)"obj/axt2", REFRESH_NONE|CLONE_WIELD);
40}
41
42/* Ab und zu (20% Chance) startet Kawumm eine starke Attacke, die braucht
43 dann aber ein paar Runden: */
44void Attack() {
45 if (ausholen) {
46 if (ausholen == 1) {
47 mixed waffe = QueryProp(P_WEAPON);
48 string* damtype = ({DT_BLUDGEON});
49 if (waffe) damtype = waffe->QueryProp(P_DAM_TYPE);
50
51 tell_room(ENV(), BSLF(
52 "Kawumm semmelt so richtig feste zu."));
53 enemy->Defend(300, damtype, 0, TO);
54 }
55 --ausholen;
56 return;
57 }
58
59 if (!random(5)) {
60 ausholen = 3;
61 tell_room(ENV(), BSLF(
62 "Kawumm holt mal so richtig weit aus, um dann um so fester "
63 "zuzuschlagen."));
64 return;
65 }
66 ::Attack();
67}