From e999e05ddcc290980b59a28823ab793d56d292d2 Mon Sep 17 00:00:00 2001 From: Dylan <28832631+DARwins1@users.noreply.github.com> Date: Tue, 20 Aug 2024 00:16:08 -0700 Subject: [PATCH] the fixening - Fixed Resistance not actually focusing on the first Royalist outpost like they're SUPPOSED to - Fixed the bunkers around the first Royalist outpost not properly disappearing on difficulties below Hard - Updated mod-info.json --- mod-info.json | 4 ++-- script/campaign/kingdom.js | 16 ++-------------- script/campaign/kingdomprogression.js | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/mod-info.json b/mod-info.json index e53a27e..a5a1c9c 100644 --- a/mod-info.json +++ b/mod-info.json @@ -1,10 +1,10 @@ { "name": "Fractured Kingdom", - "version": "1.2.0", + "version": "1.3.0", "author": "DARwins", "type": "alternateCampaign", "license": "GPL-2.0-or-later", - "minVersionSupported": "4.4.2", + "minVersionSupported": "4.5.2", "maxVersionTested": "4.5.2", "description": { "en": "After crash-landing in the territory of a once powerful kingdom, you must navigate your way through the various factions fighting over what remains. Can you prevail against the odds, facing relentless foes, and see this story to its end?" diff --git a/script/campaign/kingdom.js b/script/campaign/kingdom.js index 00a82fe..00e76fe 100644 --- a/script/campaign/kingdom.js +++ b/script/campaign/kingdom.js @@ -973,7 +973,7 @@ function eventAttacked(victim, attacker) camManageGroup(commander.group, CAM_ORDER_ATTACK, { targetPlayer: targetPlayer, radius: ATTACK_RADIUS, - pos: pos, + pos: attackPos, repair: 65 }); } @@ -984,7 +984,7 @@ function eventAttacked(victim, attacker) groupInfo.data = { targetPlayer: targetPlayer, radius: ATTACK_RADIUS, - pos: pos, + pos: attackPos, repair: 65 }; manageGroupBySize(groupInfo, false); @@ -2056,18 +2056,6 @@ function eventStartLevel() camUpgradeOnMapStructures("GuardTower2", "GuardTower1", CAM_HELLRAISERS); camUpgradeOnMapStructures("PillBox2", "PillBox1", CAM_HELLRAISERS); } - if (difficulty < HARD) - { - // Remove HMG bunkers around the first Royalist outpost on difficulties below Hard - const structs = enumArea("southFOB", CAM_ROYALISTS, false); - for (const struct of structs) - { - if (struct.name === _("Collective Heavy Machinegun Bunker")) - { - camSafeRemoveObject(struct); - } - } - } initializeGameInfo(); diff --git a/script/campaign/kingdomprogression.js b/script/campaign/kingdomprogression.js index 30d9279..7228abd 100644 --- a/script/campaign/kingdomprogression.js +++ b/script/campaign/kingdomprogression.js @@ -724,6 +724,21 @@ function expandMap() camEnableFactory("royalistPortFactory"); camEnableFactory("royalistHelRepCybFactory"); + if (difficulty < HARD) + { + // Remove HMG bunkers around the first Royalist outpost on difficulties below Hard + const structs = enumArea("southFOB", CAM_ROYALISTS, false).filter(function(obj) { + return (obj.type === STRUCTURE); + }); + for (const struct of structs) + { + if (struct.name === _("Collective Heavy Machinegun Bunker")) + { + camSafeRemoveObject(struct); + } + } + } + // Add a guide entry on the Resistance queue("camAddResistanceTopics", camSecondsToMilliseconds(4)); }