v10 branch - Update manifest

This commit is contained in:
sladecraven 2022-07-13 22:47:07 +02:00
parent f66b9c1913
commit bf52b61a0d
12 changed files with 268 additions and 85 deletions

View File

@ -58,6 +58,7 @@ export class PegasusActorSheet extends ActorSheet {
effects: duplicate(this.actor.getEffects()), effects: duplicate(this.actor.getEffects()),
moneys: duplicate(this.actor.getMoneys()), moneys: duplicate(this.actor.getMoneys()),
encCapacity: this.actor.getEncumbranceCapacity(), encCapacity: this.actor.getEncumbranceCapacity(),
levelRemainingList: this.actor.getLevelRemainingList(),
containersTree: this.actor.containersTree, containersTree: this.actor.containersTree,
encCurrent: this.actor.encCurrent, encCurrent: this.actor.encCurrent,
encHindrance: this.actor.encHindrance, encHindrance: this.actor.encHindrance,
@ -79,6 +80,10 @@ export class PegasusActorSheet extends ActorSheet {
rollData.mode = "generic" rollData.mode = "generic"
rollData.title = `Dice Pool Roll` rollData.title = `Dice Pool Roll`
rollData.img = "icons/dice/d12black.svg" rollData.img = "icons/dice/d12black.svg"
rollData.isGeneric = true
rollData.traumaState = this.actor.getTraumaState()
rollData.diceList = PegasusUtility.getDiceList()
rollData.dicePool = []
let rollDialog = await PegasusRollDialog.create( this.actor, rollData); let rollDialog = await PegasusRollDialog.create( this.actor, rollData);
rollDialog.render( true ); rollDialog.render( true );

View File

@ -857,6 +857,18 @@ export class PegasusActor extends Actor {
return this.traumaState return this.traumaState
} }
/* -------------------------------------------- */
getLevelRemaining() {
return this.data.data.biodata.currentlevelremaining
}
/* -------------------------------------------- */
modifyHeroLevelRemaining( incDec) {
let biodata = duplicate(this.data.data.biodata)
biodata.currentlevelremaining = Math.max(biodata.currentlevelremaining+incDec, 0)
this.update( {"data.biodata": biodata} )
return biodata.currentlevelremaining
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async computeNRGHealth() { async computeNRGHealth() {
if (this.isToken) return if (this.isToken) return
@ -1205,6 +1217,7 @@ export class PegasusActor extends Actor {
rollData.actorId = this.id rollData.actorId = this.id
rollData.img = this.img rollData.img = this.img
rollData.traumaState = this.getTraumaState() rollData.traumaState = this.getTraumaState()
rollData.levelRemaining = this.getLevelRemaining()
rollData.activePerks = duplicate(this.getActivePerks()) rollData.activePerks = duplicate(this.getActivePerks())
rollData.diceList = PegasusUtility.getDiceList() rollData.diceList = PegasusUtility.getDiceList()
rollData.dicePool = [] rollData.dicePool = []
@ -1223,7 +1236,7 @@ export class PegasusActor extends Actor {
} }
let diceKey = PegasusUtility.getDiceFromLevel(rollData.stat.value) let diceKey = PegasusUtility.getDiceFromLevel(rollData.stat.value)
rollData.dicePool.push({ rollData.dicePool.push({
name: "stat", key: diceKey, name: "stat", key: diceKey, mod: rollData.stat.mod,
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp` img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
}) })
} }
@ -1236,6 +1249,15 @@ export class PegasusActor extends Actor {
return rollData return rollData
} }
/* -------------------------------------------- */
getLevelRemainingList( ) {
let options = []
for (let i=0; i<=this.data.data.biodata.maxlevelremaining; i++) {
options.push( `<option value="${i}">${i}</option>`)
}
return options.join("\n")
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async startRoll(rollData) { async startRoll(rollData) {
this.syncRoll(rollData); this.syncRoll(rollData);
@ -1251,7 +1273,7 @@ export class PegasusActor extends Actor {
let power = this.data.items.get(itemId) let power = this.data.items.get(itemId)
if (power) { if (power) {
power = duplicate(power) power = duplicate(power)
this.rollPool(power.data.dmgstatistic) this.rollPool(power.data.dmgstatistic, false, "power-dmg")
} }
} }
@ -1264,7 +1286,9 @@ export class PegasusActor extends Actor {
rollData.subKey = subKey rollData.subKey = subKey
rollData.title = `Roll : ${stat.label} ` rollData.title = `Roll : ${stat.label} `
rollData.img = "icons/dice/d12black.svg" rollData.img = "icons/dice/d12black.svg"
if (subKey == "melee-dmg" || subKey == "ranged-dmg" || subKey == "power-dmg") {
rollData.isDamage = true
}
this.startRoll(rollData) this.startRoll(rollData)
} else { } else {
ui.notifications.warn("Statistic not found !"); ui.notifications.warn("Statistic not found !");
@ -1312,6 +1336,7 @@ export class PegasusActor extends Actor {
rollData.specName = spec.name rollData.specName = spec.name
rollData.img = spec.img rollData.img = spec.img
rollData.specDicesLevel = spec.data.level rollData.specDicesLevel = spec.data.level
PegasusUtility.updateSpecDicePool(rollData)
this.startRoll(rollData) this.startRoll(rollData)
} else { } else {
ui.notifications.warn("Specialisation not found !"); ui.notifications.warn("Specialisation not found !");
@ -1355,7 +1380,7 @@ export class PegasusActor extends Actor {
rollData.title = `Armor : ${armor.name}` rollData.title = `Armor : ${armor.name}`
rollData.isResistance = true; rollData.isResistance = true;
rollData.img = armor.img rollData.img = armor.img
rollData.otherDicesLevel = armor.data.resistance rollData.damageDiceLevel = armor.data.resistance
this.startRoll(rollData); this.startRoll(rollData);
} else { } else {

View File

@ -5,7 +5,7 @@ export class PegasusRollDialog extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
static async create(actor, rollData) { static async create(actor, rollData) {
let options = { classes: ["PegasusDialog"], width: 620, height: 380, 'z-index': 99999 }; let options = { classes: ["PegasusDialog"], width: 620, height: 480, 'z-index': 99999 };
let html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-generic.html', rollData); let html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-generic.html', rollData);
return new PegasusRollDialog(actor, rollData, html, options); return new PegasusRollDialog(actor, rollData, html, options);
@ -63,7 +63,7 @@ export class PegasusRollDialog extends Dialog {
idVal = "#statDicesLevel" idVal = "#statDicesLevel"
} }
if (effectData.data.otherdice) { if (effectData.data.otherdice) {
idVal = "#otherDicesLevel" idVal = "#damageDiceLevel"
} }
if (effectData.data.hindrance) { if (effectData.data.hindrance) {
idVal = "#hindranceDicesLevel" idVal = "#hindranceDicesLevel"
@ -96,8 +96,9 @@ export class PegasusRollDialog extends Dialog {
this.rollData.specDicesLevel = Number($('#specDicesLevel').val()) this.rollData.specDicesLevel = Number($('#specDicesLevel').val())
//this.rollData.bonusDicesLevel = Number($('#bonusDicesLevel').val()) //this.rollData.bonusDicesLevel = Number($('#bonusDicesLevel').val())
//this.rollData.hindranceDicesLevel = Number($('#hindranceDicesLevel').val()) //this.rollData.hindranceDicesLevel = Number($('#hindranceDicesLevel').val())
this.rollData.otherDicesLevel = Number($('#otherDicesLevel').val()) this.rollData.damageDiceLevel = Number($('#damageDiceLevel').val())
PegasusUtility.updateSpecDicePool(this.rollData) PegasusUtility.updateSpecDicePool(this.rollData)
PegasusUtility.updateDamageDicePool(this.rollData)
PegasusUtility.updateEffectsBonusDice(this.rollData) PegasusUtility.updateEffectsBonusDice(this.rollData)
} }
@ -148,7 +149,7 @@ export class PegasusRollDialog extends Dialog {
let equip = this.rollData.equipmentsList[equipIdx] let equip = this.rollData.equipmentsList[equipIdx]
if (equip) { if (equip) {
equip.applied = toggled equip.applied = toggled
let idVal = "#otherDicesLevel" // Default let idVal = "#damageDiceLevel" // Default
if (equip.equip.data.bonusdice) { if (equip.equip.data.bonusdice) {
idVal = "#bonusDicesLevel" idVal = "#bonusDicesLevel"
} }
@ -156,7 +157,7 @@ export class PegasusRollDialog extends Dialog {
idVal = "#statDicesLevel" idVal = "#statDicesLevel"
} }
if (equip.equip.data.otherdice) { if (equip.equip.data.otherdice) {
idVal = "#otherDicesLevel" idVal = "#damageDiceLevel"
} }
let newLevel = Number($(idVal).val()) let newLevel = Number($(idVal).val())
if (toggled) { if (toggled) {
@ -171,7 +172,7 @@ export class PegasusRollDialog extends Dialog {
this.rollData.specDicesLevel = Number($('#specDicesLevel').val()) this.rollData.specDicesLevel = Number($('#specDicesLevel').val())
this.rollData.bonusDicesLevel = Number($('#bonusDicesLevel').val()) this.rollData.bonusDicesLevel = Number($('#bonusDicesLevel').val())
this.rollData.hindranceDicesLevel = Number($('#hindranceDicesLevel').val()) this.rollData.hindranceDicesLevel = Number($('#hindranceDicesLevel').val())
this.rollData.otherDicesLevel = Number($('#otherDicesLevel').val()) this.rollData.damageDiceLevel = Number($('#damageDiceLevel').val())
} }
} }
@ -214,14 +215,10 @@ export class PegasusRollDialog extends Dialog {
PegasusUtility.updateSpecDicePool(this.rollData) PegasusUtility.updateSpecDicePool(this.rollData)
this.refreshDialog() this.refreshDialog()
}); });
html.find('#bonusDicesLevel').change((event) => { html.find('#damageDiceLevel').change(async (event) => {
this.rollData.bonusDicesLevel = Number(event.currentTarget.value) this.rollData.damageDiceLevel = Number(event.currentTarget.value)
}); PegasusUtility.updateDamageDicePool(this.rollData)
html.find('#hindranceDicesLevel').change((event) => { this.refreshDialog()
this.rollData.hindranceDicesLevel = Number(event.currentTarget.value)
});
html.find('#otherDicesLevel').change((event) => {
this.rollData.otherDicesLevel = Number(event.currentTarget.value)
}); });
html.find('.effect-clicked').change(async (event) => { html.find('.effect-clicked').change(async (event) => {
let toggled = event.currentTarget.checked let toggled = event.currentTarget.checked

View File

@ -81,16 +81,38 @@ export class PegasusUtility {
rollData.dicePool = newDicePool rollData.dicePool = newDicePool
} }
/* -------------------------------------------- */
static updateDamageDicePool(rollData) {
if (rollData.isDamage) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "damage")
if (rollData.damageDiceLevel > 0) {
let diceKey = PegasusUtility.getDiceFromLevel(rollData.damageDiceLevel)
let diceList = diceKey.split(" ")
for(let myDice of diceList) {
let newDice = {
name: "damage", key: myDice,
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
newDicePool.push(newDice)
}
}
rollData.dicePool = newDicePool
}
}
/* -------------------------------------------- */ /* -------------------------------------------- */
static updateSpecDicePool(rollData) { static updateSpecDicePool(rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "spec") let newDicePool = rollData.dicePool.filter(dice => dice.name != "spec")
if (rollData.specDicesLevel > 0) { if (rollData.specDicesLevel > 0) {
let diceKey = PegasusUtility.getDiceFromLevel(rollData.specDicesLevel) let diceKey = PegasusUtility.getDiceFromLevel(rollData.specDicesLevel)
let newDice = { let diceList = diceKey.split(" ")
name: "spec", key: diceKey, for(let myDice of diceList) {
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp` let newDice = {
name: "spec", key: myDice,
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
newDicePool.push(newDice)
} }
newDicePool.push(newDice)
} }
rollData.dicePool = newDicePool rollData.dicePool = newDicePool
} }
@ -107,8 +129,7 @@ export class PegasusUtility {
/*-------------------------------------------- */ /*-------------------------------------------- */
static removeFromDicePool( rollData, diceIdx ) { static removeFromDicePool( rollData, diceIdx ) {
let toRemove = rollData.dicePool[diceIdx] let toRemove = rollData.dicePool[diceIdx]
console.log("CLICK : ", rollData.dicePool, diceIdx) if (toRemove && toRemove.name != "spec" && toRemove.name != "stat" && toRemove.name != "damage") {
if (toRemove && toRemove.name != "spec" && toRemove.name != "stat") {
let newDicePool = [] let newDicePool = []
for (let i=0; i<rollData.dicePool.length; i++) { for (let i=0; i<rollData.dicePool.length; i++) {
if ( i!=diceIdx) { if ( i!=diceIdx) {
@ -259,10 +280,17 @@ export class PegasusUtility {
html.on("click", '.chat-create-actor', event => { html.on("click", '.chat-create-actor', event => {
game.system.pegasus.creator.processChatEvent(event); game.system.pegasus.creator.processChatEvent(event);
}); })
html.on("click", '.view-item-from-chat', event => { html.on("click", '.view-item-from-chat', event => {
game.system.pegasus.creator.openItemView(event) game.system.pegasus.creator.openItemView(event)
}); })
html.on("click", '.reroll-level-remaining', event => {
let rollId = $(event.currentTarget).data("roll-id")
let rollData = this.getRollData(rollId)
rollData.reroll = true
this.rollPegasus( rollData)
})
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -347,7 +375,7 @@ export class PegasusUtility {
static getDiceValue(level = 0) { static getDiceValue(level = 0) {
let diceString = this.diceList[level] let diceString = this.diceList[level]
if (!diceString) { if (!diceString) {
console.log("Level error", level) return __name2DiceValue[level]
} }
let diceTab = diceString.split(" ") let diceTab = diceString.split(" ")
let diceValue = 0 let diceValue = 0
@ -554,6 +582,7 @@ export class PegasusUtility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static async rollPegasus(rollData) { static async rollPegasus(rollData) {
/*
let dicePool = [{ name: "stat", level: 0, statmod: 0 }, { name: "spec", level: 0 }, { name: "bonus", level: 0 }, { name: "hindrance", level: 0 }, { name: "other", level: 0 }]; let dicePool = [{ name: "stat", level: 0, statmod: 0 }, { name: "spec", level: 0 }, { name: "bonus", level: 0 }, { name: "hindrance", level: 0 }, { name: "other", level: 0 }];
if (rollData.stat) { if (rollData.stat) {
dicePool[0].level += Number(rollData.stat.value) dicePool[0].level += Number(rollData.stat.value)
@ -591,23 +620,34 @@ export class PegasusUtility {
diceFormulaTab.push(this.getFoundryDiceFromLevel(diceGroup.level)) diceFormulaTab.push(this.getFoundryDiceFromLevel(diceGroup.level))
} }
let diceFormula = '{' + diceFormulaTab.join(', ') + '}kh'; let diceFormula = '{' + diceFormulaTab.join(', ') + '}kh';
*/
let actor = game.actors.get(rollData.actorId)
let diceFormulaTab = []
for (let dice of rollData.dicePool) {
diceFormulaTab.push(dice.key)
}
let diceFormula = '{' + diceFormulaTab.join(', ') + '}kh + ' + (rollData.stat?.mod || 0)
// Performs roll // Performs roll
let myRoll = rollData.roll; let myRoll = rollData.roll
if (!myRoll) { // New rolls only of no rerolls if (!myRoll || rollData.reroll) { // New rolls only of no rerolls
myRoll = new Roll(diceFormula).roll({ async: false }); myRoll = new Roll(diceFormula).roll({ async: false })
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode")); await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
rollData.roll = myRoll rollData.roll = myRoll
} }
if (rollData.reroll) {
rollData.levelRemaining = actor.modifyHeroLevelRemaining(-1)
}
// Final score and keep data // Final score and keep data
rollData.finalScore = myRoll.total + dicePool[0].statmod; rollData.finalScore = myRoll.total
if (rollData.damages) { if (rollData.damages) {
let dmgFormula = this.getFoundryDiceFromLevel(rollData.damages.value) let dmgFormula = this.getFoundryDiceFromLevel(rollData.damages.value)
let dmgRoll = new Roll(dmgFormula).roll({ async: false }); let dmgRoll = new Roll(dmgFormula).roll({ async: false })
await this.showDiceSoNice(dmgRoll, game.settings.get("core", "rollMode")); await this.showDiceSoNice(dmgRoll, game.settings.get("core", "rollMode"))
rollData.dmgResult = dmgRoll.total; rollData.dmgResult = dmgRoll.total
} }
this.createChatWithRollMode(rollData.alias, { this.createChatWithRollMode(rollData.alias, {
@ -617,12 +657,11 @@ export class PegasusUtility {
// Init stuf // Init stuf
if (rollData.isInit) { if (rollData.isInit) {
let combat = game.combats.get(rollData.combatId) let combat = game.combats.get(rollData.combatId)
combat.updateEmbeddedDocuments("Combatant", [{ _id: rollData.combatantId, initiative: rollData.finalScore }]); combat.updateEmbeddedDocuments("Combatant", [{ _id: rollData.combatantId, initiative: rollData.finalScore }])
} }
// Stun specific -> Suffere a stun level when dmg-res // Stun specific -> Suffere a stun level when dmg-res
if (rollData.subKey && rollData.subKey == "dmg-res") { if (rollData.subKey && rollData.subKey == "dmg-res") {
let actor = game.actors.get(rollData.actorId)
actor.modifyStun(-1) actor.modifyStun(-1)
} }

View File

@ -180,9 +180,9 @@
"styles": [ "styles": [
"styles/simple.css" "styles/simple.css"
], ],
"templateVersion": 92, "templateVersion": 94,
"title": "Pegasus RPG", "title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg", "url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
"version": "0.5.13", "version": "0.5.15",
"background" : "./images/ui/pegasus_welcome_page.webp" "background" : "./images/ui/pegasus_welcome_page.webp"
} }

View File

@ -21,7 +21,8 @@
"catchphraseused": false, "catchphraseused": false,
"catchphrasetrigger": "", "catchphrasetrigger": "",
"charactervalue": 0, "charactervalue": 0,
"level": 0, "maxlevelremaining": 0,
"currentlevelremaining": 0,
"threatlevel": 0, "threatlevel": 0,
"cdp": 0, "cdp": 0,
"cdpused": 0, "cdpused": 0,
@ -197,7 +198,7 @@
} }
}, },
"Item": { "Item": {
"types": [ "race", "role", "ability", "specialisation", "perk", "power" , "armor", "shield", "equipment", "weapon", "effect", "money", "virtuevice"], "types": [ "race", "role", "ability", "specialisation", "perk", "power" , "armor", "shield", "equipment", "weapon", "effect", "money", "virtue", "vice"],
"effect": { "effect": {
"type": "", "type": "",
"genre": "", "genre": "",
@ -266,9 +267,13 @@
"threatlevel": 0, "threatlevel": 0,
"description": "" "description": ""
}, },
"virtuevice": { "virtue": {
"subtype": "",
"unavailablevice": [], "unavailablevice": [],
"effectsgained": [],
"threatlevel": 0,
"description": ""
},
"vice": {
"unavailablevirtue": [], "unavailablevirtue": [],
"effectsgained": [], "effectsgained": [],
"threatlevel": 0, "threatlevel": 0,

View File

@ -927,13 +927,16 @@
<input type="text" class="" name="data.biodata.cdp" value="{{data.biodata.cdp}}" data-dtype="Number" /> <input type="text" class="" name="data.biodata.cdp" value="{{data.biodata.cdp}}" data-dtype="Number" />
</li> </li>
<li class="flexrow"> <li class="flexrow">
<label class="short-label">Hero Level : </label> <label class="short-label">Hero Level (max) : </label>
<input type="text" class="" name="data.biodata.level" value="{{data.biodata.level}}" data-dtype="Number" /> <input type="text" class="" name="data.biodata.maxlevelremaining" value="{{data.biodata.maxlevelremaining}}" data-dtype="Number" />
</li> </li>
<li class="flexrow"> <li class="flexrow">
<label class="short-label">Hero Levels Remaining : </label> <label class="short-label">Hero Levels Remaining : </label>
<input type="text" class="" name="data.biodata.cdpused" value="{{data.biodata.cdpused}}" <select class="status-small-label color-class-common" type="text" name="data.biodata.currentlevelremaining" value="{{data.biodata.currentlevelremaining}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
data-dtype="Number" /> {{#select data.biodata.currentlevelremaining}}
{{{@root.levelRemainingList}}}
{{/select}}
</select>
</li> </li>
<li class="flexrow"> <li class="flexrow">
<label class="short-label">Threat Level : </label> <label class="short-label">Threat Level : </label>

View File

@ -48,6 +48,10 @@
{{/if}} {{/if}}
{{/if}} {{/if}}
{{#if levelRemaining}}
<button class="chat-card-button reroll-level-remaining" data-roll-id="{{rollId}}">Reroll</button>
{{/if}}
</ul> </ul>
</div> </div>

View File

@ -88,25 +88,6 @@
</li> </li>
</li> </li>
<!--
<li class="flexrow"><label class="generic-label">AoE</label>
<input type="text" class="padd-right" name="data.aoe" value="{{data.aoe}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="generic-label">Affected Circumstances</label>
<input type="text" class="padd-right" name="data.affectedcircumstances" value="{{data.affectedcircumstances}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="generic-label">NRG Cost</label>
<input type="text" class="padd-right" name="data.nrgcost" value="{{data.nrgcost}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Opponents Gain Hindrance Dice</label>
<select class="competence-base flexrow" type="text" name="data.opponenthindrance" value="{{data.opponenthindrance}}" data-dtype="Number">
{{#select data.opponenthindrance}}
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
-->
<li class="flexrow"><label class="generic-label">Threat Level Value</label> <li class="flexrow"><label class="generic-label">Threat Level Value</label>
<input type="text" class="input-numeric-short padd-right" name="data.threatlevel" value="{{data.threatlevel}}" data-dtype="Number"/> <input type="text" class="input-numeric-short padd-right" name="data.threatlevel" value="{{data.threatlevel}}" data-dtype="Number"/>
</li> </li>

View File

@ -0,0 +1,59 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<li class="flexrow"><label class="generic-label">Unavailable Virtue</label>
</li>
<li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-ability-effect"><label>Drop Virtue here !</label></div>
</li>
{{#each data.unavailablevirtue as |vice idx|}}
<li class="flexrow">
<label name="data.unavailablevirtue[{{idx}}].name"><a class="view-subitem" data-type="unavailablevirtue" data-index="{{idx}}">{{vice.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="unavailablevirtue" data-index="{{idx}}" title="Delete Virtue"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
<li class="flexrow"><label class="generic-label">Effects Gained</label>
</li>
<li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-ability-effect"><label>Drop Effects here !</label></div>
</li>
{{#each data.effectsgained as |effect idx|}}
<li class="flexrow">
<label name="data.effectsgained[{{idx}}].name"><a class="view-subitem" data-type="effectsgained" data-index="{{idx}}">{{effect.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="effectsgained" data-index="{{idx}}" title="Delete Effect"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
<li class="flexrow"><label class="generic-label">Threat Level Value</label>
<input type="text" class="input-numeric-short padd-right" name="data.threatlevel" value="{{data.threatlevel}}" data-dtype="Number"/>
</li>
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,59 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<li class="flexrow"><label class="generic-label">Unavailable Vice</label>
</li>
<li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-ability-effect"><label>Drop Vice here !</label></div>
</li>
{{#each data.unavailablevice as |vice idx|}}
<li class="flexrow">
<label name="data.unavailablevice[{{idx}}].name"><a class="view-subitem" data-type="unavailablevice" data-index="{{idx}}">{{vice.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="unavailablevice" data-index="{{idx}}" title="Delete Vice"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
<li class="flexrow"><label class="generic-label">Effects Gained</label>
</li>
<li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-ability-effect"><label>Drop Effects here !</label></div>
</li>
{{#each data.effectsgained as |effect idx|}}
<li class="flexrow">
<label name="data.effectsgained[{{idx}}].name"><a class="view-subitem" data-type="effectsgained" data-index="{{idx}}">{{effect.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="effectsgained" data-index="{{idx}}" title="Delete Effect"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
<li class="flexrow"><label class="generic-label">Threat Level Value</label>
<input type="text" class="input-numeric-short padd-right" name="data.threatlevel" value="{{data.threatlevel}}" data-dtype="Number"/>
</li>
</ul>
</div>
</section>
</form>

View File

@ -10,6 +10,9 @@
<div class="flexcol"> <div class="flexcol">
{{#if isGeneric}}
{{else}}
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">Stat Dice : </span> <span class="roll-dialog-label">Stat Dice : </span>
<select class="roll-dialog-label" id="statDicesLevel" type="text" name="statDicesLevel" <select class="roll-dialog-label" id="statDicesLevel" type="text" name="statDicesLevel"
@ -21,21 +24,21 @@
<span class="small-label">&nbsp;+&nbsp;{{statMod}}</span> <span class="small-label">&nbsp;+&nbsp;{{statMod}}</span>
</div> </div>
{{#if specList}} {{#if specList}}
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">Spec : </span> <span class="roll-dialog-label">Spec : </span>
<select class="roll-dialog-label" id="specList" type="text" name="selectedSpec" value="{{selectedSpec}}" <select class="roll-dialog-label" id="specList" type="text" name="selectedSpec" value="{{selectedSpec}}"
data-dtype="String"> data-dtype="String">
{{#select selectedSpec}} {{#select selectedSpec}}
<option value="0">None</option> <option value="0">None</option>
{{#each specList as |spec idx|}} {{#each specList as |spec idx|}}
<option value="{{spec._id}}">{{spec.name}}</option> <option value="{{spec._id}}">{{spec.name}}</option>
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<span class="small-label">&nbsp;</span> <span class="small-label">&nbsp;</span>
</div> </div>
{{/if}} {{/if}}
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">Spec Dice : </span> <span class="roll-dialog-label">Spec Dice : </span>
@ -47,17 +50,20 @@
</select> </select>
<span class="small-label">&nbsp;</span> <span class="small-label">&nbsp;</span>
</div> </div>
{{/if}}
{{#if isDamage}}
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">Weapon Damage :</span> <span class="roll-dialog-label">Weapon Damage :</span>
<select class="roll-dialog-label" id="otherDicesLevel" type="text" name="otherDicesLevel" <select class="roll-dialog-label" id="damageDiceLevel" type="text" name="damageDiceLevel"
value="{{otherDicesLevel}}" data-dtype="Number"> value="{{damageDiceLevel}}" data-dtype="Number">
{{#select otherDicesLevel}} {{#select damageDiceLevel}}
{{{optionsDiceList}}} {{{optionsDiceList}}}
{{/select}} {{/select}}
</select> </select>
<span class="small-label">&nbsp;</span> <span class="small-label">&nbsp;</span>
</div> </div>
{{/if}}
<div class="dice-pool-div"> <div class="dice-pool-div">
<span> <span>