Added half and double damage

Addressing issue #20 by @bobloblah.
master
The Happy Anarchist 2020-10-24 19:07:39 -10:00
parent 49f2e67254
commit 4c11677f44
3 changed files with 15 additions and 1 deletions

View File

@ -282,6 +282,8 @@
"ACKS.messages.InflictsDamage": "Inflicts damage!",
"ACKS.messages.applyDamage": "Apply Damage",
"ACKS.messages.applyHealing": "Apply Healing",
"ACKS.messages.applyHalf": "Apply Half Damage",
"ACKS.messages.applyDouble": "Apply 2x Damage",
"ACKS.messages.Fumble": "<b>1! Automatic Miss!</b>",
"ACKS.messages.Critical": "<b>20! Automatic Hit!</b>",

View File

@ -564,7 +564,7 @@ export class AcksActor extends Actor {
}
async applyDamage(amount = 0, multiplier = 1) {
amount = Math.floor(parseInt(amount) * multiplier);
amount = Math.ceil(parseInt(amount) * multiplier);
const hp = this.data.data.hp;
// Remaining goes to health

View File

@ -21,6 +21,18 @@ export const addChatMessageContextOptions = function(html, options) {
icon: '<i class="fas fa-user-plus"></i>',
condition: canApply,
callback: li => applyChatCardDamage(li, -1)
},
{
name: game.i18n.localize("ACKS.messages.applyHalf"),
icon: '<i class="fas fa-user-times"></i>',
condition: canApply,
callback: li => applyChatCardDamage(li, 0.5)
},
{
name: game.i18n.localize("ACKS.messages.applyDouble"),
icon: '<i class="fas fa-bullseye"></i>',
condition: canApply,
callback: li => applyChatCardDamage(li, 2)
}
);
return options;