Fixed advantage with new action scope prefix: '~'
This commit is contained in:
@@ -173,6 +173,13 @@ let ComputedOnlyAttributeSchema = createPropertySchema({
|
||||
optional: true,
|
||||
removeBeforeCompute: true,
|
||||
},
|
||||
// Attributes with advantage grant it to all skills based on the attribute
|
||||
advantage: {
|
||||
type: SimpleSchema.Integer,
|
||||
optional: true,
|
||||
allowedValues: [-1, 0, 1],
|
||||
removeBeforeCompute: true,
|
||||
},
|
||||
// The computed creature constitution modifier for hit dice
|
||||
constitutionMod: {
|
||||
type: Number,
|
||||
|
||||
@@ -19,7 +19,10 @@
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-sheet class="d-flex flex-column align-center justify-center">
|
||||
<v-btn-toggle v-model="dataAdvantage">
|
||||
<v-btn-toggle
|
||||
v-model="dataAdvantage"
|
||||
color="accent"
|
||||
>
|
||||
<v-btn :value="-1">
|
||||
Disadvantage
|
||||
</v-btn>
|
||||
|
||||
@@ -211,7 +211,7 @@ export default {
|
||||
doAction.call({
|
||||
actionId: this.model._id,
|
||||
scope: {
|
||||
$attackAdvantage: advantage,
|
||||
'~attackAdvantage': { value: advantage },
|
||||
}
|
||||
}, error => {
|
||||
this.doActionLoading = false;
|
||||
|
||||
@@ -53,7 +53,7 @@ export default {
|
||||
doAction.call({
|
||||
actionId: this.model._id,
|
||||
scope: {
|
||||
$attackAdvantage: advantage,
|
||||
'~attackAdvantage': { value: advantage },
|
||||
}
|
||||
}, error => {
|
||||
this.doActionLoading = false;
|
||||
|
||||
@@ -46,6 +46,18 @@
|
||||
<v-list-item-content>
|
||||
<v-list-item-title>
|
||||
{{ model.name }}
|
||||
<v-icon
|
||||
v-if="model.advantage > 0"
|
||||
right
|
||||
>
|
||||
mdi-chevron-double-up
|
||||
</v-icon>
|
||||
<v-icon
|
||||
v-if="model.advantage < 0"
|
||||
right
|
||||
>
|
||||
mdi-chevron-double-down
|
||||
</v-icon>
|
||||
</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
@@ -89,7 +101,7 @@ export default {
|
||||
doCheck.call({
|
||||
propId: this.model._id,
|
||||
scope: {
|
||||
$checkAdvantage: advantage,
|
||||
'~checkAdvantage': { value: advantage },
|
||||
},
|
||||
}, error => {
|
||||
this.checkLoading = false;
|
||||
|
||||
@@ -30,6 +30,18 @@
|
||||
</v-card-title>
|
||||
<v-card-title class="name text-subtitle-1 text-truncate d-block pl-0">
|
||||
{{ model.name }}
|
||||
<v-icon
|
||||
v-if="model.advantage > 0"
|
||||
right
|
||||
>
|
||||
mdi-chevron-double-up
|
||||
</v-icon>
|
||||
<v-icon
|
||||
v-if="model.advantage < 0"
|
||||
right
|
||||
>
|
||||
mdi-chevron-double-down
|
||||
</v-icon>
|
||||
</v-card-title>
|
||||
</div>
|
||||
</template>
|
||||
@@ -75,7 +87,7 @@ export default {
|
||||
doCheck.call({
|
||||
propId: this.model._id,
|
||||
scope: {
|
||||
$checkAdvantage: advantage,
|
||||
'~checkAdvantage': { value: advantage },
|
||||
},
|
||||
}, error => {
|
||||
this.checkLoading = false;
|
||||
|
||||
@@ -65,7 +65,7 @@ export default {
|
||||
slotId,
|
||||
ritual,
|
||||
scope: {
|
||||
$attackAdvantage: advantage,
|
||||
'~attackAdvantage': { value: advantage },
|
||||
},
|
||||
}, error => {
|
||||
if (!error) return;
|
||||
|
||||
@@ -111,7 +111,7 @@ export default {
|
||||
doCheck.call({
|
||||
propId: this.model._id,
|
||||
scope: {
|
||||
$checkAdvantage: advantage,
|
||||
'~checkAdvantage': { value: advantage },
|
||||
},
|
||||
}, error => {
|
||||
this.checkLoading = false;
|
||||
|
||||
@@ -197,7 +197,7 @@ export default {
|
||||
slotId,
|
||||
ritual,
|
||||
scope: {
|
||||
$attackAdvantage: advantage,
|
||||
'~attackAdvantage': { value: advantage },
|
||||
},
|
||||
}, error => {
|
||||
if (!error) return;
|
||||
|
||||
Reference in New Issue
Block a user