Compare commits

..

23 Commits

Author SHA1 Message Date
a68db10676 Fix #95 message for GM 2022-10-05 10:24:42 +02:00
6e69e151c5 Fix #95 message for GM 2022-10-05 10:00:30 +02:00
c2831e4ccd Fix #90 MR management with vehicles 2022-10-05 09:58:07 +02:00
5a062cc94e Fix #89 agitators hindrance 2022-10-05 09:40:34 +02:00
ef740f4c0d Fix #94 agitators hindrance 2022-10-05 09:19:59 +02:00
076945c76f Fix #92 armors 2022-10-05 09:16:22 +02:00
a763efe873 Fix #62 armors 2022-10-05 09:13:17 +02:00
c49289b88f Better management of roles effects 2022-10-04 08:15:54 +02:00
8a8bd489f3 Fix #77 2022-10-03 17:18:10 +02:00
43724596fb Fix #77 2022-10-03 17:17:28 +02:00
e06572c221 Fix #77 2022-10-03 15:32:22 +02:00
7bcd4d9c06 Implements #77 2022-10-03 10:01:41 +02:00
aa1d5e8ecb Fix #80 2022-09-30 15:35:04 +02:00
536b42dbe0 Fix #84 2022-09-30 14:00:29 +02:00
00761d57d3 Fix #81 2022-09-30 13:44:59 +02:00
5fb0221007 Fix #83 2022-09-30 12:02:04 +02:00
19f7ebca92 Fix #82 2022-09-30 11:55:45 +02:00
afe4fc2a1b Fix #80 2022-09-30 11:54:48 +02:00
27029abc88 #Fix 78 : add role level 2022-09-29 20:04:55 +02:00
d8f8b7198c #Fix 78 : add role level 2022-09-29 20:04:27 +02:00
908cf4206a #Fix 78 : add role level 2022-09-29 14:14:48 +02:00
e531b636bc #Fix 78 : add role level 2022-09-29 14:12:16 +02:00
4065d46ffd #Fix 78 : add role level 2022-09-29 13:14:34 +02:00
13 changed files with 2300 additions and 1842 deletions

View File

