Hi there,

after trying the wiki and the forum, I'm finally trolling here.
(Not that I intend to troll but, the reactions (or the lack of) make me feel like that).

I have recently managed to make a first version of the gameloss_style parameter.
(See my posts on the forum and the wiki.)

Depending on bit 2¹ there is civil war when a GameLoss figure is killed.
Depending on bit 2⁰ the remaining cities fall to the barbarians or completely vanish without a trace.
(Units go along with their cities, the rest is killed.)

That's all for now, because I'm quite new to the code and I want to consolidate what I've coded before I make more extensions
(like random benefits for the player that killed the enemy leader or tech losses for the resulting new AI).

The code worked on one (and up to now only one) test.
(BTW, why can't I copy&paste the Messages window?)

Now I am quite sure I did some horrible mistakes, first of all using C++-style comments
(intended only to find my changes and to be removed before any committing),
but there might also be some minor issues, like the code crashing in some circumstances.
Or to introduce unnecessary complexity or missing some side effects.

For example, to create the barbarians in plrhand.c I had not only to include barbarians.h
but also I introduced a new function create_barbarian_player_land() in barbarians.*.

The reason I introduced a new function was that the create_barbarian_palyer(enum barbarian_type type)
is static, and I have no idea how to find out if this has a solid reason or might be only out of cautiousness,
as it is generally a good idea to keep as many functions as possible static.

So now, what is the next step?

Committing my changes now is very certainly not a good idea.
Learning all the rules by heart before coding anything is certainly not a good idea, too.

Greetings from Imhotep

Freeciv-dev mailing list

Reply via email to