您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Analyze unit movement in the map editor and map preview.
// ==UserScript== // @name AWBW Map Analyzer - V5.3 // @namespace awbw // @match https://awbw.amarriner.com/prevmaps.php* // @match https://awbw.amarriner.com/editmap.php* // @icon https://awbw.amarriner.com/terrain/followlist.gif // @version 0.5.3 // @description Analyze unit movement in the map editor and map preview. // @author steve, vesper // @license MIT // @grant none // @inject-into page // ==/UserScript== var BaseInfo = {}; function loadScript(e) { return new Promise(((t, n) => { let i = document.createElement("script"); document.head.append(i), i.onload = () => { t() }, i.onerror = () => { n() }, i.src = e })) } function loadImage(e) { return new Promise(((t, n) => { const i = new Image; i.onload = () => { t(i) }, i.onerror = e => { n(e) }, i.src = e })) } function indexToCoords(e, t) { return { x: (e = parseInt(e)) % t, y: e / t | 0 } } BaseInfo.countries = { os: { id: 1, name: "Orange Star", color: "181, 39, 68" }, bm: { id: 2, name: "Blue Moon", color: "70,110,254" }, ge: { id: 3, name: "Green Earth", color: "61, 194, 45" }, yc: { id: 4, name: "Yellow Comet", color: "201, 189, 2" }, bh: { id: 5, name: "Black Hole", color: "116, 89, 138" }, rf: { id: 6, name: "Red Fire", color: "146, 50, 67" }, gs: { id: 7, name: "Grey Sky", color: "114, 114, 114" }, bd: { id: 8, name: "Brown Desert", color: "152, 83, 51" }, ab: { id: 9, name: "Amber Blaze", color: "252, 163, 57" }, js: { id: 10, name: "Jade Sun", color: "166, 182, 153" }, ci: { id: 16, name: "Cobalt Ice", color: "11, 32, 112" }, pc: { id: 17, name: "Pink Cosmos", color: "255, 102, 204" }, tg: { id: 19, name: "Teal Galaxy", color: "60, 205, 193" }, pl: { id: 20, name: "Purple Lightning", color: "111, 26, 155" }, ar: { id: 21, name: "Acid Rain", color: "97, 124, 14" }, wn: { id: 22, name: "White Nova", color: "205, 155, 154" }, aa: { id: 23, name: "Azure Asteroid", color: "130, 220, 232" }, ne: { id: 24, name: "Noir Eclipse", color: "3, 3, 3" }, sc: { id: 25, name: "Silver Claw", color: "137, 168, 188" }, uw: { id: 26, name: "Umber Wilds", color: "222, 139, 56" } } BaseInfo.terrain = { 1: { name: "Plain", defense: 1, country: "", build_type: null }, 2: { name: "Mountain", defense: 4, country: "", build_type: "" }, 3: { name: "Wood", defense: 2, country: "", build_type: null }, 4: { name: "HRiver", defense: 0, country: "", build_type: null }, 5: { name: "VRiver", defense: 0, country: "", build_type: null }, 6: { name: "CRiver", defense: 0, country: "", build_type: null }, 7: { name: "ESRiver", defense: 0, country: "", build_type: null }, 8: { name: "SWRiver", defense: 0, country: "", build_type: null }, 9: { name: "WNRiver", defense: 0, country: "", build_type: "" }, 10: { name: "NERiver", defense: 0, country: "", build_type: null }, 11: { name: "ESWRiver", defense: 0, country: "", build_type: null }, 12: { name: "SWNRiver", defense: 0, country: "", build_type: null }, 13: { name: "WNERiver", defense: 0, country: "", build_type: null }, 14: { name: "NESRiver", defense: 0, country: "", build_type: null }, 15: { name: "HRoad", defense: 0, country: "", build_type: null }, 16: { name: "VRoad", defense: 0, country: "", build_type: null }, 17: { name: "CRoad", defense: 0, country: "", build_type: null }, 18: { name: "ESRoad", defense: 0, country: "", build_type: null }, 19: { name: "SWRoad", defense: 0, country: "", build_type: null }, 20: { name: "WNRoad", defense: 0, country: "", build_type: null }, 21: { name: "NERoad", defense: 0, country: "", build_type: null }, 22: { name: "ESWRoad", defense: 0, country: "", build_type: null }, 23: { name: "SWNRoad", defense: 0, country: "", build_type: null }, 24: { name: "WNERoad", defense: 0, country: "", build_type: null }, 25: { name: "NESRoad", defense: 0, country: "", build_type: null }, 26: { name: "HBridge", defense: 0, country: "", build_type: null }, 27: { name: "VBridge", defense: 0, country: "", build_type: null }, 28: { name: "Sea", defense: 0, country: "", build_type: null }, 29: { name: "HShoal", defense: 0, country: "", build_type: null }, 30: { name: "HShoalN", defense: 0, country: "", build_type: null }, 31: { name: "VShoal", defense: 0, country: "", build_type: null }, 32: { name: "VShoalE", defense: 0, country: "", build_type: null }, 33: { name: "Reef", defense: 1, country: "", build_type: null }, 34: { name: "Neutral City", defense: 3, country: "", build_type: null }, 35: { name: "Neutral Base", defense: 3, country: "", build_type: "" }, 36: { name: "Neutral Airport", defense: 3, country: "", build_type: null }, 37: { name: "Neutral Port", defense: 3, country: "", build_type: null }, 38: { name: "Orange Star City", defense: 3, country: "os", build_type: null }, 39: { name: "Orange Star Base", defense: 3, country: "os", build_type: "L" }, 40: { name: "Orange Star Airport", defense: 3, country: "os", build_type: "A" }, 41: { name: "Orange Star Port", defense: 3, country: "os", build_type: "S" }, 42: { name: "Orange Star HQ", defense: 4, country: "os", build_type: null }, 43: { name: "Blue Moon City", defense: 3, country: "bm", build_type: null }, 44: { name: "Blue Moon Base", defense: 3, country: "bm", build_type: "L" }, 45: { name: "Blue Moon Airport", defense: 3, country: "bm", build_type: "A" }, 46: { name: "Blue Moon Port", defense: 3, country: "bm", build_type: "S" }, 47: { name: "Blue Moon HQ", defense: 4, country: "bm", build_type: null }, 48: { name: "Green Earth City", defense: 3, country: "ge", build_type: null }, 49: { name: "Green Earth Base", defense: 3, country: "ge", build_type: "L" }, 50: { name: "Green Earth Airport", defense: 3, country: "ge", build_type: "A" }, 51: { name: "Green Earth Port", defense: 3, country: "ge", build_type: "S" }, 52: { name: "Green Earth HQ", defense: 4, country: "ge", build_type: null }, 53: { name: "Yellow Comet City", defense: 3, country: "yc", build_type: null }, 54: { name: "Yellow Comet Base", defense: 3, country: "yc", build_type: "L" }, 55: { name: "Yellow Comet Airport", defense: 3, country: "yc", build_type: "A" }, 56: { name: "Yellow Comet Port", defense: 3, country: "yc", build_type: "S" }, 57: { name: "Yellow Comet HQ", defense: 4, country: "yc", build_type: null }, 81: { name: "Red Fire City", defense: 3, country: "rf", build_type: null }, 82: { name: "Red Fire Base", defense: 3, country: "rf", build_type: "L" }, 83: { name: "Red Fire Airport", defense: 3, country: "rf", build_type: "A" }, 84: { name: "Red Fire Port", defense: 3, country: "rf", build_type: "S" }, 85: { name: "Red Fire HQ", defense: 4, country: "rf", build_type: null }, 86: { name: "Grey Sky City", defense: 3, country: "gs", build_type: null }, 87: { name: "Grey Sky Base", defense: 3, country: "gs", build_type: "L" }, 88: { name: "Grey Sky Airport", defense: 3, country: "gs", build_type: "A" }, 89: { name: "Grey Sky Port", defense: 3, country: "gs", build_type: "S" }, 90: { name: "Grey Sky HQ", defense: 4, country: "gs", build_type: null }, 91: { name: "Black Hole City", defense: 3, country: "bh", build_type: null }, 92: { name: "Black Hole Base", defense: 3, country: "bh", build_type: "L" }, 93: { name: "Black Hole Airport", defense: 3, country: "bh", build_type: "A" }, 94: { name: "Black Hole Port", defense: 3, country: "bh", build_type: "S" }, 95: { name: "Black Hole HQ", defense: 4, country: "bh", build_type: "" }, 96: { name: "Brown Desert City", defense: 3, country: "bd", build_type: null }, 97: { name: "Brown Desert Base", defense: 3, country: "bd", build_type: "L" }, 98: { name: "Brown Desert Airport", defense: 3, country: "bd", build_type: "A" }, 99: { name: "Brown Desert Port", defense: 3, country: "bd", build_type: "S" }, 100: { name: "Brown Desert HQ", defense: 4, country: "bd", build_type: null }, 101: { name: "VPipe", defense: 0, country: "", build_type: "" }, 102: { name: "HPipe", defense: 0, country: "", build_type: "" }, 103: { name: "NEPipe", defense: 0, country: "", build_type: "" }, 104: { name: "ESPipe", defense: 0, country: "", build_type: "" }, 105: { name: "SWPipe", defense: 0, country: "", build_type: "" }, 106: { name: "WNPipe", defense: 0, country: "", build_type: "" }, 107: { name: "NPipe End", defense: 0, country: "", build_type: "" }, 108: { name: "EPipe End", defense: 0, country: "", build_type: "" }, 109: { name: "SPipe End", defense: 0, country: "", build_type: "" }, 110: { name: "WPipe End", defense: 0, country: "", build_type: "" }, 111: { name: "Missile Silo", defense: 3, country: "", build_type: "" }, 112: { name: "Missile Silo Empty", defense: 3, country: "", build_type: "" }, 113: { name: "HPipe Seam", defense: 0, country: "", build_type: "" }, 114: { name: "VPipe Seam", defense: 0, country: "", build_type: "" }, 115: { name: "HPipe Rubble", defense: 1, country: "", build_type: "" }, 116: { name: "VPipe Rubble", defense: 1, country: "", build_type: "" }, 117: { name: "Amber Blaze Airport", defense: 3, country: "ab", build_type: "A" }, 118: { name: "Amber Blaze Base", defense: 3, country: "ab", build_type: "L" }, 119: { name: "Amber Blaze City", defense: 3, country: "ab", build_type: "" }, 120: { name: "Amber Blaze HQ", defense: 4, country: "ab", build_type: "" }, 121: { name: "Amber Blaze Port", defense: 3, country: "ab", build_type: "S" }, 122: { name: "Jade Sun Airport", defense: 3, country: "js", build_type: "A" }, 123: { name: "Jade Sun Base", defense: 3, country: "js", build_type: "L" }, 124: { name: "Jade Sun City", defense: 3, country: "js", build_type: "" }, 125: { name: "Jade Sun HQ", defense: 4, country: "js", build_type: "" }, 126: { name: "Jade Sun Port", defense: 3, country: "js", build_type: "S" }, 127: { name: "Amber Blaze Com Tower", defense: 3, country: "ab", build_type: "" }, 128: { name: "Black Hole Com Tower", defense: 3, country: "bh", build_type: "" }, 129: { name: "Blue Moon Com Tower", defense: 3, country: "bm", build_type: "" }, 130: { name: "Brown Desert Com Tower", defense: 3, country: "bd", build_type: "" }, 131: { name: "Green Earth Com Tower", defense: 3, country: "ge", build_type: "" }, 132: { name: "Jade Sun Com Tower", defense: 3, country: "js", build_type: "" }, 133: { name: "Neutral Com Tower", defense: 3, country: "", build_type: "" }, 134: { name: "Orange Star Com Tower", defense: 3, country: "os", build_type: "" }, 135: { name: "Red Fire Com Tower", defense: 3, country: "rf", build_type: "" }, 136: { name: "Yellow Comet Com Tower", defense: 3, country: "yc", build_type: "" }, 137: { name: "Grey Sky Com Tower", defense: 3, country: "gs", build_type: "" }, 138: { name: "Amber Blaze Lab", defense: 3, country: "ab", build_type: "" }, 139: { name: "Black Hole Lab", defense: 3, country: "bh", build_type: "" }, 140: { name: "Blue Moon Lab", defense: 3, country: "bm", build_type: "" }, 141: { name: "Brown Desert Lab", defense: 3, country: "bd", build_type: "" }, 142: { name: "Green Earth Lab", defense: 3, country: "ge", build_type: "" }, 143: { name: "Grey Sky Lab", defense: 3, country: "gs", build_type: "" }, 144: { name: "Jade Sun Lab", defense: 3, country: "js", build_type: "" }, 145: { name: "Neutral Lab", defense: 3, country: "", build_type: "" }, 146: { name: "Orange Star Lab", defense: 3, country: "os", build_type: "" }, 147: { name: "Red Fire Lab", defense: 3, country: "rf", build_type: "" }, 148: { name: "Yellow Comet Lab", defense: 3, country: "yc", build_type: "" }, 149: { name: "Cobalt Ice Airport", defense: 3, country: "ci", build_type: "A" }, 150: { name: "Cobalt Ice Base", defense: 3, country: "ci", build_type: "L" }, 151: { name: "Cobalt Ice City", defense: 3, country: "ci", build_type: "" }, 152: { name: "Cobalt Ice Com Tower", defense: 3, country: "ci", build_type: "" }, 153: { name: "Cobalt Ice HQ", defense: 4, country: "ci", build_type: "" }, 154: { name: "Cobalt Ice Lab", defense: 3, country: "ci", build_type: "" }, 155: { name: "Cobalt Ice Port", defense: 3, country: "ci", build_type: "S" }, 156: { name: "Pink Cosmos Airport", defense: 3, country: "pc", build_type: "A" }, 157: { name: "Pink Cosmos Base", defense: 3, country: "pc", build_type: "L" }, 158: { name: "Pink Cosmos City", defense: 3, country: "pc", build_type: "" }, 159: { name: "Pink Cosmos Com Tower", defense: 3, country: "pc", build_type: "" }, 160: { name: "Pink Cosmos HQ", defense: 4, country: "pc", build_type: "" }, 161: { name: "Pink Cosmos Lab", defense: 3, country: "pc", build_type: "" }, 162: { name: "Pink Cosmos Port", defense: 3, country: "pc", build_type: "S" }, 163: { name: "Teal Galaxy Airport", defense: 3, country: "tg", build_type: "A" }, 164: { name: "Teal Galaxy Base", defense: 3, country: "tg", build_type: "L" }, 165: { name: "Teal Galaxy City", defense: 3, country: "tg", build_type: "" }, 166: { name: "Teal Galaxy Com Tower", defense: 3, country: "tg", build_type: "" }, 167: { name: "Teal Galaxy HQ", defense: 4, country: "tg", build_type: "" }, 168: { name: "Teal Galaxy Lab", defense: 3, country: "tg", build_type: "" }, 169: { name: "Teal Galaxy Port", defense: 3, country: "tg", build_type: "S" }, 170: { name: "Purple Lightning Airport", defense: 3, country: "pl", build_type: "A" }, 171: { name: "Purple Lightning Base", defense: 3, country: "pl", build_type: "L" }, 172: { name: "Purple Lightning City", defense: 3, country: "pl", build_type: "" }, 173: { name: "Purple Lightning Com Tower", defense: 3, country: "pl", build_type: "" }, 174: { name: "Purple Lightning HQ", defense: 4, country: "pl", build_type: "" }, 175: { name: "Purple Lightning Lab", defense: 3, country: "pl", build_type: "" }, 176: { name: "Purple Lightning Port", defense: 3, country: "pl", build_type: "S" }, 181: { name: "Acid Rain Airport", defense: 3, country: "ar", build_type: "A" }, 182: { name: "Acid Rain Base", defense: 3, country: "ar", build_type: "L" }, 183: { name: "Acid Rain City", defense: 3, country: "ar", build_type: "" }, 184: { name: "Acid Rain Com Tower", defense: 3, country: "ar", build_type: "" }, 185: { name: "Acid Rain HQ", defense: 4, country: "ar", build_type: "" }, 186: { name: "Acid Rain Lab", defense: 3, country: "ar", build_type: "" }, 187: { name: "Acid Rain Port", defense: 3, country: "ar", build_type: "S" }, 188: { name: "White Nova Airport", defense: 3, country: "wn", build_type: "A" }, 189: { name: "White Nova Base", defense: 3, country: "wn", build_type: "L" }, 190: { name: "White Nova City", defense: 3, country: "wn", build_type: "" }, 191: { name: "White Nova Com Tower", defense: 3, country: "wn", build_type: "" }, 192: { name: "White Nova HQ", defense: 4, country: "wn", build_type: "" }, 193: { name: "White Nova Lab", defense: 3, country: "wn", build_type: "" }, 194: { name: "White Nova Port", defense: 3, country: "wn", build_type: "S" }, 195: { name: "Teleporter", defense: 0, country: "", build_type: "" }, 196: { name: "Azure Asteroid Airport", defense: 3, country: "aa", build_type: "A" }, 197: { name: "Azure Asteroid Base", defense: 3, country: "aa", build_type: "L" }, 198: { name: "Azure Asteroid City", defense: 3, country: "aa", build_type: "" }, 199: { name: "Azure Asteroid Com Tower", defense: 3, country: "aa", build_type: "" }, 200: { name: "Azure Asteroid HQ", defense: 4, country: "aa", build_type: "" }, 201: { name: "Azure Asteroid Lab", defense: 3, country: "aa", build_type: "" }, 202: { name: "Azure Asteroid Port", defense: 3, country: "aa", build_type: "S" }, 203: { name: "Noir Eclipse Airport", defense: 3, country: "ne", build_type: "A" }, 204: { name: "Noir Eclipse Base", defense: 3, country: "ne", build_type: "L" }, 205: { name: "Noir Eclipse City", defense: 3, country: "ne", build_type: "" }, 206: { name: "Noir Eclipse Com Tower", defense: 3, country: "ne", build_type: "" }, 207: { name: "Noir Eclipse HQ", defense: 4, country: "ne", build_type: "" }, 208: { name: "Noir Eclipse Lab", defense: 3, country: "ne", build_type: "" }, 209: { name: "Noir Eclipse Port", defense: 3, country: "ne", build_type: "S" }, 210: { name: "Silver Claw Airport", defense: 3, country: "sc", build_type: "A" }, 211: { name: "Silver Claw Base", defense: 3, country: "sc", build_type: "L" }, 212: { name: "Silver Claw City", defense: 3, country: "sc", build_type: "" }, 213: { name: "Silver Claw Com Tower", defense: 3, country: "sc", build_type: "" }, 214: { name: "Silver Claw HQ", defense: 4, country: "sc", build_type: "" }, 215: { name: "Silver Claw Lab", defense: 3, country: "sc", build_type: "" }, 216: { name: "Silver Claw Port", defense: 3, country: "sc", build_type: "S" }, 217: { name: "Umber Wilds Airport", defense: 3, country: "uw", build_type: "A" }, 218: { name: "Umber Wilds Base", defense: 3, country: "uw", build_type: "L" }, 219: { name: "Umber Wilds City", defense: 3, country: "uw", build_type: "" }, 220: { name: "Umber Wilds Com Tower", defense: 3, country: "uw", build_type: "" }, 221: { name: "Umber Wilds HQ", defense: 4, country: "uw", build_type: "" }, 222: { name: "Umber Wilds Lab", defense: 3, country: "uw", build_type: "" }, 223: { name: "Umber Wilds Port", defense: 3, country: "uw", build_type: "S" } } BaseInfo.units = { 1: { name: "Infantry", cost: 1e3, move_points: 3, move_type: "F", fuel: 99, fuel_per_turn: 0, ammo: 0, short_range: 0, long_range: 0, second_weapon: "N" }, 2: { name: "Mech", cost: 3e3, move_points: 2, move_type: "B", fuel: 70, fuel_per_turn: 0, ammo: 3, short_range: 0, long_range: 0, second_weapon: "Y" }, 3: { name: "Md.Tank", cost: 16e3, move_points: 5, move_type: "T", fuel: 50, fuel_per_turn: 0, ammo: 8, short_range: 0, long_range: 0, second_weapon: "Y" }, 4: { name: "Tank", cost: 7e3, move_points: 6, move_type: "T", fuel: 70, fuel_per_turn: 0, ammo: 9, short_range: 0, long_range: 0, second_weapon: "Y" }, 5: { name: "Recon", cost: 4e3, move_points: 8, move_type: "W", fuel: 80, fuel_per_turn: 0, ammo: 0, short_range: 0, long_range: 0, second_weapon: "N" }, 6: { name: "APC", cost: 5e3, move_points: 6, move_type: "T", fuel: 70, fuel_per_turn: 0, ammo: 0, short_range: 0, long_range: 0, second_weapon: "N" }, 7: { name: "Artillery", cost: 6e3, move_points: 5, move_type: "T", fuel: 50, fuel_per_turn: 0, ammo: 9, short_range: 2, long_range: 3, second_weapon: "N" }, 8: { name: "Rocket", cost: 15e3, move_points: 5, move_type: "W", fuel: 50, fuel_per_turn: 0, ammo: 6, short_range: 3, long_range: 5, second_weapon: "N" }, 9: { name: "Anti-Air", cost: 8e3, move_points: 6, move_type: "T", fuel: 60, fuel_per_turn: 0, ammo: 9, short_range: 0, long_range: 0, second_weapon: "N" }, 10: { name: "Missile", cost: 12e3, move_points: 4, move_type: "W", fuel: 50, fuel_per_turn: 0, ammo: 6, short_range: 3, long_range: 5, second_weapon: "N" }, 11: { name: "Fighter", cost: 2e4, move_points: 9, move_type: "A", fuel: 99, fuel_per_turn: 5, ammo: 9, short_range: 0, long_range: 0, second_weapon: "N" }, 12: { name: "Bomber", cost: 22e3, move_points: 7, move_type: "A", fuel: 99, fuel_per_turn: 5, ammo: 9, short_range: 0, long_range: 0, second_weapon: "N" }, 13: { name: "B-Copter", cost: 9e3, move_points: 6, move_type: "A", fuel: 99, fuel_per_turn: 2, ammo: 6, short_range: 0, long_range: 0, second_weapon: "Y" }, 14: { name: "T-Copter", cost: 5e3, move_points: 6, move_type: "A", fuel: 99, fuel_per_turn: 2, ammo: 0, short_range: 0, long_range: 0, second_weapon: "N" }, 15: { name: "Battleship", cost: 28e3, move_points: 5, move_type: "S", fuel: 99, fuel_per_turn: 1, ammo: 9, short_range: 2, long_range: 6, second_weapon: "N" }, 16: { name: "Cruiser", cost: 18e3, move_points: 6, move_type: "S", fuel: 99, fuel_per_turn: 1, ammo: 9, short_range: 0, long_range: 0, second_weapon: "N" }, 17: { name: "Lander", cost: 12e3, move_points: 6, move_type: "L", fuel: 99, fuel_per_turn: 1, ammo: 0, short_range: 0, long_range: 0, second_weapon: "N" }, 18: { name: "Sub", cost: 2e4, move_points: 5, move_type: "S", fuel: 60, fuel_per_turn: 1, ammo: 6, short_range: 0, long_range: 0, second_weapon: "N" }, 46: { name: "Neotank", cost: 22e3, move_points: 6, move_type: "T", fuel: 99, fuel_per_turn: 1, ammo: 9, short_range: 0, long_range: 0, second_weapon: "Y" }, 960900: { name: "Piperunner", cost: 2e4, move_points: 9, move_type: "P", fuel: 99, fuel_per_turn: 0, ammo: 9, short_range: 2, long_range: 5, second_weapon: "Y" }, 968731: { name: "Black Bomb", cost: 25e3, move_points: 9, move_type: "A", fuel: 45, fuel_per_turn: 5, ammo: 0, short_range: 0, long_range: 0, second_weapon: "N" }, 1141438: { name: "Mega Tank", cost: 28e3, move_points: 4, move_type: "T", fuel: 50, fuel_per_turn: 0, ammo: 3, short_range: 0, long_range: 0, second_weapon: "Y" }, 28: { name: "Black Boat", cost: 7500, move_points: 7, move_type: "L", fuel: 60, fuel_per_turn: 1, ammo: 0, short_range: 0, long_range: 0, second_weapon: "N" }, 30: { name: "Stealth", cost: 24e3, move_points: 6, move_type: "A", fuel: 60, fuel_per_turn: 5, ammo: 6, short_range: 0, long_range: 0, second_weapon: "N" }, 29: { name: "Carrier", cost: 3e4, move_points: 5, move_type: "S", fuel: 99, fuel_per_turn: 1, ammo: 9, short_range: 3, long_range: 8, second_weapon: "N" } } BaseInfo.moveCosts = { C: { F: { 1: 1, 2: 2, 3: 1, 4: 2, 5: 2, 6: 2, 7: 2, 8: 2, 9: 2, 10: 2, 11: 2, 12: 2, 13: 2, 14: 2, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 0, 29: 1, 30: 1, 31: 1, 32: 1, 33: 0, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 1, 116: 1, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, B: { 1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 11: 1, 12: 1, 13: 1, 14: 1, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 0, 29: 1, 30: 1, 31: 1, 32: 1, 33: 0, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 1, 116: 1, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, T: { 1: 1, 2: 0, 3: 2, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 0, 29: 1, 30: 1, 31: 1, 32: 1, 33: 0, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 1, 116: 1, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, W: { 1: 2, 2: 0, 3: 3, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 0, 29: 1, 30: 1, 31: 1, 32: 1, 33: 0, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 2, 116: 2, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, A: { 1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 11: 1, 12: 1, 13: 1, 14: 1, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 1, 29: 1, 30: 1, 31: 1, 32: 1, 33: 1, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 1, 116: 1, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, S: { 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0, 20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 1, 29: 0, 30: 0, 31: 0, 32: 0, 33: 2, 34: 0, 35: 0, 36: 0, 37: 1, 38: 0, 39: 0, 40: 0, 41: 1, 42: 0, 43: 0, 44: 0, 45: 0, 46: 1, 47: 0, 48: 0, 49: 0, 50: 0, 51: 1, 52: 0, 53: 0, 54: 0, 55: 0, 56: 1, 57: 0, 81: 0, 86: 0, 82: 0, 87: 0, 83: 0, 88: 0, 84: 1, 89: 1, 85: 0, 90: 0, 91: 0, 92: 0, 93: 0, 94: 1, 95: 0, 96: 0, 97: 0, 98: 0, 99: 1, 100: 0, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 0, 112: 0, 113: 0, 114: 0, 115: 0, 116: 0, 117: 0, 118: 0, 119: 0, 120: 0, 121: 1, 122: 0, 123: 0, 124: 0, 125: 0, 126: 1, 127: 0, 128: 0, 129: 0, 130: 0, 131: 0, 132: 0, 133: 0, 134: 0, 135: 0, 136: 0, 137: 0, 138: 0, 139: 0, 140: 0, 141: 0, 142: 0, 143: 0, 144: 0, 145: 0, 146: 0, 147: 0, 148: 0, 149: 0, 150: 0, 151: 0, 152: 0, 153: 0, 154: 0, 155: 1, 156: 0, 157: 0, 158: 0, 159: 0, 160: 0, 161: 0, 162: 1, 163: 0, 164: 0, 165: 0, 166: 0, 167: 0, 168: 0, 169: 1, 170: 0, 171: 0, 172: 0, 173: 0, 174: 0, 175: 0, 176: 1, "": 0, 181: 0, 182: 0, 183: 0, 184: 0, 185: 0, 186: 0, 187: 1, 188: 0, 189: 0, 190: 0, 191: 0, 192: 0, 193: 0, 194: 1, 195: 0 }, L: { 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0, 20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 1, 29: 1, 30: 1, 31: 1, 32: 1, 33: 2, 34: 0, 35: 0, 36: 0, 37: 1, 38: 0, 39: 0, 40: 0, 41: 1, 42: 0, 43: 0, 44: 0, 45: 0, 46: 1, 47: 0, 48: 0, 49: 0, 50: 0, 51: 1, 52: 0, 53: 0, 54: 0, 55: 0, 56: 1, 57: 0, 81: 0, 86: 0, 82: 0, 87: 0, 83: 0, 88: 0, 84: 1, 89: 1, 85: 0, 90: 0, 91: 0, 92: 0, 93: 0, 94: 1, 95: 0, 96: 0, 97: 0, 98: 0, 99: 1, 100: 0, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 0, 112: 0, 113: 0, 114: 0, 115: 0, 116: 0, 117: 0, 118: 0, 119: 0, 120: 0, 121: 1, 122: 0, 123: 0, 124: 0, 125: 0, 126: 1, 127: 0, 128: 0, 129: 0, 130: 0, 131: 0, 132: 0, 133: 0, 134: 0, 135: 0, 136: 0, 137: 0, 138: 0, 139: 0, 140: 0, 141: 0, 142: 0, 143: 0, 144: 0, 145: 0, 146: 0, 147: 0, 148: 0, 149: 0, 150: 0, 151: 0, 152: 0, 153: 0, 154: 0, 155: 1, 156: 0, 157: 0, 158: 0, 159: 0, 160: 0, 161: 0, 162: 1, 163: 0, 164: 0, 165: 0, 166: 0, 167: 0, 168: 0, 169: 1, 170: 0, 171: 0, 172: 0, 173: 0, 174: 0, 175: 0, 176: 1, "": 0, 181: 0, 182: 0, 183: 0, 184: 0, 185: 0, 186: 0, 187: 1, 188: 0, 189: 0, 190: 0, 191: 0, 192: 0, 193: 0, 194: 1, 195: 0 }, P: { 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0, 20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 0, 29: 0, 30: 0, 31: 0, 32: 0, 33: 0, 34: 0, 35: 1, 36: 0, 37: 0, 38: 0, 39: 1, 40: 0, 41: 0, 42: 0, 43: 0, 44: 1, 45: 0, 46: 0, 47: 0, 48: 0, 49: 1, 50: 0, 51: 0, 52: 0, 53: 0, 54: 1, 55: 0, 56: 0, 57: 0, 85: 0, 90: 0, 84: 0, 89: 0, 83: 0, 88: 0, 82: 1, 87: 1, 81: 0, 86: 0, 91: 0, 92: 1, 93: 0, 94: 0, 95: 0, 96: 0, 97: 1, 98: 0, 99: 0, 100: 0, 101: 1, 102: 1, 103: 1, 104: 1, 105: 1, 106: 1, 107: 1, 108: 1, 109: 1, 110: 1, 111: 0, 112: 0, 113: 1, 114: 1, 115: 0, 116: 0, 117: 0, 118: 1, 119: 0, 120: 0, 121: 0, 122: 0, 123: 1, 124: 0, 125: 0, 126: 0, 127: 0, 128: 0, 129: 0, 130: 0, 131: 0, 132: 0, 133: 0, 134: 0, 135: 0, 136: 0, 137: 0, 138: 0, 139: 0, 140: 0, 141: 0, 142: 0, 143: 0, 144: 0, 145: 0, 146: 0, 147: 0, 148: 0, 149: 0, 150: 1, 151: 0, 152: 0, 153: 0, 154: 0, 155: 0, 156: 0, 157: 1, 158: 0, 159: 0, 160: 0, 161: 0, 162: 0, 163: 0, 164: 1, 165: 0, 166: 0, 167: 0, 168: 0, 169: 0, 170: 0, 171: 1, 172: 0, 173: 0, 174: 0, 175: 0, 176: 0, "": 0, 181: 0, 182: 1, 183: 0, 184: 0, 185: 0, 186: 0, 187: 0, 188: 0, 189: 1, 190: 0, 191: 0, 192: 0, 193: 0, 194: 0, 195: 0 } }, S: { F: { 1: 2, 2: 4, 3: 2, 4: 2, 5: 2, 6: 2, 7: 2, 8: 2, 9: 2, 10: 2, 11: 2, 12: 2, 13: 2, 14: 2, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 0, 29: 1, 30: 1, 31: 1, 32: 1, 33: 0, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 2, 116: 2, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, B: { 1: 1, 2: 2, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 11: 1, 12: 1, 13: 1, 14: 1, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 0, 29: 1, 30: 1, 31: 1, 32: 1, 33: 0, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 1, 116: 1, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, T: { 1: 2, 2: 0, 3: 2, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 0, 29: 1, 30: 1, 31: 1, 32: 1, 33: 0, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 2, 116: 2, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, W: { 1: 3, 2: 0, 3: 3, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 0, 29: 1, 30: 1, 31: 1, 32: 1, 33: 0, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 3, 116: 3, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, A: { 1: 2, 2: 2, 3: 2, 4: 2, 5: 2, 6: 2, 7: 2, 8: 2, 9: 2, 10: 2, 11: 2, 12: 2, 13: 2, 14: 2, 15: 2, 16: 2, 17: 2, 18: 2, 19: 2, 20: 2, 21: 2, 22: 2, 23: 2, 24: 2, 25: 2, 26: 2, 27: 2, 28: 2, 29: 2, 30: 2, 31: 2, 32: 2, 33: 2, 34: 2, 35: 2, 36: 2, 37: 2, 38: 2, 39: 2, 40: 2, 41: 2, 42: 2, 43: 2, 44: 2, 45: 2, 46: 2, 47: 2, 48: 2, 49: 2, 50: 2, 51: 2, 52: 2, 53: 2, 54: 2, 55: 2, 56: 2, 57: 2, 81: 2, 86: 2, 82: 2, 87: 2, 83: 2, 88: 2, 84: 2, 89: 2, 85: 2, 90: 2, 91: 2, 92: 2, 93: 2, 94: 2, 95: 2, 96: 2, 97: 2, 98: 2, 99: 2, 100: 2, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 2, 112: 2, 113: 0, 114: 0, 115: 2, 116: 2, 117: 2, 118: 2, 119: 2, 120: 2, 121: 2, 122: 2, 123: 2, 124: 2, 125: 2, 126: 2, 127: 2, 128: 2, 129: 2, 130: 2, 131: 2, 132: 2, 133: 2, 134: 2, 135: 2, 136: 2, 137: 2, 138: 2, 139: 2, 140: 2, 141: 2, 142: 2, 143: 2, 144: 2, 145: 2, 146: 2, 147: 2, 148: 2, 149: 2, 150: 2, 151: 2, 152: 2, 153: 2, 154: 2, 155: 2, 156: 2, 157: 2, 158: 2, 159: 2, 160: 2, 161: 2, 162: 2, 163: 2, 164: 2, 165: 2, 166: 2, 167: 2, 168: 2, 169: 2, 170: 2, 171: 2, 172: 2, 173: 2, 174: 2, 175: 2, 176: 2, "": 2, 181: 2, 182: 2, 183: 2, 184: 2, 185: 2, 186: 2, 187: 2, 188: 2, 189: 2, 190: 2, 191: 2, 192: 2, 193: 2, 194: 2, 195: 0 }, S: { 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0, 20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 2, 29: 0, 30: 0, 31: 0, 32: 0, 33: 2, 34: 0, 35: 0, 36: 0, 37: 2, 38: 0, 39: 0, 40: 0, 41: 2, 42: 0, 43: 0, 44: 0, 45: 0, 46: 2, 47: 0, 48: 0, 49: 0, 50: 0, 51: 2, 52: 0, 53: 0, 54: 0, 55: 0, 56: 2, 57: 0, 81: 0, 86: 0, 82: 0, 87: 0, 83: 0, 88: 0, 84: 2, 89: 2, 85: 0, 90: 0, 91: 0, 92: 0, 93: 0, 94: 2, 95: 0, 96: 0, 97: 0, 98: 0, 99: 2, 100: 0, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 0, 112: 0, 113: 0, 114: 0, 115: 0, 116: 0, 117: 0, 118: 0, 119: 0, 120: 0, 121: 2, 122: 0, 123: 0, 124: 0, 125: 0, 126: 2, 127: 0, 128: 0, 129: 0, 130: 0, 131: 0, 132: 0, 133: 0, 134: 0, 135: 0, 136: 0, 137: 0, 138: 0, 139: 0, 140: 0, 141: 0, 142: 0, 143: 0, 144: 0, 145: 0, 146: 0, 147: 0, 148: 0, 149: 0, 150: 0, 151: 0, 152: 0, 153: 0, 154: 0, 155: 2, 156: 0, 157: 0, 158: 0, 159: 0, 160: 0, 161: 0, 162: 2, 163: 0, 164: 0, 165: 0, 166: 0, 167: 0, 168: 0, 169: 2, 170: 0, 171: 0, 172: 0, 173: 0, 174: 0, 175: 0, 176: 2, "": 0, 181: 0, 182: 0, 183: 0, 184: 0, 185: 0, 186: 0, 187: 2, 188: 0, 189: 0, 190: 0, 191: 0, 192: 0, 193: 0, 194: 2, 195: 0 }, L: { 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0, 20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 2, 29: 1, 30: 1, 31: 1, 32: 1, 33: 2, 34: 0, 35: 0, 36: 0, 37: 2, 38: 0, 39: 0, 40: 0, 41: 2, 42: 0, 43: 0, 44: 0, 45: 0, 46: 2, 47: 0, 48: 0, 49: 0, 50: 0, 51: 2, 52: 0, 53: 0, 54: 0, 55: 0, 56: 2, 57: 0, 81: 0, 86: 0, 82: 0, 87: 0, 83: 0, 88: 0, 84: 2, 89: 2, 85: 0, 90: 0, 91: 0, 92: 0, 93: 0, 94: 2, 95: 0, 96: 0, 97: 0, 98: 0, 99: 2, 100: 0, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 0, 112: 0, 113: 0, 114: 0, 115: 0, 116: 0, 117: 0, 118: 0, 119: 0, 120: 0, 121: 2, 122: 0, 123: 0, 124: 0, 125: 0, 126: 2, 127: 0, 128: 0, 129: 0, 130: 0, 131: 0, 132: 0, 133: 0, 134: 0, 135: 0, 136: 0, 137: 0, 138: 0, 139: 0, 140: 0, 141: 0, 142: 0, 143: 0, 144: 0, 145: 0, 146: 0, 147: 0, 148: 0, 149: 0, 150: 0, 151: 0, 152: 0, 153: 0, 154: 0, 155: 2, 156: 0, 157: 0, 158: 0, 159: 0, 160: 0, 161: 0, 162: 2, 163: 0, 164: 0, 165: 0, 166: 0, 167: 0, 168: 0, 169: 2, 170: 0, 171: 0, 172: 0, 173: 0, 174: 0, 175: 0, 176: 2, "": 0, 181: 0, 182: 0, 183: 0, 184: 0, 185: 0, 186: 0, 187: 2, 188: 0, 189: 0, 190: 0, 191: 0, 192: 0, 193: 0, 194: 2, 195: 0 }, P: { 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0, 20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 0, 29: 0, 30: 0, 31: 0, 32: 0, 33: 0, 34: 0, 35: 1, 36: 0, 37: 0, 38: 0, 39: 1, 40: 0, 41: 0, 42: 0, 43: 0, 44: 1, 45: 0, 46: 0, 47: 0, 48: 0, 49: 1, 50: 0, 51: 0, 52: 0, 53: 0, 54: 1, 55: 0, 56: 0, 57: 0, 85: 0, 90: 0, 84: 0, 89: 0, 83: 0, 88: 0, 82: 1, 87: 1, 81: 0, 86: 0, 91: 0, 92: 1, 93: 0, 94: 0, 95: 0, 96: 0, 97: 1, 98: 0, 99: 0, 100: 0, 101: 1, 102: 1, 103: 1, 104: 1, 105: 1, 106: 1, 107: 1, 108: 1, 109: 1, 110: 1, 111: 0, 112: 0, 113: 1, 114: 1, 115: 0, 116: 0, 117: 0, 118: 1, 119: 0, 120: 0, 121: 0, 122: 0, 123: 1, 124: 0, 125: 0, 126: 0, 127: 0, 128: 0, 129: 0, 130: 0, 131: 0, 132: 0, 133: 0, 134: 0, 135: 0, 136: 0, 137: 0, 138: 0, 139: 0, 140: 0, 141: 0, 142: 0, 143: 0, 144: 0, 145: 0, 146: 0, 147: 0, 148: 0, 149: 0, 150: 1, 151: 0, 152: 0, 153: 0, 154: 0, 155: 0, 156: 0, 157: 1, 158: 0, 159: 0, 160: 0, 161: 0, 162: 0, 163: 0, 164: 1, 165: 0, 166: 0, 167: 0, 168: 0, 169: 0, 170: 0, 171: 1, 172: 0, 173: 0, 174: 0, 175: 0, 176: 0, "": 0, 181: 0, 182: 1, 183: 0, 184: 0, 185: 0, 186: 0, 187: 0, 188: 0, 189: 1, 190: 0, 191: 0, 192: 0, 193: 0, 194: 0, 195: 0 } }, R: { F: { 1: 1, 2: 2, 3: 1, 4: 2, 5: 2, 6: 2, 7: 2, 8: 2, 9: 2, 10: 2, 11: 2, 12: 2, 13: 2, 14: 2, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 0, 29: 1, 30: 1, 31: 1, 32: 1, 33: 0, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 1, 116: 1, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, B: { 1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 11: 1, 12: 1, 13: 1, 14: 1, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 0, 29: 1, 30: 1, 31: 1, 32: 1, 33: 0, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 1, 116: 1, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, T: { 1: 2, 2: 0, 3: 3, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 0, 29: 1, 30: 1, 31: 1, 32: 1, 33: 0, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 2, 116: 2, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, W: { 1: 3, 2: 0, 3: 4, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 0, 29: 1, 30: 1, 31: 1, 32: 1, 33: 0, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 3, 116: 3, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, A: { 1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 11: 1, 12: 1, 13: 1, 14: 1, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 1, 29: 1, 30: 1, 31: 1, 32: 1, 33: 1, 34: 1, 35: 1, 36: 1, 37: 1, 38: 1, 39: 1, 40: 1, 41: 1, 42: 1, 43: 1, 44: 1, 45: 1, 46: 1, 47: 1, 48: 1, 49: 1, 50: 1, 51: 1, 52: 1, 53: 1, 54: 1, 55: 1, 56: 1, 57: 1, 81: 1, 86: 1, 82: 1, 87: 1, 83: 1, 88: 1, 84: 1, 89: 1, 85: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 95: 1, 96: 1, 97: 1, 98: 1, 99: 1, 100: 1, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 1, 112: 1, 113: 0, 114: 0, 115: 1, 116: 1, 117: 1, 118: 1, 119: 1, 120: 1, 121: 1, 122: 1, 123: 1, 124: 1, 125: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 132: 1, 133: 1, 134: 1, 135: 1, 136: 1, 137: 1, 138: 1, 139: 1, 140: 1, 141: 1, 142: 1, 143: 1, 144: 1, 145: 1, 146: 1, 147: 1, 148: 1, 149: 1, 150: 1, 151: 1, 152: 1, 153: 1, 154: 1, 155: 1, 156: 1, 157: 1, 158: 1, 159: 1, 160: 1, 161: 1, 162: 1, 163: 1, 164: 1, 165: 1, 166: 1, 167: 1, 168: 1, 169: 1, 170: 1, 171: 1, 172: 1, 173: 1, 174: 1, 175: 1, 176: 1, "": 1, 181: 1, 182: 1, 183: 1, 184: 1, 185: 1, 186: 1, 187: 1, 188: 1, 189: 1, 190: 1, 191: 1, 192: 1, 193: 1, 194: 1, 195: 0 }, S: { 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0, 20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 1, 29: 0, 30: 0, 31: 0, 32: 0, 33: 2, 34: 0, 35: 0, 36: 0, 37: 1, 38: 0, 39: 0, 40: 0, 41: 1, 42: 0, 43: 0, 44: 0, 45: 0, 46: 1, 47: 0, 48: 0, 49: 0, 50: 0, 51: 1, 52: 0, 53: 0, 54: 0, 55: 0, 56: 1, 57: 0, 81: 0, 86: 0, 82: 0, 87: 0, 83: 0, 88: 0, 84: 1, 89: 1, 85: 0, 90: 0, 91: 0, 92: 0, 93: 0, 94: 1, 95: 0, 96: 0, 97: 0, 98: 0, 99: 1, 100: 0, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 0, 112: 0, 113: 0, 114: 0, 115: 0, 116: 0, 117: 0, 118: 0, 119: 0, 120: 0, 121: 1, 122: 0, 123: 0, 124: 0, 125: 0, 126: 1, 127: 0, 128: 0, 129: 0, 130: 0, 131: 0, 132: 0, 133: 0, 134: 0, 135: 0, 136: 0, 137: 0, 138: 0, 139: 0, 140: 0, 141: 0, 142: 0, 143: 0, 144: 0, 145: 0, 146: 0, 147: 0, 148: 0, 149: 0, 150: 0, 151: 0, 152: 0, 153: 0, 154: 0, 155: 1, 156: 0, 157: 0, 158: 0, 159: 0, 160: 0, 161: 0, 162: 1, 163: 0, 164: 0, 165: 0, 166: 0, 167: 0, 168: 0, 169: 1, 170: 0, 171: 0, 172: 0, 173: 0, 174: 0, 175: 0, 176: 1, "": 0, 181: 0, 182: 0, 183: 0, 184: 0, 185: 0, 186: 0, 187: 1, 188: 0, 189: 0, 190: 0, 191: 0, 192: 0, 193: 0, 194: 1, 195: 0 }, L: { 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0, 20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 1, 29: 1, 30: 1, 31: 1, 32: 1, 33: 2, 34: 0, 35: 0, 36: 0, 37: 1, 38: 0, 39: 0, 40: 0, 41: 1, 42: 0, 43: 0, 44: 0, 45: 0, 46: 1, 47: 0, 48: 0, 49: 0, 50: 0, 51: 1, 52: 0, 53: 0, 54: 0, 55: 0, 56: 1, 57: 0, 81: 0, 86: 0, 82: 0, 87: 0, 83: 0, 88: 0, 84: 1, 89: 1, 85: 0, 90: 0, 91: 0, 92: 0, 93: 0, 94: 1, 95: 0, 96: 0, 97: 0, 98: 0, 99: 1, 100: 0, 101: 0, 102: 0, 103: 0, 104: 0, 105: 0, 106: 0, 107: 0, 108: 0, 109: 0, 110: 0, 111: 0, 112: 0, 113: 0, 114: 0, 115: 0, 116: 0, 117: 0, 118: 0, 119: 0, 120: 0, 121: 1, 122: 0, 123: 0, 124: 0, 125: 0, 126: 1, 127: 0, 128: 0, 129: 0, 130: 0, 131: 0, 132: 0, 133: 0, 134: 0, 135: 0, 136: 0, 137: 0, 138: 0, 139: 0, 140: 0, 141: 0, 142: 0, 143: 0, 144: 0, 145: 0, 146: 0, 147: 0, 148: 0, 149: 0, 150: 0, 151: 0, 152: 0, 153: 0, 154: 0, 155: 1, 156: 0, 157: 0, 158: 0, 159: 0, 160: 0, 161: 0, 162: 1, 163: 0, 164: 0, 165: 0, 166: 0, 167: 0, 168: 0, 169: 1, 170: 0, 171: 0, 172: 0, 173: 0, 174: 0, 175: 0, 176: 1, "": 0, 181: 0, 182: 0, 183: 0, 184: 0, 185: 0, 186: 0, 187: 1, 188: 0, 189: 0, 190: 0, 191: 0, 192: 0, 193: 0, 194: 1, 195: 0 }, P: { 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0, 20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 0, 29: 0, 30: 0, 31: 0, 32: 0, 33: 0, 34: 0, 35: 1, 36: 0, 37: 0, 38: 0, 39: 1, 40: 0, 41: 0, 42: 0, 43: 0, 44: 1, 45: 0, 46: 0, 47: 0, 48: 0, 49: 1, 50: 0, 51: 0, 52: 0, 53: 0, 54: 1, 55: 0, 56: 0, 57: 0, 85: 0, 90: 0, 84: 0, 89: 0, 83: 0, 88: 0, 82: 1, 87: 1, 81: 0, 86: 0, 91: 0, 92: 1, 93: 0, 94: 0, 95: 0, 96: 0, 97: 1, 98: 0, 99: 0, 100: 0, 101: 1, 102: 1, 103: 1, 104: 1, 105: 1, 106: 1, 107: 1, 108: 1, 109: 1, 110: 1, 111: 0, 112: 0, 113: 1, 114: 1, 115: 0, 116: 0, 117: 0, 118: 1, 119: 0, 120: 0, 121: 0, 122: 0, 123: 1, 124: 0, 125: 0, 126: 0, 127: 0, 128: 0, 129: 0, 130: 0, 131: 0, 132: 0, 133: 0, 134: 0, 135: 0, 136: 0, 137: 0, 138: 0, 139: 0, 140: 0, 141: 0, 142: 0, 143: 0, 144: 0, 145: 0, 146: 0, 147: 0, 148: 0, 149: 0, 150: 1, 151: 0, 152: 0, 153: 0, 154: 0, 155: 0, 156: 0, 157: 1, 158: 0, 159: 0, 160: 0, 161: 0, 162: 0, 163: 0, 164: 1, 165: 0, 166: 0, 167: 0, 168: 0, 169: 0, 170: 0, 171: 1, 172: 0, 173: 0, 174: 0, 175: 0, 176: 0, "": 0, 181: 0, 182: 1, 183: 0, 184: 0, 185: 0, 186: 0, 187: 0, 188: 0, 189: 1, 190: 0, 191: 0, 192: 0, 193: 0, 194: 0, 195: 0 } } } Object.freeze(BaseInfo); class MapAnalyzer { width; height; terrain; bases; properties; //Array of Vector2i blockers = []; units; canvas; ctx; dirty; constructor(e = 0, t = 0) { this.canvas = document.createElement("canvas"), this.resize(e, t), this.dirty = !0 } resize(e, t) { return this.width = e, this.height = t, this.canvas.width = 16 * this.width, this.canvas.height = 16 * this.height, this.ctx = this.canvas.getContext("2d"), this.ctx.textAlign = "center", this.terrain = new Array(e * t), this.bases = {}, this.properties = new Array(e * t).fill(null), this.units = {}, this } init(e) { this.canvas.style = "\n pointer-events: none;\n z-index: 200;\n position: absolute;\n top: 0;\n left: 0;"; e = e ?? document.getElementById("gamemap"); if (e) { e.append(this.canvas); } this.ctx = this.canvas.getContext("2d"); this.ctx.font = "12px monospace"; this.ctx.textAlign = "center"; } idToCountry(e) { return BaseInfo.terrain[e].country } isNeutral(e) { return e >= 34 && e <= 37 } getTile(e, t) { return this.terrain[e + t * this.width] } setTile(e, t, n) { let i = e + t * this.width; return this.terrain[i] = n, this.dirty = !0, this } setBlocker(e, t) { let exists = this.blockers.find(b => { return b.x == e && b.y == t; }); if (exists) { let index = this.blockers.indexOf(exists); this.blockers.splice(index, 1); } else { let v = new Vector2i(); v.x = e; v.y = t; this.blockers.push(v); } this.dirty = !0; } setUnit(e, t, n, i) { this.units[e + t * this.width] = { x: e, y: t, id: n, country: i }, this.dirty = !0 } setUnits(e) { this.deleteAllUnits(); for (let t = 0; t < e.length; t++) { let n = e[t].units_x, i = e[t].units_y, o = e[t].units_id, r = e[t].units_code; this.setUnit(n, i, o, r) } } deleteUnit(e, t) { this.units[e + t * this.width] && (delete this.units[e + t * this.width], this.dirty = !0) } deleteAllUnits() { this.units = {}, this.dirty = !0 } swapSide() { let e = {}; for (let t of Object.keys(this.units)) { let n = this.units[t], i = this.width - 1 - n.x, o = this.height - 1 - n.y; e[i + o * this.width] = Object.assign(n, { x: i, y: o }) } this.dirty = !0, this.units = e } setTerrain({ terrainInfo: e, tiles: t } = {}) { if (this.dirty = !0, e) { for (let t in e) { t = parseInt(t); for (let n in e[t]) n = parseInt(n), this.terrain[t + n * this.width] = e[t][n].terrain_id } for (let e in buildingsInfo) { e = parseInt(e); for (let t in buildingsInfo[e]) t = parseInt(t), this.terrain[e + t * this.width] = buildingsInfo[e][t].terrain_id } } else { if (!t) throw new Error("give me some tiles bro"); for (let e = 0; e < this.width; e++) { for (let n = 0; n < this.height; n++) { const index = n + e * this.height; // Calculate index let is_prop = t[index] == null; if (is_prop) { continue; } const i = t[index].terrain_id; this.terrain[e + n * this.width] = i; } } } return this } getMoveCostGraph(e, j, c, t = "C") { let n = new Array(this.width * this.height); const i = BaseInfo.moveCosts[t][e]; for (let t = 0; t < this.height; t++) { for (let o = 0; o < this.width; o++) { // Vesper: Added code for the Bust Pipe Seam Function. // Should return move cost value like it was broken if bustPipes (j) is on. let r = this.terrain[o + t * this.width], a = i[r], bp = i[115]; let v = new Vector2i(o, t); let b = "S" === e || "L" === e; let s = 113 === r || 114 === r; void 0 === a && (a = b ? -1 : 1) if (0 === a && 195 !== r) { a = -1; } if (j && s && !b) { a = bp; } n[o + t * this.width] = a; if (c) { for (let vector of this.blockers) { if (vector.x == v.x && vector.y == v.y) n[o + t * this.width] = -1; } } } } return new WeightedDirectedGraph(n, this.width, this.height) } drawDistanceMap(e, t = 1 / 0, { showCost: n = !1, bgColor: i, bustPipes: j = !0, } = {}) { let o = Math.min(t, e.reduce(((e, t) => Math.max(e, t || 0)), 1)), r = this.ctx; for (let t = 0; t < this.height; t++) for (let a = 0; a < this.width; a++) { let s = e[a + t * this.width]; if (s >= 0 && s <= o) { if (i) { r.fillStyle = `rgba(${i}, 0.15)`, r.strokeStyle = `rgba(${i}, 0.7)`; } else { let e = Math.round(255 * s / o), t = Math.round(255 * (o - s) / o); r.fillStyle = `rgba(${e}, ${t}, 0, 0.15)`, r.strokeStyle = `rgba(${e}, ${t}, 0, 0.7)` } let id = this.terrain[a + t * this.width]; if ((id == 113 || id == 114) && j) { r.fillStyle = `rgba(255, 25, 25, 0.4)`, r.strokeStyle = `rgba(255, 25, 25, 0.8)`; } r.fillRect(16 * a, 16 * t, 16, 16), r.lineWidth = 1, r.strokeRect(16 * a, 16 * t, 16, 16), n && (this.setFont(), this.drawText(s, 16 * a + 8, 16 * t + 12)) } } return this.dirty = !1, this } async drawUnitTurns(e, t = 3, { showAllTurns: n = !0, showBg: i = !1, bustPipes: j = !0, blockers: b = !0, colorMode: o = "Heatmap" } = {}) { this.dirty = !1, t = Math.min(t, 20); const r = e[0].id, a = BaseInfo.units[r].move_type, s = parseInt(BaseInfo.units[r].move_points), l = BaseInfo.units[r].name, d = this.getMoveCostGraph(a, j, b), u = e, p = await loadImage(`terrain/aw1/${e[0].country}${l.toLowerCase().replace(" ","")}.gif`); let c = new Dijkstra(d, u, this.width, this.height).iterate(s); const y = this.ctx; if (i) { let n = !1; if ("Country" === o) { n = BaseInfo.countries[e[0].country].color } this.drawDistanceMap(c, t * s, { bustPipes: j, bgColor: n, blockers: b, }) } this.setFont(); for (let e = 0; e < this.height; e++) { for (let i = 0; i < this.width; i++) { let o = n ? 1 : t; for (; o <= t; o++) { let t = s * o; c[i + e * this.width] === t && (y.drawImage(p, 16 * i, 16 * e), n && this.drawText(`${o}`, 16 * i + 8, 16 * e + 12)) } } } } async drawBlockers() { let blockerImage = await loadImage("terrain/moveplanner.gif"); for (let position of this.blockers) { let imageX = position.x; let imageY = position.y; this.ctx.drawImage(blockerImage, 16 * imageX, 16 * imageY); } } clear() { return this.ctx.clearRect(0, 0, 16 * this.width, 16 * this.height), this } setFont() { return this.ctx.font = "12px monospace", this.ctx.textAlign = "center", this.ctx.strokeStyle = "black", this.ctx.lineWidth = 3, this.ctx.fillStyle = "white", this } drawText(e, t, n) { return this.ctx.strokeText(e, t, n), this.ctx.fillText(e, t, n), this } async drawFlow({ turns: e = 1, showAllTurns: t = !1, showBg: n = !0, bustPipes: j = !0, blockers: b = !0, enableBlockers: z = !0, colorMode: i = "Heatmap" } = {}) { this.dirty = !1; let o = Object.values(this.units); if (this.clear(), !o.length) return; let r = {}; for (let e = 0; e < o.length; e++) { let { id: t, country: n } = o[e]; r[n] || (r[n] = {}), r[n][t] || (r[n][t] = []), r[n][t].push(o[e]) } for (const o in r) for (const a in r[o]) await this.drawUnitTurns(r[o][a], e, { showAllTurns: t, showBg: n, bustPipes: j, blockers: b && z, colorMode: i }) } } class WeightedDirectedGraph { constructor(e, t, n) { this.data = e, this.width = t, this.height = n } get length() { return this.data.length } getWeight(e) { return this.data[e] } getXY(e, t) { return this.data[e + t * this.width] } getNeighbors(e, t) { if (!(e >= 0 && e < this.width && t >= 0 && t < this.height)) throw new Error(`Graph node {x: ${e}, y: ${t}} not in bounds ${this.width},${this.height}`); let n = []; return e - 1 >= 0 && n.push({ x: e - 1, y: t }), t - 1 >= 0 && n.push({ x: e, y: t - 1 }), e + 1 < this.width && n.push({ x: e + 1, y: t }), t + 1 < this.height && n.push({ x: e, y: t + 1 }), n } } class Dijkstra { constructor(e, t, n, i) { this.width = n, this.height = i, this.graph = e, this.start = [], this.distance = new Array(n * i).fill(void 0), t.forEach((e => { this.start.push({ x: e.x, y: e.y, dist: 0 }) })) } makeQueue() { return new TinyQueue([], ((e, t) => e.dist - t.dist)) } iterate(e) { let t = this.makeQueue(), n = new Array(this.width * this.height).fill(!1); this.start.forEach((e => { t.push(e), n[e.x + e.y * this.width] = !0 })); let i = 0, o = 1; for (; t.length > 0;) { let r = e * o, a = t; for (t = this.makeQueue(); a.length > 0;) { if (i++ > 2e6) return alert("@steve on discord, dijkstra got stuck."); let { x: e, y: o, dist: s } = a.pop(), l = e + o * this.width; this.distance[l] = s; let d = this.graph.getNeighbors(e, o); for (let i of d) { let s = i.x + i.y * this.width; const d = this.graph.getWeight(s); if (d >= 0) { let u = this.distance[l] + d; !n[s] && u > r ? t.push({ x: e, y: o, dist: r }) : (void 0 === this.distance[s] || u < this.distance[s]) && (a.push({ x: i.x, y: i.y, dist: u }), this.distance[s] = u, n[s] = !0) } else this.distance[s] = -1, n[s] = !0 } } o++ } return this.distance } } class Vector2i { constructor(x = 0, y = 0) { this.x = x; this.y = y; } x = 0; y = 0; } function initPrevmaps() { Vue.component("PrevMapAnalyzer", { template: `<div id='replay-misc-controls'> <div ref='openBtn' class='flex v-center' style='padding: 0px 5px; cursor: pointer; user-select: none;' @click='open = !open'> <img src='terrain/followlist.gif'/><b>Analyze</b> </div> <div v-show='open' class='flex col' :style="{ top: position.y + 'px', right: -position.x + 'px', zIndex: '1000', position: 'absolute'}"> <div class='bordertitle flex' style='color: #fff; background: #06c; border: 1px black solid; padding: 4px; justify-content: space-between; cursor: grab;' draggable="true" @dragstart="onDragStart" @dragend="onDragEnd"> <div style="font-weight: bold; display: block; float: left;">Map Analyzer - V5.3</div> <div style="cursor: pointer" @click="open = false"> <img width='16' src="terrain/close.png"/> </div> </div> <div :style="{ top: position.y + 'px', right: -position.x + 'px', background: '#fff', border: '1px black solid', padding: '4px' }"> <div> <button @click='toggleRendering("unitFlow")'> {{ activeMode == 'unitFlow' ? 'Hide' : 'Show' }} </button> Unit Flow </div> <div> <label> Turns: <input v-model.number='mode.unitFlow.turns' type='number' max='10' min='1' style='width:80px'/> </label> <button v-if='false' @click='swapSide()'>Swap</button> <br> <label> <input type='checkbox' v-model='mode.unitFlow.showAllTurns'/> <span> Show All Turns</span> </label> <br> <label> <input type='checkbox' v-model='mode.unitFlow.bustPipes'/> <span> Bust Pipe Seams</span> </label> <br> <label> <input type='checkbox' v-model='mode.unitFlow.enableBlockers'/> <span> Enable Blockers</span> </label> <div v-show='markingBlockers' @click='cancelNextPress()' style="margin-bottom: -10px; font-weight: bold; padding: 8px; background: #ff972b; border: 2px solid black"> Mark Blocker </div> <div v-show='!markingBlockers' @click='markNextPress()' style="margin-bottom: -10px; font-weight: bold; padding: 8px; background: #7ebeff;"> Mark Blocker </div> <br> <label> <input type='checkbox' v-model='mode.unitFlow.showBg'/> <span> Backdrop: </span> </label> <select v-model='mode.unitFlow.colorMode'> <option v-for='opt in colorModeOptions' :value='opt'>{{opt}}</option> </select> </div> <hr> <div style='width: 220px;'> <img v-for='cc in countries' style='width: 24px; margin: 1px; cursor: pointer;' @click='selectCountry(cc)' :src='"terrain/aw1/"+ cc +"logo.gif"' > </div> <div style='width: 210px;'> <img v-for='unit, id in BaseInfo.units' style='width:24px; cursor: pointer; margin: 4px;' :style='{border: id == selectedUnit ? "2px #2cf dashed" : "2px #ddd solid"}' @click='selectUnit(id)' :src='"terrain/aw1/"+ selectedCountry +unit.name.toLowerCase().replace(" ","") + ".gif"' > </div> <div> <button @click='deleteAllUnits()'>Clear</button> </div> </div> </div>`, props: { countries: Array }, data: function() { return { loaded: !1, open: !1, drawing: !1, dirty: !0, selectedUnit: 1, selectedCountry: this.countries[0], activeMode: "", markingBlockers: false, mode: { unitFlow: { turns: 1, showAllTurns: !1, showBg: !0, bustPipes: !0, enableBlockers: false, colorMode: "Country", }, capRoute: { turns: 1 }, }, colorModeOptions: ["Country", "Heatmap"], position: { x: 50, y: 100 }, offset: { x: 0, y: 0 }, } }, created() { this.BaseInfo = BaseInfo; let e = sessionStorage.analyzerSettings; e && (e = JSON.parse(e), this.mode = e), window.gameMap.addEventListener("click", (e => { if (!this.open) return; let { x: t, y: n } = function(e) { let t = window.gameMap.getBoundingClientRect(), n = Math.floor((e.clientX - t.left) / (16 * scale)), i = Math.floor((e.clientY - t.top) / (16 * scale)); return n = Math.max(0, Math.min(window.mapWidth - 1, n)), i = Math.max(0, Math.min(window.mapHeight - 1, i)), { x: n, y: i } }(e); if (!this.markingBlockers) this.setUnit(t, n); else this.setBlocker(t, n); })), window.addEventListener("keydown", (e => { e.repeat || ("ArrowRight" === e.key ? (e.preventDefault(), this.mode.unitFlow.turns = Math.min(10, Math.max(1, this.mode.unitFlow.turns + 1))) : "ArrowLeft" === e.key && (e.preventDefault(), this.mode.unitFlow.turns = Math.min(10, Math.max(1, this.mode.unitFlow.turns - 1)))) })), this.saveSettings = _.debounce((() => { sessionStorage.analyzerSettings = JSON.stringify(this.mode) }), 1500), this.$nextTick((() => this.loaded = !0)) }, computed: { unitNames() { return Object.values(this.BaseInfo.units).map((e => e.name.toLowerCase().replace(" ", ""))) }, predeployedUnits() { return Array.from(window.gameMap.querySelectorAll("span > img")).filter((e => { const t = e.src; for (const e of this.unitNames) if (t.includes(e + ".gif")) return !0; return !1 })) } }, watch: { open(e) { e ? (this.predeployedUnits.forEach((e => e.style.display = "none")), window.gameMap.style.cursor = "pointer") : (this.predeployedUnits.forEach((e => e.style.display = "")), window.gameMap.style.cursor = "default") }, mode: { handler() { this.dirty = !0, this.loaded && this.saveSettings() }, deep: !0 } }, methods: { onDragStart(event) { // Record the initial mouse position relative to the element this.offset.x = event.clientX - this.position.x; this.offset.y = event.clientY - this.position.y; }, onDragEnd(event) { // Update the position of the element based on the drag this.position.x = event.clientX - this.offset.x; this.position.y = event.clientY - this.offset.y; this.position.x = Math.max(-600, this.position.x); this.position.y = Math.max(0, this.position.y); }, markNextPress() { this.markingBlockers = true; }, cancelNextPress() { this.markingBlockers = false; }, setBlocker(e, t) { window.mapAnalyzer.setBlocker(e, t); }, setUnit(e, t) { window.mapAnalyzer.units[e + t * window.mapAnalyzer.width] ? window.mapAnalyzer.deleteUnit(e, t) : window.mapAnalyzer.setUnit(e, t, this.selectedUnit, this.selectedCountry), this.updateUnits() }, deleteAllUnits() { window.mapAnalyzer.deleteAllUnits(), this.updateUnits() }, updateUnits() { window.gameMap.querySelectorAll('[data-analyzer="unit"]').forEach((e => { e.remove() })); let e = window.mapAnalyzer.units; for (const t in e) { if (!e[t]) continue; let { x: n, y: i, id: o, country: r } = e[t], a = this.BaseInfo.units[o].name.toLowerCase().replace(" ", ""), s = document.createElement("img"); s.src = `terrain/aw1/${r}${a}.gif`, s.style.position = "absolute", s.style.left = 16 * n + "px", s.style.top = 16 * i + "px", s.style.zIndex = "120", s.dataset.analyzer = "unit", window.gameMap.append(s) } window.mapAnalyzer.drawBlockers(); }, selectUnit(e) { this.selectedUnit = e }, selectCountry(e) { this.selectedCountry = e }, async render(e) { window.mapAnalyzer.drawBlockers(); let t = this.activeMode; if (t) { if (window.mapAnalyzer.dirty || this.dirty) { this.dirty = !1 try { this.mode[t]; "unitFlow" === t ? await window.mapAnalyzer.drawFlow(this.mode[t]) : "capRoute" === t && window.mapAnalyzer.clear() } catch (e) { return console.log(e), cancelAnimationFrame(this.drawing), this.drawing = !1, window.mapAnalyzer.clear(), void alert("map analyzer broke") } } this.drawing = requestAnimationFrame(this.render) } }, toggleRendering(e) { cancelAnimationFrame(this.drawing), e === this.activeMode ? (this.drawing = !1, this.activeMode = "", window.mapAnalyzer.clear()) : (this.dirty = !0, this.activeMode = e, this.drawing = requestAnimationFrame(this.render)) }, swapSide() { window.mapAnalyzer.swapSide() } } }); let gameContainer = document.querySelector("#gamecontainer"); if (gameContainer == undefined) return; let extensionPanel = document.querySelector("#vesper-extensions"); if (extensionPanel == undefined) { extensionPanel = document.createElement("div"); extensionPanel.id = "vesper-extensions"; extensionPanel.style.background = '#98a0b8'; extensionPanel.style.border = '2px solid #768a96'; extensionPanel.style.display = 'flex'; extensionPanel.style.flexDirection = 'row'; extensionPanel.style.padding = '4px'; extensionPanel.style.margin = '0px'; extensionPanel.style.marginBottom = '8px'; gameContainer.children[1].after(extensionPanel); } let e = document.createElement("div"); e.id = "map-analyzer-component"; extensionPanel.append(e); let t = [], n = window.mapWidth, i = window.mapHeight; for (let e = 0; e < n; e++) for (let n = 0; n < i; n++) terrainInfo[e] && terrainInfo[e][n] ? t.push(terrainInfo[e][n]) : t.push(buildingsInfo[e][n]); let o = Object.keys(BaseInfo.countries).map((e => e)).sort(((e, t) => BaseInfo.countries[e].id - BaseInfo.countries[t].id)); window.mapAnalyzer = new MapAnalyzer, mapAnalyzer.init(), mapAnalyzer.resize(n, i), mapAnalyzer.setTerrain({ tiles: t }), window.analyzerComponent = new Vue({ el: "#map-analyzer-component", template: '<PrevMapAnalyzer :countries="countries"/>', data: function() { return { countries: o } } }) } function initEditmap() { Vue.component("EditMapAnalyzer", { template: `<div id='replay-misc-controls'> <div ref='openBtn' class='flex v-center' style='padding: 0px 5px; cursor: pointer; user-select: none;' @click='open = !open'> <img src='terrain/followlist.gif'/> <b>Analyze</b> </div> <div v-show='open' class='flex col' style='position: absolute; z-index:210; right: 212px;'> <div class='bordertitle flex' style='color: #fff; background: #06c; border: 1px black solid; padding: 4px; justify-content: space-between;'> <div style="font-weight: bold; display: block; float: left;">Map Analyzer - V5.2</div> <div style="cursor: pointer" @click="open = false"> <img width='16' src="terrain/close.png"/> </div> </div> <div style='background: #fff; border: 1px black solid; padding: 4px;'> <div> <button @click='toggleRendering("unitFlow")'> {{ activeMode == 'unitFlow' ? 'Hide' : 'Show' }} </button> Unit Flow </div> <div> <label> Turns <input v-model.number='mode.unitFlow.turns' type='number' max='10' min='1' style='width:80px'/> </label> <button v-if='false' @click='swapSide()'>Swap</button> <br> <label> <input type='checkbox' v-model='mode.unitFlow.showAllTurns'/> <span> Show All Turns</span> </label> <br> <label> <input type='checkbox' v-model='mode.unitFlow.bustPipes'/> <span> Bust Pipe Seams</span> </label> <br> <label> <input type='checkbox' v-model='mode.unitFlow.showBg'/> <span> Backdrop</span> </label> <select v-model='mode.unitFlow.colorMode'> <option v-for='opt in colorModeOptions' :value='opt'>{{opt}}</option> </select> </div> </div> </div> </div>`, props: {}, data: function() { return { loaded: !1, open: !1, drawing: !1, dirty: !0, activeMode: "", mode: { unitFlow: { turns: 1, showAllTurns: !1, showBg: !0, colorMode: "Country" }, capRoute: { turns: 1 } }, colorModeOptions: ["Country", "Heatmap"] } }, created() { let e = sessionStorage.analyzerSettings; e && (e = JSON.parse(e), this.mode = e), window.addEventListener("keydown", (e => { e.repeat || ("ArrowRight" === e.key ? (e.preventDefault(), this.mode.unitFlow.turns = Math.min(10, Math.max(1, this.mode.unitFlow.turns + 1))) : "ArrowLeft" === e.key && (e.preventDefault(), this.mode.unitFlow.turns = Math.min(10, Math.max(1, this.mode.unitFlow.turns - 1)))) })), this.saveSettings = _.debounce((() => { sessionStorage.analyzerSettings = JSON.stringify(this.mode) }), 1500), this.$nextTick((() => this.loaded = !0)) }, computed: {}, watch: { mode: { handler() { this.dirty = !0, this.loaded && this.saveSettings() }, deep: !0 } }, methods: { setUnit(e, t) { window.mapAnalyzer.units[e + t * window.mapAnalyzer.width] ? window.mapAnalyzer.deleteUnit(e, t) : window.mapAnalyzer.setUnit(e, t, this.selectedUnit, this.selectedCountry) }, deleteAllUnits() { window.mapAnalyzer.deleteAllUnits() }, async render(e) { let t = this.activeMode; if (t) { if (window.mapAnalyzer.dirty || this.dirty) { this.dirty = !1; try { let e = this.mode[t]; "unitFlow" === t ? await window.mapAnalyzer.drawFlow(e) : "capRoute" === t && window.mapAnalyzer.clear() } catch (e) { return console.log(e), cancelAnimationFrame(this.drawing), this.drawing = !1, window.mapAnalyzer.clear(), void alert("map analyzer broke") } } this.drawing = requestAnimationFrame(this.render) } }, toggleRendering(e) { cancelAnimationFrame(this.drawing), e === this.activeMode ? (this.drawing = !1, this.activeMode = "", window.mapAnalyzer.clear()) : (this.dirty = !0, this.activeMode = e, this.drawing = requestAnimationFrame(this.render)) }, swapSide() { window.mapAnalyzer.swapSide() } } }); let e = setInterval((() => { if (!designMapEditor.loaded) return; clearInterval(e), window.mapAnalyzer = new MapAnalyzer, mapAnalyzer.init(), mapAnalyzer.resize(designMapEditor.map.maxX, designMapEditor.map.maxY), mapAnalyzer.setTerrain({ tiles: designMapEditor.tiles }), mapAnalyzer.setUnits(designMapEditor.units); let t = designMapEditor.updateTile; designMapEditor.updateTile = function(e, n, i) { t.call(designMapEditor, e, n, i), "terrain" === designMapEditor.currentType || "building" === designMapEditor.currentType ? mapAnalyzer.setTile(n, i, e) : "unit" === designMapEditor.currentType ? mapAnalyzer.setUnit(n, i, e, designMapEditor.countryCode) : "delete" === designMapEditor.currentType && mapAnalyzer.deleteUnit(n, i) }; let n = designMapEditor.updateTerrainInfo; designMapEditor.updateTerrainInfo = function() { n.call(designMapEditor), mapAnalyzer.resize(designMapEditor.map.maxX, designMapEditor.map.maxY), mapAnalyzer.setTerrain({ tiles: designMapEditor.tiles }) }; let i = designMapEditor.fillMap; designMapEditor.fillMap = function(e) { i.call(designMapEditor, e), "unit" === designMapEditor.currentType ? mapAnalyzer.setUnits(designMapEditor.units) : "delete" === designMapEditor.currentType && mapAnalyzer.deleteAllUnits() }; let o = designMapEditor.resizeMap; designMapEditor.resizeMap = function(e, t) { o.call(designMapEditor, e, t), mapAnalyzer.setUnits(designMapEditor.units) }; let r = document.createElement("div"); r.id = "map-analyzer-component", document.getElementById("design-map-controls-container").children[0].append(r), window.analyzerComponent = new Vue({ el: "#map-analyzer-component", template: "<EditMapAnalyzer/>" }) }), 100) } async function loadThisShit() { "undefined" == typeof Vue && await loadScript("js/vue.js"), await loadScript("js/tinyqueue.js"), "undefined" == typeof _ && await loadScript("js/lodash.min.js"), window.location.pathname.match("prevmaps.php") ? initPrevmaps() : window.location.pathname.match("editmap.php") && initEditmap() } window.gameMap = document.getElementById("gamemap"), loadThisShit();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址