[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-29 Thread Marko Lindqvist
Update of bug #20577 (project freeciv):

  Depends on: => patch #3812

___

Follow-up Comment #21:

patch #3812 provides new function to use for giving leader units midgame.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-28 Thread Marko Lindqvist
Follow-up Comment #20, bug #20577 (project freeciv):

- Added cleartext names for values to be used in ruleset
- Added gameloss_style entries to rulesets, with comments documenting it
- More minor style fixes
- Detect the case when there's more tokens in ruleset than maximum handled
- Do not log "Empire is too small for civil war" when in fact civilwar effect
for gameloss was not active
- Changed wording of log message when no more tech loot is available - it used
to imply that no techs were got even if some, but not requested number, were
got


(file #17585)
___

Additional Item Attachment:

File name: GamelossStyle-3.patch  Size:20 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-24 Thread Marko Lindqvist
Update of bug #20577 (project freeciv):

  Status:None => Ready For Test 
 Assigned to:None => cazfi  
 Release:   22446 =>
 Planned Release: => 2.5.0  

___

Follow-up Comment #19:

- Various style fixes
  - Function header for give_distorted_map() reorganized
  - Some variable declarations moved from the middle of the block to the
beginning
  - Empty lines added between variable declarations and first line of actual
code
  - Some block beginning braces moved to same line with "if"
- From "if (barbarians) {} else {}" moved parts present in both blocks
(=executed always) outside to avoid code duplication
- In case of illegal value in ruleset, return error from ruleset loading (was
just logging error and continuing loading)

(file #17536)
___

Additional Item Attachment:

File name: GamelossStyle-2.patch  Size:12 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-21 Thread Not Given
Follow-up Comment #18, bug #20577 (project freeciv):

> - Updated to apply on svn HEAD (r22531) 

Thank you for that. I guess it would have been exceedingly more trouble for me
than it was for you.
(I have found other ways tho apply patches than "svn patch" but, I haven't
tried them yet and I see a risk to mess up my working copy with all of my
current changes.)

So now, how do we proceed? I see you fixed that capstr, too.

Can I do anything now on this topic, or should I wait for your comments after
you did some testing?

(It worked for me on many games, but I don't have the latest version from
trunk, and I have quite a lot of other changes in my working copy by now.
There was a typo in my last post, instead of "I have /no/ more than one patch"
it should read "I have /now/ more than one patch" ... .)

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-19 Thread Marko Lindqvist
Follow-up Comment #17, bug #20577 (project freeciv):

- Updated to apply on svn HEAD (r22531)


(file #17453)
___

Additional Item Attachment:

File name: GamelossStyle.patchSize:13 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-19 Thread Not Given
Follow-up Comment #16, bug #20577 (project freeciv):

OK, here comes the next try.

It still doesn't contain the capstr thing, and still is against r22446.

Last time I updated to the trunk version it took me short of a day to cope
with all the changes and to get everything working again, so I am very
reluctant here.

Further, I have no more than one patch and many debugs in my working copy, so
I have to clean each svn diff manually, which naturally is error prone. (No,
svn patch does not work on my system.)

(file #17450)
___

Additional Item Attachment:

File name: gamelossStyle22446_v4.patchSize:12 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-19 Thread Marko Lindqvist
Follow-up Comment #15, bug #20577 (project freeciv):

It's generated file (that's what "_gen" part in its name tries to tell). You
shouldn't edit it directly (as any changes will be overwritten when it next
gets regenerated) but common/packets.def


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-19 Thread Not Given
Follow-up Comment #14, bug #20577 (project freeciv):

Excuse me, I had a concussion and still have trouble concentrating, so I
probably make even more mistakes as from natural dumbness alone.

I try to include missing packets_gen but fail, because it "is not under
version control", not even when I use the original code:

$ cp common/packets_gen.h common/Imhotep_packets_gen.h
$ svn up -r22446 packets_gen.h
At revision 22446.
$ svn diff  server/unittools.c server/ruleset.c server/maphand.c
server/maphand.h server/barbarian.c server/barbarian.h server/plrhand.c
common/packets_gen.h common/fc_types.h > gamelossStyle22446_v4.patch
svn: 'common/packets_gen.h' is not under version control


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-19 Thread Marko Lindqvist
Follow-up Comment #13, bug #20577 (project freeciv):

game.info is sent to client side, so server and client have to agree on what
it contains. If new server would send gameloss_style to old client, client
would be expect that value to be used for something completely different
purpose.

I tried to make some testign for the first time, but:
- ruleset.c part does not apply to current svn HEAD. That was trivial to fix.
In the process I noticed that game.info.gameloss_style is first set to
GAMELOSS_STYLE_CLASSICAL and then values are orred to it. I'd recommend
setting it to explicit 0 first and orring on top of that. Set to default value
GAMELOSS_STYLE_CLASSICAL only if ruleset gives no value

But then compiler errors begun:
src.patched/server/plrhand.c: In function 'kill_player':
src.patched/server/plrhand.c:159:17: error: 'struct packet_game_info' has no
member named 'gameloss_style'
src.patched/server/plrhand.c:159:35: error: 'GAMELOSS_STYLE_CWAR' undeclared
(first use in this function)



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-13 Thread Not Given
Follow-up Comment #12, bug #20577 (project freeciv):

OK, I see we were talking about different things.

But I still have no idea how this patch would affect any client side
capabilities.

All new features, as far as I can see, are handled exclusively on the server
side.

Or has it to do something  with the synchronizing issue I mentioned?

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-13 Thread Marko Lindqvist
Follow-up Comment #11, bug #20577 (project freeciv):

> So as I see it, a new capsrting will only harass any modpack
> developers, being forced to do replacements in many files,
> untimely, and, without any benefit for the final standard users. 

There's many kind of capstrings. We were not talking about ruleset one, but
network protocol one. It might not be worth maintaining in the patch as it
sometimes changes several times a day, but it must be updated when committing
- incompatible server & client won't work correctly together, leading
hard-to-debug-problems, potentially to crashes, so they must know their
incompatibility from the start not to even start the game.


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-13 Thread Not Given
Follow-up Comment #10, bug #20577 (project freeciv):

This "submit" is clearly an error, I fixed it in my working copy.

The effect is that the cities submitting are not randomly chosen, as intended,
but, after the first one, picked in the sequence order the iteration
provides.
So the game is playable as it is.

I will submit the correction together with potential future corrections or for
this change aalone, if anyone urges me to.

I doubt if the capstr change is really worth it.

The patch is on an already old version of the quickly changing trunk, probably
the whole patch will need extensive rework for the version it will finally be
merged to.
(The trouble I had upgrading to r22446 was nearly more than the time it took
to write the code. (I'm working on a separate modpack.))

The change is downward compatible in that a missing parameter just works out
as if 0 was given, for the "classic" style.
Old versions will silently ignore this option.

So as I see it, a new capsrting will only harass any modpack developers, being
forced to do replacements in many files, untimely, and, without any benefit
for the final standard users.

I am more concerned about the synchronizing issue. An observer would not see a
new palace nor any new GameLoss units until the next turn.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-12 Thread Marko Lindqvist
Follow-up Comment #9, bug #20577 (project freeciv):

Network capstr is defined in fc_version. You just need to change the mandatory
capability to mark version prior and after this patch incompatible with each
other.

I still have not tested this patch, but one thing i noticed while reading
through it:
"submit" is set to FALSE before cities are iterated, but never inside the
iteration. Once it gets set for one city, it remains set for all the following
cities.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-09 Thread Not Given
Follow-up Comment #8, bug #20577 (project freeciv):

And again a new version.

On server start, not only the requested ruleset is loaded but another one
before that. I was not aware of that and don't know if this is a bug, but it
really did cost me a lot of time.

I still have no idea what to do with "network capstr bump needed".

Palace is removed when the cities are transferred. There is code to build a
new one for the new player, along with any GameLoss units. New Palace is even
built for barbarians, and I'm not definitive if this is really a good idea.

One known bug is that the Palace as well as the GameLoss unit(s) are only
visible next turn. They are effectively there, but invisible. I haven't yet
fond the proper functions to call for synchronization.

The player was killed ("pplayer->is_alive = FALSE;") even before I touched the
code. But the civil_war-method won't work for a dead player.

The entry in game.ruleset now looks like

gameloss_style =
"GAMELOSS_STYLE_BARB|GAMELOSS_STYLE_LOOT|GAMELOSS_STYLE_CWAR"

and I don't know how to get rid of the "GAMELOSS_STYLE_" prefix in the ruleset
but keep it in the code (without introducing something new that probably
already exists somewhere).


(file #17415)
___

Additional Item Attachment:

File name: gamelossStyle22446_v3.patchSize:11 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-07 Thread Not Given
Follow-up Comment #7, bug #20577 (project freeciv):

 > As new value is transferred to client side, this changes network protocol
-> network capstr bump needed

I don't have even an idea on where to look for a clue on this ... is there a
working example that I can study?

Meanwhile, I did a lot of changes to my working copy, not only on the ticket
here.

Latest thing that drives me mad is that game.info.gameloss_style is set
correctly in ruleset.c, but when lightning strikes the enemy leader it
evaluates to 0, and no effect takes place at all.

I guess I have to do a whole lot of time consuming try&error debugging.

In the faint hope that anyone out there has had this problem before I post
*all of my diffs* as a "patch".



(file #17405)
___

Additional Item Attachment:

File name: diff22446.patchSize:28 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-07 Thread Marko Lindqvist
Follow-up Comment #6, bug #20577 (project freeciv):

- As new value is transferred to client side, this changes network protocol ->
network capstr bump needed

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-06 Thread Marko Lindqvist
Follow-up Comment #5, bug #20577 (project freeciv):

- No changes to ruleset.c? I thought the value was supposed to be read from
the ruleset.
- Don't use magic numbers "gameloss_style & 4". In fact you should probably
make gameloss styles bitwise specenum
- Spaces between many elements missing "while (n<0)" -> "while (n < 0)"
- Block starting brace should not be in new line
"while ()
  {"
->
"while () {"

- Braces needed even when block following "if" is just one line (so if another
line gets ever added, things will not blow up)
"if (!fc_rand(3))
   break; /* Out of luck */
" ->
"if (!fc_rand(3)) {
   break; /* Out of luck */
 }"

- Empty line needed between variable declararions and code
- "if (evcsize < 3) evcsize = 0; else evcsize -=3;" ->
"if (evcsize < 3) {
  evcsize = 0;
} else {
  evcsize -= 3;
}"

- Decrlaration of "int conqsize" after previous code (not in the beginning of
block)
- What happens to palace if it's in transfered cities? You disable
"savepalace" for a while so it won't be moved from city to city multiple
times, but should you finally rebuild it somewhere?
- Comment type "palyer" -> "player"

- "+/* out of sheer cruelty we reanimate the player 
+ * so he can behold what happens to his empire */
+pplayer->is_alive = TRUE;"
sounds worrisome. Should't the player stay alive all the time instead (I'm
worried what may happen while (s)he is temporarily marked dead) Actually, from
the patch it seems that this gets overwritten with "pplayer->is_alive =
FALSE;" anyway

- As create_barbarian_player() may return existing barbarian with already
established capital, you should protect against trying to give him second
one.


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-06 Thread Not Given
Follow-up Comment #4, bug #20577 (project freeciv):

ouch, yes, right one comes here

(file #17399)
___

Additional Item Attachment:

File name: gamelossStyle22446_v2.patchSize:9 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-05 Thread Marko Lindqvist
Follow-up Comment #3, bug #20577 (project freeciv):

> here is a new version of the patch 

Doesn't look like correct patch for this ticket...

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-05 Thread Not Given
Follow-up Comment #2, bug #20577 (project freeciv):

here is a new version of the patch

I did a lot of debugging on other issues and I hope I did not mix in other
changes, or leave out something.

There is still a known bug: neither the new GameLoss unit nor the new Palace
are visible immediately but only after the next turn.

I would like a feedback soon because I am on other things and want to settle
this matter to "clear my table" before differences to the trunk will make new
changes necessary, and, before I get confused with the many changes on the my
local version.

(file #17395)
___

Additional Item Attachment:

File name: gameloss_defend_22446.patchSize:0 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-05 Thread Marko Lindqvist
 In general, discussion should happen in tickets, I had to search
emails for this instead of just continuing in correct ticket.

On 2 March 2013 17:30, Imhotep  wrote:
>> - I don't point out all the individual style issues from this version,
>> please
>> check it against doc/CodingStyle and once you submit updated version I can
>> point out the remaining ones
>>
>
> I have tried, and done some, but there sure are issues left.
> I do indentation automatically via emacs, c-style "gnu". I changed this to
> "k&r".
> To check, I ran it on a copy of aiferry.c and compared with the original
> version.
> No success.
> I ran indent -kr -i2 -l77 on aiferry.c and compared with the original
> version ... it looked completely different.

 Not all of the old freeciv codebase is of the codingstyle we
currently require of new submissions. In general style of the old code
is updated only when it's anyway touched by some patch.

> CodingStyle says "Declaring variables in the middle of the function body is
> forbidden"
> which is fairly reasonable because you don't want to look for variable
> declaration in every odd places.
>
> But I'm not sure if it is meant to hold also for variables that are used
> only inside of blocks.

 That should read "... middle of the *code block* is forbidden." It's
mainly for compatibility with old C89 where variable declarations
after first real line of code simply were forbidden (some compilers
may rely on this)

> Another style question:
> I have put some snippets inside of braces, so it would be easier to move
> them if necessary.
> I didn't find anything in the CodingStyle to ban this, but then again, some
> things might be so horrible
> that most sane people wouldn't even be able to imagine.

 Well, that's something to consider case by case, I guess. I don't see
how having them inside braces would make moving them easier, but
sometimes one wants to limit visibility of a a variable to a smaller
block.

>> - gameloss_style should be documented in ruleset comments
>>
>
> In every game.ruleset or is there some global document I am not aware of?

 game.ruleset.


 - ML

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-02 Thread Imhotep

So I did some cleanup but have some questions (see comments below)

Marko Lindqvist wrote:

Update of bug #20577 (project freeciv):

Category:None => general


___

Follow-up Comment #1:

While it still needs some work, it looks promising first version.

- In the future, please submit new features as "patch" and not "bug"
  
don't know how this happened, I did want to open a patch ... perhaps my 
instinct suspected it would be more of a bug ;-)

- Debug stuff currently just commented out needs to be removed
  

done, but might have missed something

- Most log_normal() calls should be made log_debug() if not removed
completely
  

done, with one exception, changed to log_verbose instead of log_debug

- I don't point out all the individual style issues from this version, please
check it against doc/CodingStyle and once you submit updated version I can
point out the remaining ones
  

I have tried, and done some, but there sure are issues left.
I do indentation automatically via emacs, c-style "gnu". I changed this 
to "k&r".
To check, I ran it on a copy of aiferry.c and compared with the original 
version.

No success.
I ran indent -kr -i2 -l77 on aiferry.c and compared with the original 
version ... it looked completely different.


CodingStyle says "Declaring variables in the middle of the function body 
is forbidden"
which is fairly reasonable because you don't want to look for variable 
declaration in every odd places.


But I'm not sure if it is meant to hold also for variables that are used 
only inside of blocks.

For example, in plrhand.c:kill_player I have
if (prebelcapital) {
/* try to give the new player a GameLoss unit */
struct unit_type *putype = NULL;
int sucount = strlen(game.server.start_units);
int i;

log_debug("try to give the new player a GameLoss unit");
for (i = 0;i < sucount; i++) {
putype = crole_to_unit_type(game.server.start_units[i], NULL);
log_debug("unit has char %c", game.server.start_units[i]);
if (utype_has_flag(putype, UTYF_GAMELOSS)) {
create_unit_full(prebelplayer, city_tile(prebelcapital),
putype, 0, 0, putype->move_rate,
putype->hp, NULL);
}
}
}

If this rule really is meant to hold literally for such cases, too, then 
I would prefer to put these blocks into separate functions.


Another style question:
I have put some snippets inside of braces, so it would be easier to move 
them if necessary.
I didn't find anything in the CodingStyle to ban this, but then again, 
some things might be so horrible

that most sane people wouldn't even be able to imagine.


- You should define default value of its own to gameloss_style, not to use
RS_DEFAULT_BASE_POLLUTION
  

done

- gameloss_style should be documented in ruleset comments
  

In every game.ruleset or is there some global document I am not aware of?

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

  


Greetings from Imhotep

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-02-27 Thread Marko Lindqvist
Update of bug #20577 (project freeciv):

Category:None => general

___

Follow-up Comment #1:

While it still needs some work, it looks promising first version.

- In the future, please submit new features as "patch" and not "bug"

- Debug stuff currently just commented out needs to be removed
- Most log_normal() calls should be made log_debug() if not removed
completely
- I don't point out all the individual style issues from this version, please
check it against doc/CodingStyle and once you submit updated version I can
point out the remaining ones
- You should define default value of its own to gameloss_style, not to use
RS_DEFAULT_BASE_POLLUTION
- gameloss_style should be documented in ruleset comments

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-02-27 Thread Not Given
URL:
  

 Summary: new parameter gameloss_style in game.ruleset
 Project: Freeciv
Submitted by: imhotep
Submitted on: Wed 27 Feb 2013 06:18:26 PM GMT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 22446
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

When I tried to make a new modpack based on Ancients, I stumbled on an option
"gameloss_style".
According to the comment, cities conquered from players still alive were given
back to the previous owner. (So far, I found this already coded).
Depending on the parameter value, the remaining cities are either destroyed or
fall to the hands of some barbarians.

On a local copy based on version 2.4.99-dev, revision 22214, I implemented
some code to do this.

There is also code to have civil war (before any cities fall to barbarians or
vanish without a trace).
The new player gets a palace of its own, and, a Leader (it would be unfair if
the AI had no GameLoss unit to trigger all this features when we have chased
them down).

Also, I coded some benefits for the player "who liberates the oppressed people
from the enemy leader":

up to 3 techs are stolen

a random amount of gold is taken ("in compensation of the war efforts"), from
0 to the amount of gold the victim has had

using some interrogation, we press a (distorted) map from the captured leader

a random number of cities (about a quarter on average, with lesser probability
on higher numbers) can be convinced to "join the righteous cause" of the
victor

It worked on my copy on a few games, but probably has lots of yet unknown bugs
(I'm new to the code and this is my first try).




___

File Attachments:


---
Date: Wed 27 Feb 2013 06:18:27 PM GMT  Name: gamelossStyle22446.patch  Size:
11kB   By: imhotep



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev