Skip to content

Commit

Permalink
For unknown reasons the vast majority of the files were uncommitted l…
Browse files Browse the repository at this point in the history
…ast time
  • Loading branch information
Shane Parker committed May 19, 2022
1 parent 132be41 commit 415b97c
Show file tree
Hide file tree
Showing 31 changed files with 110 additions and 83 deletions.
4 changes: 2 additions & 2 deletions campaign/4e/char_power.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Please see the license.html file included with this distribution for
<!--
Please see the license.html file included with this distribution for
attribution and copyright information.
-->

Expand Down
9 changes: 7 additions & 2 deletions campaign/4e/scripts/char_power.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

local fActivatePowerOriginal;
function onInit()
fActivatePowerOriginal = super.activatePower;
Expand Down Expand Up @@ -32,8 +37,8 @@ function activatePower()
rSource = rActor,
rPower = rPower
};

TriggerManager.fireEvent(
CharPowerTMT_4E.rPowerUsedEvent.sName,
CharPowerTMT_4E.rPowerUsedEvent.sName,
rEventData);
end
4 changes: 2 additions & 2 deletions campaign/5e/record_power.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Please see the license.html file included with this distribution for
<!--
Please see the license.html file included with this distribution for
attribution and copyright information.
-->

Expand Down
15 changes: 10 additions & 5 deletions campaign/5e/scripts/record_power.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

local fUsePowerOriginal;

function onInit()
Expand All @@ -11,7 +16,7 @@ end

function usePower(bShowFull)
fUsePowerOriginal(bShowFull);

local node = getDatabaseNode();

local charnode = node.getChild("...");
Expand All @@ -26,8 +31,8 @@ function usePower(bShowFull)
local sGroup = DB.getValue(node, "group", "");
local sRange = DB.getValue(node, "range", "");

local rPower = {
sName = sName,
local rPower = {
sName = sName,
nLevel = nLevel,
sSchool = sSchool,
sCastingTime = sCastingTime,
Expand All @@ -40,8 +45,8 @@ function usePower(bShowFull)
rSource = rActor,
rPower = rPower
};

TriggerManager.fireEvent(
CharDamageTMT_5E.rPowerUsedEvent.sName,
CharDamageTMT_5E.rPowerUsedEvent.sName,
rEventData);
end
4 changes: 4 additions & 0 deletions graphics/graphics_icons.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Please see the license.html file included with this distribution for
attribution and copyright information.
-->

<root>
<icon name="TriggerMeTimbers" file="graphics/icons/TriggerMeTimbers.png" />
Expand Down
4 changes: 2 additions & 2 deletions scripts/data_library_tmt.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

Expand Down
6 changes: 3 additions & 3 deletions scripts/data_trigger.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

Expand Down Expand Up @@ -54,7 +54,7 @@ function initializeConditions()
fCondition = isTarget,
aRequiredParameters = {"rTarget"}
};

-- TODO flesh out before re-enabling
-- TriggerManager.defineCondition(rIsSourceCondition);
-- TriggerManager.defineCondition(rIsTargetCondition);
Expand Down
4 changes: 2 additions & 2 deletions scripts/manager_action_attack_4e_tmt.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

Expand Down
4 changes: 2 additions & 2 deletions scripts/manager_action_attack_5e_tmt.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

Expand Down
6 changes: 3 additions & 3 deletions scripts/manager_action_damage_4e_tmt.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

Expand Down Expand Up @@ -71,6 +71,6 @@ function applyHpToCombatant(rTriggerData, rEventData)
end

table.insert(rAction.clauses, rHealClause);

ActionHeal.performRoll(nil, rActor, rAction)
end
7 changes: 3 additions & 4 deletions scripts/manager_action_damage_5e_tmt.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

Expand Down Expand Up @@ -226,7 +226,6 @@ end
function applyDamage(rSource, rTarget, bSecret, sDamage, nTotal)
rActiveSource = rSource;
rActiveTarget = rTarget;
initialHitPoints = getCurrentHitPoints(rTarget);
bPrepareForBeforeDamageEvent = true;
applyDamageOriginal(rSource, rTarget, bSecret, sDamage, nTotal);
end
Expand Down Expand Up @@ -319,7 +318,7 @@ function getWounds(rActor, sType, nodeActor)
return 0;
end

local nTotal, nWounds;
local nWounds;
if sType == "pc" then
nWounds = DB.getValue(nodeActor, "hp.wounds", 0);
else
Expand Down
15 changes: 9 additions & 6 deletions scripts/manager_actions_tmt.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

Expand All @@ -19,7 +19,7 @@ local resolveActionOriginal;
function onInit()
resolveActionOriginal = ActionsManager.resolveAction;
ActionsManager.resolveAction = resolveAction;

TriggerManager.defineEvent(rDiceRolledEvent);

initializeConditions();
Expand Down Expand Up @@ -93,7 +93,7 @@ function initializeConditions()
fCheckVisibility = checkAdvantageInclusionVisibility,
});
end

TriggerManager.defineCondition(rRollIsTypeCondition);
TriggerManager.defineCondition(rRollValueCondition);
end
Expand Down Expand Up @@ -189,7 +189,7 @@ function rollIsValue(rTriggerData, rEventData)
if not rTriggerData.bIncludeModifiers then
nTotal = nTotal - rEventData.rRoll.nMod;
end

bResult = TriggerData.resolveComparison(nTotal, rTriggerData.nCompareAgainst, rTriggerData.sComparison);
end

