-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstats.inc.php
More file actions
172 lines (154 loc) · 4.74 KB
/
Copy pathstats.inc.php
File metadata and controls
172 lines (154 loc) · 4.74 KB
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<?php
/**
*------
* BGA framework: © Gregory Isabelli <gisabelli@boardgamearena.com> & Emmanuel Colin <ecolin@boardgamearena.com>
* Heat implementation : © Timothée Pecatte <tim.pecatte@gmail.com>, Guy Baudin <guy.thoun@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
*
* Heat game statistics description
*
*/
require_once 'modules/php/constants.inc.php';
$stats_type = [
'table' => [],
'player' => [
'position' => [
'id' => STAT_POSITION,
'name' => totranslate('Position at race start'),
'type' => 'float',
],
'endPosition' => [
'id' => STAT_POSITION_END,
'name' => totranslate('Position at race end'),
'type' => 'float',
],
'time' => [
'id' => STAT_CIRCUIT_TIME,
'name' => totranslate('Finish time'),
'type' => 'float',
],
'rounds' => [
'id' => STAT_ROUNDS,
'name' => totranslate('Rounds played'),
'type' => 'float',
],
'roundsFirst' => [
'id' => STAT_ROUNDS_FIRST,
'name' => totranslate('Rounds played in first position '),
'type' => 'float',
],
'roundsSpeed1' => [
'id' => STAT_ROUNDS_1,
'name' => totranslate('Rounds played in gear 1'),
'type' => 'float',
],
'roundsSpeed2' => [
'id' => STAT_ROUNDS_2,
'name' => totranslate('Rounds played in gear 2'),
'type' => 'float',
],
'roundsSpeed3' => [
'id' => STAT_ROUNDS_3,
'name' => totranslate('Rounds played in gear 3'),
'type' => 'float',
],
'roundsSpeed4' => [
'id' => STAT_ROUNDS_4,
'name' => totranslate('Rounds played in gear 4'),
'type' => 'float',
],
'roundsAdrenaline' => [
'id' => STAT_ROUNDS_ADRENALINE,
'name' => totranslate('Rounds with adrenaline'),
'type' => 'float',
],
'adrenalineGains' => [
'id' => STAT_ADRENALINE_GAIN,
'name' => totranslate('Extra-spaces gained from adrenaline'),
'type' => 'float',
],
'spinOuts' => [
'id' => STAT_SPINOUT,
'name' => totranslate('Spin-outs'),
'type' => 'float',
],
'stressSpinOuts' => [
'id' => STAT_SPINOUT_STRESS,
'name' => totranslate('Stress card gained due to spin-outs'),
'type' => 'float',
],
'heatLeft' => [
'id' => STAT_HEAT_LEFT,
'name' => totranslate('Heat left in engine at game\'s end'),
'type' => 'float',
],
'heatPayed' => [
'id' => STAT_HEAT_PAYED,
'name' => totranslate('Heat paid'),
'type' => 'float',
],
'heatPayedGearUp' => [
'id' => STAT_HEAT_PAYED_GEAR_UP,
'name' => totranslate('Heat paid for increasing gear by 2'),
'type' => 'float',
],
'heatPayedGearDown' => [
'id' => STAT_HEAT_PAYED_GEAR_DOWN,
'name' => totranslate('Heat paid for decreasing gear by 2'),
'type' => 'float',
],
'boost' => [
'id' => STAT_BOOST,
'name' => totranslate('Boosts performed'),
'type' => 'float',
],
'overspeedCorners' => [
'id' => STAT_OVERSPEED_CORNERS,
'name' => totranslate('Overspeed corners'),
'type' => 'float',
],
'slipstreamGains' => [
'id' => STAT_SLIPSTREAM_GAINS,
'name' => totranslate('Extra-spaces gained from slipstream'),
'type' => 'float',
],
'extraDiscard' => [
'id' => STAT_EXTRA_DISCARD,
'name' => totranslate('Cards discarded from hand in phase 9'),
'type' => 'float',
],
'stressPlayed' => [
'id' => STAT_STRESS_PLAYED,
'name' => totranslate('Stress cards played'),
'type' => 'float',
],
],
];
# position at race start
# position at race end (note that because of legend cars, you can win the game for BGA and not actually be first) (so the result for this for any given race can be 1 to 6)
# of rounds played
# of rounds played in speed 1/2/3/4
# of rounds started in first position
# rounds with adrenalin
# of "adrenalin extra space" used
# of spinouts
# Stress cards gained via spinouts
# Heat paid
# Heat in engine at game's end
# Heat paid for increasing gear by 2
# Heat paid for deceasing gear by 2
# of boosts performed
# of corners passed with speed above the speed limit
# of slipstreams performed
# Cards voluntarily discarded in phase 9
# of stress cards played
###
# relative position at race's end ( 100% for first car, 0 % for last and linear regression between the two extremes: If there are N cars, car in position X gets a score of (N-X)/(N-1) )
# relative human position at race's end (as above but only taking human played cars into account. And not computed in solo player games.)
# of legend cars in game
# of human players in game