Add Melee and Missile Damage bonus to tweaks

Melee and Missile Damage bonuses added to tweaks. Also fixed a bug in OSE code where AAC bonus was not working.
master
The Happy Anarchist 2020-09-05 14:20:42 -10:00
parent 771cc0636c
commit a611838d6c
4 changed files with 33 additions and 4 deletions

View File

@ -123,10 +123,12 @@
"ACKS.AB": "Throw", "ACKS.AB": "Throw",
"ACKS.MeleeShort": "MEL", "ACKS.MeleeShort": "MEL",
"ACKS.Melee": "Melee", "ACKS.Melee": "Melee",
"ACKS.MeleeBonus": "Melee Bonus", "ACKS.MeleeBonus": "Melee Throw Bonus",
"ACKS.MeleeDamageBonus": "Melee Damage Bonus",
"ACKS.MissileShort": "MIS", "ACKS.MissileShort": "MIS",
"ACKS.Missile": "Missile", "ACKS.Missile": "Missile",
"ACKS.MissileBonus": "Missile Bonus", "ACKS.MissileBonus": "Missile Throw Bonus",
"ACKS.MissileDamageBonus": "Missile Damage Bonus",
"ACKS.Initiative": "Initiative", "ACKS.Initiative": "Initiative",
"ACKS.InitiativeBonus": "Initiative Bonus", "ACKS.InitiativeBonus": "Initiative Bonus",
"ACKS.InitiativeShort": "INIT", "ACKS.InitiativeShort": "INIT",

View File

@ -383,6 +383,11 @@ export class AcksActor extends Actor {
dmgParts.push(data.scores.str.mod); dmgParts.push(data.scores.str.mod);
} }
// Add Melee mod to damage
if (attData.roll.type == "melee") {
dmgParts.push(data.damage.mod.melee);
}
// Damage roll // Damage roll
AcksDice.Roll({ AcksDice.Roll({
event: options.event, event: options.event,
@ -447,6 +452,10 @@ export class AcksActor extends Actor {
if (options.type == "melee") { if (options.type == "melee") {
dmgParts.push(data.scores.str.mod); dmgParts.push(data.scores.str.mod);
} }
// Add Melee mod to damage
if (options.type == "melee") {
dmgParts.push(data.damage.mod.melee);
}
const rollData = { const rollData = {
actor: this.data, actor: this.data,
item: attData.item, item: attData.item,

View File

@ -21,6 +21,12 @@
"value": 0, "value": 0,
"mod": 0 "mod": 0
}, },
"damage": {
"mod": {
"missile": 0
"melee": 0
}
},
"thac0": { "thac0": {
"value": 19, "value": 19,
"bba": 0, "bba": 0,

View File

@ -45,6 +45,12 @@
<input type="text" name="data.thac0.mod.melee" id="melee" value="{{data.thac0.mod.melee}}" data-dtype="Number" /> <input type="text" name="data.thac0.mod.melee" id="melee" value="{{data.thac0.mod.melee}}" data-dtype="Number" />
</div> </div>
</div> </div>
<div class="form-group">
<label>{{localize "ACKS.MeleeDamageBonus"}}</label>
<div class="form-fields">
<input type="text" name="data.damage.mod.melee" id="meleedmg" value="{{data.damage.mod.melee}}" data-dtype="Number" />
</div>
</div>
<div class="form-group"> <div class="form-group">
<label>{{localize "ACKS.MissileBonus"}}</label> <label>{{localize "ACKS.MissileBonus"}}</label>
<div class="form-fields"> <div class="form-fields">
@ -52,11 +58,17 @@
data-dtype="Number" /> data-dtype="Number" />
</div> </div>
</div> </div>
<div class="form-group">
<label>{{localize "ACKS.MissileDamageBonus"}}</label>
<div class="form-fields">
<input type="text" name="data.damage.mod.missile" id="missiledmg" value="{{data.damage.mod.missile}}" data-dtype="Number" />
</div>
</div>
<div class="form-group"> <div class="form-group">
<label>{{localize "ACKS.ArmorClassBonus"}}</label> <label>{{localize "ACKS.ArmorClassBonus"}}</label>
<div class="form-fields"> <div class="form-fields">
{{#if config.ascending}} {{#if config.ascendingAC}}
<input type="text" name="data.aac.mod" id="ac" value="{{data.aac.mod}}" <input type="text" name="data.aac.mod" id="aac" value="{{data.aac.mod}}"
data-dtype="Number" /> data-dtype="Number" />
{{else}} {{else}}
<input type="text" name="data.ac.mod" id="ac" value="{{data.ac.mod}}" <input type="text" name="data.ac.mod" id="ac" value="{{data.ac.mod}}"