diff --git a/src/attrib/config.ts b/src/attrib/config.ts index 77a9e0071..b1bd7a324 100644 --- a/src/attrib/config.ts +++ b/src/attrib/config.ts @@ -290,8 +290,6 @@ export const ignoreForNow: (string | ((file: string) => boolean))[] = [ "upgrade_landmark_siege_works", "unit_siege_tower_3_eng", - "unit_abbey_king_free_2", //free king on abbey completion - "_tanegashima_4_jpn", "upgrade_econ_resource_wood_harvest_rate_1_kura_jpn", "upgrade_econ_resource_wood_harvest_rate_2_kura_jpn", diff --git a/src/attrib/workarounds.ts b/src/attrib/workarounds.ts index eed4cabfb..651aaefce 100644 --- a/src/attrib/workarounds.ts +++ b/src/attrib/workarounds.ts @@ -1572,6 +1572,18 @@ workaround("HRE Civ Bonus: 'Cost of emplacements on Outposts, Wall Towers, and K }, }); +workaround("Differentiate Free King from Trainable King", { + predicate: (item) => item.type === "unit" && item.attribName === "unit_abbey_king_free_2", + mutator: (item) => { + item.baseId = "king-free"; + item.id = `${item.baseId}-${item.age}`; + item.name = "King (Free)"; + item.description += "\n\nAutomatically spawned when Abbey of Kings is completed."; + item.costs = { food: 0, wood: 0, stone: 0, gold: 0, vizier: 0, oliveoil: 0, total: 0, time: 0, popcap: 1 }; + }, +}); + + const MILITIA_COSTS = generateCosts({ food: 20 }); function discountCosts(costs: Item["costs"], discount: number) { diff --git a/units/english/king-free-2.json b/units/english/king-free-2.json new file mode 100644 index 000000000..2d46441a9 --- /dev/null +++ b/units/english/king-free-2.json @@ -0,0 +1,131 @@ +{ + "id": "king-free-2", + "baseId": "king-free", + "type": "unit", + "name": "King (Free)", + "pbgid": 2161903, + "attribName": "unit_abbey_king_free_2", + "age": 2, + "civs": [ + "en" + ], + "description": "A mighty King, a powerful heavy cavalry unit. Heals nearby out of combat units by 2 health every 1 seconds.\n+ Heavy armor\n+ Strong in melee combat\n- Countered by Spearmen and Crossbowmen\n\nAutomatically spawned when Abbey of Kings is completed.", + "classes": [ + "heavy", + "melee", + "cavalry" + ], + "displayClasses": [ + "Heavy Melee Cavalry" + ], + "unique": true, + "costs": { + "food": 0, + "wood": 0, + "stone": 0, + "gold": 0, + "vizier": 0, + "oliveoil": 0, + "total": 0, + "time": 0, + "popcap": 1 + }, + "producedBy": [ + "abbey-of-kings" + ], + "icon": "https://data.aoe4world.com/images/units/king-2.png", + "hitpoints": 220, + "weapons": [ + { + "name": "Great Sword", + "type": "melee", + "damage": 16, + "speed": 2.375, + "range": { + "min": 0, + "max": 0.295 + }, + "modifiers": [], + "durations": { + "aim": 0, + "windup": 0.5, + "attack": 0.125, + "winddown": 0.75, + "reload": 0, + "setup": 0, + "teardown": 0, + "cooldown": 1 + }, + "attribName": "weapon_abbey_king_axe_eng", + "pbgid": 2104834 + }, + { + "name": "Torch", + "type": "fire", + "damage": 10, + "speed": 2.125, + "range": { + "min": 0, + "max": 1.25 + }, + "modifiers": [], + "durations": { + "aim": 0, + "windup": 0.75, + "attack": 0.125, + "winddown": 0, + "reload": 0, + "setup": 0, + "teardown": 0, + "cooldown": 1.25 + }, + "attribName": "weapon_torch", + "pbgid": 123518 + }, + { + "name": "Lance", + "type": "melee", + "damage": 24, + "speed": 0.525, + "range": { + "min": 0, + "max": 1.0375 + }, + "modifiers": [], + "durations": { + "aim": 0, + "windup": 0, + "attack": 0.125, + "winddown": 0, + "reload": 0, + "setup": 0, + "teardown": 0, + "cooldown": 0.4 + }, + "attribName": "weapon_abbey_king_charge_eng", + "pbgid": 2104855 + } + ], + "armor": [ + { + "type": "melee", + "value": 2 + }, + { + "type": "ranged", + "value": 2 + } + ], + "sight": { + "inner_height": 10, + "inner_radius": 4, + "outer_height": -15, + "outer_radius": 28, + "base": 13.6, + "line": 28, + "height": 10 + }, + "movement": { + "speed": 1.6875 + } +} \ No newline at end of file