[Freeciv-Dev] (PR#8853) design for generalized specialists
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#8853) design for generalized specialists |
From: |
"Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx> |
Date: |
Thu, 27 May 2004 17:24:02 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8853 >
SMAC has varied specialists. This was a slick feature. Although
implementing this may not be a priority it's also easy to do and
shouldn't overlap with other work. So there's no real reason to delay it.
My proposal is that we move the existing specialist information into the
rulesets - equivalent to removing any reference to "elvis", "scientist",
"taxman" in the code - without specifically adding any new features.
Once this is done we can add new flags and effects that give us the
extended behavior we want.
This is done in three (possibly overlapping) steps.
In the first step, the hard-coded variables (like ppl_elvis) are removed
and replaced with arrays (like ppl[SP_ELVIS]). This is simple, and has
already been done for some variables.
In the second step the references to the enumeration are removed and
replaced with loops or data loaded from the ruleset. For instance
instead of
luxury += ppl[SP_ELVIS] * 2;
science += ppl[SP_SCIENTIST] * 2;
taxman += ppl[SP_TAXMAN] * 2;
we would have
for (i = 0; i < SP_COUNT; i++) {
luxury += ppl[i] * bonus_lux[i];
science += ppl[i] * bonus_sci[i];
taxman += ppl[i] * bonus_tax[i];
}
This step will take more work but is mostly localized.
In the final step the enumeration is removed and the data is now taken
directly from the ruleset.
jason
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#8853) design for generalized specialists,
Jason Short <=
|
|