forked from github/server
- Stirb-Ergänzung um Übergabe
This commit is contained in:
parent
034c0073cc
commit
1974fe5baa
|
@ -1025,6 +1025,24 @@ inactivefaction(faction * f)
|
||||||
fclose(inactiveFILE);
|
fclose(inactiveFILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENHANCED_QUIT
|
||||||
|
static void
|
||||||
|
transfer_faction(faction *f, faction *f2)
|
||||||
|
{
|
||||||
|
unit *u, *un;
|
||||||
|
|
||||||
|
for (u = f->units; u;) {
|
||||||
|
un = u->next;
|
||||||
|
if(!unit_has_cursed_item(u)
|
||||||
|
&& !has_skill(u, SK_MAGIC)
|
||||||
|
&& !has_skill(u, SK_ALCHEMY)) {
|
||||||
|
u_setfaction(u, f2);
|
||||||
|
}
|
||||||
|
u = un;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
quit(void)
|
quit(void)
|
||||||
{
|
{
|
||||||
|
@ -1043,7 +1061,36 @@ quit(void)
|
||||||
for (S = u->orders; S; S = S->next) {
|
for (S = u->orders; S; S = S->next) {
|
||||||
if (igetkeyword(S->s, u->faction->locale) == K_QUIT) {
|
if (igetkeyword(S->s, u->faction->locale) == K_QUIT) {
|
||||||
if (checkpasswd(u->faction, getstrtoken())) {
|
if (checkpasswd(u->faction, getstrtoken())) {
|
||||||
|
#ifdef ENHANCED_QUIT
|
||||||
|
int f2_id = getid();
|
||||||
|
|
||||||
|
if(f2_id > 0) {
|
||||||
|
faction *f2 = findfaction(f2_id);
|
||||||
|
|
||||||
|
f = u->faction;
|
||||||
|
|
||||||
|
if(f2 == NULL) {
|
||||||
|
cmistake(u, S->s, 66, MSG_EVENT);
|
||||||
|
} else if(f == f2) {
|
||||||
|
cmistake(u, S->s, 8, MSG_EVENT);
|
||||||
|
#ifdef ALLIANCES
|
||||||
|
} else if(u->faction->alliance != f2->alliance) {
|
||||||
|
cmistake(u, S->s, 315, MSG_EVENT);
|
||||||
|
#else
|
||||||
|
#warning ENHANCED_QUIT defined without ALLIANCES
|
||||||
|
#endif
|
||||||
|
} else if(alliedfaction(NULL, f, f2, HELP_MONEY)) {
|
||||||
|
cmistake(u, S->s, 316, MSG_EVENT);
|
||||||
|
} else {
|
||||||
|
transfer_faction(f,f2);
|
||||||
|
destroyfaction(f);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
destroyfaction(u->faction);
|
destroyfaction(u->faction);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
destroyfaction(u->faction);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
cmistake(u, S->s, 86, MSG_EVENT);
|
cmistake(u, S->s, 86, MSG_EVENT);
|
||||||
|
|
|
@ -906,7 +906,7 @@ sp_chaosrow(fighter * fi, int level, int force, spell * sp)
|
||||||
if (df->unit->race->battle_flags & BF_NOBLOCK) {
|
if (df->unit->race->battle_flags & BF_NOBLOCK) {
|
||||||
df->side->nonblockers[row] -= df->alive;
|
df->side->nonblockers[row] -= df->alive;
|
||||||
}
|
}
|
||||||
row = FIRST_ROW + (rand()%(NUMROWS-1));
|
row = FIRST_ROW + (rand()%(LAST_ROW-FIRST_ROW));
|
||||||
switch (row) {
|
switch (row) {
|
||||||
case FIGHT_ROW:
|
case FIGHT_ROW:
|
||||||
df->status = ST_FIGHT;
|
df->status = ST_FIGHT;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#define LARGE_CASTLES 1
|
#define LARGE_CASTLES 1
|
||||||
#define NEW_MIGRATION 1
|
#define NEW_MIGRATION 1
|
||||||
#define NEW_RESOURCEGROWTH 1
|
#define NEW_RESOURCEGROWTH 1
|
||||||
#define NMRTIMEOUT 5
|
#define NMRTIMEOUT 99
|
||||||
#define PEASANTS_DO_NOT_STARVE 0
|
#define PEASANTS_DO_NOT_STARVE 0
|
||||||
#define PEASANT_ADJUSTMENT 1
|
#define PEASANT_ADJUSTMENT 1
|
||||||
#define RACE_ADJUSTMENTS 1
|
#define RACE_ADJUSTMENTS 1
|
||||||
|
@ -46,6 +46,7 @@
|
||||||
#define ROIBONUS 4
|
#define ROIBONUS 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define ENHANCED_QUIT
|
||||||
#define ALLIANCES
|
#define ALLIANCES
|
||||||
#undef ALLIANCEJOIN
|
#undef ALLIANCEJOIN
|
||||||
#define AUTOALLIANCE (HELP_FIGHT)
|
#define AUTOALLIANCE (HELP_FIGHT)
|
||||||
|
|
|
@ -4484,6 +4484,25 @@
|
||||||
<text locale="en">"$unit($unit) in $region($region): '$command' - Restart can only be used once."</text>
|
<text locale="en">"$unit($unit) in $region($region): '$command' - Restart can only be used once."</text>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
|
<message name="error315">
|
||||||
|
<type>
|
||||||
|
<arg name="unit" type="unit"></arg>
|
||||||
|
<arg name="region" type="region"></arg>
|
||||||
|
<arg name="command" type="string"></arg>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($unit) in $region($region): '$command' - Die Partei kann nur an eine Partei in derselben Allianz übergeben werden."</text>
|
||||||
|
<text locale="en">"$unit($unit) in $region($region): '$command' - The faction can only be given to a faction in the same alliance."</text>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message name="error316">
|
||||||
|
<type>
|
||||||
|
<arg name="unit" type="unit"></arg>
|
||||||
|
<arg name="region" type="region"></arg>
|
||||||
|
<arg name="command" type="string"></arg>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($unit) in $region($region): '$command' - Die Partei möchte unsere Personen nicht aufnehmen."</text>
|
||||||
|
<text locale="en">"$unit($unit) in $region($region): '$command' - The faction does not want to take out people."</text>
|
||||||
|
</message>
|
||||||
|
|
||||||
<message name="drown_on_ship">
|
<message name="drown_on_ship">
|
||||||
<type>
|
<type>
|
||||||
|
|
Loading…
Reference in New Issue