Merge pull request #33 from thehappyanarchist/THA-Dev

0.7.0 Release
master
thehappyanarchist 2020-10-24 19:18:11 -10:00 committed by GitHub
commit da0b4da4b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 76 additions and 12 deletions

View File

@ -63,3 +63,15 @@ v0.6.2 Further Compendium updates
MINOR CHANGES: MINOR CHANGES:
Added Class Abilities, Monster Abilities, Monsters, Treasure Tables, and tokens and icons for all. Added Class Abilities, Monster Abilities, Monsters, Treasure Tables, and tokens and icons for all.
Swapped map with .webp format to save about 2MB from download package. Swapped map with .webp format to save about 2MB from download package.
v0.7.0 Compatibility with new Foundry release
MAJOR CHANGES:
FoundryACKS is now compatible with release 7.5 of Foundry.
MINOR CHANGES:
Added support for ability scores above 18. It is assumed that every point above 18 adds a further +1 modifier. All dialogs adjusted accordingly.
Added a saving throw modifier to the tweaks dialog. This allows for a bonus or penalty to be applied to all saving throws (ex. Divine Blessing or Ring/Cloak of Protection). Suggested by Bobloblah.
Added support for applying half (resistant) or double (vulnerable) damage from chat cards. Suggested by Bobloblah.
BUG FIXES:
Added support for HP to dip into the negatives when auto-applied from chat cards. It was previously clamped to zero.

BIN
package/acks-v0.7.0.zip Normal file

Binary file not shown.

View File

