forked from github/server
Merge remote-tracking branch 'origin/Bug-1857'
This commit is contained in:
commit
13e544a233
|
@ -1577,7 +1577,7 @@ bool check_leuchtturm(region * r, faction * f)
|
||||||
if (fval(b, BLD_WORKING) && b->size >= 10) {
|
if (fval(b, BLD_WORKING) && b->size >= 10) {
|
||||||
int maxd = (int)log10(b->size) + 1;
|
int maxd = (int)log10(b->size) + 1;
|
||||||
|
|
||||||
if (skill_enabled(SK_PERCEPTION)) {
|
if (skill_enabled(SK_PERCEPTION) && f) {
|
||||||
region *r2 = b->region;
|
region *r2 = b->region;
|
||||||
unit *u;
|
unit *u;
|
||||||
int c = 0;
|
int c = 0;
|
||||||
|
|
|
@ -1763,9 +1763,15 @@ sail(unit * u, order * ord, bool move_on_land, region_list ** routep)
|
||||||
|
|
||||||
/* storms should be the first thing we do. */
|
/* storms should be the first thing we do. */
|
||||||
stormchance = stormyness / shipspeed(sh, u);
|
stormchance = stormyness / shipspeed(sh, u);
|
||||||
if (check_leuchtturm(next_point, NULL))
|
if (check_leuchtturm(next_point, NULL)) {
|
||||||
stormchance /= 3;
|
int param = get_param_int(global.parameters, "rules.lighthous.stormchancedevisor", 0);
|
||||||
|
if (param > 0) {
|
||||||
|
stormchance /= param;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
stormchance = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (rng_int() % 10000 < stormchance * sh->type->storm
|
if (rng_int() % 10000 < stormchance * sh->type->storm
|
||||||
&& fval(current_point->terrain, SEA_REGION)) {
|
&& fval(current_point->terrain, SEA_REGION)) {
|
||||||
if (!is_cursed(sh->attribs, C_SHIP_NODRIFT, 0)) {
|
if (!is_cursed(sh->attribs, C_SHIP_NODRIFT, 0)) {
|
||||||
|
|
Loading…
Reference in New Issue