Manage complex skills
This commit is contained in:
parent
1143fa0d57
commit
e7faf7937b
@ -472,6 +472,10 @@ export class CrucibleActor extends Actor {
|
||||
rollSkill(skillId) {
|
||||
let skill = this.data.items.get(skillId)
|
||||
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)
|
||||
let abilityKey = skill.data.ability
|
||||
let rollData = this.getCommonRollData(abilityKey)
|
||||
|
@ -272,8 +272,14 @@ export class CrucibleUtility {
|
||||
level += feat.data.sl
|
||||
rollData.featSL = feat.data.sl
|
||||
}
|
||||
|
||||
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") {
|
||||
diceFormula += "+ 1d10cs>=5"
|
||||
}
|
||||
|
@ -48,6 +48,10 @@
|
||||
<li>Roll with Disadvantage !</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if complexSkillDisadvantage}}
|
||||
<li>Roll with Disadvantage because of Complex Skill at SL 0 !</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if (ne featDieName "none")}}
|
||||
<li>Feature Die : d10 ({{featDieName}})</li>
|
||||
{{/if}}
|
||||
|
Loading…
Reference in New Issue
Block a user