Skip to content

Commit

Permalink
5.3.8
Browse files Browse the repository at this point in the history
- map chance logic stuff
- remove contour of traded hostages and make them invulnerable
- fix hostage situation desc
  • Loading branch information
nikitawastaken authored Oct 31, 2023
1 parent 01dfa58 commit c2941a2
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 2 deletions.
10 changes: 10 additions & 0 deletions lua/coplogictrade.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- Remove contour from traded hostages and make them invulnerable
Hooks:PostHook(CopLogicTrade, "on_trade", "sh_on_trade", function(data)
if not data.internal_data.fleeing then
return
end

data.unit:character_damage():set_invulnerable(true)
data.unit:network():send("set_unit_invulnerable", true, data.unit:character_damage()._immortal)
data.unit:contour():remove("hostage_trade", true)
end)
6 changes: 6 additions & 0 deletions lua/missionmanager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ Hooks:PreHook(MissionManager, "_activate_mission", "sh__activate_mission", funct
for k, v in pairs(data.values) do
element._values[k] = v
StreamHeist:log(string.format('%s value "%s" has been set to "%s"', element:editor_name(), k, tostring(v)))

if k == "chance" then
if element.chance_operation_set_chance then
element:chance_operation_set_chance(v)
end
end
end
end

Expand Down
1 change: 1 addition & 0 deletions lua/upgradestweakdata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ function UpgradesTweakData:init(tweak_data)
hostage_absorption_limit = 4,
}
self.skill_descs.stockholm_syndrome.multibasic = "2"
self.skill_descs.stockholm_syndrome.multipro = "4"
self.skill_descs.stockholm_syndrome.multipro2 = "4"

-- Hostage Taker
Expand Down
2 changes: 1 addition & 1 deletion meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"ident": "eclipse_difficulty",
"version": "5.3.7",
"version": "5.3.8",
"patchnotes_url": "https://github.com/mrcreepysos/Eclipse-Difficulty/commits/main",
"download_url": "https://github.com/mrcreepysos/Eclipse-Difficulty/archive/refs/heads/main.zip"
}
Expand Down
2 changes: 1 addition & 1 deletion mod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"contact" : "nikita_was_taken on Discord",
"image" : "mod.png",
"blt_version" : 2,
"version" : "5.3.7",
"version" : "5.3.8",
"updates" : [{
"identifier" : "eclipse_difficulty",
"host" : { "meta" : "https://raw.githubusercontent.com/mrcreepysos/Eclipse-Difficulty/main/meta.json" }
Expand Down
1 change: 1 addition & 0 deletions supermod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
<post :hook_id="coplogicattack"/>
<post :hook_id="coplogicbase"/>
<post :hook_id="coplogicidle"/>
<post :hook_id="coplogictrade"/>
<post :hook_id="coplogicinactive"/>
<post :hook_id="coplogicintimidated"/>
<post :hook_id="coplogicsniper"/>
Expand Down

0 comments on commit c2941a2

Please sign in to comment.