v2 changes

This commit is contained in:
sladecraven 2022-07-10 10:22:04 +02:00
parent 55efa32739
commit f66b9c1913
32 changed files with 836 additions and 460 deletions

BIN
images/dice/PR2207-1063.pdf Normal file

Binary file not shown.

BIN
images/dice/d10.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
images/dice/d12.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
images/dice/d4.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
images/dice/d6.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
images/dice/d6_1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

BIN
images/dice/d6_2.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

BIN
images/dice/d6_3.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

BIN
images/dice/d6_4.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/dice/d6_5.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/dice/d6_6.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/dice/d8.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -15,7 +15,7 @@ export class PegasusActorSheet extends ActorSheet {
return mergeObject(super.defaultOptions, { return mergeObject(super.defaultOptions, {
classes: ["fvtt-pegasus-rpg", "sheet", "actor"], classes: ["fvtt-pegasus-rpg", "sheet", "actor"],
template: "systems/fvtt-pegasus-rpg/templates/actor-sheet.html", template: "systems/fvtt-pegasus-rpg/templates/actor-sheet.html",
width: 920, width: 960,
height: 720, height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "combat" }], tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "combat" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }], dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
@ -38,6 +38,7 @@ export class PegasusActorSheet extends ActorSheet {
editable: this.isEditable, editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked", cssClass: this.isEditable ? "editable" : "locked",
data: actorData, data: actorData,
traumaState: this.actor.getTraumaState(),
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)), effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
limited: this.object.limited, limited: this.object.limited,
specs: this.actor.getSpecs( ), specs: this.actor.getSpecs( ),
@ -210,6 +211,14 @@ export class PegasusActorSheet extends ActorSheet {
this.actor.incDecAmmo( li.data("item-id"), +1 ) this.actor.incDecAmmo( li.data("item-id"), +1 )
} ); } );
html.find('.stun-minus').click(event => {
this.actor.modifyStun( -1 )
} )
html.find('.stun-plus').click(event => {
this.actor.modifyStun( 1 )
} )
html.find('.momentum-minus').click(event => { html.find('.momentum-minus').click(event => {
this.actor.modifyMomentum( -1 ) this.actor.modifyMomentum( -1 )
} ) } )
@ -224,22 +233,22 @@ export class PegasusActorSheet extends ActorSheet {
this.openGenericRoll() this.openGenericRoll()
} ); } );
html.find('.attack-melee').click((event) => { html.find('.attack-melee').click((event) => {
this.actor.rollPool( 'com'); this.actor.rollPool( 'com', false, "melee-atk");
}); });
html.find('.attack-ranged').click((event) => { html.find('.attack-ranged').click((event) => {
this.actor.rollPool( 'agi'); this.actor.rollPool( 'agi', false, "ranged-atk");
}); });
html.find('.defense-roll').click((event) => { html.find('.defense-roll').click((event) => {
this.actor.rollPool( 'def', true); this.actor.rollPool( 'def', true);
}); });
html.find('.damage-melee').click((event) => { html.find('.damage-melee').click((event) => {
this.actor.rollPool( 'str'); this.actor.rollPool( 'str', false, "melee-dmg");
}); });
html.find('.damage-ranged').click((event) => { html.find('.damage-ranged').click((event) => {
this.actor.rollPool( 'per'); this.actor.rollPool( 'per', false, "ranged-dmg");
}); });
html.find('.damage-resistance').click((event) => { html.find('.damage-resistance').click((event) => {
this.actor.rollPool( 'phy'); this.actor.rollPool( 'phy', false, "dmg-res");
}); });
html.find('.roll-stat').click((event) => { html.find('.roll-stat').click((event) => {

View File

@ -399,6 +399,34 @@ export class PegasusActor extends Actor {
} }
} }
/* -------------------------------------------- */
modifyStun(incDec) {
let combat = duplicate(this.data.data.combat)
combat.stunlevel += incDec
if (combat.stunlevel >= 0) {
this.update({ 'data.combat': combat })
let chatData = {
user: game.user.id,
rollMode: game.settings.get("core", "rollMode"),
whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM'))
}
if (incDec > 0) {
chatData.content = `<div>${this.name} suffered a Stun level.</div`
} else {
chatData.content = `<div>${this.name} recovered a Stun level.</div`
}
ChatMessage.create(chatData)
} else {
ui.notifications.warn("Stun level cannot go below 0")
}
let stunAbove = combat.stunlevel - combat.stunthreshold
if (incDec > 0 && stunAbove > 0) {
let delirium = duplicate(this.data.data.secondary.delirium)
delirium.value -= incDec
this.update({ 'data.secondary.delirium': delirium })
}
}
/* -------------------------------------------- */ /* -------------------------------------------- */
modifyMomentum(incDec) { modifyMomentum(incDec) {
let momentum = duplicate(this.data.data.momentum) let momentum = duplicate(this.data.data.momentum)
@ -705,6 +733,18 @@ export class PegasusActor extends Actor {
if (item.data.data.status == status) return;// Ensure we are really changing the status if (item.data.data.status == status) return;// Ensure we are really changing the status
// Severe Trauma management
if (this.getTraumaState() == "severetrauma") {
let chatData = {
user: game.user.id,
rollMode: game.settings.get("core", "rollMode"),
whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM'))
}
chatData.content = `<div>${this.name} is suffering from Severe Trauma and cannot use Perks at this time.</div`
ChatMessage.create(chatData)
return
}
let updateOK = true let updateOK = true
if (status == "ready") { if (status == "ready") {
await this.cleanPerkEffects(itemId) await this.cleanPerkEffects(itemId)
@ -803,6 +843,20 @@ export class PegasusActor extends Actor {
} }
} }
/* -------------------------------------------- */
getTraumaState() {
this.traumaState = "none"
if (this.type == "character") {
if (this.data.data.secondary.delirium.value >= 0 && this.data.data.secondary.delirium.value <= Math.floor((this.data.data.secondary.delirium.max + 1) / 2)) {
this.traumaState = "trauma"
}
if (this.data.data.secondary.delirium.value < 0) {
this.traumaState = "severetrauma"
}
}
return this.traumaState
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async computeNRGHealth() { async computeNRGHealth() {
if (this.isToken) return if (this.isToken) return
@ -883,12 +937,15 @@ export class PegasusActor extends Actor {
// Update current hindrance level // Update current hindrance level
let hindrance = this.data.data.combat.hindrancedice let hindrance = this.data.data.combat.hindrancedice
if (this.data.data.secondary.health.value < 0) { if (this.data.data.secondary.health.value < 0) {
hindrance += Math.abs(this.data.data.secondary.health.value) if (this.data.data.secondary.health.value < -Math.floor((this.data.data.secondary.health.value + 1) / 2)) { // Severe wounded
hindrance += 3
} else {
hindrance += 1
} }
if (this.data.data.secondary.delirium.value < 0) {
hindrance += Math.abs(this.data.data.secondary.delirium.value)
} }
this.data.data.combat.hindrancedice = hindrance this.data.data.combat.hindrancedice = hindrance
this.getTraumaState()
} }
} }
@ -1091,7 +1148,13 @@ export class PegasusActor extends Actor {
if (effect.data.effectstatlevel) { if (effect.data.effectstatlevel) {
effect.data.effectlevel = this.data.data.statistics[effect.data.effectstat].value effect.data.effectlevel = this.data.data.statistics[effect.data.effectstat].value
} }
if (this.getTraumaState() == "none") {
rollData.effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel }) rollData.effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel })
} else {
if (!effect.data.bonusdice) { // Do not push bonus dice effect when TraumaState is activated
rollData.effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel })
}
}
} }
} }
} }
@ -1141,7 +1204,10 @@ export class PegasusActor extends Actor {
rollData.actorImg = this.img rollData.actorImg = this.img
rollData.actorId = this.id rollData.actorId = this.id
rollData.img = this.img rollData.img = this.img
rollData.traumaState = this.getTraumaState()
rollData.activePerks = duplicate(this.getActivePerks()) rollData.activePerks = duplicate(this.getActivePerks())
rollData.diceList = PegasusUtility.getDiceList()
rollData.dicePool = []
if (statKey) { if (statKey) {
rollData.statKey = statKey rollData.statKey = statKey
@ -1155,6 +1221,11 @@ export class PegasusActor extends Actor {
} else { } else {
rollData.img = `systems/fvtt-pegasus-rpg/images/icons/${rollData.stat.abbrev}.webp` rollData.img = `systems/fvtt-pegasus-rpg/images/icons/${rollData.stat.abbrev}.webp`
} }
let diceKey = PegasusUtility.getDiceFromLevel(rollData.stat.value)
rollData.dicePool.push({
name: "stat", key: diceKey,
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
})
} }
this.addEffects(rollData) this.addEffects(rollData)
@ -1185,11 +1256,12 @@ export class PegasusActor extends Actor {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
rollPool(statKey, useShield = false) { rollPool(statKey, useShield = false, subKey = "none") {
let stat = this.getStat(statKey) let stat = this.getStat(statKey)
if (stat) { if (stat) {
let rollData = this.getCommonRollData(statKey, useShield) let rollData = this.getCommonRollData(statKey, useShield)
rollData.mode = "stat" rollData.mode = "stat"
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"
@ -1259,6 +1331,9 @@ export class PegasusActor extends Actor {
rollData.combatId = combatId rollData.combatId = combatId
rollData.combatantId = combatantId rollData.combatantId = combatantId
console.log("MR ROLL", rollData) console.log("MR ROLL", rollData)
if (isInit) {
rollData.title = "MR / Initiative"
}
this.startRoll(rollData); this.startRoll(rollData);
} else { } else {
ui.notifications.warn("MR not found !"); ui.notifications.warn("MR not found !");

View File

@ -90,7 +90,7 @@ export class PegasusCommands {
if (command && command.func) { if (command && command.func) {
const result = command.func(content, msg, params); const result = command.func(content, msg, params);
if (result == false) { if (result == false) {
RdDCommands._chatAnswer(msg, command.descr); PegasusCommands._chatAnswer(msg, command.descr);
} }
return true; return true;
} }

View File

@ -26,7 +26,8 @@ export class PegasusRollDialog extends Dialog {
icon: '<i class="fas fa-times"></i>', icon: '<i class="fas fa-times"></i>',
label: "Cancel", label: "Cancel",
callback: () => { this.close() } callback: () => { this.close() }
} }, }
},
close: close close: close
} }
@ -41,7 +42,6 @@ export class PegasusRollDialog extends Dialog {
PegasusUtility.rollPegasus(this.rollData) PegasusUtility.rollPegasus(this.rollData)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
manageEffects(effectIdx, toggled) { manageEffects(effectIdx, toggled) {
let effect = this.rollData.effectsList[effectIdx] let effect = this.rollData.effectsList[effectIdx]
@ -59,9 +59,6 @@ export class PegasusRollDialog extends Dialog {
level = effectData.data.effectlevel level = effectData.data.effectlevel
genre = effectData.data.genre genre = effectData.data.genre
effectData.data.isUsed = toggled effectData.data.isUsed = toggled
if (effectData.data.bonusdice) {
idVal = "#bonusDicesLevel"
}
if (effectData.data.reducedicevalue || effectData.data.statdice) { if (effectData.data.reducedicevalue || effectData.data.statdice) {
idVal = "#statDicesLevel" idVal = "#statDicesLevel"
} }
@ -74,9 +71,10 @@ export class PegasusRollDialog extends Dialog {
} }
} }
// Now process the dice level update // Now process the dice level update
if (idVal) {
if (toggled) {
let newLevel = Number($(idVal).val()) let newLevel = Number($(idVal).val())
console.log("Ongoing", newLevel, toggled, idVal) console.log("Ongoing", newLevel, toggled, idVal)
if (toggled) {
if (genre == 'positive') { if (genre == 'positive') {
newLevel += Number(level) newLevel += Number(level)
} else { } else {
@ -92,12 +90,15 @@ export class PegasusRollDialog extends Dialog {
newLevel = (newLevel < 0) ? 0 : newLevel newLevel = (newLevel < 0) ? 0 : newLevel
$(idVal).val(newLevel) $(idVal).val(newLevel)
} }
}
//console.log("Effect", effect, toggled) //console.log("Effect", effect, toggled)
this.rollData.statDicesLevel = Number($('#statDicesLevel').val()) this.rollData.statDicesLevel = Number($('#statDicesLevel').val())
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.otherDicesLevel = Number($('#otherDicesLevel').val())
PegasusUtility.updateSpecDicePool(this.rollData)
PegasusUtility.updateEffectsBonusDice(this.rollData)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -174,6 +175,14 @@ export class PegasusRollDialog extends Dialog {
} }
} }
/* -------------------------------------------- */
async refreshDialog() {
PegasusUtility.updateSpecDicePool(this.rollData)
const content = await renderTemplate("systems/fvtt-pegasus-rpg/templates/roll-dialog-generic.html", this.rollData)
this.data.content = content
this.render(true)
}
/* -------------------------------------------- */ /* -------------------------------------------- */
activateListeners(html) { activateListeners(html) {
super.activateListeners(html); super.activateListeners(html);
@ -194,15 +203,16 @@ export class PegasusRollDialog extends Dialog {
this.rollData.specName = undefined this.rollData.specName = undefined
$('#specDicesLevel').val(0) $('#specDicesLevel').val(0)
} }
const content = await renderTemplate("systems/fvtt-pegasus-rpg/templates/roll-dialog-generic.html", this.rollData) PegasusUtility.updateSpecDicePool(this.rollData)
this.data.content = content this.refreshDialog()
this.render(true)
}); });
html.find('#statDicesLevel').change((event) => { html.find('#statDicesLevel').change((event) => {
this.rollData.statDicesLevel = Number(event.currentTarget.value) this.rollData.statDicesLevel = Number(event.currentTarget.value)
}); });
html.find('#specDicesLevel').change((event) => { html.find('#specDicesLevel').change( async (event) => {
this.rollData.specDicesLevel = Number(event.currentTarget.value) this.rollData.specDicesLevel = Number(event.currentTarget.value)
PegasusUtility.updateSpecDicePool(this.rollData)
this.refreshDialog()
}); });
html.find('#bonusDicesLevel').change((event) => { html.find('#bonusDicesLevel').change((event) => {
this.rollData.bonusDicesLevel = Number(event.currentTarget.value) this.rollData.bonusDicesLevel = Number(event.currentTarget.value)
@ -213,10 +223,11 @@ export class PegasusRollDialog extends Dialog {
html.find('#otherDicesLevel').change((event) => { html.find('#otherDicesLevel').change((event) => {
this.rollData.otherDicesLevel = Number(event.currentTarget.value) this.rollData.otherDicesLevel = Number(event.currentTarget.value)
}); });
html.find('.effect-clicked').change((event) => { html.find('.effect-clicked').change(async (event) => {
let toggled = event.currentTarget.checked let toggled = event.currentTarget.checked
let effectIdx = $(event.currentTarget).data("effect-idx") let effectIdx = $(event.currentTarget).data("effect-idx")
this.manageEffects(effectIdx, toggled) this.manageEffects(effectIdx, toggled)
this.refreshDialog()
}); });
html.find('.armor-clicked').change((event) => { html.find('.armor-clicked').change((event) => {
let toggled = event.currentTarget.checked let toggled = event.currentTarget.checked
@ -232,7 +243,18 @@ export class PegasusRollDialog extends Dialog {
let toggled = event.currentTarget.checked let toggled = event.currentTarget.checked
let equipIdx = $(event.currentTarget).data("equip-idx") let equipIdx = $(event.currentTarget).data("equip-idx")
this.manageEquip(equipIdx, toggled) this.manageEquip(equipIdx, toggled)
}); })
html.find('.pool-add-dice').click(async (event) => {
let diceKey = $(event.currentTarget).data("dice-key")
PegasusUtility.addDicePool( this.rollData, diceKey)
this.refreshDialog()
})
html.find('.pool-remove-dice').click(async (event) => {
let idx = $(event.currentTarget).data("dice-idx")
PegasusUtility.removeFromDicePool( this.rollData, idx)
this.refreshDialog()
})
} }

View File

@ -55,10 +55,77 @@ export class PegasusUtility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static pushInitiativeOptions(html, options) { static pushInitiativeOptions(html, options) {
console.log('Option pushed....')
options.push({ name: "Apply -10", condition: true, icon: '<i class="fas fa-plus"></i>', callback: target => { PegasusCombat.decInitBy10(target.data('combatant-id'), -10); } }) options.push({ name: "Apply -10", condition: true, icon: '<i class="fas fa-plus"></i>', callback: target => { PegasusCombat.decInitBy10(target.data('combatant-id'), -10); } })
} }
/* -------------------------------------------- */
static getDiceList() {
return [{ key: "d4", img: "systems/fvtt-pegasus-rpg/images/dice/d4.webp" }, { key: "d6", img: "systems/fvtt-pegasus-rpg/images/dice/d6.webp" },
{ key: "d8", img: "systems/fvtt-pegasus-rpg/images/dice/d8.webp" }, { key: "d10", img: "systems/fvtt-pegasus-rpg/images/dice/d10.webp" },
{ key: "d12", img: "systems/fvtt-pegasus-rpg/images/dice/d12.webp" }]
}
/* -------------------------------------------- */
static updateEffectsBonusDice( rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "effect-bonus-dice")
for (let effect of rollData.effectsList) {
if (effect && effect.applied && effect.effect.data.bonusdice) {
let diceKey = PegasusUtility.getDiceFromLevel(effect.effect.data.effectlevel)
let newDice = {
name: "effect-bonus-dice", key: diceKey, effect: effect.effect.name,
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
}
newDicePool.push(newDice)
}
}
rollData.dicePool = newDicePool
}
/* -------------------------------------------- */
static updateSpecDicePool(rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "spec")
if (rollData.specDicesLevel > 0) {
let diceKey = PegasusUtility.getDiceFromLevel(rollData.specDicesLevel)
let newDice = {
name: "spec", key: diceKey,
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
}
newDicePool.push(newDice)
}
rollData.dicePool = newDicePool
}
/* -------------------------------------------- */
static addDicePool(rollData, diceKey) {
let newDice = {
name: "dice-click", key: diceKey,
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
}
rollData.dicePool.push(newDice)
}
/*-------------------------------------------- */
static removeFromDicePool( rollData, diceIdx ) {
let toRemove = rollData.dicePool[diceIdx]
console.log("CLICK : ", rollData.dicePool, diceIdx)
if (toRemove && toRemove.name != "spec" && toRemove.name != "stat") {
let newDicePool = []
for (let i=0; i<rollData.dicePool.length; i++) {
if ( i!=diceIdx) {
newDicePool.push( rollData.dicePool[i])
}
}
rollData.dicePool = newDicePool
if (toRemove.name == "effect-bonus-dice") {
for (let effect of rollData.effectsList) {
if ( effect.effect.name == toRemove.effect && effect.applied) {
effect.applied = false //Remove the effect
}
}
}
}
}
/*-------------------------------------------- */ /*-------------------------------------------- */
static getSpecs() { static getSpecs() {
return this.specs; return this.specs;
@ -468,6 +535,22 @@ export class PegasusUtility {
} }
} }
/* -------------------------------------------- */
static removeOneUseEffects(rollData) {
// De-actived used effects from perks
let toRem = []
for (let effect of rollData.effectsList) {
if (effect.effect.data.isUsed && effect.effect.data.oneuse) {
toRem.push(effect.effect._id)
}
}
if (toRem.length > 0) {
console.log("Going to remove one use effects", toRem)
let actor = game.actors.get(rollData.actorId)
actor.deleteEmbeddedDocuments('Item', toRem)
}
}
/* -------------------------------------------- */ /* -------------------------------------------- */
static async rollPegasus(rollData) { static async rollPegasus(rollData) {
@ -489,12 +572,16 @@ export class PegasusUtility {
if (rollData.specDicesLevel) { if (rollData.specDicesLevel) {
dicePool[1].level = rollData.specDicesLevel dicePool[1].level = rollData.specDicesLevel
} }
if (rollData.traumaState == "none") {
if (rollData.bonusDicesLevel) { if (rollData.bonusDicesLevel) {
dicePool[2].level += Number(rollData.bonusDicesLevel) dicePool[2].level += Number(rollData.bonusDicesLevel)
} }
}
if (!rollData.isInit) { // No Hindrance dice for Init
if (rollData.hindranceDicesLevel) { if (rollData.hindranceDicesLevel) {
dicePool[3].level += Number(rollData.hindranceDicesLevel) dicePool[3].level += Number(rollData.hindranceDicesLevel)
} }
}
if (rollData.otherDicesLevel) { if (rollData.otherDicesLevel) {
dicePool[4].level += Number(rollData.otherDicesLevel) dicePool[4].level += Number(rollData.otherDicesLevel)
} }
@ -509,7 +596,6 @@ export class PegasusUtility {
let myRoll = rollData.roll; let myRoll = rollData.roll;
if (!myRoll) { // New rolls only of no rerolls if (!myRoll) { // New rolls only of no rerolls
myRoll = new Roll(diceFormula).roll({ async: false }); myRoll = new Roll(diceFormula).roll({ async: false });
console.log("ROLL : ", diceFormula)
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode")); await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"));
rollData.roll = myRoll rollData.roll = myRoll
} }
@ -534,7 +620,14 @@ export class PegasusUtility {
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
if (rollData.subKey && rollData.subKey == "dmg-res") {
let actor = game.actors.get(rollData.actorId)
actor.modifyStun(-1)
}
//this.removeUsedPerkEffects( rollData) // Unused for now //this.removeUsedPerkEffects( rollData) // Unused for now
this.removeOneUseEffects(rollData) // Unused for now
// And save the roll // And save the roll
this.saveRollData(rollData); this.saveRollData(rollData);

View File

@ -1164,12 +1164,13 @@ ul, li {
box-shadow: inset 0px 1px 0px 0px #a6827e; box-shadow: inset 0px 1px 0px 0px #a6827e;
background: linear-gradient(to bottom, #21374afc 5%, #152833ab 100%); background: linear-gradient(to bottom, #21374afc 5%, #152833ab 100%);
background-color: #7d5d3b00; background-color: #7d5d3b00;
border-radius: 3px; border-radius: 2px;
border: 2px ridge #846109; border: 1px ridge #846109;
display: inline-block; display: inline-block;
cursor: pointer; cursor: pointer;
color: #ffffff; color: #ffffff;
padding: 0px 6px 0px 6px; margin: 2px 2px 2px 2px;
padding: 2px 2px 2px 2px;
text-decoration: none; text-decoration: none;
text-shadow: 0px 1px 0px #4d3534; text-shadow: 0px 1px 0px #4d3534;
position: relative; position: relative;
@ -1406,11 +1407,21 @@ Focus FOC: #ff0084
max-width: 12rem; max-width: 12rem;
min-width: 12rem; min-width: 12rem;
} }
.item-name-label-header-long {
flex-grow:2;
max-width: 14rem;
min-width: 14rem;
}
.item-name-label { .item-name-label {
flex-grow:2; flex-grow:2;
max-width: 10rem; max-width: 10rem;
min-width: 10rem; min-width: 10rem;
} }
.item-name-label-long {
flex-grow:2;
max-width: 12rem;
min-width: 12rem;
}
.item-name-label-level2 { .item-name-label-level2 {
flex-grow:2; flex-grow:2;
max-width: 9rem; max-width: 9rem;
@ -1446,3 +1457,29 @@ Focus FOC: #ff0084
min-width:2rem; min-width:2rem;
max-width: 2rem; max-width: 2rem;
} }
.dice-pool-stack {
flex: 1 1 5rem;
display: flex !important;
flex-grow: 0;
justify-content: flex-start;
}
.dice-pool-label {
margin-left: 4px;
}
.dice-pool-div {
border-left: 4px;
border-radius: 2px;
margin-bottom: 1rem;
background-color: #403f3e40;
}
.dice-pool-image {
border: 0;
margin-left: 4px;
min-width: 48px;
min-height: 48px;
max-width: 48px;
max-height: 48px;
flex-grow: 0;
}

View File

@ -180,9 +180,9 @@
"styles": [ "styles": [
"styles/simple.css" "styles/simple.css"
], ],
"templateVersion": 90, "templateVersion": 92,
"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.11", "version": "0.5.13",
"background" : "./images/ui/pegasus_welcome_page.webp" "background" : "./images/ui/pegasus_welcome_page.webp"
} }

View File

@ -28,7 +28,9 @@
"notes": "", "notes": "",
"gmnotes": "", "gmnotes": "",
"racename": "", "racename": "",
"rolename": "" "rolename": "",
"corruption": 0,
"moralitythreshold": 0
} }
}, },
"core": { "core": {
@ -195,7 +197,7 @@
} }
}, },
"Item": { "Item": {
"types": [ "race", "role", "ability", "specialisation", "perk", "power" , "armor", "shield", "equipment", "weapon", "effect", "money"], "types": [ "race", "role", "ability", "specialisation", "perk", "power" , "armor", "shield", "equipment", "weapon", "effect", "money", "virtuevice"],
"effect": { "effect": {
"type": "", "type": "",
"genre": "", "genre": "",
@ -205,7 +207,7 @@
"specaffected": [], "specaffected": [],
"statdice": false, "statdice": false,
"bonusdice": false, "bonusdice": false,
"otherdice": false, "weapondamage": false,
"hindrance" : false, "hindrance" : false,
"resistedby": "", "resistedby": "",
"recoveryroll": false, "recoveryroll": false,
@ -213,6 +215,7 @@
"recoveryrollspec": [], "recoveryrollspec": [],
"effectstatlevel": false, "effectstatlevel": false,
"effectstat": "", "effectstat": "",
"oneuse": false,
"description": "" "description": ""
}, },
"race": { "race": {
@ -263,6 +266,14 @@
"threatlevel": 0, "threatlevel": 0,
"description": "" "description": ""
}, },
"virtuevice": {
"subtype": "",
"unavailablevice": [],
"unavailablevirtue": [],
"effectsgained": [],
"threatlevel": 0,
"description": ""
},
"specialisation": { "specialisation": {
"statistic": "", "statistic": "",
"level": 1, "level": 1,
@ -279,6 +290,8 @@
"duration": "", "duration": "",
"isweaver": false, "isweaver": false,
"effectsgained": [], "effectsgained": [],
"category": "general",
"upgradable": false,
"features": { "features": {
"nrgcost": { "nrgcost": {
"label": "NRG cost to use", "label": "NRG cost to use",

View File

@ -21,7 +21,8 @@
<img class="stat-icon" src="icons/dice/d12black.svg"> <img class="stat-icon" src="icons/dice/d12black.svg">
</span> </span>
<span class="stat-label stat-margin" name="pool"> <span class="stat-label stat-margin" name="pool">
<h4 class="stat-text-white stat-margin"><a class="generic-pool-roll stat-margin" data-stat-key="pool">Dice Pool</a></h4> <h4 class="stat-text-white stat-margin"><a class="generic-pool-roll stat-margin"
data-stat-key="pool">Dice Pool</a></h4>
</span> </span>
</li> </li>
</ul> </ul>
@ -39,16 +40,18 @@
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/MR.webp"> <img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/MR.webp">
</span> </span>
<span class="stat-label stat-margin" name="mr"> <span class="stat-label stat-margin" name="mr">
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin" data-stat-key="mr">MR</a></h4> <h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin" data-stat-key="mr">MR</a>
</h4>
</span> </span>
<select class="status-small-label color-class-common" type="text" name="data.mr.value" value="{{data.mr.value}}" <select class="status-small-label color-class-common" type="text" name="data.mr.value"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}> value="{{data.mr.value}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select data.mr.value}} {{#select data.mr.value}}
{{{@root.optionsDiceList}}} {{{@root.optionsDiceList}}}
{{/select}} {{/select}}
</select> </select>
<input type="text" class="input-numeric-short padd-right status-small-label color-class-common" name="data.mr.mod" value="{{data.mr.mod}}" <input type="text" class="input-numeric-short padd-right status-small-label color-class-common"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}} /> name="data.mr.mod" value="{{data.mr.mod}}" data-dtype="Number" {{#unless
@root.editScore}}disabled{{/unless}} />
</li> </li>
</ul> </ul>
</div> </div>
@ -85,8 +88,9 @@
<div class="flexcol"> <div class="flexcol">
<div class="flexrow"> <div class="flexrow">
<div>
<ul class="stat-item"> <div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item color-class-melee"><a class="combat-button attack-melee flexrow"> <li class="item flexrow list-item color-class-melee"><a class="combat-button attack-melee flexrow">
<span class="combat-icon flexrow"> <span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/COM.webp"> <img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/COM.webp">
@ -144,15 +148,21 @@
<div class="stat-item"> <div class="stat-item">
<span class="generic-label"> <span class="flexrow">
<h3>Stun</h3> <h3>Stun</h3>
<span class="status-small-label no-grow">
<a class="stun-plus plus-minus-button">+</a>
<a class="stun-minus plus-minus-button">&nbsp;-</a>
</span>
</span> </span>
<ul class="stat-list alternate-list"> <ul class="stat-list alternate-list">
<li class="item stat flexrow list-item"> <li class="item stat flexrow list-item">
<span class="generic-label small-label">Current</span> <span class="generic-label small-label">Current</span>
<input type="text" class="" name="data.combat.stunlevel" value="{{data.combat.stunlevel}}" data-dtype="Number" /> <input type="text" class="" name="data.combat.stunlevel" value="{{data.combat.stunlevel}}"
data-dtype="Number" />
<span class="generic-label small-label">Threshold</span> <span class="generic-label small-label">Threshold</span>
<input type="text" class="" name="data.combat.stunthreshold" value="{{data.combat.stunthreshold}}" data-dtype="Number" /> <input type="text" class="" name="data.combat.stunthreshold" value="{{data.combat.stunthreshold}}"
data-dtype="Number" />
</li> </li>
</ul> </ul>
</div> </div>
@ -161,18 +171,18 @@
<div> <div>
<ul class="stat-list alternate-list"> <ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg"> <li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header"> <span class="item-name-label-header-long">
<h3><label class="items-title-text">Perks</label></h3> <h3><label class="items-title-text">Perks</label></h3>
</span> </span>
<span class="item-field-label-short"> <span class="item-field-label-short">
<label class="short-label">#Targets</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Level</label> <label class="short-label">Level</label>
</span> </span>
<span class="item-field-label-medium"> <span class="item-field-label-medium">
<label class="short-label">Range</label> <label class="short-label">Range</label>
</span> </span>
<span class="item-field-label-short">
<label class="short-label">#Targets</label>
</span>
<span class="item-field-label-long"> <span class="item-field-label-long">
<label class="short-label">Status</label> <label class="short-label">Status</label>
</span> </span>
@ -191,15 +201,16 @@
</li> </li>
{{#each perks as |perk key|}} {{#each perks as |perk key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{perk._id}}"> <li class="item flexrow list-item list-item-shadow" data-item-id="{{perk._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{perk.img}}" /></a> <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
<span class="item-name-label">{{perk.name}}</span> src="{{perk.img}}" /></a>
<span class="item-name-label-long">{{perk.name}}</span>
<span class="item-field-label-short">{{perk.data.level}}</span> <span class="item-field-label-short">{{perk.data.level}}</span>
{{#if perk.data.features.range.flag}} {{#if perk.data.features.range.flag}}
<span class="item-field-label-medium">{{perk.data.features.range.value}}</span> <span class="item-field-label-long">{{perk.data.features.range.value}}</span>
{{else}} {{else}}
<span class="item-field-label-medium">&nbsp;-&nbsp;</span> <span class="item-field-label-long">&nbsp;-&nbsp;</span>
{{/if}} {{/if}}
{{#if perk.data.features.nbtargets.flag}} {{#if perk.data.features.nbtargets.flag}}
@ -221,19 +232,36 @@
{{#if (ne perk.data.status "ready")}} {{#if (ne perk.data.status "ready")}}
{{#if (eq perk.data.nbuse "next1action")}} {{#if (eq perk.data.nbuse "next1action")}}
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"><input type="checkbox" class="perk-used" data-use-index="1" name="perk.data.used1" {{checked perk.data.used1}}/></label></span> <span class="item-field-label-short "><label
class="item-field-label-short attribute-value checkbox"><input type="checkbox" class="perk-used"
data-use-index="1" name="perk.data.used1" {{checked perk.data.used1}} /></label></span>
<span class="item-field-label-short ">&nbsp;</span> <span class="item-field-label-short ">&nbsp;</span>
<span class="item-field-label-short ">&nbsp;</span> <span class="item-field-label-short ">&nbsp;</span>
{{/if}} {{/if}}
{{#if (eq perk.data.nbuse "next2action")}} {{#if (eq perk.data.nbuse "next2action")}}
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="1" name="perk.data.used1" {{checked perk.data.used1}}/></label></span> <span class="item-field-label-short "><label
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="2" name="perk.data.used2" {{checked perk.data.used2}}/></label></span> class="item-field-label-short attribute-value checkbox"></label><input type="checkbox"
class="perk-used" data-use-index="1" name="perk.data.used1" {{checked
perk.data.used1}} /></label></span>
<span class="item-field-label-short "><label
class="item-field-label-short attribute-value checkbox"></label><input type="checkbox"
class="perk-used" data-use-index="2" name="perk.data.used2" {{checked
perk.data.used2}} /></label></span>
<span class="item-field-label-short ">&nbsp;</span> <span class="item-field-label-short ">&nbsp;</span>
{{/if}} {{/if}}
{{#if (eq perk.data.nbuse "next3action")}} {{#if (eq perk.data.nbuse "next3action")}}
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="1" name="perk.data.used1" {{checked perk.data.used1}}/></label></span> <span class="item-field-label-short "><label
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="2" name="perk.data.used2" {{checked perk.data.used2}}/></label></span> class="item-field-label-short attribute-value checkbox"></label><input type="checkbox"
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="3" name="perk.data.used3" {{checked perk.data.used3}}/></label></span> class="perk-used" data-use-index="1" name="perk.data.used1" {{checked
perk.data.used1}} /></label></span>
<span class="item-field-label-short "><label
class="item-field-label-short attribute-value checkbox"></label><input type="checkbox"
class="perk-used" data-use-index="2" name="perk.data.used2" {{checked
perk.data.used2}} /></label></span>
<span class="item-field-label-short "><label
class="item-field-label-short attribute-value checkbox"></label><input type="checkbox"
class="perk-used" data-use-index="3" name="perk.data.used3" {{checked
perk.data.used3}} /></label></span>
{{/if}} {{/if}}
{{else}} {{else}}
<span class="item-field-label-short "><label class="item-field-label-short">&nbsp;</label></span> <span class="item-field-label-short "><label class="item-field-label-short">&nbsp;</label></span>
@ -269,8 +297,10 @@
</li> </li>
{{#each effects as |effect key|}} {{#each effects as |effect key|}}
<li class="item stat flexrow list-item list-item-shadow" data-arme-id="{{effect.id}}" data-item-id="{{effect._id}}"> <li class="item stat flexrow list-item list-item-shadow" data-arme-id="{{effect.id}}"
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{effect.img}}" /></a> data-item-id="{{effect._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{effect.img}}" /></a>
<span class="item-name-label">{{effect.name}}</span> <span class="item-name-label">{{effect.name}}</span>
<span class="item-field-label-short">{{effect.data.effectlevel}}</span> <span class="item-field-label-short">{{effect.data.effectlevel}}</span>
<span class="item-field-label-short">{{upperFirst effect.data.type}}</span> <span class="item-field-label-short">{{upperFirst effect.data.type}}</span>
@ -306,7 +336,8 @@
</li> </li>
{{#each specs as |spec key|}} {{#each specs as |spec key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{spec._id}}"> <li class="item stat flexrow list-item list-item-shadow" data-item-id="{{spec._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{spec.img}}" /></a> <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{spec.img}}" /></a>
<span class="item-name-label"><a class="roll-spec">{{spec.name}}</a></span> <span class="item-name-label"><a class="roll-spec">{{spec.name}}</a></span>
<span class="item-field-label-short">{{upper spec.data.statistic}}</span> <span class="item-field-label-short">{{upper spec.data.statistic}}</span>
<span class="item-field-label-short">{{spec.data.dice}}</span> <span class="item-field-label-short">{{spec.data.dice}}</span>
@ -339,11 +370,21 @@
<ul> <ul>
<li class="item flexrow list-item" data-key="nrg"> <li class="item flexrow list-item" data-key="nrg">
<span class="stat-label flexrow" name="nrg"><h4>{{data.nrg.label}}</h4> </span> <span class="stat-label flexrow" name="nrg">
<span class="small-label padd-right packed-left">Activated</span><input type="text" class="padd-right update-field" data-field-name="data.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/> <h4>{{data.nrg.label}}</h4>
<span class="small-label padd-right packed-left">&nbsp;Current</span><input type="text" class="padd-right update-field" data-field-name="data.nrg.value" value="{{data.nrg.value}}" data-dtype="Number"/> </span>
<span class="small-label padd-right packed-left">&nbsp;Mod</span><input type="text" class="padd-right update-field" data-field-name="data.nrg.mod" value="{{data.nrg.mod}}" data-dtype="Number"/> <span class="small-label padd-right packed-left">Activated</span><input type="text"
<span class="small-label padd-right packed-left">&nbsp;Max</span><input type="text" class="padd-right update-field" data-field-name="data.nrg.max" value="{{data.nrg.max}}" data-dtype="Number"/> class="padd-right update-field" data-field-name="data.nrg.activated" value="{{data.nrg.activated}}"
data-dtype="Number" />
<span class="small-label padd-right packed-left">&nbsp;Current</span><input type="text"
class="padd-right update-field" data-field-name="data.nrg.value" value="{{data.nrg.value}}"
data-dtype="Number" />
<span class="small-label padd-right packed-left">&nbsp;Mod</span><input type="text"
class="padd-right update-field" data-field-name="data.nrg.mod" value="{{data.nrg.mod}}"
data-dtype="Number" />
<span class="small-label padd-right packed-left">&nbsp;Max</span><input type="text"
class="padd-right update-field" data-field-name="data.nrg.max" value="{{data.nrg.max}}"
data-dtype="Number" />
<span class="small-label padd-right packed-left"> / {{data.nrg.absolutemax}}</span> <span class="small-label padd-right packed-left"> / {{data.nrg.absolutemax}}</span>
</li> </li>
</ul> </ul>
@ -375,7 +416,8 @@
{{#each powers as |power key|}} {{#each powers as |power key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{power._id}}"> <li class="item stat flexrow list-item list-item-shadow" data-item-id="{{power._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{power.img}}" /></a> <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{power.img}}" /></a>
<span class="item-name-label"> <span class="item-name-label">
{{#if power.data.rollneeded}} {{#if power.data.rollneeded}}
<a class="power-roll">{{power.name}}</a> <a class="power-roll">{{power.name}}</a>
@ -406,7 +448,8 @@
<span class="item-field-label-medium">{{power.data.cost}}</span> <span class="item-field-label-medium">{{power.data.cost}}</span>
<span class="item-field-label-medium"> <span class="item-field-label-medium">
<input type="text" class="padd-right input-numeric-short power-cost-spent" value="{{power.data.costspent}}" data-dtype="Number"/> <input type="text" class="padd-right input-numeric-short power-cost-spent"
value="{{power.data.costspent}}" data-dtype="Number" />
</span> </span>
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
@ -439,7 +482,8 @@
</li> </li>
{{#each abilities as |ability key|}} {{#each abilities as |ability key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{ability._id}}"> <li class="item stat flexrow list-item list-item-shadow" data-item-id="{{ability._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{ability.img}}" /></a> <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{ability.img}}" /></a>
<span class="item-name-label">{{ability.name}}</span> <span class="item-name-label">{{ability.name}}</span>
<span class="item-field-label-long">{{upper ability.data.affectedstat}}</span> <span class="item-field-label-long">{{upper ability.data.affectedstat}}</span>
@ -489,7 +533,8 @@
</li> </li>
{{#each moneys as |money key|}} {{#each moneys as |money key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{money._id}}"> <li class="item flexrow list-item list-item-shadow" data-item-id="{{money._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{money.img}}" /></a> <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{money.img}}" /></a>
<span class="item-name-label">{{money.name}}</span> <span class="item-name-label">{{money.name}}</span>
<span class="item-field-label-long"><label> <span class="item-field-label-long"><label>
@ -530,6 +575,12 @@
<span class="item-field-label-short"> <span class="item-field-label-short">
<label class="short-label">DMG</label> <label class="short-label">DMG</label>
</span> </span>
<span class="item-field-label-short">
<label class="short-label">DMGT</label>
</span>
<span class="item-field-label-short">
<label class="short-label">DMGTLVL</label>
</span>
<span class="item-field-label-long"> <span class="item-field-label-long">
<label class="short-label">Ammo</label> <label class="short-label">Ammo</label>
</span> </span>
@ -542,18 +593,20 @@
<span class="item-field-label-medium"> <span class="item-field-label-medium">
<label class="short-label">IDR</label> <label class="short-label">IDR</label>
</span> </span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a> <a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
</div> </div>
</li> </li>
{{#each weapons as |weapon key|}} {{#each weapons as |weapon key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{weapon._id}}"> <li class="item flexrow list-item list-item-shadow" data-item-id="{{weapon._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{weapon.img}}"/></a> <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{weapon.img}}" /></a>
<span class="item-name-label">{{weapon.name}}</span> <span class="item-name-label">{{weapon.name}}</span>
<span class="item-field-label-short"><label>{{upper weapon.data.statistic}}</label></span> <span class="item-field-label-short"><label>{{upper weapon.data.statistic}}</label></span>
<span class="item-field-label-short"><label>{{upper weapon.data.damagestatistic}}</label></span> <span class="item-field-label-short"><label>{{upper weapon.data.damagestatistic}}</label></span>
<span class="item-field-label-short"><label>{{weapon.data.damageDice}}</label></span> <span class="item-field-label-short"><label>{{weapon.data.damageDice}}</label></span>
<span class="item-field-label-short"><label>{{weapon.data.damagetype}}</label></span>
<span class="item-field-label-short"><label>{{weapon.data.damagetypelevel}}</label></span>
{{#if (gt weapon.data.ammomax 0)}} {{#if (gt weapon.data.ammomax 0)}}
<span class="item-field-label-long"><label>{{weapon.data.ammocurrent}}/{{weapon.data.ammomax}} <span class="item-field-label-long"><label>{{weapon.data.ammocurrent}}/{{weapon.data.ammomax}}
@ -585,7 +638,6 @@
{{/if}} {{/if}}
</span> </span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
<a class="item-control item-equip" title="Worn">{{#if weapon.data.equipped}}<i <a class="item-control item-equip" title="Worn">{{#if weapon.data.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a> class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
@ -626,7 +678,8 @@
</li> </li>
{{#each armors as |armor key|}} {{#each armors as |armor key|}}
<li class="item list-item flexrow list-item-shadow" data-item-id="{{armor._id}}"> <li class="item list-item flexrow list-item-shadow" data-item-id="{{armor._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{armor.img}}" /></a> <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{armor.img}}" /></a>
<span class="item-name-label">{{armor.name}}</span> <span class="item-name-label">{{armor.name}}</span>
<span class="item-field-label-short">{{upper armor.data.statistic}}</span> <span class="item-field-label-short">{{upper armor.data.statistic}}</span>
<span class="item-field-label-short">{{armor.data.resistanceDice}}</span> <span class="item-field-label-short">{{armor.data.resistanceDice}}</span>
@ -687,7 +740,8 @@
</li> </li>
{{#each shields as |shield key|}} {{#each shields as |shield key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{shield._id}}"> <li class="item flexrow list-item list-item-shadow" data-item-id="{{shield._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{shield.img}}" /></a> <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{shield.img}}" /></a>
<span class="item-name-label">{{shield.name}}</span> <span class="item-name-label">{{shield.name}}</span>
<span class="item-field-label-short">{{shield.data.levelDice}}</span> <span class="item-field-label-short">{{shield.data.levelDice}}</span>
@ -799,12 +853,14 @@
</li> </li>
<li class="flexrow item"> <li class="flexrow item">
<label class="generic-label">Preferred Hand</label> <label class="generic-label">Preferred Hand</label>
<input type="text" class="" name="data.biodata.preferredhand" value="{{data.biodata.preferredhand}}" data-dtype="String" /> <input type="text" class="" name="data.biodata.preferredhand" value="{{data.biodata.preferredhand}}"
data-dtype="String" />
</li> </li>
<li class="flexrow item" data-item-id="{{race._id}}"> <li class="flexrow item" data-item-id="{{race._id}}">
<label class="generic-label">Race</label> <label class="generic-label">Race</label>
<a class="item-edit"><img class="stat-icon" src="{{race.img}}"></a> <a class="item-edit"><img class="stat-icon" src="{{race.img}}"></a>
<input type="text" class="" name="data.biodata.racename" value="{{race.name}}" disabled data-dtype="String" /> <input type="text" class="" name="data.biodata.racename" value="{{race.name}}" disabled
data-dtype="String" />
<div class="item-controls"> <div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
@ -812,7 +868,8 @@
<li class="flexrow item" data-item-id="{{role._id}}"> <li class="flexrow item" data-item-id="{{role._id}}">
<label class="generic-label">Role</label> <label class="generic-label">Role</label>
<a class="item-edit"><img class="stat-icon" src="{{role.img}}"></a> <a class="item-edit"><img class="stat-icon" src="{{role.img}}"></a>
<input type="text" class="" name="data.biodata.rolename" value="{{role.name}}" disabled data-dtype="String" /> <input type="text" class="" name="data.biodata.rolename" value="{{role.name}}" disabled
data-dtype="String" />
<div class="item-controls"> <div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
@ -825,13 +882,17 @@
<ul> <ul>
<li class="flexrow"> <li class="flexrow">
<label class="short-label">Worst Fear </label> <label class="short-label">Worst Fear </label>
<input type="text" class="" name="data.biodata.worstfear" value="{{data.biodata.worstfear}}" data-dtype="String" /> <input type="text" class="" name="data.biodata.worstfear" value="{{data.biodata.worstfear}}"
<label class="attribute-value checkbox"><input type="checkbox" class="change-worstfear" name="data.biodata.worstfearactive" {{checked data.biodata.worstfearactive}}/> Active ?</label> data-dtype="String" />
<label class="attribute-value checkbox"><input type="checkbox" class="change-worstfear"
name="data.biodata.worstfearactive" {{checked data.biodata.worstfearactive}} /> Active ?</label>
</li> </li>
<li class="flexrow"> <li class="flexrow">
<label class="short-label">Desires </label> <label class="short-label">Desires </label>
<input type="text" class="" name="data.biodata.desires" value="{{data.biodata.desires}}" data-dtype="String" /> <input type="text" class="" name="data.biodata.desires" value="{{data.biodata.desires}}"
<label class="attribute-value checkbox"><input type="checkbox" class="change-desires" name="data.biodata.desiresactive" {{checked data.biodata.desiresactive}}/> Active ?</label> data-dtype="String" />
<label class="attribute-value checkbox"><input type="checkbox" class="change-desires"
name="data.biodata.desiresactive" {{checked data.biodata.desiresactive}} /> Active ?</label>
</li> </li>
</ul> </ul>
@ -849,7 +910,8 @@
</li> </li>
<li class="flexrow"> <li class="flexrow">
<label class="short-label">Catchphrase used </label> <label class="short-label">Catchphrase used </label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.biodata.catchphraseused" {{checked data.biodata.catchphraseused}}/></label> <label class="attribute-value checkbox"><input type="checkbox" name="data.biodata.catchphraseused" {{checked
data.biodata.catchphraseused}} /></label>
</li> </li>
</ul> </ul>
@ -862,13 +924,11 @@
</li> </li>
<li class="flexrow"> <li class="flexrow">
<label class="short-label">Character Development Points Total (CDP total) : </label> <label class="short-label">Character Development Points Total (CDP total) : </label>
<input type="text" class="" name="data.biodata.cdp" value="{{data.biodata.cdp}}" <input type="text" class="" name="data.biodata.cdp" value="{{data.biodata.cdp}}" data-dtype="Number" />
data-dtype="Number" />
</li> </li>
<li class="flexrow"> <li class="flexrow">
<label class="short-label">Hero Level : </label> <label class="short-label">Hero Level : </label>
<input type="text" class="" name="data.biodata.level" value="{{data.biodata.level}}" <input type="text" class="" name="data.biodata.level" value="{{data.biodata.level}}" data-dtype="Number" />
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>

24
templates/deleted.html Normal file
View File

@ -0,0 +1,24 @@
{{#if (eq traumaState "none")}}
<div class="flexrow">
<span class="roll-dialog-label" >Bonus Dice : </span>
<select class="roll-dialog-label" id="bonusDicesLevel" type="text" name="bonusDicesLevel" value="{{bonusDicesLevel}}" data-dtype="Number">
{{#select bonusDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
{{/if}}
{{#if isInit}}
{{else}}
<div class="flexrow">
<span class="roll-dialog-label" >Hindrance Dice :</span>
<select class="roll-dialog-label" id="hindranceDicesLevel" type="text" name="hindranceDicesLevel" value="{{hindranceDicesLevel}}" data-dtype="Number">
{{#select hindranceDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
{{/if}}

View File

@ -26,7 +26,7 @@
</select> </select>
</li> </li>
<li class="flexrow"><label class="generic-label">DMG RES Other Dice</label> <li class="flexrow"><label class="generic-label">DMG RES Dice</label>
<select class="competence-base flexrow" type="text" name="data.resistance" value="{{data.resistance}}" data-dtype="Number"> <select class="competence-base flexrow" type="text" name="data.resistance" value="{{data.resistance}}" data-dtype="Number">
{{#select data.resistance}} {{#select data.resistance}}
{{{optionsDiceList}}} {{{optionsDiceList}}}

View File

@ -34,7 +34,11 @@
</select> </select>
</li> </li>
<li class="flexrow"><label class="generic-label">'Effect Level is a Stat?</label> <li class="flexrow"><label class="generic-label">One use?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.oneuse" {{checked data.oneuse}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Effect Level is a Stat?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.effectstatlevel" {{checked data.effectstatlevel}}/></label> <label class="attribute-value checkbox"><input type="checkbox" name="data.effectstatlevel" {{checked data.effectstatlevel}}/></label>
</li> </li>
@ -71,7 +75,7 @@
<li class="flexrow"><label class="generic-label">Affected Stat</label> <li class="flexrow"><label class="generic-label">Affected Stat</label>
<select class="competence-base flexrow" type="text" name="data.stataffected" value="{{data.stataffected}}" data-dtype="String"> <select class="competence-base flexrow" type="text" name="data.stataffected" value="{{data.stataffected}}" data-dtype="String">
{{#select data.stataffected}} {{#select data.stataffected}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=true mr=true all=true}} {{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=true mr=true all=true combat=true}}
{{/select}} {{/select}}
</select> </select>
</li> </li>
@ -87,7 +91,7 @@
<label class="attribute-value checkbox"><input type="checkbox" name="data.bonusdice" {{checked data.bonusdice}}/></label> <label class="attribute-value checkbox"><input type="checkbox" name="data.bonusdice" {{checked data.bonusdice}}/></label>
</li> </li>
<li class="flexrow"><label class="generic-label">Other Dice ?</label> <li class="flexrow"><label class="generic-label">Weapon Damage ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.otherdice" {{checked data.otherdice}}/></label> <label class="attribute-value checkbox"><input type="checkbox" name="data.otherdice" {{checked data.otherdice}}/></label>
</li> </li>

View File

@ -17,6 +17,20 @@
<input type="text" class="input-numeric-short padd-right" name="data.level" value="{{data.level}}" data-dtype="Number"/> <input type="text" class="input-numeric-short padd-right" name="data.level" value="{{data.level}}" data-dtype="Number"/>
</li> </li>
<li class="flexrow"><label class="generic-label">Perk category</label>
<select class="competence-base flexrow" type="text" name="data.category" value="{{data.category}}" data-dtype="String">
{{#select data.category}}
<option value="general">General</option>
<option value="agitator">Agitator</option>,
<option value="defender">Defender</option>,
<option value="enhancer">Enhancer</option>,
<option value="scrapper">Scrapper</option>,
<option value="ranged">Ranged</option>,
<option value="tactician">Tactician</option>,
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Perk Status</label> <li class="flexrow"><label class="generic-label">Perk Status</label>
<select class="competence-base flexrow" type="text" name="data.status" value="{{data.status}}" data-dtype="String"> <select class="competence-base flexrow" type="text" name="data.status" value="{{data.status}}" data-dtype="String">
{{#select data.status}} {{#select data.status}}
@ -37,6 +51,11 @@
{{/select}} {{/select}}
</select> </select>
</li> </li>
<li class="flexrow"><label class="generic-label">Upgradable?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.upgradable" {{checked data.upgradable}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Is Weaver Perk?</label> <li class="flexrow"><label class="generic-label">Is Weaver Perk?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.isweaver" {{checked data.isweaver}}/></label> <label class="attribute-value checkbox"><input type="checkbox" name="data.isweaver" {{checked data.isweaver}}/></label>
</li> </li>

View File

@ -22,7 +22,7 @@
{{/select}} {{/select}}
</select> </select>
</li> </li>
<li class="flexrow"><label class="generic-label">Dice Level</label> <li class="flexrow"><label class="generic-label">Bonus Dice</label>
<select class="competence-base flexrow" type="text" name="data.level" value="{{data.level}}" data-dtype="Number"> <select class="competence-base flexrow" type="text" name="data.level" value="{{data.level}}" data-dtype="Number">
{{#select data.level}} {{#select data.level}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-level.html}} {{> systems/fvtt-pegasus-rpg/templates/partial-options-level.html}}

View File

@ -30,7 +30,7 @@
</select> </select>
</li> </li>
<li class="flexrow"><label class="generic-label">Damage (Other Dice pool)</label> <li class="flexrow"><label class="generic-label">Damage Dice</label>
<select class="competence-base flexrow" type="text" name="data.damage" value="{{data.damage}}" data-dtype="String"> <select class="competence-base flexrow" type="text" name="data.damage" value="{{data.damage}}" data-dtype="String">
{{#select data.damage}} {{#select data.damage}}
{{{optionsDiceList}}} {{{optionsDiceList}}}

View File

@ -8,7 +8,7 @@
<span class="item-field-label-long"><label> <span class="item-field-label-long"><label>
{{equip.data.quantity}} {{equip.data.quantity}}
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>) (<a class="quantity-minus plus-minus-button">&nbsp;-</a>/<a class="quantity-plus plus-minus-button">+</a>)
</label> </label>
</span> </span>

View File

@ -29,7 +29,7 @@
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.value" value="{{data.nrg.value}}" data-dtype="Number"/> <input type="text" class="padd-right status-small-label no-grow" name="data.nrg.value" value="{{data.nrg.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.mod" value="{{data.nrg.mod}}" data-dtype="Number"/> <input type="text" class="padd-right status-small-label no-grow" name="data.nrg.mod" value="{{data.nrg.mod}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.max" value="{{data.nrg.max}}" data-dtype="Number"/> <input type="text" class="padd-right status-small-label no-grow" name="data.nrg.max" value="{{data.nrg.max}}" data-dtype="Number"/>
<span class="small-label status-small-label"> /{{data.nrg.absolutemax}}</span> <span class="small-label status-small-label">&nbsp;/ {{data.nrg.absolutemax}}</span>
</li> </li>
<li class="item flexrow " data-key="nrg"> <li class="item flexrow " data-key="nrg">
<span class="stat-label flexrow status-col-name" name="activated-nrg"> <span class="stat-label flexrow status-col-name" name="activated-nrg">
@ -49,11 +49,12 @@
<label class="status-small-label"><strong>Momentum</strong></label> <label class="status-small-label"><strong>Momentum</strong></label>
</span> </span>
<input type="text" class="padd-right status-small-label no-grow" name="data.momentum.value" value="{{data.momentum.value}}" data-dtype="Number"/> <input type="text" class="padd-right status-small-label no-grow" name="data.momentum.value" value="{{data.momentum.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.momentum.max" value="{{data.momentum.max}}" data-dtype="Number"/> <span class="padd-right status-small-label no-grow">
<span>
<a class="momentum-plus plus-minus-button">+</a> <a class="momentum-plus plus-minus-button">+</a>
<a class="momentum-minus plus-minus-button">-</a> <a class="momentum-minus plus-minus-button">&nbsp;-</a>
</span> </span>
<input type="text" class="padd-right status-small-label no-grow" name="data.momentum.max" value="{{data.momentum.max}}" data-dtype="Number"/>
<span class="small-label status-small-label">&nbsp;</span>
</li> </li>
<!--<li class="item flexrow list-item" data-key="lock-unlock"> <!--<li class="item flexrow list-item" data-key="lock-unlock">
<span class="stat-label flexrow status-col-name" name="momentum"> <span class="stat-label flexrow status-col-name" name="momentum">

View File

@ -20,3 +20,10 @@
{{#if mr}} {{#if mr}}
<option value="mr">MR</option> <option value="mr">MR</option>
{{/if}} {{/if}}
{{#if combat}}
<option value="melee-atk">Melee ATK</option>
<option value="ranged-atk">Ranged ATK</option>
<option value="melee-dmg">Melee DMG</option>
<option value="ranged-dmg">Ranged DMG</option>
<option value="dmg-res">DMG RES</option>
{{/if}}

View File

@ -39,6 +39,16 @@
<label class="generic-label">{{effect.label}} ({{effect.value}})</label> <label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}} {{/if}}
</li> </li>
{{else}}
{{#if (eq @root.subKey effect.effect.data.stataffected)}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
{{#if effect.effect}}
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
</li>
{{else}} {{else}}
{{#if (eq effect.effect.data.stataffected "all")}} {{#if (eq effect.effect.data.stataffected "all")}}
<li class="flex-group-left"> <li class="flex-group-left">
@ -54,6 +64,7 @@
{{/if}} {{/if}}
{{/if}} {{/if}}
{{/if}} {{/if}}
{{/if}}
{{/each}} {{/each}}
</ul> </ul>

View File

@ -12,8 +12,8 @@
<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" value="{{statDicesLevel}}" data-dtype="Number" <select class="roll-dialog-label" id="statDicesLevel" type="text" name="statDicesLevel"
{{#if statKey}}disabled{{/if}}> value="{{statDicesLevel}}" data-dtype="Number" {{#if statKey}}disabled{{/if}}>
{{#select statDicesLevel}} {{#select statDicesLevel}}
{{{optionsDiceList}}} {{{optionsDiceList}}}
{{/select}} {{/select}}
@ -24,7 +24,8 @@
{{#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}}" data-dtype="String"> <select class="roll-dialog-label" id="specList" type="text" name="selectedSpec" value="{{selectedSpec}}"
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|}}
@ -38,8 +39,8 @@
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">Spec Dice : </span> <span class="roll-dialog-label">Spec Dice : </span>
<select class="roll-dialog-label" id="specDicesLevel" type="text" name="specDicesLevel" value="{{specDicesLevel}}" data-dtype="Number" <select class="roll-dialog-label" id="specDicesLevel" type="text" name="specDicesLevel"
{{#if specList}}disabled{{/if}}> value="{{specDicesLevel}}" data-dtype="Number" {{#if specList}}disabled{{/if}}>
{{#select specDicesLevel}} {{#select specDicesLevel}}
{{{optionsDiceList}}} {{{optionsDiceList}}}
{{/select}} {{/select}}
@ -48,28 +49,9 @@
</div> </div>
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label" >Bonus Dice : </span> <span class="roll-dialog-label">Weapon Damage :</span>
<select class="roll-dialog-label" id="bonusDicesLevel" type="text" name="bonusDicesLevel" value="{{bonusDicesLevel}}" data-dtype="Number"> <select class="roll-dialog-label" id="otherDicesLevel" type="text" name="otherDicesLevel"
{{#select bonusDicesLevel}} value="{{otherDicesLevel}}" data-dtype="Number">
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
<div class="flexrow">
<span class="roll-dialog-label" >Hindrance Dice :</span>
<select class="roll-dialog-label" id="hindranceDicesLevel" type="text" name="hindranceDicesLevel" value="{{hindranceDicesLevel}}" data-dtype="Number">
{{#select hindranceDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
<div class="flexrow">
<span class="roll-dialog-label" >Other Dice :</span>
<select class="roll-dialog-label" id="otherDicesLevel" type="text" name="otherDicesLevel" value="{{otherDicesLevel}}" data-dtype="Number">
{{#select otherDicesLevel}} {{#select otherDicesLevel}}
{{{optionsDiceList}}} {{{optionsDiceList}}}
{{/select}} {{/select}}
@ -77,6 +59,25 @@
<span class="small-label">&nbsp;</span> <span class="small-label">&nbsp;</span>
</div> </div>
<div class="dice-pool-div">
<span>
<h3 class="dice-pool-label">Current pool</h3>
</span>
<div class="flexrow dice-pool-stack">
{{#each dicePool as |dice idx|}}
<span><a class="pool-remove-dice" data-dice-idx="{{idx}}" data-dice-key="{{dice.key}}"><img class="dice-pool-image"
src="{{dice.img}}"></a></span>
{{/each}}
</div>
</div>
<div class="flexrow">
{{#each diceList as |dice idx|}}
<span><a class="pool-add-dice" data-dice-key="{{dice.key}}"><img class="dice-pool-image"
src="{{dice.img}}"></a></span>
{{/each}}
</div>
</div> </div>
<div> <div>