ENH: Monster tweaks

master
U~man 2020-07-03 19:44:12 +02:00
parent 579322181b
commit 7c8ca4ae1f
8 changed files with 67 additions and 23 deletions

View File

@ -2,6 +2,7 @@
"OSE.Edit": "Edit",
"OSE.Delete": "Delete",
"OSE.Add": "Add",
"OSE.Ok": "Ok",
"OSE.Cancel": "Cancel",
"OSE.Roll": "Roll",
@ -63,7 +64,7 @@
"OSE.MovementEncounterShort": "ENC",
"OSE.MovementOverland": "Overland Movement Rate",
"OSE.MovementOverlandShort": "OVE",
"OSE.MovementShort": "MR",
"OSE.MovementShort": "MV",
"OSE.ArmorClass": "Armor Class",
"OSE.ArmorClassShort": "AC",
"OSE.AscArmorClassShort": "AAC",

View File

@ -44,7 +44,24 @@ export class OseActor extends Actor {
rollAttack(attack, options={}) {
const label = game.i18n.localize(`OSE.${attack}`);
const rollParts = ['1d20'];
const rollParts = ['1d20',];
const mods = this.computeModifiers();
if (attack == 'Missile') {
rollParts.push(
'+',
mods.dex.toString(),
'+',
this.data.data.thac0.mod.missile.toString()
);
} else if (attack == 'Melee') {
rollParts.push(
'+',
mods.str.toString(),
'+',
this.data.data.thac0.mod.melee.toString()
);
}
// Roll and return
return OseDice.Roll({

View File

@ -89,7 +89,9 @@
border-top-left-radius: 80px;
box-shadow: 0 0 6px 1px $colorDark;
font-size: 12px;
filter: brightness(0.9);
&.active {
filter: none;
z-index: 1;
font-weight: bold;
text-shadow: none;
@ -128,6 +130,10 @@
.attribute-value {
text-align: center;
padding: 4px;
.sep {
flex: 0 0 5px;
line-height: 24px;
}
}
.attribute-mod {
position: absolute;
@ -160,6 +166,9 @@
.attribute-value {
width: 45px;
flex-grow: 0;
input {
padding: 0;
}
}
}
}

View File

@ -5,5 +5,19 @@
.editor {
height: 300px;
}
.attributes .attribute.health {
min-width: 75px;
}
}
.attribute-group {
.attacks-description {
margin: 2px;
padding: 0;
text-align: center;
label {
color: $colorTan;
font-size: 10px;
}
}
}
}

View File

@ -133,9 +133,7 @@
"appearing": "",
"morale": 0
},
"attacks": {
"value": 1
}
"attacks": ""
}
},
"Item": {
@ -155,7 +153,7 @@
"qualities": "",
"slow": false,
"missile": true,
"ranged": true,
"melee": true,
"cost": 0,
"equipped": false,
"weight": 0

View File

@ -43,6 +43,7 @@
name="data.thac0.mod.melee"
id="melee"
value="{{data.thac0.mod.melee}}"
data-dtype="Number"
/>
</div>
</div>
@ -54,6 +55,7 @@
name="data.thac0.mod.missile"
id="missile"
value="{{data.thac0.mod.missile}}"
data-dtype="Number"
/>
</div>
</div>

View File

@ -121,8 +121,8 @@
</div>
</div>
</li>
<li class="attribute">
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Thac0' }}">{{ localize "OSE.Thac0" }}
<li class="attribute attack" data-attack="Attack">
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Thac0' }}"><a>{{ localize "OSE.Thac0" }}</a>
</h4>
<div class="flexrow">
<div class="attribute-value">

View File

@ -9,6 +9,13 @@
<input name="data.hp.max" type="text" value="{{data.hp.max}}" data-dtype="Number" placeholder="10" />
</div>
</li>
<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">
{{#if config.ascendingAC}}
<h4 class="attribute-name box-title" title="{{ localize 'OSE.ArmorClass' }}">
@ -33,14 +40,6 @@
data-dtype="Number" />
</div>
</li>
<li class="attribute">
<h4 class="attribute-name box-title" title="{{localize 'OSE.Attacks'}}">{{ localize "OSE.AttacksShort" }}
</h4>
<div class="attribute-value">
<input name="data.att.value" type="text" value="{{data.att.value}}" placeholder="0"
data-dtype="Number" />
</div>
</li>
{{#if data.retainer.enabled}}
<li class="attribute">
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Loyalty' }}">{{ localize "OSE.LoyaltyShort" }}
@ -121,6 +120,10 @@
</div>
{{!-- Saving throws --}}
<div class="attribute-group">
<div class="attacks-description">
<label>{{ localize "OSE.Attacks" }}</label>
<input name="data.att" type="text" value="{{data.att}}" placeholder="0" data-dtype="String" />
</div>
<ul class="attributes">
<li class="attribute saving-throw" data-save="death">
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.death.long' }}">