Freeciv21
Develop your civilization from humble roots to a global empire
api_server_game_methods.h
Go to the documentation of this file.
1 /**************************************************************************
2  Copyright (c) 1996-2020 Freeciv21 and Freeciv contributors. This file is
3  __ __ part of Freeciv21. Freeciv21 is free software: you can
4 / \\..// \ redistribute it and/or modify it under the terms of the GNU
5  ( oo ) General Public License as published by the Free Software
6  \__/ Foundation, either version 3 of the License, or (at your
7  option) any later version. You should have received
8  a copy of the GNU General Public License along with Freeciv21. If not,
9  see https://www.gnu.org/licenses/.
10 **************************************************************************/
11 
12 #pragma once
13 
14 /* common/scriptcore */
15 #include "luascript_types.h"
16 
17 /* server/scripting */
18 #include "api_server_edit.h"
19 
20 /* Server-only methods added to the modules defined in
21  * the common tolua_game.pkg. */
22 
23 int api_methods_player_trait(lua_State *L, Player *pplayer,
24  const char *tname);
25 int api_methods_player_trait_base(lua_State *L, Player *pplayer,
26  const char *tname);
27 int api_methods_player_trait_current_mod(lua_State *L, Player *pplayer,
28  const char *tname);
29 
30 int api_methods_nation_trait_min(lua_State *L, Nation_Type *pnation,
31  const char *tname);
32 int api_methods_nation_trait_max(lua_State *L, Nation_Type *pnation,
33  const char *tname);
34 int api_methods_nation_trait_default(lua_State *L, Nation_Type *pnation,
35  const char *tname);
int api_methods_nation_trait_min(lua_State *L, Nation_Type *pnation, const char *tname)
Return the minimum random trait value that will be allocated for a nation.
int api_methods_player_trait_base(lua_State *L, Player *pplayer, const char *tname)
Return the current base value of an AI trait (not including Lua mod)
int api_methods_player_trait(lua_State *L, Player *pplayer, const char *tname)
Return the current value of an AI trait in force (base+mod)
int api_methods_nation_trait_default(lua_State *L, Nation_Type *pnation, const char *tname)
Return the default trait value that will be allocated for a nation.
int api_methods_player_trait_current_mod(lua_State *L, Player *pplayer, const char *tname)
Return the current Lua increment to an AI trait (can be changed with api_edit_trait_mod_set())
int api_methods_nation_trait_max(lua_State *L, Nation_Type *pnation, const char *tname)
Return the maximum random trait value that will be allocated for a nation.
Definition: player.h:231