forked from public/bol
Use bougette v1.2
This commit is contained in:
parent
e1c7304551
commit
47178d7359
Binary file not shown.
@ -531,6 +531,10 @@ ul.no-bullets {
|
|||||||
min-width: 3rem;
|
min-width: 3rem;
|
||||||
width: 3rem;
|
width: 3rem;
|
||||||
}
|
}
|
||||||
|
.bougette-dice-img {
|
||||||
|
color:rgba(150, 44, 44, 0.70);
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------- */
|
/* ----------------------------------------- */
|
||||||
/* Premade colors */
|
/* Premade colors */
|
||||||
/* ----------------------------------------- */
|
/* ----------------------------------------- */
|
||||||
|
@ -474,7 +474,10 @@
|
|||||||
"BOL.chat.rangenotvisible": "La ligne de vue est bloquée entre les protagonistes.",
|
"BOL.chat.rangenotvisible": "La ligne de vue est bloquée entre les protagonistes.",
|
||||||
"BOL.chat.rangetitle": "Information MJ",
|
"BOL.chat.rangetitle": "Information MJ",
|
||||||
"BOL.chat.weaponreroll1": "Pour information, cette arme relance les 1 sur ses dégâts.",
|
"BOL.chat.weaponreroll1": "Pour information, cette arme relance les 1 sur ses dégâts.",
|
||||||
|
"BOL.chat.rollbougette": "Jet de Bougette",
|
||||||
|
"BOL.chat.bougettesuccess": "Votre bougette reste inchangée !",
|
||||||
|
"BOL.chat.bougettefailure": "Vous avez trop dépensé, votre bougette s'est réduite...",
|
||||||
|
|
||||||
"BOL.dialog.soeasy": "Inmanquable (+4)",
|
"BOL.dialog.soeasy": "Inmanquable (+4)",
|
||||||
"BOL.dialog.veryeasy": "Trés Facile (+2)",
|
"BOL.dialog.veryeasy": "Trés Facile (+2)",
|
||||||
"BOL.dialog.easy": "Facile (+1)",
|
"BOL.dialog.easy": "Facile (+1)",
|
||||||
|
@ -147,7 +147,8 @@ export class BoLActorSheet extends ActorSheet {
|
|||||||
formData.options = this.options
|
formData.options = this.options
|
||||||
formData.owner = this.document.isOwner
|
formData.owner = this.document.isOwner
|
||||||
formData.editScore = this.options.editScore
|
formData.editScore = this.options.editScore
|
||||||
formData.useBougette = BoLUtility.getUseBougette()
|
formData.useBougette = BoLUtility.getUseBougette()
|
||||||
|
formData.bougette = this.actor.getBougette()
|
||||||
formData.charType = this.actor.getCharType()
|
formData.charType = this.actor.getCharType()
|
||||||
formData.villainy = this.actor.getVillainy()
|
formData.villainy = this.actor.getVillainy()
|
||||||
formData.biography = await TextEditor.enrichHTML(this.object.system.details.biography, {async: true})
|
formData.biography = await TextEditor.enrichHTML(this.object.system.details.biography, {async: true})
|
||||||
@ -236,6 +237,9 @@ export class BoLActorSheet extends ActorSheet {
|
|||||||
case "attributexp":
|
case "attributexp":
|
||||||
this.actor.incAttributeXP(dataset.key)
|
this.actor.incAttributeXP(dataset.key)
|
||||||
break;
|
break;
|
||||||
|
case "bougette":
|
||||||
|
this.actor.rollBougette()
|
||||||
|
break;
|
||||||
case "careerxp":
|
case "careerxp":
|
||||||
this.actor.incCareerXP( li.data("item-id"))
|
this.actor.incCareerXP( li.data("item-id"))
|
||||||
break;
|
break;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { BoLDefaultRoll } from "../controllers/bol-rolls.js";
|
import { BoLDefaultRoll } from "../controllers/bol-rolls.js";
|
||||||
import { BoLUtility } from "../system/bol-utility.js";
|
import { BoLUtility } from "../system/bol-utility.js";
|
||||||
|
import { BoLRoll } from "../controllers/bol-rolls.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend the base Actor entity by defining a custom roll data structure which is ideal for the Simple system.
|
* Extend the base Actor entity by defining a custom roll data structure which is ideal for the Simple system.
|
||||||
@ -37,6 +38,28 @@ export class BoLActor extends Actor {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
getBougette() {
|
||||||
|
let b = duplicate(this.system.bougette)
|
||||||
|
b.label = game.i18n.localize( game.bol.config.bougetteState[String(this.system.bougette.value)] )
|
||||||
|
b.diceImg = "icons/dice/" + game.bol.config.bougetteDice[String(this.system.bougette.value)] + "black.svg"
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async rollBougette() {
|
||||||
|
//ui.notifications.info("Roll bougette done !")
|
||||||
|
let attribute = duplicate(this.system.attributes.vigor)
|
||||||
|
let rollData = BoLRoll.getCommonRollData(this, "bougette", attribute, undefined )
|
||||||
|
rollData.formula = game.bol.config.bougetteDice[String(this.system.bougette.value)]
|
||||||
|
let r = new BoLDefaultRoll(rollData)
|
||||||
|
r.roll()
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
decBougette() {
|
||||||
|
let bougette = duplicate(this.system.bougette)
|
||||||
|
bougette.value = Math.max( Number(bougette.value) - 1, 0)
|
||||||
|
this.update( { 'system.bougette': bougette } )
|
||||||
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
updateResourcesData() {
|
updateResourcesData() {
|
||||||
if (this.type == 'character') {
|
if (this.type == 'character') {
|
||||||
@ -429,7 +452,7 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
heroReroll() {
|
heroReroll() {
|
||||||
if (this.villainy == 'character') {
|
if (this.type == 'character') {
|
||||||
return this.system.resources.hero.value > 0;
|
return this.system.resources.hero.value > 0;
|
||||||
} else {
|
} else {
|
||||||
if (this.system.villainy == 'adversary') {
|
if (this.system.villainy == 'adversary') {
|
||||||
|
@ -577,6 +577,9 @@ export class BoLDefaultRoll {
|
|||||||
if (this.rollData.mode == "alchemy") { // PP cost management
|
if (this.rollData.mode == "alchemy") { // PP cost management
|
||||||
actor.resetAlchemyStatus(this.rollData.alchemy._id)
|
actor.resetAlchemyStatus(this.rollData.alchemy._id)
|
||||||
}
|
}
|
||||||
|
if ( this.rollData.mode == "bougette" && this.rollData.isFailure) {
|
||||||
|
actor.decBougette()
|
||||||
|
}
|
||||||
|
|
||||||
await this.sendChatMessage()
|
await this.sendChatMessage()
|
||||||
}
|
}
|
||||||
@ -689,8 +692,8 @@ export class BoLDefaultRoll {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
_buildChatMessage(rollData) {
|
_buildChatMessage(rollData) {
|
||||||
const rollMessageTpl = 'systems/bol/templates/chat/rolls/default-roll-card.hbs';
|
const rollMessageTpl = 'systems/bol/templates/chat/rolls/default-roll-card.hbs'
|
||||||
return renderTemplate(rollMessageTpl, rollData);
|
return renderTemplate(rollMessageTpl, rollData)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,15 +17,15 @@ export class BoLCharacterSummary extends Application {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static ready() {
|
static ready() {
|
||||||
|
if ( !game.user.isGM ) { // Uniquement si GM
|
||||||
|
return
|
||||||
|
}
|
||||||
let charSummary = new BoLCharacterSummary()
|
let charSummary = new BoLCharacterSummary()
|
||||||
game.bol.charSummary = charSummary
|
game.bol.charSummary = charSummary
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
constructor() {
|
constructor() {
|
||||||
if ( !game.user.isGM ) { // Uniquement si GM
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
super();
|
super();
|
||||||
//game.settings.set("world", "character-summary-data", {npcList: [], x:0, y:0})
|
//game.settings.set("world", "character-summary-data", {npcList: [], x:0, y:0})
|
||||||
this.settings = game.settings.get("world", "character-summary-data")
|
this.settings = game.settings.get("world", "character-summary-data")
|
||||||
|
@ -297,11 +297,18 @@ BOL.actorIcons = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BOL.bougetteState = {
|
BOL.bougetteState = {
|
||||||
"nomoney": "BOL.bougette.nomoney",
|
"0": "BOL.bougette.nomoney",
|
||||||
"tolive": "BOL.bougette.tolive",
|
"1": "BOL.bougette.tolive",
|
||||||
"easylife": "BOL.bougette.easylife",
|
"2": "BOL.bougette.easylife",
|
||||||
"luxury": "BOL.bougette.luxury",
|
"3": "BOL.bougette.luxury",
|
||||||
"rich": "BOL.bougette.rich"
|
"4": "BOL.bougette.rich"
|
||||||
|
}
|
||||||
|
BOL.bougetteDice = {
|
||||||
|
"0": "0",
|
||||||
|
"1": "2d6-1",
|
||||||
|
"2": "2d6",
|
||||||
|
"3": "2d6+1",
|
||||||
|
"4": "2d6+2"
|
||||||
}
|
}
|
||||||
|
|
||||||
BOL.creatureSize = {
|
BOL.creatureSize = {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -14,7 +14,7 @@
|
|||||||
],
|
],
|
||||||
"url": "https://www.uberwald.me/gitea/public/bol",
|
"url": "https://www.uberwald.me/gitea/public/bol",
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"version": "10.4.4",
|
"version": "10.4.5",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "10",
|
"verified": "10",
|
||||||
@ -203,7 +203,7 @@
|
|||||||
],
|
],
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json",
|
||||||
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.4.4.zip",
|
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.4.5.zip",
|
||||||
"background": "systems/images/map_lemurie.webp",
|
"background": "systems/images/map_lemurie.webp",
|
||||||
"gridDistance": 1.5,
|
"gridDistance": 1.5,
|
||||||
"gridUnits": "m",
|
"gridUnits": "m",
|
||||||
|
@ -141,7 +141,8 @@
|
|||||||
"chartype": "player",
|
"chartype": "player",
|
||||||
"villainy": false,
|
"villainy": false,
|
||||||
"bougette": {
|
"bougette": {
|
||||||
"state": "nomoney"
|
"state": "nomoney",
|
||||||
|
"value": 0
|
||||||
},
|
},
|
||||||
"xp": {
|
"xp": {
|
||||||
"key": "xp",
|
"key": "xp",
|
||||||
|
@ -12,13 +12,20 @@
|
|||||||
<div class="item-image"><img src="icons/containers/bags/coinpouch-simple-leather-brown.webp" title="{{localize "BOL.ui.money"}}" /></div>
|
<div class="item-image"><img src="icons/containers/bags/coinpouch-simple-leather-brown.webp" title="{{localize "BOL.ui.money"}}" /></div>
|
||||||
{{localize "BOL.ui.money"}}
|
{{localize "BOL.ui.money"}}
|
||||||
</h4>
|
</h4>
|
||||||
<select class="field-value" name="system.bougette.state" data-dtype="String">
|
<div class="item-image">
|
||||||
{{#select system.bougette.state}}
|
<a class="bougette-roll rollable" data-roll-type="bougette"><i class="darkgreen fas fa-dice"></i></a>
|
||||||
{{#each config.bougetteState as |value id|}}
|
</div>
|
||||||
<option value="{{id}}">{{localize value}}</option>
|
{{#if isGM}}
|
||||||
{{/each}}
|
<select class="field-value" name="system.bougette.value" data-dtype="String">
|
||||||
|
{{#select bougette.value}}
|
||||||
|
{{#each config.bougetteState as |value id|}}
|
||||||
|
<option value="{{id}}">{{localize value}}</option>
|
||||||
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
|
{{else}}
|
||||||
|
<label class="">{{localize bougette.label}}</label></a>
|
||||||
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="attribute stat flex1 flex-group-center {{key}}">
|
<div class="attribute stat flex1 flex-group-center {{key}}">
|
||||||
<label class="stat-label"><a class="rollable" data-roll-type="attribute" data-roll="2d6+@attributes.{{key}}.value" data-adv="0" data-key="{{key}}">{{localize label}}</a></label><br/>
|
<label class="stat-label"><a class="rollable" data-roll-type="attribute" data-roll="2d6+@attributes.{{key}}.value" data-adv="0" data-key="{{key}}">{{localize label}}</a></label><br/>
|
||||||
<input class="stat-value rounded" type="text" name="system.attributes.{{key}}.value" value="{{numberFormat value decimals=0 sign=true}}" data-dtype="Number"/><br/>
|
<input class="stat-value rounded" type="text" name="system.attributes.{{key}}.value" value="{{numberFormat value decimals=0 sign=true}}" data-dtype="Number"/><br/>
|
||||||
<span class="stat-roll rollable" title="2d6" data-roll-type="attribute" data-roll="2d6+@attributes.{{key}}.value" data-adv="0" data-key="{{key}}">
|
<span class="stat-roll rollable" title="2d6" data-roll-type="attribute" data-roll="2d6+@attributes.{{key}}.value" data-adv="0" data-key="{{key}}">
|
||||||
<i class="darkgreen fas fa-dice"></i>
|
<i class="darkgreen fas fa-dice"></i>
|
||||||
</span>
|
</span>
|
||||||
<span class="tooltip-container">
|
<span class="tooltip-container">
|
||||||
|
@ -34,8 +34,21 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if (eq mode "bougette")}}
|
||||||
|
<div>
|
||||||
|
{{localize "BOL.chat.rollbougette"}} :
|
||||||
|
{{#if isSuccess}}
|
||||||
|
{{localize "BOL.chat.bougettesuccess"}}
|
||||||
|
{{else}}
|
||||||
|
{{localize "BOL.chat.bougettefailure"}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div id="{{optionsId}}">
|
<div id="{{optionsId}}">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{#if isRealCritical}}
|
{{#if isRealCritical}}
|
||||||
<div class="bol-margin-tb-2">
|
<div class="bol-margin-tb-2">
|
||||||
<a class="content-link" draggable="true" data-uuid="Compendium.bol.aides-de-jeu.Yl1RKQb0BjVUtilk" data-id="Yl1RKQb0BjVUtilk" data-type="JournalEntry" data-pack="bol.aides-de-jeu" data-tooltip="un journal"><i class="fas fa-book-open"></i>Succès Héroïque</a>
|
<a class="content-link" draggable="true" data-uuid="Compendium.bol.aides-de-jeu.Yl1RKQb0BjVUtilk" data-id="Yl1RKQb0BjVUtilk" data-type="JournalEntry" data-pack="bol.aides-de-jeu" data-tooltip="un journal"><i class="fas fa-book-open"></i>Succès Héroïque</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user