Ork-Konvertierung

This commit is contained in:
Christian Schlittchen 2002-02-10 17:56:03 +00:00
parent a963bdacb4
commit e996cab019
4 changed files with 28 additions and 5 deletions

View File

@ -8,7 +8,7 @@ default: debug
DEPEND = @gcc -MM -MG -r DEPEND = @gcc -MM -MG -r
AR = @ar AR = @ar
CTAGS = @ctags CTAGS = @ctags-exuberant
CC = @gcc CC = @gcc
LD = @gcc LD = @gcc
INSTALL = @cp INSTALL = @cp
@ -16,7 +16,7 @@ INSTALL = @cp
ARFLAGS = crs ARFLAGS = crs
CTAGSFLAGS = --langmap=c:.c.h --c-types=-m CTAGSFLAGS = --c-types=cdefgmnstuv
CFLAGS = -I$(ERESSEA) -Wall -Wwrite-strings -Wstrict-prototypes \ CFLAGS = -I$(ERESSEA) -Wall -Wwrite-strings -Wstrict-prototypes \
-Wpointer-arith -Werror-implicit-function-declaration \ -Wpointer-arith -Werror-implicit-function-declaration \
-Wno-char-subscripts $(INCLUDES) -Wno-char-subscripts $(INCLUDES)
@ -120,7 +120,7 @@ endif
# #
## Tags ## Tags
# #
tags: depend tags:
@echo "Creating tags in `pwd`/tags"; @echo "Creating tags in `pwd`/tags";
$(CTAGS) $(CTAGSFLAGS) --recurse=yes -f $(ERESSEA)/tags $(ERESSEA) $(CTAGS) $(CTAGSFLAGS) --recurse=yes -f $(ERESSEA)/tags $(ERESSEA)

View File

@ -1076,7 +1076,7 @@ randomevents(void)
} }
#if RACE_ADJUSTMENTS #if RACE_ADJUSTMENTS == 0
/* Orks vermehren sich */ /* Orks vermehren sich */
for (r = regions; r; r = r->next) { for (r = regions; r; r = r->next) {

View File

@ -7,7 +7,7 @@ endif
CC = gcc-3.0 -D_GNU_SOURCE CC = gcc-3.0 -D_GNU_SOURCE
# CC = gcc -D_GNU_SOURCE # CC = gcc -D_GNU_SOURCE
AR = ar AR = ar
CTAGS = ctags CTAGS = ctags-exuberant
LD = gcc-3.0 LD = gcc-3.0
INSTALL = cp INSTALL = cp
CFLAGS += -march=athlon -minline-all-stringops CFLAGS += -march=athlon -minline-all-stringops

View File

@ -2611,6 +2611,28 @@ peasant_adjustment(void)
return 0; return 0;
} }
static int
orc_conversion(void)
{
faction *f;
unit *u;
for(f=factions; f; f=f->next) {
for(u=f->units; u; u=u->next) {
if(u->race == new_race[RC_ORC]) {
/* convert to either uruk or snotling */
if(effskill(u, SK_MAGIC) >= 1
|| effskill(u, SK_ALCHEMY) >= 1)
|| get_item(u, I_CHASTITY_BELT) >= u->number) {
u->race = new_race[RC_URUK];
} else {
u->race = new_race[RC_SNOT];
}
}
}
}
}
#endif #endif
static int static int
@ -2776,6 +2798,7 @@ korrektur_end(void)
#endif #endif
#if PEASANT_ADJUSTMENT == 1 #if PEASANT_ADJUSTMENT == 1
do_once("peas", peasant_adjustment()); do_once("peas", peasant_adjustment());
do_once("orcc", orc_conversion());
#endif #endif
} }