Expand All @@ -201,7 +201,7 @@ function rerollDice(rTriggerData, rEventData)
end

function replaceDice(rTriggerData, rEventData)
changeDice(rTriggerData, rEventData, "REPLACE", function(sDieType) return rTriggerData.sReplacement; end)
changeDice(rTriggerData, rEventData, "REPLACE", function() return rTriggerData.sReplacement; end)
end

function changeDice(rTriggerData, rEventData, sDisplay, fGetResult)
Expand Down Expand Up @@ -241,7 +241,10 @@ function changeDice(rTriggerData, rEventData, sDisplay, fGetResult)
local rDie = rEventData.rRoll.aDice[nIndex];
rEventData.rRoll.sDesc = rEventData.rRoll.sDesc .. " [" .. sDisplay .. " " .. rDie.result .. "]";
rDie.result = fGetResult(rDie.type);
rDie.value = rDie.result;
end

rEventData.rRoll.aDice.total = Utility.getDiceTotal(rEventData.rRoll.aDice);
end

function checkModifierInclusionVisibility(rConditionData)
Expand Down
4 changes: 2 additions & 2 deletions scripts/manager_campaigndata_tmt.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

Expand Down
6 changes: 3 additions & 3 deletions scripts/manager_char_4e_tmt.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

rPowerContainsDataCondition = nil;
rPowerUsedEvent = {
sName = "power_used_event",
aParameters = {
aParameters = {
"rSource",
"rPower"
};
Expand Down
6 changes: 3 additions & 3 deletions scripts/manager_char_5e_tmt.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

Expand All @@ -8,7 +8,7 @@ rPowerContainsDataCondition = nil;

rPowerUsedEvent = {
sName = "power_used_event",
aParameters = {
aParameters = {
"rSource",
"rPower"
};
Expand Down
4 changes: 2 additions & 2 deletions scripts/manager_chat_tmt.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

Expand Down
4 changes: 2 additions & 2 deletions scripts/manager_desktop_tmt.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

Expand Down
4 changes: 2 additions & 2 deletions scripts/manager_effect_tmt.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

Expand Down
13 changes: 6 additions & 7 deletions scripts/manager_trigger.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.txt file included with this distribution for
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--

Expand Down Expand Up @@ -32,7 +32,7 @@ function onActiveTriggerUpdated(nodeParent, bListchanged)
end

function onActiveTriggerDeleted(nodeToBeDeleted)
unregisterTrigger(nodeTrigger);
unregisterTrigger(nodeToBeDeleted);
end

function defineEvent(rEvent)
Expand Down Expand Up @@ -88,7 +88,7 @@ function getConditionDefinitions()
end

function getConditionDefinitionsForEvent(vEvent)
return getConditionDefinitionsForCommonEventParameters(getParametersForEvent(vEvent));
return getConditionDefinitionsForEventParameters(getParametersForEvent(vEvent));
end

function getConditionDefinitionsForEventParameters(aEventParameters)
Expand Down Expand Up @@ -140,7 +140,7 @@ function hasRequiredParameters(aRequiredParameters, aEventParameters)
end
end
return bHasRequirements;
end
end

function registerTrigger(nodeTrigger)
local rTrigger = loadTriggerFromNode(nodeTrigger);
Expand All @@ -161,7 +161,7 @@ function unregisterTrigger(nodeTrigger)
if not rTrigger then
return;
end

for sEventName,_ in pairs(rTrigger.tEventLists) do
local tEventTriggers = tRegisteredEventTriggers[sEventName];
if tEventTriggers then
Expand Down Expand Up @@ -206,7 +206,6 @@ function loadTriggerEventFromNode(nodeEvent)
end

function loadTriggerConditionFromNode(nodeCondition)
-- TODO invertibility
local rCondition = {
sName = DB.getValue(nodeCondition, "conditionname", "");
rData = loadParametersFromNode(nodeCondition),
Expand Down
4 changes: 4 additions & 0 deletions strings/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Please see the license.html file included with this distribution for
attribution and copyright information.
-->

<root>
<!-- TODO Ensure consistent description "voice" -->
Expand Down
10 changes: 5 additions & 5 deletions triggers/scripts/masterindextriggeritem_window.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.html file included with this distribution for
--
-- Please see the license.html file included with this distribution for
-- attribution and copyright information.
--

Expand All @@ -20,16 +20,16 @@ function setRecordType(sNewRecordType)
if m_sRecordType == sNewRecordType then
return;
end

m_sRecordType = sNewRecordType

local sRecordDisplayClass = LibraryData.getRecordDisplayClass(m_sRecordType, m_vNode);
local sPath = "";
if m_vNode then
sPath = m_vNode.getPath();
end
link.setValue(sRecordDisplayClass, sPath);

local sEmptyNameText = LibraryData.getEmptyNameText(m_sRecordType);
name.setEmptyText(sEmptyNameText);
end
Expand Down
4 changes: 2 additions & 2 deletions triggers/scripts/parameterlist.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.html file included with this distribution for
--
-- Please see the license.html file included with this distribution for
-- attribution and copyright information.
--

Expand Down
4 changes: 2 additions & 2 deletions triggers/scripts/tooltipcombobox.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Please see the license.html file included with this distribution for
--
-- Please see the license.html file included with this distribution for
-- attribution and copyright information.
--

Expand Down

0 comments on commit 415b97c

Please sign in to comment.