-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New component: Limit resting mechanic
#117 manual addition
- Loading branch information
Showing
9 changed files
with
174 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@0 = "Tweaks Anthology: The Party can rest at most once per day" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@0 = "Tweaks Anthology: Il Gruppo pu� riposare al massimo una volta al giorno" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ | ||
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ | ||
///// \\\\\ | ||
///// Limit resting mechanic \\\\\ | ||
///// \\\\\ | ||
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ | ||
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ | ||
|
||
WITH_SCOPE BEGIN | ||
INCLUDE "cdtweaks\luke\misc.tph" | ||
// | ||
INCLUDE "cdtweaks\lib\limit_resting_mechanic.tph" | ||
// | ||
WITH_TRA "cdtweaks\languages\english\limit_resting_mechanic.tra" "cdtweaks\languages\%LANGUAGE%\limit_resting_mechanic.tra" BEGIN | ||
LAF "LIMIT_RESTING_MECHANIC" END | ||
END | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
DEFINE_ACTION_FUNCTION "LIMIT_RESTING_MECHANIC" | ||
BEGIN | ||
OUTER_SET "feedback_strref" = RESOLVE_STR_REF (@0) | ||
// | ||
LAF "APPEND_LUA_FUNCTION" STR_VAR "description" = "Misc Tweaks (Rule Changes)" "sourceFileSpec" = "cdtweaks\luke\lua\rule_changes\limit_resting_mechanic.lua" "destRes" = "m_gtrule" END | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--[[ | ||
+------------------------------------------------------------------------------+ | ||
| cdtweaks, Limit resting mechanic (at most once every 24 in-game hours) | | ||
+------------------------------------------------------------------------------+ | ||
| scripted resting will not be blocked; however, it will still reset the timer | | ||
+------------------------------------------------------------------------------+ | ||
--]] | ||
|
||
EEex_Action_AddSpriteStartedActionListener(function(sprite, action) | ||
if sprite.m_typeAI.m_EnemyAlly == 2 and action.m_actionID == 96 then -- if [PC] and "Rest()" | ||
sprite:applyEffect({ | ||
["effectID"] = 0x141, -- Remove effects by resource (321) | ||
["res"] = "GTRULE01", | ||
["sourceID"] = sprite.m_id, | ||
["sourceTarget"] = sprite.m_id, | ||
}) | ||
-- | ||
sprite:applyEffect({ | ||
["effectID"] = 0x152, -- Disable rest or save (338) | ||
["effectAmount"] = %feedback_strref%, | ||
["duration"] = 7200, | ||
["m_sourceRes"] = "GTRULE01", | ||
["sourceID"] = sprite.m_id, | ||
["sourceTarget"] = sprite.m_id, | ||
}) | ||
end | ||
end) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters