spell trigger fixes

This commit is contained in:
Djjus
2021-09-15 00:50:36 +01:00
parent 79b86bee3e
commit 3660054862
@@ -34723,7 +34723,7 @@ on('clicked:rangedweaponrld', (eventInfo) => {
on('clicked:repeating_spellbookpetty:spellcast clicked:repeating_spellbookpetty:spellcastdmg', (eventInfo) => {
getAttrs(["initiative_houserule"], function(v) {
let roll = '{{sl=[[0 [Roll SL]]]}} {{slbonus=[[@{Talent_InstinctiveDictionLvl}+@{Talent_PerfectPitchLvl} [SL TOTAL]]]}} {{slbonusatk=[[@{slbonusCast}]]}} {{sladd=[[0]]}} {{modvalue=[[?{@{translation_modifier}|@{prefix2-_SpellMod}}]]}} {{title=@{spellname}}} {{character_name=@{character_name}}} {{advantage=[[@{Advantage}*10*@{Advantage_casting}]]}} {{unconscious=[[@{UnconsciousMod}]]}} {{cond=[[@{condgen_see}]]}} {{fatigued=[[@{FatiguedMod}]]}} {{broken=[[@{BrokenMod}]]}} {{stuned=[[@{StunedMod}]]}} {{poisoned=[[@{PoisonedMod}]]}} {{prone=[[@{ProneMod}]]}} {{entangled=[[@{EntangledMod}]]}} {{blinded=[[@{BlindedMod}]]}} {{deafened=[[0]]}} {{spelltype=^{PETTY-SPELL}}} {{spellrange=Range: @{spellrange}}} {{spelltarget=Targets: @{spelltarget}}} {{spellduration=Duration: @{spellduration}}} {{target=[[ [[(@{condgen_see}*-1)]] [COND] + [[{@{LangMagick}}]] [SKILL] + ?{@{translation_modifier}|0} [MOD] + [[@{Advantage}*10*@{Advantage_casting}]] [ADV] ]]}} {{spelldescription=@{prefix2-_spelldescription}}} {{test=[[@{roll_rule}]]}} {{SLmod=[[?{SL Modifier|0}]]}} {{spelltest=[[1d10]]}} {{arcanetest=true}} {{rolltype=[[6]]}} {{mod1type=[[@{prefix2-_PettySpell_modtype1}]]}} {{mod1=@{prefix2-_PettySpell_mod1}}} {{mod2type=[[@{prefix2-_PettySpell_modtype2}]]}} {{mod2=@{prefix2-_PettySpell_mod2}}} {{mod3type=[[@{prefix2-_PettySpell_modtype3}]]}} {{mod3=@{prefix2-_PettySpell_mod3}}} {{NPC=[[0]]}} {{RTcrit=@{RT-crit}}} {{RTminor=@{RT-minor}}} {{RTmajor=@{RT-major}}} {{reroll=[1](~@{character_name}|prefix2-_spellcast)}} {{sptal2=[[@{Talent_InstinctiveDictionLvl}]]}} {{sptal3=[[@{Talent_PerfectPitchLvl}]]}} {{sptal23=[[@{Talent_InstinctiveandPitch}]]}}';
let roll = '{{sl=[[0 [Roll SL]]]}} {{slbonus=[[@{Talent_InstinctiveDictionLvl}+@{Talent_PerfectPitchLvl} [SL TOTAL]]]}} {{slbonusatk=[[@{slbonusCast}]]}} {{sladd=[[0]]}} {{modvalue=[[?{@{translation_modifier}|@{prefix2-_SpellMod}}]]}} {{title=@{prefix2-_spellname}}} {{character_name=@{character_name}}} {{advantage=[[@{Advantage}*10*@{Advantage_casting}]]}} {{unconscious=[[@{UnconsciousMod}]]}} {{cond=[[@{condgen_see}]]}} {{fatigued=[[@{FatiguedMod}]]}} {{broken=[[@{BrokenMod}]]}} {{stuned=[[@{StunedMod}]]}} {{poisoned=[[@{PoisonedMod}]]}} {{prone=[[@{ProneMod}]]}} {{entangled=[[@{EntangledMod}]]}} {{blinded=[[@{BlindedMod}]]}} {{deafened=[[0]]}} {{spelltype=^{PETTY-SPELL}}} {{spellrange=Range: @{spellrange}}} {{spelltarget=Targets: @{spelltarget}}} {{spellduration=Duration: @{spellduration}}} {{target=[[ [[(@{condgen_see}*-1)]] [COND] + [[{@{LangMagick}}]] [SKILL] + ?{@{translation_modifier}|0} [MOD] + [[@{Advantage}*10*@{Advantage_casting}]] [ADV] ]]}} {{spelldescription=@{prefix2-_spelldescription}}} {{test=[[@{roll_rule}]]}} {{SLmod=[[?{SL Modifier|0}]]}} {{spelltest=[[1d10]]}} {{arcanetest=true}} {{rolltype=[[6]]}} {{mod1type=[[@{prefix2-_PettySpell_modtype1}]]}} {{mod1=@{prefix2-_PettySpell_mod1}}} {{mod2type=[[@{prefix2-_PettySpell_modtype2}]]}} {{mod2=@{prefix2-_PettySpell_mod2}}} {{mod3type=[[@{prefix2-_PettySpell_modtype3}]]}} {{mod3=@{prefix2-_PettySpell_mod3}}} {{NPC=[[0]]}} {{RTcrit=@{RT-crit}}} {{RTminor=@{RT-minor}}} {{RTmajor=@{RT-major}}} {{reroll=[1](~@{character_name}|prefix2-_spellcast)}} {{sptal2=[[@{Talent_InstinctiveDictionLvl}]]}} {{sptal3=[[@{Talent_PerfectPitchLvl}]]}} {{sptal23=[[@{Talent_InstinctiveandPitch}]]}}';
var trigger = eventInfo.triggerName.slice(8);
var skillpre = trigger.split('_');
var skill = skillpre[3];
@@ -34774,7 +34774,7 @@ on('clicked:repeating_spellbookpetty:spellcast clicked:repeating_spellbookpetty:
on('clicked:repeating_spellbookarcane:spellcast clicked:repeating_spellbookarcane:spellcastdmg', (eventInfo) => {
getAttrs(["initiative_houserule"], function(v) {
let roll = '{{sl=[[0 [Roll SL]]]}} {{slbonus=[[@{Talent_InstinctiveDictionLvl}+@{Talent_PerfectPitchLvl} [SL TOTAL]]]}} {{slbonusatk=[[@{slbonusCast}]]}} {{sladd=[[0]]}} {{modvalue=[[?{@{translation_modifier}|@{prefix2-_SpellMod}}]]}} {{title=@{spellname}}} {{character_name=@{character_name}}} {{advantage=[[@{Advantage}*10*@{Advantage_casting}]]}} {{unconscious=[[@{UnconsciousMod}]]}} {{cond=[[@{condgen_see}]]}} {{fatigued=[[@{FatiguedMod}]]}} {{broken=[[@{BrokenMod}]]}} {{stuned=[[@{StunedMod}]]}} {{poisoned=[[@{PoisonedMod}]]}} {{prone=[[@{ProneMod}]]}} {{entangled=[[@{EntangledMod}]]}} {{blinded=[[@{BlindedMod}]]}} {{deafened=[[0]]}} {{spelltype=^{PETTY-SPELL}}} {{spellrange=Range: @{spellrange}}} {{spelltarget=Targets: @{spelltarget}}} {{spellduration=Duration: @{spellduration}}} {{target=[[ [[(@{condgen_see}*-1)]] [COND] + [[{@{LangMagick}}]] [SKILL] + ?{@{translation_modifier}|0} [MOD] + [[@{Advantage}*10*@{Advantage_casting}]] [ADV] ]]}} {{spelldescription=@{prefix2-_spelldesc}}} {{test=[[@{roll_rule}]]}} {{SLmod=[[?{SL Modifier|0}]]}} {{spelltest=[[1d10]]}} {{arcanetest=true}} {{rolltype=[[6]]}} {{spellcastingnumber=[[@{prefix2-_spellcastingnumber}]]}} {{accuchanexlsl=[[@{prefix2-_spellchannelsl}]]}} {{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]]}} {{RTcrit=@{RT-crit}}} {{RTminor=@{RT-minor}}} {{RTmajor=@{RT-major}}} {{reroll=[1](~@{character_name}|prefix2-_spellcast)}} {{sptal2=[[@{Talent_InstinctiveDictionLvl}]]}} {{sptal3=[[@{Talent_PerfectPitchLvl}]]}} {{sptal23=[[@{Talent_InstinctiveandPitch}]]}}';
let roll = '{{sl=[[0 [Roll SL]]]}} {{slbonus=[[@{Talent_InstinctiveDictionLvl}+@{Talent_PerfectPitchLvl} [SL TOTAL]]]}} {{slbonusatk=[[@{slbonusCast}]]}} {{sladd=[[0]]}} {{modvalue=[[?{@{translation_modifier}|@{prefix2-_SpellMod}}]]}} {{title=@{prefix2-_spellname}}} {{character_name=@{character_name}}} {{advantage=[[@{Advantage}*10*@{Advantage_casting}]]}} {{unconscious=[[@{UnconsciousMod}]]}} {{cond=[[@{condgen_see}]]}} {{fatigued=[[@{FatiguedMod}]]}} {{broken=[[@{BrokenMod}]]}} {{stuned=[[@{StunedMod}]]}} {{poisoned=[[@{PoisonedMod}]]}} {{prone=[[@{ProneMod}]]}} {{entangled=[[@{EntangledMod}]]}} {{blinded=[[@{BlindedMod}]]}} {{deafened=[[0]]}} {{spelltype=^{PETTY-SPELL}}} {{spellrange=Range: @{spellrange}}} {{spelltarget=Targets: @{spelltarget}}} {{spellduration=Duration: @{spellduration}}} {{target=[[ [[(@{condgen_see}*-1)]] [COND] + [[{@{LangMagick}}]] [SKILL] + ?{@{translation_modifier}|0} [MOD] + [[@{Advantage}*10*@{Advantage_casting}]] [ADV] ]]}} {{spelldescription=@{prefix2-_spelldesc}}} {{test=[[@{roll_rule}]]}} {{SLmod=[[?{SL Modifier|0}]]}} {{spelltest=[[1d10]]}} {{arcanetest=true}} {{rolltype=[[6]]}} {{spellcastingnumber=[[@{prefix2-_spellcastingnumber}]]}} {{accuchanexlsl=[[@{prefix2-_spellchannelsl}]]}} {{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]]}} {{RTcrit=@{RT-crit}}} {{RTminor=@{RT-minor}}} {{RTmajor=@{RT-major}}} {{reroll=[1](~@{character_name}|prefix2-_spellcast)}} {{sptal2=[[@{Talent_InstinctiveDictionLvl}]]}} {{sptal3=[[@{Talent_PerfectPitchLvl}]]}} {{sptal23=[[@{Talent_InstinctiveandPitch}]]}}';
var trigger = eventInfo.triggerName.slice(8);
var skillpre = trigger.split('_');
var skill = skillpre[3];
@@ -34875,17 +34875,13 @@ on('clicked:repeating_spellbookarcane:extchannellingloreroll', (eventInfo) => {
on('clicked:repeating_divineblessings:bless', (eventInfo) => {
getAttrs(["initiative_houserule"], function(v) {
let roll = '{{sl=[[0 [Roll SL]]]}} {{slbonus=[[ [SL TOTAL]]]}} {{sladd=[[0]]}} {{slbonusatk=[[0]]}} {{modvalue=[[?{@{translation_modifier}|@{prefix2-_BlessMod}}]]}} {{unconscious=[[@{UnconsciousMod}]]}} {{cond=[[@{condgen}]]}} {{fatigued=[[@{FatiguedMod}]]}} {{broken=[[0]]}} {{stuned=[[0]]}} {{poisoned=[[@{PoisonedMod}]]}} {{prone=[[0]]}} {{entangled=[[0]]}} {{blinded=[[0]]}} {{deafened=[[0]]}} {{sin=[[@{Sin}]]}} {{title=@{spellname}}} {{character_name=@{character_name}}} {{spelltype=^{PRAYER}}} {{spellrange=Range: @{prefix2-_blessingrange}}} {{spelltarget=Targets: @{prefix2-_blessingtarget}}} {{spellduration=Duration: @{prefix2-_blessingduration}}} {{target=[[ [[@{condgen}*-1]] [COND] + [[{@{PrayChar}+@{PrayAdv}+@{PrayMisc}}]] [SKILL] + ?{@{translation_modifier}|@{prefix2-_BlessMod}} [MOD] ]]}} {{spelldescription=@{prefix2-_blessingdesc}}} {{test=[[@{roll_rule}]]}} {{rolltype=[[7]]}} {{SLmod=[[?{SL Modifier|0}]]}} {{spelltest=[[1d10]]}} {{praytest=true}} {{mod1type=[[@{prefix2-_BlessingSpell_modtype1}]]}} {{mod1=@{prefix2-_BlessingSpell_mod1}}} {{mod2type=[[@{prefix2-_BlessingSpell_modtype2}]]}} {{mod2=@{prefix2-_BlessingSpell_mod2}}} {{mod3type=[[@{prefix2-_BlessingSpell_modtype3}]]}} {{mod3=@{prefix2-_BlessingSpell_mod3}}} {{NPC=[[0]]}} {{RTwrath=@{RT-wrath}}} {{reroll=[1](~@{character_name}|bless)}}';
let roll = '{{sl=[[0 [Roll SL]]]}} {{slbonus=[[0 [SL TOTAL]]]}} {{sladd=[[0]]}} {{slbonusatk=[[0]]}} {{modvalue=[[?{@{translation_modifier}|@{prefix2-_BlessMod}}]]}} {{unconscious=[[@{UnconsciousMod}]]}} {{cond=[[@{condgen}]]}} {{fatigued=[[@{FatiguedMod}]]}} {{broken=[[0]]}} {{stuned=[[0]]}} {{poisoned=[[@{PoisonedMod}]]}} {{prone=[[0]]}} {{entangled=[[0]]}} {{blinded=[[0]]}} {{deafened=[[0]]}} {{sin=[[@{Sin}]]}} {{title=@{prefix2-_spellname}}} {{character_name=@{character_name}}} {{spelltype=^{PRAYER}}} {{spellrange=Range: @{prefix2-_blessingrange}}} {{spelltarget=Targets: @{prefix2-_blessingtarget}}} {{spellduration=Duration: @{prefix2-_blessingduration}}} {{target=[[ [[@{condgen}*-1]] [COND] + [[{@{PrayChar}+@{PrayAdv}+@{PrayMisc}}]] [SKILL] + ?{@{translation_modifier}|@{prefix2-_BlessMod}} [MOD] ]]}} {{spelldescription=@{prefix2-_blessingdesc}}} {{test=[[@{roll_rule}]]}} {{rolltype=[[7]]}} {{SLmod=[[?{SL Modifier|0}]]}} {{spelltest=[[1d10]]}} {{praytest=true}} {{mod1type=[[@{prefix2-_BlessingSpell_modtype1}]]}} {{mod1=@{prefix2-_BlessingSpell_mod1}}} {{mod2type=[[@{prefix2-_BlessingSpell_modtype2}]]}} {{mod2=@{prefix2-_BlessingSpell_mod2}}} {{mod3type=[[@{prefix2-_BlessingSpell_modtype3}]]}} {{mod3=@{prefix2-_BlessingSpell_mod3}}} {{NPC=[[0]]}} {{RTwrath=@{RT-wrath}}} {{reroll=[1](~@{character_name}|bless)}}';
var trigger = eventInfo.triggerName.slice(8);
var prefix = eventInfo.triggerName.slice(8, -6);
let rollBegins = '@{Whisper} &{template:wfrp4e}';
let rollPart = roll.replaceAll('prefix2-', `${prefix}`);
console.log("Test Skill");
console.log(trigger);
console.log(prefix);
startRoll(rollBegins + rollPart, (results) => {
const target = results.results.target.result