forked from github/server
parent
5eb4f6a222
commit
7bb61ccab4
|
@ -1009,6 +1009,7 @@ cansee(const faction * f, const region * r, const unit * u, int modifier)
|
||||||
int n;
|
int n;
|
||||||
boolean cansee = false;
|
boolean cansee = false;
|
||||||
unit *u2;
|
unit *u2;
|
||||||
|
static const item_type * itype_grail = (const item_type *)0xdeadbeef;
|
||||||
|
|
||||||
if (u->faction == f || omniscient(f)) {
|
if (u->faction == f || omniscient(f)) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -1023,7 +1024,11 @@ cansee(const faction * f, const region * r, const unit * u, int modifier)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
n = eff_stealth(u, r) - modifier;
|
|
||||||
|
if (itype_grail==(const item_type *)0xdeadbeef) itype_grail = it_find("grail");
|
||||||
|
if (itype_grail!=NULL && i_get(u->items, itype_grail)) return true;
|
||||||
|
|
||||||
|
n = eff_stealth(u, r) - modifier;
|
||||||
for (u2 = r->units; u2; u2 = u2->next) {
|
for (u2 = r->units; u2; u2 = u2->next) {
|
||||||
if (u2->faction == f) {
|
if (u2->faction == f) {
|
||||||
int o;
|
int o;
|
||||||
|
@ -1053,73 +1058,6 @@ cansee(const faction * f, const region * r, const unit * u, int modifier)
|
||||||
return cansee;
|
return cansee;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
boolean
|
|
||||||
cansee(faction * f, region * r, unit * u, int modifier)
|
|
||||||
/* r kann != u->region sein, wenn es um durchreisen geht */
|
|
||||||
/* und es muss niemand aus f in der region sein, wenn sie vom Turm
|
|
||||||
* erblickt wird */
|
|
||||||
{
|
|
||||||
boolean cansee = false;
|
|
||||||
unit *u2;
|
|
||||||
#if FAST_CANSEE
|
|
||||||
static region * lastr = NULL;
|
|
||||||
static faction * lastf = NULL;
|
|
||||||
static int maxskill = INT_MIN;
|
|
||||||
#endif
|
|
||||||
int n = 0;
|
|
||||||
boolean ring = false;
|
|
||||||
if (u->faction == f || omniscient(f)) return true;
|
|
||||||
#if FAST_CANSEE /* buggy */
|
|
||||||
if (lastr==r && lastf==f) {
|
|
||||||
n = eff_stealth(u, r) - modifier;
|
|
||||||
if (n<=maxskill) return true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
lastf=f;
|
|
||||||
lastr=r;
|
|
||||||
maxskill=INT_MIN;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (old_race(u->race) == RC_SPELL || u->number == 0) return false;
|
|
||||||
else {
|
|
||||||
boolean xcheck = false;
|
|
||||||
int o = INT_MIN;
|
|
||||||
ring = (boolean)(ring || (invisible(u) >= u->number));
|
|
||||||
n = n || eff_stealth(u, r) - modifier;
|
|
||||||
for (u2 = r->units; u2; u2 = u2->next) {
|
|
||||||
if (u2->faction == f) {
|
|
||||||
|
|
||||||
if (!xcheck && (getguard(u) || usiege(u) || u->building || u->ship)) {
|
|
||||||
cansee = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
xcheck = true;
|
|
||||||
|
|
||||||
#if NEWATSROI == 0
|
|
||||||
if (ring && !get_item(u2, I_AMULET_OF_TRUE_SEEING))
|
|
||||||
continue;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
o = eff_skill(u2, SK_OBSERVATION, r);
|
|
||||||
#ifdef NIGHTEYES
|
|
||||||
if (u2->enchanted == SP_NIGHT_EYES && o < NIGHT_EYE_TALENT)
|
|
||||||
o = NIGHT_EYE_TALENT;
|
|
||||||
#endif
|
|
||||||
if (o >= n) {
|
|
||||||
cansee = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#if FAST_CANSEE
|
|
||||||
maxskill = o;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
return cansee;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
cansee_durchgezogen(const faction * f, const region * r, const unit * u, int modifier)
|
cansee_durchgezogen(const faction * f, const region * r, const unit * u, int modifier)
|
||||||
|
|
|
@ -6024,4 +6024,14 @@
|
||||||
</text>
|
</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
|
<string name="grail">
|
||||||
|
<text locale="de">Gral</text>
|
||||||
|
<text locale="en">grail</text>
|
||||||
|
</string>
|
||||||
|
|
||||||
|
<string name="grail_p">
|
||||||
|
<text locale="de">Grale</text>
|
||||||
|
<text locale="en">grails</text>
|
||||||
|
</string>
|
||||||
|
|
||||||
</strings>
|
</strings>
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resources>
|
||||||
|
<resource name="grail">
|
||||||
|
<!-- LMS reward -->
|
||||||
|
<function name="change" value="changeitem"/>
|
||||||
|
<item cursed="yes" notlost="yes" weight="0"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="greatbow">
|
||||||
|
<function name="change" value="changeitem"/>
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="sk_weaponsmithing" minskill="5" reqsize="1">
|
||||||
|
<modifier function="mod_elves_only"/>
|
||||||
|
<requirement type="mallorn" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" missile="true" skill="sk_bow" offmod="0" defmod="0" reload="0" magres="0.0">
|
||||||
|
<damage type="rider" value="2d6+4"/>
|
||||||
|
<damage type="footman" value="2d6+4"/>
|
||||||
|
<modifier type="missile_target" value="2"/>
|
||||||
|
<modifier type="damage" value="1">
|
||||||
|
<race name="elf"/>
|
||||||
|
</modifier>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="halberd">
|
||||||
|
<item weight="200">
|
||||||
|
<construction skill="sk_weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="log" quantity="2"/>
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="sk_polearm" offmod="-1" defmod="2" magres="0.0">
|
||||||
|
<damage type="rider" value="2d6+3"/>
|
||||||
|
<damage type="footman" value="2d6+3"/>
|
||||||
|
<modifier type="skill" value="1" walking="true" against_riding="true" defensive="true"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
</resources>
|
|
@ -23,6 +23,7 @@
|
||||||
<game name="HSE" welcome="eressea">
|
<game name="HSE" welcome="eressea">
|
||||||
<comment>Game specific</comment>
|
<comment>Game specific</comment>
|
||||||
<order name="MEINUNG" disable="yes"/>
|
<order name="MEINUNG" disable="yes"/>
|
||||||
|
<order name="NUMMER" disable="yes"/>
|
||||||
<order name="MAGIEGEBIET" disable="yes"/>
|
<order name="MAGIEGEBIET" disable="yes"/>
|
||||||
<param name="entertain.base" value="15"/>
|
<param name="entertain.base" value="15"/>
|
||||||
<param name="entertain.perlevel" value="5"/>
|
<param name="entertain.perlevel" value="5"/>
|
||||||
|
@ -38,6 +39,7 @@
|
||||||
<xi:include href="eressea/en/strings.xml"/>
|
<xi:include href="eressea/en/strings.xml"/>
|
||||||
<xi:include href="eressea/races.xml"/>
|
<xi:include href="eressea/races.xml"/>
|
||||||
<xi:include href="eressea/items.xml"/>
|
<xi:include href="eressea/items.xml"/>
|
||||||
|
<xi:include href="eressea/items-hse05.xml"/>
|
||||||
<xi:include href="eressea/dungeons.xml"/>
|
<xi:include href="eressea/dungeons.xml"/>
|
||||||
<xi:include href="eressea/temple.xml"/>
|
<xi:include href="eressea/temple.xml"/>
|
||||||
<strings>
|
<strings>
|
||||||
|
|
Loading…
Reference in New Issue