sync arcane/ritual AccuExtSL
This commit is contained in:
@@ -42248,9 +42248,6 @@ on('clicked:repeating_spellbookarcane:spellcast clicked:repeating_spellbookarcan
|
||||
|
||||
let rollBegins = '@{Whisper} &{template:whfrp2e}';
|
||||
|
||||
console.log(" TEST ");
|
||||
console.log(cnlore);
|
||||
|
||||
let rollDmg = rollDmgPart.replaceAll('prefix2-', `${prefix}`);
|
||||
let rollPart = roll.replaceAll('Accu-', accumod).replaceAll('prefix2-', `${prefix}`).replaceAll('[cnlore]', cnlore);
|
||||
|
||||
@@ -42284,8 +42281,6 @@ on('clicked:repeating_spellbookarcane:spellcast clicked:repeating_spellbookarcan
|
||||
if (lore === 7) {if (v.Talent_SuffusedWithShiyshLvl == 1) {suffadd = 1; lorecomp = 7;} else {suffadd = 0; lorecomp = 0;}}
|
||||
if (lore === 8) {if (v.Talent_SuffusedWithAzyrLvl == 1) {suffadd = 1; lorecomp = 8;} else {suffadd = 0; lorecomp = 0;}}
|
||||
|
||||
console.log(lore);
|
||||
console.log(lorecomp);
|
||||
|
||||
setAttrs({
|
||||
"LastRollAccuExtSL": accuchanexlsl,
|
||||
@@ -42330,9 +42325,6 @@ on('clicked:repeating_spellbookarcane:spellcast clicked:repeating_spellbookarcan
|
||||
{
|
||||
output[`repeating_spellbookarcane_${id}_spellchannelsl`] = 0, setAttrs(output, {silent: true})
|
||||
|
||||
console.log("check");
|
||||
console.log(v[`repeating_spellbookarcane_${id}_UsedSpell1`]);
|
||||
|
||||
if(v[`repeating_spellbookarcane_${id}_UsedSpell1`] === 1)
|
||||
{
|
||||
setAttrs({
|
||||
@@ -42357,6 +42349,22 @@ on('clicked:repeating_spellbookarcane:spellcast clicked:repeating_spellbookarcan
|
||||
});
|
||||
|
||||
});
|
||||
getSectionIDs("repeating_spellbookrituals", function (ids) {
|
||||
// create an object to hold all the attributes we are bout to change
|
||||
const output = {};
|
||||
// loop through the row ids
|
||||
ids.forEach(id => {
|
||||
|
||||
getAttrs([`repeating_spellbookrituals_${id}_MagicLore`], function(v) {
|
||||
|
||||
if(v[`repeating_spellbookrituals_${id}_MagicLore`] == lore)
|
||||
{
|
||||
output[`repeating_spellbookrituals_${id}_spellchannelsl`] = 0, setAttrs(output, {silent: true})
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -42370,7 +42378,7 @@ on('clicked:repeating_spellbookarcane:spellcast clicked:repeating_spellbookarcan
|
||||
|
||||
|
||||
on('clicked:repeating_spellbookarcane:extchannellingloreroll', (eventInfo) => {
|
||||
getAttrs(["initiative_houserule", "WillPowerBonus"], function(v) {
|
||||
getAttrs(["initiative_houserule"], function(v) {
|
||||
|
||||
let roll = '{{test=[[@{roll_rule}]]}} {{sl=[[0 [Roll SL]]]}} {{slbonus=[[@{Talent_AethyricAttunementLvl} [SL TOTAL]]]}} {{slbonusatk=[[@{slbonusChannel}]]}} {{sladd=[[0]]}} {{modvalue=[[?{Channeling Roll Modifier|@{prefix2-_ChanMod}}]]}} {{title=^{EXTENDED-CHANNELLING-TEST}}} {{skill=^{ADVANCED-SKILL}}}} {{unconscious=[[@{UnconsciousMod}]]}} {{cond=[[@{condgen_see}-@{DrunkMod}]]}} {{drunk=[[@{DrunkMod}]]}} {{fatigued=[[@{FatiguedMod}]]}} {{broken=[[@{BrokenMod}]]}} {{stuned=[[@{StunedMod}]]}} {{poisoned=[[@{PoisonedMod}]]}} {{prone=[[@{ProneMod}]]}} {{entangled=[[@{EntangledMod}]]}} {{blinded=[[@{BlindedMod}]]}} {{deafened=[[0]]}} {{character_name=@{character_name}}} {{target=[[ [[(@{condgen_see}*-1)]] [COND] + @{prefix2-_ExtChannellingLore} [SKILL] + ?{Channeling Roll Modifier|0} [MOD] ]]}} {{skilltest=true}} {{accuchanexlsl=[[?{Accumulated Extended Channelling SL (Start at 0)|@{prefix2-_spellchannelsl}}}} {{SLmod=[[?{SL Modifier|0}]]]]}} {{SLmod=[[?{SL Modifier|0}]]}} {{rolltype=[[9]]}} {{lore=[[@{prefix2-_MagicLore}]]}} {{robes=[[@{Used_Wizard_Robes}]]}} {{mod1type=[[@{prefix2-_ExtChannellingLoreRoll_modtype1}]]}} {{mod1=@{prefix2-_ExtChannellingLoreRoll_mod1}}} {{mod2type=[[@{prefix2-_ExtChannellingLoreRoll_modtype2}]]}} {{mod2=@{prefix2-_ExtChannellingLoreRoll_mod2}}} {{mod3type=[[@{prefix2-_ExtChannellingLoreRoll_modtype3}]]}} {{mod3=@{prefix2-_ExtChannellingLoreRoll_mod3}}} {{NPC=[[0]]}} {{RTminor=@{RT-minor}}} {{RTmajor=@{RT-major}}} {{reroll=[1](~@{character_name}|prefix2-_extchannellingloreroll)}} {{sptal1=[[@{Talent_AethyricAttunementLvl}]]}} {{testoutcome=[[0]]}}';
|
||||
var trigger = eventInfo.triggerName.slice(8);
|
||||
@@ -42450,7 +42458,7 @@ on('clicked:repeating_spellbookarcane:extchannellingloreroll', (eventInfo) => {
|
||||
// loop through the row ids
|
||||
ids.forEach(id => {
|
||||
|
||||
getAttrs([`repeating_spellbookarcane_${id}_MagicLore`, `repeating_spellbookarcane_${id}_UsedSpell1`, `repeating_spellbookarcane_${id}_UsedSpell2`, `repeating_spellbookarcane_${id}_UsedSpell3`], function(v) {
|
||||
getAttrs([`repeating_spellbookarcane_${id}_MagicLore`, `repeating_spellbookarcane_${id}_UsedSpell1`, `repeating_spellbookarcane_${id}_UsedSpell2`, `repeating_spellbookarcane_${id}_UsedSpell3`, "WillPowerBonus"], function(v) {
|
||||
|
||||
if(v[`repeating_spellbookarcane_${id}_MagicLore`] == lore)
|
||||
{
|
||||
@@ -42460,7 +42468,6 @@ on('clicked:repeating_spellbookarcane:extchannellingloreroll', (eventInfo) => {
|
||||
|
||||
output[`repeating_spellbookarcane_${id}_spellchannelsl`] = extslout, setAttrs(output, {silent: true})
|
||||
|
||||
|
||||
if(v[`repeating_spellbookarcane_${id}_UsedSpell1`] === 1)
|
||||
{
|
||||
setAttrs({
|
||||
@@ -42487,6 +42494,29 @@ on('clicked:repeating_spellbookarcane:extchannellingloreroll', (eventInfo) => {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
getSectionIDs("repeating_spellbookrituals", function (ids) {
|
||||
// create an object to hold all the attributes we are bout to change
|
||||
const output = {};
|
||||
// loop through the row ids
|
||||
ids.forEach(id => {
|
||||
|
||||
getAttrs([`repeating_spellbookrituals_${id}_MagicLore`, "WillPowerBonus"], function(v) {
|
||||
|
||||
if(v[`repeating_spellbookrituals_${id}_MagicLore`] == lore)
|
||||
{
|
||||
extslout = accuchanexlsl + extsl;
|
||||
if (extslout < 0) {extslout = 0;}
|
||||
|
||||
if (chancrit === 1) {extslout += v.WillPowerBonus;}
|
||||
|
||||
output[`repeating_spellbookrituals_${id}_spellchannelsl`] = extslout, setAttrs(output, {silent: true})
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
@@ -42524,11 +42554,33 @@ on('clicked:repeating_spellbookarcane:channelreset', (eventInfo) => {
|
||||
if(v[`repeating_spellbookarcane_${id}_MagicLore`] == lore)
|
||||
{
|
||||
output2[`repeating_spellbookarcane_${id}_spellchannelsl`] = 0, setAttrs(output2, {silent: true})
|
||||
|
||||
getSectionIDs("repeating_spellbookrituals", function (ids) {
|
||||
// create an object to hold all the attributes we are bout to change
|
||||
const output = {};
|
||||
const output2 = {};
|
||||
// loop through the row ids
|
||||
ids.forEach(id => {
|
||||
|
||||
|
||||
getAttrs([`repeating_spellbookrituals_${id}_MagicLore`], function(v) {
|
||||
|
||||
if(v[`repeating_spellbookrituals_${id}_MagicLore`] == lore)
|
||||
{
|
||||
output2[`repeating_spellbookrituals_${id}_spellchannelsl`] = 0, setAttrs(output2, {silent: true})
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -42574,23 +42626,13 @@ on('clicked:repeating_spellbookrituals:spellcast clicked:repeating_spellbookrit
|
||||
if (etest === e2test) {cnlore += 1;}
|
||||
if (etest === 14) {cnlore += 1;}
|
||||
|
||||
|
||||
console.log(etest);
|
||||
console.log(e2test);
|
||||
|
||||
|
||||
let roll = '{{sl=[[0 [Roll SL]]]}} {{slbonus=[[@{Talent_InstinctiveDictionLvl}+@{Talent_PerfectPitchLvl} [SL TOTAL]]]}} {{slbonusatk=[[@{slbonusCast}]]}} {{sladd=[[0]]}} {{modvalue=[[?{@{translation_modifier}|@{prefix2-_SpellMod}}]]}} {{accuchanexlsl=[[Accu-]]}} {{title=@{prefix2-_spellname}}} {{character_name=@{character_name}}} {{advantage=[[@{Advantage}*10*@{Advantage_casting}]]}} {{unconscious=[[@{UnconsciousMod}]]}} {{cond=[[@{condgen_see}-@{DrunkMod}]]}} {{drunk=[[@{DrunkMod}]]}} {{fatigued=[[@{FatiguedMod}]]}} {{broken=[[@{BrokenMod}]]}} {{stuned=[[@{StunedMod}]]}} {{poisoned=[[@{PoisonedMod}]]}} {{prone=[[@{ProneMod}]]}} {{entangled=[[@{EntangledMod}]]}} {{blinded=[[@{BlindedMod}]]}} {{deafened=[[0]]}} {{spelltype=^{RITUALS}}} {{target=[[ [[(@{condgen_see}*-1)]] [COND] + [[{@{LangMagick}}]] [SKILL] + ?{@{translation_modifier}|0} [MOD] + [[@{Advantage}*10*@{Advantage_casting}]] [ADV] ]]}} {{consequence=@{prefix2-_ritualcons}}} {{spelldescription=@{prefix2-_spelldesc}}} {{test=[[@{roll_rule}]]}} {{SLmod=[[?{SL Modifier|0}]]}} {{spelltest=[[1d10]]}} {{arcanetest=true}} {{rolltype=[[6]]}} {{spellcastingnumber=[[@{prefix2-_spellcastingnumber}-[cnlore]+(3*(@{prefix2-_spellcastingnumber}*((@{prefix2-_Spellmem}-1)*-1)))]]}} {{mod1type=[[@{prefix2-_ArcaneSpell_modtype1}]]}} {{mod1=@{prefix2-_ArcaneSpell_mod1}}} {{mod2type=[[@{prefix2-_ArcaneSpell_modtype2}]]}} {{mod2=@{prefix2-_ArcaneSpell_mod2}}} {{mod3type=[[@{prefix2-_ArcaneSpell_modtype3}]]}} {{mod3=@{prefix2-_ArcaneSpell_mod3}}} {{NPC=[[0]]}} {{RTminor=@{RT-minor}}} {{RTmajor=@{RT-major}}} {{RTgrim=@{RT-grim}}} {{sptal2=[[@{Talent_InstinctiveDictionLvl}]]}} {{sptal3=[[@{Talent_PerfectPitchLvl}]]}} {{sptal23=[[@{Talent_InstinctiveandPitch}]]}} {{spellmem=[[@{prefix2-_Spellmem}]]}} {{lore=[[@{prefix2-_MagicLore}]]}} {{usedenchstaff=[[@{prefix2-_Used_Enchanted_Staff_show}]]}} {{cnsl=[[?{Accumulated Extended Channelling SL (Start at 0)|@{prefix2-_spellchannelsl}}-(@{prefix2-_spellcastingnumber}+(@{prefix2-_spellcastingnumber}*((@{prefix2-_Spellmem}-1)*-1)))]]}} {{testoutcome=[[0]]}}';
|
||||
|
||||
let rollBegins = '@{Whisper} &{template:whfrp2e}';
|
||||
|
||||
console.log(trigger);
|
||||
console.log(skill);
|
||||
console.log(accumod);
|
||||
|
||||
let rollDmg = rollDmgPart.replaceAll('prefix2-', `${prefix}`);
|
||||
let rollPart = roll.replaceAll('Accu-', accumod).replaceAll('prefix2-', `${prefix}`).replaceAll('[cnlore]', cnlore);
|
||||
|
||||
|
||||
console.log(rollPart);
|
||||
|
||||
startRoll(rollBegins + rollPart + rollDmg, (results) => {
|
||||
@@ -42643,6 +42685,23 @@ on('clicked:repeating_spellbookrituals:spellcast clicked:repeating_spellbookrit
|
||||
|
||||
const playerclickedid = eventInfo.sourceAttribute.split('_')[2] || '';
|
||||
|
||||
getSectionIDs("repeating_spellbookarcane", function (ids) {
|
||||
if (playerclickedid == ids.toLowerCase) return;
|
||||
// create an object to hold all the attributes we are bout to change
|
||||
const output = {};
|
||||
// loop through the row ids
|
||||
ids.forEach(id => {
|
||||
|
||||
getAttrs([`repeating_spellbookarcane_${id}_MagicLore`], function(v) {
|
||||
|
||||
if(v[`repeating_spellbookarcane_${id}_MagicLore`] == lore)
|
||||
{
|
||||
output[`repeating_spellbookarcane_${id}_spellchannelsl`] = 0, setAttrs(output, {silent: true})
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
getSectionIDs("repeating_spellbookrituals", function (ids) {
|
||||
if (playerclickedid == ids.toLowerCase) return;
|
||||
// create an object to hold all the attributes we are bout to change
|
||||
@@ -42659,7 +42718,7 @@ on('clicked:repeating_spellbookrituals:spellcast clicked:repeating_spellbookrit
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -42673,7 +42732,7 @@ on('clicked:repeating_spellbookrituals:spellcast clicked:repeating_spellbookrit
|
||||
|
||||
|
||||
on('clicked:repeating_spellbookrituals:extchannellingloreroll', (eventInfo) => {
|
||||
getAttrs(["initiative_houserule", "WillPowerBonus"], function(v) {
|
||||
getAttrs(["initiative_houserule"], function(v) {
|
||||
|
||||
let roll = '{{test=[[@{roll_rule}]]}} {{sl=[[0 [Roll SL]]]}} {{slbonus=[[@{Talent_AethyricAttunementLvl} [SL TOTAL]]]}} {{slbonusatk=[[@{slbonusChannel}]]}} {{sladd=[[0]]}} {{modvalue=[[?{Channeling Roll Modifier|@{prefix2-_ChanMod}}]]}} {{title=^{EXTENDED-CHANNELLING-TEST}}} {{skill=^{ADVANCED-SKILL}}}} {{unconscious=[[@{UnconsciousMod}]]}} {{cond=[[@{condgen_see}-@{DrunkMod}]]}} {{drunk=[[@{DrunkMod}]]}} {{fatigued=[[@{FatiguedMod}]]}} {{broken=[[@{BrokenMod}]]}} {{stuned=[[@{StunedMod}]]}} {{poisoned=[[@{PoisonedMod}]]}} {{prone=[[@{ProneMod}]]}} {{entangled=[[@{EntangledMod}]]}} {{blinded=[[@{BlindedMod}]]}} {{deafened=[[0]]}} {{character_name=@{character_name}}} {{target=[[ [[(@{condgen_see}*-1)]] [COND] + @{prefix2-_ExtChannellingLore} [SKILL] + ?{Channeling Roll Modifier|0} [MOD] ]]}} {{skilltest=true}} {{accuchanexlsl=[[?{Accumulated Extended Channelling SL (Start at 0)|@{prefix2-_spellchannelsl}}]]}} {{ritualsacr=@{prefix2-_ritualsacr}}} {{SLmod=[[?{SL Modifier|0}]]}} {{SLmod=[[?{SL Modifier|0}]]}} {{rolltype=[[9]]}} {{lore=[[@{prefix2-_MagicLore}]]}} {{robes=[[@{Used_Wizard_Robes}]]}} {{mod1type=[[@{prefix2-_ExtChannellingLoreRoll_modtype1}]]}} {{mod1=@{prefix2-_ExtChannellingLoreRoll_mod1}}} {{mod2type=[[@{prefix2-_ExtChannellingLoreRoll_modtype2}]]}} {{mod2=@{prefix2-_ExtChannellingLoreRoll_mod2}}} {{mod3type=[[@{prefix2-_ExtChannellingLoreRoll_modtype3}]]}} {{mod3=@{prefix2-_ExtChannellingLoreRoll_mod3}}} {{NPC=[[0]]}} {{RTminor=@{RT-minor}}} {{RTmajor=@{RT-major}}} {{reroll=[1](~@{character_name}|prefix2-_extchannellingloreroll)}} {{sptal1=[[@{Talent_AethyricAttunementLvl}]]}} {{testoutcome=[[0]]}}';
|
||||
var trigger = eventInfo.triggerName.slice(8);
|
||||
@@ -42744,16 +42803,37 @@ on('clicked:repeating_spellbookrituals:extchannellingloreroll', (eventInfo) => {
|
||||
testoutcome: outcome,
|
||||
}
|
||||
);
|
||||
|
||||
const playerclickedid = eventInfo.sourceAttribute.split('_')[2] || '';
|
||||
|
||||
|
||||
getSectionIDs("repeating_spellbookarcane", function (ids) {
|
||||
// create an object to hold all the attributes we are bout to change
|
||||
const output = {};
|
||||
// loop through the row ids
|
||||
ids.forEach(id => {
|
||||
|
||||
getAttrs([`repeating_spellbookarcane_${id}_MagicLore`, "WillPowerBonus"], function(v) {
|
||||
|
||||
if(v[`repeating_spellbookarcane_${id}_MagicLore`] == lore)
|
||||
{
|
||||
extslout = accuchanexlsl + extsl;
|
||||
if (extslout < 0) {extslout = 0;}
|
||||
|
||||
if (chancrit === 1) {extslout += v.WillPowerBonus;}
|
||||
|
||||
output[`repeating_spellbookarcane_${id}_spellchannelsl`] = extslout, setAttrs(output, {silent: true})
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
getSectionIDs("repeating_spellbookrituals", function (ids) {
|
||||
// create an object to hold all the attributes we are bout to change
|
||||
const output = {};
|
||||
// loop through the row ids
|
||||
ids.forEach(id => {
|
||||
|
||||
getAttrs([`repeating_spellbookrituals_${id}_MagicLore`], function(v) {
|
||||
getAttrs([`repeating_spellbookrituals_${id}_MagicLore`, "WillPowerBonus"], function(v) {
|
||||
|
||||
if(v[`repeating_spellbookrituals_${id}_MagicLore`] == lore)
|
||||
{
|
||||
@@ -42769,7 +42849,6 @@ on('clicked:repeating_spellbookrituals:extchannellingloreroll', (eventInfo) => {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
@@ -42781,7 +42860,7 @@ on('clicked:repeating_spellbookrituals:channelreset', (eventInfo) => {
|
||||
|
||||
console.log("channel reset");
|
||||
lore = '';
|
||||
|
||||
|
||||
getSectionIDs("repeating_spellbookrituals", function (ids) {
|
||||
// create an object to hold all the attributes we are bout to change
|
||||
const output = {};
|
||||
@@ -42805,6 +42884,25 @@ on('clicked:repeating_spellbookrituals:channelreset', (eventInfo) => {
|
||||
if(v[`repeating_spellbookrituals_${id}_MagicLore`] == lore)
|
||||
{
|
||||
output2[`repeating_spellbookrituals_${id}_spellchannelsl`] = 0, setAttrs(output2, {silent: true})
|
||||
|
||||
getSectionIDs("repeating_spellbookarcane", function (ids) {
|
||||
// create an object to hold all the attributes we are bout to change
|
||||
const output = {};
|
||||
const output2 = {};
|
||||
// loop through the row ids
|
||||
ids.forEach(id => {
|
||||
|
||||
|
||||
getAttrs([`repeating_spellbookarcane_${id}_MagicLore`], function(v) {
|
||||
|
||||
if(v[`repeating_spellbookarcane_${id}_MagicLore`] == lore)
|
||||
{
|
||||
output2[`repeating_spellbookarcane_${id}_spellchannelsl`] = 0, setAttrs(output2, {silent: true})
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -43233,9 +43331,6 @@ on('clicked:repeating_divinemiracles:miracle clicked:repeating_divinemiracles:mi
|
||||
}
|
||||
);
|
||||
|
||||
console.log("TEST TEST");
|
||||
console.log(trigger);
|
||||
|
||||
if (trigger === "channellingfire") {lore = 1}
|
||||
if (trigger === "channellingheavens") {lore = 2}
|
||||
if (trigger === "channellingmetal") {lore = 3}
|
||||
@@ -43250,8 +43345,6 @@ on('clicked:repeating_divinemiracles:miracle clicked:repeating_divinemiracles:mi
|
||||
if (trigger === "channellinggreatmaw") {lore = 12}
|
||||
if (trigger === "channellingmisc") {lore = 13}
|
||||
|
||||
console.log(lore);
|
||||
|
||||
getSectionIDs("repeating_spellbookarcane", function (ids) {
|
||||
// create an object to hold all the attributes we are bout to change
|
||||
const output = {};
|
||||
@@ -43285,7 +43378,7 @@ on('clicked:repeating_divinemiracles:miracle clicked:repeating_divinemiracles:mi
|
||||
|
||||
getAttrs([`repeating_spellbookrituals_${id}_MagicLore`, `repeating_spellbookrituals_${id}_spellchannelsl`, "WillPowerBonus"], function(v) {
|
||||
|
||||
accuchanexlsl = v[`repeating_spellbookarcane_${id}_spellchannelsl`];
|
||||
accuchanexlsl = v[`repeating_spellbookrituals_${id}_spellchannelsl`];
|
||||
|
||||
if(v[`repeating_spellbookrituals_${id}_MagicLore`] == lore)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user