Follow-up Comment #6, patch #5306 (project freeciv):

> Expelling a diplomat will send him home. My suggestion is to send him to his
capital. (Capital of the expelled unit, not the capital of the unit doing the
expulsion) This creates a corner case for players without a capital. You could
add that the expelled unit has a capital as a hard coded requirement to the
action and as an assertion to the function doing the expelling. An alternative
is to use the unit's home city. That creates another corner case: units
without a home city.
Ok...
> The action should be documented in doc/README.actions 
Done.
> change names. "expel units" -> "expel unit", etc 
Done.
> the clients should send the target unit, not the target tile
Done.
> Why do you define a unit lost reason? The unit is sent home, not killed.
Because... I'm very confuse.
> Why would anyone become a veteran from expelling a unit? This will be used
to let players expel diplomats they can't kill because of a peace treaty.
Don't assume a battle here.
Because 
> Why hard code that you can't expel your own units? A ruleset author may use
the action to create a unit that will teleport a unit to its capital/home
city/etc. A ruleset like that may even wish to limit the action to domestic
units. 
I totally agree. Unfortunately I have to read the code with more attention.
> diplomat_bribe() and spy_sabotage_unit() in diplomats.c - performs (spy)
actions with a unit target 
I don't know... but I've copied and pasted exactly diplomat_bribe(), but I
change every name as "victim, diplomat, etc.".
> teleport_unit_to_city() in unittools - function that moves a unit to a city.
Maybe you can use it directly? 
Very interesting... The same thing for find_closest_city(). I've added the
function in the patch, but I don't know how I can insert "Capital" reference
in the code. I was thinking about another "find" where I search a city with
"Palace". 

Capital is a city where you can find the Palace... It's correct?

(file #24676)
    _______________________________________________________

Additional Item Attachment:

File name: expel_units.patch              Size:17 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?5306>

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


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

Reply via email to