Ajout Résistance/structure max aux véhicules

Pour qu'on puisse les réparer
This commit is contained in:
Vincent Vandemeulebrouck 2022-09-27 00:15:34 +02:00
parent dc0fab2957
commit 5d36ea9e0c
7 changed files with 103 additions and 43 deletions

View File

@ -3876,8 +3876,10 @@ export class RdDActor extends Actor {
id: vehicle.id, id: vehicle.id,
name: vehicle.name, name: vehicle.name,
img: vehicle.img, img: vehicle.img,
system: {
categorie: vehicle.system.categorie, categorie: vehicle.system.categorie,
structure: vehicle.system.structure, etat: vehicle.system.etat
}
}; };
} }

View File

@ -80,11 +80,30 @@ class _10_0_17_MigrationCompetenceCreature extends Migration {
} }
} }
class _10_0_21_VehiculeStructureResistanceMax extends Migration {
get code() { return "vehicule-structure-resistance-max"; }
get version() { return "10.0.21"; }
async migrate() {
await game.actors
.filter((actor) => actor.type == "vehicule")
.forEach(async (actor) => {
await actor.update({
'system.etat.resistance.value': actor.system.resistance,
'system.etat.resistance.max': actor.system.resistance,
'system.etat.structure.value': actor.system.structure,
'system.etat.structure.max': actor.system.structure
})
});
}
}
export class Migrations { export class Migrations {
static getMigrations() { static getMigrations() {
return [ return [
new _10_0_16_MigrationSortsReserve(), new _10_0_16_MigrationSortsReserve(),
new _10_0_17_MigrationCompetenceCreature() new _10_0_17_MigrationCompetenceCreature(),
new _10_0_21_VehiculeStructureResistanceMax(),
]; ];
} }

View File

@ -1,9 +1,9 @@
{"_id":"0ZW71u9G8fqnyNfy","name":"Drakkar","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Bateau","resistance":28,"structure":12,"vitesse":"3/2/1","bonus":"(10)/+10/+14","manoeuvrabilite":"0/-2/-4","equipage":8,"capacite_encombrement":150,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/drakkar.webp","token":{"flags":{},"name":"Drakkar","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/drakkar_token.webp","tint":"","width":10,"height":10,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"0ZW71u9G8fqnyNfy","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"0ZW71u9G8fqnyNfy","name":"Drakkar","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.0ZW71u9G8fqnyNfy"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/drakkar.webp","items":[],"effects":[],"system":{"categorie":"Bateau","resistance":28,"structure":12,"vitesse":"3/2/1","bonus":"(10)/+10/+14","manoeuvrabilite":"0/-2/-4","equipage":8,"capacite_encombrement":150,"etat":{"resistance":{"type":"number","max":28,"value":28,"label":"Résistance","derivee":false},"structure":{"type":"number","max":12,"value":12,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Drakkar","displayName":0,"width":10,"height":10,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/drakkar_token.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097623,"modifiedTime":1664231486338,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}}
{"_id":"5FWY38a5emYmqisa","name":"Cariole","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Cariole à Bras","resistance":10,"structure":6,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":50,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/cariole.webp","token":{"flags":{},"name":"Cariole","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/cariole_token.webp","tint":"","width":2,"height":2,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"5FWY38a5emYmqisa","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"5FWY38a5emYmqisa","name":"Cariole","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.5FWY38a5emYmqisa"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/cariole.webp","items":[],"effects":[],"system":{"categorie":"Cariole à Bras","resistance":10,"structure":6,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":50,"etat":{"resistance":{"type":"number","max":10,"value":10,"label":"Résistance","derivee":false},"structure":{"type":"number","max":6,"value":6,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Cariole","displayName":0,"width":2,"height":2,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/cariole_token.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097624,"modifiedTime":1664231486337,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}}
{"_id":"C0JpbzQSELoml971","name":"Canot","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Barque","resistance":14,"structure":6,"vitesse":"","bonus":"(2)/+3/+5","manoeuvrabilite":"","equipage":1,"capacite_encombrement":50,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/canot.webp","token":{"flags":{},"name":"Canot","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/canot_token.webp","tint":"","width":3,"height":3,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"C0JpbzQSELoml971","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"C0JpbzQSELoml971","name":"Canot","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.C0JpbzQSELoml971"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/canot.webp","items":[],"effects":[],"system":{"categorie":"Barque","resistance":14,"structure":6,"vitesse":"","bonus":"(2)/+3/+5","manoeuvrabilite":"","equipage":1,"capacite_encombrement":50,"etat":{"resistance":{"type":"number","max":14,"value":14,"label":"Résistance","derivee":false},"structure":{"type":"number","max":6,"value":6,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Canot","displayName":0,"width":3,"height":3,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/canot_token.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097625,"modifiedTime":1664231486336,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}}
{"_id":"PoQUTsNThYDp6XAW","name":"Nef","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Bateau","resistance":30,"structure":14,"vitesse":"5/4/2","bonus":"","manoeuvrabilite":"0/-3/-4","equipage":12,"capacite_encombrement":200,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/nef.webp","token":{"flags":{},"name":"Nef","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/nef_token.webp","tint":"","width":13,"height":13,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"PoQUTsNThYDp6XAW","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"PoQUTsNThYDp6XAW","name":"Nef","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.PoQUTsNThYDp6XAW"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/nef.webp","items":[],"effects":[],"system":{"categorie":"Bateau","resistance":30,"structure":14,"vitesse":"5/4/2","bonus":"","manoeuvrabilite":"0/-3/-4","equipage":12,"capacite_encombrement":200,"etat":{"resistance":{"type":"number","max":30,"value":30,"label":"Résistance","derivee":false},"structure":{"type":"number","max":14,"value":14,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Nef","displayName":0,"width":13,"height":13,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/nef_token.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097626,"modifiedTime":1664231486339,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}}
{"_id":"RFOYL8HBUxd32DXS","name":"Galère","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Bateau","resistance":36,"structure":14,"vitesse":"2/2/1","bonus":"(12)/+12/+16","manoeuvrabilite":"0/-4/-6","equipage":10,"capacite_encombrement":300,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/galere.webp","token":{"flags":{},"name":"Galère","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/galere_token.webp","tint":"","width":14,"height":14,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"RFOYL8HBUxd32DXS","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"RFOYL8HBUxd32DXS","name":"Galère","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.RFOYL8HBUxd32DXS"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/galere.webp","items":[],"effects":[],"system":{"categorie":"Bateau","resistance":36,"structure":14,"vitesse":"2/2/1","bonus":"(12)/+12/+16","manoeuvrabilite":"0/-4/-6","equipage":10,"capacite_encombrement":300,"etat":{"resistance":{"type":"number","max":36,"value":36,"label":"Résistance","derivee":false},"structure":{"type":"number","max":14,"value":14,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Galère","displayName":0,"width":14,"height":14,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/galere_token.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097627,"modifiedTime":1664231486339,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}}
{"_id":"TDpSn7GawJ1LCHp7","name":"Charette","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Chariot","resistance":16,"structure":8,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":100,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/charette.webp","token":{"flags":{},"name":"Charette","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/charette_token.webp","tint":"","width":3,"height":3,"scale":1.1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"TDpSn7GawJ1LCHp7","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"TDpSn7GawJ1LCHp7","name":"Charette","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.TDpSn7GawJ1LCHp7"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/charette.webp","items":[],"effects":[],"system":{"categorie":"Chariot","resistance":16,"structure":8,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":100,"etat":{"resistance":{"type":"number","max":16,"value":16,"label":"Résistance","derivee":false},"structure":{"type":"number","max":8,"value":8,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Charette","displayName":0,"width":3,"height":3,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/charette_token.webp","tint":null,"scaleX":1.1,"scaleY":1.1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097629,"modifiedTime":1664231486337,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}}
{"_id":"ZiyRDzz3gGzlpLIc","name":"Barque","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Barque","resistance":20,"structure":10,"vitesse":"3/2/1","bonus":"(4)/+4/+6","manoeuvrabilite":"0/0/-4","equipage":4,"capacite_encombrement":100,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/barque.webp","token":{"flags":{},"name":"Barque","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/barque_token.webp","tint":"","width":6,"height":6,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"ZiyRDzz3gGzlpLIc","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"ZiyRDzz3gGzlpLIc","name":"Barque","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.ZiyRDzz3gGzlpLIc"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/barque.webp","items":[],"effects":[],"system":{"categorie":"Barque","resistance":20,"structure":10,"vitesse":"3/2/1","bonus":"(4)/+4/+6","manoeuvrabilite":"0/0/-4","equipage":4,"capacite_encombrement":100,"etat":{"resistance":{"type":"number","max":20,"value":20,"label":"Résistance","derivee":false},"structure":{"type":"number","max":10,"value":10,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Barque","displayName":0,"width":6,"height":6,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/barque_token.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097629,"modifiedTime":1664231486336,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}}
{"_id":"gM77co80kmpVsYg6","name":"Posé par terre","permission":{"default":0,"Q2G6GTdrotKzYGUC":3},"type":"vehicule","data":{"categorie":"Autre","resistance":0,"structure":0,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":0,"capacite_encombrement":100,"description":"<p>D&eacute;poser ici les objets que vous voulez &eacute;changer avec d'autres joueurs</p>","notesmj":""},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.webp","token":{"flags":{},"name":"Posé par terre","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.webp","tint":"","width":1,"height":1,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"gM77co80kmpVsYg6","actorLink":true,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"gM77co80kmpVsYg6","name":"Posé par terre","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.gM77co80kmpVsYg6"}},"img":"systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.webp","items":[],"effects":[],"system":{"categorie":"Autre","resistance":0,"structure":0,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":0,"capacite_encombrement":100,"etat":{"resistance":{"type":"number","max":0,"value":0,"label":"Résistance","derivee":false},"structure":{"type":"number","max":0,"value":0,"label":"Structure","derivee":false}},"description":"<p>D&eacute;poser ici les objets que vous voulez &eacute;changer avec d'autres joueurs</p>","race":"","notesmj":"","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"Q2G6GTdrotKzYGUC":3},"prototypeToken":{"flags":{},"name":"Posé par terre","displayName":0,"width":1,"height":1,"lockRotation":false,"rotation":0,"actorLink":true,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097630,"modifiedTime":1664231486340,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}}
{"_id":"idyDmDWYpQ4Eppen","name":"Chariot","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Chariot","resistance":20,"structure":10,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":150,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/chariot.webp","token":{"flags":{},"name":"Chariot","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/chariot_token.webp","tint":"","width":4,"height":4,"scale":1.4,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"idyDmDWYpQ4Eppen","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"idyDmDWYpQ4Eppen","name":"Chariot","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.idyDmDWYpQ4Eppen"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/chariot.webp","items":[],"effects":[],"system":{"categorie":"Chariot","resistance":20,"structure":10,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":150,"etat":{"resistance":{"type":"number","max":20,"value":20,"label":"Résistance","derivee":false},"structure":{"type":"number","max":10,"value":10,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Chariot","displayName":0,"width":4,"height":4,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/chariot_token.webp","tint":null,"scaleX":1.4,"scaleY":1.4,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097632,"modifiedTime":1664231486338,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}}

View File

@ -409,6 +409,12 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) {
flex-wrap: nowrap; flex-wrap: nowrap;
justify-content: stretch; justify-content: stretch;
} }
.rdd.sheet .window-content .sheet-body .carac-list .caracteristique.vehicle {
flex-wrap: nowrap;
justify-content: stretch;
flex-basis: 7.5em;
}
.rdd.sheet .window-content .sheet-body .carac-list .caracteristique > .carac-label { .rdd.sheet .window-content .sheet-body .carac-list .caracteristique > .carac-label {
flex-basis: 50%; flex-basis: 50%;
} }
@ -1111,7 +1117,7 @@ ul, li {
.table-fatigue .fatigue-malus { .table-fatigue .fatigue-malus {
font-size: 0.8rem; font-size: 0.8rem;
} }
.flex-actions-bar { .flex-actions-bar {
flex-grow: 2; flex-grow: 2;
} }

View File

@ -31,13 +31,27 @@
}, },
"vehicule": { "vehicule": {
"categorie": "", "categorie": "",
"resistance": 0,
"structure": 0,
"vitesse": "", "vitesse": "",
"bonus": "", "bonus": "",
"manoeuvrabilite": "", "manoeuvrabilite": "",
"equipage": 0, "equipage": 0,
"capacite_encombrement": 0 "capacite_encombrement": 0,
"etat": {
"resistance" : {
"type": "number",
"max": 20,
"value": 20,
"label": "Résistance",
"derivee": false
},
"structure":{
"type": "number",
"max": 10,
"value": 10,
"label": "Structure",
"derivee": false
}
}
}, },
"entite": { "entite": {
"definition": { "definition": {

View File

@ -26,7 +26,7 @@
<div class="flex-group-left flexcol"> <div class="flex-group-left flexcol">
<ol class="carac-list alterne-list"> <ol class="carac-list alterne-list">
<li class="caracteristique flexrow list-item" data-attribute="{{key}}"> <li class="caracteristique flexrow list-item" data-attribute="{{key}}">
<span class="carac-label flexrow" name="categorie">Catégorie</span> <span class="carac-label">Catégorie</span>
<select name="system.categorie" class="categorie" data-dtype="String"> <select name="system.categorie" class="categorie" data-dtype="String">
{{#select system.categorie}} {{#select system.categorie}}
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-vehicule.html"}} {{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-vehicule.html"}}
@ -34,32 +34,36 @@
</select> </select>
</li> </li>
<li class="caracteristique flexrow list-item" data-attribute="{{key}}"> <li class="caracteristique flexrow list-item" data-attribute="{{key}}">
<span class="carac-label flexrow" name="categorie">Résistance</span> <span class="carac-label">Résistance</span>
<input class="competence-value flexrow" type="text" name="system.resistance" value="{{system.resistance}}" data-dtype="Number" /> <input class="competence-value flexrow" type="text" name="system.etat.resistance.value" value="{{system.etat.resistance.value}}" data-dtype="Number" />
/
<input class="competence-value flexrow" type="text" name="system.etat.resistance.max" value="{{system.etat.resistance.max}}" data-dtype="Number" />
</li> </li>
<li class="caracteristique flexrow list-item" data-attribute="{{key}}"> <li class="caracteristique flexrow list-item" data-attribute="{{key}}">
<span class="carac-label flexrow" name="categorie">Structure</span> <span class="carac-label">Structure</span>
<input class="competence-value flexrow" type="text" name="system.structure" value="{{system.structure}}" data-dtype="Number" /> <input class="competence-value flexrow" type="text" name="system.etat.structure.value" value="{{system.etat.structure.value}}" data-dtype="Number" />
/
<input class="competence-value flexrow" type="text" name="system.etat.structure.max" value="{{system.etat.structure.max}}" data-dtype="Number" />
</li> </li>
<li class="caracteristique flexrow list-item" data-attribute="{{key}}"> <li class="caracteristique flexrow list-item" data-attribute="{{key}}">
<span class="carac-label flexrow" name="categorie">Vitesse</span> <span class="carac-label">Vitesse</span>
<input class="competence-value flexrow" type="text" name="system.vitesse" value="{{system.vitesse}}" data-dtype="String" /> <input class="caracteristique vehicle" type="text" name="system.vitesse" value="{{system.vitesse}}" data-dtype="String" />
</li> </li>
<li class="caracteristique flexrow list-item" data-attribute="{{key}}"> <li class="caracteristique flexrow list-item" data-attribute="{{key}}">
<span class="carac-label flexrow" name="categorie">Bonus</span> <span class="carac-label">Bonus</span>
<input class="competence-value flexrow" type="text" name="system.bonus" value="{{system.bonus}}" data-dtype="String" /> <input class="caracteristique vehicle" type="text" name="system.bonus" value="{{system.bonus}}" data-dtype="String" />
</li> </li>
<li class="caracteristique flexrow list-item" data-attribute="{{key}}"> <li class="caracteristique flexrow list-item" data-attribute="{{key}}">
<span class="carac-label flexrow" name="categorie">Manoeuvrabilité</span> <span class="carac-label">Manoeuvrabilité</span>
<input class="competence-value flexrow" type="text" name="system.manoeuvrabilite" value="{{system.manoeuvrabilite}}" data-dtype="String" /> <input class="caracteristique vehicle" type="text" name="system.manoeuvrabilite" value="{{system.manoeuvrabilite}}" data-dtype="String" />
</li> </li>
<li class="caracteristique flexrow list-item" data-attribute="{{key}}"> <li class="caracteristique flexrow list-item" data-attribute="{{key}}">
<span class="carac-label flexrow" name="categorie">Equipage</span> <span class="carac-label">Equipage</span>
<input class="competence-value flexrow" type="text" name="system.equipage" value="{{system.equipage}}" data-dtype="Number" /> <input class="caracteristique vehicle" type="text" name="system.equipage" value="{{system.equipage}}" data-dtype="Number" />
</li> </li>
<li class="caracteristique flexrow list-item" data-attribute="{{key}}"> <li class="caracteristique flexrow list-item" data-attribute="{{key}}">
<span class="carac-label flexrow" name="categorie">Capacité d'Encombrement</span> <span class="carac-label">Capacité d'Encombrement</span>
<input class="competence-value flexrow" type="text" name="system.capacite_encombrement" value="{{system.capacite_encombrement}}" data-dtype="Number" /> <input class="caracteristique vehicle" type="text" name="system.capacite_encombrement" value="{{system.capacite_encombrement}}" data-dtype="Number" />
</li> </li>
</ol> </ol>
</div> </div>
@ -68,9 +72,8 @@
{{!-- Equipment Tab --}} {{!-- Equipment Tab --}}
<div class="tab items" data-group="primary" data-tab="items"> <div class="tab items" data-group="primary" data-tab="items">
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire.html"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire.html"}}
</div>
{{!-- Biography Tab --}} {{!-- Biography Tab --}}
<div class="tab description" data-group="primary" data-tab="description"> <div class="tab description" data-group="primary" data-tab="description">
@ -80,7 +83,5 @@
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}} {{>"systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}
</div> </div>
</div>
</section> </section>
</form> </form>

View File

@ -1,15 +1,33 @@
<span class="item-name"><h4>Véhicules</h4></span> {{#if subacteurs.vehicules.length}}
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
<li class="competence-header flexrow">
<span class="item-name"><h4>Véhicules</h4></span>
<span></span>
<span>Catégorie</span>
<span>Résistance</span>
<span>Structure</span>
<span></span>
</li>
{{#each subacteurs.vehicules as |vehicule id|}} {{#each subacteurs.vehicules as |vehicule id|}}
<li class="item flexrow list-item" data-actor-id="{{vehicule.id}}"> <li class="item flexrow list-item" data-actor-id="{{vehicule.id}}">
<span class="subacteur-label">
<a>
<img class="sheet-competence-img" src="{{vehicule.img}}" title="{{vehicule.name}}"/> <img class="sheet-competence-img" src="{{vehicule.img}}" title="{{vehicule.name}}"/>
<span class="flex-grow subacteur-label"><a>{{vehicule.name}}</a></span> {{vehicule.name}}
<span>{{vehicule.categorie}}</span> </a>
<span>{{vehicule.structure}}</span> </span>
<div class="flex-shrink"> <span>{{vehicule.system.categorie}}</span>
<span>{{vehicule.system.etat.resistance.max}}</span>
<span>{{vehicule.system.etat.structure.max}}</span>
<span>
<a class="subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a> <a class="subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div> </span>
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
{{else}}
<span class="item-name"><h4>Véhicules</h4></span>
{{/if}}