@ -61,6 +61,7 @@ export class PegasusActorSheet extends ActorSheet {
encCapacity: this.actor.getEncumbranceCapacity(),
levelRemainingList: this.actor.getLevelRemainingList(),
maxLevelRemainingList: this.actor.getMaxLevelRemainingList(),
disabledBonus: (this.actor.system.biodata.noautobonus) ? "" : "disabled",
containersTree: this.actor.containersTree,
encCurrent: this.actor.encCurrent,
encHindrance: this.actor.encHindrance,
@ -249,13 +250,13 @@ export class PegasusActorSheet extends ActorSheet {
this.actor.rollPool( 'def', true, "defence");
});
html.find('.damage-melee').click((event) => {
this.actor.rollPool( 'str', false, "melee-dmg");
this.actor.rollPool( 'str', false, "melee-dmg")
});
html.find('.damage-ranged').click((event) => {
this.actor.rollPool( 'per', false, "ranged-dmg");
});
html.find('.damage-resistance').click((event) => {
this.actor.rollPool( 'phy', false, "dmg-res");
this.actor.rollPool( 'phy', false, "dmg-res")
});
html.find('.roll-stat').click((event) => {

File diff suppressed because it is too large Load Diff

View File

@ -57,8 +57,9 @@ Hooks.once("init", async function () {
CONFIG.Combat.documentClass = PegasusCombat
CONFIG.Actor.documentClass = PegasusActor
CONFIG.Item.documentClass = PegasusItem
//CONFIG.Token.objectClass = PegasusToken
game.system.pegasus = { };
game.system.pegasus = {
utility: PegasusUtility
}
/* -------------------------------------------- */
// Register sheet application classes
@ -69,8 +70,9 @@ Hooks.once("init", async function () {
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("fvtt-pegasus", PegasusItemSheet, { makeDefault: true });
PegasusUtility.init();
PegasusUtility.init()
});
/* -------------------------------------------- */

View File

@ -90,6 +90,9 @@ export class PegasusRollDialog extends Dialog {
PegasusUtility.updateDamageDicePool(this.rollData)
PegasusUtility.updateEffectsBonusDice(this.rollData)
PegasusUtility.updateHindranceBonusDice(this.rollData)
if ( effect.specList) {
this.rollData.specList = duplicate(effect.specList)
}
}
/* -------------------------------------------- */

View File

@ -23,7 +23,6 @@ export class PegasusUtility {
Hooks.on('renderChatLog', (log, html, data) => PegasusUtility.chatListeners(html))
Hooks.on('targetToken', (user, token, flag) => PegasusUtility.targetToken(user, token, flag))
Hooks.on('renderSidebarTab', (app, html, data) => PegasusUtility.addDiceRollButton(app, html, data))
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
PegasusUtility.pushInitiativeOptions(html, options);
});
@ -35,9 +34,10 @@ export class PegasusUtility {
this.defenderStore = {}
this.diceList = [];
this.diceFoundryList = [];
this.optionsDiceList = "";
this.buildDiceLists();
PegasusCommands.init();
this.optionsDiceList = ""
this.lastRoleEffectProcess = Date.now()
this.buildDiceLists()
PegasusCommands.init()
Handlebars.registerHelper('count', function (list) {
return (list) ? list.length : 0;
@ -175,12 +175,13 @@ export class PegasusUtility {
newDicePool = newDicePool.concat(this.buildDicePool("armor-shield", armor.value, 0))
}
}
newDicePool = rollData.dicePool.filter(dice => dice.name != "vehicle-shield")
newDicePool = newDicePool.filter(dice => dice.name != "vehicle-shield")
for (let shield of rollData.vehicleShieldList) {
if (shield.applied) {
newDicePool = newDicePool.concat(this.buildDicePool("vehicle-shield", shield.value, 0))
}
}
console.log(">>>>Dicepoool", newDicePool)
rollData.dicePool = newDicePool
}
@ -269,6 +270,10 @@ export class PegasusUtility {
static async ready() {
const specs = await PegasusUtility.loadCompendium("fvtt-pegasus-rpg.specialisations");
this.specs = specs.map(i => i.toObject());
if (game.user.isGM) {
Hooks.on('sightRefresh', (app, html, data) => PegasusUtility.refreshSightForEffect(app, html, data))
}
}
/* -------------------------------------------- */
@ -302,7 +307,7 @@ export class PegasusUtility {
item = this.actor.items.get(data.uuid)
}
let itemFull = await PegasusUtility.searchItem(item)
console.log("DROPPED DATA", data.uuid)
//console.log("DROPPED DATA", data.uuid)
if (game.user.isGM || token.actor.isOwner) {
this.addItemDropToActor(token.actor, itemFull)
} else {
@ -575,6 +580,21 @@ export class PegasusUtility {
return undefined;
}
/* -------------------------------------------- */
static computeDistance() {
let mytarget = game.user.targets.first()
console.log("target", mytarget, mytarget)
let mytoken = _token
if (mytarget) {
let dist = canvas.grid.measureDistances(
[{ ray: new Ray(mytoken.center, mytarget.center) }],
{ gridSpaces: true });
console.log("DIST", dist)
} else {
console.log("NO TARGET")
}
}
/* -------------------------------------------- */
static getDefenseState(actorId) {
return this.defenderStore[actorId];
@ -816,10 +836,13 @@ export class PegasusUtility {
combat.updateEmbeddedDocuments("Combatant", [{ _id: rollData.combatantId, initiative: rollData.finalScore }])
}
// Stun specific -> Suffere a stun level when dmg-res
// Stun specific -> Suffer a stun level when dmg-res for character
if (rollData.subKey && rollData.subKey == "dmg-res") {
actor.modifyStun(+1)
}
if (rollData.isVehicleStun) {
actor.modifyVehicleStun(1)
}
//this.removeUsedPerkEffects( rollData) // Unused for now
this.removeOneUseEffects(rollData) // Unused for now
@ -1004,7 +1027,12 @@ export class PegasusUtility {
if (target) {
let defenderActor = target.actor
rollData.defenderTokenId = target.id
rollData.defenderSize = Number(defenderActor.system.biodata.sizenum) + Number(defenderActor.system.biodata.sizebonus)
rollData.defenderSize = 0
if ( defenderActor.type == "character") {
rollData.defenderSize = Number(defenderActor.system.biodata.sizenum) + Number(defenderActor.system.biodata.sizebonus)
} else if ( defenderActor.type == "vehicle" ){
rollData.defenderSize = Number(defenderActor.system.statistics.hr.size)
}
//rollData.attackerId = this.id
console.log("Target/DEFENDER", defenderActor)
defenderActor.addHindrancesList(rollData.effectsList)
@ -1044,4 +1072,213 @@ export class PegasusUtility {
d.render(true);
}
/* -------------------------------------------- */
static checkIsVehicleCrew(actorId) {
let vehicles = game.actors.filter( actor=> actor.type == "vehicle") || []
for(let vehicle of vehicles) {
console.log("Checking", vehicle.name)
if ( vehicle.inCrew(actorId) ) {
return vehicle
}
}
return false
}
/* -------------------------------------------- */
static async getRelevantTokens() {
if (!_token) { return }
let tokens = canvas.tokens.placeables.filter(token => token.document.disposition == 1)
for (let token of tokens) {
console.log("Parsing tokens", token.name)
let dist = canvas.grid.measureDistances(
[{ ray: new Ray(_token.center, token.center) }], { gridSpaces: false })
if (dist && dist[0] && dist[0] > 0) {
console.log(" Friendly Tokens at : ", token.name, dist / canvas.grid.grid.options.dimensions.distance)
}
let visible = canvas.effects.visibility.testVisibility(token.center, { object: _token })
if (visible && dist[0] > 0) {
this.glowToken(token)
}
console.log(" Visible!", visible)
}
}
/* -------------------------------------------- */
static async processTactician() {
// Tactician management
let toApply = {}
let tacticianTokens = canvas.tokens.placeables.filter(token => token.actor.isTactician() && !token.document.hidden)
for (let token of tacticianTokens) {
token.refresh()
let friends = canvas.tokens.placeables.filter(newToken => newToken.actor.type == "character" && !newToken.document.hidden && newToken.document.disposition == token.document.disposition)
for (let friend of friends) {
if (friend.actor.id != token.actor.id) {
let existing = toApply[friend.actor.id] || { actor: friend.actor, add: false, level: 0, names: [] }
let visible = canvas.effects.visibility.testVisibility(friend.center, { object: token })
console.log("parse visible TACTICIAN : ", visible, token.name, friend.name)
if (visible) {
existing.add = true
existing.level += token.actor.getRoleLevel()
existing.names.push(token.actor.name)
}
toApply[friend.actor.id] = existing
}
}
}
for (let id in toApply) {
let applyDef = toApply[id]
let hasBonus = applyDef.actor.hasTacticianBonus()
if (applyDef.add) {
if (!hasBonus) {
applyDef.actor.addTacticianEffect(applyDef.names.toString(), applyDef.level)
} else if (applyDef.level != hasBonus.system.effectlevel) {
await applyDef.actor.removeTacticianEffect()
applyDef.actor.addTacticianEffect(applyDef.names.toString(), applyDef.level)
}
} else if (hasBonus) {
applyDef.actor.removeTacticianEffect()
}
}
//Delete all effects if no more tacticians (ie deleted case)
if (tacticianTokens.length == 0) {
let allTokens = canvas.tokens.placeables.filter(token => token.actor.type == "character")
for (let token of allTokens) {
if (token.actor.hasTacticianBonus()) {
token.actor.removeTacticianEffect()
}
}
}
}
/* -------------------------------------------- */
static async processEnhancer() {
// Enhancer management
let toApply = {}
let enhancerTokens = canvas.tokens.placeables.filter(token => token.actor.isEnhancer() && !token.document.hidden)
for (let token of enhancerTokens) {
token.refresh()
let friends = canvas.tokens.placeables.filter(newToken => newToken.actor.type == "character" && !newToken.document.hidden && newToken.document.disposition == token.document.disposition)
for (let friend of friends) {
if (friend.actor.id != token.actor.id) {
let existing = toApply[friend.actor.id] || { actor: friend.actor, add: false, level: 0, names: [] }
let visible = canvas.effects.visibility.testVisibility(friend.center, { object: token })
console.log("parse visible ENHANCER: ", visible, token.name, friend.name)
if (visible) {
let dist = canvas.grid.measureDistances([{ ray: new Ray(token.center, friend.center) }], { gridSpaces: false })
if (dist && dist[0] && (dist[0] / canvas.grid.grid.options.dimensions.distance) <= 5) {
existing.add = true
existing.level += token.actor.getRoleLevel()
existing.names.push(token.actor.name)
}
}
toApply[friend.actor.id] = existing
}
}
}
for (let id in toApply) {
let applyDef = toApply[id]
let hasBonus = applyDef.actor.hasEnhancerBonus()
if (applyDef.add) {
if (!hasBonus) {
applyDef.actor.addEnhancerEffect(applyDef.names.toString(), applyDef.level)
} else if (applyDef.level != hasBonus.system.effectlevel) {
await applyDef.actor.removeEnhancerEffect()
applyDef.actor.addEnhancerEffect(applyDef.names.toString(), applyDef.level)
}
} else if (hasBonus) {
applyDef.actor.removeEnhancerEffect()
}
}
// Delete all effects if no more tacticians (ie deleted case)
if (enhancerTokens.length == 0) {
let allTokens = canvas.tokens.placeables.filter(token => token.actor.type == "character")
for (let token of allTokens) {
if (token.actor.hasEnhancerBonus()) {
token.actor.removeEnhancerEffect()
}
}
}
}
/* -------------------------------------------- */
static async processAgitator() {
// Agitator management
let toApply = {}
let agitatorTokens = canvas.tokens.placeables.filter(token => token.actor.isAgitator() && !token.document.hidden)
for (let token of agitatorTokens) {
token.refresh()
if (token.document.disposition == 0) {
continue
}
let disposition = ( token.document.disposition == -1) ? 1 : -1
let ennemies = canvas.tokens.placeables.filter(newToken => newToken.actor.type == "character" && !newToken.document.hidden && newToken.document.disposition == disposition)
let neutrals = canvas.tokens.placeables.filter(newToken => newToken.actor.type == "character" && !newToken.document.hidden && newToken.document.disposition == 0)
if (neutrals ) {
ennemies = ennemies.concat(neutrals)
}
for (let ennemy of ennemies) {
if (ennemy.actor.id != token.actor.id) {
let existing = toApply[ennemy.actor.id] || { actor: ennemy.actor, add: false, level: 0, names: [] }
let visible = canvas.effects.visibility.testVisibility(ennemy.center, { object: token })
if (visible) {
let dist = canvas.grid.measureDistances([{ ray: new Ray(token.center, ennemy.center) }], { gridSpaces: false })
if (dist && dist[0] && (dist[0] / canvas.grid.grid.options.dimensions.distance) <= 5) {
existing.add = true
existing.level += token.actor.getRoleLevel()
existing.names.push(token.actor.name)
}
}
toApply[ennemy.actor.id] = existing
}
}
}
for (let id in toApply) {
let applyDef = toApply[id]
let hasHindrance = applyDef.actor.hasAgitatorHindrance()
if (applyDef.add) {
if (!hasHindrance) {
applyDef.actor.addAgitatorHindrance(applyDef.names.toString(), applyDef.level)
} else if (applyDef.level != hasHindrance.system.effectlevel) {
await applyDef.actor.removeAgitatorHindrance()
applyDef.actor.addAgitatorHindrance(applyDef.names.toString(), applyDef.level)
}
} else if (hasHindrance) {
applyDef.actor.removeAgitatorHindrance()
}
}
// Delete all effects if no more agtators (ie deleted case)
if (agitatorTokens.length == 0) {
let allTokens = canvas.tokens.placeables.filter(token => token.actor.type == "character")
for (let token of allTokens) {
if (token.actor.hasAgitatorHindrance()) {
token.actor.removeAgitatorHindrance()
}
}
}
}
/* -------------------------------------------- */
static async processRoleEffects() {
// Small optimization
let now = Date.now()
if (now - this.lastRoleEffectProcess < 300) {
return // Save some processing
}
this.lastRoleEffectProcess = now
console.log("=========================+> Searching/Processing roles effects")
await this.processTactician()
await this.processEnhancer()
await this.processAgitator()
}
/* -------------------------------------------- */
static async refreshSightForEffect() {
setTimeout(500, this.processRoleEffects())
}
}

View File

@ -253,7 +253,7 @@
],
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
"version": "10.0.23",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.0.23.zip",
"version": "10.1.0",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.1.0.zip",
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
}

View File

@ -37,6 +37,7 @@
"rolename": "",
"morality": 5,
"bonusselection": "",
"noautobonus": false,
"moralitythreshold": 0
}
},
@ -154,6 +155,7 @@
"label": "MR (Initiative)",
"type": "dice",
"value": 0,
"bonuseffect": 0,
"mod": 0
},
"momentum": {
@ -412,6 +414,9 @@
"physicalimmunity": false,
"nobonusdice": false,
"noperksallowed": false,
"affectstatus": false,
"affectedstatus": "",
"locked": false,
"description": ""
},
"race": {
@ -443,7 +448,8 @@
"specincrease": [],
"perks": [],
"perksrole": "",
"description": ""
"description": "",
"rolelevel": 1
},
"ability": {
"affectedstat": "str",

View File

@ -302,18 +302,30 @@
</li>
{{#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}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{effect.img}}" /></a>
<li class="item stat flexrow list-item list-item-shadow" data-arme-id="{{effect.id}}" data-item-id="{{effect._id}}">
{{#if effect.system.locked}}
{{#if @root.isGM}}
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{effect.img}}" /></a>
{{else}}
<img class="sheet-competence-img" src="{{effect.img}}" />
{{/if}}
{{else}}
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{effect.img}}" /></a>
{{/if}}
<span class="item-name-label-long2">{{effect.name}}</span>
<span class="item-field-label-short">{{effect.system.effectlevel}}</span>
<span class="item-field-label-short">{{upperFirst effect.system.type}}</span>
<span class="item-field-label-short">{{upperFirst effect.datsystema.genre}}</span>
<span class="item-field-label-short">{{upperFirst effect.system.genre}}</span>
<span class="item-field-label-short">{{upper effect.system.stataffected}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
{{#if effect.system.locked}}
{{#if @root.isGM}}
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
{{/if}}
{{else}}
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
{{/if}}
</div>
</li>
{{/each}}
@ -857,6 +869,12 @@
<label class="generic-label">Hair</label>
<input type="text" class="" name="system.biodata.hair" value="{{data.biodata.hair}}" data-dtype="String" />
</li>
{{#if isGM}}
<li class="item flexrow">
<label class="generic-label">Manual bonuses only ?</label>
<input type="checkbox" class="change-worstfear" name="system.biodata.noautobonus" {{checked data.biodata.noautobonus}} />
</li>
{{/if}}
</ul>
</div>
<div>

View File

@ -34,6 +34,27 @@
</select>
</li>
<li class="flexrow"><label class="generic-label">Effect Level is a Stat?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.effectstatlevel" {{checked data.effectstatlevel}}/></label>
</li>
{{#if data.effectstatlevel}}
<li class="flexrow"><label class="generic-label">Stat to use for Effect Level</label>
<select class="competence-base flexrow" type="text" name="system.effectstat" value="{{data.effectstat}}" data-dtype="String">
{{#select data.effectstat}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=true all=false}}
{{/select}}
</select>
</li>
{{else}}
<li class="flexrow"><label class="generic-label">Effect Level</label>
<input type="text" class="input-numeric-short padd-right" name="system.effectlevel" value="{{data.effectlevel}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Affect size ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.affectsize" {{checked data.affectsize}}/></label>
</li>
{{/if}}
<li class="flexrow"><label class="generic-label">One use?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.oneuse" {{checked data.oneuse}}/></label>
</li>
@ -61,28 +82,27 @@
<li class="flexrow"><label class="generic-label">No perks allowed ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.noperksallowed" {{checked data.noperksallowed}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Effect Level is a Stat?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.effectstatlevel" {{checked data.effectstatlevel}}/></label>
<li class="flexrow"><label class="generic-label">Locked (Only GM can change/edit) ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.locked" {{checked data.locked}}/></label>
</li>
{{#if data.effectstatlevel}}
<li class="flexrow"><label class="generic-label">Stat to use for Effect Level</label>
<select class="competence-base flexrow" type="text" name="system.effectstat" value="{{data.effectstat}}" data-dtype="String">
{{#select data.effectstat}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=true all=false}}
<li class="flexrow"><label class="generic-label">Affect Status?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.affectstatus" {{checked data.affectstatus}}/></label>
</li>
{{#if data.affectstatus}}
<li class="flexrow"><label class="generic-label">Affected status</label>
<select class="competence-base flexrow" type="text" name="system.affectedstatus" value="{{data.affectedstatus}}" data-dtype="String">
{{#select data.affectedstatus}}
<option value="health">Health</option>
<option value="delirium">Delirium</option>
<option value="socialhealth">Social Health</option>
<option value="stealthhealth">Stealth Health</option>
<option value="nrg">NRG</option>
{{/select}}
</select>
</li>
{{else}}
<li class="flexrow"><label class="generic-label">Effect Level</label>
<input type="text" class="input-numeric-short padd-right" name="system.effectlevel" value="{{data.effectlevel}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Affect size ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.affectsize" {{checked data.affectsize}}/></label>
</li>
{{/if}}
<li class="flexrow"> <label class="generic-label">Affected Specialisations </label></li>
<li class="flexrow">
<ul class="ul-level1">

View File

@ -13,16 +13,20 @@
<div class="tab description" data-group="primary" data-tab="description">
<div class="medium-editor item-text-long-line">
<label class="generic-label">Power Ups</label>
<label class="generic-label"><strong>Power Ups</strong></label>
{{editor purchasedeffects target="system.purchasedeffects" button=true owner=owner
editable=editable}}
</div>
<span><label>&nbsp;</label></span>
<hr>
<div class="long-editor item-text-long-line">
<label class="generic-label">Description</label>
<label class="generic-label"><strong>Description</strong></label>
{{editor description target="system.description" button=true owner=owner editable=editable}}
</div>
<span><label>&nbsp;</label></span>
<hr>
<div class="medium-editor item-text-long-line">
<label class="generic-label">Available Upgrades</label>
<label class="generic-label"><strong>Available Upgrades</strong></label>
{{editor effects target="system.effects" button=true owner=owner editable=editable}}
</div>
</div>
@ -30,8 +34,8 @@
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Roll Needed ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.rollneeded" {{checked
data.rollneeded}} /></label>
<label class="attribute-value checkbox">
<input type="checkbox" name="system.rollneeded" {{checked data.rollneeded}} /></label>
</li>
{{#if data.rollneeded}}
<li class="flexrow"><label class="generic-label">Related Statistic (only if roll is needed)</label>

View File

@ -1,80 +1,92 @@
<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}}
<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">
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Stat increase 1</label>
<select class="competence-base flexrow" type="text" name="system.statincrease1" value="{{data.statincrease1}}" data-dtype="String">
{{#select data.statincrease1}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Stat increase 2</label>
<select class="competence-base flexrow" type="text" name="system.statincrease2" value="{{data.statincrease2}}" data-dtype="String">
{{#select data.statincrease2}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}}
{{/select}}
</select>
</li>
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Role Level</label>
<input type="text" class="input-numeric-short padd-right" name="system.rolelevel" value="{{data.rolelevel}}"
data-dtype="Number" />
</li>
<li class="flexrow">
<label class="generic-label">Role Ability</label>
</li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-specialability"><label>Drop Abilities here !</label></div>
</li>
{{#each data.specialability as |ability idx|}}
<li class="flexrow">
<label name="system.specialability[{{idx}}].name"><a class="view-subitem" data-type="specialability" data-index="{{idx}}">{{ability.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="specialability" data-index="{{idx}}" title="Delete Ability"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<li class="flexrow"><label class="generic-label">Stat increase 1</label>
<select class="competence-base flexrow" type="text" name="system.statincrease1" value="{{data.statincrease1}}"
data-dtype="String">
{{#select data.statincrease1}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Stat increase 2</label>
<select class="competence-base flexrow" type="text" name="system.statincrease2" value="{{data.statincrease2}}"
data-dtype="String">
{{#select data.statincrease2}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}}
{{/select}}
</select>
</li>
<li class="flexrow">
<label class="generic-label">Role Ability</label>
</li>
<ul class="ul-level1">
<li class="flexrow">
<div class="drop-specialability"><label>Drop Abilities here !</label></div>
</li>
<li class="flexrow"><label class="generic-label">Statistic increase (Choose 2 at +1 DT)</label>
</li>
<ul class="ul-level1">
<li class="flexrow">
{{#each data.statincreasechoice as |stat idx|}}
<label name="statchoice{{idx}}">{{stat.name}}</label>
<label class="attribute-value checkbox"><input type="checkbox" class="stat-choice-flag" data-stat-idx="{{idx}}" {{checked stat.flag}}/></label>
{{/each}}
</li>
</ul>
</li>
{{#each data.specialability as |ability idx|}}
<li class="flexrow">
<label name="system.specialability[{{idx}}].name"><a class="view-subitem" data-type="specialability"
data-index="{{idx}}">{{ability.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="specialability" data-index="{{idx}}"
title="Delete Ability"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
<li class="flexrow"><label class="generic-label">Statistic increase (Choose 2 at +1 DT)</label>
</li>
<ul class="ul-level1">
<li class="flexrow">
{{#each data.statincreasechoice as |stat idx|}}
<label name="statchoice{{idx}}">{{stat.name}}</label>
<label class="attribute-value checkbox"><input type="checkbox" class="stat-choice-flag"
data-stat-idx="{{idx}}" {{checked stat.flag}} /></label>
{{/each}}
</li>
</ul>
</li>
<li class="flexrow"><label class="generic-label">Role category for available perks</label>
<select class="competence-base flexrow" type="text" name="system.perksrole" value="{{data.perksrole}}" data-dtype="String">
{{#select data.perksrole}}
<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">Role category for available perks</label>
<select class="competence-base flexrow" type="text" name="system.perksrole" value="{{data.perksrole}}"
data-dtype="String">
{{#select data.perksrole}}
<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>
</ul>
</ul>
</div>
</div>
</section>
</form>
</section>
</form>

View File

@ -18,7 +18,7 @@
</label>
</span>
<input type="text" class="padd-right status-small-label no-grow" name="system.secondary.{{key}}.value" value="{{stat2.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="system.secondary.{{key}}.bonus" value="{{stat2.bonus}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="system.secondary.{{key}}.bonus" value="{{stat2.bonus}}" data-dtype="Number" {{@root.disabledBonus}}/>
<input type="text" class="padd-right status-small-label no-grow" name="system.secondary.{{key}}.max" value="{{stat2.max}}" data-dtype="Number"/>
</li>
{{/each}}
@ -27,7 +27,7 @@
<label class="status-small-label"><strong>{{data.nrg.label}}</strong></label>
</span>
<input type="text" class="padd-right status-small-label no-grow" name="system.nrg.value" value="{{data.nrg.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="system.nrg.mod" value="{{data.nrg.mod}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="system.nrg.mod" value="{{data.nrg.mod}}" data-dtype="Number" {{@root.disabledBonus}}/>
<input type="text" class="padd-right status-small-label no-grow" name="system.nrg.max" value="{{data.nrg.max}}" data-dtype="Number"/>
<span class="small-label status-small-label">&nbsp;/ {{data.nrg.absolutemax}}</span>
</li>

View File

@ -119,10 +119,9 @@
<option value="d4">Slight cover d4</option>
<option value="d8">Half cover d8</option>
<option value="d12">Full cover d12</option>
<option value="d12">Full cover d12</option>
<option value="none2">===== Cover Damage Resistance</option>
<option value="d4">Soft cover d4</option>
<option value="d6">Dense cover d16</option>
<option value="d6">Dense cover d6</option>
<option value="d8">Light cover d8</option>
<option value="d10">Thick cover d10</option>
<option value="d12">Solid cover d12</option>
@ -131,7 +130,7 @@
<option value="d6">Outnumbered 2 Extra Allies d6</option>
<option value="d8">Outnumbered 3 Extra Allies d8</option>
<option value="d10">Outnumbered 4 Extra Allies d10</option>
<option value="d12">Outnumbered 5 Extra Allies d1<option>
<option value="d12">Outnumbered 5 Extra Allies d12<option>
<option value="none4">===== Called DMG Shot Bonus</option>
<option value="d12">Eyes/head d12<option>
<option value="none4">===== Impact DMG Bonus</option>