Shannon V. OKeets
Posts: 22095
Joined: 5/19/2005 From: Honolulu, Hawaii Status: offline
|
quote:
ORIGINAL: paulderynck quote:
ORIGINAL: Shannon V. OKeets quote:
ORIGINAL: paulderynck quote:
ORIGINAL: Shannon V. OKeets As an argument in your favor for treating Istanbul as a special hex, you might look at Manila (I think it is Manila). There is a problem with the hex being adjacent to two sea areas but the port only being accessible from one of them. In WiFFE, Manila is invadeable from the South China Sea only. In MWiF, to me it is not invadeable at all, if I apply RAW (no full sea hexsides to cross from either sea zone). But I have no issue with that because of the change of scale.
It was Legaspi that I was concerned about. The Legaspi hex is clearly invadeable from either sea zone while its port no longer has direct access to the South China Sea in MWiF. I accept this as the result of the scale change. At least that is what I see if I apply RAW and the recent Q&A to the picture. I'm not clear on what the accessability of the port has to do with invading? I just assume that if you successfully invade from the South China Sea, then you crossed overland to take possession of the port versus having assaulted it on the harbour side. The problem is that the fundamental data is the hex's relationship to sea areas, with the relationship of a port to sea areas being one and the same as the relationship of the hex to the sea areas. So you could move a naval unit into/out of Legaspi from either sea area. That is how the code is written for all ports on the map. To rewrite the code so the relationship of a port to sea areas is independent of the realtionship of the hex it sits in to those same sea areas would be a lot of work (vast understatement). Instead, I expect to have to have special code that says: "if the port we are examining is Legaspi, then different rules apply, ...". What I want to know is are there other ports for which I have to write special code? ======= Writing code is non-trivial. As an example, here is one of the 3 main routines for deciding about cooperation between countries. All the comments were added by me.
// ****************************************************************************
function TMinorCountry.CooperatesWith(Cnt: TCountryID): Boolean;
// ****************************************************************************
// CooperatesWith returns whether Cnt cooperates with Self (a minor country).
// This routine is for countries, but in actual use it checks for whether units
// can cooperate. Since cooperation is always based on country of origin and
// the status of the country (conquered, liberated, etc.), this routine is here
// rather than in WIFUnits.
// ****************************************************************************
var
CMC: TMajorCountry;
CountryIn: TCountryID;
begin
CountryIn := Cnt; // So variable is not changed.
// ****************************************************************************
// For CW member countries, check if CW (major power) cooperates with CountryIn.
// ****************************************************************************
if (ID in CommonwealthCountries) or (ID = Commonwealth.ID) then
Result := Commonwealth.CooperatesWith(CountryIn)
// ****************************************************************************
// If checking whether Self cooperates with AOI, reverse the call, to check if
// AOI, (a subcountry), cooperates with Self.
// ****************************************************************************
else if CountryIn = AOI.ID then Result := AOI.CooperatesWith(Self.ID)
else
begin
// ****************************************************************************
// Commonwealth countries are treated as a one country for cooperation purposes.
// Communist China is distinct when determining cooperation. Some units belong
// to subcountries and have IDs for that subcountry. So, HomeCountry converts
// the subcountry IDs into a minor or major country ID.
// ****************************************************************************
if CountryIn in CommonwealthCountries then
CountryIn := Commonwealth.ID
else if CountryIn <> CommunistChina.ID then
CountryIn := Countries[CountryIn].HomeCountry.ID;
// ****************************************************************************
// In Barbarossa, Italian units are controlled by Germany. The conversion to
// CMC is added code to handle that unique condition.
// ****************************************************************************
if (CurrScenario = scBarbarossa) and (Self = Italy) then CMC := Italy
else CMC := Self.ControllingMajorCountry;
// ****************************************************************************
// We are now ready to check for cooperation.
// ****************************************************************************
Result := (ID = CountryIn) or // From same country
(Parent = Countries[CountryIn].Parent) or // With same parent
(CMC = Countries[CountryIn]) or // With controling major power
((Self = France) and // Free France with CW & USA
VichyFrance.Legal and
((CountryIn = UnitedStates.ID) or
(CountryIn = Commonwealth.ID)));
end;
end;
_____________________________
Steve Perfection is an elusive goal.
|