mirror of
https://github.com/em-squared/5e-drs.git
synced 2025-10-30 13:14:20 +00:00
Les créatures peuvent désormais avoir un bonus de maîtrise personnalisé. Fix #4
This commit is contained in:
parent
7e9b61f79c
commit
3a8070c4f2
3 changed files with 17 additions and 6 deletions
|
|
@ -237,7 +237,12 @@ export default {
|
|||
displayList (list) { return list.join(', ') },
|
||||
displayAbilityScore (value) { return displayAbilityScore(value) },
|
||||
getModifier (value) { return getModifier(value) },
|
||||
getProficiencyBonus () { return getProficiencyBonus(this.monsterStats.challenge) },
|
||||
getProficiencyBonus () {
|
||||
if (this.monsterStats.proficiencyBonus) {
|
||||
return parseInt(this.monsterStats.proficiencyBonus)
|
||||
}
|
||||
return getProficiencyBonus(this.monsterStats.challenge)
|
||||
},
|
||||
|
||||
displayMonsterTypeSizeAlignment () {
|
||||
return displayMonsterTypeSizeAlignment(this.monsterStats)
|
||||
|
|
@ -251,7 +256,6 @@ export default {
|
|||
},
|
||||
|
||||
displaySkillBonus (skill) {
|
||||
console.log(skill)
|
||||
let result = stats.skills[skill.name].label
|
||||
if (skill.invalid) {
|
||||
result += ' ' + displayBonus(skill.value)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<h1 class="d-print-none">Création de sort</h1>
|
||||
<h1 class="d-print-none">Création d'objet magique</h1>
|
||||
|
||||
<div class="my-4 d-flex flex-wrap d-print-none">
|
||||
<v-btn outlined color="accent" class="mr-1 mb-1" depressed @click="print"><v-icon>mdi-printer</v-icon> Imprimer</v-btn>
|
||||
|
|
|
|||
|
|
@ -104,13 +104,16 @@
|
|||
<v-col class="subtitle-2" :cols="12">
|
||||
Maîtrises
|
||||
</v-col>
|
||||
<v-col class="d-flex align-center" :cols="12" :sm="4">
|
||||
<v-col class="d-flex align-center" :cols="12" :sm="3">
|
||||
<v-text-field label="Bonus de maîtrise" type="number" min="2" max="9" outlined dense v-model="monster.frontmatter.proficiencyBonus"></v-text-field>
|
||||
</v-col>
|
||||
<v-col class="d-flex align-center" :cols="12" :sm="3">
|
||||
<v-select multiple clearable :items="abilities" item-text="label" item-value="value" label="Jets de sauvegarde" outlined dense v-model="monster.frontmatter.savingThrows"></v-select>
|
||||
</v-col>
|
||||
<v-col class="d-flex align-center" :cols="12" :sm="4">
|
||||
<v-col class="d-flex align-center" :cols="12" :sm="3">
|
||||
<v-select multiple clearable return-object :items="skills" item-text="label" item-value="value" label="Compétences" outlined dense v-model="selectedSkillsProficient" @change="selectSkill"></v-select>
|
||||
</v-col>
|
||||
<v-col class="d-flex align-center" :cols="12" :sm="4">
|
||||
<v-col class="d-flex align-center" :cols="12" :sm="3">
|
||||
<v-select multiple clearable :items="selectedSkillsProficient" item-text="label" item-value="value" label="Compétences expert" outlined dense v-model="selectedSkillsExpert" @change="selectSkillExpert"></v-select>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
|
@ -248,6 +251,9 @@ export default {
|
|||
},
|
||||
|
||||
challengeHint () {
|
||||
if (this.monster.frontmatter.proficiencyBonus) {
|
||||
return 'Bonus de maîtrise personnalisé : ' + displayBonus(this.monster.frontmatter.proficiencyBonus)
|
||||
}
|
||||
return 'Bonus de maîtrise : ' + displayBonus(getProficiencyBonus(this.monster.frontmatter.challenge))
|
||||
},
|
||||
},
|
||||
|
|
@ -279,6 +285,7 @@ export default {
|
|||
subtype: '',
|
||||
size: '',
|
||||
challenge: '0',
|
||||
proficiencyBonus: null,
|
||||
alignment: '',
|
||||
isSwarm: false,
|
||||
swarmSize: '',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue