[Freeciv-tickets] [freeciv] #44273: Lua: player losing method

Back to archive index
OSDN Ticket System norep****@osdn*****
Wed Apr 6 05:55:48 JST 2022


#44273: Lua: player losing method

  Open Date: 2022-04-02 23:14
Last Update: 2022-04-05 23:55

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/44273
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44273

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2022-04-05 23:55 Updated by: ihnatus

Comment:

Wrote a patch but when I apply it to a connected player I got a warning on the server:
Got a packet of type PACKET_PLAYER_PHASE_DONE(52) from a dead player

---------------------------------------------------------------------
Ticket Status:

      Reporter: ihnatus
         Owner: (None)
          Type: Feature Requests
        Status: Open
      Priority: 5 - Medium
     MileStone: S3_1 d3f
     Component: Scripting API
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Yet another split of #44216. A method to make a player immediately losing a game, as like by losing a king. Since existing callbacks already can kill a king, this one won't create more potentially unstable code than it already exists.
Syntax: (Player):lose(Player looter?, bool loot?) (if looter is specified and loot is true or is not specified and gameloss style includes "Loot", looter gets some part of cities, map and gold of the player).
This method was intended to set PSTATUS_DYING to the player while further killing is done by kill_dying_players(), but actually I am not sure we call that function in a right time now (it goes when AIs start a phase, at phase end, and after handling any incoming game packet), so it should be thought about better.

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/44273
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44273



More information about the Freeciv-tickets mailing list
Back to archive index