Manage complex skills
This commit is contained in:
parent
1143fa0d57
commit
e7faf7937b
@ -472,6 +472,10 @@ export class CrucibleActor extends Actor {
|
|||||||
rollSkill(skillId) {
|
rollSkill(skillId) {
|
||||||
let skill = this.data.items.get(skillId)
|
let skill = this.data.items.get(skillId)
|
||||||
if (skill) {
|
if (skill) {
|
||||||
|
if (skill.data.islore && skill.data.level == 0) {
|
||||||
|
ui.notifications.warn("You can't use Lore Skills with a SL of 0.")
|
||||||
|
return
|
||||||
|
}
|
||||||
skill = duplicate(skill)
|
skill = duplicate(skill)
|
||||||
let abilityKey = skill.data.ability
|
let abilityKey = skill.data.ability
|
||||||
let rollData = this.getCommonRollData(abilityKey)
|
let rollData = this.getCommonRollData(abilityKey)
|
||||||
|
@ -272,8 +272,14 @@ export class CrucibleUtility {
|
|||||||
level += feat.data.sl
|
level += feat.data.sl
|
||||||
rollData.featSL = feat.data.sl
|
rollData.featSL = feat.data.sl
|
||||||
}
|
}
|
||||||
|
|
||||||
diceFormula += "+" + String(level) + "d8cs>=5"
|
diceFormula += "+" + String(level) + "d8cs>=5"
|
||||||
|
if (rollData.skill.data.skilltype == "complex" && rollData.skill.data.level == 0) {
|
||||||
|
rollData.complexSkillDisadvantage = true
|
||||||
|
rollData.rollAdvantage = "roll-disadvantage"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(rollData.advantage == "advantage1") {
|
if(rollData.advantage == "advantage1") {
|
||||||
diceFormula += "+ 1d10cs>=5"
|
diceFormula += "+ 1d10cs>=5"
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,10 @@
|
|||||||
<li>Roll with Disadvantage !</li>
|
<li>Roll with Disadvantage !</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if complexSkillDisadvantage}}
|
||||||
|
<li>Roll with Disadvantage because of Complex Skill at SL 0 !</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if (ne featDieName "none")}}
|
{{#if (ne featDieName "none")}}
|
||||||
<li>Feature Die : d10 ({{featDieName}})</li>
|
<li>Feature Die : d10 ({{featDieName}})</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Loading…
Reference in New Issue
Block a user