Compare commits
5 Commits
v13
...
3e355784c7
Author | SHA1 | Date | |
---|---|---|---|
3e355784c7 | |||
b92055d5dd | |||
220f8142f5 | |||
a8bb00ad0b | |||
78e30b5503 |
@ -1,4 +1,11 @@
|
||||
# 12.0
|
||||
## 12.0.41 - La loupe d'Astrobazzarh
|
||||
- On peut de nouveau effectuer des tirages cachés
|
||||
|
||||
## 12.0.40 - Les mains d'Astrobazzarh
|
||||
- correction des attaques particulières en combat
|
||||
- correction de message sur les min/max liés aux modificateurs de races (s'applique uniquement sur la taille)
|
||||
|
||||
## 12.0.39 - Les mains d'Astrobazzarh
|
||||
- les armes à 1 ou 2 mains fonctionnent dans les liens de jets de dés
|
||||
- commande `/jet` pour poster une demande de jet de dés
|
||||
|
@ -62,7 +62,6 @@ export class ChatUtility {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
static removeMessages(socketData) {
|
||||
if (Misc.isFirstConnectedGM()) {
|
||||
ChatUtility.onRemoveMessages(socketData);
|
||||
@ -97,7 +96,7 @@ export class ChatUtility {
|
||||
}
|
||||
break
|
||||
case "gmroll":
|
||||
messageData.whisper = ChatUtility.getOwners(actor)
|
||||
messageData.whisper = actor ? ChatUtility.getOwners(actor) : ChatUtility.getUserAndGMs()
|
||||
break
|
||||
case "selfroll":
|
||||
messageData.whisper = [game.user]
|
||||
@ -108,7 +107,7 @@ export class ChatUtility {
|
||||
}
|
||||
|
||||
static getOwners(document) {
|
||||
return game.users.filter(it => document.getUserLevel(it) == CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER)
|
||||
return document ? game.users.filter(it => document.getUserLevel(it) == CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER) : [game.user]
|
||||
}
|
||||
|
||||
static getUserAndGMs() {
|
||||
@ -199,7 +198,7 @@ export class ChatUtility {
|
||||
static async onCreateChatMessage(chatMessage, options, id) {
|
||||
if (chatMessage.isAuthor) {
|
||||
await chatMessage.setFlag(SYSTEM_RDD, 'rdd-timestamp', game.system.rdd.calendrier.getTimestamp());
|
||||
await chatMessage.update({ content: await RdDTextEditor.enrichHTML(chatMessage.content, undefined, {showLink:false}) })
|
||||
await chatMessage.update({ content: await RdDTextEditor.enrichHTML(chatMessage.content, undefined, { showLink: false }) })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,10 +19,12 @@ export class RdDItemRace extends RdDItem {
|
||||
return false
|
||||
}
|
||||
}
|
||||
const carac = RdDCarac.carac(code)
|
||||
if (race.isMax(actor, code, value - 1)) {
|
||||
ui.notifications.warn(`${value} est supérieure au maximum de ${carac.label}`)
|
||||
return false
|
||||
if (code == LIST_CARAC_PERSONNAGE.taille.code) {
|
||||
const carac = RdDCarac.carac(code)
|
||||
if (race.isMax(actor, code, value - 1)) {
|
||||
ui.notifications.warn(`${value} est supérieure au maximum de ${carac.label}`)
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
@ -59,7 +61,8 @@ export class RdDItemRace extends RdDItem {
|
||||
if (code == LIST_CARAC_PERSONNAGE.force.code) {
|
||||
return value >= this.getForceMax(actor)
|
||||
}
|
||||
const max = foundry.utils.getProperty(this, path) ?? -1
|
||||
const pathMax = path.replace(".value", ".max");
|
||||
const max = foundry.utils.getProperty(this, pathMax) ?? -1
|
||||
return (max > 0 && value >= max)
|
||||
}
|
||||
|
||||
|
@ -776,7 +776,7 @@ export class RdDCombat {
|
||||
|
||||
if (this.attacker.isCreatureEntite()) {
|
||||
RdDItemCompetenceCreature.setRollDataCreature(rollData);
|
||||
}
|
||||
}
|
||||
else if (arme) {
|
||||
// Usual competence
|
||||
rollData.arme = RdDItemArme.armeUneOuDeuxMains(arme, RdDItemCompetence.isArmeUneMain(competence));
|
||||
@ -832,7 +832,10 @@ export class RdDCombat {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _onAttaqueNormale(attackerRoll) {
|
||||
if (!RdDCombat.isReussite(attackerRoll) || RdDCombat.isParticuliere(attackerRoll)) {
|
||||
if (!RdDCombat.isReussite(attackerRoll)) {
|
||||
return
|
||||
}
|
||||
if (RdDCombat.isParticuliere(attackerRoll) && attackerRoll.particuliere == undefined) {
|
||||
return
|
||||
}
|
||||
console.log("RdDCombat.onAttaqueNormale >>>", attackerRoll);
|
||||
@ -849,7 +852,7 @@ export class RdDCombat {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.target) {
|
||||
if (this.defender) {
|
||||
await this._sendMessageDefense(attackerRoll, defenderRoll);
|
||||
}
|
||||
}
|
||||
@ -999,7 +1002,7 @@ export class RdDCombat {
|
||||
|
||||
this.removeChatMessageActionsPasseArme(rollData.passeArme);
|
||||
rollData.particuliere = choix;
|
||||
await this._onAttaqueNormale(rollData);
|
||||
await this._onAttaqueNormale(rollData)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
@ -2,19 +2,22 @@
|
||||
<h4 class="rdd-roll-part">{{alias}} réussit une attaque particulière!</strong></h4>
|
||||
{{#if isForce}}
|
||||
<br>
|
||||
<a class="chat-card-button particuliere-attaque" data-mode="force" data-attackerId="{{attackerId}}">
|
||||
<a class="chat-card-button particuliere-attaque" data-mode="force" data-attackerId="{{attackerId}}"
|
||||
data-defenderTokenId="{{defenderToken.id}}" data-attackerTokenId="{{attackerToken.id}}">
|
||||
Attaquer en Force
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if isRapide}}
|
||||
<br>
|
||||
<a class="chat-card-button particuliere-attaque" data-mode="rapidite" data-attackerId="{{attackerId}}">
|
||||
<a class="chat-card-button particuliere-attaque" data-mode="rapidite" data-attackerId="{{attackerId}}"
|
||||
data-defenderTokenId="{{defenderToken.id}}" data-attackerTokenId="{{attackerToken.id}}">
|
||||
Attaquer en Rapidité
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if isFinesse}}
|
||||
<br>
|
||||
<a class="chat-card-button particuliere-attaque" data-mode="finesse" data-attackerId="{{attackerId}}">
|
||||
<a class="chat-card-button particuliere-attaque" data-mode="finesse" data-attackerId="{{attackerId}}"
|
||||
data-defenderTokenId="{{defenderToken.id}}" data-attackerTokenId="{{attackerToken.id}}">
|
||||
Attaquer en Finesse
|
||||
</a>
|
||||
{{/if}}
|
||||
|
@ -4,7 +4,7 @@
|
||||
<hr>
|
||||
<div>
|
||||
{{#if rolled.isSuccess}}
|
||||
{{alias}} a gagné {{xpSort}} points d'expérience en sorts dans la {{competence.name}}.
|
||||
{{alias}} a gagné {{xpSort}} points d'expérience en sorts en {{competence.name}}.
|
||||
{{else}}
|
||||
{{alias}} n'a pas pu interpréter le signe draconique.
|
||||
{{/if}}
|
||||
|
Reference in New Issue
Block a user