mirror of
https://github.com/em-squared/5e-drs.git
synced 2025-10-29 20:54:19 +00:00
affichage des px de la rencontre
This commit is contained in:
parent
2948b2cd64
commit
cc540bc083
1 changed files with 15 additions and 1 deletions
|
|
@ -17,11 +17,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div class="body-2 mb-4">
|
<div class="body-2 mb-4">
|
||||||
<span class="subtitle-2">Difficulté: </span>{{challenge.label}}
|
<span class="subtitle-2">Difficulté : </span>{{challenge.label}}
|
||||||
<v-progress-linear
|
<v-progress-linear
|
||||||
:color="challenge.color"
|
:color="challenge.color"
|
||||||
:value="challengeRate"
|
:value="challengeRate"
|
||||||
></v-progress-linear>
|
></v-progress-linear>
|
||||||
|
<span class="subtitle-2">PX : </span>{{ totalXP }}
|
||||||
</div>
|
</div>
|
||||||
<v-row class="d-flex align-center my-0" v-for="c in creatures">
|
<v-row class="d-flex align-center my-0" v-for="c in creatures">
|
||||||
<v-col class="px-0 py-1">
|
<v-col class="px-0 py-1">
|
||||||
|
|
@ -47,6 +48,7 @@
|
||||||
import { mapState, mapGetters } from 'vuex'
|
import { mapState, mapGetters } from 'vuex'
|
||||||
import { CHALLENGES, ENCOUNTERLEVELS } from '../../data/monsters'
|
import { CHALLENGES, ENCOUNTERLEVELS } from '../../data/monsters'
|
||||||
import { getPCbyChallenge } from '@theme/util/monsterHelpers'
|
import { getPCbyChallenge } from '@theme/util/monsterHelpers'
|
||||||
|
import { stats } from '../../data/stats'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EncounterCalculator',
|
name: 'EncounterCalculator',
|
||||||
|
|
@ -116,6 +118,18 @@ export default {
|
||||||
return pc
|
return pc
|
||||||
},
|
},
|
||||||
|
|
||||||
|
totalXP () {
|
||||||
|
let xp = 0
|
||||||
|
for (let c of this.creatures) {
|
||||||
|
if (c.frontmatter.challenge == 0) {
|
||||||
|
xp += 10
|
||||||
|
} else {
|
||||||
|
xp += stats.challenges[c.frontmatter.challenge].xp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return xp
|
||||||
|
},
|
||||||
|
|
||||||
challengeForGroup () {
|
challengeForGroup () {
|
||||||
let level = this.encounterLevels[this.encounterLevels.findIndex((item) => { return item.level == this.level })]
|
let level = this.encounterLevels[this.encounterLevels.findIndex((item) => { return item.level == this.level })]
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue