Add items
This commit is contained in:
@ -33,10 +33,17 @@ export class SoSFlipDialog extends Dialog {
|
||||
scoreBase = Math.floor(this.flipData.statList[ statKey ].value / 2) + this.flipData.skill.data.value;
|
||||
} else { //Stat mode
|
||||
let statKey = $('#statSelect').val();
|
||||
scoreBase = this.flipData.stat.value;
|
||||
scoreBase = this.flipData.stat.value;
|
||||
}
|
||||
this.flipData.woundMalus = 0;
|
||||
this.flipData.woundMalus += ($('#wound-light-checkbox').is(":checked")) ? (-1) : 0;
|
||||
this.flipData.woundMalus += ($('#wound-moderate-checkbox').is(":checked")) ? (-2) : 0;
|
||||
this.flipData.woundMalus += ($('#wound-severe-checkbox').is(":checked")) ? (-3) : 0;
|
||||
this.flipData.woundMalus += ($('#wound-critical-checkbox').is(":checked")) ? (-4) : 0;
|
||||
scoreBase += this.flipData.malusConsequence;
|
||||
scoreBase += this.flipData.bonusConsequence;
|
||||
scoreBase += this.flipData.woundMalus;
|
||||
$('#wound-malus').text(this.flipData.woundMalus);
|
||||
$('#score-base').text( scoreBase);
|
||||
}
|
||||
|
||||
@ -122,6 +129,18 @@ export class SoSFlipDialog extends Dialog {
|
||||
html.find('#consequenceSelectBonus').change((event) => {
|
||||
this.updateConsequenceBonus( event );
|
||||
} );
|
||||
html.find('#wound-light-checkbox').change((event) => {
|
||||
this.updateScoreBase( event );
|
||||
} );
|
||||
html.find('#wound-moderate-checkbox').change((event) => {
|
||||
this.updateScoreBase( event );
|
||||
} );
|
||||
html.find('#wound-severe-checkbox').change((event) => {
|
||||
this.updateScoreBase( event );
|
||||
} );
|
||||
html.find('#wound-critical-checkbox').change((event) => {
|
||||
this.updateScoreBase( event );
|
||||
} );
|
||||
|
||||
html.find('.class-view-deck').click((event) => {
|
||||
let flipData = this.flipData;
|
||||
|
Reference in New Issue
Block a user