Author: sveinung Date: Fri Oct 21 13:26:17 2016 New Revision: 34201 URL: http://svn.gna.org/viewcvs/freeciv?rev=34201&view=rev Log: A real embassy excludes no embassy at all.
Let the DiplRel requirements contradiction checking know that the presence of a real embassy contradicts the absence of any embassy at all. See patch #7855 Modified: branches/S2_6/common/player.c Modified: branches/S2_6/common/player.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/player.c?rev=34201&r1=34200&r2=34201&view=diff ============================================================================== --- branches/S2_6/common/player.c (original) +++ branches/S2_6/common/player.c Fri Oct 21 13:26:17 2016 @@ -1466,7 +1466,7 @@ /* The number of mutually exclusive requirement sets that * diplrel_mess_gen() creates for the DiplRel requirement type. */ -#define DIPLREL_MESS_SIZE (1 + (DRO_LAST * (5 + 4 + 3 + 2 + 1))) +#define DIPLREL_MESS_SIZE (3 + (DRO_LAST * (5 + 4 + 3 + 2 + 1))) /************************************************************************** Generate and return an array of mutually exclusive requirement sets for @@ -1524,6 +1524,30 @@ mess_pos++; + /* Having a real embassy excludes not having an embassy. */ + BV_CLR_ALL(mess[mess_pos]); + + BV_SET(mess[mess_pos], + requirement_diplrel_ereq(DRO_HAS_REAL_EMBASSY, REQ_RANGE_LOCAL, + TRUE)); + BV_SET(mess[mess_pos], + requirement_diplrel_ereq(DRO_HAS_EMBASSY, REQ_RANGE_LOCAL, + FALSE)); + + mess_pos++; + + /* Hosting a real embassy excludes not hosting an embassy. */ + BV_CLR_ALL(mess[mess_pos]); + + BV_SET(mess[mess_pos], + requirement_diplrel_ereq(DRO_HOSTS_REAL_EMBASSY, REQ_RANGE_LOCAL, + TRUE)); + BV_SET(mess[mess_pos], + requirement_diplrel_ereq(DRO_HOSTS_EMBASSY, REQ_RANGE_LOCAL, + FALSE)); + + mess_pos++; + /* Loop over diplstate_type and diplrel_other. */ for (rel = 0; rel < DRO_LAST; rel++) { /* The presence of a DiplRel at a more local range proves that it can't _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits