v11.0.28 - les fractures de Khrachtchoum #675
11
changelog.md
11
changelog.md
@ -1,4 +1,15 @@
|
||||
# v11.0
|
||||
## v11.0.28 - les fractures de Khrachtchoum
|
||||
- La gravité de la blessure est affichée dans le résumé de l'encaissement
|
||||
- Lors du changement d'acteur pendant le round
|
||||
- le message annonçant le joueur dont c'est le tour ne contient plus d'informations de santé
|
||||
- un message avec les informations de santé est envoyé au Gardienn et au propriétaire du token.acteur
|
||||
- le jet de vie est bien fait par le token si besoin
|
||||
- seul les propriétaires peuvent faire les jets de vie
|
||||
- Amélioration de la fenêtre de jets
|
||||
- le type de dégâts pour les attaques est toujours affiché
|
||||
- le moral est indiqué avant l'icone d'appel au moral
|
||||
|
||||
## v11.0.27 - Khrachtchoum le méticuleux
|
||||
- le tooltip dans les TMR reste visible si on ne bouge pas la souris
|
||||
- le surencombrement n'affecte QUE les actions physiques
|
||||
|
@ -448,7 +448,7 @@ export class RdDCombat {
|
||||
if (Misc.isUniqueConnectedGM()) {
|
||||
let turn = combat.turns.find(t => t.token?.id == combat.current.tokenId);
|
||||
if (turn?.actor) {
|
||||
RdDCombat.displayActorCombatStatus(combat, turn.actor);
|
||||
RdDCombat.displayActorCombatStatus(combat, turn.actor, turn.token.id);
|
||||
// TODO Playaudio for player??
|
||||
}
|
||||
}
|
||||
@ -512,8 +512,12 @@ export class RdDCombat {
|
||||
/* -------------------------------------------- */
|
||||
static _callJetDeVie(event) {
|
||||
let actorId = event.currentTarget.attributes['data-actorId'].value;
|
||||
let actor = game.actors.get(actorId);
|
||||
actor.jetVie();
|
||||
let tokenId = event.currentTarget.attributes['data-tokenId'].value;
|
||||
let token = canvas.tokens.placeables.find(t => t.id == tokenId)
|
||||
const actor = token?.actor ?? game.actors.get(actorId);
|
||||
if (actor?.isOwner) {
|
||||
actor.jetVie();
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -539,7 +543,7 @@ export class RdDCombat {
|
||||
}
|
||||
});
|
||||
}
|
||||
html.on("click", '#chat-jet-vie', event => {
|
||||
html.on("click", 'a.chat-jet-vie', event => {
|
||||
event.preventDefault();
|
||||
RdDCombat._callJetDeVie(event);
|
||||
});
|
||||
@ -1292,7 +1296,7 @@ export class RdDCombat {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async displayActorCombatStatus(combat, actor) {
|
||||
static async displayActorCombatStatus(combat, actor, tokenId) {
|
||||
let formData = {
|
||||
combatId: combat._id,
|
||||
alias: actor.name,
|
||||
@ -1301,12 +1305,18 @@ export class RdDCombat {
|
||||
blessuresStatus: actor.computeResumeBlessure(),
|
||||
SConst: actor.getSConst(),
|
||||
actorId: actor.id,
|
||||
tokenId: tokenId,
|
||||
isGrave: actor.countBlessures(it => it.isGrave()) > 0,
|
||||
isCritique: actor.countBlessures(it => it.isCritique()) > 0
|
||||
}
|
||||
|
||||
ChatUtility.createChatWithRollMode(actor.name, {
|
||||
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-turn-summary.html`, formData)
|
||||
await ChatMessage.create({
|
||||
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-turn-acteur.hbs`, formData),
|
||||
alias: actor.name
|
||||
});
|
||||
await ChatMessage.create({
|
||||
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-turn-sante.hbs`, formData),
|
||||
whisper: ChatUtility.getWhisperRecipientsAndGMs(actor.name),
|
||||
alias: actor.name
|
||||
});
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@ export class RdDRoll extends Dialog {
|
||||
|
||||
const html = await renderTemplate(dialogConfig.html, rollData);
|
||||
|
||||
let options = { classes: ["rdd-roll-dialog"], width: 600, height: 'fit-content', 'z-index': 99999, close: html => {} };
|
||||
let options = { classes: ["rdd-roll-dialog"], width: 650, height: 'fit-content', 'z-index': 99999, close: html => {} };
|
||||
if (dialogConfig.close) {
|
||||
options.close = dialogConfig.close;
|
||||
}
|
||||
@ -185,7 +185,7 @@ export class RdDRoll extends Dialog {
|
||||
console.log("RdDRollSelectDialog - Cout reve", ptreve);
|
||||
this.updateRollResult(html);
|
||||
});
|
||||
this.html.find("[name='mortalite']").change((event) => {
|
||||
this.html.find("input.check-mortalite").change((event) => {
|
||||
this.rollData.dmg.mortalite = event.currentTarget.checked ? "non-mortel" : "mortel";
|
||||
this.updateRollResult(html);
|
||||
});
|
||||
@ -289,18 +289,12 @@ export class RdDRoll extends Dialog {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async updateRollResult(html) {
|
||||
let rollData = this.rollData;
|
||||
const rollData = this.rollData;
|
||||
|
||||
rollData.dmg = rollData.attackerRoll?.dmg ?? RdDBonus.dmg(rollData, this.actor.getBonusDegat())
|
||||
rollData.caracValue = parseInt(rollData.selectedCarac.value)
|
||||
rollData.mortalite = rollData.attackerRoll?.dmg.mortalite ?? rollData.dmg.mortalite ?? rollData.mortalite ?? 'mortel';
|
||||
rollData.dmg.mortalite = rollData.dmg.mortalite ?? 'mortel';
|
||||
rollData.use.appelAuMoral = this.actor.isPersonnage() && RdDCarac.isActionPhysique(rollData.selectedCarac);
|
||||
let dmgText = Misc.toSignedString(rollData.dmg.total);
|
||||
|
||||
switch (rollData.mortalite) {
|
||||
case 'non-mortel': dmgText = `(${dmgText}) non-mortel`; break;
|
||||
case 'empoignade': dmgText = `empoignade`; break;
|
||||
}
|
||||
|
||||
RollDataAjustements.calcul(rollData, this.actor);
|
||||
|
||||
@ -311,12 +305,15 @@ export class RdDRoll extends Dialog {
|
||||
HtmlUtility.showControlWhen(this.html.find(".use-surenc"), rollData.ajustements.surenc.visible && RdDCarac.isActionPhysique(rollData.selectedCarac));
|
||||
HtmlUtility.showControlWhen(this.html.find(".utilisation-moral"), rollData.use.appelAuMoral);
|
||||
HtmlUtility.showControlWhen(this.html.find(".divAppelAuMoral"), rollData.use.appelAuMoral);
|
||||
HtmlUtility.showControlWhen(this.html.find(".diffMoral"), rollData.ajustements.moralTotal.used);
|
||||
// HtmlUtility.showControlWhen(this.html.find(".diffMoral"), rollData.ajustements.moral.used);
|
||||
|
||||
// Mise à jour valeurs
|
||||
this.html.find(".dialog-roll-title").text(this._getTitle(rollData));
|
||||
this.html.find("[name='mortalite']").prop('checked', rollData.mortalite == 'non-mortel');
|
||||
this.html.find(".dmg-arme-actor").text(dmgText);
|
||||
this.html.find("input.check-mortalite").prop('checked', rollData.dmg.mortalite == 'non-mortel');
|
||||
this.html.find("label.dmg-arme-actor").text(rollData.dmg.mortalite == 'empoignade'? 'empoignade': Misc.toSignedString(rollData.dmg.total) );
|
||||
this.html.find("label.arme-mortalite").text(rollData.dmg.mortalite);
|
||||
// this.html.find("[name='dmg-arme-actor']").text(rollData.dmg.mortalite == 'empoignade'? 'empoignade': Misc.toSignedString(rollData.dmg.total) );
|
||||
// this.html.find("[name='arme-mortalite']").text(rollData.dmg.mortalite);
|
||||
this.html.find("div.placeholder-ajustements").empty().append(adjustements);
|
||||
this.html.find("div.placeholder-resolution").empty().append(resolutionTable)
|
||||
}
|
||||
@ -334,16 +331,19 @@ export class RdDRoll extends Dialog {
|
||||
return carac;
|
||||
}
|
||||
const compName = rollData.competence.name;
|
||||
if (rollData.draconicList && rollData.selectedSort) {
|
||||
return compName + " - " + rollData.selectedSort.name;
|
||||
}
|
||||
// If a weapon is there, add it in the title
|
||||
const niveau = Misc.toSignedString(rollData.competence.system.niveau)
|
||||
if (compName == carac) {
|
||||
// cas des créatures
|
||||
return carac + " Niveau " + niveau
|
||||
return `${carac} Niveau ${niveau}`
|
||||
}
|
||||
const armeTitle = (rollData.arme) ? " (" + rollData.arme.name + ") " : "";
|
||||
return carac + "/" + compName + armeTitle + " Niveau " + niveau
|
||||
if (rollData.draconicList && rollData.selectedSort) {
|
||||
// cas de lancer de sort
|
||||
return `${rollData.competence.name} Niveau ${niveau} ${rollData.selectedSort.name}`
|
||||
}
|
||||
if (rollData.arme && rollData.arme.name != compName) {
|
||||
// ajouter l'arme au titre si son nom n'est pas la compétence
|
||||
return `${carac} / ${compName} (${rollData.arme.name}) Niveau ${niveau}`
|
||||
}
|
||||
return `${carac} / ${compName} Niveau ${niveau}`
|
||||
}
|
||||
}
|
||||
|
@ -245,7 +245,8 @@ export class RdDUtility {
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-description.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-info-appel-au-moral.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-info-distance.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-actor-turn-summary.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-actor-turn-acteur.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-actor-turn-sante.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-actor-competence-xp.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-actor-carac-xp.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-potionenchantee-chateaudormant.html',
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"id": "foundryvtt-reve-de-dragon",
|
||||
"title": "Rêve de Dragon",
|
||||
"version": "11.0.27",
|
||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.0.27.zip",
|
||||
"version": "11.0.28",
|
||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.0.28.zip",
|
||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v11/system.json",
|
||||
"changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md",
|
||||
"compatibility": {
|
||||
|
1
templates/chat-actor-turn-acteur.hbs
Normal file
1
templates/chat-actor-turn-acteur.hbs
Normal file
@ -0,0 +1 @@
|
||||
<h4>C'est au tour de {{alias}} !</h4>
|
@ -1,4 +1,4 @@
|
||||
<h4>C'est au tour de {{alias}} !</h4>
|
||||
<h4>Résumé de santé pour {{alias}}</h4>
|
||||
<div data-combatid="{{combatId}}" data-combatmessage="actor-turn-summary">{{blessuresStatus}}</div>
|
||||
<div>Son état général est de : {{etatGeneral}} {{#if isSonne}} et est <strong>sonné</strong>{{/if}}</div>
|
||||
{{#if isGrave}}
|
||||
@ -6,5 +6,7 @@
|
||||
{{/if}}
|
||||
{{#if isCritique}}
|
||||
<div>{{alias}} souffre d'une <strong>Blessure Critique</strong> : faites un
|
||||
<a id="chat-jet-vie" class="chat-card-button" data-actorId="{{actorId}}">Jet de Vie.<a></div>
|
||||
<a class="chat-card-button chat-jet-vie"
|
||||
data-tokenId="{{tokenId}}"
|
||||
data-actorId="{{actorId}}">Jet de Vie.<a></div>
|
||||
{{/if}}
|
@ -26,7 +26,7 @@
|
||||
{{#if (eq dmg.mortalite 'entiteincarnee')}}subit le coup
|
||||
{{else if mort}}vient de mourir
|
||||
{{else if blessure}}
|
||||
{{#if (gt blessure.system.gravite 0)}}subit une blessure {{blessure.system.labelGravite}}
|
||||
{{#if (gt blessure.system.gravite 0)}}subit une blessure {{blessure.system.label}}
|
||||
{{else}}subit une contusion
|
||||
{{~/if~}}
|
||||
{{else}}s'en sort sans une égratignure
|
||||
|
@ -1,13 +1,29 @@
|
||||
<form class="skill-roll-dialog">
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
|
||||
<h2 class="dialog-roll-title"></h2>
|
||||
|
||||
<div class="grid grid-2col">
|
||||
<div class="flex-group-left">
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
|
||||
<div class="flexrow">
|
||||
<label>Caractéristique</label>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}}
|
||||
<span>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}}
|
||||
</span>
|
||||
</div>
|
||||
{{#if targetToken}}
|
||||
<div class="flexrow">
|
||||
<label>Cible:</label>
|
||||
<label>
|
||||
<img class="sheet-competence-img" src="{{targetToken.img}}" title="{{targetToken.name}}" />
|
||||
{{targetToken.name}}
|
||||
</label>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if ajustements.attaqueDefenseurSurpris.used}}
|
||||
<div class="flexrow">
|
||||
<label>{{ajustements.attaqueDefenseurSurpris.label}}</label>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if arme}}
|
||||
{{#if attackerRoll}}
|
||||
{{#if attackerRoll.tactique}}
|
||||
@ -27,41 +43,28 @@
|
||||
<div class="tooltiptext ttt-ajustements">
|
||||
<div>
|
||||
<strong>Charge</strong> : Les longueurs d'armes n'interviennent pas dans la charge, il faut gérer une initiative aléatoire dans ce cas.
|
||||
<br><strong>Feinte</strong> : Vous devez avoir l'initative sur votre adversaire et y renoncer.
|
||||
<br>
|
||||
<strong>Feinte</strong> : Vous devez avoir l'initative sur votre adversaire et y renoncer.
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if targetToken}}
|
||||
<div class="flexrow">
|
||||
Cible: {{targetToken.name}}
|
||||
<img class="sheet-competence-img" src="{{targetToken.img}}" title="{{targetToken.name}}" />
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if ajustements.attaqueDefenseurSurpris.used}}
|
||||
<div class="flexrow">
|
||||
<label>{{ajustements.attaqueDefenseurSurpris.label}}</label>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#unless attackerRoll}}
|
||||
<div class="flexrow">
|
||||
<label>Dégats:</label>
|
||||
{{#if (eq arme.system.mortalite 'non-mortel')}}
|
||||
<label class="dmg-arme-actor"></label>
|
||||
{{else if (eq arme.system.mortalite 'empoignade')}}
|
||||
{{#if (eq arme.system.mortalite 'empoignade')}}
|
||||
<label>Empoignade</label>
|
||||
{{else}}
|
||||
<span>
|
||||
<input class="attribute-value" type="checkbox" name="motalite" {{#unless (eq mortalite 'mortel')}}checked{{/unless}} />
|
||||
<label class="dmg-arme-actor"></label>
|
||||
{{#unless (eq arme.system.mortalite 'non-mortel')}}
|
||||
<input class="attribute-value check-mortalite" type="checkbox" name="mortalite" {{#unless (eq mortalite 'mortel')}}checked{{/unless}} />
|
||||
{{/unless}}
|
||||
<label class="dmg-arme-actor" name="dmg-arme-actor"></label> (<label class="arme-mortalite" name="arme-mortalite"></label>)
|
||||
</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<div class="flexrow"></div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-surenc.html"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-enctotal.html"}}
|
||||
</div>
|
||||
@ -75,6 +78,7 @@
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-forcer.html"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html"}}
|
||||
<div class="flexrow"></div>
|
||||
<div class="placeholder-ajustements" class="flexrow"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user