Freeciv-3.2: /fast/freeciv/nightly/S3_2/common/traits.h Source File

Freeciv-3.2

Loading...
Searching...
No Matches
traits.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__TRAITS_H
14#define FC__TRAITS_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20#define SPECENUM_NAME trait
21#define SPECENUM_VALUE0 TRAIT_EXPANSIONIST
22#define SPECENUM_VALUE0NAME "Expansionist"
23#define SPECENUM_VALUE1 TRAIT_TRADER
24#define SPECENUM_VALUE1NAME "Trader"
25#define SPECENUM_VALUE2 TRAIT_AGGRESSIVE
26#define SPECENUM_VALUE2NAME "Aggressive"
27#define SPECENUM_VALUE3 TRAIT_BUILDER
28#define SPECENUM_VALUE3NAME "Builder"
29#define SPECENUM_COUNT TRAIT_COUNT
30#include "specenum_gen.h"
31
32#define TRAIT_DEFAULT_VALUE 50
33#define TRAIT_MAX_VALUE (TRAIT_DEFAULT_VALUE * TRAIT_DEFAULT_VALUE)
34#define TRAIT_MAX_VALUE_SR (TRAIT_DEFAULT_VALUE)
35
36 struct ai_trait
37{
38 int val; /* Value assigned in the beginning */
39 int mod; /* This is modification that changes during game. */
40};
41
42 struct trait_limits
43{
44 int min;
45 int max;
46 int fixed;
47};
48
49#ifdef __cplusplus
50}
51#endif /* __cplusplus */
52
53#endif /* FC__TRAITS_H */
specenum_gen.h
ai_trait
Definition traits.h:37
ai_trait::val
int val
Definition traits.h:38
ai_trait::mod
int mod
Definition traits.h:39
trait_limits
Definition traits.h:43
trait_limits::fixed
int fixed
Definition traits.h:46
trait_limits::min
int min
Definition traits.h:44
trait_limits::max
int max
Definition traits.h:45