Add monthly war income comparison fixture
This commit is contained in:
@@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
"action": "ProcessWarIncome",
|
||||||
|
"environment": {
|
||||||
|
"year": 193,
|
||||||
|
"month": 1,
|
||||||
|
"startyear": 190
|
||||||
|
},
|
||||||
|
"setup": {
|
||||||
|
"resetCities": true,
|
||||||
|
"nation": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"values": {
|
||||||
|
"name": "전쟁수입국",
|
||||||
|
"gold": 1000,
|
||||||
|
"level": 1,
|
||||||
|
"type": "che_중립"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"values": {
|
||||||
|
"name": "비활성국",
|
||||||
|
"gold": 2000,
|
||||||
|
"level": 0,
|
||||||
|
"type": "che_중립"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"values": {
|
||||||
|
"name": "법가국",
|
||||||
|
"gold": 3000,
|
||||||
|
"level": 1,
|
||||||
|
"type": "che_법가"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"city": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"values": {
|
||||||
|
"nation": 1,
|
||||||
|
"supply": 1,
|
||||||
|
"pop": 1000,
|
||||||
|
"pop_max": 2000,
|
||||||
|
"dead": 101
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"values": {
|
||||||
|
"nation": 1,
|
||||||
|
"supply": 0,
|
||||||
|
"pop": 1000,
|
||||||
|
"pop_max": 2000,
|
||||||
|
"dead": 999
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"values": {
|
||||||
|
"nation": 2,
|
||||||
|
"supply": 1,
|
||||||
|
"pop": 1000,
|
||||||
|
"pop_max": 2000,
|
||||||
|
"dead": 1000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"values": {
|
||||||
|
"nation": 3,
|
||||||
|
"supply": 1,
|
||||||
|
"pop": 1000,
|
||||||
|
"pop_max": 2000,
|
||||||
|
"dead": 105
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"values": {
|
||||||
|
"nation": 0,
|
||||||
|
"supply": 1,
|
||||||
|
"pop": 999,
|
||||||
|
"pop_max": 1000,
|
||||||
|
"dead": 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"observe": {
|
||||||
|
"cityIds": [1, 2, 3, 4, 5],
|
||||||
|
"nationIds": [1, 2, 3]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -179,7 +179,13 @@ function comparisonMonthlyEventTraceMain(): void
|
|||||||
throw new \InvalidArgumentException('request must be an object');
|
throw new \InvalidArgumentException('request must be an object');
|
||||||
}
|
}
|
||||||
$actionName = $request['action'] ?? null;
|
$actionName = $request['action'] ?? null;
|
||||||
if (!in_array($actionName, ['UpdateCitySupply', 'UpdateNationLevel', 'ProcessSemiAnnual'], true)) {
|
$supportedActions = [
|
||||||
|
'UpdateCitySupply',
|
||||||
|
'UpdateNationLevel',
|
||||||
|
'ProcessSemiAnnual',
|
||||||
|
'ProcessWarIncome',
|
||||||
|
];
|
||||||
|
if (!in_array($actionName, $supportedActions, true)) {
|
||||||
throw new \InvalidArgumentException('unsupported monthly action');
|
throw new \InvalidArgumentException('unsupported monthly action');
|
||||||
}
|
}
|
||||||
$setup = $request['setup'] ?? [];
|
$setup = $request['setup'] ?? [];
|
||||||
|
|||||||
Reference in New Issue
Block a user