forked from github/server
Updates aus aktueller Version in Dev-Version
This commit is contained in:
parent
edf32003cb
commit
87f4ff245d
|
@ -100,7 +100,7 @@ ifeq (.depend,$(wildcard .depend))
|
|||
include .depend
|
||||
endif
|
||||
# Create dependencies
|
||||
depend::
|
||||
.depend depend:: $(SOURCES)
|
||||
@echo "Creating dependencies in `pwd`/.depend";
|
||||
$(DEPEND) $(CFLAGS) $(DEFINES) $(INCDIRS) $(SOURCES) >| .depend
|
||||
endif
|
||||
|
@ -160,7 +160,7 @@ $(BUILD_DIR) $(PUBLISH_DIR):
|
|||
|
||||
# object files:
|
||||
$(BUILD_DIR)/%:: $(BUILD_DIR)
|
||||
$(BUILD_DIR)/%.o:: %.c
|
||||
$(BUILD_DIR)/%.o:: %.c .depend
|
||||
@echo $(MSG_COMPILE)
|
||||
$(CC) $(CFLAGS) -o $@ -c $<
|
||||
@echo
|
||||
|
|
|
@ -9,21 +9,21 @@ CFG=attributes - Win32 Debug
|
|||
NMAKE
|
||||
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den\
|
||||
Befehl
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "attributes.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
|
||||
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "attributes.mak" CFG="attributes - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Für die Konfiguration stehen zur Auswahl:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "attributes - Win32 Release" (basierend auf\
|
||||
"Win32 (x86) Static Library")
|
||||
!MESSAGE "attributes - Win32 Debug" (basierend auf\
|
||||
"Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
|
@ -72,7 +72,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
CFG=attributes - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "attributes-6.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "attributes-6.mak" CFG="attributes - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "attributes - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "attributes - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
|
@ -74,7 +74,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -373,7 +373,7 @@ cr_output_ship(FILE * F, ship * s, unit * u, int fcaptain, faction * f, region *
|
|||
fprintf(F, "%d;Partei\n", fcaptain);
|
||||
|
||||
/* calculate cargo */
|
||||
if (u && (u->faction == f || f->race == RC_ILLUSION)) {
|
||||
if (u && (u->faction == f || omniscient(f))) {
|
||||
for (u2 = r->units; u2; u2 = u2->next)
|
||||
if (u2->ship == s)
|
||||
w += weight(u2);
|
||||
|
@ -423,7 +423,7 @@ cr_output_unit(FILE * F, region * r,
|
|||
if (strlen(u->display))
|
||||
fprintf(F, "\"%s\";Beschr\n", u->display);
|
||||
|
||||
if ((u->faction == f || f->race == RC_ILLUSION) || !fval(u, FL_PARTEITARNUNG)) {
|
||||
if ((u->faction == f || omniscient(f)) || !fval(u, FL_PARTEITARNUNG)) {
|
||||
#ifdef GROUPS
|
||||
if (u->faction == f) {
|
||||
const attrib * a = a_find(u->attribs, &at_group);
|
||||
|
@ -460,7 +460,7 @@ cr_output_unit(FILE * F, region * r,
|
|||
fprintf(F, "%d;Parteitarnung\n", fval(u, FL_PARTEITARNUNG));
|
||||
|
||||
/* additional information for own units */
|
||||
if (u->faction == f || f->race == RC_ILLUSION) {
|
||||
if (u->faction == f || omniscient(f)) {
|
||||
const char *c;
|
||||
int i;
|
||||
const attrib * a;
|
||||
|
@ -485,7 +485,7 @@ cr_output_unit(FILE * F, region * r,
|
|||
if (c)
|
||||
fprintf(F, "\"%s\";privat\n", c);
|
||||
c = hp_status(u);
|
||||
if (c && *c && (u->faction == f || f->race == RC_ILLUSION))
|
||||
if (c && *c && (u->faction == f || omniscient(f)))
|
||||
fprintf(F, "\"%s\";hp\n", c);
|
||||
if (fval(u, FL_HUNGER) && (u->faction == f))
|
||||
fputs("1;hunger\n", F);
|
||||
|
@ -543,7 +543,7 @@ cr_output_unit(FILE * F, region * r,
|
|||
}
|
||||
/* items */
|
||||
pr = 0;
|
||||
if (f == u->faction || u->faction->race==RC_ILLUSION) {
|
||||
if (f == u->faction || omniscient(u->faction)) {
|
||||
show = u->items;
|
||||
} else if (itemcloak==false && mode>=see_unit && !(a_fshidden
|
||||
&& a_fshidden->data.ca[1] == 1 && effskill(u, SK_STEALTH) >= 3)) {
|
||||
|
@ -587,7 +587,7 @@ cr_output_unit(FILE * F, region * r,
|
|||
fprintf(F, "%d;%s\n", in, locale_string(NULL, ic));
|
||||
}
|
||||
|
||||
if ((u->faction == f || f->race == RC_ILLUSION) && u->botschaften)
|
||||
if ((u->faction == f || omniscient(f)) && u->botschaften)
|
||||
cr_output_str_list(F, "EINHEITSBOTSCHAFTEN", u->botschaften, f);
|
||||
|
||||
print_curses(F, u, TYP_UNIT, u->attribs, (u->faction == f)? 1 : 0);
|
||||
|
@ -857,7 +857,7 @@ report_computer(FILE * F, faction * f)
|
|||
maxmining = 0;
|
||||
for (u = r->units; u; u = u->next) {
|
||||
int s = eff_skill(u, SK_MINING, r);
|
||||
if (u->faction == f || f->race == RC_ILLUSION)
|
||||
if (u->faction == f || omniscient(f))
|
||||
maxmining = max(maxmining, s);
|
||||
}
|
||||
if (maxmining >= 4)
|
||||
|
|
|
@ -250,7 +250,8 @@ expandrecruit(region * r, request * recruitorders)
|
|||
for (i = 0, n = 0; i != norders && n < rfrac; i++, n++) {
|
||||
if (!(race[oa[i].unit->race].ec_flags & REC_HORSES)) {
|
||||
recruitcost = race[oa[i].unit->faction->race].rekrutieren;
|
||||
use_pooled(oa[i].unit, r, R_SILVER, recruitcost);
|
||||
if (use_pooled(oa[i].unit, r, R_SILVER, recruitcost) != recruitcost)
|
||||
break;
|
||||
set_number(oa[i].unit, oa[i].unit->number + 1);
|
||||
if (oa[i].unit->faction->race != RC_DAEMON) p--;
|
||||
oa[i].unit->race = oa[i].unit->faction->race;
|
||||
|
@ -263,7 +264,8 @@ expandrecruit(region * r, request * recruitorders)
|
|||
for (i = 0, n = 0; i != norders && n < h; i++, n++) {
|
||||
if (race[oa[i].unit->race].ec_flags & REC_HORSES) {
|
||||
recruitcost = race[oa[i].unit->faction->race].rekrutieren;
|
||||
use_pooled(oa[i].unit, r, R_SILVER, recruitcost);
|
||||
if (use_pooled(oa[i].unit, r, R_SILVER, recruitcost) != recruitcost)
|
||||
break;
|
||||
|
||||
set_number(oa[i].unit, oa[i].unit->number + 1);
|
||||
if (oa[i].unit->faction->race != RC_DAEMON) h--;
|
||||
|
@ -1254,7 +1256,7 @@ economics(void)
|
|||
break;
|
||||
|
||||
case K_GIVE:
|
||||
dogive(r, u, S, false);
|
||||
dogive(r, u, S, S->s[0]=='@'?true:false);
|
||||
break;
|
||||
|
||||
case K_LIEFERE:
|
||||
|
|
|
@ -9,22 +9,22 @@ CFG=gamecode - Win32 Conversion
|
|||
NMAKE
|
||||
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den\
|
||||
Befehl
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "gamecode-5.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
|
||||
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "gamecode-5.mak" CFG="gamecode - Win32 Conversion"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Für die Konfiguration stehen zur Auswahl:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "gamecode - Win32 Release" (basierend auf\
|
||||
"Win32 (x86) Static Library")
|
||||
!MESSAGE "gamecode - Win32 Debug" (basierend auf "Win32 (x86) Static Library")
|
||||
!MESSAGE "gamecode - Win32 Conversion" (basierend auf\
|
||||
"Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
|
@ -96,7 +96,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -7,21 +7,21 @@
|
|||
CFG=gamecode - Win32 Conversion
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "gamecode-6.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "gamecode-6.mak" CFG="gamecode - Win32 Conversion"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "gamecode - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "gamecode - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "gamecode - Win32 Conversion" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "gamecode - Win32 Profile" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
|
@ -124,7 +124,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -560,7 +560,11 @@ horses(region * r)
|
|||
m = max(0, m);
|
||||
if (m) {
|
||||
double gg = (HORSEGROWTH*(rhorses(r)/1.5)*((double)m-(rhorses(r)/1.5))/(double)m)/100.0;
|
||||
int g = (int)(normalvariate(gg,gg/4));
|
||||
int g;
|
||||
attrib *a = a_find(r->attribs, &at_horseluck);
|
||||
|
||||
if(a) gg *= log((double)(a->data.i)) + 1.0;
|
||||
g = (int)(normalvariate(gg,gg/4));
|
||||
|
||||
if(g > 0) {
|
||||
rsethorses(r, rhorses(r) + g);
|
||||
|
@ -2394,7 +2398,7 @@ renumber(void)
|
|||
case P_FACTION:
|
||||
s = getstrtoken();
|
||||
if(strlen(s)>4) s[4]=0;
|
||||
if (*s) {
|
||||
if (s && *s) {
|
||||
int i = atoi36(s);
|
||||
attrib * a = a_find(f->attribs, &at_number);
|
||||
if (!a) a = a_add(&f->attribs, a_new(&at_number));
|
||||
|
@ -2404,7 +2408,7 @@ renumber(void)
|
|||
|
||||
case P_UNIT:
|
||||
s = getstrtoken();
|
||||
if(*s == 0) {
|
||||
if(s == NULL || *s == 0) {
|
||||
i = newunitid();
|
||||
} else {
|
||||
i = atoi36(s);
|
||||
|
@ -2442,7 +2446,7 @@ renumber(void)
|
|||
continue;
|
||||
}
|
||||
s = getstrtoken();
|
||||
if(*s == 0) {
|
||||
if(s == NULL || *s == 0) {
|
||||
i = newcontainerid();
|
||||
} else {
|
||||
i = atoi36(s);
|
||||
|
@ -2690,7 +2694,6 @@ setdefaults (void)
|
|||
if (getparam() == P_TEMP) break;
|
||||
case K_BESIEGE:
|
||||
case K_ENTERTAIN:
|
||||
case K_FOLLOW:
|
||||
case K_RESEARCH:
|
||||
case K_SPY:
|
||||
case K_STEAL:
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: monster.c,v 1.9 2001/02/22 21:46:44 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -696,7 +695,6 @@ make_ponnuki(void)
|
|||
u = createunit(r, findfaction(MONSTER_FACTION), 1, RC_ILLUSION);
|
||||
u->irace = RC_GOBLIN;
|
||||
set_string(&u->name, "Ponnuki");
|
||||
u->age=-1000;
|
||||
set_string(&u->display, "Go, Ponnuki, Go.");
|
||||
uunhash(u);
|
||||
u->no = ponn;
|
||||
|
@ -861,6 +859,9 @@ plan_monsters(void)
|
|||
|
||||
if (u->faction->no != MONSTER_FACTION) continue;
|
||||
|
||||
/* Monster bekommen jede Runde ein paar Tage Wahrnehmung dazu */
|
||||
change_skill(u, SK_OBSERVATION, u->number * 10);
|
||||
|
||||
ta = a_find(u->attribs, &at_hate);
|
||||
if (ta && strncmp(u->lastorder, "WARTEN", 6) != 0) {
|
||||
unit * tu = (unit *)ta->data.v;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: randenc.c,v 1.9 2001/02/10 14:18:00 enno Exp $
|
||||
* $Id: randenc.c,v 1.10 2001/04/01 06:58:36 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -119,11 +119,19 @@ dissolve_units(void)
|
|||
}
|
||||
break;
|
||||
case 2:
|
||||
rsettrees(r, rtrees(r) + n);
|
||||
if (n == 1) {
|
||||
scat("wurde zum Baum.");
|
||||
}else{
|
||||
scat("wurden zu Bäumen.");
|
||||
if(r->land) {
|
||||
rsettrees(r, rtrees(r) + n);
|
||||
if (n == 1) {
|
||||
scat("wurde zum Baum.");
|
||||
}else{
|
||||
scat("wurden zu Bäumen.");
|
||||
}
|
||||
} else {
|
||||
if(n == 1) {
|
||||
scat("verfaulte in der feuchten Seeluft.");
|
||||
} else {
|
||||
scat("verfaulten in der feuchten Seeluft.");
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -1394,7 +1394,9 @@ order_template(FILE * F, faction * f)
|
|||
}
|
||||
}
|
||||
|
||||
if(u->lastorder[0]) {
|
||||
/* If the lastorder begins with an @ it should have
|
||||
* been printed in the loop before. */
|
||||
if(u->lastorder[0] != 0 && u->lastorder[0] != '@') {
|
||||
sprintf(buf, " %s", u->lastorder);
|
||||
rps_nowrap(F, buf);
|
||||
rnl(F);
|
||||
|
@ -1713,7 +1715,7 @@ report(FILE *F, faction * f)
|
|||
dh = 0;
|
||||
for(a=a_find(f->attribs, &at_faction_special); a; a=a->nexttype) {
|
||||
dh++;
|
||||
if(fspecials[a->data.sa[0]].levels) {
|
||||
if(fspecials[a->data.sa[0]].maxlevel) {
|
||||
sprintf(buf2, "%s (%d)", fspecials[a->data.sa[0]].name, a->data.sa[1]);
|
||||
} else {
|
||||
sprintf(buf2, "%s", fspecials[a->data.sa[0]].name);
|
||||
|
@ -3133,7 +3135,7 @@ writeadresses(void)
|
|||
if (!F) return;
|
||||
|
||||
for (f = factions; f; f = f->next) {
|
||||
if (f->no != MONSTER_FACTION) {
|
||||
if (f->no != MONSTER_FACTION && !nonplayer_race(f->race)) {
|
||||
fprintf(F, "%s:%s:%s\n", factionname(f), f->email, f->banner);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: spy.c,v 1.6 2001/02/22 21:46:44 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -107,23 +106,24 @@ setstealth(unit * u, strlist * S)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Dämomen können sich als anderer race tarnen */
|
||||
/* Pseudodrachen können sich nur als Drachen tarnen */
|
||||
|
||||
if (u->race == RC_DAEMON) {
|
||||
if ((t = findrace(s)) != NORACE && !race[t].nonplayer) {
|
||||
u->irace = t;
|
||||
t = findrace(s);
|
||||
if (t != NORACE) {
|
||||
if (u->race == RC_PSEUDODRAGON || u->race == RC_BIRTHDAYDRAGON) {
|
||||
if (t==RC_PSEUDODRAGON||t==RC_FIREDRAGON||t==RC_DRAGON||t==RC_WYRM) {
|
||||
u->irace = t;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Pseudodrachen auch */
|
||||
|
||||
if (u->race == RC_PSEUDODRAGON || u->race == RC_BIRTHDAYDRAGON) {
|
||||
t = findrace(s);
|
||||
if(t==RC_PSEUDODRAGON||t==RC_FIREDRAGON||t==RC_DRAGON||t==RC_WYRM) {
|
||||
u->irace = t;
|
||||
return;
|
||||
/* Dämomen und Illusionsparteien können sich als andere race tarnen */
|
||||
if (race[u->race].flags & RCF_SHAPESHIFT) {
|
||||
if (!race[t].nonplayer) {
|
||||
u->irace = t;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
switch(findparam(s)) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: study.c,v 1.8 2001/02/19 14:19:24 corwin Exp $
|
||||
* $Id: study.c,v 1.9 2001/04/01 06:58:37 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -456,9 +456,10 @@ learn(void)
|
|||
}
|
||||
}
|
||||
if (i == SK_ALCHEMY) {
|
||||
maxalchemy = get_skill(u, SK_ALCHEMY);
|
||||
if (maxalchemy==0 && count_skill(u->faction, SK_ALCHEMY) + u->number >
|
||||
max_skill(u->faction, SK_ALCHEMY)) {
|
||||
maxalchemy = eff_skill(u, SK_ALCHEMY, r);
|
||||
if (get_skill(u, SK_ALCHEMY)==0
|
||||
&& count_skill(u->faction, SK_ALCHEMY) + u->number >
|
||||
max_skill(u->faction, SK_ALCHEMY)) {
|
||||
sprintf(buf, "Es kann maximal %d Alchemisten pro Partei geben",
|
||||
max_skill(u->faction, SK_ALCHEMY));
|
||||
mistake(u, u->thisorder, buf, MSG_EVENT);
|
||||
|
@ -566,7 +567,7 @@ learn(void)
|
|||
for (ptype=potiontypes; ptype; ptype=ptype->next) {
|
||||
if (skill == ptype->level * 2) {
|
||||
attrib * a = a_find(f->attribs, &at_showitem);
|
||||
while (a && a->data.v != ptype) a=a->next;
|
||||
while (a && a->data.v != ptype) a=a->nexttype;
|
||||
if (!a) {
|
||||
a = a_add(&f->attribs, a_new(&at_showitem));
|
||||
a->data.v = (void*) ptype->itype;
|
||||
|
|
|
@ -9,19 +9,19 @@ CFG=items - Win32 Debug
|
|||
NMAKE
|
||||
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den\
|
||||
Befehl
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "items-5.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
|
||||
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "items-5.mak" CFG="items - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Für die Konfiguration stehen zur Auswahl:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "items - Win32 Release" (basierend auf "Win32 (x86) Static Library")
|
||||
!MESSAGE "items - Win32 Debug" (basierend auf "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
|
@ -70,7 +70,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
CFG=items - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "items-6.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "items-6.mak" CFG="items - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "items - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "items - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
|
@ -74,7 +74,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: lmsreward.c,v 1.2 2001/02/02 08:58:26 enno Exp $
|
||||
* $Id: lmsreward.c,v 1.3 2001/04/01 06:58:37 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -55,7 +55,8 @@ static attrib_type at_lmsstory = {
|
|||
age_lmsstory,
|
||||
a_writedefault,
|
||||
a_readdefault,
|
||||
ATF_UNIQUE | ATF_CURSE
|
||||
ATF_UNIQUE /* | ATF_CURSE */ /* Das geht nicht, weil der Inhalt
|
||||
des Attributs kein curse * ist */
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -86,7 +87,8 @@ item_type it_lmsreward = {
|
|||
ITF_NOTLOST|ITF_CURSED, 0, 0, /* flags, weight, capacity */
|
||||
0, NOSKILL, /* minskill, skill */
|
||||
NULL, /* construction */
|
||||
&use_lmsreward,
|
||||
NULL, /* anstelle von use_lmsreward */
|
||||
/* &use_lmsreward, */
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
|
@ -214,14 +214,15 @@ armedmen(const unit * u)
|
|||
if (!(urace(u)->flags & RCF_NOWEAPONS)) {
|
||||
if (urace(u)->ec_flags & CANGUARD) {
|
||||
/* kann ohne waffen bewachen: fuer untote und drachen */
|
||||
n = u->number;
|
||||
n = u->number;
|
||||
} else {
|
||||
/* alle Waffen werden gezaehlt, und dann wird auf die Anzahl
|
||||
* Personen minimiert */
|
||||
for (itm=u->items;itm;itm=itm->next) {
|
||||
const weapon_type * wtype = resource2weapon(itm->type->rtype);
|
||||
if (wtype==NULL) continue;
|
||||
if (effskill(u, wtype->skill) >= wtype->minskill) n += itm->number;
|
||||
if (effskill(u, wtype->skill) >= 1) n += itm->number;
|
||||
/* if (effskill(u, wtype->skill) >= wtype->minskill) n += itm->number; */
|
||||
if (n>u->number) break;
|
||||
}
|
||||
n = min(n, u->number);
|
||||
|
@ -528,12 +529,13 @@ reportcasualties(battle * b, fighter * fig)
|
|||
bfaction * bf;
|
||||
if (fig->alive == fig->unit->number)
|
||||
return;
|
||||
fbattlerecord(fig->unit->faction, fig->unit->region, " ");
|
||||
fbattlerecord(fig->unit->faction, b->region, " ");
|
||||
for (bf = b->factions;bf;bf=bf->next) {
|
||||
faction * f = bf->faction;
|
||||
struct message * m = new_message(f, "casualties%u:unit%r:runto%i:run%i:alive%i:fallen",
|
||||
fig->unit, fig->run.region, fig->run.number, fig->alive, fig->unit->number - fig->alive - fig->run.number);
|
||||
brecord(f, fig->unit->region, m);
|
||||
fig->unit, fig->run.region, fig->run.number, fig->alive,
|
||||
fig->unit->number - fig->alive - fig->run.number);
|
||||
brecord(f, b->region, m);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -558,8 +560,8 @@ contest(int skilldiff, armor_t ar, armor_t sh)
|
|||
p = rand() % 100;
|
||||
vw -= p;
|
||||
}
|
||||
while (vw > 0 && p >= 90);
|
||||
return (vw < 0);
|
||||
while (vw >= 0 && p >= 90);
|
||||
return (vw <= 0);
|
||||
}
|
||||
|
||||
static boolean
|
||||
|
@ -610,7 +612,7 @@ weapon_skill(const weapon_type * wtype, const unit * u, boolean attacking)
|
|||
if (skill < race[u->race].at_default) skill = race[u->race].at_default;
|
||||
} else {
|
||||
if (skill < race[u->race].df_default) skill = race[u->race].df_default;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* changed: if we own a weapon, we have at least a skill of 0 */
|
||||
|
@ -1784,8 +1786,8 @@ attack(battle *b, troop ta, att *a)
|
|||
int dead;
|
||||
standard_attack = wp->type->attack(&ta, &dead);
|
||||
af->catmsg += dead;
|
||||
/* TODO: dies hier ist nicht richtig. wenn die katapulte/etc.
|
||||
* keinen gegner gefunden haben, sollte es nicht erhöht werden.
|
||||
/* TODO: dies hier ist nicht richtig. wenn die katapulte/etc.
|
||||
* keinen gegner gefunden haben, sollte es nicht erhöht werden.
|
||||
* außerdem müsste allen gegenern der counter erhöht werden.
|
||||
*/
|
||||
if (af->person[ta.index].last_action < b->turn) {
|
||||
|
@ -2082,7 +2084,7 @@ loot_items(fighter * corpse)
|
|||
}
|
||||
|
||||
static void
|
||||
loot_fleeing(fighter* fig, unit* runner)
|
||||
loot_fleeing(fighter* fig, unit* runner)
|
||||
{
|
||||
/* TODO: Vernünftig fixen */
|
||||
runner->items = NULL;
|
||||
|
@ -2091,6 +2093,19 @@ loot_fleeing(fighter* fig, unit* runner)
|
|||
fig->run.items = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
merge_fleeloot(fighter* fig, unit* u)
|
||||
{
|
||||
item * itm = fig->run.items;
|
||||
item ** ip = &u->items;
|
||||
|
||||
while (itm) {
|
||||
i_add(ip, itm);
|
||||
itm = itm->next;
|
||||
}
|
||||
fig->run.items = NULL;
|
||||
}
|
||||
|
||||
static boolean
|
||||
seematrix(const faction * f, const side * s)
|
||||
{
|
||||
|
@ -2217,14 +2232,12 @@ aftermath(battle * b)
|
|||
|
||||
if (df->alive == du->number) continue; /* nichts passiert */
|
||||
|
||||
reportcasualties(b, df);
|
||||
scale_number(du, df->alive + df->run.number);
|
||||
du->hp = sum_hp + df->run.hp;
|
||||
|
||||
/* die weggerannten werden später subtrahiert! */
|
||||
assert(du->number >= 0);
|
||||
|
||||
/* Report the casualties */
|
||||
|
||||
if (df->run.hp) {
|
||||
/* Sonderbehandlung für sich auflösende Einheiten wie Wölfe,
|
||||
|
@ -2237,13 +2250,17 @@ aftermath(battle * b)
|
|||
continue;
|
||||
}
|
||||
if (df->alive == 0) {
|
||||
/* Zuerst dürfen die Feinde plündern, die mitgenommenen Items
|
||||
* stehen in fig->run.items. Dann werden die Fliehenden auf
|
||||
* die leere (tote) alte Einheit gemapt */
|
||||
if (fval(df,FIG_NOLOOT)){
|
||||
merge_fleeloot(df, du);
|
||||
} else {
|
||||
loot_items(df);
|
||||
loot_fleeing(df, du);
|
||||
}
|
||||
scale_number(du, df->run.number);
|
||||
du->hp = df->run.hp;
|
||||
/* Distribute Loot */
|
||||
if (!fval(df,FIG_NOLOOT)){
|
||||
loot_fleeing(df, du);
|
||||
loot_items(df);
|
||||
}
|
||||
} else {
|
||||
unit *nu = createunit(du->region, du->faction, df->run.number, du->race);
|
||||
skill_t sk;
|
||||
|
@ -2280,7 +2297,10 @@ aftermath(battle * b)
|
|||
setguard(du, GUARD_NONE);
|
||||
fset(du, FL_MOVED);
|
||||
leave(du->region, du);
|
||||
if (df->run.region) travel(r, du, df->run.region, 1);
|
||||
if (df->run.region) {
|
||||
travel(r, du, df->run.region, 1);
|
||||
df->run.region = du->region;
|
||||
}
|
||||
}
|
||||
else if (df->alive==0) { /* alle sind tot, niemand geflohen. Einheit auflösen */
|
||||
setguard(du, GUARD_NONE);
|
||||
|
@ -2289,8 +2309,11 @@ aftermath(battle * b)
|
|||
loot_items(df);
|
||||
}
|
||||
|
||||
/* Report the casualties */
|
||||
reportcasualties(b, df);
|
||||
|
||||
if (!nonplayer_race(du->race)) {
|
||||
/* tote im kampf werden zu regionsuntoten:
|
||||
/* tote im kampf werden zu regionsuntoten:
|
||||
* for each of them, a peasant will die as well */
|
||||
is += dead;
|
||||
}
|
||||
|
@ -2947,7 +2970,7 @@ make_battle(region * r)
|
|||
bdebug = gzopen(zFilename, "w");
|
||||
#elif HAVE_BZ2LIB
|
||||
sprintf(zFilename, "%s/battle-%d-%s.log.bz2", zText, obs_count, simplename(r));
|
||||
bdebug = BZ2_bzopen(zFilename, "w");+
|
||||
bdebug = BZ2_bzopen(zFilename, "w");+
|
||||
#else
|
||||
sprintf(zFilename, "%s/battle-%d-%s.log", zText, obs_count, simplename(r));
|
||||
bdebug = fopen(zFilename, "w");
|
||||
|
@ -3206,7 +3229,7 @@ join_allies(battle * b)
|
|||
extern struct item_type * i_silver;
|
||||
|
||||
void
|
||||
flee(const troop dt)
|
||||
flee(const troop dt)
|
||||
{
|
||||
fighter * fig = dt.fighter;
|
||||
unit * u = fig->unit;
|
||||
|
@ -3219,7 +3242,7 @@ flee(const troop dt)
|
|||
const item_type * itype = itm->type;
|
||||
int keep = 0;
|
||||
|
||||
if (itype->capacity>0 || fval(itype, ITF_ANIMAL)) {
|
||||
if (fval(itype, ITF_ANIMAL)) {
|
||||
/* Regeländerung: Man muß das Tier nicht reiten können,
|
||||
* um es vom Schlachtfeld mitzunehmen, ist ja nur
|
||||
* eine Region weit. * */
|
||||
|
@ -3229,8 +3252,16 @@ flee(const troop dt)
|
|||
/* if it doesn't weigh anything, it won't slow us down */
|
||||
keep = itm->number;
|
||||
}
|
||||
if (itm->number==keep && keep>0) {
|
||||
i_add(&fig->run.items, i_remove(ip, itm));
|
||||
/* jeder troop nimmt seinen eigenen Teil der Sachen mit */
|
||||
if (keep>0){
|
||||
if (itm->number==keep) {
|
||||
i_add(&fig->run.items, i_remove(ip, itm));
|
||||
} else {
|
||||
item *run_itm = i_new(itype);
|
||||
run_itm->number = keep;
|
||||
i_add(&fig->run.items, run_itm);
|
||||
i_change(ip, itype, -keep);
|
||||
}
|
||||
}
|
||||
if (*ip==itm) ip = &itm->next;
|
||||
}
|
||||
|
@ -3526,13 +3557,20 @@ do_battle(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* this has to be calculated before the actual attacks take
|
||||
* place because otherwise the dead would not strike the
|
||||
* round they die. */
|
||||
for (fi = b->fighters.begin; fi != b->fighters.end; ++fi) {
|
||||
fighter *fig = *fi;
|
||||
fig->fighting = fig->alive - fig->removed;
|
||||
}
|
||||
|
||||
for (fi = b->fighters.begin; fi != b->fighters.end; ++fi) {
|
||||
fighter *fig = *fi;
|
||||
|
||||
/* Kämpfer diese Runde: */
|
||||
fig->fighting = fig->alive - fig->removed;
|
||||
/* ist in dieser Einheit noch jemand handlungsfähig? */
|
||||
if (fig->fighting == 0) continue;
|
||||
if (fig->fighting <= 0) continue;
|
||||
|
||||
/* Taktikrunde: */
|
||||
if (b->turn == 0) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: build.c,v 1.9 2001/03/04 18:41:25 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -276,39 +275,60 @@ do_siege(void)
|
|||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
destroy_road(unit *u, int n, const char *cmd)
|
||||
{
|
||||
direction_t d = getdirection();
|
||||
unit *u2;
|
||||
region *r = u->region;
|
||||
|
||||
for (u2=r->units;u2;u2=u2->next) {
|
||||
if (u2->faction!=u->faction && getguard(u2)&GUARD_TAX &&
|
||||
!allied(u, u2->faction, HELP_GUARD)) {
|
||||
cmistake(u, cmd, 70, MSG_EVENT);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (d==NODIRECTION) {
|
||||
cmistake(u, cmd, 71, MSG_PRODUCE);
|
||||
} else {
|
||||
#if 0
|
||||
int salvage, divy = 2;
|
||||
#endif
|
||||
int willdo = min(n, (1+get_skill(u, SK_ROAD_BUILDING))*u->number);
|
||||
int road = rroad(r, d);
|
||||
region * r2 = rconnect(r,d);
|
||||
willdo = min(willdo, road);
|
||||
#if 0
|
||||
salvage = willdo / divy;
|
||||
change_item(u, I_STONE, salvage);
|
||||
#endif
|
||||
rsetroad(r, d, road - willdo);
|
||||
add_message(&u->faction->msgs, new_message(
|
||||
u->faction, "destroy_road%u:unit%r:from%r:to", u, r, r2));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
destroy(region * r, unit * u, const char * cmd)
|
||||
{
|
||||
ship *sh;
|
||||
unit *u2;
|
||||
int size = 0;
|
||||
#if 0
|
||||
const construction * con = NULL;
|
||||
int size = 0;
|
||||
#endif
|
||||
char *s;
|
||||
int n = INT_MAX;
|
||||
|
||||
if (u->number < 1)
|
||||
return;
|
||||
if (getparam()==P_ROAD) {
|
||||
direction_t d = getdirection();
|
||||
for (u2=r->units;u2;u2=u2->next) {
|
||||
if (u2->faction!=u->faction && getguard(u2)&GUARD_TAX &&
|
||||
!allied(u, u2->faction, HELP_GUARD)) {
|
||||
cmistake(u, cmd, 70, MSG_EVENT);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (d==NODIRECTION) cmistake(u, cmd, 71, MSG_PRODUCE);
|
||||
else {
|
||||
int salvage, divy = 2;
|
||||
int cando = (1+get_skill(u, SK_ROAD_BUILDING))*u->number;
|
||||
int road = rroad(r, d);
|
||||
region * r2 = rconnect(r,d);
|
||||
cando = min(cando, road);
|
||||
salvage = cando / divy;
|
||||
change_item(u, I_STONE, salvage);
|
||||
rsetroad(r, d, road - cando);
|
||||
add_message(&u->faction->msgs, new_message(
|
||||
u->faction, "destroy_road%u:unit%r:from%r:to", u, r, r2));
|
||||
|
||||
}
|
||||
s = getstrtoken();
|
||||
|
||||
if (findparam(s)==P_ROAD) {
|
||||
destroy_road(u, INT_MAX, cmd);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -317,43 +337,80 @@ destroy(region * r, unit * u, const char * cmd)
|
|||
return;
|
||||
}
|
||||
|
||||
if(s && *s) {
|
||||
n = atoi(s);
|
||||
if(n <= 0) {
|
||||
cmistake(u, cmd, 288, MSG_PRODUCE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(getparam() == P_ROAD) {
|
||||
destroy_road(u, n, cmd);
|
||||
return;
|
||||
}
|
||||
|
||||
if (u->building) {
|
||||
building *b = u->building;
|
||||
#if 0
|
||||
con = b->type->construction;
|
||||
size = b->size;
|
||||
/* befördere alle Einheiten hinaus */
|
||||
#endif
|
||||
|
||||
for (u2 = r->units; u2; u2 = u2->next)
|
||||
if (u2->building == b) {
|
||||
u2->building = 0;
|
||||
freset(u2, FL_OWNER);
|
||||
}
|
||||
add_message(&u->faction->msgs, new_message(
|
||||
u->faction, "destroy%b:building%u:unit", b, u));
|
||||
destroy_building(b);
|
||||
if(n >= b->size) {
|
||||
/* destroy completly */
|
||||
/* all units leave the building */
|
||||
for (u2 = r->units; u2; u2 = u2->next)
|
||||
if (u2->building == b) {
|
||||
u2->building = 0;
|
||||
freset(u2, FL_OWNER);
|
||||
}
|
||||
add_message(&u->faction->msgs, new_message(
|
||||
u->faction, "destroy%b:building%u:unit", b, u));
|
||||
destroy_building(b);
|
||||
} else {
|
||||
/* partial destroy */
|
||||
b->size -= n;
|
||||
add_message(&u->faction->msgs, new_message(
|
||||
u->faction, "destroy_partial%b:building%u:unit", b, u));
|
||||
}
|
||||
} else if (u->ship) {
|
||||
sh = u->ship;
|
||||
#if 0
|
||||
con = sh->type->construction;
|
||||
size = (sh->size * DAMAGE_SCALE - sh->damage) / DAMAGE_SCALE;
|
||||
#endif
|
||||
|
||||
if (rterrain(r) == T_OCEAN) {
|
||||
cmistake(u, cmd, 14, MSG_EVENT);
|
||||
return;
|
||||
}
|
||||
|
||||
for (u2 = r->units; u2; u2 = u2->next)
|
||||
if (u2->ship == sh) {
|
||||
u2->ship = 0;
|
||||
freset(u2, FL_OWNER);
|
||||
}
|
||||
add_message(&u->faction->msgs, new_message(
|
||||
u->faction, "shipdestroy%u:unit%r:region%h:ship", u, r, sh));
|
||||
|
||||
destroy_ship(sh, r);
|
||||
if(n >= (sh->size*100)/sh->type->construction->maxsize) {
|
||||
/* destroy completly */
|
||||
/* all units leave the ship */
|
||||
for (u2 = r->units; u2; u2 = u2->next)
|
||||
if (u2->ship == sh) {
|
||||
u2->ship = 0;
|
||||
freset(u2, FL_OWNER);
|
||||
}
|
||||
add_message(&u->faction->msgs, new_message(
|
||||
u->faction, "shipdestroy%u:unit%r:region%h:ship", u, r, sh));
|
||||
destroy_ship(sh, r);
|
||||
} else {
|
||||
/* partial destroy */
|
||||
sh->size -= (sh->type->construction->maxsize * n)/100;
|
||||
add_message(&u->faction->msgs, new_message(
|
||||
u->faction, "shipdestroy_partial%u:unit%r:region%h:ship", u, r, sh));
|
||||
}
|
||||
} else
|
||||
printf("* Fehler im Program! Die Einheit %s von %s\n"
|
||||
" (Spieler: %s) war owner eines objects,\n"
|
||||
" war aber weder in einer Burg noch in einem Schiff.\n",
|
||||
unitname(u), u->faction->name, u->faction->email);
|
||||
|
||||
#if 0
|
||||
/* Achtung: Nicht an ZERSTÖRE mit Punktangabe angepaßt! */
|
||||
if (con) {
|
||||
/* Man sollte alle Materialien zurückkriegen können: */
|
||||
int c;
|
||||
|
@ -364,6 +421,7 @@ destroy(region * r, unit * u, const char * cmd)
|
|||
change_resource(u, rq->type, recycle);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
|
@ -505,7 +563,7 @@ build(unit * u, const construction * ctype, int completed, int want)
|
|||
int made = 0;
|
||||
int basesk, effsk;
|
||||
|
||||
if (want==0) return 0;
|
||||
if (want<=0) return 0;
|
||||
if (type==NULL) return 0;
|
||||
if (type->improvement==NULL && completed==type->maxsize)
|
||||
return ECOMPLETE;
|
||||
|
@ -582,7 +640,6 @@ build(unit * u, const construction * ctype, int completed, int want)
|
|||
if (want>0)
|
||||
n = min(want, n);
|
||||
if (type->maxsize>0) {
|
||||
/* && type->improvement!=NULL) { */
|
||||
n = min(type->maxsize-completed, n);
|
||||
}
|
||||
|
||||
|
@ -671,8 +728,6 @@ build_building(unit * u, const building_type * btype, int want)
|
|||
int c, built = 0;
|
||||
building * b = getbuilding(r);
|
||||
/* einmalige Korrektur */
|
||||
static FILE *statfile = NULL;
|
||||
const construction *con = btype->construction;
|
||||
static char buffer[8 + IDSIZE + 1 + NAMESIZE + 1];
|
||||
const char *string2;
|
||||
|
||||
|
@ -706,7 +761,13 @@ build_building(unit * u, const building_type * btype, int want)
|
|||
}
|
||||
|
||||
if (b) built = b->size;
|
||||
if (want<=0) want = INT_MAX;
|
||||
if (want<=0 || want == INT_MAX) {
|
||||
if(b == NULL) {
|
||||
want = btype->maxsize - built;
|
||||
} else {
|
||||
want = b->type->maxsize - built;
|
||||
}
|
||||
}
|
||||
built = build(u, btype->construction, built, want);
|
||||
|
||||
switch (built) {
|
||||
|
@ -771,12 +832,6 @@ build_building(unit * u, const building_type * btype, int want)
|
|||
sprintf(buffer, "%s %d %s %s", keywords[K_MAKE], want-built, string2, buildingid(b));
|
||||
set_string(&u->lastorder, buffer);
|
||||
|
||||
/* einmalige Korrektur */
|
||||
if(turn==209 && con->maxsize > 0 && con->reqsize > 1)
|
||||
fprintf(statfile,"%d;%d;%d;%d\n",
|
||||
b->no, u->no, b->size, built);
|
||||
/* Korrektur ende */
|
||||
|
||||
b->size += built;
|
||||
if (b->type == &bt_lighthouse)
|
||||
update_lighthouse(b);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: eressea.c,v 1.25 2001/02/28 23:28:53 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -790,7 +789,7 @@ cansee(const faction * f, const region * r, const unit * u, int modifier)
|
|||
int n;
|
||||
boolean cansee = false;
|
||||
unit *u2;
|
||||
if (u->faction == f || f->race == RC_ILLUSION) cansee = true;
|
||||
if (u->faction == f || omniscient(f)) cansee = true;
|
||||
else if (u->race == RC_SPELL || u->number == 0) return false;
|
||||
else {
|
||||
n = eff_stealth(u, r) - modifier;
|
||||
|
@ -837,7 +836,7 @@ cansee(faction * f, region * r, unit * u, int modifier)
|
|||
#endif
|
||||
int n = 0;
|
||||
boolean ring = false;
|
||||
if (u->faction == f || f->race == RC_ILLUSION) return true;
|
||||
if (u->faction == f || omniscient(f)) return true;
|
||||
#if FAST_CANSEE /* buggy */
|
||||
if (lastr==r && lastf==f) {
|
||||
n = eff_stealth(u, r) - modifier;
|
||||
|
|
|
@ -662,7 +662,8 @@ enum {
|
|||
RC_GHOUL_LORD,
|
||||
|
||||
RC_MUS_SPIRIT, /* 58 */
|
||||
RC_GNOME, /* 59 */
|
||||
RC_GNOME, /* 59 */
|
||||
RC_TEMPLATE, /* 60 */
|
||||
|
||||
MAXRACES,
|
||||
NORACE = (race_t) - 1
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: karma.c,v 1.4 2001/03/07 15:00:18 corwin Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -73,7 +72,7 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"Schaden innerhalb einer Woche und zusätzlich in jeder Kampfrunde "
|
||||
"HP entsprechend ihres Ausdauer-Talents. Sie benötigen jedoch 11 "
|
||||
"Unterhalt pro Woche.",
|
||||
false
|
||||
1
|
||||
},
|
||||
{
|
||||
"Städter",
|
||||
|
@ -85,7 +84,7 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"bei einem Turm 1 Silber, bei einer Befestigung 3 Silber weniger. Gibt "
|
||||
"es kein entsprechendes Gebäude in der Region, verringert sich ihr "
|
||||
"Arbeitslohn um 5 Silber.",
|
||||
false
|
||||
1
|
||||
},
|
||||
{
|
||||
"Barbar",
|
||||
|
@ -96,7 +95,7 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"In allen nichtkriegerischen Talenten einschließlich Magie und Taktik "
|
||||
"erhalten sie die entsprechende Anzahl von Lerntagen weniger pro "
|
||||
"Lernwoche.",
|
||||
true
|
||||
100
|
||||
},
|
||||
/* TODO: Noch nicht so implementiert. */
|
||||
{
|
||||
|
@ -110,7 +109,7 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"Ein junger Drache benötigt 1000 Silber Unterhalt pro Woche, ein "
|
||||
"ausgewachsener Drache 5000 und ein Wyrm 10000 Silber. Bekommt er "
|
||||
"dieses Silber nicht, besteht eine Wahrscheinlichkeit, das er desertiert!",
|
||||
true
|
||||
100
|
||||
},
|
||||
/* TODO: Relativ sinnlose Eigenschaft. */
|
||||
{
|
||||
|
@ -118,7 +117,7 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"Alle Personen dieser Partei beginnen mit 30 Talenttagen in allen "
|
||||
"Waffentalenten, in denen ihre Rasse keinen Malus hat. Zusätzliche "
|
||||
"Stufen bringen jeweils einen zusätzlichen Talentpunkt.",
|
||||
true
|
||||
100
|
||||
},
|
||||
{
|
||||
"Feenreich",
|
||||
|
@ -128,7 +127,7 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"solche Waffe nehmen sie einen zusätzlichen Schadenspunkt. Zusätzliche "
|
||||
"Stufen dieser Eigenschaft verringern das Gewicht auf 1/3, 1/4, ... und "
|
||||
"erhöhen den Schaden durch Eisenwaffen um einen weiteren Punkt.",
|
||||
true
|
||||
100
|
||||
},
|
||||
{
|
||||
"Administrator",
|
||||
|
@ -137,7 +136,7 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"so dass sich der Unterhalt pro Person um 1 Silberstück erhöht. Weitere "
|
||||
"Stufen der Eigenschaft erhöhen das Limit um weitere 400 Einheiten und "
|
||||
"den Unterhalt um ein weiteres Silberstück.",
|
||||
true
|
||||
100
|
||||
},
|
||||
/* TODO: Noch nicht so implementiert */
|
||||
{
|
||||
|
@ -147,8 +146,14 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"wie eigene Einheiten, mit allen Talentwerten und Gegenständen. Leider "
|
||||
"führt eine so intensive Beschäftigung mit dem Geistigen zur körperlichen "
|
||||
"Verkümmerung, und die Partei erhält -1 auf alle Talente außer "
|
||||
"Alchemie, Kräuterkunde, Magie, Spionage, Tarnung und Wahrnehmung.",
|
||||
false
|
||||
"Alchemie, Kräuterkunde, Magie, Spionage, Tarnung und Wahrnehmung. Wird "
|
||||
"diese Eigenschaft ein zweites Mal erworben, so bleibt die Wirkung nicht "
|
||||
"auf Magier beschränkt, sondern alle Einheiten einer Partei können "
|
||||
"die Talente und Gegenstände aller fremden Einheiten sehen. Allerdings "
|
||||
"gibt es in beiden Fällen eine Einschränkung: Die Einheit muß sich einen "
|
||||
"Monat lang auf die psychischen Ströme einer Region einstellen, bevor "
|
||||
"sie in der Lage ist, die Gedanken der anderen zu lesen.",
|
||||
2
|
||||
},
|
||||
{
|
||||
"Amphibium",
|
||||
|
@ -157,7 +162,7 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"Ozeanfeld stehen. Pferde weigern sich, in ein Ozeanfeld zu laufen. "
|
||||
"Zusätzliche Stufen dieser Eigenschaft reduzieren den Schaden um jeweils "
|
||||
"5 Punkte. Achtung: Auf dem Ozean wird kein Schaden regeneriert.",
|
||||
true
|
||||
3
|
||||
},
|
||||
/* TODO: negative Eigenschaft */
|
||||
{
|
||||
|
@ -165,14 +170,14 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"Eine Partei mit dieser Eigenschaft hat eine so hohe magische "
|
||||
"Affinität, dass sie pro Stufe der Eigenschaft zwei zusätzlich Magier "
|
||||
"ausbilden kann.",
|
||||
true
|
||||
100
|
||||
},
|
||||
/* TODO: negative Eigenschaft */
|
||||
{
|
||||
"Sappeur",
|
||||
"Befestigungen wirken gegen Einheiten einer Partei mit dieser "
|
||||
"Eigenschaft nur mit ihrer halben Schutzwirkung (aufgerundet).",
|
||||
false
|
||||
1
|
||||
},
|
||||
/* TODO: Noch nicht implementiert */
|
||||
{
|
||||
|
@ -185,7 +190,7 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"versetzen. Zusätzliche Stufen erhöhen die Reichweite um jeweils "
|
||||
"eine Region, erhöhen jedoch die Wahrscheinlichkeit eines zufälligen "
|
||||
"Versetzens geringfügig.",
|
||||
true
|
||||
100
|
||||
},
|
||||
{
|
||||
"Versteckt",
|
||||
|
@ -197,7 +202,7 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"Um diese Eigenschaft steuern zu können, stehen diesen Parteien die "
|
||||
"Befehle TARNE ANZAHL [NICHT] und TARNE GEGENSTÄNDE [NICHT] zur "
|
||||
"Verfügung.",
|
||||
false
|
||||
1
|
||||
},
|
||||
/* TODO: Noch nicht implementiert */
|
||||
{
|
||||
|
@ -206,14 +211,14 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"sich mit Hilfe eines speziellen Befehls jede Woche um eine Region "
|
||||
"bewegen. Dies macht es den Bewohnern jedoch unmöglich, in dieser "
|
||||
"Woche ihren normalen Tätigkeiten nachzugehen.",
|
||||
false
|
||||
1
|
||||
},
|
||||
{
|
||||
"Magische Immunität",
|
||||
"Eine Partei mit dieser Eigenschaft ist völlig immun gegen alle Arten "
|
||||
"von Magie. Allerdings verlieren die Magier einer solchen Partei ihre "
|
||||
"Fähigkeit, Aura zu regenerieren, völlig.",
|
||||
false
|
||||
1
|
||||
},
|
||||
/* TODO: Noch nicht implementiert */
|
||||
{
|
||||
|
@ -221,7 +226,7 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"Eine Partei mit dieser Eigenschaft kann einen ihrer Magier in einem "
|
||||
"anderen als dem Parteimagiegebiet ausbilden. Weitere Stufen ermöglichen "
|
||||
"jeweils einem weiteren Magier das Lernen eines anderen Gebiets.",
|
||||
true
|
||||
100
|
||||
},
|
||||
{
|
||||
"Jihad",
|
||||
|
@ -235,7 +240,7 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"oder eine Rasse mehrfach, in diesem Fall addiert sich die Wirkung. "
|
||||
"Ein einmal erklärter Jihad kann nicht wieder rückgängig gemacht "
|
||||
"werden.",
|
||||
true
|
||||
100
|
||||
},
|
||||
/* TODO: is_undead() und Sonderbehandlungen von Untoten */
|
||||
{
|
||||
|
@ -244,7 +249,7 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = {
|
|||
"soviele Trefferpunkte wie normale Angehörige der entsprechenden Rasse, "
|
||||
"verlieren jedoch ihre Fähigkeit zur Regeneration erlittenen Schadens "
|
||||
"komplett.",
|
||||
false
|
||||
100
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -275,7 +280,7 @@ buy_special(unit *u, strlist *S, fspecial_t special)
|
|||
/* Alles ok, attribut geben */
|
||||
|
||||
if(a2) {
|
||||
if(fspecials[special].levels) {
|
||||
if(a2->data.sa[1] < fspecials[special].maxlevel) {
|
||||
a2->data.sa[1]++;
|
||||
add_message(&f->msgs, new_message(f,
|
||||
"new_fspecial_level%S:special%d:level", special, a2->data.sa[1]));
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: karma.h,v 1.3 2001/02/28 18:25:25 corwin Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -46,9 +45,9 @@ typedef enum {
|
|||
|
||||
typedef struct fspecialdata fspecialdata;
|
||||
struct fspecialdata {
|
||||
const char *name;
|
||||
const char *description;
|
||||
boolean levels;
|
||||
const char *name;
|
||||
const char *description;
|
||||
const short maxlevel;
|
||||
};
|
||||
|
||||
extern struct attrib_type at_faction_special;
|
||||
|
|
|
@ -9,19 +9,19 @@ CFG=kernel - Win32 Debug
|
|||
NMAKE
|
||||
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den\
|
||||
Befehl
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "kernel-5.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
|
||||
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "kernel-5.mak" CFG="kernel - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Für die Konfiguration stehen zur Auswahl:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "kernel - Win32 Release" (basierend auf "Win32 (x86) Static Library")
|
||||
!MESSAGE "kernel - Win32 Debug" (basierend auf "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
|
@ -70,7 +70,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Debug\kernel.lib"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -7,21 +7,21 @@
|
|||
CFG=kernel - Win32 Conversion
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "kernel-6.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "kernel-6.mak" CFG="kernel - Win32 Conversion"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "kernel - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "kernel - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "kernel - Win32 Conversion" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "kernel - Win32 Profile" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
|
@ -122,7 +122,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: movement.c,v 1.15 2001/03/04 18:41:25 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -137,7 +136,6 @@ getdirection(void)
|
|||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
#ifdef NEW_DRIVE
|
||||
static attrib_type at_driveweight = {
|
||||
"driveweight", NULL, NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
@ -151,7 +149,6 @@ eff_weight(const unit *u)
|
|||
|
||||
return weight(u);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
ridingcapacity(unit * u)
|
||||
|
@ -248,11 +245,7 @@ canwalk(unit * u)
|
|||
if (pferde > maxpferde)
|
||||
return 2;
|
||||
|
||||
#ifdef NEW_DRIVE
|
||||
if (walkingcapacity(u) - eff_weight(u) >= 0)
|
||||
#else
|
||||
if (walkingcapacity(u) - weight(u) >= 0)
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
/* Stimmt das Gewicht, impliziert dies hier, daß alle Wagen ohne
|
||||
|
@ -316,11 +309,7 @@ canride(unit * u)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef NEW_DRIVE
|
||||
if(ridingcapacity(u) - eff_weight(u) >= 0) {
|
||||
#else
|
||||
if(ridingcapacity(u) - weight(u) >= 0) {
|
||||
#endif
|
||||
if(pferde == 0 && unicorns >= u->number && !(race[u->race].flags & RCF_HORSE)) {
|
||||
return 2;
|
||||
}
|
||||
|
@ -767,20 +756,47 @@ cycle_route(unit *u, int gereist)
|
|||
set_string(&u->lastorder, neworder);
|
||||
}
|
||||
|
||||
#ifdef NEW_DRIVE
|
||||
void
|
||||
init_drive(void)
|
||||
{
|
||||
region *r;
|
||||
unit *u, *ut, *u2;
|
||||
strlist *S, *St;
|
||||
strlist *S;
|
||||
int w;
|
||||
|
||||
/* This function calculates the weights of all transported units and
|
||||
* adds them to an internal counter which is used by travel() to
|
||||
* calculate effective weight and movement. */
|
||||
|
||||
for (r=regions; r; r=r->next) {
|
||||
/* This is just a simple check for non-corresponding K_TRANSPORT/
|
||||
* K_DRIVE. This is time consuming for an error check, but there
|
||||
* doesn't seem to be an easy way to speed this up. */
|
||||
|
||||
for(u=r->units; u; u=u->next) {
|
||||
if(igetkeyword(u->thisorder) == K_DRIVE && !fval(u, FL_LONGACTION)) {
|
||||
boolean found = false;
|
||||
ut = getunit(r, u);
|
||||
if(!ut) {
|
||||
cmistake(u, findorder(u, u->thisorder), 64, MSG_MOVE);
|
||||
continue;
|
||||
}
|
||||
for (S = ut->orders; S; S = S->next) if (igetkeyword(S->s) == K_TRANSPORT) {
|
||||
if(getunit(r, ut) == u) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(found == false) {
|
||||
if(cansee(u->faction, r, ut, 0)) {
|
||||
cmistake(u, findorder(u, u->thisorder), 286, MSG_MOVE);
|
||||
} else {
|
||||
cmistake(u, findorder(u, u->thisorder), 64, MSG_MOVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* This calculates the weights of all transported units and
|
||||
* adds them to an internal counter which is used by travel() to
|
||||
* calculate effective weight and movement. */
|
||||
|
||||
for (u=r->units; u; u=u->next) {
|
||||
w = 0;
|
||||
|
||||
|
@ -788,7 +804,7 @@ init_drive(void)
|
|||
ut = getunit(r, u);
|
||||
if(!ut) continue;
|
||||
|
||||
for (St = ut->orders; St; St = St->next) if (igetkeyword(St->s) == K_DRIVE) {
|
||||
if (igetkeyword(ut->thisorder) == K_DRIVE && !fval(ut, FL_LONGACTION)) {
|
||||
u2 = getunit(r, u);
|
||||
if(u2 == u) {
|
||||
w += weight(ut);
|
||||
|
@ -801,7 +817,6 @@ init_drive(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int *storms;
|
||||
|
||||
|
@ -863,9 +878,6 @@ travel(region * first, unit * u, region * next, int flucht)
|
|||
region *rv[MAXSPEED];
|
||||
strlist *S;
|
||||
unit *ut, *u2;
|
||||
#ifndef NEW_DRIVE
|
||||
int restkapazitaet;
|
||||
#endif
|
||||
int gereist = 0;
|
||||
char buf2[80];
|
||||
static direction_t route[MAXSPEED];
|
||||
|
@ -880,7 +892,9 @@ travel(region * first, unit * u, region * next, int flucht)
|
|||
* Normalerweise verliert man 3 BP pro Region, bei Straßen nur 2 BP.
|
||||
* Außerdem: Wenn Einheit transportiert, nur halbe BP */
|
||||
|
||||
if (!dragon(u) && rterrain(next) == T_OCEAN && (u->ship || rterrain(current)==T_OCEAN)) {
|
||||
if (rterrain(current)==T_OCEAN
|
||||
&& !(race[u->race].flags&(RCF_FLY) && rterrain(next)!=T_OCEAN))
|
||||
{ /* Die Einheit kann nicht fliegen, ist im Ozean, und will an Land */
|
||||
if (u->race != RC_AQUARIAN)
|
||||
{
|
||||
cmistake(u, findorder(u, u->thisorder), 44, MSG_MOVE);
|
||||
|
@ -891,7 +905,7 @@ travel(region * first, unit * u, region * next, int flucht)
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (rterrain(current)!=T_OCEAN) {
|
||||
/* An Land kein NACH wenn in dieser Runde Schiff VERLASSEN! */
|
||||
if (leftship(u) && is_guarded(current, u, GUARD_LANDING)) {
|
||||
cmistake(u, findorder(u, u->thisorder), 70, MSG_MOVE);
|
||||
|
@ -901,9 +915,7 @@ travel(region * first, unit * u, region * next, int flucht)
|
|||
cmistake(u, findorder(u, u->thisorder), 143, MSG_MOVE);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (rterrain(next) == T_OCEAN && u->ship && u->ship->moved == 1) {
|
||||
} else if (rterrain(next) == T_OCEAN && u->ship && u->ship->moved == 1) {
|
||||
cmistake(u, findorder(u, u->thisorder), 13, MSG_MOVE);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1125,67 +1137,46 @@ travel(region * first, unit * u, region * next, int flucht)
|
|||
|
||||
/* und jetzt noch die transportierten Einheiten verschieben */
|
||||
|
||||
#ifndef NEW_DRIVE
|
||||
if (canride(u)) {
|
||||
restkapazitaet = ridingcapacity(u) - weight(u);
|
||||
} else {
|
||||
restkapazitaet = walkingcapacity(u) - weight(u);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (S = u->orders; S; S = S->next) {
|
||||
if (igetkeyword(S->s) == K_TRANSPORT) {
|
||||
|
||||
ut = getunit(first, u);
|
||||
|
||||
if (ut) {
|
||||
boolean found = false;
|
||||
strlist * ot;
|
||||
for(ot=ut->orders;ot && !found;ot = ot->next) {
|
||||
if (igetkeyword(ot->s) == K_DRIVE) {
|
||||
u2 = getunit(first, ut);
|
||||
if (!u2) {
|
||||
cmistake(ut, ut->thisorder, 64, MSG_MOVE);
|
||||
continue;
|
||||
} else {
|
||||
#ifndef NEW_DRIVE
|
||||
restkapazitaet -= weight(ut);
|
||||
if (restkapazitaet >= 0) {
|
||||
#endif
|
||||
add_message(&u->faction->msgs, new_message(
|
||||
u->faction, "transport%u:unit%u:target%r:start%r:end",
|
||||
u, ut, first, current));
|
||||
|
||||
if(!(terrain[current->terrain].flags & WALK_INTO)
|
||||
&& get_item(ut, I_HORSE)) {
|
||||
cmistake(ut, ut->thisorder, 67, MSG_MOVE);
|
||||
continue;
|
||||
}
|
||||
if(can_survive(ut, current)) {
|
||||
for (i = 0; i != m; i++)
|
||||
travelthru(ut, rv[i]);
|
||||
move_unit(ut, current, NULL);
|
||||
} else {
|
||||
cmistake(ut, ut->thisorder, 230, MSG_MOVE);
|
||||
continue;
|
||||
}
|
||||
#ifndef NEW_DRIVE
|
||||
} else {
|
||||
sprintf(buf, "Keine Transportkapazitäten"
|
||||
" frei für %s und deren Gepäck.", unitname(ut));
|
||||
mistake(u, u->thisorder, buf, MSG_MOVE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (igetkeyword(ut->thisorder) == K_DRIVE
|
||||
&& !fval(ut, FL_LONGACTION)) {
|
||||
u2 = getunit(first, ut);
|
||||
if(u2 == u) {
|
||||
found = true;
|
||||
add_message(&u->faction->msgs, new_message(
|
||||
u->faction, "transport%u:unit%u:target%r:start%r:end",
|
||||
u, ut, first, current));
|
||||
if(!(terrain[current->terrain].flags & WALK_INTO)
|
||||
&& get_item(ut, I_HORSE)) {
|
||||
cmistake(u, u->thisorder, 67, MSG_MOVE);
|
||||
cmistake(ut, ut->thisorder, 67, MSG_MOVE);
|
||||
continue;
|
||||
}
|
||||
if(can_survive(ut, current)) {
|
||||
for (i = 0; i != m; i++)
|
||||
travelthru(ut, rv[i]);
|
||||
move_unit(ut, current, NULL);
|
||||
} else {
|
||||
cmistake(u, u->thisorder, 287, MSG_MOVE);
|
||||
cmistake(ut, ut->thisorder, 230, MSG_MOVE);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
if(cansee(u->faction, u->region, ut, 0)) {
|
||||
cmistake(u, findorder(u, u->thisorder), 90, MSG_MOVE);
|
||||
} else {
|
||||
cmistake(u, findorder(u, u->thisorder), 64, MSG_MOVE);
|
||||
}
|
||||
}
|
||||
if (!found) cmistake(u, u->thisorder, 90, MSG_MOVE);
|
||||
} else {
|
||||
if (ut) {
|
||||
sprintf(buf,
|
||||
"Konnte %s in dieser Region nicht finden.", unitname(ut));
|
||||
mistake(u, u->thisorder, buf, MSG_MOVE);
|
||||
cmistake(u, findorder(u, u->thisorder), 64, MSG_MOVE);
|
||||
} else {
|
||||
cmistake(u, findorder(u, u->thisorder), 99, MSG_MOVE);
|
||||
}
|
||||
|
@ -1990,9 +1981,7 @@ movement(void)
|
|||
region *r;
|
||||
|
||||
/* Initialize the additional encumbrance by transported units */
|
||||
#ifdef NEW_DRIVE
|
||||
init_drive();
|
||||
#endif
|
||||
|
||||
for (r = regions; r; r = r->next) {
|
||||
unit ** up = &r->units;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: plane.c,v 1.3 2001/02/17 14:47:42 enno Exp $
|
||||
* $Id: plane.c,v 1.4 2001/04/01 06:58:40 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -148,7 +148,6 @@ plane_center_x(plane *pl)
|
|||
|
||||
int
|
||||
plane_center_y(plane *pl)
|
||||
|
||||
{
|
||||
if(pl == NULL)
|
||||
return 0;
|
||||
|
@ -156,8 +155,8 @@ plane_center_y(plane *pl)
|
|||
return(pl->miny + pl->maxy)/2;
|
||||
}
|
||||
|
||||
int region_x(const region *r, const faction *f)
|
||||
|
||||
int
|
||||
region_x(const region *r, const faction *f)
|
||||
{
|
||||
plane *pl;
|
||||
|
||||
|
@ -165,8 +164,8 @@ int region_x(const region *r, const faction *f)
|
|||
return r->x - ursprung_x(f, pl) - plane_center_x(pl);
|
||||
}
|
||||
|
||||
int region_y(const region *r, const faction *f)
|
||||
|
||||
int
|
||||
region_y(const region *r, const faction *f)
|
||||
{
|
||||
plane *pl;
|
||||
|
||||
|
@ -176,7 +175,6 @@ int region_y(const region *r, const faction *f)
|
|||
|
||||
void
|
||||
set_ursprung(faction *f, int id, int x, int y)
|
||||
|
||||
{
|
||||
ursprung *ur;
|
||||
|
||||
|
@ -219,7 +217,7 @@ create_new_plane(int id, const char *name, int minx, int maxx, int miny, int max
|
|||
|
||||
/* Umrechnung Relative-Absolute-Koordinaten */
|
||||
int
|
||||
rel_to_abs(struct plane *pl, struct faction * f, int rel, unsigned char index)
|
||||
rel_to_abs(const struct plane *pl, const struct faction * f, int rel, unsigned char index)
|
||||
{
|
||||
assert(index == 0 || index == 1);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: plane.h,v 1.4 2001/02/17 14:47:42 enno Exp $
|
||||
* $Id: plane.h,v 1.5 2001/04/01 06:58:40 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -63,7 +63,7 @@ int ursprung_y(const struct faction *f, const plane *pl);
|
|||
void set_ursprung(struct faction *f, int id, int x, int y);
|
||||
plane * create_new_plane(int id, const char *name, int minx, int maxx, int miny, int maxy, int flags);
|
||||
plane * getplanebyname(const char *);
|
||||
extern int rel_to_abs(struct plane *pl, struct faction * f, int rel, unsigned char index);
|
||||
extern int rel_to_abs(const struct plane *pl, const struct faction * f, int rel, unsigned char index);
|
||||
|
||||
extern void * resolve_plane(void * data);
|
||||
extern void write_plane_reference(const plane * p, FILE * F);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: race.c,v 1.8 2001/02/28 18:25:25 corwin Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -46,6 +45,7 @@
|
|||
|
||||
/* libc includes */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
/* TODO: Tragkraft in die Struktur */
|
||||
|
@ -263,7 +263,7 @@ struct racedata race[MAXRACES] =
|
|||
1, 0, 0, 0, -1, 1,-3, 1, -2, 1, 1, 0, -99
|
||||
},
|
||||
false,
|
||||
RCF_WALK | RCF_LEARN | RCF_MOVERANDOM | RCF_ATTACKRANDOM,
|
||||
RCF_WALK | RCF_LEARN | RCF_MOVERANDOM | RCF_ATTACKRANDOM | RCF_SHAPESHIFT,
|
||||
BF_EQUIPMENT | BF_MAGIC_EQUIPMENT,
|
||||
GIVEITEM | GIVEPERSON | GIVEUNIT | GETITEM,
|
||||
{RC_IMP, RC_IMP, RC_WRAITH, RC_RAT, RC_WARG, RC_IMP}
|
||||
|
@ -479,7 +479,7 @@ struct racedata race[MAXRACES] =
|
|||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
true,
|
||||
( RCF_FLY | RCF_WALK | RCF_NOTEACH),
|
||||
( RCF_FLY | RCF_WALK | RCF_NOTEACH | RCF_SHAPESHIFT ),
|
||||
0,
|
||||
GIVEITEM | GIVEPERSON | GETITEM,
|
||||
{NORACE,NORACE,NORACE,NORACE,NORACE,NORACE}
|
||||
|
@ -613,7 +613,7 @@ struct racedata race[MAXRACES] =
|
|||
},
|
||||
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
true, RCF_CANNOTMOVE|RCF_NOLEARN|RCF_NOTEACH, 0,
|
||||
true, RCF_CANNOTMOVE|RCF_NOLEARN|RCF_NOTEACH|RCF_NOWEAPONS, 0,
|
||||
0,
|
||||
{NORACE,NORACE,NORACE,NORACE,NORACE,NORACE}
|
||||
},
|
||||
|
@ -1136,12 +1136,12 @@ struct racedata race[MAXRACES] =
|
|||
Alc,Arm,Ber,Bog, Bur,Han,Hol,Kat, Kräu,Mag,Pfer,Rei, Rüs,Sbau,Hie,Seg,
|
||||
Sta,Spi,Stei,Str, Tak,Tar,Unt,Waf, Wag,Wahr,Steu,Aus, WlK */
|
||||
{
|
||||
0, 1,-3, 1, -2, 1, 0,-2, 1, 0, 4, 0, -1,-3, 0,-3,
|
||||
1,-1,-1, 0, 0,-1, 0, 1, 1, 1, 1, 0, 0
|
||||
0, 1,-3, 1, -2, 1, 0,-2, 1, 0, 4, 0, -1,-4, 0,-4,
|
||||
1,-1,-1, 0, 0,-1, 0, 1, 1, 0, 1, 0, 0
|
||||
},
|
||||
|
||||
/* Nonplayer (bei Gelegenheit entfernen) */
|
||||
true,
|
||||
false,
|
||||
|
||||
/* Flags */
|
||||
RCF_WALK | RCF_LEARN | RCF_MOVERANDOM | RCF_ATTACKRANDOM | RCF_HORSE,
|
||||
|
@ -1765,6 +1765,39 @@ struct racedata race[MAXRACES] =
|
|||
/* Vertraute für den Zauber
|
||||
(Generisch, Illaun, Tybied, Cerddor, Gwyrrd, Draig) */
|
||||
{NORACE,NORACE,NORACE,NORACE,NORACE,NORACE}
|
||||
},
|
||||
/* Template */
|
||||
{
|
||||
/* const char *name[4] */
|
||||
{"Schablone", "Schablonen", "Schablonen", NULL},
|
||||
1.0, /* Magieresistenz (0=Normal) */
|
||||
0.0, /* Maximale Aura (1=Durchschnitt) */
|
||||
0.0, /* Auraregeneration (1=Durchschnitt) */
|
||||
1, 0, /* Rekrutierungskosten, Unterhalt pro Runde */
|
||||
10000, /* Splitsize */
|
||||
0, /* Gewicht */
|
||||
10.0, /* Multiplikator Geschwindigkeit */
|
||||
10, /* Trefferpunkte */
|
||||
"1d4", /* Schaden AT_STANDARD unbewaffnet */
|
||||
0, /* Natürliche Rüstung */
|
||||
-2, -2, /* Angriff, Verteidigung unbewaffnet */
|
||||
0, 0, /* Bonus Angriff, Verteidigung */
|
||||
{ /* Angriffe */
|
||||
{AT_STANDARD, {NULL}, 0}, {AT_NONE, {NULL}, 0}, {AT_NONE, {NULL}, 0},
|
||||
{AT_NONE, {NULL}, 0}, {AT_NONE, {NULL}, 0}, {AT_NONE, {NULL}, 0},
|
||||
},
|
||||
{ /* Talentboni */
|
||||
/* Alc,Arm,Ber,Bog, Bur,Han,Hol,Kat, Krä,Mag,Pfe,Rei, Rüs,Sba,Hie,Seg, */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* Sta,Spi,Ste,Str, Tak,Tar,Unt,Waf, Wag,Wah,Ste,Aus, WlK */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
true, /* Nonplayer (bei Gelegenheit entfernen) */
|
||||
(RCF_SHAPESHIFT | RCF_FLY | RCF_WALK | RCF_LEARN | RCF_MOVERANDOM | RCF_ATTACKRANDOM), /* flags */
|
||||
(BF_EQUIPMENT | BF_MAGIC_EQUIPMENT), /* battle */
|
||||
(CANGUARD | GIVEITEM | GIVEPERSON | GIVEUNIT | GETITEM), /* economy */
|
||||
/* Vertraute für den Zauber (Gen, Ill, Tyb, Cer, Gwy, Dra) */
|
||||
{NORACE,NORACE,NORACE,NORACE,NORACE,NORACE}
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -1861,6 +1894,9 @@ give_starting_equipment(struct region *r, struct unit *u)
|
|||
}
|
||||
set_skill(u, SK_SAILING, 30);
|
||||
break;
|
||||
case RC_CENTAUR:
|
||||
rsethorses(r, 250+rand()%51+rand()%51);
|
||||
break;
|
||||
}
|
||||
|
||||
set_money(u, 2000 + turn * 10);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#define AT_COMBATSPELL 7
|
||||
#define AT_STRUCTURAL 8
|
||||
|
||||
#define GOLEM_IRON 5 /* Anzahl Eisen in einem Eisengolem */
|
||||
#define GOLEM_IRON 4 /* Anzahl Eisen in einem Eisengolem */
|
||||
#define GOLEM_STONE 5 /* Anzahl Steine in einem Steingolem */
|
||||
|
||||
typedef struct att {
|
||||
|
@ -96,6 +96,7 @@ typedef struct race_type {
|
|||
#define RCF_ABSORBPEASANTS (1<<15) /* Tötet und absorbiert Bauern */
|
||||
#define RCF_NOHEAL (1<<16) /* Einheit kann nicht geheilt werden */
|
||||
#define RCF_NOWEAPONS (1<<17) /* Einheit kann keine Waffen bneutzen */
|
||||
#define RCF_SHAPESHIFT (1<<18) /* Kann TARNE RASSE benutzen. */
|
||||
|
||||
/* Economic flags */
|
||||
#define NOGIVE (1<<0) /* gibt niemals nix */
|
||||
|
@ -122,9 +123,9 @@ typedef struct race_type {
|
|||
/* Wird in die Rückzugsberechnung nicht einbezogen */
|
||||
#define BF_RES_PIERCE (1<<6)
|
||||
/* Halber Schaden durch PIERCE */
|
||||
#define BF_RES_CUT (1<<6)
|
||||
#define BF_RES_CUT (1<<7)
|
||||
/* Halber Schaden durch CUT */
|
||||
#define BF_RES_BASH (1<<6)
|
||||
#define BF_RES_BASH (1<<8)
|
||||
/* Halber Schaden durch BASH */
|
||||
|
||||
extern struct racedata race[];
|
||||
|
@ -138,6 +139,7 @@ boolean is_undead(const struct unit *u);
|
|||
#define nonplayer(u) (race[(u)->race].nonplayer)
|
||||
#define nonplayer_race(r) (race[r].nonplayer)
|
||||
#define illusionary(u) ((u)->race==RC_ILLUSION)
|
||||
#define omniscient(f) ((f)->race==RC_ILLUSION || (f)->race==RC_TEMPLATE)
|
||||
|
||||
extern boolean allowed_dragon(const struct region * src, const struct region * target);
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: reports.c,v 1.8 2001/03/07 15:00:18 corwin Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -267,7 +266,7 @@ bufunit(const faction * f, const unit * u, int indent,
|
|||
}
|
||||
|
||||
dh = 0;
|
||||
if (f == u->faction || telepath_see || u->faction->race==RC_ILLUSION) {
|
||||
if (f == u->faction || telepath_see || omniscient(u->faction)) {
|
||||
show = u->items;
|
||||
} else if (!itemcloak && mode >= see_unit && !(a_fshidden
|
||||
&& a_fshidden->data.ca[1] == 1 && effskill(u, SK_STEALTH) >= 3)) {
|
||||
|
|
|
@ -826,6 +826,9 @@ readgame(boolean backup)
|
|||
else
|
||||
f->magiegebiet = (magic_t)((rand() % 5)+1);
|
||||
|
||||
if (nonplayer_race(f->race)) {
|
||||
f->lastorders = turn+1;
|
||||
}
|
||||
if (global.data_version >= KARMA_VERSION)
|
||||
f->karma = ri(F);
|
||||
else
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: spell.c,v 1.14 2001/03/09 06:28:24 katze Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -692,6 +691,10 @@ sp_summon_familiar(castorder *co)
|
|||
}
|
||||
|
||||
familiar = createunit(target_region, mage->faction, 1, rc);
|
||||
if (target_region==mage->region) {
|
||||
familiar->building = mage->building;
|
||||
familiar->ship = mage->ship;
|
||||
}
|
||||
familiar->status = ST_FLEE; /* flieht */
|
||||
sprintf(buf, "Vertrauter von %s", unitname(mage));
|
||||
set_string(&familiar->name, buf);
|
||||
|
@ -1032,6 +1035,10 @@ sp_summonent(castorder *co)
|
|||
ents = min(power*power, rtrees(r));
|
||||
|
||||
u = createunit(r, mage->faction, ents, RC_TREEMAN);
|
||||
if (r==mage->region) {
|
||||
u->building = mage->building;
|
||||
u->ship = mage->ship;
|
||||
}
|
||||
set_string(&u->name, race[RC_TREEMAN].name[u->number>1]);
|
||||
if (fval(mage, FL_PARTEITARNUNG))
|
||||
fset(u, FL_PARTEITARNUNG);
|
||||
|
@ -1473,6 +1480,10 @@ sp_create_irongolem(castorder *co)
|
|||
}
|
||||
|
||||
u2 = createunit(r, mage->faction, force*8, RC_IRONGOLEM);
|
||||
if (r==mage->region) {
|
||||
u2->building = mage->building;
|
||||
u2->ship = mage->ship;
|
||||
}
|
||||
set_skill(u2, SK_ARMORER, 30*u2->number);
|
||||
set_skill(u2, SK_WEAPONSMITH, 30*u2->number);
|
||||
if (fval(mage, FL_PARTEITARNUNG))
|
||||
|
@ -1536,6 +1547,10 @@ sp_create_stonegolem(castorder *co)
|
|||
}
|
||||
|
||||
u2 = createunit(r, mage->faction, force* 5,RC_STONEGOLEM);
|
||||
if (r==mage->region) {
|
||||
u2->building = mage->building;
|
||||
u2->ship = mage->ship;
|
||||
}
|
||||
set_skill(u2, SK_ROAD_BUILDING, 30*u2->number);
|
||||
set_skill(u2, SK_BUILDING, 30*u2->number);
|
||||
if (fval(mage, FL_PARTEITARNUNG))
|
||||
|
@ -2221,9 +2236,14 @@ sp_ironkeeper(castorder *co)
|
|||
return 0;
|
||||
}
|
||||
keeper = createunit(r, mage->faction, 1, RC_IRONKEEPER);
|
||||
if (r==mage->region) {
|
||||
keeper->building = mage->building;
|
||||
keeper->ship = mage->ship;
|
||||
}
|
||||
/*keeper->age = cast_level + 2;*/
|
||||
guard(keeper, GUARD_MINING);
|
||||
fset(keeper, FL_ISNEW);
|
||||
set_string(&keeper->name, "Bergwächter");
|
||||
keeper->status = ST_AVOID; /* kaempft nicht */
|
||||
/* Parteitarnen, damit man nicht sofort weiß, wer dahinter steckt */
|
||||
fset(keeper, FL_PARTEITARNUNG);
|
||||
|
@ -2412,25 +2432,32 @@ patzer_peasantmob(castorder *co)
|
|||
int anteil = 6, n;
|
||||
unit *u;
|
||||
attrib *a;
|
||||
region *r = co->rt;
|
||||
region *r;
|
||||
unit *mage = (unit *)co->magician;
|
||||
|
||||
if (mage->region->land){
|
||||
r = mage->region;
|
||||
} else {
|
||||
r = co->rt;
|
||||
}
|
||||
|
||||
anteil += rand() % 4;
|
||||
n = rpeasants(r) * anteil / 10;
|
||||
rsetpeasants(r, rpeasants(r) - n);
|
||||
assert(rpeasants(r) >= 0);
|
||||
if (r->land) {
|
||||
anteil += rand() % 4;
|
||||
n = rpeasants(r) * anteil / 10;
|
||||
rsetpeasants(r, rpeasants(r) - n);
|
||||
assert(rpeasants(r) >= 0);
|
||||
|
||||
u = createunit(r, findfaction(MONSTER_FACTION), n, RC_PEASANT);
|
||||
guard(u, GUARD_ALL);
|
||||
a = a_new(&at_unitdissolve);
|
||||
a->data.ca[0] = 1; /* An rpeasants(r). */
|
||||
a->data.ca[1] = 10; /* 10% */
|
||||
a_add(&u->attribs, a);
|
||||
a_add(&u->attribs, make_hate(mage));
|
||||
|
||||
sprintf(buf, "Ein Bauernmob erhebt sich und macht Jagd auf Schwarzmagier.");
|
||||
addmessage(r, 0, buf, MSG_MAGIC, ML_INFO);
|
||||
u = createunit(r, findfaction(MONSTER_FACTION), n, RC_PEASANT);
|
||||
guard(u, GUARD_ALL);
|
||||
a = a_new(&at_unitdissolve);
|
||||
a->data.ca[0] = 1; /* An rpeasants(r). */
|
||||
a->data.ca[1] = 10; /* 10% */
|
||||
a_add(&u->attribs, a);
|
||||
a_add(&u->attribs, make_hate(mage));
|
||||
|
||||
sprintf(buf, "Ein Bauernmob erhebt sich und macht Jagd auf Schwarzmagier.");
|
||||
addmessage(r, 0, buf, MSG_MAGIC, ML_INFO);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3103,6 +3130,10 @@ sp_unholypower(castorder *co)
|
|||
}
|
||||
|
||||
un = createunit(co->rt, u->faction, 0, target_race);
|
||||
if (co->rt==u->region) {
|
||||
un->building = u->building;
|
||||
un->ship = u->ship;
|
||||
}
|
||||
transfermen(u, un, n);
|
||||
add_message(&co->rt->msgs, new_message(mage->faction,
|
||||
"unholypower_limitedeffect%u:mage%u:target%s:race%i:amount",
|
||||
|
@ -3296,6 +3327,10 @@ sp_summonshadow(castorder *co)
|
|||
int val;
|
||||
|
||||
u = createunit(r, mage->faction, force*force, RC_SHADOW);
|
||||
if (r==mage->region) {
|
||||
u->building = mage->building;
|
||||
u->ship = mage->ship;
|
||||
}
|
||||
if (fval(mage, FL_PARTEITARNUNG))
|
||||
fset(u, FL_PARTEITARNUNG);
|
||||
|
||||
|
@ -3339,6 +3374,10 @@ sp_summonshadowlords(castorder *co)
|
|||
int force = co->force;
|
||||
|
||||
u = createunit(r, mage->faction, force*force, RC_SHADOWLORD);
|
||||
if (r==mage->region) {
|
||||
u->building = mage->building;
|
||||
u->ship = mage->ship;
|
||||
}
|
||||
if (fval(mage, FL_PARTEITARNUNG))
|
||||
fset(u, FL_PARTEITARNUNG);
|
||||
|
||||
|
@ -3475,9 +3514,60 @@ sp_magicboost(castorder *co)
|
|||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
/* Name: Totenruf - Mächte des Todes
|
||||
/* Name: kleines Blutopfer
|
||||
* Stufe: 4
|
||||
* Gebiet: Draig
|
||||
* Kategorie: Einheit, positiv
|
||||
*
|
||||
* Wirkung:
|
||||
* Hitpoints to Aura: 4:1/3:1
|
||||
* Patzer:
|
||||
* permanenter HP verlust
|
||||
*
|
||||
* Flag:
|
||||
* (ONSHIPCAST)
|
||||
*/
|
||||
static int
|
||||
sp_bloodsacrifice(castorder *co)
|
||||
{
|
||||
unit *mage = (unit *)co->magician;
|
||||
int cast_level = co->level;
|
||||
int aura, damage;
|
||||
int hp = mage->hp - 5; /* braucht noch 4 HP zum Bezahlen des
|
||||
Spruchs, und 1 HP zum Überleben*/
|
||||
|
||||
if (hp <= 0){
|
||||
report_failure(mage, co->order);
|
||||
return 0;
|
||||
}
|
||||
|
||||
damage = min(hp, dice_rand("4d12"));
|
||||
|
||||
if (eff_skill(mage, SK_MAGIC, mage->region) > 8){
|
||||
aura = damage / 3;
|
||||
} else {
|
||||
aura = damage / 4;
|
||||
}
|
||||
|
||||
if (aura <= 0){
|
||||
report_failure(mage, co->order);
|
||||
return 0;
|
||||
}
|
||||
|
||||
get_mage(mage)->spellpoints += aura;
|
||||
use_pooled(mage, mage->region, R_HITPOINTS, damage);
|
||||
|
||||
add_message(&mage->faction->msgs, new_message(mage->faction,
|
||||
"sp_bloodsacrifice_effect%u:unit%r:region%s:command%i:amount",
|
||||
mage, mage->region, strdup(co->order), aura));
|
||||
|
||||
return cast_level;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
/* Name: Totenruf - Mächte des Todes
|
||||
* Stufe: 6
|
||||
* Gebiet: Draig
|
||||
* Kategorie: Beschwörung, positiv
|
||||
* Flag: FARCASTING
|
||||
* Wirkung:
|
||||
|
@ -3515,6 +3605,10 @@ sp_summonundead(castorder *co)
|
|||
}
|
||||
|
||||
u = make_undead_unit(r, mage->faction, undead, race);
|
||||
if (r==mage->region) {
|
||||
u->building = mage->building;
|
||||
u->ship = mage->ship;
|
||||
}
|
||||
if (fval(mage, FL_PARTEITARNUNG))
|
||||
fset(u, FL_PARTEITARNUNG);
|
||||
|
||||
|
@ -3542,7 +3636,7 @@ sp_summonundead(castorder *co)
|
|||
* Gebiet: Draig
|
||||
* Kategorie: Region, negativ
|
||||
* Wirkung:
|
||||
* Alle Magier in der betroffenen Region wird eine Teil ihrer
|
||||
* Allen Magier in der betroffenen Region wird eine Teil ihrer
|
||||
* Magischen Kraft in die Gefilde des Chaos entzogen Jeder Magier im
|
||||
* Einflussbereich verliert Stufe(Zaubernden)*5% seiner Magiepunkte.
|
||||
* Keine Regeneration in der Woche (fehlt noch)
|
||||
|
@ -4281,6 +4375,10 @@ sp_recruit(castorder *co)
|
|||
|
||||
rsetpeasants(r, rpeasants(r) - n);
|
||||
u = createunit(r, f, n, f->race);
|
||||
if (r==mage->region) {
|
||||
u->building = mage->building;
|
||||
u->ship = mage->ship;
|
||||
}
|
||||
set_string(&u->name, n == 1 ? "Bauer" : "Bauern");
|
||||
set_string(&u->thisorder, keywords[K_WORK]);
|
||||
u->status = mage->status;
|
||||
|
@ -6959,7 +7057,7 @@ spell spelldaten[] =
|
|||
"werden, bevor die Aura sich verflüchtigt. "
|
||||
"Jeder Golem hat jede Runde eine Chance von 10% zu Staub zu zerfallen. "
|
||||
"Gibt man den Golems die Befehle MACHE BURG oder MACHE STRASSE, "
|
||||
"so werden pro Golem 10 Steine verbaut und der Golem löst sich auf.",
|
||||
"so werden pro Golem 5 Steine verbaut und der Golem löst sich auf.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_DRUIDE, (SPELLLEVEL), 4, 1,
|
||||
|
@ -6977,7 +7075,7 @@ spell spelldaten[] =
|
|||
"geschaffen werden. "
|
||||
"Jeder Golem hat jede Runde eine Chance von 15% zu Staub zu zerfallen. "
|
||||
"Gibt man den Golems den Befehl MACHE SCHWERT/BIHÄNDER oder "
|
||||
"MACHE SCHILD/KETTENHEMD/PLATTENPANZER, so werden pro Golem 5 "
|
||||
"MACHE SCHILD/KETTENHEMD/PLATTENPANZER, so werden pro Golem 4 "
|
||||
"Eisenbarren verbaut und der Golem löst sich auf.",
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -7259,11 +7357,11 @@ spell spelldaten[] =
|
|||
"weiterhin unentdeckt.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_DRUIDE, (0), 5, 6,
|
||||
M_DRUIDE, (ONSHIPCAST), 5, 6,
|
||||
{
|
||||
{R_AURA, 50, SPC_FIX},
|
||||
{R_SILVER, 3000, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_createitem_trueseeing, patzer_createitem
|
||||
|
@ -7276,11 +7374,11 @@ spell spelldaten[] =
|
|||
"einer unsichtbaren Einheit muss jede Person einen Ring tragen.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_DRUIDE, (0), 5, 6,
|
||||
M_DRUIDE, (ONSHIPCAST), 5, 6,
|
||||
{
|
||||
{R_AURA, 50, SPC_FIX},
|
||||
{R_SILVER, 3000, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_createitem_invisibility, patzer_createitem
|
||||
|
@ -7440,7 +7538,7 @@ spell spelldaten[] =
|
|||
"welches in ihm aufbewahrte Kräuter besser zu konservieren vermag.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_DRUIDE, (0), 5, 5,
|
||||
M_DRUIDE, (ONSHIPCAST), 5, 5,
|
||||
{
|
||||
{R_AURA, 30, SPC_FIX},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
|
@ -7659,6 +7757,24 @@ spell spelldaten[] =
|
|||
(spell_f)sp_magicboost, patzer
|
||||
},
|
||||
|
||||
{SPL_BLOODSACRIFICE, "kleines Blutopfer",
|
||||
"Mit diesem Ritual kann der Magier einen Teil seiner Lebensenergie "
|
||||
"opfern, um dafür an magischer Kraft zu gewinnen. Erfahrene "
|
||||
"Ritualmagier berichten, das sich das Ritual, einmal initiiert, nur "
|
||||
"schlecht steuern ließe und die Menge der so gewonnenen Kraft stark "
|
||||
"schwankt.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_CHAOS, (ONSHIPCAST), 1, 4,
|
||||
{
|
||||
{R_HITPOINTS, 4, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_bloodsacrifice, patzer
|
||||
},
|
||||
|
||||
{SPL_BERSERK, "Blutrausch",
|
||||
"In diesem blutigen Ritual opfert der Magier vor der Schlacht ein "
|
||||
"Neugeborenes vor den Augen seiner Armee. Die so gerufenen Blutgeister "
|
||||
|
@ -7695,6 +7811,7 @@ spell spelldaten[] =
|
|||
(spell_f)sp_fumblecurse, patzer_fumblecurse
|
||||
},
|
||||
|
||||
<<<<<<< spell.c
|
||||
{SPL_SUMMONUNDEAD, "Mächte des Todes",
|
||||
"Nächtelang muss der Schwarzmagier durch die Friedhöfe und Gräberfelder "
|
||||
"der Region ziehen um dann die ausgegrabenen Leichen beleben zu können. "
|
||||
|
@ -7703,16 +7820,16 @@ spell spelldaten[] =
|
|||
"sein kann.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_CHAOS, (SPELLLEVEL | FARCASTING), 5, 6,
|
||||
M_CHAOS, (SPELLLEVEL | FARCASTING | ONSHIPCAST), 5, 6,
|
||||
{
|
||||
{
|
||||
{R_AURA, 5, SPC_LEVEL},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_summonundead, patzer_peasantmob
|
||||
{0, 0, 0},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_summonundead, patzer_peasantmob
|
||||
},
|
||||
|
||||
{SPL_COMBATRUST, "Rosthauch",
|
||||
"Mit diesem Ritual wird eine dunkle Gewitterfront "
|
||||
"beschworen, die sich unheilverkündend über der Region auftürmt. "
|
||||
|
@ -7738,11 +7855,11 @@ spell spelldaten[] =
|
|||
"weiterhin unentdeckt.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_CHAOS, (0), 5, 6,
|
||||
M_CHAOS, (ONSHIPCAST), 5, 6,
|
||||
{
|
||||
{R_AURA, 50, SPC_FIX},
|
||||
{R_SILVER, 3000, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_createitem_trueseeing, patzer_createitem
|
||||
|
@ -7755,11 +7872,11 @@ spell spelldaten[] =
|
|||
"einer unsichtbaren Einheit muss jede Person einen Ring tragen.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_CHAOS, (0), 5, 6,
|
||||
M_CHAOS, (ONSHIPCAST), 5, 6,
|
||||
{
|
||||
{R_AURA, 50, SPC_FIX},
|
||||
{R_SILVER, 3000, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_createitem_invisibility, patzer_createitem
|
||||
|
@ -7874,7 +7991,7 @@ spell spelldaten[] =
|
|||
"die trollisch zähe Haut positiv auswirken.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_CHAOS, (0), 5, 9,
|
||||
M_CHAOS, (ONSHIPCAST), 5, 9,
|
||||
{
|
||||
{R_AURA, 20, SPC_FIX},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
|
@ -8040,14 +8157,14 @@ spell spelldaten[] =
|
|||
"senden, das Schwert mit seiner Macht zu beseelen...'",
|
||||
NULL,
|
||||
NULL,
|
||||
M_CHAOS, (0), 5, 12,
|
||||
{
|
||||
{R_AURA, 150, SPC_FIX},
|
||||
{R_BERSERK, 1, SPC_FIX},
|
||||
{R_SWORD, 1, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_create_firesword, patzer
|
||||
M_CHAOS, (ONSHIPCAST), 5, 12,
|
||||
{
|
||||
{R_AURA, 100, SPC_FIX},
|
||||
{R_BERSERK, 1, SPC_FIX},
|
||||
{R_SWORD, 1, SPC_FIX},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_create_firesword, patzer
|
||||
},
|
||||
|
||||
{SPL_DRAIG_FAMILIAR, "Vertrauten rufen",
|
||||
|
@ -8056,24 +8173,24 @@ spell spelldaten[] =
|
|||
"Magier anschließen wird.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_CHAOS, (NOTFAMILIARCAST), 5, 13,
|
||||
{
|
||||
M_CHAOS, (NOTFAMILIARCAST), 5, 13,
|
||||
{
|
||||
{R_AURA, 100, SPC_FIX},
|
||||
{R_PERMAURA, 5, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_summon_familiar, patzer
|
||||
(spell_f)sp_summon_familiar, patzer
|
||||
},
|
||||
|
||||
{SPL_CHAOSSUCTION, "Chaossog",
|
||||
"Durch das Opfern von 500 Bauern kann der Chaosmagier ein Tor zur "
|
||||
"astralen Welt öffnen. Das Tor kann in der Folgewoche verwendet werden, "
|
||||
"es löst sich am Ende der Folgewoche auf.",
|
||||
"Durch das Opfern von 500 Bauern kann der Chaosmagier ein Tor zur "
|
||||
"astralen Welt öffnen. Das Tor kann in der Folgewoche verwendet werden, "
|
||||
"es löst sich am Ende der Folgewoche auf.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_CHAOS, (0), 5, 14,
|
||||
{
|
||||
M_CHAOS, (0), 5, 14,
|
||||
{
|
||||
{R_AURA, 150, SPC_FIX},
|
||||
{R_PEASANTS, 500, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
|
@ -8088,7 +8205,9 @@ spell spelldaten[] =
|
|||
"Der Zauberer sendet dem Ziel des Spruches einen Traum.",
|
||||
"ZAUBERE Traumsenden <Einheit-Nr>",
|
||||
"u",
|
||||
M_TRAUM, (UNITSPELL | TESTCANSEE | SPELLLEVEL | ONETARGET), 5, 1,
|
||||
M_TRAUM,
|
||||
(UNITSPELL | TESTCANSEE | SPELLLEVEL | ONETARGET | ONSHIPCAST),
|
||||
5, 1,
|
||||
{
|
||||
{R_AURA, 1, SPC_LEVEL},
|
||||
{0, 0, 0},
|
||||
|
@ -8305,11 +8424,11 @@ spell spelldaten[] =
|
|||
"weiterhin unentdeckt.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_TRAUM, (0), 5, 6,
|
||||
M_TRAUM, (ONSHIPCAST), 5, 6,
|
||||
{
|
||||
{R_AURA, 50, SPC_FIX},
|
||||
{R_SILVER, 3000, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_createitem_trueseeing, patzer_createitem
|
||||
|
@ -8322,11 +8441,11 @@ spell spelldaten[] =
|
|||
"einer unsichtbaren Einheit muss jede Person einen Ring tragen.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_TRAUM, (0), 5, 6,
|
||||
M_TRAUM, (ONSHIPCAST), 5, 6,
|
||||
{
|
||||
{R_AURA, 50, SPC_FIX},
|
||||
{R_SILVER, 3000, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_createitem_invisibility, patzer_createitem
|
||||
|
@ -8482,15 +8601,15 @@ spell spelldaten[] =
|
|||
"es einige Wochen später...",
|
||||
NULL,
|
||||
"u+",
|
||||
M_TRAUM,
|
||||
(UNITSPELL | TESTRESISTANCE | TESTCANSEE | SPELLLEVEL), 5, 12,
|
||||
{
|
||||
M_TRAUM,
|
||||
(UNITSPELL | TESTRESISTANCE | TESTCANSEE | SPELLLEVEL), 5, 12,
|
||||
{
|
||||
{R_AURA, 5, SPC_LEVEL},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_sweetdreams, patzer
|
||||
{0, 0, 0},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_sweetdreams, patzer
|
||||
},
|
||||
|
||||
{SPL_CREATE_TACTICCRYSTAL, "Erschaffe ein Traumauge",
|
||||
|
@ -8505,9 +8624,9 @@ spell spelldaten[] =
|
|||
"Die Interpretation von Träumen ist eine schwierige Angelegenheit.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_TRAUM, (0), 5, 14,
|
||||
M_TRAUM, (ONSHIPCAST), 5, 14,
|
||||
{
|
||||
{R_PERMAURA, 10, SPC_FIX},
|
||||
{R_PERMAURA, 5, SPC_FIX},
|
||||
{R_DRAGONHEAD, 1, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0},
|
||||
|
@ -8843,11 +8962,11 @@ spell spelldaten[] =
|
|||
"weiterhin unentdeckt.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_BARDE, (0), 5, 6,
|
||||
M_BARDE, (ONSHIPCAST), 5, 6,
|
||||
{
|
||||
{R_AURA, 50, SPC_FIX},
|
||||
{R_SILVER, 3000, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_createitem_trueseeing, patzer_createitem
|
||||
|
@ -8860,11 +8979,11 @@ spell spelldaten[] =
|
|||
"einer unsichtbaren Einheit muss jede Person einen Ring tragen.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_BARDE, (0), 5, 6,
|
||||
M_BARDE, (ONSHIPCAST), 5, 6,
|
||||
{
|
||||
{R_AURA, 50, SPC_FIX},
|
||||
{R_SILVER, 3000, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_createitem_invisibility, patzer_createitem
|
||||
|
@ -9120,7 +9239,7 @@ spell spelldaten[] =
|
|||
"könnte dies ebenfalls von Nutzen sein.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_BARDE, (0), 5, 11,
|
||||
M_BARDE, (ONSHIPCAST), 5, 11,
|
||||
{
|
||||
{R_AURA, 20, SPC_FIX},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
|
@ -9442,11 +9561,11 @@ spell spelldaten[] =
|
|||
"weiterhin unentdeckt.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_ASTRAL, (0), 5, 5,
|
||||
M_ASTRAL, (ONSHIPCAST), 5, 5,
|
||||
{
|
||||
{R_AURA, 50, SPC_FIX},
|
||||
{R_SILVER, 3000, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_createitem_trueseeing, patzer_createitem
|
||||
|
@ -9533,11 +9652,11 @@ spell spelldaten[] =
|
|||
"einer unsichtbaren Einheit muss jede Person einen Ring tragen.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_ASTRAL, (0), 5, 6,
|
||||
M_ASTRAL, (ONSHIPCAST), 5, 6,
|
||||
{
|
||||
{R_AURA, 50, SPC_FIX},
|
||||
{R_SILVER, 3000, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_createitem_invisibility, patzer_createitem
|
||||
|
@ -9552,7 +9671,7 @@ spell spelldaten[] =
|
|||
"fehlschlagen lassen.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_ASTRAL, (0), 5, 7,
|
||||
M_ASTRAL, (ONSHIPCAST), 5, 7,
|
||||
{
|
||||
{R_AURA, 50, SPC_FIX},
|
||||
{R_SILVER, 3000, SPC_FIX},
|
||||
|
@ -9593,7 +9712,7 @@ spell spelldaten[] =
|
|||
"ZAUBER \"Mauern der Ewigkeit\" <Gebäude-Nr>",
|
||||
"b",
|
||||
M_ASTRAL,
|
||||
(SPELLLEVEL | BUILDINGSPELL | ONETARGET | TESTRESISTANCE),
|
||||
(SPELLLEVEL | BUILDINGSPELL | ONETARGET | TESTRESISTANCE | ONSHIPCAST),
|
||||
5, 7,
|
||||
{
|
||||
{R_AURA, 50, SPC_FIX},
|
||||
|
@ -9668,11 +9787,11 @@ spell spelldaten[] =
|
|||
"als wäre der Magier eine Stufe besser.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_ASTRAL, 0, 5, 9,
|
||||
M_ASTRAL, (ONSHIPCAST), 5, 9,
|
||||
{
|
||||
{R_AURA, 100, SPC_FIX},
|
||||
{R_SILVER, 4000, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
{0, 0, 0},
|
||||
{0, 0, 0}},
|
||||
(spell_f)sp_createitem_power, patzer_createitem
|
||||
|
@ -9704,7 +9823,7 @@ spell spelldaten[] =
|
|||
"selber wiegt 1 GE.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_ASTRAL, (0), 5, 10,
|
||||
M_ASTRAL, (ONSHIPCAST), 5, 10,
|
||||
{
|
||||
{R_AURA, 30, SPC_FIX},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
|
@ -9830,7 +9949,7 @@ spell spelldaten[] =
|
|||
"Zauberers enorm größere Mengen an Aura zu beherrschen.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_GRAU, 0, 5, 9,
|
||||
M_GRAU, (ONSHIPCAST), 5, 9,
|
||||
{
|
||||
{R_AURA, 100, SPC_FIX},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
|
@ -9846,7 +9965,7 @@ spell spelldaten[] =
|
|||
"seinem Träger zukommen.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_GRAU, 0, 5, 9,
|
||||
M_GRAU, (ONSHIPCAST), 5, 9,
|
||||
{
|
||||
{R_AURA, 100, SPC_FIX},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
|
@ -9860,7 +9979,7 @@ spell spelldaten[] =
|
|||
"",
|
||||
NULL,
|
||||
NULL,
|
||||
M_GRAU, 0, 5, 7,
|
||||
M_GRAU, (ONSHIPCAST), 5, 7,
|
||||
{
|
||||
{R_AURA, 50, SPC_FIX},
|
||||
{R_SILVER, 3000, SPC_FIX},
|
||||
|
@ -9894,7 +10013,7 @@ spell spelldaten[] =
|
|||
"und wird so gut wie immun gegen alle Formen von Magie.",
|
||||
NULL,
|
||||
NULL,
|
||||
M_GRAU, 0, 5, 6,
|
||||
M_GRAU, (ONSHIPCAST), 5, 6,
|
||||
{
|
||||
{R_AURA, 100, SPC_FIX},
|
||||
{R_PERMAURA, 1, SPC_FIX},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: spell.h,v 1.5 2001/01/31 17:40:51 corwin Exp $
|
||||
* $Id: spell.h,v 1.6 2001/04/01 06:58:40 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -194,6 +194,7 @@ enum {
|
|||
SPL_PUTTOREST,
|
||||
SPL_UNHOLYPOWER,
|
||||
SPL_HOLYGROUND,
|
||||
SPL_BLOODSACRIFICE,
|
||||
MAXALLSPELLS,
|
||||
NO_SPELL = (spellid_t) -1
|
||||
};
|
||||
|
|
|
@ -6,13 +6,15 @@
|
|||
#include <attributes/key.h>
|
||||
|
||||
/* kernel includes */
|
||||
#include <unit.h>
|
||||
#include <faction.h>
|
||||
#include <terrain.h>
|
||||
#include <region.h>
|
||||
#include <item.h>
|
||||
#include <plane.h>
|
||||
#include <region.h>
|
||||
#include <terrain.h>
|
||||
#include <unit.h>
|
||||
|
||||
/* util includes */
|
||||
#include <base36.h>
|
||||
#include <umlaut.h>
|
||||
#include <attrib.h>
|
||||
|
||||
|
@ -137,22 +139,122 @@ find_key(struct attrib * attribs, int key)
|
|||
}
|
||||
|
||||
/**
|
||||
** GM: TERRAFORM <terrain>
|
||||
** GM: TERRAFORM <terrain> <x> <y>
|
||||
** requires: permission-key "gmterf"
|
||||
**/
|
||||
static void
|
||||
gm_terraform(const char * str, struct unit * u)
|
||||
{
|
||||
const struct plane * p = rplane(u->region);
|
||||
int x = rel_to_abs(p, u->faction, atoi(igetstrtoken(str)), 0);
|
||||
int y = rel_to_abs(p, u->faction, atoi(getstrtoken()), 1);
|
||||
const char * c = getstrtoken();
|
||||
region * r = findregion(x, y);
|
||||
terrain_t t;
|
||||
const char * c = igetstrtoken(str);
|
||||
{
|
||||
if (r==NULL || p!=rplane(r)) {
|
||||
mistake(u, str, "Diese Regon kann die Einheit nicht umwandeln.\n", 0);
|
||||
} else {
|
||||
/* checking permissions */
|
||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||
if (!permissions || !find_key((attrib*)permissions->data.v, atoi36("gmtf"))) return;
|
||||
if (!permissions || !find_key((attrib*)permissions->data.v, atoi36("gmterf"))) return;
|
||||
}
|
||||
for (t=0;t!=MAXTERRAINS;++t) {
|
||||
if (!strcasecmp(locale_string(u->faction->locale, terrain[t].name), c)) break;
|
||||
}
|
||||
if (t!=MAXTERRAINS) terraform(u->region, t);
|
||||
if (t!=MAXTERRAINS) terraform(r, t);
|
||||
}
|
||||
|
||||
/**
|
||||
** GM: TELEPORT <unit> <x> <y>
|
||||
** requires: permission-key "gmtele"
|
||||
**/
|
||||
static void
|
||||
gm_teleport(const char * str, struct unit * u)
|
||||
{
|
||||
const struct plane * p = rplane(u->region);
|
||||
unit * to = findunit(atoi36(igetstrtoken(str)));
|
||||
int x = rel_to_abs(p, u->faction, atoi(getstrtoken()), 0);
|
||||
int y = rel_to_abs(p, u->faction, atoi(getstrtoken()), 1);
|
||||
region * r = findregion(x, y);
|
||||
|
||||
if (r==NULL || p!=rplane(r)) {
|
||||
mistake(u, str, "In diese Region kann die Einheit nicht teleportieren.\n", 0);
|
||||
} if (to==NULL || (rplane(to->region)!=rplane(r) && !ucontact(to, u))) {
|
||||
mistake(u, str, "Die Einheit wurde nicht gefunden, oder sie hat uns nicht kontaktiert.\n", 0);
|
||||
} else {
|
||||
/* checking permissions */
|
||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||
if (!permissions || !find_key((attrib*)permissions->data.v, atoi36("gmtele"))) {
|
||||
mistake(u, str, "Unzureichende Rechte für diesen Befehl.\n", 0);
|
||||
}
|
||||
else move_unit(to, r, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** GM: GIVE <unit> <int> <itemtype>
|
||||
** requires: permission-key "gmgive"
|
||||
**/
|
||||
static void
|
||||
gm_give(const char * str, struct unit * u)
|
||||
{
|
||||
unit * to = findunit(atoi36(igetstrtoken(str)));
|
||||
int num = atoi(getstrtoken());
|
||||
const item_type * itype = finditemtype(getstrtoken(), u->faction->locale);
|
||||
|
||||
if (to==NULL || rplane(to->region) != rplane(u->region)) {
|
||||
/* unknown or in another plane */
|
||||
mistake(u, str, "Die Einheit wurde nicht gefunden.\n", 0);
|
||||
} else if (itype==NULL || i_get(u->items, itype)==0) {
|
||||
/* unknown or not enough */
|
||||
mistake(u, str, "So einen Gegenstand hat die Einheit nicht.\n", 0);
|
||||
} else {
|
||||
/* checking permissions */
|
||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||
if (!permissions || !find_key((attrib*)permissions->data.v, atoi36("gmgive"))) {
|
||||
mistake(u, str, "Unzureichende Rechte für diesen Befehl.\n", 0);
|
||||
}
|
||||
else {
|
||||
int i = i_get(u->items, itype);
|
||||
if (i<num) num=i;
|
||||
if (num) {
|
||||
i_change(&u->items, itype, -num);
|
||||
i_change(&to->items, itype, num);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** GM: SKILL <unit> <skill> <tage>
|
||||
** requires: permission-key "gmskil"
|
||||
**/
|
||||
static void
|
||||
gm_skill(const char * str, struct unit * u)
|
||||
{
|
||||
unit * to = findunit(atoi36(igetstrtoken(str)));
|
||||
skill_t skill = findskill(getstrtoken());
|
||||
int num = atoi(getstrtoken());
|
||||
|
||||
if (to==NULL || rplane(to->region) != rplane(u->region)) {
|
||||
/* unknown or in another plane */
|
||||
mistake(u, str, "Die Einheit wurde nicht gefunden.\n", 0);
|
||||
} else if (skill==NOSKILL || skill==SK_MAGIC || skill==SK_ALCHEMY) {
|
||||
/* unknown or not enough */
|
||||
mistake(u, str, "Dieses Talent ist unbekannt, oder kann nciht erhöht werden.\n", 0);
|
||||
} else if (num<0 || num>5000) {
|
||||
/* sanity check failed */
|
||||
mistake(u, str, "Der gewählte Wert ist nicht zugelassen.\n", 0);
|
||||
} else {
|
||||
/* checking permissions */
|
||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||
if (!permissions || !find_key((attrib*)permissions->data.v, atoi36("gmskil"))) {
|
||||
mistake(u, str, "Unzureichende Rechte für diesen Befehl.\n", 0);
|
||||
}
|
||||
else {
|
||||
set_skill(to, skill, num);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -180,9 +282,11 @@ init_gmcmd(void)
|
|||
add_gmcommand(&g_cmds, "gm", &gm_command);
|
||||
add_gmcommand(&g_cmds, "terraform", &gm_terraform);
|
||||
add_gmcommand(&g_cmds, "create", &gm_create);
|
||||
add_gmcommand(&g_cmds, "give", &gm_give);
|
||||
add_gmcommand(&g_cmds, "teleport", &gm_teleport);
|
||||
add_gmcommand(&g_cmds, "skill", &gm_skill);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* execute gm-commands for all units in the game
|
||||
*/
|
||||
|
@ -206,6 +310,100 @@ gmcommands(void)
|
|||
if (*rp==r) rp = &r->next;
|
||||
}
|
||||
}
|
||||
|
||||
#define EXTENSION 10000
|
||||
|
||||
faction *
|
||||
gm_addquest(const char * email, const char * name, int radius, unsigned int flags)
|
||||
{
|
||||
plane * p;
|
||||
attrib * a;
|
||||
unit * u;
|
||||
region * center;
|
||||
boolean invalid = false;
|
||||
int minx, miny, maxx, maxy, cx, cy;
|
||||
int x, y, i;
|
||||
faction * f = calloc(1, sizeof(faction));
|
||||
|
||||
/* GM faction */
|
||||
a_add(&f->attribs, make_key(atoi36("quest")));
|
||||
f->banner = strdup("Questenpartei");
|
||||
f->passw = strdup(itoa36(rand()));
|
||||
f->email = strdup(email);
|
||||
f->name = strdup("Questenpartei");
|
||||
f->race = RC_TEMPLATE;
|
||||
f->age = 0;
|
||||
f->lastorders = turn;
|
||||
f->alive = true;
|
||||
f->locale = find_locale("de");
|
||||
f->options = want(O_COMPRESS) | want(O_REPORT) | want(O_COMPUTER) | want(O_ADRESSEN);
|
||||
{
|
||||
faction * xist;
|
||||
int i = atoi36("gm00")-1;
|
||||
do {
|
||||
xist = findfaction(++i);
|
||||
} while (xist);
|
||||
|
||||
f->no = i;
|
||||
addlist(&factions, f);
|
||||
}
|
||||
|
||||
/* GM playfield */
|
||||
do {
|
||||
minx = (rand() % (2*EXTENSION)) - EXTENSION;
|
||||
miny = (rand() % (2*EXTENSION)) - EXTENSION;
|
||||
for (x=0;!invalid && x<=radius*2;++x) {
|
||||
for (y=0;!invalid && y<=radius*2;++y) {
|
||||
region * r = findregion(minx+x, miny+y);
|
||||
if (r) invalid = true;
|
||||
}
|
||||
}
|
||||
} while (invalid);
|
||||
maxx = minx+2*radius; cx = minx+radius;
|
||||
maxy = miny+2*radius; cy = miny+radius;
|
||||
p = create_new_plane(rand(), name, minx, maxx, miny, maxy, flags);
|
||||
center = new_region(cx, cy);
|
||||
for (x=0;x<=2*radius;++x) {
|
||||
int y;
|
||||
for (y=0;y<=2*radius;++y) {
|
||||
region * r = findregion(minx+x, miny+y);
|
||||
if (!r) r = new_region(minx+x, miny+y);
|
||||
freset(r, RF_ENCOUNTER);
|
||||
r->planep = p;
|
||||
if (distance(r, center)==radius) {
|
||||
terraform(r, T_FIREWALL);
|
||||
} else if (r==center) {
|
||||
terraform(r, T_PLAIN);
|
||||
} else {
|
||||
terraform(r, T_OCEAN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* generic permissions */
|
||||
a = a_add(&f->attribs, a_new(&at_permissions));
|
||||
|
||||
a_add((attrib**)&a->data.v, make_key(atoi36("gmterf")));
|
||||
a_add((attrib**)&a->data.v, make_key(atoi36("gmtele")));
|
||||
a_add((attrib**)&a->data.v, make_key(atoi36("gmgive")));
|
||||
a_add((attrib**)&a->data.v, make_key(atoi36("gmskil")));
|
||||
|
||||
a_add((attrib**)&a->data.v, make_atgmcreate(resource2item(r_silver)));
|
||||
|
||||
for (i=0;i<=I_INCENSE;++i) {
|
||||
a_add((attrib**)&a->data.v, make_atgmcreate(olditemtype[i]));
|
||||
}
|
||||
|
||||
/* one initial unit */
|
||||
u = createunit(center, f, 1, RC_TEMPLATE);
|
||||
u->irace = RC_GNOME;
|
||||
u->number = 1;
|
||||
set_string(&u->name, "Questenmeister");
|
||||
u->irace = RC_GOBLIN;
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
#ifdef TEST_GM_COMMANDS
|
||||
void
|
||||
setup_gm_faction(void)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: gmcmd.h,v 1.4 2001/01/31 07:59:42 enno Exp $
|
||||
* $Id: gmcmd.h,v 1.5 2001/04/01 06:58:40 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -14,6 +14,7 @@
|
|||
|
||||
struct attrib;
|
||||
struct unit;
|
||||
struct faction;
|
||||
|
||||
extern void init_gmcmd(void);
|
||||
/* initialize this module */
|
||||
|
@ -21,6 +22,7 @@ extern void init_gmcmd(void);
|
|||
extern void gmcommands(void);
|
||||
/* execute commands */
|
||||
|
||||
extern struct faction * gm_addquest(const char * email, const char * name, int radius, unsigned int flags);
|
||||
|
||||
/*
|
||||
* doesn't belong in here:
|
||||
|
|
|
@ -9,20 +9,20 @@ CFG=modules - Win32 Debug
|
|||
NMAKE
|
||||
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den\
|
||||
Befehl
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "modules-5.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
|
||||
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "modules-5.mak" CFG="modules - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Für die Konfiguration stehen zur Auswahl:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "modules - Win32 Release" (basierend auf\
|
||||
"Win32 (x86) Static Library")
|
||||
!MESSAGE "modules - Win32 Debug" (basierend auf "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
|
@ -71,7 +71,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Debug\modules.lib"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
CFG=modules - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "modules-6.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "modules-6.mak" CFG="modules - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "modules - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "modules - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
|
@ -74,7 +74,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Debug\modules.lib"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: xmas2000.c,v 1.4 2001/02/04 09:46:48 corwin Exp $
|
||||
* $Id: xmas2000.c,v 1.5 2001/04/01 06:58:41 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -71,7 +71,7 @@ xmasgate_handle(trigger * t, void * data)
|
|||
if (*up==u) up = &u->next;
|
||||
}
|
||||
} else
|
||||
fprintf(stderr, "\aERROR: could not perform xmasgate::handle()\n");
|
||||
fprintf(stderr, "ERROR: could not perform xmasgate::handle()\n");
|
||||
unused(data);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: illusion.c,v 1.2 2001/01/26 16:19:41 enno Exp $
|
||||
* $Id: illusion.c,v 1.3 2001/04/01 06:58:41 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -24,17 +24,19 @@
|
|||
/* libc includes */
|
||||
#include <stdlib.h>
|
||||
|
||||
#define ILLUSIONMAX 6
|
||||
#define ILLUSIONMAX 6
|
||||
|
||||
void
|
||||
age_illusion(unit *u)
|
||||
{
|
||||
if (u->age == ILLUSIONMAX) {
|
||||
add_message(&u->faction->msgs, new_message(u->faction,
|
||||
"warnillusiondissolve%u:unit", u));
|
||||
} else if (u->age > ILLUSIONMAX) {
|
||||
set_number(u, 0);
|
||||
add_message(&u->faction->msgs, new_message(u->faction,
|
||||
"illusiondissolve%u:unit", u));
|
||||
if (u->faction->race!=RC_ILLUSION) {
|
||||
if (u->age == ILLUSIONMAX) {
|
||||
add_message(&u->faction->msgs, new_message(u->faction,
|
||||
"warnillusiondissolve%u:unit", u));
|
||||
} else if (u->age > ILLUSIONMAX) {
|
||||
set_number(u, 0);
|
||||
add_message(&u->faction->msgs, new_message(u->faction,
|
||||
"illusiondissolve%u:unit", u));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
CFG=races - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "races-6.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "races-6.mak" CFG="races - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "races - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "races - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
|
@ -74,7 +74,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Debug\races.lib"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: zombies.c,v 1.3 2001/01/31 14:32:58 corwin Exp $
|
||||
* $Id: zombies.c,v 1.4 2001/04/01 06:58:41 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -76,9 +76,7 @@ age_undead(unit *u)
|
|||
u2 = make_undead_unit(r, findfaction(MONSTER_FACTION), 0, RC_UNDEAD);
|
||||
transfermen(u, u2, u->number - n);
|
||||
u2->building = u->building;
|
||||
if (rterrain(r) == T_OCEAN) {
|
||||
u2->ship = u->ship;
|
||||
}
|
||||
u2->ship = u->ship;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: alp.c,v 1.2 2001/01/26 16:19:41 enno Exp $
|
||||
* $Id: alp.c,v 1.3 2001/04/01 06:58:41 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -100,6 +100,10 @@ sp_summon_alp(struct castorder *co)
|
|||
* sobald der Alp sein Opfer erreicht hat.
|
||||
*/
|
||||
alp = createunit(r, findfaction(MONSTER_FACTION), 1, RC_ALP);
|
||||
if (r==mage->region) {
|
||||
alp->building = mage->building;
|
||||
alp->ship = mage->ship;
|
||||
}
|
||||
set_skill(alp, SK_STEALTH, alp->number * 840); /* 840 Tage = T7 */
|
||||
alp->status = ST_FLEE; /* flieht */
|
||||
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
CFG=spells - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "spells-6.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "spells-6.mak" CFG="spells - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "spells - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "spells - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
|
@ -74,7 +74,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Debug\spells.lib"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
CFG=triggers - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "triggers-6.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "triggers-6.mak" CFG="triggers - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "triggers - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "triggers - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
|
@ -74,7 +74,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Debug\triggers.lib"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -7,21 +7,21 @@
|
|||
CFG=util - Win32 Conversion
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "util-6.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "util-6.mak" CFG="util - Win32 Conversion"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "util - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "util - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "util - Win32 Conversion" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "util - Win32 Profile" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
|
@ -122,7 +122,7 @@ LIB32=link.exe -lib
|
|||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
|
|
@ -3,33 +3,6 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
|
|||
|
||||
###############################################################################
|
||||
|
||||
Project: "askalon"=".\askalon\askalon-6.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name attributes
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name gamecode
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name kernel
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name triggers
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name util
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "attributes"=".\common\attributes\attributes-6.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
|
@ -42,18 +15,6 @@ Package=<4>
|
|||
|
||||
###############################################################################
|
||||
|
||||
Project: "doc"=.\doc\doc.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "eressea"=".\eressea\eressea-6.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
|
@ -111,42 +72,6 @@ Package=<4>
|
|||
|
||||
###############################################################################
|
||||
|
||||
Project: "mapper"=".\mapper\mapper-6.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name triggers
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name util
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name kernel
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name attributes
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name items
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name modules
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name races
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name spells
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "modules"=".\common\modules\modules-6.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
|
@ -183,21 +108,6 @@ Package=<4>
|
|||
|
||||
###############################################################################
|
||||
|
||||
Project: "translator"=.\tools\translator.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name util
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "triggers"=".\common\triggers\triggers-6.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
|
|
|
@ -119,7 +119,7 @@ LINK32=link.exe
|
|||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /I ".." /I "../common" /I "../common/util" /I "../common/kernel" /I "../common/gamecode" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /Za /W4 /Zi /O2 /I ".." /I "../common" /I "../common/util" /I "../common/kernel" /I "../common/gamecode" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /Za /W4 /Zi /O2 /I ".." /I "../common" /I "../common/util" /I "../common/kernel" /I "../common/gamecode" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
|
||||
# ADD BASE RSC /l 0x407 /d "NDEBUG"
|
||||
# ADD RSC /l 0x407 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
|
|
@ -158,10 +158,8 @@ fix_skills(void)
|
|||
attrib * a = a_find(global.attribs, &at_key); \
|
||||
while (a && a->data.i!=(magic)) a=a->next; \
|
||||
if (a) { \
|
||||
log_warning(("[do_once] a unique fix was called a second time\n")); \
|
||||
return; \
|
||||
} \
|
||||
else { \
|
||||
log_warning(("[do_once] a unique fix %d=\"%s\" was called a second time\n", magic, itoa36(magic))); \
|
||||
} else { \
|
||||
(fun); \
|
||||
a_add(&global.attribs, make_key(magic)); \
|
||||
} \
|
||||
|
@ -1024,8 +1022,8 @@ show_newspells(void)
|
|||
/* Alle geänderten Zauber in das array newspellids[]. mit SPL_NOSPELL
|
||||
* terminieren */
|
||||
|
||||
spellid_t newspellids[] = { SPL_UNHOLYPOWER, SPL_SUMMONUNDEAD,
|
||||
SPL_ORKDREAM, SPL_NOSPELL };
|
||||
spellid_t newspellids[] = {
|
||||
};
|
||||
|
||||
/* die id's der neuen oder veränderten Sprüche werden in newspellids[]
|
||||
* abgelegt */
|
||||
|
@ -1723,7 +1721,7 @@ free_skillfix(attrib * a)
|
|||
|
||||
attrib_type at_skillfix = { "skillfix", init_skillfix, free_skillfix };
|
||||
|
||||
void
|
||||
void
|
||||
skillfix(struct unit * u, skill_t skill, int from, int self, int teach)
|
||||
{
|
||||
attrib * a = a_add(&u->attribs, a_new(&at_skillfix));
|
||||
|
@ -1748,7 +1746,7 @@ write_skillfix(void)
|
|||
attrib * a = a_find(u->attribs, &at_skillfix);
|
||||
while (a) {
|
||||
skillfix_data * data = (skillfix_data*)a->data.v;
|
||||
fprintf(F, "%s %d %d %d %d %d\n",
|
||||
fprintf(F, "%s %d %d %d %d %d\n",
|
||||
itoa36(data->u->no),
|
||||
data->skill,
|
||||
data->number,
|
||||
|
@ -1817,7 +1815,7 @@ convert_triggers(void)
|
|||
if (u && u2) {
|
||||
if (nonplayer(u) || (!nonplayer(u2) && u->race==RC_GOBLIN))
|
||||
set_familiar(u2, u);
|
||||
else
|
||||
else
|
||||
set_familiar(u, u2);
|
||||
} else {
|
||||
if (u2) fprintf(stderr, "WARNING: FAMILIAR info for %s may be broken!\n", unitname(u2));
|
||||
|
@ -2087,10 +2085,10 @@ fix_timeouts(void)
|
|||
*tptr = (*tptr)->next;
|
||||
} else tptr = &(*tptr)->next;
|
||||
}
|
||||
if (t->type == &tt_changerace ||
|
||||
t->type == &tt_changefaction ||
|
||||
t->type == &tt_createcurse ||
|
||||
t->type == &tt_createunit)
|
||||
if (t->type == &tt_changerace ||
|
||||
t->type == &tt_changefaction ||
|
||||
t->type == &tt_createcurse ||
|
||||
t->type == &tt_createunit)
|
||||
{
|
||||
trigger * timer = get_timeout(td->triggers, t);
|
||||
if (toad && t->type == &tt_changerace) {
|
||||
|
@ -2128,6 +2126,32 @@ fix_timeouts(void)
|
|||
}
|
||||
}
|
||||
|
||||
#include <modules/gmcmd.h>
|
||||
static void
|
||||
test_gmquest(void)
|
||||
{
|
||||
const struct faction * f;
|
||||
/* enno's world */
|
||||
f = gm_addquest("enno@eressea.upb.de", "GM Zone", 1, PFL_NOATTACK|PFL_NOALLIANCES|PFL_NOFEED|PFL_FRIENDLY);
|
||||
log_printf("Neue Questenpartei %s\n", factionname(f));
|
||||
|
||||
f = gm_addquest("xandril@att.net", "Mardallas Welt", 40, 0);
|
||||
log_printf("Neue Questenpartei %s\n", factionname(f));
|
||||
|
||||
f = gm_addquest("moritzsalinger@web.de", "Laen-Kaiser", 7, /*PFL_NORECRUITS |*/ PFL_NOMAGIC /*| PFL_NOBUILD*/);
|
||||
log_printf("Neue Questenpartei %s\n", factionname(f));
|
||||
|
||||
f = gm_addquest("Denise.Muenstermann@home.gelsen-net.de", "Mochikas Queste", 7, PFL_NOMAGIC);
|
||||
log_printf("Neue Questenpartei %s\n", factionname(f));
|
||||
|
||||
f = gm_addquest("feeron@aol.com", "Eternath", 11, 0);
|
||||
log_printf("Neue Questenpartei %s\n", factionname(f));
|
||||
|
||||
f = gm_addquest("BigBear@nord-com.net", "Leonidas Vermächtnis", 15, PFL_NOMAGIC|PFL_NOSTEALTH);
|
||||
log_printf("Neue Questenpartei %s\n", factionname(f));
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
korrektur(void)
|
||||
{
|
||||
|
@ -2146,6 +2170,7 @@ korrektur(void)
|
|||
fix_allies();
|
||||
do_once(atoi36("fhrb"), fix_herbs());
|
||||
do_once(atoi36("ftos"), fix_timeouts());
|
||||
do_once(atoi36("gmtst"), test_gmquest()); /* test gm quests */
|
||||
#ifndef SKILLFIX_SAVE
|
||||
fix_skills();
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: relation.c,v 1.1 2001/01/27 18:15:32 enno Exp $
|
||||
* $Id: relation.c,v 1.2 2001/04/01 06:58:44 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -51,10 +51,14 @@ rel_init(attrib *a)
|
|||
static void
|
||||
rel_done(attrib *a)
|
||||
{
|
||||
#ifdef OLD_TRIGGER
|
||||
reldata *rel = (reldata *)a->data.v;
|
||||
if( rel->obj2 )
|
||||
untag_pointer(&rel->obj2, rel->typ2, TAG_RELATION);
|
||||
free(rel);
|
||||
#else
|
||||
unused(a);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef OLD_TRIGGER
|
||||
|
|
|
@ -13,6 +13,7 @@ OBJECTS = $(SOURCES:%.c=$(BUILD_DIR)/%.o)
|
|||
INCLUDES += \
|
||||
-I../common/util \
|
||||
-I../common/kernel \
|
||||
-I../common/spells \
|
||||
-I../common
|
||||
|
||||
LIBS += \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: map_modify.c,v 1.7 2001/02/18 10:14:04 corwin Exp $
|
||||
* $Id: map_modify.c,v 1.8 2001/04/01 06:58:44 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -219,48 +219,6 @@ block_create(int x1, int y1, int size, char chaotisch, int special, char terrain
|
|||
vset_destroy(&fringe);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
blockcreate(int x1, int y1, int size, char chaos)
|
||||
{
|
||||
char chaotic = 0;
|
||||
int special = 0;
|
||||
char terrain = T_OCEAN;
|
||||
int local_climate = climate(y1);
|
||||
|
||||
if (special == 1)
|
||||
terrain = T_OCEAN;
|
||||
else if (special == 2)
|
||||
terrain = terrain_create(local_climate);
|
||||
|
||||
/* Chaotisch ? */
|
||||
|
||||
if ((x1 < -36 || x1 > 36 || y1 < -36) && chaos == 1) {
|
||||
if (rand() % 100 < 50) {
|
||||
chaotic = 1;
|
||||
}
|
||||
switch (rand() % 6) {
|
||||
case 1:
|
||||
case 2:
|
||||
special = 1; /* Nur Wasser ... */
|
||||
break;
|
||||
case 3:
|
||||
special = 2; /* Ein-Terrain-Insel */
|
||||
break;
|
||||
case 4: /* Miniinsel */
|
||||
size = 3 + rand() % 5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
block_create(x1, y1, size, chaotic, special, terrain);
|
||||
}
|
||||
|
||||
void
|
||||
makeblock(int x1, int y1, char chaos)
|
||||
{
|
||||
blockcreate(x1, y1, ISLANDSIZE, chaos);
|
||||
}
|
||||
|
||||
static void
|
||||
addmenulist(menulist ** SP, const char *s, int *val)
|
||||
{
|
||||
|
@ -915,6 +873,26 @@ make_new_region(int x, int y)
|
|||
modified=1;
|
||||
}
|
||||
|
||||
#define BLOCK_RADIUS 6
|
||||
|
||||
void
|
||||
make_ocean_block(int x, int y)
|
||||
{
|
||||
int cx, cy;
|
||||
region *r;
|
||||
|
||||
for(cx = x - BLOCK_RADIUS; cx < x+BLOCK_RADIUS; cx++) {
|
||||
for(cy = y - BLOCK_RADIUS; cy < y+BLOCK_RADIUS; cy++) {
|
||||
if(koor_distance(cx, cy, x, y) < BLOCK_RADIUS) {
|
||||
if(!findregion(cx, cy)) {
|
||||
r = new_region(cx, cy);
|
||||
terraform(r, T_OCEAN);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
make_new_block(int x, int y)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: mapper.c,v 1.13 2001/02/18 12:20:37 corwin Exp $
|
||||
* $Id: mapper.c,v 1.14 2001/04/01 06:58:44 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -38,6 +38,7 @@
|
|||
#include <reports.h>
|
||||
#include <save.h>
|
||||
#include <unit.h>
|
||||
#include <spells.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
|
@ -872,8 +873,8 @@ movearound(int rx, int ry) {
|
|||
}
|
||||
ch = -9;
|
||||
break;
|
||||
case 0x2: /* die altmodische Art */
|
||||
make_new_block(rx, ry);
|
||||
case 0x2:
|
||||
make_ocean_block(rx, ry);
|
||||
ch = -9;
|
||||
break;
|
||||
case 'S':
|
||||
|
@ -1238,6 +1239,7 @@ main(int argc, char *argv[])
|
|||
|
||||
init_triggers();
|
||||
init_attributes();
|
||||
init_spells();
|
||||
|
||||
init_resources();
|
||||
/* init_weapons(); */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: mapper.h,v 1.4 2001/02/09 13:53:53 corwin Exp $
|
||||
* $Id: mapper.h,v 1.5 2001/04/01 06:58:44 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -54,6 +54,7 @@ int modify_region(struct region * r);
|
|||
void NeueBurg(struct region * r);
|
||||
void NeuesSchiff(struct region * r);
|
||||
void create_island(struct region *r, int n, terrain_t t);
|
||||
void make_ocean_block(int x, int y);
|
||||
void make_new_block(int x, int y);
|
||||
void moveln(const int x);
|
||||
char *my_input(WINDOW * win, int x, int y, const char *text, const char *def);
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Dieser Tiegel enthält die seltenste alchemistische Substanz Eresseas, den Krötenschleim. Angeblich soll der Krötenschleim eine aussergewöhnlich hohe magische Absorbtionskraft besitzen und deswegen in obskuren magischen Ritualen Verwendung finden.
|
|
@ -1 +1 @@
|
|||
Diese großen Wölfe sind nicht alle so wild und böse wie in den Legenden berichtet, und einige von ihnen schließen sich auch guten Magier bereitwillig an und sind ihnen dann treue Gefährten. (3 Angriffe, Schaden: 2d6, 1d4, 1d4, Angriff 6, Verteidigung 3, 25 Trefferpunkte).
|
||||
Diese großen Wölfe sind nicht alle so wild und böse wie in den Legenden berichtet, und einige von ihnen schließen sich auch guten Magiern bereitwillig an und sind ihnen dann treue Gefährten. (3 Angriffe, Schaden: 2d6, 1d4, 1d4, Angriff 6, Verteidigung 3, 25 Trefferpunkte).
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Dieser Tiegel enthält die seltenste alchemistische Substanz Eresseas, den Krötenschleim. Angeblich soll der Krötenschleim eine aussergewöhnlich hohe magische Absorbtionskraft besitzen und deswegen in obskuren magischen Ritualen Verwendung finden.
|
|
@ -1,5 +1,4 @@
|
|||
# Kommentare sind erlaubt. Endlich.
|
||||
# $Id: messages.txt,v 1.4 2001/02/25 19:31:40 enno Exp $
|
||||
|
||||
# Fehlermeldungen:
|
||||
msg_errors;errors:0;de;{string}
|
||||
|
@ -90,7 +89,7 @@ error86;errors:0;de;{unit} in {region}: '{command}' - Falsches Passwort.
|
|||
error87;errors:0;de;{unit} in {region}: '{command}' - Für das Elixier benötigt man Drachenblut.
|
||||
error88;errors:0;de;{unit} in {region}: '{command}' - Für den Schiffbau braucht man Holz.
|
||||
error89;errors:0;de;{unit} in {region}: '{command}' - Geldgebot fehlt.
|
||||
error90;errors:0;de;{unit} in {region}: '{command}' - Die Einheit hat keinen FAHRE-Befehl.
|
||||
error90;errors:0;de;{unit} in {region}: '{command}' - Die Einheit fährt nicht mit uns.
|
||||
error91;errors:0;de;{unit} in {region}: '{command}' - Hier gibt es keine Mallornbäume.
|
||||
error92;errors:0;de;{unit} in {region}: '{command}' - Hier gibt es keinen normalen Wald.
|
||||
error93;errors:0;de;{unit} in {region}: '{command}' - Hier gibt es schon einen Hafen.
|
||||
|
@ -250,7 +249,7 @@ error247;errors:0;de;{unit} in {region}: '{command}' - Die Partei hat schon eine
|
|||
error248;errors:0;de;{unit} in {region}: '{command}' - Die Partei muß mindestens 10 Runden alt sein.
|
||||
error249;errors:0;de;{unit} in {region}: '{command}' - Das Schiff kann nicht aufs offene Meer hinaus segeln.
|
||||
error250;errors:0;de;{unit} in {region}: '{command}' - Nicht genug Karma.
|
||||
error251;errors:0;de;{unit} in {region}: '{command}' - Diese Kraft haben uns die Götter schon gewährt.
|
||||
error251;errors:0;de;{unit} in {region}: '{command}' - Diese Kraft können selbst die Götter nicht mehr mächtiger machen.
|
||||
error252;errors:0;de;{unit} in {region}: '{command}' - Was und wieviel soll geopfert werden?
|
||||
error253;errors:0;de;{unit} in {region}: '{command}' - Der Magier ist nicht stark genug, sich den Göttern zu opfern.
|
||||
error254;errors:0;de;{unit} in {region}: '{command}' - Auraangabe fehlerhaft oder zuwenig Aura.
|
||||
|
@ -285,6 +284,9 @@ error282;errors:0;de;{unit} in {region}: '{command}' - Gegen diese Rasse kann ke
|
|||
error283;events:0;de;{unit} in {region}: '{command}' - Das Passwort darf nur Buchstaben und Ziffern enthalten.
|
||||
error284;errors:0;de;{unit} in {region}: '{command}' - Nur noch nicht gestärkte Untote können das Ziel dieses Zaubers sein.
|
||||
error285;errors:0;de;{unit} in {region}: '{command}' - Diese Einheit kennt keine Trankrezepte.
|
||||
error286;errors:0;de;{unit} in {region}: '{command}' - Die Einheit transportiert uns nicht.
|
||||
error287;errors:0;de;{unit} in {region}: '{command}' - Dorthin können wir die Einheit nicht transportieren.
|
||||
error288;errors:0;de;{unit} in {region}: '{command}' - Wieviel sollen wir einreißen?
|
||||
|
||||
# Meldungen und Ereignisse
|
||||
msg_event;events:0;de;{string}
|
||||
|
@ -309,7 +311,7 @@ usepotion;events:4;de;{unit} benutzt {potion}.
|
|||
spydetect;events:0;de;{target} fühlt sich durch {$unit spy} beobachtet.
|
||||
spyfail;events:0;de;{spy} gelang es nicht, etwas über {target} herauszufinden.
|
||||
stealfail;events:0;de;{unit} gelang es nicht, sich nahe genug an {target} heranzuschleichen.
|
||||
stealdetect;events:0;de;{unit} fühlt sich bebachtet.
|
||||
stealdetect;events:0;de;{unit} fühlt sich beobachtet.
|
||||
stealfatal;events:0;de;{unit} wurde beim versuchten Diebstahl ertappt.
|
||||
thiefdiscover;events:0;de;{target} ertappte {unit} beim versuchten Diebstahl.
|
||||
stealeffect;events:0;de;{unit} wurde in {region} beklaut.
|
||||
|
@ -324,6 +326,7 @@ warnillusiondissolve;events:1;de;{unit} wird sich bald verfl
|
|||
illusiondissolve;events:0;de;{unit} hat sich unbemerkt verflüchtigt.
|
||||
illusionantimagic;events:0;de;{unit} marschiert in eine Antimagiezone und löst sich auf.
|
||||
shipdestroy;events:0;de;{unit} in {region} versenkt die {ship}.
|
||||
shipdestroy_partial;events:0;de;{unit} in {region} beschädigt die {ship}.
|
||||
orcified;events:0;de;Vor den vielen Orks in {region} fliehen die anderen Einwohner.
|
||||
deorcified;events:0;de;Langsam kehren andere Völker nach {region} zurück.
|
||||
piratenovictim;events:0;de;Die {ship} in {region} kann keine Schiffe aufbringen.
|
||||
|
@ -332,6 +335,7 @@ itemcloak;events:0;de;{mage} legt einen Schleier um die Ausr
|
|||
scunicorn;events:0;de;{unit} schließen sich {amount} {type} an.
|
||||
buildroad;events:1;de;{unit} erweitert in {region} das Straßennetz um {size}.
|
||||
destroy;events:1;de;{unit} zerstört {building}.
|
||||
destroy_partial;events:1;de;{unit} reißt einen Teil von {building} ein.
|
||||
researchherb;events:0;de;{unit} in {region} stellt fest, daß es hier {amount} {herb} gibt.
|
||||
researchherb_none;events:0;de;{unit} in {region} kann keine Kräuter finden.
|
||||
destroy_road;events:0;de;{unit} reißt die Straße zwischen {from} und {to} ein.
|
||||
|
@ -490,6 +494,7 @@ puttorest;magic:0;de;{mage} befreit die gequ
|
|||
unholypower_effect;magic:0;de;{mage} verwandelt {target}.
|
||||
unholypower_limitedeffect;magic:0;de;{mage} verwandelt {amount} {race} aus {target}.
|
||||
holyground;magic:0;de;{mage} beschwört Naturgeister in den Boden der Region.
|
||||
sp_bloodsacrifice_effect;magic:0;de;{unit} in {region}: '{command}' - {unit} gewinnt durch das Ritual {amount} Aura.
|
||||
|
||||
# Kämpfe
|
||||
msg_battle;battle:0;de;{string}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Kommentare sind erlaubt. Endlich.
|
||||
# $Id: messages.de,v 1.7 2001/02/04 13:20:12 corwin Exp $
|
||||
# $Id: messages.de,v 1.8 2001/04/01 06:58:45 enno Exp $
|
||||
|
||||
# Fehlermeldungen:
|
||||
msg_errors;errors:0;de;{string}
|
||||
|
@ -304,7 +304,7 @@ usepotion;events:4;de;{unit} benutzt {potion}.
|
|||
spydetect;events:0;de;{target} fühlt sich durch {$unit spy} beobachtet.
|
||||
spyfail;events:0;de;{spy} gelang es nicht, etwas über {target} herauszufinden.
|
||||
stealfail;events:0;de;{unit} gelang es nicht, sich nahe genug an {target} heranzuschleichen.
|
||||
stealdetect;events:0;de;{unit} fühlt sich bebachtet.
|
||||
stealdetect;events:0;de;{unit} fühlt sich beobachtet.
|
||||
stealfatal;events:0;de;{unit} wurde beim versuchten Diebstahl ertappt.
|
||||
thiefdiscover;events:0;de;{target} ertappte {unit} beim versuchten Diebstahl.
|
||||
stealeffect;events:0;de;{unit} wurde in {region} beklaut.
|
||||
|
@ -486,6 +486,7 @@ puttorest;magic;0;de;{mage} befreit die gequ
|
|||
unholypower_effect;0;de;{mage} verwandelt {target}.
|
||||
unholypower_limitedeffect;0;de;{mage} verwandelt {amount} {race} aus {target}.
|
||||
holyground;0;de;{mage} beschwört Naturgeister in den Boden der Region.
|
||||
sp_bloodsacrifice_effect;magic:0;de;{unit} in {region}: '{command}' - {unit} gewinnt durch das Ritual {amount} Aura.
|
||||
|
||||
# Kämpfe
|
||||
msg_battle;battle:0;de;{string}
|
||||
|
|
Loading…
Reference in New Issue