HERO6 - First import

This commit is contained in:
LeRatierBretonnien 2022-12-15 22:12:28 +01:00
parent ecef402160
commit 2f48669c85
5 changed files with 57 additions and 48 deletions

View File

@ -10,11 +10,11 @@ const __saveFirstToKey = { r: "reflex", f: "fortitude", w: "willpower"}
export class Hero6Commands { export class Hero6Commands {
static init() { static init() {
if (!game.system.Hero6.commands) { if (!game.system.hero6.commands) {
const Hero6Commands = new Hero6Commands(); const hero6Commands = new Hero6Commands();
Hero6Commands.registerCommand({ path: ["/rtarget"], func: (content, msg, params) => Hero6Commands.rollTarget(msg, params), descr: "Launch the target roll window" }); hero6Commands.registerCommand({ path: ["/rtarget"], func: (content, msg, params) => Hero6Commands.rollTarget(msg, params), descr: "Launch the target roll window" });
Hero6Commands.registerCommand({ path: ["/rsave"], func: (content, msg, params) => Hero6Commands.rollSave(msg, params), descr: "Performs a save roll" }); hero6Commands.registerCommand({ path: ["/rsave"], func: (content, msg, params) => Hero6Commands.rollSave(msg, params), descr: "Performs a save roll" });
game.system.Hero6.commands = Hero6Commands; game.system.hero6.commands = hero6Commands;
} }
} }

View File

@ -59,10 +59,8 @@ export class Hero6ItemSheet extends ItemSheet {
name: this.object.name, name: this.object.name,
editable: this.isEditable, editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked", cssClass: this.isEditable ? "editable" : "locked",
weaponSkills: Hero6Utility.getWeaponSkills(),
shieldSkills: Hero6Utility.getShieldSkills(),
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}), description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
config: game.system.Hero6.config, config: game.system.hero6.config,
system: objectData, system: objectData,
limited: this.object.limited, limited: this.object.limited,
options: this.options, options: this.options,
@ -70,6 +68,13 @@ export class Hero6ItemSheet extends ItemSheet {
isGM: game.user.isGM isGM: game.user.isGM
} }
// Specific skill processing
if( this.object.type == "skill") {
if (objectData.characteristic != "manual") {
//objectData.system.base = 9
}
}
this.options.editable = !(this.object.origin == "embeddedItem"); this.options.editable = !(this.object.origin == "embeddedItem");
console.log("ITEM DATA", formData, this); console.log("ITEM DATA", formData, this);
return formData; return formData;

View File

@ -28,7 +28,7 @@ Hooks.once("init", async function () {
console.log(`Initializing Hero6 RPG`); console.log(`Initializing Hero6 RPG`);
game.system.Hero6 = { game.system.hero6 = {
Hero6Commands, Hero6Commands,
config: Hero6_CONFIG config: Hero6_CONFIG
} }
@ -109,7 +109,7 @@ Hooks.on("chatMessage", (html, content, msg) => {
if (content[0] == '/') { if (content[0] == '/') {
let regExp = /(\S+)/g; let regExp = /(\S+)/g;
let commands = content.match(regExp); let commands = content.match(regExp);
if (game.system.cruciblerpg.commands.processChatCommand(commands, content, msg)) { if (game.system.hero6.commands.processChatCommand(commands, content, msg)) {
return false; return false;
} }
} }

View File

@ -55,7 +55,7 @@
color: rgba(228, 240, 240, 0.75); color: rgba(228, 240, 240, 0.75);
background: rgba(66, 66, 64, 0.95); background: rgba(66, 66, 64, 0.95);
} /* For nav and title */ } /* For nav and title */
.window-app input, .fvtt-dark-stars .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle { .window-app input, .fvtt-hero-system-6 .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle {
font-size: 0.8rem; font-size: 0.8rem;
color: rgba(228, 240, 240, 0.75); color: rgba(228, 240, 240, 0.75);
background: rgba(66, 66, 64, 0.95); background: rgba(66, 66, 64, 0.95);
@ -80,12 +80,12 @@
} }
.tabs .item.active, .blessures-list li ul li:first-child:hover, a:hover { .tabs .item.active, .blessures-list li ul li:first-child:hover, a:hover {
text-shadow: 1px 0px 0px #ff6600; text-shadow: 1px 0px 0px #dd2c4a;
} }
.rollable:hover, .rollable:focus { .rollable:hover, .rollable:focus {
color: #000; color: #000;
text-shadow: 0 0 10px red; text-shadow: 0 0 10px #dd2c4a;
cursor: pointer; cursor: pointer;
} }
input:disabled { input:disabled {
@ -94,7 +94,7 @@ input:disabled {
select:disabled { select:disabled {
color:#1c2058; color:#1c2058;
} }
table {border: 1px solid #7a7971;} table { border: 1px solid #7a7971;}
.grid, .grid-2col { .grid, .grid-2col {
display: grid; display: grid;
@ -208,7 +208,7 @@ table {border: 1px solid #7a7971;}
/* Styles limited to foundryvtt-vadentis sheets */ /* Styles limited to foundryvtt-vadentis sheets */
.fvtt-dark-stars .sheet-header { .fvtt-hero-system-6 .sheet-header {
-webkit-box-flex: 0; -webkit-box-flex: 0;
-ms-flex: 0 0 210px; -ms-flex: 0 0 210px;
flex: 0 0 210px; flex: 0 0 210px;
@ -228,7 +228,7 @@ table {border: 1px solid #7a7971;}
margin-bottom: 10px; margin-bottom: 10px;
} }
.fvtt-dark-stars .sheet-header .profile-img { .fvtt-hero-system-6 .sheet-header .profile-img {
-webkit-box-flex: 0; -webkit-box-flex: 0;
-ms-flex: 0 0 128px; -ms-flex: 0 0 128px;
flex: 0 0 128px; flex: 0 0 128px;
@ -270,34 +270,34 @@ table {border: 1px solid #7a7971;}
vertical-align: bottom; vertical-align: bottom;
} }
.fvtt-dark-stars .sheet-header .header-fields { .fvtt-hero-system-6 .sheet-header .header-fields {
-webkit-box-flex: 1; -webkit-box-flex: 1;
-ms-flex: 1; -ms-flex: 1;
flex: 1; flex: 1;
} }
.fvtt-dark-stars .sheet-header h1.charname { .fvtt-hero-system-6 .sheet-header h1.charname {
height: 50px; height: 50px;
padding: 0px; padding: 0px;
margin: 5px 0; margin: 5px 0;
border-bottom: 0; border-bottom: 0;
} }
.fvtt-dark-stars .sheet-header h1.charname input { .fvtt-hero-system-6 .sheet-header h1.charname input {
width: 100%; width: 100%;
height: 100%; height: 100%;
margin: 0; margin: 0;
} }
.fvtt-dark-stars .sheet-tabs { .fvtt-hero-system-6 .sheet-tabs {
-webkit-box-flex: 0; -webkit-box-flex: 0;
-ms-flex: 0; -ms-flex: 0;
flex: 0; flex: 0;
} }
.fvtt-dark-stars .sheet-body, .fvtt-hero-system-6 .sheet-body,
.fvtt-dark-stars .sheet-body .tab, .fvtt-hero-system-6 .sheet-body .tab,
.fvtt-dark-stars .sheet-body .tab .editor { .fvtt-hero-system-6 .sheet-body .tab .editor {
height: 100%; height: 100%;
font-size: 0.8rem; font-size: 0.8rem;
} }
@ -320,70 +320,70 @@ table {border: 1px solid #7a7971;}
padding: 0 3px; padding: 0 3px;
} }
.fvtt-dark-stars .tox .tox-editor-container { .fvtt-hero-system-6 .tox .tox-editor-container {
background: #fff; background: #fff;
} }
.fvtt-dark-stars .tox .tox-edit-area { .fvtt-hero-system-6 .tox .tox-edit-area {
padding: 0 8px; padding: 0 8px;
} }
.fvtt-dark-stars .resource-label { .fvtt-hero-system-6 .resource-label {
font-weight: bold; font-weight: bold;
text-transform: uppercase; text-transform: uppercase;
} }
.fvtt-dark-stars .tabs { .fvtt-hero-system-6 .tabs {
height: 40px; height: 40px;
border-top: 1px solid #AAA; border-top: 1px solid #AAA;
border-bottom: 1px solid #AAA; border-bottom: 1px solid #AAA;
color: #000000; color: #246cd8;
} }
.fvtt-dark-stars .tabs .item { .fvtt-hero-system-6 .tabs .item {
line-height: 40px; line-height: 40px;
font-weight: bold; font-weight: bold;
} }
.fvtt-dark-stars .tabs .item.active { .fvtt-hero-system-6 .tabs .item.active {
text-decoration: underline; text-decoration: underline;
text-shadow: none; text-shadow: none;
} }
.fvtt-dark-stars .items-list { .fvtt-hero-system-6 .items-list {
list-style: none; list-style: none;
margin: 1px 0; margin: 1px 0;
padding: 0; padding: 0;
overflow-y: auto; overflow-y: auto;
} }
.fvtt-dark-stars .items-list .item-header { .fvtt-hero-system-6 .items-list .item-header {
font-weight: bold; font-weight: bold;
} }
.fvtt-dark-stars .items-list .item { .fvtt-hero-system-6 .items-list .item {
height: 30px; height: 30px;
line-height: 24px; line-height: 24px;
padding: 1px 0; padding: 1px 0;
border-bottom: 1px solid #BBB; border-bottom: 1px solid #BBB;
} }
.fvtt-dark-stars .items-list .item .item-image { .fvtt-hero-system-6 .items-list .item .item-image {
-webkit-box-flex: 0; -webkit-box-flex: 0;
-ms-flex: 0 0 24px; -ms-flex: 0 0 24px;
flex: 0 0 24px; flex: 0 0 24px;
margin-right: 5px; margin-right: 5px;
} }
.fvtt-dark-stars .items-list .item img { .fvtt-hero-system-6 .items-list .item img {
display: block; display: block;
} }
.fvtt-dark-stars .items-list .item-name { .fvtt-hero-system-6 .items-list .item-name {
margin: 0; margin: 0;
} }
.fvtt-dark-stars .items-list .item-controls { .fvtt-hero-system-6 .items-list .item-controls {
-webkit-box-flex: 0; -webkit-box-flex: 0;
-ms-flex: 0 0 86px; -ms-flex: 0 0 86px;
flex: 0 0 86px; flex: 0 0 86px;
@ -400,24 +400,24 @@ table {border: 1px solid #7a7971;}
/*color: rgba(168, 139, 139, 0.5);*/ /*color: rgba(168, 139, 139, 0.5);*/
.window-app.sheet .window-content .sheet-header input[type="text"], .window-app.sheet .window-content .sheet-header input[type="number"], .window-app.sheet .window-content .sheet-header input[type="password"], .window-app.sheet .window-content .sheet-header input[type="date"], .window-app.sheet .window-content .sheet-header input[type="time"] { .window-app.sheet .window-content .sheet-header input[type="text"], .window-app.sheet .window-content .sheet-header input[type="number"], .window-app.sheet .window-content .sheet-header input[type="password"], .window-app.sheet .window-content .sheet-header input[type="date"], .window-app.sheet .window-content .sheet-header input[type="time"] {
color: rgba(228, 240, 240, 0.75); background: rgba(228, 240, 240, 0.75);
background: rgba(66, 66, 64, 0.95); color: rgba(66, 66, 64, 0.95);
border: 1 none; border: 1 none;
margin-bottom: 0.25rem; margin-bottom: 0.25rem;
margin-left: 2px; margin-left: 2px;
} }
.window-app.sheet .window-content .sheet-body input[type="text"], .window-app.sheet .window-content .sheet-body input[type="number"], .window-app.sheet .window-content .sheet-body input[type="password"], .window-app.sheet .window-content .sheet-body input[type="date"], .window-app.sheet .window-content .sheet-body input[type="time"] { .window-app.sheet .window-content .sheet-body input[type="text"], .window-app.sheet .window-content .sheet-body input[type="number"], .window-app.sheet .window-content .sheet-body input[type="password"], .window-app.sheet .window-content .sheet-body input[type="date"], .window-app.sheet .window-content .sheet-body input[type="time"] {
color: rgba(228, 240, 240, 0.75); background: rgba(228, 240, 240, 0.75);
background: rgba(66, 66, 64, 0.95); color: rgba(66, 66, 64, 0.95);
border: 1 none; border: 1 none;
margin-bottom: 0.25rem; margin-bottom: 0.25rem;
margin-left: 2px; margin-left: 2px;
} }
.window-app.sheet .window-content .sheet-body select, .window-app.sheet .window-content .sheet-header select { .window-app.sheet .window-content .sheet-body select, .window-app.sheet .window-content .sheet-header select {
color: rgba(228, 240, 240, 0.75); background: rgba(228, 240, 240, 0.75);
background: rgba(66, 66, 64, 0.95); color: rgba(66, 66, 64, 0.95);
border: 1 none; border: 1 none;
margin-bottom: 0.25rem; margin-bottom: 0.25rem;
margin-left: 2px; margin-left: 2px;
@ -426,8 +426,8 @@ table {border: 1px solid #7a7971;}
.window-app .window-content, .window-app.sheet .window-content .sheet-body{ .window-app .window-content, .window-app.sheet .window-content .sheet-body{
font-size: 0.8rem; font-size: 0.8rem;
background: url("../images/ui/pc_sheet_bg.webp") repeat left top; background: url("../images/ui/pc_sheet_bg.webp") repeat left top;
color: rgba(228, 240, 240, 0.75); background: rgba(228, 240, 240, 0.75);
background: rgba(66, 66, 64, 0.95); color: rgba(66, 66, 64, 0.95);
} }
/* background: rgba(245,245,240,0.6) url("../images/ui/sheet_background.webp") left top;*/ /* background: rgba(245,245,240,0.6) url("../images/ui/sheet_background.webp") left top;*/
@ -453,7 +453,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;}
line-height: 1.5rem; line-height: 1.5rem;
border-top: 0 none; border-top: 0 none;
border-bottom: 0 none; border-bottom: 0 none;
background-color:black; background-color:rgb(64, 133, 236);
color:beige; color:beige;
} }
@ -1257,7 +1257,7 @@ ul, li {
color: #CCC color: #CCC
} }
#pause > img { #pause > img {
content: url(../images/ui/crucible_pause_logo.jpg); content: url(../images/ui/logo_circle_yellow_01.webp);
height: 160px; height: 160px;
width: 160px; width: 160px;
top: -80px; top: -80px;

View File

@ -31,11 +31,15 @@
{{#each config.rollCharac as |char key|}} {{#each config.rollCharac as |char key|}}
<option value="{{key}}">{{char}}</option> <option value="{{key}}">{{char}}</option>
{{/each}} {{/each}}
<option value="{{manual}}">{{Manual}}</option> <option value="manual">Manual</option>
{{/select}} {{/select}}
</select> </select>
</li> </li>
<li class="flexrow"><label class="generic-label">Base value</label>
<input type="text" class="" name="system.base" value="{{system.base}}" data-dtype="Number" {{#if (ne system.characteristic "manual")}}disabled{{/if}} />
</li>
<li class="flexrow"><label class="generic-label">Skill Roll points</label> <li class="flexrow"><label class="generic-label">Skill Roll points</label>
<input type="text" class="" name="system.skillroll" value="{{system.skillroll}}" data-dtype="Number"/> <input type="text" class="" name="system.skillroll" value="{{system.skillroll}}" data-dtype="Number"/>
</li> </li>