diff --git a/res/core/common/items.xml b/res/core/common/items.xml index 444ea26a1..c903a6b78 100644 --- a/res/core/common/items.xml +++ b/res/core/common/items.xml @@ -135,12 +135,6 @@ - - - - - - diff --git a/res/core/de/strings.xml b/res/core/de/strings.xml index 4582644c7..b23d44ffb 100644 --- a/res/core/de/strings.xml +++ b/res/core/de/strings.xml @@ -235,11 +235,6 @@ einzige Vorteil ihrer geringen Größe ist, dass sie sich leichter verstecken kann. - - Dieses magische Szepter, ein Geschenk Igjarjuks, sorgt für große - Verwirrung und Gedächtnisverlust. Syntax: BENUTZE "Szepter der - Tränen" - Setzt eine Einheit dieses Segel auf einem Schiff, so erhöht sich dessen Reichweite permanent um 1 Region. @@ -1614,14 +1609,6 @@ Akkreditionen des Xontormia-Expreß - - Szepter der Tränen - wand of tears - - - Szepter der Tränen - wands of tears - Schneeball snowball diff --git a/res/core/messages.xml b/res/core/messages.xml index bf4b0c041..260f76c70 100644 --- a/res/core/messages.xml +++ b/res/core/messages.xml @@ -1253,14 +1253,6 @@ "$unit($unit) dies from poison damage taken in $region($region)." - - - - - "$unit($unit) schwenkt sein Szepter und sorgt für Verwirrung und Chaos in der Region." - "$unit($unit) waves their scepter and causes chaos and confusion in the region." - - @@ -1573,20 +1565,6 @@ "$unit($mage) konnte $int($amount) $if($eq($amount,1),"Bauer","Bauern") anwerben." "$unit($mage) managed to recruit $int($amount) $if($eq($amount,1),"peasant","peasants")." - - - - - "Ein bohrender Schmerz durchzuckt $unit($unit), Verwirrung macht sich breit." - "Pain pulses through $unit($unit), confusion spreads." - - - - - - ""AAAAAAAGHHHHHH!" - Ein Schrei durchzieht die Region, $unit($unit) windet sich vor Schmerz." - ""AAAAAAAGHHHHHH!" - $unit($unit) screams and squirms with pain." - @@ -1598,14 +1576,6 @@ "$unit($unit) in $region($region): '$order($command)' - A higher power prevents $unit($unit) from giving the object away. 'IT IS YOURS MY CHILD. ONLY YOURS.'." - - - - - "$unit($unit) sendet ein Stoßgebet an den Herrn der Schreie." - "$unit($unit) sends a prayer to the Lord of Screams." - - diff --git a/src/kernel/save.c b/src/kernel/save.c index 327fa4f1a..80e9ca3a6 100644 --- a/src/kernel/save.c +++ b/src/kernel/save.c @@ -2077,8 +2077,9 @@ int write_game(gamedata *data) { int a_readint(attrib * a, void *owner, struct gamedata *data) { - /* assert(sizeof(int)==sizeof(a->data)); */ - READ_INT(data->store, &a->data.i); + int n; + READ_INT(data->store, &n); + if (a) a->data.i = n; return AT_READ_OK; } diff --git a/src/modules/arena.c b/src/modules/arena.c index 97488218a..d2b67d9af 100644 --- a/src/modules/arena.c +++ b/src/modules/arena.c @@ -38,6 +38,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #include +#include #include #include #include @@ -70,11 +71,6 @@ plane *arena = NULL; /* local vars */ #define CENTRAL_VOLCANO 1 -#ifdef ARENA_CREATION -static unsigned int arena_id = 0; -static region *arena_center = NULL; -static int newarena = 0; -#endif static region *tower_region[6]; static region *start_region[6]; @@ -180,228 +176,6 @@ enter_arena(unit * u, const item_type * itype, int amount, order * ord) move_unit(u, start_region[rng_int() % 6], NULL); return 0; } - -/*** - ** Szepter der Tränen, Demo-Item - ***/ - -static int -use_wand_of_tears(unit * user, const struct item_type *itype, int amount, -order * ord) -{ - int n; - unused_arg(ord); - for (n = 0; n != amount; ++n) { - unit *u; - for (u = user->region->units; u; u = u->next) { - if (u->faction != user->faction) { - int i; - - for (i = 0; i != u->skill_size; ++i) { - if (rng_int() % 3) - reduce_skill(u, u->skills + i, 1); - } - ADDMSG(&u->faction->msgs, msg_message("wand_of_tears_effect", - "unit", u)); - } - } - } - ADDMSG(&user->region->msgs, msg_message("wand_of_tears_usage", "unit", user)); - return 0; -} - -/** - * Tempel der Schreie, Demo-Gebäude **/ - -static int age_hurting(attrib * a, void *owner) -{ - building *b = (building *)a->data.v; - unit *u; - int active = 0; - assert(owner == b); - if (b == NULL) - return AT_AGE_REMOVE; - for (u = b->region->units; u; u = u->next) { - if (u->building == b) { - if (u->faction->magiegebiet == M_DRAIG) { - active++; - ADDMSG(&b->region->msgs, msg_message("praytoigjarjuk", "unit", u)); - } - } - } - if (active) - for (u = b->region->units; u; u = u->next) - if (playerrace(u->faction->race)) { - int i; - if (u->faction->magiegebiet != M_DRAIG) { - for (i = 0; i != active; ++i) - u->hp = (u->hp + 1) / 2; /* make them suffer, but not die */ - ADDMSG(&b->region->msgs, msg_message("cryinpain", "unit", u)); - } - } - return AT_AGE_KEEP; -} - -static void -write_hurting(const attrib * a, const void *owner, struct storage *store) -{ - building *b = a->data.v; - WRITE_INT(store, b->no); -} - -static int read_hurting(attrib * a, void *owner, struct gamedata *data) -{ - int i; - READ_INT(data->store, &i); - a->data.v = (void *)findbuilding(i); - if (a->data.v == NULL) { - log_error("temple of pain is broken\n"); - return AT_READ_FAIL; - } - return AT_READ_OK; -} - -static attrib_type at_hurting = { - "hurting", NULL, NULL, age_hurting, write_hurting, read_hurting -}; - -#ifdef ARENA_CREATION -static void make_temple(region * r) -{ - const building_type *btype = bt_find("temple"); - building *b; - if (btype == NULL) { - log_error("could not find buildingtype 'temple'\n"); - return; - } - - b = r->buildings; - while (b != NULL && b->type != btype) - b = b->next; - if (b != NULL) - return; /* gibt schon einen */ - - b = new_building(btype, r, NULL); - b->size = btype->maxsize; - b->name = _strdup("Igjarjuk's Tempel der Schreie"); - b->display = - _strdup - ("Ein Schrein aus spitzen Knochen und lodernden Flammen, gewidmet dem Wyrm der Wyrme"); - a_add(&b->attribs, a_new(&at_hurting))->data.v = b; -} -#endif - -/** - * Initialisierung Türme */ - -#ifdef ARENA_CREATION -static void tower_init(void) -{ - int i, first = newarena; - item_type *it_demonseye = it_find("demonseye"); - item_type *it_griphonwing = it_find("griphonwing"); - assert(it_griphonwing && it_demonseye); - for (i = 0; i != 6; ++i) { - region *r = tower_region[i] = - findregion(arena_center->x + delta_x[i] * 3, - arena_center->y + delta_y[i] * 3); - if (r) { - start_region[i] = - findregion(arena_center->x + delta_x[i] * 2, - arena_center->y + delta_y[i] * 2); - if (rterrain(r) != T_DESERT) - terraform(r, T_DESERT); - if (!r->buildings) { - building *b = new_building(bt_find("castle"), r, NULL); - b->size = 10; - if (i != 0) { - sprintf(buf, "Turm des %s", - LOC(default_locale, mkname("school", magic_school[i]))); - } else - sprintf(buf, "Turm der Ahnungslosen"); - set_string(&b->name, buf); - } - } - } - if (first && !arena_center->buildings) { - building *b = new_building(bt_find("castle"), arena_center, NULL); - attrib *a; - item *items; - - i_add(&items, i_new(it_griphonwing, 1)); - i_add(&items, i_new(it_demonseye, 1)); - a = a_add(&b->attribs, make_giveitem(b, items)); - - b->size = 10; - set_string(&b->name, "Höhle des Greifen"); - } -} -#endif - -#ifdef ARENA_CREATION -static void guardian_faction(plane * pl, int id) -{ - region *r; - faction *f = findfaction(id); - - if (!f) { - f = calloc(1, sizeof(faction)); - f->banner = _strdup("Sie dienen dem großen Wyrm"); - f->passw = _strdup(itoa36(rng_int())); - set_email(&f->email, "igjarjuk@eressea.de"); - f->name = _strdup("Igjarjuks Kundschafter"); - f->race = get_race(RC_ILLUSION); - f->age = turn; - f->locale = get_locale("de"); - f->options = - want(O_COMPRESS) | want(O_REPORT) | want(O_COMPUTER) | want(O_ADRESSEN) | - want(O_DEBUG); - - f->no = id; - addlist(&factions, f); - fhash(f); - } - if (f->race != get_race(RC_ILLUSION)) { - assert(!"guardian id vergeben"); - exit(0); - } - f->lastorders = turn; - f->alive = true; - for (r = regions; r; r = r->next) - if (getplane(r) == pl && rterrain(r) != T_FIREWALL) { - unit *u; - freset(r, RF_ENCOUNTER); - for (u = r->units; u; u = u->next) { - if (u->faction == f) - break; - } - if (u) - continue; - u = create_unit(r, f, 1, get_race(RC_GOBLIN), 0, NULL, NULL); - set_string(&u->name, "Igjarjuks Auge"); - i_change(&u->items, it_find("roi"), 1); - set_order(&u->thisorder, NULL); - fset(u, UFL_ANON_FACTION); - set_money(u, 1000); - } -} -#endif - -#define BLOCKSIZE 9 - -#ifdef ARENA_CREATION -static void block_create(int x1, int y1, char terrain) -{ - int x, y; - for (x = 0; x != BLOCKSIZE; ++x) { - for (y = 0; y != BLOCKSIZE; ++y) { - region *r = new_region(x1 + x, y1 + y, 0); - terraform(r, terrain); - } - } -} -#endif - #ifdef CENTRAL_VOLCANO static int caldera_handle(trigger * t, void *data) @@ -469,94 +243,11 @@ struct trigger_type tt_caldera = { caldera_read }; -#ifdef ARENA_CREATION -static trigger *trigger_caldera(building * b) -{ - trigger *t = t_new(&tt_caldera); - t->data.v = b; - return t; -} #endif -#ifdef ARENA_CREATION -static void init_volcano(void) -{ - building *b; - region *r = arena_center; - assert(arena_center); - if (rterrain(r) != T_DESERT) - return; /* been done before */ - terraform(arena_center, T_VOLCANO_SMOKING); - b = new_building(bt_find("caldera"), r, NULL); - b->size = 1; - b->name = _strdup("Igjarjuk's Schlund"); - b->display = - _strdup - ("Feurige Lava fließt aus dem Krater des großen Vulkans. Alles wird von ihr verschlungen."); - add_trigger(&b->attribs, "timer", trigger_caldera(b)); - tt_register(&tt_caldera); -} -#endif -#endif - -#ifdef ARENA_CREATION -void create_arena(void) -{ - int x; - arena_id = hashstring("arena"); - arena = getplanebyid(arena_id); - if (arena != NULL) - return; - score(); /* ist wichtig, damit alle Parteien einen score haben, wenn sie durchs Tor wollen. */ - guardian_faction(arena, 999); - if (arena) - arena_center = findregion(plane_center_x(arena), plane_center_y(arena)); - if (!arena_center) { - newarena = 1; - arena = - create_new_plane(arena_id, "Arena", -10000, -10000, 0, BLOCKSIZE - 1, - PFL_LOWSTEALING | PFL_NORECRUITS | PFL_NOALLIANCES); - block_create(arena->minx, arena->miny, T_OCEAN); - arena_center = findregion(plane_center_x(arena), plane_center_y(arena)); - for (x = 0; x != BLOCKSIZE; ++x) { - int y; - for (y = 0; y != BLOCKSIZE; ++y) { - region *r = findregion(arena->minx + x, arena->miny + y); - freset(r, RF_ENCOUNTER); - r->planep = arena; - switch (distance(r, arena_center)) { - case 4: - terraform(r, T_FIREWALL); - break; - case 0: - terraform(r, T_GLACIER); - break; - case 1: - terraform(r, T_SWAMP); - break; - case 2: - terraform(r, T_MOUNTAIN); - break; - } - } - } - } - make_temple(arena_center); -#ifdef CENTRAL_VOLCANO - init_volcano(); -#else - if (arena_center->terrain != T_DESERT) - terraform(arena_center, T_DESERT); -#endif - rsetmoney(arena_center, 0); - rsetpeasants(arena_center, 0); - tower_init(); -} -#endif void register_arena(void) { - at_register(&at_hurting); - register_item_use(use_wand_of_tears, "use_wand_of_tears"); + at_deprecate("hurting", a_readint); register_function((pf_generic)enter_arena, "enter_arena"); register_function((pf_generic)leave_arena, "leave_arena"); tt_register(&tt_caldera); diff --git a/src/study.h b/src/study.h index e136d7345..20903583a 100644 --- a/src/study.h +++ b/src/study.h @@ -45,7 +45,7 @@ extern "C" { void demon_skillchange(struct unit *u); -#define MAXTEACHERS 20 +#define MAXTEACHERS 32 #define TEACHNUMBER 10 typedef struct teaching_info { struct unit *teachers[MAXTEACHERS];