@ -83,12 +83,15 @@
top: 365px; top: 365px;
right: -169px; right: -169px;
width: 320px; width: 320px;
border-top: none;
height: 20px;
z-index: -1; z-index: -1;
} }
.acks.sheet.actor .sheet-tabs .item { .acks.sheet.actor .sheet-tabs .item {
padding: 2px 10px 0; padding: 2px 10px 0;
margin-left: -5px; margin-left: -5px;
text-indent: 4px; text-indent: 4px;
line-height: 18px;
background: url("/ui/parchment.jpg"); background: url("/ui/parchment.jpg");
border-top-right-radius: 4px; border-top-right-radius: 4px;
border-top-left-radius: 80px; border-top-left-radius: 80px;

View File

@ -97,6 +97,7 @@
"ACKS.saves.spell.long": "Spells", "ACKS.saves.spell.long": "Spells",
"ACKS.saves.magic.long": "Bonus vs Magic", "ACKS.saves.magic.long": "Bonus vs Magic",
"ACKS.saves.magic.short": "vs Magic", "ACKS.saves.magic.short": "vs Magic",
"ACKS.SaveBonus": "Saving Throw Bonus",
"ACKS.Health": "Hit Points", "ACKS.Health": "Hit Points",
"ACKS.HealthMax": "Maximum Hit Points", "ACKS.HealthMax": "Maximum Hit Points",
@ -152,6 +153,13 @@
"ACKS.NativePlus1": "Native + 1", "ACKS.NativePlus1": "Native + 1",
"ACKS.NativePlus2": "Native + 2", "ACKS.NativePlus2": "Native + 2",
"ACKS.NativePlus3": "Native + 3", "ACKS.NativePlus3": "Native + 3",
"ACKS.NativePlus4": "Native + 4",
"ACKS.NativePlus5": "Native + 5",
"ACKS.NativePlus6": "Native + 6",
"ACKS.NativePlus7": "Native + 7",
"ACKS.NativePlus8": "Native + 8",
"ACKS.NativePlus9": "Native + 9",
"ACKS.NativePlus10": "Native + 10",
"ACKS.NPCReaction": "NPC Reaction", "ACKS.NPCReaction": "NPC Reaction",
"ACKS.RetainersMax": "#Retainers", "ACKS.RetainersMax": "#Retainers",
@ -274,6 +282,8 @@
"ACKS.messages.InflictsDamage": "Inflicts damage!", "ACKS.messages.InflictsDamage": "Inflicts damage!",
"ACKS.messages.applyDamage": "Apply Damage", "ACKS.messages.applyDamage": "Apply Damage",
"ACKS.messages.applyHealing": "Apply Healing", "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.Fumble": "<b>1! Automatic Miss!</b>",
"ACKS.messages.Critical": "<b>20! Automatic Hit!</b>", "ACKS.messages.Critical": "<b>20! Automatic Hit!</b>",

View File

@ -121,6 +121,8 @@ export class AcksActor extends Actor {
rollSave(save, options = {}) { rollSave(save, options = {}) {
const label = game.i18n.localize(`ACKS.saves.${save}.long`); const label = game.i18n.localize(`ACKS.saves.${save}.long`);
const rollParts = ["1d20"]; const rollParts = ["1d20"];
rollParts.push(this.data.data.save.mod);
let data = {}; let data = {};
if (this.data.type == "character") { if (this.data.type == "character") {
@ -562,11 +564,11 @@ export class AcksActor extends Actor {
} }
async applyDamage(amount = 0, multiplier = 1) { async applyDamage(amount = 0, multiplier = 1) {
amount = Math.floor(parseInt(amount) * multiplier); amount = Math.ceil(parseInt(amount) * multiplier);
const hp = this.data.data.hp; const hp = this.data.data.hp;
// Remaining goes to health // Remaining goes to health
const dh = Math.clamped(hp.value - amount, 0, hp.max); const dh = Math.clamped(hp.value - amount, -99, hp.max);
// Update the Actor // Update the Actor
return this.update({ return this.update({
@ -746,6 +748,13 @@ export class AcksActor extends Actor {
13: 1, 13: 1,
16: 2, 16: 2,
18: 3, 18: 3,
19: 4,
20: 5,
21: 6,
22: 7,
23: 8,
24: 9,
25: 10
}; };
data.scores.str.mod = AcksActor._valueFromTable( data.scores.str.mod = AcksActor._valueFromTable(
standard, standard,
@ -791,7 +800,7 @@ export class AcksActor extends Actor {
data.scores.cha.value data.scores.cha.value
); );
data.scores.cha.retain = data.scores.cha.mod + 4; data.scores.cha.retain = data.scores.cha.mod + 4;
data.scores.cha.loyalty = data.scores.cha.mod + 7; data.scores.cha.loyalty = data.scores.cha.mod;
const od = { const od = {
0: 0, 0: 0,
@ -802,6 +811,7 @@ export class AcksActor extends Actor {
13: 14, 13: 14,
16: 10, 16: 10,
18: 6, 18: 6,
19: 2,
}; };
data.exploration.odMod = AcksActor._valueFromTable( data.exploration.odMod = AcksActor._valueFromTable(
od, od,
@ -823,6 +833,13 @@ export class AcksActor extends Actor {
13: "ACKS.NativePlus1", 13: "ACKS.NativePlus1",
16: "ACKS.NativePlus2", 16: "ACKS.NativePlus2",
18: "ACKS.NativePlus3", 18: "ACKS.NativePlus3",
19: "ACKS.NativePlus4",
20: "ACKS.NativePlus5",
21: "ACKS.NativePlus6",
22: "ACKS.NativePlus7",
23: "ACKS.NativePlus8",
24: "ACKS.NativePlus9",
25: "ACKS.NativePlus10",
}; };
data.languages.spoken = AcksActor._valueFromTable( data.languages.spoken = AcksActor._valueFromTable(
spoken, spoken,

View File

@ -21,6 +21,18 @@ export const addChatMessageContextOptions = function(html, options) {
icon: '<i class="fas fa-user-plus"></i>', icon: '<i class="fas fa-user-plus"></i>',
condition: canApply, condition: canApply,
callback: li => applyChatCardDamage(li, -1) 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; return options;

View File

@ -331,7 +331,7 @@ export class AcksDice {
}; };
let buttons = {} let buttons = {}
if (skipDialog) { AcksDice.sendRoll(rollData); } if (skipDialog) { return AcksDice.sendRoll(rollData); }
if (game.settings.get("acks", "removeMagicBonus") == false) { if (game.settings.get("acks", "removeMagicBonus") == false) {
buttons = { buttons = {
ok: { ok: {
@ -339,7 +339,7 @@ export class AcksDice {
icon: '<i class="fas fa-dice-d20"></i>', icon: '<i class="fas fa-dice-d20"></i>',
callback: (html) => { callback: (html) => {
rolled = true; rolled = true;
rollData.form = html[0].children[0]; rollData.form = html[0].querySelector("form");
roll = AcksDice.sendRoll(rollData); roll = AcksDice.sendRoll(rollData);
}, },
}, },
@ -348,7 +348,7 @@ export class AcksDice {
icon: '<i class="fas fa-magic"></i>', icon: '<i class="fas fa-magic"></i>',
callback: (html) => { callback: (html) => {
rolled = true; rolled = true;
rollData.form = html[0].children[0]; rollData.form = html[0].querySelector("form");
rollData.data.roll.target = parseInt(rollData.data.roll.target) + parseInt(rollData.data.roll.magic); rollData.data.roll.target = parseInt(rollData.data.roll.target) + parseInt(rollData.data.roll.magic);
rollData.title += ` ${game.i18n.localize("ACKS.saves.magic.short")} (${rollData.data.roll.magic})`; rollData.title += ` ${game.i18n.localize("ACKS.saves.magic.short")} (${rollData.data.roll.magic})`;
roll = AcksDice.sendRoll(rollData); roll = AcksDice.sendRoll(rollData);
@ -431,7 +431,7 @@ export class AcksDice {
icon: '<i class="fas fa-dice-d20"></i>', icon: '<i class="fas fa-dice-d20"></i>',
callback: (html) => { callback: (html) => {
rolled = true; rolled = true;
rollData.form = html[0].children[0]; rollData.form = html[0].querySelector("form");
roll = ["melee", "missile", "attack"].includes(data.roll.type) roll = ["melee", "missile", "attack"].includes(data.roll.type)
? AcksDice.sendAttackRoll(rollData) ? AcksDice.sendAttackRoll(rollData)
: AcksDice.sendRoll(rollData); : AcksDice.sendRoll(rollData);

View File

@ -2,9 +2,9 @@
"name": "acks", "name": "acks",
"title": "Adventurer Conqueror King System", "title": "Adventurer Conqueror King System",
"description": "Play B/X or other OSR compatible content using the ACKS system", "description": "Play B/X or other OSR compatible content using the ACKS system",
"version": "0.6.2", "version": "0.7.0",
"minimumCoreVersion": "0.6.2", "minimumCoreVersion": "0.7.4",
"compatibleCoreVersion": "0.6.6", "compatibleCoreVersion": "0.7.5",
"templateVersion": 2, "templateVersion": 2,
"author": "The Happy Anarchist", "author": "The Happy Anarchist",
"esmodules": ["acks.js"], "esmodules": ["acks.js"],
@ -185,5 +185,5 @@
"gridUnits": "ft", "gridUnits": "ft",
"url": "https://github.com/thehappyanarchist/foundryacks", "url": "https://github.com/thehappyanarchist/foundryacks",
"manifest": "https://github.com/thehappyanarchist/foundryacks/raw/master/src/system.json", "manifest": "https://github.com/thehappyanarchist/foundryacks/raw/master/src/system.json",
"download": "https://github.com/thehappyanarchist/foundryacks/raw/master/package/acks-v0.6.2.zip" "download": "https://github.com/thehappyanarchist/foundryacks/raw/master/package/acks-v0.7.0.zip"
} }

View File

@ -53,6 +53,9 @@
"value": 0 "value": 0
} }
}, },
"save": {
"mod": 0
},
"movement": { "movement": {
"base": 120 "base": 120
}, },

View File

@ -61,7 +61,7 @@
{{localize 'ACKS.RetainersMax'}} ({{add data.scores.cha.mod 4}}) {{localize 'ACKS.RetainersMax'}} ({{add data.scores.cha.mod 4}})
</li> </li>
<li> <li>
{{localize 'ACKS.Loyalty'}} ({{add data.scores.cha.mod 7}}) {{localize 'ACKS.Loyalty'}} ({{add data.scores.cha.mod 0}})
</li> </li>
</ol> </ol>
</div> </div>

View File

@ -76,6 +76,13 @@
{{/if}} {{/if}}
</div> </div>
</div> </div>
<div class="form-group">
<label>{{localize "ACKS.SaveBonus"}}</label>
<div class="form-fields">
<input type="text" name="data.save.mod" id="save" value="{{data.save.mod}}"
data-dtype="Number" />
</div>
</div>
<div class="form-group"> <div class="form-group">
<label>{{localize "ACKS.Encumbrance"}}</label> <label>{{localize "ACKS.Encumbrance"}}</label>
<div class="form-fields"> <div class="form-fields">