forked from github/server
remove the old ORCIFICATION code.
This commit is contained in:
parent
8b0ee77bda
commit
29d072a186
12 changed files with 8 additions and 162 deletions
|
@ -16,7 +16,6 @@ matmod.c
|
|||
moved.c
|
||||
movement.c
|
||||
dict.c
|
||||
orcification.c
|
||||
otherfaction.c
|
||||
overrideroads.c
|
||||
racename.c
|
||||
|
|
|
@ -33,7 +33,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "moved.h"
|
||||
#include "movement.h"
|
||||
#include "dict.h"
|
||||
#include "orcification.h"
|
||||
#include "otherfaction.h"
|
||||
#include "overrideroads.h"
|
||||
#include "racename.h"
|
||||
|
@ -120,6 +119,7 @@ void register_attributes(void)
|
|||
at_register(&at_germs);
|
||||
|
||||
at_deprecate("xontormiaexpress", a_readint); /* required for old datafiles */
|
||||
at_deprecate("orcification", a_readint); /* required for old datafiles */
|
||||
at_deprecate("lua", read_ext); /* required for old datafiles */
|
||||
at_deprecate("gm", a_readint);
|
||||
at_deprecate("guard", a_readint); /* used to contain guard-flags (v3.10.0-259-g8597e8b) */
|
||||
|
@ -133,7 +133,6 @@ void register_attributes(void)
|
|||
at_register(&at_keys);
|
||||
at_register(&at_follow);
|
||||
at_register(&at_targetregion);
|
||||
at_register(&at_orcification);
|
||||
at_register(&at_hate);
|
||||
at_register(&at_reduceproduction);
|
||||
at_register(&at_otherfaction);
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 1998-2015, Enno Rehling <enno@eressea.de>
|
||||
Katja Zedel <katze@felidae.kn-bremen.de
|
||||
Christian Schlittchen <corwin@amber.kn-bremen.de>
|
||||
|
||||
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 <platform.h>
|
||||
#include <kernel/config.h>
|
||||
#include "orcification.h"
|
||||
|
||||
#include <kernel/save.h>
|
||||
#include <util/attrib.h>
|
||||
|
||||
/*
|
||||
* simple attributes that do not yet have their own file
|
||||
*/
|
||||
|
||||
attrib_type at_orcification = {
|
||||
"orcification", NULL, NULL, NULL, a_writeint, a_readint, NULL, ATF_UNIQUE
|
||||
};
|
||||
|
||||
attrib *make_orcification(int orcification)
|
||||
{
|
||||
attrib *a = a_new(&at_orcification);
|
||||
a->data.i = orcification;
|
||||
return a;
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 1998-2015, Enno Rehling <enno@eressea.de>
|
||||
Katja Zedel <katze@felidae.kn-bremen.de
|
||||
Christian Schlittchen <corwin@amber.kn-bremen.de>
|
||||
|
||||
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.
|
||||
**/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern struct attrib_type at_orcification;
|
||||
|
||||
extern struct attrib *make_orcification(int orcification);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -24,7 +24,6 @@ without prior permission by the authors of Eressea.
|
|||
|
||||
/* attributes include */
|
||||
#include <attributes/follow.h>
|
||||
#include <attributes/orcification.h>
|
||||
#include <attributes/otherfaction.h>
|
||||
#include <attributes/racename.h>
|
||||
#include <attributes/raceprefix.h>
|
||||
|
@ -1329,9 +1328,6 @@ static void cr_output_region(FILE * F, report_context * ctx, region * r)
|
|||
if (fval(r->terrain, LAND_REGION)) {
|
||||
assert(r->land);
|
||||
fprintf(F, "%d;Bauern\n", rpeasants(r));
|
||||
if (fval(r, RF_ORCIFIED)) {
|
||||
fprintf(F, "1;Verorkt\n");
|
||||
}
|
||||
fprintf(F, "%d;Pferde\n", rhorses(r));
|
||||
|
||||
if (r->seen.mode >= seen_unit) {
|
||||
|
|
|
@ -69,7 +69,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
#include <attributes/reduceproduction.h>
|
||||
#include <attributes/racename.h>
|
||||
#include <attributes/orcification.h>
|
||||
|
||||
/* libs includes */
|
||||
#include <math.h>
|
||||
|
@ -498,13 +497,6 @@ static void recruit(unit * u, struct order *ord, request ** recruitorders)
|
|||
return;
|
||||
}
|
||||
|
||||
if (fval(r, RF_ORCIFIED)) {
|
||||
if (rc != get_race(RC_ORC)) {
|
||||
cmistake(u, ord, 238, MSG_EVENT);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (recruitcost) {
|
||||
pl = getplane(r);
|
||||
if (pl && fval(pl, PFL_NORECRUITS)) {
|
||||
|
|
11
src/give.c
11
src/give.c
|
@ -34,7 +34,6 @@
|
|||
|
||||
/* attributes includes */
|
||||
#include <attributes/racename.h>
|
||||
#include <attributes/orcification.h>
|
||||
|
||||
/* util includes */
|
||||
#include <util/attrib.h>
|
||||
|
@ -411,16 +410,6 @@ message * disband_men(int n, unit * u, struct order *ord) {
|
|||
return msg;
|
||||
}
|
||||
transfermen(u, NULL, n);
|
||||
//TODO: is ORCIFICATION still working? snotlings cannot be given to peasants
|
||||
#ifdef ORCIFICATION
|
||||
if (u_race(u) == rc_snotling && !fval(u->region, RF_ORCIFIED)) {
|
||||
attrib *a = a_find(u->region->attribs, &at_orcification);
|
||||
if (!a) {
|
||||
a = a_add(&u->region->attribs, a_new(&at_orcification));
|
||||
}
|
||||
a->data.i += n;
|
||||
}
|
||||
#endif
|
||||
if (fval(u->region->terrain, SEA_REGION)) {
|
||||
return msg_message("give_person_ocean", "unit amount", u, n);
|
||||
}
|
||||
|
|
|
@ -942,9 +942,6 @@ default_wage(const region * r, const faction * f, const race * rc, int in_turn)
|
|||
else if (fval(r->terrain, SEA_REGION)) {
|
||||
wage = 11;
|
||||
}
|
||||
else if (fval(r, RF_ORCIFIED)) {
|
||||
wage = wagetable[esize][1];
|
||||
}
|
||||
else {
|
||||
wage = wagetable[esize][2];
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#define RF_ENCOUNTER (1<<9) /* persistent */
|
||||
#define RF_MAPPER_HIGHLIGHT (1<<10)
|
||||
#define RF_LIGHTHOUSE (1<<11) /* this region may contain a lighthouse */
|
||||
#define RF_ORCIFIED (1<<12) /* persistent */
|
||||
#define RF_MIGRATION (1<<13)
|
||||
|
||||
#define RF_UNUSED_14 (1<<14)
|
||||
|
@ -58,7 +57,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
#define RF_ALL 0xFFFFFF
|
||||
|
||||
#define RF_SAVEMASK (RF_CHAOTIC|RF_MALLORN|RF_BLOCKED|RF_ENCOUNTER|RF_ORCIFIED|RF_GUARDED|RF_LIGHTHOUSE)
|
||||
#define RF_SAVEMASK (RF_CHAOTIC|RF_MALLORN|RF_BLOCKED|RF_ENCOUNTER|RF_GUARDED|RF_LIGHTHOUSE)
|
||||
struct message;
|
||||
struct message_list;
|
||||
struct rawmaterial;
|
||||
|
|
|
@ -67,7 +67,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
#include <attributes/iceberg.h>
|
||||
extern struct attrib_type at_unitdissolve;
|
||||
extern struct attrib_type at_orcification;
|
||||
|
||||
/* In a->data.ca[1] steht der Prozentsatz mit dem sich die Einheit
|
||||
* auflöst, in a->data.ca[0] kann angegeben werden, wohin die Personen
|
||||
|
@ -807,47 +806,6 @@ void randomevents(void)
|
|||
godcurse();
|
||||
orc_growth();
|
||||
demon_skillchanges();
|
||||
|
||||
/* Orkifizierte Regionen mutieren und mutieren zurück */
|
||||
|
||||
for (r = regions; r; r = r->next) {
|
||||
if (fval(r, RF_ORCIFIED)) {
|
||||
direction_t dir;
|
||||
double probability = 0.0;
|
||||
for (dir = 0; dir < MAXDIRECTIONS; dir++) {
|
||||
region *rc = rconnect(r, dir);
|
||||
if (rc && rpeasants(rc) > 0 && !fval(rc, RF_ORCIFIED))
|
||||
probability += 0.02;
|
||||
}
|
||||
if (chance(probability)) {
|
||||
ADDMSG(&r->msgs, msg_message("deorcified", "region", r));
|
||||
freset(r, RF_ORCIFIED);
|
||||
}
|
||||
}
|
||||
else {
|
||||
attrib *a = a_find(r->attribs, &at_orcification);
|
||||
if (a != NULL) {
|
||||
if (rpeasants(r) <= 0) {
|
||||
a_remove(&r->attribs, a);
|
||||
}
|
||||
else {
|
||||
double probability = 0.0;
|
||||
probability = a->data.i / (double)rpeasants(r);
|
||||
if (chance(probability)) {
|
||||
fset(r, RF_ORCIFIED);
|
||||
a_remove(&r->attribs, a);
|
||||
ADDMSG(&r->msgs, msg_message("orcified", "region", r));
|
||||
}
|
||||
else {
|
||||
a->data.i -= _max(10, a->data.i / 10);
|
||||
if (a->data.i <= 0)
|
||||
a_remove(&r->attribs, a);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
volcano_update();
|
||||
/* Monumente zerfallen, Schiffe verfaulen */
|
||||
|
||||
|
|
11
src/report.c
11
src/report.c
|
@ -1021,23 +1021,12 @@ static void describe(stream *out, const region * r, faction * f)
|
|||
if (wrptr(&bufp, &size, bytes) != 0)
|
||||
WARN_STATIC_BUFFER();
|
||||
}
|
||||
if (fval(r, RF_ORCIFIED)) {
|
||||
bytes = (int)strlcpy(bufp, " ", size);
|
||||
if (wrptr(&bufp, &size, bytes) != 0)
|
||||
WARN_STATIC_BUFFER();
|
||||
|
||||
bytes =
|
||||
(int)strlcpy(bufp, LOC(f->locale, n == 1 ? "rc_orc" : "rc_orc_p"),
|
||||
size);
|
||||
}
|
||||
else {
|
||||
bytes = (int)strlcpy(bufp, " ", size);
|
||||
if (wrptr(&bufp, &size, bytes) != 0)
|
||||
WARN_STATIC_BUFFER();
|
||||
bytes =
|
||||
(int)strlcpy(bufp, LOC(f->locale, n == 1 ? "peasant" : "peasant_p"),
|
||||
size);
|
||||
}
|
||||
if (wrptr(&bufp, &size, bytes) != 0)
|
||||
WARN_STATIC_BUFFER();
|
||||
if (is_mourning(r, turn + 1)) {
|
||||
|
|
|
@ -59,7 +59,6 @@ typedef struct summary {
|
|||
int landregionen;
|
||||
int regionen_mit_spielern;
|
||||
int landregionen_mit_spielern;
|
||||
int orkifizierte_regionen;
|
||||
int inactive_volcanos;
|
||||
int active_volcanos;
|
||||
int spielerpferde;
|
||||
|
@ -227,7 +226,6 @@ void report_summary(summary * s, summary * o, bool full)
|
|||
fprintf(F, "Landregionen: %d\n", s->landregionen);
|
||||
fprintf(F, "Spielerregionen: %d\n", s->regionen_mit_spielern);
|
||||
fprintf(F, "Landspielerregionen: %d\n", s->landregionen_mit_spielern);
|
||||
fprintf(F, "Orkifizierte Regionen: %d\n", s->orkifizierte_regionen);
|
||||
fprintf(F, "Inaktive Vulkane: %d\n", s->inactive_volcanos);
|
||||
fprintf(F, "Aktive Vulkane: %d\n\n", s->active_volcanos);
|
||||
}
|
||||
|
@ -422,9 +420,6 @@ summary *make_summary(void)
|
|||
if (r->units) {
|
||||
s->landregionen_mit_spielern++;
|
||||
}
|
||||
if (fval(r, RF_ORCIFIED)) {
|
||||
s->orkifizierte_regionen++;
|
||||
}
|
||||
if (r->terrain == newterrain(T_VOLCANO)) {
|
||||
s->inactive_volcanos++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue