{"id":56452,"date":"2024-12-10T23:50:30","date_gmt":"2024-12-10T15:50:30","guid":{"rendered":"https:\/\/trails-game.com\/?page_id=56452"},"modified":"2025-01-18T23:33:05","modified_gmt":"2025-01-18T15:33:05","slug":"kai-lgc-calculator","status":"publish","type":"page","link":"https:\/\/trails-game.com\/en\/kai-lgc-calculator\/","title":{"rendered":"LGC calculator"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"56452\" class=\"elementor elementor-56452\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-bab89e3 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"bab89e3\" data-element_type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[{&quot;jet_parallax_layout_image&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;_id&quot;:&quot;a33287f&quot;,&quot;jet_parallax_layout_image_tablet&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_mobile&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_speed&quot;:{&quot;unit&quot;:&quot;%&quot;,&quot;size&quot;:50,&quot;sizes&quot;:[]},&quot;jet_parallax_layout_type&quot;:&quot;scroll&quot;,&quot;jet_parallax_layout_direction&quot;:&quot;1&quot;,&quot;jet_parallax_layout_fx_direction&quot;:null,&quot;jet_parallax_layout_z_index&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x&quot;:50,&quot;jet_parallax_layout_bg_x_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y&quot;:50,&quot;jet_parallax_layout_bg_y_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size&quot;:&quot;auto&quot;,&quot;jet_parallax_layout_bg_size_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_animation_prop&quot;:&quot;transform&quot;,&quot;jet_parallax_layout_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;]}],&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t\t<div class=\"elementor-background-overlay\"><\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-badcfd4\" data-id=\"badcfd4\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4108ceb elementor-widget elementor-widget-html\" data-id=\"4108ceb\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div>\r\n        <h2 style=\"color:white; text-align: center;\">LGC\u8ba1\u7b97\u5668<\/h2>\r\n        <div style=\"color:white\">\u6ce8\uff1a\u6e38\u620f\u4e2d\u8fbe\u6210\u540c\u4e00\u79cdLGC\u7b49\u7ea7\u6709\u591a\u79cd\u65b9\u5f0f\uff0c\u672c\u8ba1\u7b97\u5668\u6a21\u62df\u7ebf\u8def\u53ea\u63d0\u4f9b\u5176\u4e2d\u4e00\u79cd\u65b9\u5f0f\uff0c\u5e76\u53ea\u63d0\u4f9b\u8f83\u4f18\u89e3\u3002<\/div>\r\n        <div style=\"color:white\">\u6ce82\uff1a\u73a9\u5bb6\u4e5f\u53ef\u4ee5\u5728\u4e0b\u65b9\u81ea\u884c\u8fdb\u884c\u6a21\u62df\u9009\u62e9\u3002<\/div>\r\n        <div style=\"color:white\">\u6ce83\uff1a\u672c\u8ba1\u7b97\u5668\u4e3a\u6d4b\u8bd5\u7248\uff0c\u53ef\u80fd\u53d1\u751f\u4efb\u4f55\u95ee\u9898\uff0c\u5982\u9047\u4efb\u4f55\u8ba1\u7b97\u76f8\u5173\u95ee\u9898\uff0c\u8bf7\u4f7f\u7528\u95ee\u9898\u53cd\u9988\u529f\u80fd\uff0c\u5e76\u63d0\u4f9b\u91cd\u73b0\u65b9\u5f0f\uff08\u9009\u4e86\u4ec0\u4e48\uff0c\u8fdb\u884c\u4e86\u4ec0\u4e48\u64cd\u4f5c\uff09\u3002\u76ee\u524d\u6682\u672a\u5bf9\u624b\u673a\u7b49\u8bbe\u5907\u8fdb\u884c\u9002\u914d\uff0c\u5b57\u4f53\u7b49\u76f8\u5173\u5185\u5bb9\u4e5f\u672a\u8fdb\u884c\u8bbe\u7f6e\uff0c\u540e\u7eed\u4f1a\u9010\u6b65\u5b8c\u5584\uff0c\u656c\u8bf7\u8c05\u89e3\u3002<\/div>\r\n        <table style=\"color:white\"><caption>\u8bf7\u8f93\u5165\u9700\u8981\u7684\u6700\u7ec8LGC\u7b49\u7ea7<\/caption>\r\n            <tbody>\r\n                <tr>\r\n                    <th>LAW\u7b49\u7ea7<\/th>\r\n                    <th>GRAY\u7b49\u7ea7<\/th>\r\n                    <th>CHAOS\u7b49\u7ea7<\/th>\r\n                <\/tr>\r\n                <tr>\r\n                    <th>\r\n                        <select id=\"input_l\">\r\n                            <option value=2>2<\/option>\r\n                            <option value=3>3<\/option>\r\n                            <option value=4>4<\/option>\r\n                            <option value=5>5<\/option>\r\n                        <\/select>\r\n                    <\/th>\r\n                    <th>\r\n                        <select id=\"input_g\">\r\n                            <option value=2>2<\/option>\r\n                            <option value=3>3<\/option>\r\n                            <option value=4>4<\/option>\r\n                            <option value=5>5<\/option>\r\n                        <\/select>\r\n                    <\/th>\r\n                    <th>\r\n                        <select id=\"input_c\">\r\n                            <option value=2>2<\/option>\r\n                            <option value=3>3<\/option>\r\n                            <option value=4>4<\/option>\r\n                            <option value=5>5<\/option>\r\n                        <\/select>\r\n                    <\/th>\r\n                <\/tr>\r\n            <\/tbody>\r\n        <\/table>\r\n        <div class=\"submit\">\r\n            <button id=\"button_calculate\" type=\"button\">\u786e\u5b9a<\/button>\r\n        <\/div>\r\n        <div id=\"warning_div\" style=\"color:white\"><\/div>\r\n    <\/div>\r\n    <div>\r\n        <table id=\"table\" style=\"color:white\"><caption>\u4e8b\u4ef6\u5b8c\u6210\u5ea6\u53ca\u9009\u9879<\/caption>\r\n            <tbody>\r\n                <tr>\r\n                    <th>\u7ae0\u8282<\/th>\r\n                    <th>\u4e8b\u4ef6\u540d<\/th>\r\n                    <th>\u5b8c\u6210\uff1f<\/th>\r\n                    <th>\u9009\u62e9<\/th>\r\n                    <th>\u5b9e\u9645\u83b7\u5f97LAW<\/th>\r\n                    <th>\u5b9e\u9645\u83b7\u5f97GRAY<\/th>\r\n                    <th>\u5b9e\u9645\u83b7\u5f97CHAOS<\/th>\r\n                <\/tr>\r\n            <\/tbody>\r\n        <\/table>\r\n        <div class=\"submit\">\r\n            <button id=\"button\" type=\"button\">\u786e\u5b9a<\/button>\r\n        <\/div>\r\n        <table style=\"color:white\"><caption>\u6700\u7ec8LGC<\/caption>\r\n            <tbody>\r\n                <tr>\r\n                    <th>LAW<\/th>\r\n                    <th>GRAY<\/th>\r\n                    <th>CHAOS<\/th>\r\n                <\/tr>\r\n                <tr>\r\n                    <th id=\"law_result\">0<\/th>\r\n                    <th id=\"gray_result\">0<\/th>\r\n                    <th id=\"chaos_result\">0<\/th>\r\n                <\/tr>\r\n            <\/tbody>\r\n        <\/table>\r\n    <\/div>\r\n<script>\r\nconst data = [\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e00\u90e8\u2460\",\r\n        \"event\" : \"\uff08\u5fc5\u8981\uff09\u62c9\u53e4\u7eb3\u7684\u8d1f\u9762\u4f20\u95fb\",\r\n        \"type\" : true,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u8ba9\u4ed6\u505a\u6e05\u626b\u5de5\u4f5c\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u8ba9\u4ed6\u5ba3\u4f20\u6b63\u9762\u6d88\u606f\",\r\n                \"L\":0,\r\n                \"G\":5,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u7981\u6b62\u8fdb\u51fa\u5e97\u91cc\",\r\n                \"L\":0,\r\n                \"G\":0,\r\n                \"C\":5,\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e00\u90e8\u2460\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u585e\u514b\u6258\u519b\u6b66\u6d41\u51fa\u54c1\",\r\n        \"type\": false,\r\n        \"base_L\": 0,\r\n        \"base_G\": 0,\r\n        \"base_C\": 0,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u4ee5\u88c5\u6709\u9650\u5236\u5668\u7684\u72b6\u6001\u8d2d\u5165\",\r\n                \"L\":0,\r\n                \"G\":5,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u89e3\u9664\u9650\u5236\u5668\u7684\u72b6\u6001\u8d2d\u5165\",\r\n                \"L\":0,\r\n                \"G\":0,\r\n                \"C\":5,\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e00\u90e8\u2460\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u9003\u4e0d\u4e86\u7684\u975e\u6cd5\u6253\u5de5\",\r\n        \"type\": false,\r\n        \"base_L\": 0,\r\n        \"base_G\": 1,\r\n        \"base_C\": 1,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u5220\u9664\u8d44\u8baf\u540e\u4ea4\u7ed9\u534f\u4f1a\u5904\u7406\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u4ea4\u7531\u53d7\u5bb3\u8005\u81ea\u884c\u5904\u7406\",\r\n                \"L\":0,\r\n                \"G\":5,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u8fde\u540c\u8bbe\u5907\u4e00\u8d77\u5f7b\u5e95\u7834\u574f\",\r\n                \"L\":0,\r\n                \"G\":0,\r\n                \"C\":5,\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e00\u90e8\u2460\",\r\n        \"event\" : \"\uff08\u975e\u5fc5\u8981\uff09\u5b87\u5b99\u4ea7\u4e1a\u7684\u6295\u8d44\u7ea0\u7eb7\",\r\n        \"type\" : false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u900f\u9732\u548cMK\u516c\u53f8\u7684\u5173\u7cfb\",\r\n                \"L\":0,\r\n                \"G\":0,\r\n                \"C\":5,\r\n            },\r\n            {\r\n                \"text\": \"\u900f\u9732\u548cCID\u7684\u5173\u7cfb\",\r\n                \"L\":0,\r\n                \"G\":5,\r\n                \"C\":0,\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e00\u90e8\u2460\",\r\n        \"event\": \"\uff08\u5fc5\u8981\uff09\u8d5b\u767b\u5730\u533a\u00b7\u4e0a\u6c34\u9053\u7684\u901a\u7f09\u9b54\u517d\",\r\n        \"type\": true,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e00\u90e8\u2461\",\r\n        \"event\" : \"\uff08\u975e\u5fc5\u8981\uff09\u88ab\u593a\u8d70\u7684\u79d8\u5bc6\u60c5\u62a5\",\r\n        \"type\" : false,\r\n        \"base_L\": 0,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u5efa\u8bae\u4ed6\u628a\u771f\u76f8\u544a\u8bc9\u516c\u53f8\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u63d0\u51fa\u88c5\u849c\u7684\u624b\u6bb5\",\r\n                \"L\":0,\r\n                \"G\":5,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u5411\u96f7\u56e0\u5179\u63d0\u8bae\u79c1\u4e0b\u4ea4\u6613\",\r\n                \"L\":0,\r\n                \"G\":0,\r\n                \"C\":5,\r\n            },\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e00\u90e8\u2461\",\r\n        \"event\" : \"\uff08\u975e\u5fc5\u8981\uff09\u60f3\u770b\u7684\u4e66\",\r\n        \"type\" : false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e00\u90e8\u2461\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u8fea\u5c14\u514b\u7eaa\u5ff5\u516c\u56ed\u7684\u901a\u7f09\u9b54\u517d\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e00\u90e8\u2461\",\r\n        \"event\" : \"\uff08\u975e\u5fc5\u8981\uff09\u6740\u5bb3\u7f6a\u5927\u6076\u6781\u4e4b\u4eba\",\r\n        \"type\" : false,\r\n        \"base_L\": 0,\r\n        \"base_G\": 0,\r\n        \"base_C\": 1,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u4f5c\u4e3a\u7f6a\u72af\u902e\u6355\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u4ea4\u7ed9\u94c1\u76fe\",\r\n                \"L\":0,\r\n                \"G\":0,\r\n                \"C\":5,\r\n            },\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e00\u90e8\u2462\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u641c\u7d22\u8d70\u5931\u732b\u54aa\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u9ece\u6069\u2460\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u7a7a\u6d1e\u6838\u5fc3\u7684\u5f02\u72b6\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u9ece\u6069\u2460\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u5927\u91cf\u56e4\u79ef\u5bfc\u529b\u7089\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u9ece\u6069\u2460\",\r\n        \"event\": \"\uff08\u5fc5\u8981\uff09\u6b27\u8331\u5ce1\u8c37\u7684\u901a\u7f09\u9b54\u517d\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u8303\u6069\u2460\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u9752\u6885\u7af9\u9a6c\u7684\u7eb8\u6761\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u8303\u6069\u2460\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u514b\u96f7\u4f18\u590d\u5174\u652f\u63f4\u57fa\u91d1\u7684\u5371\u673a\",\r\n        \"type\": false,\r\n        \"base_L\": 0,\r\n        \"base_G\": 1,\r\n        \"base_C\": 1,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u5144\u5f1f\u7684\u60c5\u8c0a\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u6076\u5f92\u7684\u9053\u4e49\",\r\n                \"L\":0,\r\n                \"G\":5,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u88ab\u5c01\u5370\u7684\u300c\u8bb0\u5fc6\u300d\",\r\n                \"L\":0,\r\n                \"G\":0,\r\n                \"C\":5,\r\n            },\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u8303\u6069\u2460\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u7ec8\u6781\u5377\u997c\u7684\u7075\u611f\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u8303\u6069\u2460\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u4f0a\u5e1d\u65af\u897f\u90ca\u7684\u901a\u7f09\u9b54\u517d\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u51ef\u6587\u2460\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u8ffd\u5bfb\u68a6\u5e7b\u6781\u54c1\u751c\u70b9\uff01\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u51ef\u6587\u2460\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u641c\u7d22\u5e0c\u5a1c\u59c6\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u62dc\u6258\u6cd5\u5947\u5c14\u603b\u7ba1\u5b89\u6392\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u53eb\u4ed6\u81ea\u9996\u8fc7\u53bb\u7684\u8f7b\u72af\u7f6a\",\r\n                \"L\":0,\r\n                \"G\":5,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u523b\u610f\u628a\u4ed6\u8d76\u51fa\u8428\u5c14\u5df4\u5fb7\",\r\n                \"L\":0,\r\n                \"G\":0,\r\n                \"C\":5,\r\n            },\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u51ef\u6587\u2460\",\r\n        \"event\": \"\uff08\u5fc5\u8981\uff09\u9633\u708e\u6c99\u4e18\u7684\u901a\u7f09\u9b54\u517d\",\r\n        \"type\": true,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u9ece\u6069\u2461\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u67e5\u660e\u8bd5\u4e58\u7528\u673a\u8f66\u7684\u610f\u5916\u539f\u56e0\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 1,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u8ba9\u6d2a\u91cc\u8bda\u5b9e\u81ea\u9996\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u5f53\u4f5c\u662f\u4e00\u573a\u300c\u6d4b\u8bd5\u300d\",\r\n                \"L\":0,\r\n                \"G\":0,\r\n                \"C\":5,\r\n            },\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u9ece\u6069\u2461\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u8c03\u67e5CEO\u7684\u7591\u70b9\",\r\n        \"type\": false,\r\n        \"base_L\": 0,\r\n        \"base_G\": 1,\r\n        \"base_C\": 1,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u63a7\u544a\u79d8\u4e66\u548c\u524d\u6267\u884c\u957f\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u5728\u8463\u4e8b\u4f1a\u4e0a\u6307\u63a7\u524d\u6267\u884c\u957f\",\r\n                \"L\":0,\r\n                \"G\":5,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u63e1\u4f4f\u79d8\u4e66\u548c\u524d\u6267\u884c\u957f\u7684\u628a\u67c4\",\r\n                \"L\":0,\r\n                \"G\":0,\r\n                \"C\":5,\r\n            },\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u9ece\u6069\u2461\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u7a00\u6709\u91d1\u5c5e\u5f00\u91c7\u5751\u9053\u7684\u901a\u7f09\u9b54\u517d\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u8303\u6069\u2461\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u6d88\u5931\u7684\u71d5\u5b50\u4eb2\u9e1f\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u8303\u6069\u2461\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u8282\u70b9\u533a\u57df\u7684\u901a\u7f09\u9b54\u517d\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u8303\u6069\u2461\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u83ab\u540d\u4e0d\u9002\u7684\u539f\u56e0\",\r\n        \"type\": false,\r\n        \"base_L\": 0,\r\n        \"base_G\": 1,\r\n        \"base_C\": 1,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u547c\u5524\u5bf9\u65b9\u8be2\u95ee\u60c5\u51b5\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u4e0d\u7531\u5206\u8bf4\u51fb\u660f\u5bf9\u65b9\",\r\n                \"L\":0,\r\n                \"G\":0,\r\n                \"C\":5,\r\n            },\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u8303\u6069\u2461\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u6765\u81ea\u795e\u79d8\u8ffd\u968f\u8005\u7684\u652f\u63f4\",\r\n        \"type\": false,\r\n        \"base_L\": 0,\r\n        \"base_G\": 0,\r\n        \"base_C\": 1,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u8303\u6069\u2461\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u88ab\u73b7\u6c61\u7684\u827a\u672f\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u5efa\u8bae\u5979\u8868\u73b0\u767d\u8272\u5fc3\u60c5\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u5efa\u8bae\u5979\u8868\u73b0\u9ed1\u8272\u5fc3\u60c5\",\r\n                \"L\":0,\r\n                \"G\":0,\r\n                \"C\":5,\r\n            },\r\n            {\r\n                \"text\": \"\u5efa\u8bae\u5979\u540c\u65f6\u8868\u73b0\u4e24\u79cd\u5fc3\u60c5\",\r\n                \"L\":0,\r\n                \"G\":5,\r\n                \"C\":0,\r\n            },\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u8303\u6069\u2462\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u590d\u5174\u9ed1\u8292\u8857\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e8c\u90e8\u00b7\u8303\u6069\u2462\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09GR\u9526\u6807\u8d5b\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u8303\u6069\u2463\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u68a6\u5e7b\u5feb\u7167\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u8303\u6069\u2463\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u4f4f\u5bbf\u9884\u7ea6\u7f51\u7ad9\u7684\u7ea0\u7eb7\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u529d\u8beb\u4ed6\uff0c\u8ba9\u4ed6\u51b7\u9759\u4e0b\u6765\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u5a01\u5687\u4ed6\uff0c\u8ba9\u4ed6\u95ed\u4e0a\u5634\",\r\n                \"L\":0,\r\n                \"G\":5,\r\n                \"C\":0,\r\n            },\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u8303\u6069\u2463\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u5b89\u5361\u7ef4\u5c14\u5357\u90ca\u7684\u901a\u7f09\u9b54\u517d\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u8303\u6069\u2463\",\r\n        \"event\": \"\uff08\u5fc5\u8981\uff09\u5931\u8e2a\u7684\u5feb\u9012\u5458\",\r\n        \"type\": true,\r\n        \"base_L\": 0,\r\n        \"base_G\": 1,\r\n        \"base_C\": 1,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u963b\u6b62\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u4e0d\u963b\u6b62\",\r\n                \"L\":0,\r\n                \"G\":0,\r\n                \"C\":5,\r\n            },\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u51ef\u6587\u2461\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u4e49\u8d3c\u7559\u4e0b\u7684\u4f20\u8bf4\u5b9d\u85cf\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u51ef\u6587\u2461\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u5730\u4e0b\u6c34\u9053\u7684\u901a\u7f09\u9b54\u517d\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u51ef\u6587\u2461\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u4f2a\u9020\u7b79\u7801\u7684\u6e90\u5934\",\r\n        \"type\": true,\r\n        \"base_L\": 0,\r\n        \"base_G\": 1,\r\n        \"base_C\": 1,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u516c\u5f00\u8fa8\u522b\u771f\u4f2a\u7684\u65b9\u5f0f\u6839\u7edd\u95ee\u9898\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u523b\u610f\u653e\u4efb\u7ef4\u6301\u73b0\u72b6\",\r\n                \"L\":0,\r\n                \"G\":5,\r\n                \"C\":0,\r\n            },\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u8303\u6069\u2464\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u8131\u9003\u5076\u50cf\",\r\n        \"type\": false,\r\n        \"base_L\": 0,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u79f0\u8d5e\u5979\u7684\u52aa\u529b\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u6fc0\u8d77\u5979\u7684\u81ea\u5c0a\",\r\n                \"L\":0,\r\n                \"G\":5,\r\n                \"C\":0,\r\n            },\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u8303\u6069\u2464\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u5bfb\u627e\u771f\u6b63\u7684\u5bb6\u4eba\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u9ece\u6069\u2462\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u9f99\u6765\u7684\u4f20\u8bf4\u9c7c\u738b\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u9ece\u6069\u2462\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u513f\u5b50\u7684\u884c\u8e2a\",\r\n        \"type\": false,\r\n        \"base_L\": 0,\r\n        \"base_G\": 1,\r\n        \"base_C\": 1,\r\n        \"choice\": [\r\n            {\r\n                \"text\": \"\u6162\u6162\u60f3\u6e05\u695a\u5c31\u597d\",\r\n                \"L\":0,\r\n                \"G\":5,\r\n                \"C\":0,\r\n            },\r\n            {\r\n                \"text\": \"\u5766\u7387\u4e00\u70b9\u6bd4\u8f83\u597d\",\r\n                \"L\":5,\r\n                \"G\":0,\r\n                \"C\":0,\r\n            },\r\n        ]\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u9ece\u6069\u2462\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u9f99\u6765\u7011\u5e03\u7684\u901a\u7f09\u9b54\u517d\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 1,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u8303\u6069\u2465\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u90a3\u90e8\u5c0f\u8bf4\u7684\u4f5c\u8005\u662f\uff1f\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 0,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u8303\u6069\u2465\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u6d88\u5931\u7684\u533b\u5c40\u957f\u7684\u884c\u8e2a\",\r\n        \"type\": false,\r\n        \"base_L\": 5,\r\n        \"base_G\": 5,\r\n        \"base_C\": 5,\r\n    },\r\n    {\r\n        \"chapter\": \"\u7b2c\u4e09\u90e8\u00b7\u8303\u6069\u2465\",\r\n        \"event\": \"\uff08\u975e\u5fc5\u8981\uff09\u5b89\u5361\u7ef4\u5c14\u5357\u90ca\u7684\u901a\u7f09\u9b54\u517d\u2461\",\r\n        \"type\": false,\r\n        \"base_L\": 1,\r\n        \"base_G\": 0,\r\n        \"base_C\": 1,\r\n    },\r\n];\r\n\r\nconst potential_routes = {\r\n    \"[5,4,4]\": \"212102001000002000100100000200000000000010000\",\r\n    \"[4,4,4]\": \"212102001000002000201100000200010000110010000\",\r\n    \"[5,5,2]\": \"211101000000001000100100000200010000000010000\",\r\n    \"[4,5,3]\": \"212102001000001000100100000200010000110010000\",\r\n    \"[4,5,4]\": \"212102001000002000100100000200010000110000000\", \r\n    \"[4,3,5]\": \"212102001000002000201200010200010100000010000\", \r\n    \"[5,3,5]\": \"212102001000002000201200000000000000000010000\", \r\n    \"[4,4,5]\": \"212102001000002000201200010200010000100010000\",\r\n    \"[3,5,5]\": \"212102001000002000101100010200010100110000000\", \r\n};\r\n\r\n\/\/ required value to level up\r\nconst law_level_values = [0, 24, 36, 48, 72];\r\nconst gray_level_values = [0, 24, 36, 48, 72];\r\nconst chaos_level_values = [0, 20, 30, 45, 60];\r\n\r\n\r\n\/\/ all I\/O elements for calcualting LGC\r\nconst button = document.getElementById(\"button\");\r\nconst law_result_field = document.getElementById(\"law_result\");\r\nconst gray_result_field = document.getElementById(\"gray_result\");\r\nconst chaos_result_field = document.getElementById(\"chaos_result\");\r\n\r\n\/\/ all I\/O elements for calculating routes given a set of LGC levels\r\nconst input_l = document.getElementById(\"input_l\");\r\nconst input_g = document.getElementById(\"input_g\");\r\nconst input_c = document.getElementById(\"input_c\");\r\nconst button_calculate = document.getElementById(\"button_calculate\");\r\nconst warning_div = document.getElementById(\"warning_div\");\r\n\r\nclass EventData {\r\n    \/\/ Each event data object consists of\r\n    \/\/ the event data as a dictionary as in data\r\n    \/\/ the table that the data will be shown in\r\n    \/\/ a checker box indicating if this event is completed\r\n    \/\/ a selector if the event has choices resulting in different LGC values\r\n    constructor(data, target_table) {\r\n        this.data = data;\r\n        this.target_table = target_table;\r\n        this.setupRow();\r\n        this.setupResult();\r\n    }\r\n    \r\n    \/**\r\n     * set up the first part of the UI\r\n     * each row consists of chapter name, event name, \r\n     * event finished or not (checker), \r\n     * options (selector if there is any, text \"\u65e0\u9009\u9879\" if there is no option)\r\n     *\/\r\n    setupRow() {\r\n        this.row = document.createElement(\"tr\");\r\n\r\n        let ch = document.createElement(\"th\");\r\n        ch.innerText = this.data[\"chapter\"];\r\n        this.row.appendChild(ch);\r\n\r\n        \/\/ name of the event\r\n        let event_n = document.createElement(\"th\");\r\n        event_n.innerText = this.data[\"event\"];\r\n        this.row.appendChild(event_n);\r\n\r\n        \/\/ did we finish the event?\r\n        \/\/ default to true if the event is mandatory\r\n        let checker_col = document.createElement(\"th\");\r\n        this.checker = document.createElement(\"input\");\r\n        this.checker.type = \"checkbox\";\r\n        if (this.data[\"type\"]) {\r\n            this.checker.checked = true;\r\n            this.checker.disabled = true;\r\n        } else {\r\n            this.checker.checked = false;\r\n            this.checker.addEventListener(\"change\", ()=>this.onCheckerChanged());\r\n        }\r\n        checker_col.appendChild(this.checker);\r\n        this.row.appendChild(checker_col);\r\n\r\n        \/\/ what did we select?\r\n        let select_col = document.createElement(\"th\");\r\n        if (this.data[\"choice\"]) {\r\n            this.selector = document.createElement(\"select\");\r\n            for (let i = 0; i < this.data[\"choice\"].length; i++) {\r\n                let opt = document.createElement(\"option\");\r\n                opt.value = i;\r\n                opt.innerText = this.data[\"choice\"][i][\"text\"];\r\n                this.selector.appendChild(opt);\r\n            }\r\n            this.selector.addEventListener(\"change\", ()=>this.onSelectorChanged());\r\n            select_col.appendChild(this.selector);\r\n\r\n            this.selected_val = 0;\r\n        } else {\r\n            select_col.innerText = \"\u65e0\u9009\u9879\";\r\n        }\r\n\r\n        this.row.appendChild(select_col);\r\n        this.target_table.appendChild(this.row);\r\n    }\r\n\r\n    \/**\r\n     * set up the second part of the UI\r\n     * showing the LGC value in the table\r\n     * if the event is not finished by the user, the result will be 0,0,0\r\n     * if the event is finished, update the result accordingly with the base LGC and the option LGC.\r\n     *\/\r\n    setupResult() {\r\n        if (!this.data[\"type\"]) {\r\n            this.result = [0, 0, 0];\r\n        } else if (!this.data[\"choice\"]) {\r\n            this.result = [this.data[\"base_L\"], this.data[\"base_G\"], this.data[\"base_C\"]];\r\n        } else {\r\n            \/\/ initially, the selected index is default to 0\r\n            let additional_r = this.data[\"choice\"][0];\r\n            this.result = [this.data[\"base_L\"] + additional_r[\"L\"], this.data[\"base_G\"] + additional_r[\"G\"], this.data[\"base_C\"] + additional_r[\"C\"]];\r\n        }\r\n        this.law_col = document.createElement(\"th\");\r\n        this.law_col.innerText = this.result[0];\r\n\r\n        this.gray_col = document.createElement(\"th\");\r\n        this.gray_col.innerText = this.result[1];\r\n\r\n        this.chaos_col = document.createElement(\"th\");\r\n        this.chaos_col.innerText = this.result[2];\r\n\r\n        this.row.appendChild(this.law_col);\r\n        this.row.appendChild(this.gray_col);\r\n        this.row.appendChild(this.chaos_col);\r\n    }\r\n\r\n    \/**\r\n     * handles when a checker box is checked\/unchecked\r\n     * if a checker box is checked, this means that the event is finished, we should include its LGC in the result\r\n     * if the checker box is unchecked, the event is not done by the user, we should not include the LGC in the result\r\n     *\/\r\n    onCheckerChanged() {\r\n        if (this.checker.checked) {\r\n            \/\/ this event is completed\r\n            if (this.selector) {\r\n                let additional_r = this.data[\"choice\"][this.selected_val];\r\n                this.result = [this.data[\"base_L\"] + additional_r[\"L\"], this.data[\"base_G\"] + additional_r[\"G\"], this.data[\"base_C\"] + additional_r[\"C\"]];\r\n            } else {\r\n                this.result = [this.data[\"base_L\"], this.data[\"base_G\"], this.data[\"base_C\"]];\r\n            }\r\n        } else {\r\n            this.result = [0, 0, 0];\r\n        }\r\n        this.law_col.innerText = this.result[0];\r\n        this.gray_col.innerText = this.result[1];\r\n        this.chaos_col.innerText = this.result[2];\r\n    }\r\n\r\n    \/**\r\n     * handles when a selector is updated\r\n     * update the LGC based on the selection if the event is completed\r\n     * otherwise, we only update the selected value and keep the result to be 0,0,0\r\n     *\/\r\n    onSelectorChanged() {\r\n        this.selected_val = this.selector.options.selectedIndex;\r\n        let additional_r = this.data[\"choice\"][this.selected_val];\r\n        if (this.checker.checked) {\r\n            this.result = [this.data[\"base_L\"] + additional_r[\"L\"], this.data[\"base_G\"] + additional_r[\"G\"], this.data[\"base_C\"] + additional_r[\"C\"]];\r\n            this.law_col.innerText = this.result[0];\r\n            this.gray_col.innerText = this.result[1];\r\n            this.chaos_col.innerText = this.result[2];\r\n        }\r\n    }\r\n\r\n    getResult() {\r\n        return [].concat(this.result);\r\n    }\r\n}\r\n\r\n\/**\r\n * get the LGC levels based on the corresponding values calcualted from events \r\n * @param {*} target_exp_arr: array, one of law_level_values, gray_level_values, chaos_level_values\r\n * @param {*} actual_val: integer, value of the LGC value calcualted from events \r\n * @returns \r\n *\/\r\nfunction getLevel(target_exp_arr, actual_val) {\r\n    for (let i = 0; i < target_exp_arr.length; i++) {\r\n        if (actual_val < target_exp_arr[i]) {\r\n            return i;\r\n        }\r\n    }\r\n    return target_exp_arr.length;\r\n}\r\n\r\n\/**\r\n * calculate the exp sums of LGC, based on the provided event data\r\n * @param {*} event_data: an array of EventData object\r\n * @returns array [law exp, gray exp, chaos exp] \r\n *\/\r\nfunction calculateSum(event_data) {\r\n    let law = 0;\r\n    let gray = 0;\r\n    let chaos = 0;\r\n    for (let ed of event_data) {\r\n        let r = ed.getResult();\r\n        law += r[0];\r\n        gray += r[1];\r\n        chaos += r[2];\r\n    }\r\n    return [law, gray, chaos]\r\n}\r\n\r\n\/**\r\n * given an array of LGC value calculated, update the corresponding LGC results in the UI.\r\n * @param {*} total_val: an array of LGC exp calculated\r\n * @param {*} law_result_field: UI element for showing law exp and law level.\r\n * @param {*} gray_result_field: UI element for showing gray exp and gray level.\r\n * @param {*} chaos_result_field: UI element for showing chaos exp and chaos level.\r\n *\/\r\nfunction setVal(total_val, law_result_field, gray_result_field, chaos_result_field) {\r\n    law_result_field.innerText = total_val[0] + \" (LV\" + getLevel(law_level_values, total_val[0]) + \")\";\r\n    gray_result_field.innerText = total_val[1] + \" (LV\" + getLevel(gray_level_values, total_val[1]) + \")\";\r\n    chaos_result_field.innerText = total_val[2] + \" (LV\" + getLevel(chaos_level_values, total_val[2]) + \")\";\r\n}\r\n\r\nconst table = document.getElementById(\"table\");\r\nconst all_event_data = [];\r\n\r\n\/\/ setup the table\r\n\/\/ also record all the UI and data values\r\nfor (let i = 0; i < data.length; i++) {\r\n    all_event_data.push(new EventData(data[i], table));\r\n}\r\n\r\n\/\/ button is for updating the final LGC values at the end of the game\r\nbutton.addEventListener(\"click\", ()=>{\r\n    total_val = calculateSum(all_event_data);\r\n    setVal(total_val, law_result_field, gray_result_field, chaos_result_field);\r\n});\r\n\r\n\/**\r\n * simulate the selection based on user inputed LGC levels they want to achieve at the end of the game\r\n *\/\r\nfunction simulateSelections() {\r\n    \/\/ read the LGC levels as selector input by the user.\r\n    let l_val = Number(input_l.value);\r\n    let g_val = Number(input_g.value);\r\n    let c_val = Number(input_c.value);\r\n\r\n    let lgc_val = JSON.stringify([l_val, g_val, c_val]);\r\n\r\n    \/\/ the user provided level combination is not achievable\r\n    if (!(lgc_val in potential_routes)) {\r\n        warning_div.innerHTML = \"\u65e0\u6cd5\u5b9e\u73b0\u8be5LGC\u8def\u7ebf\uff0c\u8bf7\u91cd\u8bd5\";\r\n        return;\r\n    }\r\n    warning_div.innerHTML = \"\";\r\n    \/\/ we can achieve the level combination, get the route from precalculated dictionary\r\n    let selected_route = potential_routes[lgc_val];\r\n\r\n    \/\/ simulate the selections\r\n    for (let i = 0; i < all_event_data.length; i++) {\r\n        if (all_event_data[i].selector) {\r\n            all_event_data[i].selector.value = selected_route[i];\r\n            all_event_data[i].selected_val = selected_route[i];\r\n        }\r\n        all_event_data[i].checker.checked = true;\r\n        all_event_data[i].onCheckerChanged();\r\n    }\r\n    button.click();\r\n}\r\n\r\nbutton_calculate.addEventListener(\"click\", ()=>simulateSelections());\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>LGC Calculator Note: There are multiple ways to reach the same LGC level in the game. This calculator simulates only one of the ways and only provides the better solution. \u2026<\/p>","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":7,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-56452","page","type-page","status-publish","hentry"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"LGC\u8ba1\u7b97\u5668 \u6ce8\uff1a\u6e38\u620f\u4e2d\u8fbe\u6210\u540c\u4e00\u79cdLGC\u7b49\u7ea7\u6709\u591a\u79cd\u65b9\u5f0f\uff0c\u672c\u8ba1\u7b97\u5668\u6a21\u62df\u7ebf\u8def\u53ea\u63d0\u4f9b\u5176\u4e2d\u4e00\u79cd\u65b9\u5f0f\uff0c\u5e76\u53ea\u63d0\u4f9b\u8f83\u4f18\u89e3\u3002\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/trails-game.com\/en\/kai-lgc-calculator\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/trails-game.com\\\/en\\\/kai-lgc-calculator\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/trails-game.com\\\/en\\\/#listItem\",\"position\":1,\"name\":\"\\u4e3b\\u9801\",\"item\":\"https:\\\/\\\/trails-game.com\\\/en\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/trails-game.com\\\/en\\\/kai-lgc-calculator\\\/#listItem\",\"name\":\"\\u754c\\u8f68LGC\\u8ba1\\u7b97\\u5668\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/trails-game.com\\\/en\\\/kai-lgc-calculator\\\/#listItem\",\"position\":2,\"name\":\"\\u754c\\u8f68LGC\\u8ba1\\u7b97\\u5668\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/trails-game.com\\\/en\\\/#listItem\",\"name\":\"\\u4e3b\\u9801\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/trails-game.com\\\/en\\\/#organization\",\"name\":\"\\u8f68\\u8ff9\\u7cfb\\u5217 - Cafe\",\"description\":\"\\u8f68\\u8ff9\\u7cfb\\u5217\\u653b\\u7565\\u7ad9\",\"url\":\"https:\\\/\\\/trails-game.com\\\/en\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/trails-game.com\\\/en\\\/kai-lgc-calculator\\\/#webpage\",\"url\":\"https:\\\/\\\/trails-game.com\\\/en\\\/kai-lgc-calculator\\\/\",\"name\":\"\\u754c\\u8f68LGC\\u8ba1\\u7b97\\u5668 | \\u8f68\\u8ff9\\u7cfb\\u5217 - Cafe\",\"description\":\"LGC\\u8ba1\\u7b97\\u5668 \\u6ce8\\uff1a\\u6e38\\u620f\\u4e2d\\u8fbe\\u6210\\u540c\\u4e00\\u79cdLGC\\u7b49\\u7ea7\\u6709\\u591a\\u79cd\\u65b9\\u5f0f\\uff0c\\u672c\\u8ba1\\u7b97\\u5668\\u6a21\\u62df\\u7ebf\\u8def\\u53ea\\u63d0\\u4f9b\\u5176\\u4e2d\\u4e00\\u79cd\\u65b9\\u5f0f\\uff0c\\u5e76\\u53ea\\u63d0\\u4f9b\\u8f83\\u4f18\\u89e3\\u3002\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/trails-game.com\\\/en\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/trails-game.com\\\/en\\\/kai-lgc-calculator\\\/#breadcrumblist\"},\"datePublished\":\"2024-12-10T23:50:30+08:00\",\"dateModified\":\"2025-01-18T23:33:05+08:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/trails-game.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/trails-game.com\\\/en\\\/\",\"name\":\"\\u8f68\\u8ff9\\u7cfb\\u5217 - Cafe\",\"description\":\"\\u8f68\\u8ff9\\u7cfb\\u5217\\u653b\\u7565\\u7ad9\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/trails-game.com\\\/en\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\u754c\u8f68LGC\u8ba1\u7b97\u5668 | \u8f68\u8ff9\u7cfb\u5217 - Cafe","description":"LGC\u8ba1\u7b97\u5668 \u6ce8\uff1a\u6e38\u620f\u4e2d\u8fbe\u6210\u540c\u4e00\u79cdLGC\u7b49\u7ea7\u6709\u591a\u79cd\u65b9\u5f0f\uff0c\u672c\u8ba1\u7b97\u5668\u6a21\u62df\u7ebf\u8def\u53ea\u63d0\u4f9b\u5176\u4e2d\u4e00\u79cd\u65b9\u5f0f\uff0c\u5e76\u53ea\u63d0\u4f9b\u8f83\u4f18\u89e3\u3002","canonical_url":"https:\/\/trails-game.com\/en\/kai-lgc-calculator\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/trails-game.com\/en\/kai-lgc-calculator\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/trails-game.com\/en\/#listItem","position":1,"name":"\u4e3b\u9801","item":"https:\/\/trails-game.com\/en\/","nextItem":{"@type":"ListItem","@id":"https:\/\/trails-game.com\/en\/kai-lgc-calculator\/#listItem","name":"\u754c\u8f68LGC\u8ba1\u7b97\u5668"}},{"@type":"ListItem","@id":"https:\/\/trails-game.com\/en\/kai-lgc-calculator\/#listItem","position":2,"name":"\u754c\u8f68LGC\u8ba1\u7b97\u5668","previousItem":{"@type":"ListItem","@id":"https:\/\/trails-game.com\/en\/#listItem","name":"\u4e3b\u9801"}}]},{"@type":"Organization","@id":"https:\/\/trails-game.com\/en\/#organization","name":"\u8f68\u8ff9\u7cfb\u5217 - Cafe","description":"\u8f68\u8ff9\u7cfb\u5217\u653b\u7565\u7ad9","url":"https:\/\/trails-game.com\/en\/"},{"@type":"WebPage","@id":"https:\/\/trails-game.com\/en\/kai-lgc-calculator\/#webpage","url":"https:\/\/trails-game.com\/en\/kai-lgc-calculator\/","name":"\u754c\u8f68LGC\u8ba1\u7b97\u5668 | \u8f68\u8ff9\u7cfb\u5217 - Cafe","description":"LGC\u8ba1\u7b97\u5668 \u6ce8\uff1a\u6e38\u620f\u4e2d\u8fbe\u6210\u540c\u4e00\u79cdLGC\u7b49\u7ea7\u6709\u591a\u79cd\u65b9\u5f0f\uff0c\u672c\u8ba1\u7b97\u5668\u6a21\u62df\u7ebf\u8def\u53ea\u63d0\u4f9b\u5176\u4e2d\u4e00\u79cd\u65b9\u5f0f\uff0c\u5e76\u53ea\u63d0\u4f9b\u8f83\u4f18\u89e3\u3002","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/trails-game.com\/en\/#website"},"breadcrumb":{"@id":"https:\/\/trails-game.com\/en\/kai-lgc-calculator\/#breadcrumblist"},"datePublished":"2024-12-10T23:50:30+08:00","dateModified":"2025-01-18T23:33:05+08:00"},{"@type":"WebSite","@id":"https:\/\/trails-game.com\/en\/#website","url":"https:\/\/trails-game.com\/en\/","name":"\u8f68\u8ff9\u7cfb\u5217 - Cafe","description":"\u8f68\u8ff9\u7cfb\u5217\u653b\u7565\u7ad9","inLanguage":"en-US","publisher":{"@id":"https:\/\/trails-game.com\/en\/#organization"}}]}},"aioseo_meta_data":{"post_id":"56452","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"WebPage","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2024-12-10 15:47:53","updated":"2025-08-12 03:18:28","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"seo_analyzer_scan_date":null},"_links":{"self":[{"href":"https:\/\/trails-game.com\/en\/wp-json\/wp\/v2\/pages\/56452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trails-game.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/trails-game.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/trails-game.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/trails-game.com\/en\/wp-json\/wp\/v2\/comments?post=56452"}],"version-history":[{"count":10,"href":"https:\/\/trails-game.com\/en\/wp-json\/wp\/v2\/pages\/56452\/revisions"}],"predecessor-version":[{"id":56956,"href":"https:\/\/trails-game.com\/en\/wp-json\/wp\/v2\/pages\/56452\/revisions\/56956"}],"wp:attachment":[{"href":"https:\/\/trails-game.com\/en\/wp-json\/wp\/v2\/media?parent=56452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}