-
Notifications
You must be signed in to change notification settings - Fork 0
/
stats.inc.php
127 lines (121 loc) · 3.65 KB
/
stats.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?php
/**
*------
* BGA framework: © Gregory Isabelli <gisabelli@boardgamearena.com> & Emmanuel Colin <ecolin@boardgamearena.com>
* KingdomBuilder implementation : © Timothée Pecatte tim.pecatte@gmail.com
*
* This code has been produced on the BGA studio platform for use on http://boardgamearena.com.
* See http://en.boardgamearena.com/#!doc/Studio for more information.
* -----
*
* stats.inc.php
*
* KingdomBuilder game statistics description
*
*/
require_once('modules/constants.inc.php');
require_once("modules/KingdomBuilderCards.class.php");
require_once("modules/KingdomBuilderObjective.class.php");
$stats_type = [
// Statistics global to table
'table' => [
'move' => [
'id' => STAT_MOVE,
'name' => totranslate('Moves'),
'type' => 'int'
],
'build' => [
'id' => STAT_BUILD,
'name' => totranslate('Settlements built'),
'type' => 'int'
],
'grass' => [
'id' => STAT_GRASS,
'name' => totranslate('Grass cards drawn'),
'type' => 'int'
],
'canyon' => [
'id' => STAT_CANYON,
'name' => totranslate('Canyon cards drawn'),
'type' => 'int'
],
'desert' => [
'id' => STAT_DESERT,
'name' => totranslate('Desert cards drawn'),
'type' => 'int'
],
'flower' => [
'id' => STAT_FLOWER,
'name' => totranslate('Flower cards drawn'),
'type' => 'int'
],
'forest' => [
'id' => STAT_FOREST,
'name' => totranslate('Forest cards drawn'),
'type' => 'int'
],
],
// Statistics existing for each player
'player' => [
'obtainTile' => [
'id' => STAT_OBTAIN_TILE,
'name' => totranslate('Tile acquired'),
'type' => 'int'
],
'useTile' => [
'id' => STAT_USE_TILE,
'name' => totranslate('Tile uses'),
'type' => 'int'
],
'move' => [
'id' => STAT_MOVE,
'name' => totranslate('Settlements moved'),
'type' => 'int'
],
'build' => [
'id' => STAT_BUILD,
'name' => totranslate('Settlements built'),
'type' => 'int'
],
'largestBuild' => [
'id' => STAT_LARGEST_BUILD,
'name' => totranslate('Largest settlement area'),
'type' => 'int'
],
'grass' => [
'id' => STAT_GRASS,
'name' => totranslate('Grass cards drawn'),
'type' => 'int'
],
'canyon' => [
'id' => STAT_CANYON,
'name' => totranslate('Canyon cards drawn'),
'type' => 'int'
],
'desert' => [
'id' => STAT_DESERT,
'name' => totranslate('Desert cards drawn'),
'type' => 'int'
],
'flower' => [
'id' => STAT_FLOWER,
'name' => totranslate('Flower cards drawn'),
'type' => 'int'
],
'forest' => [
'id' => STAT_FOREST,
'name' => totranslate('Forest cards drawn'),
'type' => 'int'
],
],
];
foreach (KingdomBuilderCards::$objectiveClasses as $file) {
$className = "Objective".$file;
require_once("modules/objectives/$file.class.php");
$class = new $className(null);
$stats_type['player'][$class->getName()] = [
'id' => $class->getStatId(),
'name' => $class->getStatName(),
'type' => 'int',
];
}