Various fixes
This commit is contained in:
parent
5373f15e92
commit
2336289f5a
@ -2402,12 +2402,14 @@ export class RdDActor extends Actor {
|
|||||||
async rollCompetence(name) {
|
async rollCompetence(name) {
|
||||||
let rollData = { competence: Misc.data(this.getCompetence(name)) }
|
let rollData = { competence: Misc.data(this.getCompetence(name)) }
|
||||||
|
|
||||||
|
//console.log("COMP CREATURE", name, rollData, name);
|
||||||
if (rollData.competence.type == 'competencecreature') {
|
if (rollData.competence.type == 'competencecreature') {
|
||||||
if (rollData.competence.data.iscombat) {
|
if (rollData.competence.data.iscombat) {
|
||||||
const arme = RdDItemCompetenceCreature.toArme(rollData.competence);
|
const arme = RdDItemCompetenceCreature.toArme(rollData.competence);
|
||||||
RdDCombat.createUsingTarget(this).attaque(rollData.competence, arme);
|
RdDCombat.createUsingTarget(this).attaque(rollData.competence, arme);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//console.log("COMP CREATURE2");
|
||||||
// Fake competence pour créature
|
// Fake competence pour créature
|
||||||
RdDItemCompetenceCreature.setRollDataCreature(rollData);
|
RdDItemCompetenceCreature.setRollDataCreature(rollData);
|
||||||
}
|
}
|
||||||
|
@ -38,10 +38,11 @@ const MAX_NOMBRE_ASTRAL = 12;
|
|||||||
export class RdDCalendrier extends Application {
|
export class RdDCalendrier extends Application {
|
||||||
|
|
||||||
getCalendrier(index) {
|
getCalendrier(index) {
|
||||||
|
let month = Math.floor(index / 28) % 12;
|
||||||
let calendrier = {
|
let calendrier = {
|
||||||
heureRdD: 0, // Index dans heuresList
|
heureRdD: 0, // Index dans heuresList
|
||||||
minutesRelative: 0,
|
minutesRelative: 0,
|
||||||
moisRdD: Math.floor(index / 28) % 12,
|
moisRdD: month,
|
||||||
jour: (index - (month * 28)) + 1
|
jour: (index - (month * 28)) + 1
|
||||||
}
|
}
|
||||||
return calendrier;
|
return calendrier;
|
||||||
@ -168,7 +169,11 @@ export class RdDCalendrier extends Application {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getNombreAstral(indexDate) {
|
getNombreAstral(indexDate) {
|
||||||
const liste = this.listeNombreAstral ?? this._loadListNombreAstral();
|
let liste = this.listeNombreAstral ?? this._loadListNombreAstral();
|
||||||
|
if ( typeof(liste) != 'Array' || liste.length == 0 ) {
|
||||||
|
this.rebuildListeNombreAstral();
|
||||||
|
liste = this.listeNombreAstral;
|
||||||
|
}
|
||||||
let astralData = liste.find((nombreAstral, i) => nombreAstral.index == indexDate);
|
let astralData = liste.find((nombreAstral, i) => nombreAstral.index == indexDate);
|
||||||
if (!astralData?.nombreAstral) {
|
if (!astralData?.nombreAstral) {
|
||||||
this.rebuildListeNombreAstral();
|
this.rebuildListeNombreAstral();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "foundryvtt-reve-de-dragon",
|
"name": "foundryvtt-reve-de-dragon",
|
||||||
"title": "Rêve de Dragon",
|
"title": "Rêve de Dragon",
|
||||||
"description": "Rêve de Dragon RPG for FoundryVTT",
|
"description": "Rêve de Dragon RPG for FoundryVTT",
|
||||||
"version": "1.4.23",
|
"version": "1.4.24",
|
||||||
"manifestPlusVersion": "1.0.0",
|
"manifestPlusVersion": "1.0.0",
|
||||||
"minimumCoreVersion": "0.8.0",
|
"minimumCoreVersion": "0.8.0",
|
||||||
"compatibleCoreVersion": "0.8.99",
|
"compatibleCoreVersion": "0.8.99",
|
||||||
|
@ -114,9 +114,11 @@
|
|||||||
<ol class="item-list alterne-list">
|
<ol class="item-list alterne-list">
|
||||||
{{#each competences as |comp key|}}
|
{{#each competences as |comp key|}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
||||||
<img class="sheet-competence-img" src="{{comp.img}}" />
|
<a class="competence-label" name="{{comp.name}}">
|
||||||
<span class="competence-label"><a>{{comp.name}}</a></span>
|
<img class="sheet-competence-img" src="{{comp.img}}"/>
|
||||||
<input class="competence-value creature-carac" type="text" compname="{{comp.name}}"
|
<span class="competence-label">{{comp.name}}</span>
|
||||||
|
</a>
|
||||||
|
<input class="competence-value creature-carac" type="text" compname="{{comp.name}}"
|
||||||
value="{{comp.data.carac_value}}" data-dtype="number" />
|
value="{{comp.data.carac_value}}" data-dtype="number" />
|
||||||
<input class="competence-value creature-niveau" type="text" compname="{{comp.name}}"
|
<input class="competence-value creature-niveau" type="text" compname="{{comp.name}}"
|
||||||
value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" />
|
value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" />
|
||||||
|
Loading…
Reference in New Issue
Block a user