Add items
This commit is contained in:
parent
5790525c82
commit
f57e5030c5
@ -227,6 +227,7 @@ export class SoSActor extends Actor {
|
|||||||
modifierList: SoSUtility.fillRange(-10, +10),
|
modifierList: SoSUtility.fillRange(-10, +10),
|
||||||
tnList: SoSUtility.fillRange(6, 20),
|
tnList: SoSUtility.fillRange(6, 20),
|
||||||
consequencesList: duplicate( this.getApplicableConsequences() ),
|
consequencesList: duplicate( this.getApplicableConsequences() ),
|
||||||
|
wounds: duplicate( this.data.data.wounds),
|
||||||
malusConsequence: 0,
|
malusConsequence: 0,
|
||||||
bonusConsequence: 0
|
bonusConsequence: 0
|
||||||
}
|
}
|
||||||
@ -241,6 +242,7 @@ export class SoSActor extends Actor {
|
|||||||
statList: duplicate(this.data.data.stats),
|
statList: duplicate(this.data.data.stats),
|
||||||
selectedStat: 'strength',
|
selectedStat: 'strength',
|
||||||
consequencesList: duplicate( this.getApplicableConsequences() ),
|
consequencesList: duplicate( this.getApplicableConsequences() ),
|
||||||
|
wounds: duplicate( this.data.data.wounds),
|
||||||
skill: duplicate(skill),
|
skill: duplicate(skill),
|
||||||
actor: this,
|
actor: this,
|
||||||
modifierList: SoSUtility.fillRange(-10, +10),
|
modifierList: SoSUtility.fillRange(-10, +10),
|
||||||
@ -275,6 +277,7 @@ export class SoSActor extends Actor {
|
|||||||
target: target,
|
target: target,
|
||||||
selectedStat: selectedStatName,
|
selectedStat: selectedStatName,
|
||||||
consequencesList: duplicate( this.getApplicableConsequences() ),
|
consequencesList: duplicate( this.getApplicableConsequences() ),
|
||||||
|
wounds: duplicate( this.data.data.wounds),
|
||||||
skill: duplicate(skill),
|
skill: duplicate(skill),
|
||||||
actor: this,
|
actor: this,
|
||||||
modifierList: SoSUtility.fillRange(-10, +10),
|
modifierList: SoSUtility.fillRange(-10, +10),
|
||||||
|
@ -244,9 +244,9 @@ export class SoSCardDeck {
|
|||||||
|
|
||||||
// Compute final result and compare
|
// Compute final result and compare
|
||||||
if ( flipData.mode == 'stat' || flipData.mode == 'weapon' ) {
|
if ( flipData.mode == 'stat' || flipData.mode == 'weapon' ) {
|
||||||
flipData.baseScore = flipData.stat.value + flipData.malusConsequence;
|
flipData.baseScore = flipData.stat.value + flipData.malusConsequence + flipData.bonusConsequence + flipData.woundMalus;
|
||||||
} else if (flipData.mode == 'skill') {
|
} else if (flipData.mode == 'skill') {
|
||||||
flipData.baseScore = Math.floor(flipData.stat.value/2) + flipData.skill.data.value + flipData.malusConsequence
|
flipData.baseScore = Math.floor(flipData.stat.value/2) + flipData.skill.data.value + flipData.malusConsequence + flipData.bonusConsequence + flipData.woundMalus;
|
||||||
}
|
}
|
||||||
flipData.finalScore = flipData.baseScore + flipData.cardTotal + Number(flipData.modifier);
|
flipData.finalScore = flipData.baseScore + flipData.cardTotal + Number(flipData.modifier);
|
||||||
flipData.magnitude = flipData.finalScore - flipData.tn;
|
flipData.magnitude = flipData.finalScore - flipData.tn;
|
||||||
|
@ -33,10 +33,17 @@ export class SoSFlipDialog extends Dialog {
|
|||||||
scoreBase = Math.floor(this.flipData.statList[ statKey ].value / 2) + this.flipData.skill.data.value;
|
scoreBase = Math.floor(this.flipData.statList[ statKey ].value / 2) + this.flipData.skill.data.value;
|
||||||
} else { //Stat mode
|
} else { //Stat mode
|
||||||
let statKey = $('#statSelect').val();
|
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.malusConsequence;
|
||||||
scoreBase += this.flipData.bonusConsequence;
|
scoreBase += this.flipData.bonusConsequence;
|
||||||
|
scoreBase += this.flipData.woundMalus;
|
||||||
|
$('#wound-malus').text(this.flipData.woundMalus);
|
||||||
$('#score-base').text( scoreBase);
|
$('#score-base').text( scoreBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,6 +129,18 @@ export class SoSFlipDialog extends Dialog {
|
|||||||
html.find('#consequenceSelectBonus').change((event) => {
|
html.find('#consequenceSelectBonus').change((event) => {
|
||||||
this.updateConsequenceBonus( 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) => {
|
html.find('.class-view-deck').click((event) => {
|
||||||
let flipData = this.flipData;
|
let flipData = this.flipData;
|
||||||
|
@ -638,6 +638,11 @@ ul, li {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
flex-grow: 2;
|
flex-grow: 2;
|
||||||
}
|
}
|
||||||
|
.dialog-label {
|
||||||
|
flex-grow: 2;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
.attribut-value,
|
.attribut-value,
|
||||||
.stat-value {
|
.stat-value {
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
{{#if (eq mode 'stat')}}
|
{{#if (eq mode 'stat')}}
|
||||||
<h3 class="skill-label" id="flipSubTitle">
|
<label class="dialog-label" id="flipSubTitle">Stat Only Flip :</label>
|
||||||
Stat Only Flip : {{localize stat.label}} : {{stat.value}} - <img class="cardsuit-img" src="systems/foundryvtt-shadows-over-sol/img/cards/{{stat.cardsuit}}.webp"/>
|
<label class="dialog-label">
|
||||||
</h3>
|
{{localize stat.label}} : {{stat.value}} - <img class="cardsuit-img" src="systems/foundryvtt-shadows-over-sol/img/cards/{{stat.cardsuit}}.webp"/>
|
||||||
|
</label>
|
||||||
<span>
|
<span>
|
||||||
<h3 class="skill-label" id="flipSubTitle">Final Score : <span id='score-base'>0</span> </h3>
|
<label class="dialog-label" id="flipSubTitle">Final Score : <span id='score-base'>0</span> </h3>
|
||||||
</span>
|
</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
<h3 class="skill-label" id="flipSubTitle">Select Stat</h3>
|
<label class="dialog-label" id="flipSubTitle">Select Stat</h3>
|
||||||
<select name="stat" id="statSelect" data-dtype="String">
|
<select name="stat" id="statSelect" data-dtype="String">
|
||||||
{{#select statList}}
|
{{#select statList}}
|
||||||
{{#each statList as |stat key|}}
|
{{#each statList as |stat key|}}
|
||||||
@ -21,8 +22,8 @@
|
|||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
<span>
|
<span>
|
||||||
<h3 class="skill-label" id="flipSubTitle">Skill Flip : {{skill.name}} ({{skill.data.value}}) </h3>
|
<h3 class="dialog-label" id="flipSubTitle">Skill Flip : {{skill.name}} ({{skill.data.value}}) </h3>
|
||||||
<h3 class="skill-label" id="flipSubTitle">Final Score : <span id='score-base'>0</span> </h3>
|
<h3 class="dialog-label" id="flipSubTitle">Final Score : <span id='score-base'>0</span> </h3>
|
||||||
</span>
|
</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
@ -35,7 +36,7 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
<h3 class="skill-label" id="flipConsequenceMalus">Consequences Malus : <span id='consequence-malus'>0</span> </h3>
|
<h3 class="dialog-label" id="flipConsequenceMalus">Consequences Malus : <span id='consequence-malus'>0</span> </h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
@ -47,9 +48,24 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
<h3 class="skill-label" id="flipConsequenceMalus">Consequences Bonus : <span id='consequence-bonus'>0</span> </h3>
|
<h3 class="dialog-label" id="flipConsequenceBonus">Consequences Bonus : <span id='consequence-bonus'>0</span> </h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flexcol">
|
||||||
|
{{#if (gt wounds.light 0)}}
|
||||||
|
<span><label class="dialog-label">Apply Light Wound Malus:</label><input type="checkbox" name="wound-light-checkbox" id="wound-light-checkbox"></span>
|
||||||
|
{{/if}}
|
||||||
|
{{#if (gt wounds.moderate 0)}}
|
||||||
|
<span><label class="dialog-label">Apply Moderate Wound Malus:</label><input type="checkbox" name="wound-moderate-checkbox" id="wound-moderate-checkbox"></span>
|
||||||
|
{{/if}}
|
||||||
|
{{#if (gt wounds.severe 0)}}
|
||||||
|
<span><label class="dialog-label">Apply Severe Wound Malus:</label><input type="checkbox" name="wound-severe-checkbox" id="wound-severe-checkbox"></span>
|
||||||
|
{{/if}}
|
||||||
|
{{#if (gt wounds.critical 0)}}
|
||||||
|
<span><label class="dialog-label">Apply Critical Wound Malus:</label><input type="checkbox" name="wound-critical-checkbox" id="wound-critical-checkbox"></span>
|
||||||
|
{{/if}}
|
||||||
|
<h3 class="dialog-label" id="flipWoundMalus">Wounds Malus : <span id='wound-malus'>0</span> </h3>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
@ -62,9 +78,9 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="tab" data-group="primary">
|
<div class="tab" data-group="primary">
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<label for="categorie" class="generic-label">Target Number (TN) : </label>
|
<label for="categorie" class="dialog-label">Target Number (TN) : </label>
|
||||||
{{#if target}}
|
{{#if target}}
|
||||||
<label for="categorie" class="generic-label"> {{target.actor.data.data.scores.defense.value}} </label>
|
<label for="categorie" class="dialog-label"> {{target.actor.data.data.scores.defense.value}} </label>
|
||||||
{{else}}
|
{{else}}
|
||||||
<select name="tn" id="tn" data-dtype="number">
|
<select name="tn" id="tn" data-dtype="number">
|
||||||
{{#select tn}}
|
{{#select tn}}
|
||||||
@ -74,7 +90,7 @@
|
|||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<label for="categorie" class="generic-label"> Flip Modifier (GM bonus/malus)</label>
|
<label for="categorie" class="dialog-label"> Flip Modifier (GM bonus/malus)</label>
|
||||||
<select name="modifier" id="modifier" data-dtype="number">
|
<select name="modifier" id="modifier" data-dtype="number">
|
||||||
{{#select modifier}}
|
{{#select modifier}}
|
||||||
{{#each modifierList as |key|}}
|
{{#each modifierList as |key|}}
|
||||||
@ -86,9 +102,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label class="generic-label">Click on deck to flip from deck, or click on the relevant Edge card to flip from it!</label>
|
<label class="dialog-label">Click on deck to flip from deck, or click on the relevant Edge card to flip from it!</label>
|
||||||
|
|
||||||
<label class="generic-label flexrow">Discard Edge for Luck (ie force Trump) when clicking :
|
<label class="dialog-label flexrow">Discard Edge for Luck (ie force Trump) when clicking :
|
||||||
<span class="attribute-value checkbox"><input type="checkbox" name="edge-luck" id="edge-luck"/></span>
|
<span class="attribute-value checkbox"><input type="checkbox" name="edge-luck" id="edge-luck"/></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -97,7 +113,7 @@
|
|||||||
<span class="class-view-edge" id="view-edge"></span>
|
<span class="class-view-edge" id="view-edge"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<label class="generic-label"></label>
|
<label class="dialog-label"></label>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user