| inherit "/std/npc"; |
| |
| #include <new_skills.h> |
| #include __PATH__(1)"defs.h" |
| |
| |
| 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 hat Kawumm eine spezielle Axt, und er greift ab und zu staerker " |
| "an.")); |
| 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); |
| |
| SetProp(P_MURDER_MSG, |
| "He! Ich gehoere doch zu Notstroms Magiertutorial, %s."); |
| /* Wir setzen hier auch mal eine Kill-Message, dieser Zwerg koennte ja |
| sogar mal wen erwischen: */ |
| SetProp(P_KILL_MSG, |
| "Kommt davon, wenn man sich an einem Magiertutorial vergreift, %s!"); |
| SetProp(P_DIE_MSG, " kippt um wie eine leere Bierflasche.\n"); |
| |
| AddItem(__PATH__(1)"obj/axt2", REFRESH_NONE|CLONE_WIELD); |
| } |
| |
| private void festedruff(object enemy) { |
| // wichtig: auf Paralyse pruefen! |
| if (!objectp(TP) || (ENV(TP) != ENV()) || QueryProp(P_DISABLE_ATTACK)) |
| return; |
| |
| mixed waffe = QueryProp(P_WEAPON); |
| string* damtype = ({DT_BLUDGEON}); |
| if (waffe) damtype = waffe->QueryProp(P_DAM_TYPE); |
| |
| tell_room(ENV(), BSLF( |
| "Kawumm semmelt mal so richtig feste drauf. RRRRUMMMMS.")); |
| enemy->Defend(1000, damtype, 0, TO); |
| } |
| |
| /* Ab und zu (20% Chance) startet Kawumm eine starke Attacke, die braucht |
| dann aber ein paar Runden: */ |
| void Attack(object enemy) { |
| if (!random(5) && find_call_out(#'festedruff) == -1 && |
| !QueryProp(P_DISABLE_ATTACK)) { |
| tell_room(ENV(), BSLF( |
| "Kawumm holt richtig weit aus ...")); |
| call_out(#'festedruff, 3, TP); |
| return; |
| } |
| |
| ::Attack(enemy); |
| } |
| |