URL:
  <http://gna.org/bugs/?19689>

                 Summary: add 'random' command to set AI skill to random level
                 Project: Freeciv
            Submitted by: rcurtin
            Submitted on: Wed 02 May 2012 05:05:40 AM GMT
                Category: general
                Severity: 2 - Minor
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 

    _______________________________________________________

Details:

A patch is attached which allows the server command 'random' (similar to
'normal' or 'experimental' or similar) which sets all the AI (or the specified
player) to have a random skill level between AI_LEVEL_NOVICE and
AI_LEVEL_CHEATING.

Here is freeciv-server with the patch in action:



> set aifill 10
Console: 'aifill' has been set to 10.
2: AI*6 has been added as Easy level AI-controlled player (classic).
2: AI*7 has been added as Easy level AI-controlled player (classic).
2: AI*8 has been added as Easy level AI-controlled player (classic).
2: AI*9 has been added as Easy level AI-controlled player (classic).
2: AI*10 has been added as Easy level AI-controlled player (classic).
> random
Player 'AI*1' now has AI skill level 'Easy'.
Player 'AI*2' now has AI skill level 'Hard'.
Player 'AI*3' now has AI skill level 'Novice'.
Player 'AI*4' now has AI skill level 'Cheating'.
Player 'AI*5' now has AI skill level 'Cheating'.
Player 'AI*6' now has AI skill level 'Novice'.
Player 'AI*7' now has AI skill level 'Normal'.
Player 'AI*8' now has AI skill level 'Normal'.
Player 'AI*9' now has AI skill level 'Easy'.
Player 'AI*10' now has AI skill level 'Novice'.
> random AI*8
Player 'AI*8' now has AI skill level 'Easy'.
> random AI*8
Player 'AI*8' now has AI skill level 'Cheating'.
> random blah
No player by the name of 'blah'.
> help random
Command: random  -  Set one or all AI players to random skill levels.
Synopsis: random
          random <player-name>
Level: ctrl
Description:
  With no arguments, sets all AI players to random skill level. With an
  argument, sets the skill level random for that player only.
> 


The patch is built against r21243.  I did not see a 'server' category to file
this bug in so I went with 'general'.

If the patch is lacking in any way, let me know and I will get it fixed.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 02 May 2012 05:05:40 AM GMT  Name:
freeciv-server-random-command.diff  Size: 5kB   By: rcurtin

<http://gna.org/bugs/download.php?file_id=15654>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?19689>

_______________________________________________
  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