ENH: Abilities
parent
65ab877386
commit
c8be217e7e
|
@ -16,6 +16,7 @@
|
||||||
"OSE.Alignment": "Alignment",
|
"OSE.Alignment": "Alignment",
|
||||||
"OSE.Level": "Level",
|
"OSE.Level": "Level",
|
||||||
"OSE.Experience": "Experience",
|
"OSE.Experience": "Experience",
|
||||||
|
"OSE.ExperienceBonus": "Bonus Experience",
|
||||||
"OSE.Treasure": "Treasure type",
|
"OSE.Treasure": "Treasure type",
|
||||||
"OSE.Size": "Size",
|
"OSE.Size": "Size",
|
||||||
"OSE.Morale": "Morale",
|
"OSE.Morale": "Morale",
|
||||||
|
@ -109,6 +110,8 @@
|
||||||
"OSE.items.Melee": "Melee",
|
"OSE.items.Melee": "Melee",
|
||||||
"OSE.items.Missile": "Missile",
|
"OSE.items.Missile": "Missile",
|
||||||
"OSE.items.Slow": "Slow",
|
"OSE.items.Slow": "Slow",
|
||||||
|
"OSE.items.ArmorAC": "AC",
|
||||||
|
"OSE.items.ArmorAAC": "AAC",
|
||||||
|
|
||||||
"OSE.spells.Memorized": "Memorized",
|
"OSE.spells.Memorized": "Memorized",
|
||||||
"OSE.spells.Cast": "Cast",
|
"OSE.spells.Cast": "Cast",
|
||||||
|
@ -117,6 +120,6 @@
|
||||||
"OSE.spells.Class": "Class",
|
"OSE.spells.Class": "Class",
|
||||||
"OSE.spells.Duration": "Duration",
|
"OSE.spells.Duration": "Duration",
|
||||||
"OSE.spells.Level": "Level",
|
"OSE.spells.Level": "Level",
|
||||||
"OSE.items.ArmorAC": "AC",
|
|
||||||
"OSE.items.ArmorAAC": "AAC"
|
"OSE.abilities.Requirements": "Requirements"
|
||||||
}
|
}
|
|
@ -51,6 +51,7 @@ export class OseActorSheetCharacter extends OseActorSheet {
|
||||||
data.config.ascendingAC = game.settings.get("ose", "ascendingAC");
|
data.config.ascendingAC = game.settings.get("ose", "ascendingAC");
|
||||||
data.config.individualInit = game.settings.get("ose", "individualInit");
|
data.config.individualInit = game.settings.get("ose", "individualInit");
|
||||||
|
|
||||||
|
data.mods = this.actor.computeModifiers();
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,4 +41,44 @@ export class OseActor extends Actor {
|
||||||
title: `${label} ${game.i18n.localize('OSE.AbilityCheck')}`,
|
title: `${label} ${game.i18n.localize('OSE.AbilityCheck')}`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
computeModifiers() {
|
||||||
|
let _valueToMod = (val) => {
|
||||||
|
switch (val) {
|
||||||
|
case 3:
|
||||||
|
return -3;
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
return -2;
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
case 8:
|
||||||
|
return -1;
|
||||||
|
case 9:
|
||||||
|
case 10:
|
||||||
|
case 11:
|
||||||
|
case 12:
|
||||||
|
return 0;
|
||||||
|
case 13:
|
||||||
|
case 14:
|
||||||
|
case 15:
|
||||||
|
return 1;
|
||||||
|
case 16:
|
||||||
|
case 17:
|
||||||
|
return 2;
|
||||||
|
case 18:
|
||||||
|
return 3;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
str: _valueToMod(this.data.data.scores.str.value),
|
||||||
|
int: _valueToMod(this.data.data.scores.int.value),
|
||||||
|
dex: _valueToMod(this.data.data.scores.dex.value),
|
||||||
|
cha: _valueToMod(this.data.data.scores.cha.value),
|
||||||
|
wis: _valueToMod(this.data.data.scores.wis.value),
|
||||||
|
con: _valueToMod(this.data.data.scores.con.value),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,7 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
.attribute {
|
.attribute {
|
||||||
|
position: relative;
|
||||||
margin: 10px 2px;
|
margin: 10px 2px;
|
||||||
border: 1px solid $colorTan;
|
border: 1px solid $colorTan;
|
||||||
.attribute-name {
|
.attribute-name {
|
||||||
|
@ -109,6 +110,13 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
.attribute-mod {
|
||||||
|
position: absolute;
|
||||||
|
color: $colorTan;
|
||||||
|
right: 5px;
|
||||||
|
top: 0;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.attribute-group {
|
.attribute-group {
|
||||||
|
|
|
@ -12,6 +12,13 @@
|
||||||
/* ----------------------------------------- */
|
/* ----------------------------------------- */
|
||||||
|
|
||||||
.sheet-header {
|
.sheet-header {
|
||||||
|
.xp-bonus {
|
||||||
|
top: -15px;
|
||||||
|
right: 3px;
|
||||||
|
color: $colorTan;
|
||||||
|
font-size: 10px;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------- */
|
/* ----------------------------------------- */
|
||||||
|
@ -20,7 +27,6 @@
|
||||||
.sheet-body {
|
.sheet-body {
|
||||||
.inventory {
|
.inventory {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
height: 520px;
|
|
||||||
.header-spells {
|
.header-spells {
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +66,9 @@
|
||||||
}
|
}
|
||||||
.item-entry {
|
.item-entry {
|
||||||
&:nth-child(even) {
|
&:nth-child(even) {
|
||||||
background: rgba(0, 0, 0, 0.1);
|
.item {
|
||||||
|
background: rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item {
|
.item {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
.ose.sheet.item {
|
.ose.sheet.item {
|
||||||
.profile-img {
|
.profile-img {
|
||||||
border: none;
|
border: none;
|
||||||
|
flex: 0 0 84px;
|
||||||
|
height: 84px;
|
||||||
}
|
}
|
||||||
.sheet-body {
|
.sheet-body {
|
||||||
.stats {
|
.stats {
|
||||||
|
@ -26,10 +28,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.editor {
|
.editor {
|
||||||
height: 255px;
|
height: 240px;
|
||||||
}
|
}
|
||||||
.weapon-editor .editor {
|
.weapon-editor .editor {
|
||||||
height: 230px;
|
height: 215px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -78,8 +78,11 @@
|
||||||
"alignment": "",
|
"alignment": "",
|
||||||
"literate": false,
|
"literate": false,
|
||||||
"level": 1,
|
"level": 1,
|
||||||
"xp": 0,
|
"xp": {
|
||||||
"xpmod": 0
|
"next": 0,
|
||||||
|
"value": 0,
|
||||||
|
"bonus": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"scores": {
|
"scores": {
|
||||||
"str": {
|
"str": {
|
||||||
|
|
|
@ -23,6 +23,19 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{#if (eq this.type 'character')}}
|
||||||
|
<div class="form-group">
|
||||||
|
<label>{{localize "OSE.ExperienceBonus"}} (%)</label>
|
||||||
|
<div class="form-fields">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="data.details.xp.bonus"
|
||||||
|
id="experience"
|
||||||
|
value="{{data.details.xp.bonus}}"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
<footer class="sheet-footer">
|
<footer class="sheet-footer">
|
||||||
<button type="submit">
|
<button type="submit">
|
||||||
<i class="fas fa-save"></i>{{localize "Save Changes"}}
|
<i class="fas fa-save"></i>{{localize "Save Changes"}}
|
||||||
|
|
|
@ -1,46 +1,36 @@
|
||||||
<div class="flex3 panel abilities resizable" data-base-size="250">
|
<div class="inventory abilities">
|
||||||
<div class="panel-title">
|
<div class="item-titles flexrow">
|
||||||
<h4>{{localize 'OSE.panel.abilities'}}</h4>
|
<div class="item-name">{{localize 'OSE.panel.abilities'}}</div>
|
||||||
<div class="item-controls">
|
<div class="item-controls">
|
||||||
{{#if owner}}
|
{{#if owner}}
|
||||||
<a
|
<a class="item-control item-create" title='{{localize "OSE.Add"}}' data-type="ability"><i
|
||||||
class="item-control item-create"
|
class="fas fa-plus"></i></a>
|
||||||
title='{{localize "OSE.Add"}}'
|
|
||||||
data-type="ability"
|
|
||||||
><i class="fas fa-plus"></i
|
|
||||||
></a>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="panel-content inventory resizable" data-base-size="225">
|
<ol class="item-list resizable" data-base-size="310">
|
||||||
<div class="">
|
{{#each abilities as |item|}}
|
||||||
{{#each abilities as |item|}}
|
<li class="item-entry">
|
||||||
<li class="item-entry">
|
<div class="item flexrow" data-item-id="{{item._id}}">
|
||||||
<div class="item flexrow" data-item-id="{{item._id}}">
|
<div class="item-name flexrow">
|
||||||
<div class="item-name flexrow">
|
<div class="item-image" style="background-image: url({{item.img}})"></div>
|
||||||
<div
|
<a>
|
||||||
class="item-image"
|
|
||||||
style="background-image: url({{item.img}})"
|
|
||||||
></div>
|
|
||||||
<h4 title="{{item.name}}">
|
<h4 title="{{item.name}}">
|
||||||
{{item.name~}}
|
{{item.name~}}
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</a>
|
||||||
<div class="item-controls">
|
|
||||||
{{#if ../owner}}
|
|
||||||
<a class="item-control item-edit" title='{{localize "Ose.Edit"}}'
|
|
||||||
><i class="fas fa-edit"></i
|
|
||||||
></a>
|
|
||||||
<a
|
|
||||||
class="item-control item-delete"
|
|
||||||
title='{{localize "Ose.Delete"}}'
|
|
||||||
><i class="fas fa-trash"></i
|
|
||||||
></a>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
<div class="field-long">
|
||||||
{{/each}}
|
{{item.roll}}
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
<div class="item-controls">
|
||||||
</div>
|
{{#if ../owner}}
|
||||||
|
<a class="item-control item-edit" title='{{localize "Ose.Edit"}}'><i class="fas fa-edit"></i></a>
|
||||||
|
<a class="item-control item-delete" title='{{localize "Ose.Delete"}}'><i class="fas fa-trash"></i></a>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ol>
|
||||||
|
</div>
|
|
@ -1,5 +1,12 @@
|
||||||
<section class="flexrow">
|
<section class="flexrow">
|
||||||
<ul class="attributes flexrow">
|
<ul class="attributes flexrow">
|
||||||
|
<li class="attribute">
|
||||||
|
<h4 class="attribute-name box-title" title="{{ localize 'OSE.HitDice' }}">{{ localize "OSE.HitDiceShort" }}</h4>
|
||||||
|
<div class="attribute-value">
|
||||||
|
<input name="data.hp.hd" type="text" value="{{data.hp.hd}}" placeholder="0"
|
||||||
|
data-dtype="String" />
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
<li class="attribute health">
|
<li class="attribute health">
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Health' }}">{{ localize "OSE.HealthShort" }}
|
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Health' }}">{{ localize "OSE.HealthShort" }}
|
||||||
</h4>
|
</h4>
|
||||||
|
@ -73,6 +80,7 @@
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.scores.str.value" type="text" value="{{data.scores.str.value}}" placeholder="0"
|
<input name="data.scores.str.value" type="text" value="{{data.scores.str.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
|
<span class="attribute-mod">{{mods.str}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute ability-score" data-score="int">
|
<li class="attribute ability-score" data-score="int">
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.int.long' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.int.long' }}">
|
||||||
|
@ -80,6 +88,7 @@
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.scores.int.value" type="text" value="{{data.scores.int.value}}" placeholder="0"
|
<input name="data.scores.int.value" type="text" value="{{data.scores.int.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
|
<span class="attribute-mod">{{mods.int}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute ability-score" data-score="wis">
|
<li class="attribute ability-score" data-score="wis">
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.wis.long' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.wis.long' }}">
|
||||||
|
@ -87,6 +96,7 @@
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.scores.wis.value" type="text" value="{{data.scores.wis.value}}" placeholder="0"
|
<input name="data.scores.wis.value" type="text" value="{{data.scores.wis.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
|
<span class="attribute-mod">{{mods.wis}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute ability-score" data-score="dex">
|
<li class="attribute ability-score" data-score="dex">
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.dex.long' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.dex.long' }}">
|
||||||
|
@ -94,6 +104,7 @@
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.scores.dex.value" type="text" value="{{data.scores.dex.value}}" placeholder="0"
|
<input name="data.scores.dex.value" type="text" value="{{data.scores.dex.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
|
<span class="attribute-mod">{{mods.dex}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute ability-score" data-score="con">
|
<li class="attribute ability-score" data-score="con">
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.con.long' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.con.long' }}">
|
||||||
|
@ -101,6 +112,7 @@
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.scores.con.value" type="text" value="{{data.scores.con.value}}" placeholder="0"
|
<input name="data.scores.con.value" type="text" value="{{data.scores.con.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
|
<span class="attribute-mod">{{mods.con}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute ability-score" data-score="cha">
|
<li class="attribute ability-score" data-score="cha">
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.cha.long' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.cha.long' }}">
|
||||||
|
@ -108,6 +120,7 @@
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.scores.cha.value" type="text" value="{{data.scores.cha.value}}" placeholder="0"
|
<input name="data.scores.cha.value" type="text" value="{{data.scores.cha.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
|
<span class="attribute-mod">{{mods.cha}}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,9 +27,12 @@
|
||||||
<label>{{localize 'OSE.Level'}}</label>
|
<label>{{localize 'OSE.Level'}}</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="flex2">
|
<li class="flex2">
|
||||||
<input type="text" name="data.details.xp" value="{{data.details.xp}}"
|
<input type="text" name="data.details.xp.value" value="{{data.details.xp.value}}"
|
||||||
placeholder="{{ localize 'OSE.Experience' }}" />
|
placeholder="{{ localize 'OSE.Experience' }}" />
|
||||||
<label>{{localize 'OSE.Experience'}}</label>
|
<label>{{localize 'OSE.Experience'}}</label>
|
||||||
|
{{#if data.details.xp.bonus}}
|
||||||
|
<span class="xp-bonus">+{{data.details.xp.bonus}}%</span>
|
||||||
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
|
@ -9,9 +9,21 @@
|
||||||
</header>
|
</header>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<input name="data.requirements" type="text" value="{{data.requirements}}" placeholder="Requirements" />
|
<div class="stats">
|
||||||
</div>
|
<div class="form-group block-input">
|
||||||
<div class="description weapon-editor">
|
<label>{{localize 'OSE.abilities.Requirements'}}</label>
|
||||||
|
<div class="form-fields">
|
||||||
|
<input type="text" name="data.requirements" value="{{data.requirements}}" data-dtype="String" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group block-input">
|
||||||
|
<label>{{localize 'OSE.items.Roll'}}</label>
|
||||||
|
<div class="form-fields">
|
||||||
|
<input type="text" name="data.roll" value="{{data.roll}}" data-dtype="String" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="description">
|
||||||
{{editor content=data.description target="data.description" button=true
|
{{editor content=data.description target="data.description" button=true
|
||||||
owner=owner editable=editable}}
|
owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue