Opposed tests, ongoing process
This commit is contained in:
@ -78,11 +78,13 @@ export class SoSActor extends Actor {
|
||||
this.cardDeck.drawEdge( 1 );
|
||||
this.saveDeck();
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
resetDeck() {
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
resetDeck( ) {
|
||||
this.cardDeck.resetDeck();
|
||||
this.saveDeck();
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
saveDeck( ) {
|
||||
let deck = { deck: duplicate(this.cardDeck.data.deck),
|
||||
@ -210,7 +212,6 @@ export class SoSActor extends Actor {
|
||||
}
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData);
|
||||
new SoSFlipDialog(flipData, html).render(true);
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -218,6 +219,7 @@ export class SoSActor extends Actor {
|
||||
let flipData = {
|
||||
mode: 'skill',
|
||||
statList: duplicate(this.data.data.stats),
|
||||
selectedStat: 'strength',
|
||||
consequencesList: duplicate( this.getApplicableConsequences() ),
|
||||
skill: duplicate(skill),
|
||||
actor: this,
|
||||
@ -229,4 +231,40 @@ export class SoSActor extends Actor {
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData);
|
||||
new SoSFlipDialog(flipData, html).render(true);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollWeapon( weapon ) {
|
||||
let target = SoSUtility.getTarget();
|
||||
let skill, selectedStatName;
|
||||
if ( weapon.data.data.category == 'ballistic' || weapon.data.data.category == 'laser' ) {
|
||||
skill = this.data.items.find( item => item.name == 'Guns');
|
||||
selectedStatName = 'dexterity';
|
||||
} else if ( weapon.data.data.category == 'melee' ) {
|
||||
skill = this.data.items.find( item => item.name == 'Melee');
|
||||
selectedStatName = 'dexterity';
|
||||
} else if ( weapon.data.data.category == 'grenade' ) {
|
||||
skill = this.data.items.find( item => item.name == 'Athletics');
|
||||
selectedStatName = 'dexterity';
|
||||
}
|
||||
|
||||
let flipData = {
|
||||
mode: 'weapon',
|
||||
weapon: duplicate(weapon.data),
|
||||
statList: duplicate(this.data.data.stats),
|
||||
target: target,
|
||||
selectedStat: selectedStatName,
|
||||
consequencesList: duplicate( this.getApplicableConsequences() ),
|
||||
skill: duplicate(skill),
|
||||
actor: this,
|
||||
modifierList: SoSUtility.fillRange(-10, +10),
|
||||
tnList: SoSUtility.fillRange(6, 20),
|
||||
malusConsequence: 0
|
||||
}
|
||||
|
||||
console.log(flipData);
|
||||
|
||||
flipData.statList['nostat'] = { label: "No stat (ie defaulting skills)", value: 0, cardsuit: "none" }
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData);
|
||||
new SoSFlipDialog(flipData, html).render(true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user