diff --git a/src/common/gamecode/randenc.c b/src/common/gamecode/randenc.c index 3aa022ff5..3466718d8 100644 --- a/src/common/gamecode/randenc.c +++ b/src/common/gamecode/randenc.c @@ -1063,8 +1063,6 @@ randomevents(void) /* Orkische vermehren sich */ for (r = regions; r; r = r->next) { - - plane * p = rplane(r); for (u = r->units; u; u = u->next) { if (is_cursed(u->attribs, C_ORC, 0) && !has_skill(u, SK_MAGIC) && !has_skill(u, SK_ALCHEMY)) { diff --git a/src/common/items/demonseye.c b/src/common/items/demonseye.c index 60c93229c..b54b02dbb 100644 --- a/src/common/items/demonseye.c +++ b/src/common/items/demonseye.c @@ -17,7 +17,12 @@ #include "demonseye.h" /* kernel includes */ +#include #include +#include +#include +#include +#include /* util includes */ #include @@ -28,12 +33,16 @@ static int summon_igjarjuk(struct unit * u, const struct item_type * itype, int amount, const char * cmd) { - unused(u); + struct plane * p = rplane(u->region); unused(amount); unused(itype); - unused(cmd); - assert(!"not implemented"); - return -1; + if (p!=NULL) { + ADDMSG(&u->faction->msgs, msg_error(u, cmd, "use_realworld_only", "")); + return EUNUSABLE; + } else { + assert(!"not implemented"); + return EUNUSABLE; + } } static resource_type rt_demonseye = { diff --git a/src/common/kernel/spell.c b/src/common/kernel/spell.c index 3ffa95f30..abf6c9f7f 100644 --- a/src/common/kernel/spell.c +++ b/src/common/kernel/spell.c @@ -123,7 +123,7 @@ report_failure(unit * mage, const char * sa) { /* ------------------------------------------------------------- */ void -do_shock(unit *u, char *reason) +do_shock(unit *u, const char *reason) { #if SKILLPOINTS skill_t sk; @@ -156,8 +156,8 @@ do_shock(unit *u, char *reason) remove_familiar(u); } - add_message(&u->faction->msgs, new_message(u->faction, - "shock%u:mage%s:reason", u, strdup(reason))); + ADDMSG(&u->faction->msgs, msg_message("shock", + "mage reason", u, strdup(reason))); } /* ------------------------------------------------------------- */ diff --git a/src/common/kernel/spell.h b/src/common/kernel/spell.h index 61e477c89..7901d9c90 100644 --- a/src/common/kernel/spell.h +++ b/src/common/kernel/spell.h @@ -21,6 +21,7 @@ struct border_type; struct attrib_type; struct curse_type; struct castorder; +struct curse; /* Sprüche. Neue NUR hinten anfügen, oder das Datenfile geht kaputt */ enum { @@ -208,7 +209,7 @@ enum { /* Prototypen */ -void do_shock(struct unit *u, char *reason); +void do_shock(struct unit *u, const char *reason); int use_item_power(struct region * r, struct unit * u); int use_item_regeneration(struct region * r, struct unit * u); void showspells(struct region *r, struct unit *u); diff --git a/src/res/de/messages.xml b/src/res/de/messages.xml index 685255438..e992c1a47 100644 --- a/src/res/de/messages.xml +++ b/src/res/de/messages.xml @@ -1196,6 +1196,16 @@ + + + + + + + "$unit($unit) in $region($region): '$command' - Dieser Gegenstand kann nur in der realen Welt benutzt werden." + "$unit($unit) in $region($region): '$command' - This object can only be used in the real world." + +