diff --git a/hwe/compare/fixtures/monthly_post_diplomacy.json b/hwe/compare/fixtures/monthly_post_diplomacy.json new file mode 100644 index 00000000..6b11a8fb --- /dev/null +++ b/hwe/compare/fixtures/monthly_post_diplomacy.json @@ -0,0 +1,178 @@ +{ + "action": "PostUpdateMonthly", + "environment": { + "year": 193, + "month": 2, + "startyear": 193, + "seedYear": 193, + "seedMonth": 1 + }, + "setup": { + "world": { + "hiddenSeed": "monthly-post-diplomacy-fixture" + }, + "syncEnvironment": true, + "resetGenerals": true, + "deleteOtherGenerals": true, + "keepGeneralIds": [1, 2, 3, 4], + "resetNations": true, + "deleteOtherNations": true, + "keepNationIds": [1, 2, 3, 4], + "general": [ + { + "id": 1, + "values": { + "name": "갑장", + "nation": 1, + "npc": 2, + "crew": 0, + "gold": 0, + "rice": 0, + "leadership": 10, + "strength": 10, + "intel": 10, + "experience": 0, + "dedication": 0 + } + }, + { + "id": 2, + "values": { + "name": "을장", + "nation": 2, + "npc": 2, + "crew": 0, + "gold": 0, + "rice": 0, + "leadership": 10, + "strength": 10, + "intel": 10, + "experience": 0, + "dedication": 0 + } + }, + { + "id": 3, + "values": { + "name": "병장", + "nation": 3, + "npc": 2, + "crew": 0, + "gold": 0, + "rice": 0, + "leadership": 10, + "strength": 10, + "intel": 10, + "experience": 0, + "dedication": 0 + } + }, + { + "id": 4, + "values": { + "name": "정장", + "nation": 4, + "npc": 2, + "crew": 0, + "gold": 0, + "rice": 0, + "leadership": 10, + "strength": 10, + "intel": 10, + "experience": 0, + "dedication": 0 + } + } + ], + "nation": [ + { + "id": 1, + "values": { + "name": "갑국", + "gennum": 2, + "level": 1 + } + }, + { + "id": 2, + "values": { + "name": "을국", + "gennum": 1, + "level": 1 + } + }, + { + "id": 3, + "values": { + "name": "병국", + "gennum": 1, + "level": 1 + } + }, + { + "id": 4, + "values": { + "name": "정국", + "gennum": 1, + "level": 1 + } + } + ], + "resetDiplomacy": true, + "diplomacy": [ + { + "fromNationId": 1, + "toNationId": 2, + "state": 1, + "term": 1, + "dead": 777 + }, + { + "fromNationId": 2, + "toNationId": 1, + "state": 1, + "term": 1, + "dead": 888 + }, + { + "fromNationId": 1, + "toNationId": 3, + "state": 0, + "term": 5, + "dead": 250 + }, + { + "fromNationId": 3, + "toNationId": 1, + "state": 0, + "term": 5, + "dead": 50 + }, + { + "fromNationId": 3, + "toNationId": 4, + "state": 0, + "term": 1, + "dead": 0 + }, + { + "fromNationId": 4, + "toNationId": 3, + "state": 0, + "term": 1, + "dead": 0 + }, + { + "fromNationId": 2, + "toNationId": 4, + "state": 7, + "term": 1, + "dead": 999 + } + ] + }, + "observe": { + "generalIds": [1, 2, 3, 4], + "nationIds": [1, 2, 3, 4] + } +} diff --git a/hwe/compare/monthly_event_trace.php b/hwe/compare/monthly_event_trace.php index 51a4779c..e206915e 100644 --- a/hwe/compare/monthly_event_trace.php +++ b/hwe/compare/monthly_event_trace.php @@ -493,6 +493,7 @@ function comparisonMonthlyEventTraceMain(): void 'you' => $row['toNationId'], 'state' => $row['state'], 'term' => $row['term'], + 'dead' => $row['dead'] ?? 0, ]; DB::db()->insertUpdate('diplomacy', $diplomacyPatch, $diplomacyPatch); }