forked from github/server
Diverse wdw-Fixes
This commit is contained in:
parent
78d222138e
commit
10b1306b30
|
@ -1089,6 +1089,7 @@ quit(void)
|
|||
if (f->flags & FFL_QUIT) {
|
||||
if (EnhancedQuit()) {
|
||||
const char * token = get_variable(f->attribs, "quit");
|
||||
if(token != NULL) {
|
||||
int f2_id = atoi36(token);
|
||||
faction *f2 = findfaction(f2_id);
|
||||
|
||||
|
@ -1096,6 +1097,7 @@ quit(void)
|
|||
assert(f2!=NULL);
|
||||
transfer_faction(f, f2);
|
||||
}
|
||||
}
|
||||
destroyfaction(f);
|
||||
}
|
||||
if (*fptr==f) fptr=&f->next;
|
||||
|
|
|
@ -98,8 +98,9 @@ use_hornofdancing(struct unit * u, const struct item_type * itype,
|
|||
|
||||
#define SPEEDUP 2
|
||||
|
||||
|
||||
static int
|
||||
use_trappedairelemental(struct unit * u, int shipId,
|
||||
useonother_trappedairelemental(struct unit * u, int shipId,
|
||||
const struct item_type * itype,
|
||||
int amount, struct order * ord)
|
||||
{
|
||||
|
@ -131,10 +132,25 @@ use_trappedairelemental(struct unit * u, int shipId,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
use_trappedairelemental(struct unit * u,
|
||||
const struct item_type * itype,
|
||||
int amount, struct order * ord)
|
||||
{
|
||||
ship *sh = u->ship;
|
||||
|
||||
if(sh == NULL) {
|
||||
cmistake(u, ord, 20, MSG_MOVE);
|
||||
return -1;
|
||||
}
|
||||
return useonother_trappedairelemental(u, sh->no, itype, amount,ord);
|
||||
}
|
||||
|
||||
void
|
||||
register_artrewards(void)
|
||||
{
|
||||
at_register(&at_peaceimmune);
|
||||
register_function((pf_generic)use_hornofdancing, "use_hornofdancing");
|
||||
register_function((pf_generic)use_trappedairelemental, "use_trappedairelemental");
|
||||
register_function((pf_generic)useonother_trappedairelemental, "useonother_trappedairelemental");
|
||||
}
|
||||
|
|
|
@ -306,6 +306,7 @@ victorycondition(const alliance * al, const char * name)
|
|||
if (!found) return 0;
|
||||
}
|
||||
return 1;
|
||||
|
||||
} else if (strcmp(name, "phoenix")==0) {
|
||||
faction_list * flist = al->members;
|
||||
for (;flist;flist=flist->next) {
|
||||
|
@ -315,7 +316,24 @@ victorycondition(const alliance * al, const char * name)
|
|||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
} else if (strcmp(name, "pyramid")==0) {
|
||||
|
||||
/* Logik:
|
||||
* - if (pyr > last_passed_size && pyr > all_others) {
|
||||
* pyr->passed->counter++;
|
||||
* for(all_other_pyrs) {
|
||||
* pyr->passed->counter=0;
|
||||
* }
|
||||
*
|
||||
* if(pyr->passed->counter >= 3) {
|
||||
* set(pyr, passed);
|
||||
* pyr->owner->set_attrib(pyra);
|
||||
* }
|
||||
* last_passed_size = pyr->size;
|
||||
* }
|
||||
*/
|
||||
|
||||
faction_list * flist = al->members;
|
||||
for (;flist;flist=flist->next) {
|
||||
faction * f = flist->data;
|
||||
|
|
|
@ -1452,6 +1452,7 @@ do_combatmagic(battle *b, combatmagic_t was)
|
|||
const spell * sp = co->sp;
|
||||
int level = co->level;
|
||||
double power = co->force;
|
||||
|
||||
if (sp->sp_function==NULL) {
|
||||
log_error(("spell '%s' has no function.\n", sp->sname));
|
||||
} else {
|
||||
|
|
|
@ -531,6 +531,7 @@ max_skill(faction * f, skill_t sk)
|
|||
int ac = listlen(f->alliance->members); /* number of factions */
|
||||
int al = allied_skilllimit(f, sk); /* limit per alliance */
|
||||
int fl = (al+ac-1)/ac; /* faction limit */
|
||||
/* the following ist _very_ weird, please examine */
|
||||
int sc = al - allied_skillcount(f, sk);
|
||||
if (sc==0) return count_skill(f, sk);
|
||||
return fl;
|
||||
|
|
|
@ -1053,7 +1053,7 @@ sp_hero(fighter * fi, int level, double power, spell * sp)
|
|||
unit *mage = fi->unit;
|
||||
/* Immer aus der ersten Reihe nehmen */
|
||||
int minrow = FIGHT_ROW;
|
||||
int maxrow = BEHIND_ROW-1;
|
||||
int maxrow = BEHIND_ROW;
|
||||
int df_bonus = 0;
|
||||
int force = 0;
|
||||
int allies;
|
||||
|
@ -1064,12 +1064,12 @@ sp_hero(fighter * fi, int level, double power, spell * sp)
|
|||
switch(sp->id) {
|
||||
case SPL_HERO:
|
||||
df_bonus = (int)(power/5);
|
||||
force = lovar(get_force(power, 4));
|
||||
force = max(1, lovar(get_force(power, 4)));
|
||||
break;
|
||||
|
||||
default:
|
||||
df_bonus = 1;
|
||||
force = (int)power;
|
||||
force = max(1, (int)power);
|
||||
}
|
||||
scat(":");
|
||||
battlerecord(b, buf);
|
||||
|
|
|
@ -841,7 +841,7 @@ check_mages(void)
|
|||
}
|
||||
if (mages>maxmages) {
|
||||
log_error(("faction %s has %d of max %d magicians.\n",
|
||||
factionid(u->faction), mages, maxmages));
|
||||
factionid(f), mages, maxmages));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -183,7 +183,15 @@
|
|||
</type>
|
||||
<text locale="de">"In dieser Gegend steht das Korn besonders gut im Feld. ($int36($id))"</text>
|
||||
<text locale="fr">"($int36($id))"</text>
|
||||
<text locale="en">"The grain in this region is esecially healthy. ($int36($id))"</text>
|
||||
<text locale="en">"The grain in this region is especially healthy. ($int36($id))"</text>
|
||||
</message>
|
||||
<message name="curseinfo::shipspeedup" section="events">
|
||||
<type>
|
||||
<arg name="id" type="int"/>
|
||||
</type>
|
||||
<text locale="de">"Die Winde scheinen dieses Schiff besonders zu beguenstigen. ($int36($id))"</text>
|
||||
<text locale="fr">"($int36($id))"</text>
|
||||
<text locale="en">"The winds seem to favor this ship. ($int36($id))"</text>
|
||||
</message>
|
||||
<message name="curseinfo::holyground" section="events">
|
||||
<type>
|
||||
|
|
|
@ -680,7 +680,7 @@
|
|||
<attack type="4" damage="5d30"/>
|
||||
<attack type="6" spell="powerful_dragonbreath"/>
|
||||
</race>
|
||||
<race name="dragon" magres="0.700000" maxaura="1.000000" regaura="2.000000" recruitcost="50000" weight="10000" capacity="1000000" speed="1.500000" hp="900" ac="6" damage="2d30" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes">
|
||||
<race name="dragon" magres="0.700000" maxaura="1.000000" regaura="2.000000" recruitcost="50000" weight="10000" capacity="1000000" speed="1.500000" hp="900" ac="6" damage="2d30" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" giveitem="yes" resistbash="yes">
|
||||
<ai splitsize="2" killpeasants="yes" learn="yes"/>
|
||||
<function name="name" value="namedragon"/>
|
||||
<function name="age" value="agedragon"/>
|
||||
|
|
|
@ -88,9 +88,9 @@
|
|||
</strings>
|
||||
|
||||
<resources>
|
||||
<resource name="phoenixfeather">
|
||||
<resource name="phoenixfeather" notlost="yes">
|
||||
<function name="change" value="changeitem"/>
|
||||
<item weight="0"/>
|
||||
<item weight="0" notlost="yes"/>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
|
|
|
@ -19,26 +19,35 @@
|
|||
</construction>
|
||||
<construction skill="building" minskill="11" maxsize="12" reqsize="1">
|
||||
<requirement type="iron" quantity="10"/>
|
||||
<requirement type="log" quantity="10"/>
|
||||
<requirement type="mallorn" quantity="10"/>
|
||||
<requirement type="stone" quantity="10"/>
|
||||
</construction>
|
||||
<construction skill="building" minskill="11" maxsize="16" reqsize="1">
|
||||
<requirement type="laen" quantity="1"/>
|
||||
<requirement type="iron" quantity="10"/>
|
||||
<requirement type="log" quantity="10"/>
|
||||
<requirement type="mallorn" quantity="10"/>
|
||||
<requirement type="stone" quantity="10"/>
|
||||
</construction>
|
||||
<construction skill="building" minskill="11" maxsize="20" reqsize="1">
|
||||
<requirement type="laen" quantity="5"/>
|
||||
<requirement type="iron" quantity="10"/>
|
||||
<requirement type="log" quantity="10"/>
|
||||
<requirement type="mallorn" quantity="10"/>
|
||||
<requirement type="stone" quantity="10"/>
|
||||
</construction>
|
||||
<construction skill="building" minskill="11" maxsize="24" reqsize="1">
|
||||
<requirement type="laen" quantity="10"/>
|
||||
<requirement type="iron" quantity="10"/>
|
||||
<requirement type="log" quantity="10"/>
|
||||
<requirement type="mallorn" quantity="10"/>
|
||||
<requirement type="stone" quantity="10"/>
|
||||
</construction>
|
||||
<construction skill="building" minskill="11" maxsize="28" reqsize="1">
|
||||
<requirement type="laen" quantity="10"/>
|
||||
<requirement type="iron" quantity="10"/>
|
||||
<requirement type="log" quantity="10"/>
|
||||
<requirement type="mallorn" quantity="10"/>
|
||||
<requirement type="stone" quantity="10"/>
|
||||
</construction>
|
||||
|
|
|
@ -159,7 +159,6 @@
|
|||
<attack type="4" damage="5d30"/>
|
||||
<attack type="4" damage="3d20"/>
|
||||
<attack type="4" damage="3d20"/>
|
||||
<attack type="4" damage="5d30"/>
|
||||
<attack type="6" spell="drain_skills"/>
|
||||
<attack type="6" spell="aura_of_fear"/>
|
||||
<precombatspell spell="shadowcall"/>
|
||||
|
@ -173,11 +172,7 @@
|
|||
<attack type="4" damage="5d30"/>
|
||||
<attack type="4" damage="3d20"/>
|
||||
<attack type="4" damage="3d20"/>
|
||||
<attack type="4" damage="5d30"/>
|
||||
<attack type="6" spell="drain_skills"/>
|
||||
<attack type="6" spell="aura_of_fear"/>
|
||||
<precombatspell spell="bloodthirst"/>
|
||||
<precombatspell spell="heroic_song"/>
|
||||
<precombatspell spell="frighten"/>
|
||||
</race>
|
||||
<race name="bastet" magres="0.950000" maxaura="1.000000" regaura="3.000000" recruitcost="2500000" weight="100" capacity="100000" speed="2.000000" hp="2700" ac="10" damage="2d60" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="12" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes" resistcut="yes" resistpierce="yes" shapeshift="yes">
|
||||
<ai splitsize="1" learn="yes"/>
|
||||
|
@ -188,7 +183,6 @@
|
|||
<attack type="4" damage="5d30"/>
|
||||
<attack type="4" damage="3d20"/>
|
||||
<attack type="4" damage="3d20"/>
|
||||
<attack type="4" damage="5d30"/>
|
||||
<attack type="6" spell="drain_skills"/>
|
||||
<attack type="6" spell="aura_of_fear"/>
|
||||
<precombatspell spell="heroic_song"/>
|
||||
|
|
|
@ -10,7 +10,10 @@ function update_phoenix()
|
|||
end
|
||||
f = get_faction(0)
|
||||
if (f~=nil) then
|
||||
local r, nregions = 0
|
||||
local r
|
||||
local nregions
|
||||
|
||||
nregions = 0
|
||||
for r in regions() do
|
||||
nregions = nregions+1
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue