From 6387426b73fb7c348da972e195b3ee6ca551bb7b Mon Sep 17 00:00:00 2001 From: sladecraven Date: Mon, 10 Jan 2022 08:00:27 +0100 Subject: [PATCH] All fixes' --- modules/pegasus-actor.js | 44 +++++++++++------- modules/pegasus-create-char.js | 29 +++++++++++- modules/pegasus-utility.js | 13 ++++++ packs/race.db | 2 +- system.json | 4 +- template.json | 46 +++++++++++++++++-- templates/actor-sheet.html | 78 ++++++++++++++++++++++++-------- templates/chat-create-actor.html | 13 ++++++ templates/item-role-sheet.html | 2 +- 9 files changed, 184 insertions(+), 47 deletions(-) diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index 4c4c1b0..82b593e 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -493,7 +493,7 @@ export class PegasusActor extends Actor { /* -------------------------------------------- */ async addItemWithoutDuplicate( newItem ) { - let item = this.data.items.filter( item => item.type == newItem.type && item.name.toLowerCase() == newItem.name.toLowerCase() ) + let item = this.data.items.find( item => item.type == newItem.type && item.name.toLowerCase() == newItem.name.toLowerCase() ) if ( !item ) { await this.createEmbeddedDocuments( 'Item', [newItem]); } @@ -501,12 +501,16 @@ export class PegasusActor extends Actor { /* -------------------------------------------- */ computeNRGHealth( ) { - let focValue = this.data.data.statistics.foc.value; - this.update( {'data.secondary.nrg.max': focValue, 'data.secondary.nrg.value': focValue} ) - let phyValue = this.data.data.statistics.phy.value; - this.update( {'data.secondary.health.max': phyValue, 'data.secondary.health.value': phyValue} ) - let mndValue = this.data.data.statistics.mnd.value; - this.update( {'data.secondary.delirium.max': mndValue, 'data.secondary.delirium.value': mndValue} ) + let focDiceValue = PegasusUtility.getDiceValue(this.data.data.statistics.foc.value); + this.update( {'data.secondary.nrg.max': focDiceValue, 'data.secondary.nrg.value': focDiceValue} ) + let phyDiceValue = PegasusUtility.getDiceValue(this.data.data.statistics.phy.value); + this.update( {'data.secondary.health.max': phyDiceValue, 'data.secondary.health.value': phyDiceValue} ) + let mndDiceValue = PegasusUtility.getDiceValue(this.data.data.statistics.mnd.value); + this.update( {'data.secondary.delirium.max': mndDiceValue, 'data.secondary.delirium.value': mndDiceValue} ) + let stlDiceValue = PegasusUtility.getDiceValue(this.data.data.statistics.stl.value); + this.update( {'data.secondary.stealthhealth.max': stlDiceValue, 'data.secondary.stealthhealth.value': stlDiceValue} ) + let socDiceValue = PegasusUtility.getDiceValue(this.data.data.statistics.soc.value); + this.update( {'data.secondary.socialhealth.max': socDiceValue, 'data.secondary.socialhealth.value': socDiceValue} ) } /* -------------------------------------------- */ @@ -556,17 +560,25 @@ export class PegasusActor extends Actor { stat.mod += parseInt(ability.data.statmodifier) updates[`data.statistics.${ability.data.affectedstat}`] = stat } - for (let power of race.data.powersgained) { - newItems.push(power); + if ( race.data.powersgained) { + for (let power of race.data.powersgained) { + newItems.push(power); + } } - for (let spec of race.data.specialisations) { - newItems.push(spec); + if ( race.data.specialisations) { + for (let spec of race.data.specialisations) { + newItems.push(spec); + } } - for (let weapon of race.data.attackgained) { - newItems.push(weapon); + if ( race.data.attackgained) { + for (let weapon of race.data.attackgained) { + newItems.push(weapon); + } } - for (let armor of race.data.armorgained) { - newItems.push(armor); + if ( race.data.armorgained) { + for (let armor of race.data.armorgained) { + newItems.push(armor); + } } } await this.update( updates ) @@ -594,7 +606,7 @@ export class PegasusActor extends Actor { this.getIncreaseStatValue( updates, role.data.statincrease1) this.getIncreaseStatValue( updates, role.data.statincrease2) - newItems = newItems.concat(duplicate(role.data.specialisationsplus1)) + //newItems = newItems.concat(duplicate(role.data.specialisationsplus1)) newItems = newItems.concat(duplicate(role.data.specialperk)) await this.update( updates ) diff --git a/modules/pegasus-create-char.js b/modules/pegasus-create-char.js index 0bcd14a..412c835 100644 --- a/modules/pegasus-create-char.js +++ b/modules/pegasus-create-char.js @@ -105,7 +105,20 @@ export class PegasusActorCreate { this.currentRole = role; this.nbRoleStat = 2; this.roleStats = duplicate(role.data.statincreasechoice) - this.showRoleStat( ); + this.showRoleStartSpec( ); + } + + if ( step == 'select-role-start-spec') { + PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget)); + let spec = this.roleSpecStart.find( item => item._id == itemId); + this.actor.addIncSpec(spec, 1); + this.nbRoleSpecStart--; + this.roleSpecStart = this.roleSpecStart.filter( item => item._id != itemId);//Remove selected spec + if( this.nbRoleSpecStart == 0) { + this.showRoleStat( ); + } else { + this.showRoleStartSpec( ); + } } if ( step == 'select-role-stat') { @@ -261,7 +274,19 @@ export class PegasusActorCreate { this.renderChatMessage( formData) } - /* -------------------------------------------- */ + /* ------------------------------- ------------- */ + async showRoleStartSpec() { + if ( !this.roleSpecStart) { + this.roleSpecStart = duplicate(this.currentRole.data.specialisationsplus1) + this.nbRoleSpecStart = 2; + } + let formData = this.createFormData("select-role-start-spec") + formData.rolestartspec = this.roleSpecStart + formData.nbrolespecstart = this.nbRoleSpecStart; + this.renderChatMessage( formData) + } + + /* ------------------------------- ------------- */ async showRoleStat( ) { let formData = this.createFormData("select-role-stat") formData.rolestats = [] diff --git a/modules/pegasus-utility.js b/modules/pegasus-utility.js index 8eba037..f0e4861 100644 --- a/modules/pegasus-utility.js +++ b/modules/pegasus-utility.js @@ -4,6 +4,7 @@ import { PegasusActorCreate } from "./pegasus-create-char.js"; /* -------------------------------------------- */ const __level2Dice = [ "d0", "d4", "d6", "d8", "d10", "d12" ]; +const __level2DiceValue = [ 0, 4, 6, 8, 10, 12 ]; /* -------------------------------------------- */ export class PegasusUtility { @@ -179,6 +180,18 @@ export class PegasusUtility { return it; } + /* -------------------------------------------- */ + static getDiceValue( level = 0) { + let locLevel = level + let diceValue = 0 + while (locLevel > 0) { + let idx = locLevel % __level2Dice.length + diceValue += __level2DiceValue[idx] + locLevel -= idx + } + return diceValue + } + /* -------------------------------------------- */ static getDiceFromLevel(level = 0) { level = Number(level) diff --git a/packs/race.db b/packs/race.db index f252a35..1df5452 100644 --- a/packs/race.db +++ b/packs/race.db @@ -1,5 +1,5 @@ {"_id":"3WCJk6C00ik3hoI1","name":"Lizardmen","type":"race","img":"systems/fvtt-pegasus-rpg/images/icons/icon_race.webp","data":{"description":"

