]> git.pond.sub.org Git - empserver/commitdiff
Require friendly relations for trade ship to pay off
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 13 Sep 2008 22:05:58 +0000 (18:05 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 15 Sep 2008 23:04:17 +0000 (19:04 -0400)
info/Trade-ships.t
src/lib/commands/scut.c

index 95034546a74d4eb5c8202c5c100e4c9a0ab86091..ce29cadd4b1e8e3251b6b2a04fa81c1d5c66052c 100644 (file)
@@ -12,8 +12,8 @@ In the empire version, you make a trade ship, using lots of cm's, and costing
 $2500. You then sail it to a harbor somewhere and scuttle it. You then receive
 money, with a varying rate of return.
 .s1
-The trade ship MUST be scuttled in a harbor that is at least 2% efficient to
-make money. (In other sectors,
+The trade ship MUST be scuttled in a friendly harbor that is at least
+2% efficient to make money. (In other sectors,
 it sinks quietly, like most ships) You may scuttle it in either a harbor you
 own, or the harbor of an ally. Pirates who capture a trade ship may also gain
 money from it, just as if they were the lawful owner (although the news knows
index 9454f3e28edc44133a7641633ccde903e8a79b9f..f5adb17aa1f914323ba60bda87b974f4fde2f090 100644 (file)
@@ -165,7 +165,8 @@ scuttle_tradeship(struct shpstr *sp, int interactive)
 
     mp = &mchr[(int)sp->shp_type];
     getsect(sp->shp_x, sp->shp_y, &sect);
-    if (sect.sct_own && sect.sct_type == SCT_HARBR && sect.sct_effic >= 2) {
+    if (sect.sct_own && sect.sct_type == SCT_HARBR && sect.sct_effic >= 2
+       && getrel(getnatp(sect.sct_own), sp->shp_own) >= FRIENDLY) {
        dist = mapdist(sp->shp_x, sp->shp_y,
                       sp->shp_orig_x, sp->shp_orig_y);
        /* Don't disclose distance to to pirates */