From cc227fb7070b9877c130061ba882c26794751eef Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 23 Dec 2016 18:05:38 +0100 Subject: [PATCH] merge monster.c and monsters.c move RCF_DESERT handling to monsters.c --- src/CMakeLists.txt | 1 - src/battle.c | 2 +- src/bind_monsters.c | 1 - src/bindings.c | 2 +- src/chaos.c | 2 +- src/economy.c | 2 +- src/guard.c | 2 +- src/guard.test.c | 2 +- src/kernel/faction.test.c | 2 +- src/laws.c | 2 +- src/laws.test.c | 2 +- src/monster.c | 224 -------------------------------------- src/monster.h | 39 ------- src/monsters.c | 193 +++++++++++++++++++++++++++++++- src/monsters.h | 49 ++++++++- src/monsters.test.c | 1 - src/move.c | 2 +- src/races/zombies.c | 2 +- src/randenc.c | 19 +--- src/report.c | 2 +- src/spells.c | 2 +- src/study.c | 2 +- src/summary.c | 2 +- src/teleport.c | 2 +- src/upkeep.c | 2 +- 25 files changed, 249 insertions(+), 312 deletions(-) delete mode 100644 src/monster.c delete mode 100644 src/monster.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8a4445b55..81a43e002 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -114,7 +114,6 @@ set (ERESSEA_SRC magic.c market.c morale.c - monster.c randenc.c renumber.c volcano.c diff --git a/src/battle.c b/src/battle.c index 7aa3e4cfa..ed83871ec 100644 --- a/src/battle.c +++ b/src/battle.c @@ -23,7 +23,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "chaos.h" #include "guard.h" #include "laws.h" -#include "monster.h" +#include "monsters.h" #include "move.h" #include "skill.h" diff --git a/src/bind_monsters.c b/src/bind_monsters.c index 3e3f24bee..d7a3daab2 100644 --- a/src/bind_monsters.c +++ b/src/bind_monsters.c @@ -1,6 +1,5 @@ #include #include "spells/shipcurse.h" -#include "monster.h" #include "monsters.h" #include diff --git a/src/bindings.c b/src/bindings.c index aa2e177c1..f17ccc3a1 100755 --- a/src/bindings.c +++ b/src/bindings.c @@ -54,7 +54,7 @@ without prior permission by the authors of Eressea. #include "summary.h" #include "teleport.h" #include "laws.h" -#include "monster.h" +#include "monsters.h" #include "market.h" #include diff --git a/src/chaos.c b/src/chaos.c index 942fb87bc..58cd7af73 100644 --- a/src/chaos.c +++ b/src/chaos.c @@ -19,7 +19,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #include "chaos.h" -#include "monster.h" +#include "monsters.h" #include "move.h" #include diff --git a/src/economy.c b/src/economy.c index d3f6189fc..01954ff54 100644 --- a/src/economy.c +++ b/src/economy.c @@ -31,7 +31,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "spy.h" #include "study.h" #include "move.h" -#include "monster.h" +#include "monsters.h" #include "morale.h" #include "reports.h" #include "calendar.h" diff --git a/src/guard.c b/src/guard.c index ee26e467b..ec87ea46c 100644 --- a/src/guard.c +++ b/src/guard.c @@ -21,7 +21,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "guard.h" #include "laws.h" -#include "monster.h" +#include "monsters.h" #include #include diff --git a/src/guard.test.c b/src/guard.test.c index 60e5453c6..c5bffeab5 100644 --- a/src/guard.test.c +++ b/src/guard.test.c @@ -2,7 +2,7 @@ #include "guard.h" #include "laws.h" -#include "monster.h" +#include "monsters.h" #include #include diff --git a/src/kernel/faction.test.c b/src/kernel/faction.test.c index 75ced96df..3d81b5d3c 100644 --- a/src/kernel/faction.test.c +++ b/src/kernel/faction.test.c @@ -10,7 +10,7 @@ #include #include -#include "monster.h" +#include "monsters.h" #include #include #include diff --git a/src/laws.c b/src/laws.c index 3fe53237e..e0bae8e41 100644 --- a/src/laws.c +++ b/src/laws.c @@ -29,7 +29,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "keyword.h" #include "market.h" #include "morale.h" -#include "monster.h" +#include "monsters.h" #include "move.h" #include "randenc.h" #include "renumber.h" diff --git a/src/laws.test.c b/src/laws.test.c index 69e9f5e04..1bec0e6b4 100644 --- a/src/laws.test.c +++ b/src/laws.test.c @@ -2,7 +2,7 @@ #include "laws.h" #include "battle.h" #include "guard.h" -#include "monster.h" +#include "monsters.h" #include #include diff --git a/src/monster.c b/src/monster.c deleted file mode 100644 index 301b1b132..000000000 --- a/src/monster.c +++ /dev/null @@ -1,224 +0,0 @@ -/* -Copyright (c) 1998-2015, Enno Rehling -Katja Zedel - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -**/ - -#include -#include -#include "monster.h" - -/* gamecode includes */ -#include "economy.h" -#include "give.h" -#include "move.h" - -/* attributes includes */ -#include -#include -#include - -/* kernel includes */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* util includes */ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* libc includes */ -#include -#include -#include - -#define MOVECHANCE 25 /* chance fuer bewegung */ - -#define MAXILLUSION_TEXTS 3 - -bool monster_is_waiting(const unit * u) -{ - int test = fval(u_race(u), RCF_ATTACK_MOVED) ? UFL_ISNEW : UFL_ISNEW | UFL_MOVED; - if (fval(u, test)) - return true; - return false; -} - -static void eaten_by_monster(unit * u) -{ - /* adjustment for smaller worlds */ - double multi = RESOURCE_QUANTITY * newterrain(T_PLAIN)->size / 10000.0; - int n = 0; - int horse = -1; - const resource_type *rhorse = get_resourcetype(R_HORSE); - const race *rc = u_race(u); - attrib *a; - - a = a_find(rc->attribs, &at_scare); - if (a) { - n = rng_int() & a->data.i * u->number; - } else { - n = rng_int() % (u->number / 20 + 1); - horse = 0; - } - horse = horse ? i_get(u->items, rhorse->itype) : 0; - - n = (int)(n * multi); - if (n > 0) { - n = lovar(n); - n = _min(rpeasants(u->region), n); - - if (n > 0) { - deathcounts(u->region, n); - rsetpeasants(u->region, rpeasants(u->region) - n); - ADDMSG(&u->region->msgs, msg_message("eatpeasants", "unit amount", u, n)); - } - } - if (horse > 0) { - i_change(&u->items, rhorse->itype, -horse); - ADDMSG(&u->region->msgs, msg_message("eathorse", "unit amount", u, horse)); - } -} - -static void absorbed_by_monster(unit * u) -{ - int n = rng_int() % (u->number / 20 + 1); - - if (n > 0) { - n = lovar(n); - n = _min(rpeasants(u->region), n); - if (n > 0) { - rsetpeasants(u->region, rpeasants(u->region) - n); - scale_number(u, u->number + n); - ADDMSG(&u->region->msgs, msg_message("absorbpeasants", - "unit race amount", u, u_race(u), n)); - } - } -} - -static int scareaway(region * r, int anzahl) -{ - int n, p, diff = 0, emigrants[MAXDIRECTIONS]; - direction_t d; - - anzahl = _min(_max(1, anzahl), rpeasants(r)); - - /* Wandern am Ende der Woche (normal) oder wegen Monster. Die - * Wanderung wird erst am Ende von demographics () ausgefuehrt. - * emigrants[] ist local, weil r->newpeasants durch die Monster - * vielleicht schon hochgezaehlt worden ist. */ - - for (d = 0; d != MAXDIRECTIONS; d++) - emigrants[d] = 0; - - p = rpeasants(r); - assert(p >= 0 && anzahl >= 0); - for (n = _min(p, anzahl); n; n--) { - direction_t dir = (direction_t)(rng_int() % MAXDIRECTIONS); - region *rc = rconnect(r, dir); - - if (rc && fval(rc->terrain, LAND_REGION)) { - ++diff; - rc->land->newpeasants++; - emigrants[dir]++; - } - } - rsetpeasants(r, p - diff); - assert(p >= diff); - return diff; -} - -static void scared_by_monster(unit * u) -{ - int n; - const race *rc = u_race(u); - attrib *a; - a = a_find(rc->attribs, &at_scare); - if (a) { - n = rng_int() & a->data.i * u->number; - } else { - n = rng_int() % (u->number / 4 + 1); - } - if (n > 0) { - n = lovar(n); - n = _min(rpeasants(u->region), n); - if (n > 0) { - n = scareaway(u->region, n); - if (n > 0) { - ADDMSG(&u->region->msgs, msg_message("fleescared", - "amount unit", n, u)); - } - } - } -} - -void monster_kills_peasants(unit * u) -{ - if (!monster_is_waiting(u)) { - if (u_race(u)->flags & RCF_SCAREPEASANTS) { - scared_by_monster(u); - } - if (u_race(u)->flags & RCF_KILLPEASANTS) { - eaten_by_monster(u); - } - if (u_race(u)->flags & RCF_ABSORBPEASANTS) { - absorbed_by_monster(u); - } - } -} - -faction *get_or_create_monsters(void) -{ - faction *f = findfaction(MONSTER_ID); - if (!f) { - const race *rc = rc_get_or_create("dragon"); - const char *email = config_get("monster.email"); - f = addfaction(email ? email : "noreply@eressea.de", NULL, rc, default_locale, 0); - renumber_faction(f, MONSTER_ID); - faction_setname(f, "Monster"); - fset(f, FFL_NPC | FFL_NOIDLEOUT); - } - return f; -} - -faction *get_monsters(void) { - return get_or_create_monsters(); -} - -void make_zombie(unit * u) -{ - u_setfaction(u, get_monsters()); - scale_number(u, 1); - u->hp = unit_max_hp(u) * u->number; - u_setrace(u, get_race(RC_ZOMBIE)); - u->irace = NULL; -} diff --git a/src/monster.h b/src/monster.h deleted file mode 100644 index 0f936b17d..000000000 --- a/src/monster.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright (c) 1998-2015, Enno Rehling -Katja Zedel - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -**/ - -#ifndef H_GC_MONSTER -#define H_GC_MONSTER -#ifdef __cplusplus -extern "C" { -#endif - - struct unit; - - void monster_kills_peasants(struct unit *u); - bool monster_is_waiting(const struct unit *u); - struct faction *get_monsters(void); - struct faction *get_or_create_monsters(void); - void make_zombie(struct unit * u); - -#define MONSTER_ID 666 -#define is_monsters(f) ((f->flags & FFL_NPC) && f==get_monsters()) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/monsters.c b/src/monsters.c index cea817589..f1064b7fe 100644 --- a/src/monsters.c +++ b/src/monsters.c @@ -26,12 +26,12 @@ #include "chaos.h" #include "give.h" #include "guard.h" -#include "monster.h" #include "laws.h" #include "keyword.h" #include "study.h" /* attributes includes */ +#include #include #include @@ -72,8 +72,8 @@ #include #include -#define MOVECHANCE .25 /* chance fuer bewegung */ -#define DRAGON_RANGE 20 /* Max. Distanz zum nächsten Drachenziel */ +#define DRAGON_RANGE 20 /* max. Distanz zum nächsten Drachenziel */ +#define MOVE_PERCENT 25 /* chance fuer bewegung */ #define MAXILLUSION_TEXTS 3 static double attack_chance; /* rules.monsters.attack_chance, or default 0.4 */ @@ -85,12 +85,12 @@ static void give_peasants(unit *u, const item_type *itype, int reduce) { } static double random_move_chance(void) { - static double rule; + static int rule; static int config; if (config_changed(&config)) { - rule = config_get_flt("rules.monsters.random_move_chance", MOVECHANCE); + rule = config_get_flt("rules.monsters.random_move_percent", MOVE_PERCENT); } - return rule; + return rule * 0.01; } static void reduce_weight(unit * u) @@ -165,6 +165,29 @@ static order *monster_attack(unit * u, const unit * target) return create_order(K_ATTACK, u->faction->locale, "%i", target->no); } +void monsters_desert(struct faction *monsters) +{ + region *r; + + assert(monsters!=NULL); + for (r = regions; r; r = r->next) { + unit *u; + + for (u = r->units; u; u = u->next) { + if (u->faction!=monsters + && (u_race(u)->flags & RCF_DESERT)) { + if (fval(u, UFL_ISNEW)) + continue; + if (rng_int() % 100 < 5) { + ADDMSG(&u->faction->msgs, msg_message("desertion", + "unit region", u, r)); + u_setfaction(u, monsters); + } + } + } + } +} + int monster_attacks(unit * monster, bool respect_buildings, bool rich_only) { region *r = monster->region; @@ -973,3 +996,161 @@ void spawn_undead(void) } } } + +bool monster_is_waiting(const unit * u) +{ + int test = fval(u_race(u), RCF_ATTACK_MOVED) ? UFL_ISNEW : UFL_ISNEW | UFL_MOVED; + if (fval(u, test)) + return true; + return false; +} + +static void eaten_by_monster(unit * u) +{ + /* adjustment for smaller worlds */ + double multi = RESOURCE_QUANTITY * newterrain(T_PLAIN)->size / 10000.0; + int n = 0; + int horse = -1; + const resource_type *rhorse = get_resourcetype(R_HORSE); + const race *rc = u_race(u); + attrib *a; + + a = a_find(rc->attribs, &at_scare); + if (a) { + n = rng_int() & a->data.i * u->number; + } else { + n = rng_int() % (u->number / 20 + 1); + horse = 0; + } + horse = horse ? i_get(u->items, rhorse->itype) : 0; + + n = (int)(n * multi); + if (n > 0) { + n = lovar(n); + n = _min(rpeasants(u->region), n); + + if (n > 0) { + deathcounts(u->region, n); + rsetpeasants(u->region, rpeasants(u->region) - n); + ADDMSG(&u->region->msgs, msg_message("eatpeasants", "unit amount", u, n)); + } + } + if (horse > 0) { + i_change(&u->items, rhorse->itype, -horse); + ADDMSG(&u->region->msgs, msg_message("eathorse", "unit amount", u, horse)); + } +} + +static void absorbed_by_monster(unit * u) +{ + int n = rng_int() % (u->number / 20 + 1); + + if (n > 0) { + n = lovar(n); + n = _min(rpeasants(u->region), n); + if (n > 0) { + rsetpeasants(u->region, rpeasants(u->region) - n); + scale_number(u, u->number + n); + ADDMSG(&u->region->msgs, msg_message("absorbpeasants", + "unit race amount", u, u_race(u), n)); + } + } +} + +static int scareaway(region * r, int anzahl) +{ + int n, p, diff = 0, emigrants[MAXDIRECTIONS]; + direction_t d; + + anzahl = _min(_max(1, anzahl), rpeasants(r)); + + /* Wandern am Ende der Woche (normal) oder wegen Monster. Die + * Wanderung wird erst am Ende von demographics () ausgefuehrt. + * emigrants[] ist local, weil r->newpeasants durch die Monster + * vielleicht schon hochgezaehlt worden ist. */ + + for (d = 0; d != MAXDIRECTIONS; d++) + emigrants[d] = 0; + + p = rpeasants(r); + assert(p >= 0 && anzahl >= 0); + for (n = _min(p, anzahl); n; n--) { + direction_t dir = (direction_t)(rng_int() % MAXDIRECTIONS); + region *rc = rconnect(r, dir); + + if (rc && fval(rc->terrain, LAND_REGION)) { + ++diff; + rc->land->newpeasants++; + emigrants[dir]++; + } + } + rsetpeasants(r, p - diff); + assert(p >= diff); + return diff; +} + +static void scared_by_monster(unit * u) +{ + int n; + const race *rc = u_race(u); + attrib *a; + a = a_find(rc->attribs, &at_scare); + if (a) { + n = rng_int() & a->data.i * u->number; + } else { + n = rng_int() % (u->number / 4 + 1); + } + if (n > 0) { + n = lovar(n); + n = _min(rpeasants(u->region), n); + if (n > 0) { + n = scareaway(u->region, n); + if (n > 0) { + ADDMSG(&u->region->msgs, msg_message("fleescared", + "amount unit", n, u)); + } + } + } +} + +void monster_kills_peasants(unit * u) +{ + if (!monster_is_waiting(u)) { + if (u_race(u)->flags & RCF_SCAREPEASANTS) { + scared_by_monster(u); + } + if (u_race(u)->flags & RCF_KILLPEASANTS) { + eaten_by_monster(u); + } + if (u_race(u)->flags & RCF_ABSORBPEASANTS) { + absorbed_by_monster(u); + } + } +} + +faction *get_or_create_monsters(void) +{ + faction *f = findfaction(MONSTER_ID); + if (!f) { + const race *rc = rc_get_or_create("dragon"); + const char *email = config_get("monster.email"); + f = addfaction(email ? email : "noreply@eressea.de", NULL, rc, default_locale, 0); + renumber_faction(f, MONSTER_ID); + faction_setname(f, "Monster"); + fset(f, FFL_NPC | FFL_NOIDLEOUT); + } + return f; +} + +faction *get_monsters(void) { + return get_or_create_monsters(); +} + +void make_zombie(unit * u) +{ + u_setfaction(u, get_monsters()); + scale_number(u, 1); + u->hp = unit_max_hp(u) * u->number; + u_setrace(u, get_race(RC_ZOMBIE)); + u->irace = NULL; +} diff --git a/src/monsters.h b/src/monsters.h index 02e41c0a4..52e9ebf37 100644 --- a/src/monsters.h +++ b/src/monsters.h @@ -1,8 +1,45 @@ -#pragma once +/* +Copyright (c) 1998-2015, Enno Rehling +Katja Zedel -struct unit; -struct region; -struct faction; +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -struct unit *spawn_seaserpent(struct region *r, struct faction *f); -void spawn_dragons(void); +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +**/ + +#ifndef H_GC_MONSTER +#define H_GC_MONSTER +#ifdef __cplusplus +extern "C" { +#endif + + struct unit; + struct region; + struct faction; + + struct unit *spawn_seaserpent(struct region *r, struct faction *f); + void spawn_dragons(void); + void monsters_desert(struct faction *monsters); + + void monster_kills_peasants(struct unit *u); + bool monster_is_waiting(const struct unit *u); + struct faction *get_monsters(void); + struct faction *get_or_create_monsters(void); + void make_zombie(struct unit * u); + +#define MONSTER_ID 666 +#define is_monsters(f) ((f->flags & FFL_NPC) && f==get_monsters()) + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/monsters.test.c b/src/monsters.test.c index ca793891c..e0eaa3ccc 100644 --- a/src/monsters.test.c +++ b/src/monsters.test.c @@ -10,7 +10,6 @@ #include #include -#include "monster.h" #include "monsters.h" #include "guard.h" #include "reports.h" diff --git a/src/move.c b/src/move.c index b6a908837..29e3a2ed5 100644 --- a/src/move.c +++ b/src/move.c @@ -27,7 +27,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "alchemy.h" #include "travelthru.h" #include "vortex.h" -#include "monster.h" +#include "monsters.h" #include "lighthouse.h" #include "piracy.h" diff --git a/src/races/zombies.c b/src/races/zombies.c index d7f871dac..3e9303b38 100644 --- a/src/races/zombies.c +++ b/src/races/zombies.c @@ -24,7 +24,7 @@ /* util iclude */ #include -#include "monster.h" +#include "monsters.h" /* libc includes */ #include diff --git a/src/randenc.c b/src/randenc.c index a3c5ce303..536210b1f 100644 --- a/src/randenc.c +++ b/src/randenc.c @@ -22,7 +22,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "volcano.h" #include "economy.h" -#include "monster.h" +#include "monsters.h" #include "move.h" #include "chaos.h" #include "study.h" @@ -826,22 +826,7 @@ void randomevents(void) /* monster-einheiten desertieren */ if (monsters) { - for (r = regions; r; r = r->next) { - unit *u; - - for (u = r->units; u; u = u->next) { - if (u->faction && !is_monsters(u->faction) - && (u_race(u)->flags & RCF_DESERT)) { - if (fval(u, UFL_ISNEW)) - continue; - if (rng_int() % 100 < 5) { - ADDMSG(&u->faction->msgs, msg_message("desertion", - "unit region", u, r)); - u_setfaction(u, monsters); - } - } - } - } + monsters_desert(monsters); } chaos_update(); diff --git a/src/report.c b/src/report.c index dd6b29525..7f9ede7e6 100644 --- a/src/report.c +++ b/src/report.c @@ -26,7 +26,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "guard.h" #include "laws.h" #include "market.h" -#include "monster.h" +#include "monsters.h" #include "travelthru.h" /* modules includes */ diff --git a/src/spells.c b/src/spells.c index 57b1da3a5..7e7b5669a 100644 --- a/src/spells.c +++ b/src/spells.c @@ -22,7 +22,7 @@ #include "spells.h" #include "direction.h" #include "randenc.h" -#include "monster.h" +#include "monsters.h" #include "teleport.h" #include diff --git a/src/study.c b/src/study.c index 1dd4da8b8..2531c864a 100644 --- a/src/study.c +++ b/src/study.c @@ -24,7 +24,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "study.h" #include "laws.h" #include "move.h" -#include "monster.h" +#include "monsters.h" #include "alchemy.h" #include "academy.h" diff --git a/src/summary.c b/src/summary.c index 2311b1994..8a3ee3c41 100644 --- a/src/summary.c +++ b/src/summary.c @@ -14,7 +14,7 @@ #include "summary.h" #include "laws.h" -#include "monster.h" +#include "monsters.h" #include "calendar.h" #include diff --git a/src/teleport.c b/src/teleport.c index 74176f6af..f81f2f9f0 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -34,7 +34,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "skill.h" -#include "monster.h" +#include "monsters.h" /* libc includes */ #include diff --git a/src/upkeep.c b/src/upkeep.c index 198ce73df..1cf41011f 100644 --- a/src/upkeep.c +++ b/src/upkeep.c @@ -16,7 +16,7 @@ #include "alchemy.h" #include "economy.h" -#include "monster.h" +#include "monsters.h" #include "donations.h" #include