Skip to content

Commit

Permalink
Monster sheet complete
Browse files Browse the repository at this point in the history
  • Loading branch information
serxoz committed Nov 17, 2020
1 parent 4a008bb commit 08e1ecf
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 19 deletions.
7 changes: 5 additions & 2 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,21 @@
"OSE.details.class": "Class and Race",
"OSE.details.title": "Age and Sex",
"OSE.details.alignment": "Alignment",
"OSE.details.level": "Level",
"OSE.details.level": "Level",
"OSE.details.experience.base": "Experience",
"OSE.details.experience.bonus": "Bonus Experience",
"OSE.details.experience.next": "Next level",
"OSE.details.experience.share": "Experience Share",
"OSE.details.experience.award": "XP Award",
"OSE.details.treasure": "Treasure type",
"OSE.details.treasure.value": "Treasure value",
"OSE.details.treasureTable": "Table",
"OSE.details.treasureTableHint": "Drop a rollable table here to roll the monster treasure",
"OSE.details.morale": "Morale",
"OSE.details.reaction": "Reaction",
"OSE.details.appearing": "NA",
"OSE.details.type": "Type",
"OSE.details.experience.size":"Size",
"OSE.details.experience.intelligence": "Intelligence",

"OSE.Attack": "Attack",
"OSE.Encumbrance": "Encumbrance",
Expand Down
9 changes: 6 additions & 3 deletions lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,21 @@
"OSE.details.class": "Clase y Especie",
"OSE.details.title": "Edad y Sexo",
"OSE.details.alignment": "Alineamiento",
"OSE.details.level": "Nivel",
"OSE.details.level": "Nivel",
"OSE.details.experience.base": "Experiencia",
"OSE.details.experience.bonus": "Bonificador a la experiencia",
"OSE.details.experience.next": "Siguiente Nivel",
"OSE.details.experience.share": "Experiencia Compartida",
"OSE.details.experience.award": "Premio de Experiencia",
"OSE.details.treasure": "Tipo de Tesoro",
"OSE.details.experience.award": "Valor de P.X.",
"OSE.details.treasure.value": "Valor de Tesoro",
"OSE.details.treasureTable": "Tabla",
"OSE.details.treasureTableHint": "Suelta una tabla aleatoria aquí para tirar por el tesoro del monstruo",
"OSE.details.morale": "Moral",
"OSE.details.reaction": "Reacción",
"OSE.details.appearing": "NA",
"OSE.details.type": "Tipo",
"OSE.details.experience.size": "Tamaño",
"OSE.details.experience.intelligence": "Inteligencia",

"OSE.Attack": "Ataque",
"OSE.Encumbrance": "Carga",
Expand Down
6 changes: 3 additions & 3 deletions module/actor/monster-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ export class OseActorSheetMonster extends OseActorSheet {

// Settings
data.config.morale = game.settings.get("ose", "morale");
data.data.details.treasure.link = TextEditor.enrichHTML(data.data.details.treasure.table);
//data.data.details.treasure.link = TextEditor.enrichHTML(data.data.details.treasure.table);
data.isNew = this.actor.isNew();
return data;
}


/*
async _onDrop(event) {
super._onDrop(event);
let data;
Expand All @@ -102,7 +102,7 @@ export class OseActorSheetMonster extends OseActorSheet {
}
this.actor.update({ "data.details.treasure.table": link });
}

*/
/* -------------------------------------------- */

async _chooseItemType(choices = ["weapon", "armor", "shield", "gear"]) {
Expand Down
9 changes: 7 additions & 2 deletions template.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,23 @@
"monster": {
"templates": ["common", "spellcaster"],
"details": {
"type": "",
"biography": "",
"alignment": "",
"xp": 0,
"treasure": {
"table": "",
"type": ""
"type": "",
"value": ""
},
"appearing": {
"d": 0,
"w": 0
},
"morale": 0
"morale": 0,
"size": "",
"intelligence": ""

},
"attacks": "",
"saves": {
Expand Down
30 changes: 21 additions & 9 deletions templates/actors/partials/monster-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@ <h1 class="charname">
<input name="name" type="text" value="{{actor.name}}" placeholder="{{localize 'OSE.Name'}}" />
</h1>
<ul class="summary flexrow">
<li class="flex2 flexrow check-field">
<li class="flexrow check-field">
<div>
<input type="text" name="data.details.alignment" value="{{data.details.alignment}}" />
<label>{{localize 'OSE.details.alignment'}}</label>
</div>
<div class="check reaction-check" title="{{localize 'OSE.roll.reaction'}}"><a><i class="fas fa-dice"></i></a></div>
</li>
<li class="flexrow check-field">
<div>
<input type="text" name="data.details.type" value="{{data.details.type}}" />
<label>{{localize 'OSE.details.type'}}</label>
</div>
</li>
<li class="flexrow check-field" data-check="dungeon">
<div>
<input type="text" name="data.details.appearing.d" value="{{data.details.appearing.d}}" />
<label>{{localize 'OSE.details.appearing'}}</label>
</div>
<div class="check appearing-check" title="{{localize 'OSE.roll.appearing'}}"><a><i class="fas fa-dice"></i></a></div>
</li>
<li class="flexrow check-field" data-check="wilderness">
(<div><input type="text" name="data.details.appearing.w" value="{{data.details.appearing.w}}" /></div>)
<div class="check appearing-check" title="{{localize 'OSE.roll.appearing'}}"><a><i class="fas fa-dice"></i></a></div>
</li>
{{#if config.morale}}
<li class="flexrow check-field">
<div>
Expand All @@ -32,14 +34,24 @@ <h1 class="charname">
</li>
{{/if}}
</ul>
<ul class="summary flexrow">
<li>
<input type="text" name="data.details.size" value="{{data.details.size}}" />
<label>{{localize 'OSE.details.experience.size'}}</label>
</li>
<li>
<input type="text" name="data.details.intelligence" value="{{data.details.intelligence}}" />
<label>{{localize 'OSE.details.experience.intelligence'}}</label>
</li>
</ul>
<ul class="summary flexrow">
<li>
<input type="text" name="data.details.xp" value="{{data.details.xp}}" />
<label>{{localize 'OSE.details.experience.award'}}</label>
</li>
<li class="treasure-table" title="{{localize 'OSE.details.treasureTableHint'}}">
<div>{{{data.details.treasure.link}}}</div>
<label>{{localize 'OSE.details.treasure'}}</label>
<li>
<input type="text" name="data.details.treasure.value" value="{{data.details.treasure.value}}" />
<label>{{localize 'OSE.details.treasure.value'}}</label>
</li>
</ul>
</section>
</section>

0 comments on commit 08e1ecf

Please sign in to comment.