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