See Pegasus Engine CORE RPG

","environment":"

See Pegasus Engine CORE RPG

","society_culture":"

See Pegasus Engine CORE RPG

","outlook":"

See Pegasus Engine CORE RPG

","abilities":[{"_id":"avtejz4s68r818f6","name":"Tough Skin","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"oa7p72v2g3dsezzc","name":"Bite & Tail Combo","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"otti8kqs7qzg5py1","name":"Physique [PHY] +1 Modifier","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"phy","statmodifier":1,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

Change the Stat Modifier to reflect the Statistic Modifier (+/- 1 etc).

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"4olpc5biie6hagzx","name":"Strength [STR] +1 Modifier","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"str","statmodifier":1,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

Change the Stat Modifier to reflect the Statistic Modifier (+/- 1 etc).

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}],"statistics":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}} -{"_id":"BRITbTF8IeKTcbmj","name":"Robots","type":"race","img":"systems/fvtt-pegasus-rpg/images/icons/icon_race.webp","data":{"description":"

See Pegasus Engine CORE RPG

","environment":"

See Pegasus Engine CORE RPG

","society_culture":"

See Pegasus Engine CORE RPG

","outlook":"

See Pegasus Engine CORE RPG

","selectablestats":true,"statsonlyonce":false,"numberstats":3,"abilities":[{"_id":"q0nbzwq47ps63o1u","name":"Mechanical","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"en2015al33cyqvjw","name":"Metal Body","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"uueif8o8ynluuqju","name":"Does Not Breathe","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"e8cvk1io32rplpsy","name":"Master","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"5rllgta2i2lv4hno","name":"Mind [MND] +1 Modifier","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"mnd","statmodifier":1,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

Change the Stat Modifier to reflect the Statistic Modifier (+/- 1 etc).

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"d2d8s6hnsaciudqa","name":"Artificial","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"soc","statmodifier":-2,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Compendium.fvtt-pegasus-rpg.racial-abilities.HJoEmBzCz8vJhMnO"}}}],"optionnalabilities":[],"nboptionnal":0,"statistics":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}} +{"_id":"BRITbTF8IeKTcbmj","name":"Robots","type":"race","img":"systems/fvtt-pegasus-rpg/images/icons/icon_race.webp","data":{"description":"

See Pegasus Engine CORE RPG

","environment":"

See Pegasus Engine CORE RPG

","society_culture":"

See Pegasus Engine CORE RPG

","outlook":"

See Pegasus Engine CORE RPG

","selectablestats":true,"statsonlyonce":false,"numberstats":3,"abilities":[{"_id":"q0nbzwq47ps63o1u","name":"Mechanical","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"en2015al33cyqvjw","name":"Metal Body","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"uueif8o8ynluuqju","name":"Does Not Breathe","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"e8cvk1io32rplpsy","name":"Master","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"5rllgta2i2lv4hno","name":"Mind [MND] +1 Modifier","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"mnd","statmodifier":1,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

Change the Stat Modifier to reflect the Statistic Modifier (+/- 1 etc).

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"d2d8s6hnsaciudqa","name":"Artificial","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"soc","statmodifier":-2,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Compendium.fvtt-pegasus-rpg.racial-abilities.HJoEmBzCz8vJhMnO"}}}],"optionnalabilities":[],"nboptionnal":0,"perksgained":false,"perksall":false,"perksnumber":0,"perks":[],"statistics":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}} {"_id":"BeKcQz9QBJvK9Iha","name":"Cyborg","type":"race","img":"systems/fvtt-pegasus-rpg/images/icons/icon_race.webp","data":{"description":"

See Pegasus Engine CORE RPG

","environment":"

See Pegasus Engine CORE RPG

","society_culture":"

See Pegasus Engine CORE RPG

","outlook":"

See Pegasus Engine CORE RPG

","selectablestats":false,"statsonlyonce":false,"numberstats":0,"abilities":[{"_id":"p8vd5jdegkj19jdx","name":"Social [SOC] -1 Modifier","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"soc","statmodifier":-1,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

Change the Stat Modifier to reflect the Statistic Modifier (+/- 1 etc).

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}],"optionnalabilities":[{"_id":"gfce5lt454vgnjlw","name":"Brain CPU","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"7um6jskqnfj2fwwy","name":"Cybernetic Eye","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"x8ss5k0vaizku6fr","name":"Metal Carapace","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"j7tcrl6k5v8fe1sh","name":"Cybernetic Arm","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"kjizvrb2fkawi2pr","name":"Cybernetic Legs","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}],"nboptionnal":2,"statistics":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"hmgQYmqJMH3vUOoa":3},"flags":{"core":{"sourceId":"Compendium.fvtt-pegasus-rpg.race.s7HiIu1dPtMwN1wV"}}} {"_id":"EVblQVFh1bK0x3eO","name":"Mutant","type":"race","img":"systems/fvtt-pegasus-rpg/images/icons/icon_race.webp","data":{"description":"

For Mutants Stat choose the same stat twice. Do not choose seperate statistics.

\n

See Pegasus Engine CORE RPG

","environment":"

See Pegasus Engine CORE RPG

","society_culture":"

See Pegasus Engine CORE RPG

","outlook":"

See Pegasus Engine CORE RPG

","selectablestats":true,"statsonlyonce":false,"numberstats":2,"abilities":[{"_id":"ago13jpczjq7sege","name":"Social [SOC] -1 Modifier","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"soc","statmodifier":-1,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

Change the Stat Modifier to reflect the Statistic Modifier (+/- 1 etc).

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"zzus00jl76jf6g0z","name":"Stealth [STL] +1 Modifier","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"stl","statmodifier":1,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

Change the Stat Modifier to reflect the Statistic Modifier (+/- 1 etc).

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}],"optionnalabilities":[{"_id":"31ojabpv02hg0m1o","name":"Skin of Scales","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"cbx2bu68yw3x9hqj","name":"Red Eyes","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"lvaps81g2rxskfs1","name":"Extra Arms","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"n9qdwdskgz851tqh","name":"Claws","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"exohbrv7rxqdqmh8","name":"Radioactive Spit","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"t9g8138aqkfs0u2q","name":"Horns or Spikes","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"457npsicyo8kx09y","name":"Tail","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"t711z2qtgccpz33m","name":"Wings","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}],"nboptionnal":1,"statistics":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}} {"_id":"KPMZk6NI5tEBuP3k","name":"Elf","type":"race","img":"systems/fvtt-pegasus-rpg/images/icons/icon_race.webp","data":{"description":"

See Pegasus Engine CORE RPG

","environment":"

See Pegasus Engine CORE RPG

","society_culture":"

See Pegasus Engine CORE RPG

","outlook":"

See Pegasus Engine CORE RPG

","abilities":[{"_id":"hjthbhjkwq7eol40","name":"Night Vision","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"notapplicable","statmodifier":0,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"p8upn9bhu6bsirgs","name":"Agility [AGI] +1 Modifier","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"agi","statmodifier":1,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

Change the Stat Modifier to reflect the Statistic Modifier (+/- 1 etc).

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"c0r0lj77msonsmcq","name":"Mind [MND] +1 Modifier","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"mnd","statmodifier":1,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

Change the Stat Modifier to reflect the Statistic Modifier (+/- 1 etc).

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}},{"_id":"mc5l4vgngsjek763","name":"Stealth [STL] +1 Modifier","type":"ability","img":"systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp","data":{"affectedstat":"stl","statmodifier":1,"statlevelincrease":0,"bonusdice":0,"otherdice":0,"statusaffected":"notapplicable","statusmodifier":0,"powersgained":[],"specialisations":[],"aoe":"","description":"

Change the Stat Modifier to reflect the Statistic Modifier (+/- 1 etc).

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}],"statistics":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}} diff --git a/system.json b/system.json index 2825142..190bf1b 100644 --- a/system.json +++ b/system.json @@ -100,9 +100,9 @@ "styles": [ "styles/simple.css" ], - "templateVersion": 36, + "templateVersion": 41, "title": "Pegasus RPG", "url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg", - "version": "0.0.37", + "version": "0.0.41", "background" : "./images/ui/pegasus_welcome_page.webp" } \ No newline at end of file diff --git a/template.json b/template.json index 9d4a3a9..a532788 100644 --- a/template.json +++ b/template.json @@ -16,10 +16,12 @@ "desires": "", "preferredhand": "", "catchphrase": "", - "catchphrase_trigger": "", - "character_value": 0, + "catchphraseused": false, + "catchphrasetrigger": "", + "charactervalue": 0, "level": 0, "cdp": 0, + "cdpused": 0, "notes": "", "gmnotes": "", "racename": "", @@ -107,25 +109,59 @@ "label": "Health", "value": 0, "type": "value", + "ismax": true, "max": 0 }, "delirium": { "label": "Delirium", "value": 0, "type": "value", + "ismax": true, "max": 0 }, "nrg": { "label": "NRG", "value": 0, "type": "value", - "max": 0 + "max": 0, + "ismax": true, + "isactivated": true, + "activated": 0 }, "mr": { "label": "MR", "type": "dice", - "value": 0 - } + "value": 0, + "ismodifier": true, + "modifier": 0 + }, + "stealthhealth": { + "label": "Stealth Health", + "type": "value", + "value": 0, + "ismax": true, + "max": 0 + }, + "socialhealth": { + "label": "Social Health", + "type": "value", + "value": 0, + "ismax": true, + "max": 0 + }, + "momentum": { + "label": "Momentum", + "type": "value", + "value": 0, + "ismax": true, + "max": 0 + } + }, + "combat": { + "bonusdice": 0, + "otherdice": 0, + "hindrancedice": 0, + "stunlevel": 0 } }, "npccore": { diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 1d5eb09..3f6e184 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -68,6 +68,21 @@ {{/if}} {{/select}} + {{#if stat2.ismax}} + + {{/if}} + {{#if stat2.ismodifier}} + + {{/if}} {{/each}} @@ -292,6 +307,10 @@ +
  • + + +
  • @@ -310,42 +329,61 @@
    -

    Destiny :

    + +

    Psychology :

    -
    -

    Goals :

    +

    Catchphrase :

    + +
    +

    Development :

    + diff --git a/templates/chat-create-actor.html b/templates/chat-create-actor.html index 233b3ce..948bdb7 100644 --- a/templates/chat-create-actor.html +++ b/templates/chat-create-actor.html @@ -88,6 +88,19 @@ {{/if}} + {{#if (eq step "select-role-start-spec")}} +
    Choose 1 Stat at +1DT : +
    + + {{#each rolestartspec as |spec index|}} + + + + + {{/each}} +
    {{spec.name}}Select it !
    + {{/if}} + {{#if (eq step "select-role-stat")}}
    Choose 1 Stat at +1DT :
    diff --git a/templates/item-role-sheet.html b/templates/item-role-sheet.html index 2d33ada..b3b624b 100644 --- a/templates/item-role-sheet.html +++ b/templates/item-role-sheet.html @@ -28,7 +28,7 @@
  • - +