blob: 818dd81749402d901042322992bd77f62f933415 [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
notstrom2b580792018-12-03 10:12:20 +01007protected void create() {
8 if (!clonep()) {
9 set_next_reset(-1);
10 return;
11 }
12 ::create();
13
14 create_default_npc(20, 600);
15
16 SetProp(P_SHORT, "Ein angriffslustiger Zwerg");
17 SetProp(P_LONG, BSLF(
18 "Diesmal hat Kawumm eine spezielle Axt, und er greift ab und zu staerker "
19 "an."));
20 SetProp(P_NAME, "Kawumm");
21 SetProp(P_ARTICLE, 0);
22 SetProp(P_GENDER, MALE);
23
24 AddId(({"zwerg", "kawumm"}));
25 SetProp(P_ALIGN, 100);
26 SetProp(P_RACE, "Zwerg");
27 SetProp(P_SIZE, 102);
28
29 SetProp(P_MURDER_MSG,
30 "He! Ich gehoere doch zu Notstroms Magiertutorial, %s.");
31 /* Wir setzen hier auch mal eine Kill-Message, dieser Zwerg koennte ja
32 sogar mal wen erwischen: */
33 SetProp(P_KILL_MSG,
34 "Kommt davon, wenn man sich an einem Magiertutorial vergreift, %s!");
35 SetProp(P_DIE_MSG, " kippt um wie eine leere Bierflasche.\n");
36
37 AddItem(__PATH__(1)"obj/axt2", REFRESH_NONE|CLONE_WIELD);
38}
39
notstromd7cbcfd2019-08-26 10:53:56 +020040private void festedruff() {
41 // wichtig: auf Paralyse pruefen!
42 if (!objectp(TP) || (ENV(TP) != ENV()) || QueryProp(P_DISABLE_ATTACK))
43 return;
44
45 mixed waffe = QueryProp(P_WEAPON);
46 string* damtype = ({DT_BLUDGEON});
47 if (waffe) damtype = waffe->QueryProp(P_DAM_TYPE);
48
49 tell_room(ENV(), BSLF(
50 "Kawumm semmelt mal so richtig feste drauf. RRRRUMMMMS."));
51 enemy->Defend(1000, damtype, 0, TO);
52}
53
notstrom2b580792018-12-03 10:12:20 +010054/* Ab und zu (20% Chance) startet Kawumm eine starke Attacke, die braucht
55 dann aber ein paar Runden: */
notstrom56b94492018-12-03 10:13:02 +010056void Attack(object enemy) {
notstromd7cbcfd2019-08-26 10:53:56 +020057 if (!random(5) && find_call_out(#'festedruff) == -1 &&
58 !QueryProp(P_DISABLE_ATTACK)) {
notstrom2b580792018-12-03 10:12:20 +010059 tell_room(ENV(), BSLF(
notstromd7cbcfd2019-08-26 10:53:56 +020060 "Kawumm holt richtig weit aus ..."));
61 call_out(#'festedruff, 3, TP);
notstrom2b580792018-12-03 10:12:20 +010062 return;
63 }
notstromd7cbcfd2019-08-26 10:53:56 +020064
notstromf5028432018-12-03 10:14:04 +010065 ::Attack(enemy);
notstrom2b580792018-12-03 10:12:20 +010066}
notstromd7cbcfd2019-08-26 10:53:56 +020067