Merge branch 'master' of https://github.com/thehappyanarchist/foundryacks
						commit
						771cc0636c
					
				|  | @ -821,11 +821,11 @@ | |||
|   line-height: 30px; | ||||
| } | ||||
| .acks.sheet.actor.character .sheet-body .exploration .attribute { | ||||
|   margin: 4px; | ||||
|   margin: 1px; | ||||
| } | ||||
| .acks.sheet.actor.character .sheet-body .exploration .attribute .attribute-name { | ||||
|   text-align: left; | ||||
|   flex: 1 0 60px; | ||||
|   text-align: center; | ||||
|   flex: 1 0 45px; | ||||
|   line-height: 25px; | ||||
|   font-size: 12px; | ||||
| } | ||||
|  |  | |||
|  | @ -38,7 +38,7 @@ | |||
|   "ACKS.roll.attribute": "{attribute} check", | ||||
|   "ACKS.roll.details.attribute": "Roll 1d20 <= {score} for success", | ||||
|   "ACKS.roll.exploration": "{exploration} test", | ||||
|   "ACKS.roll.details.exploration": "Roll 1d6 <= {expl} for success", | ||||
|   "ACKS.roll.details.exploration": "Roll 1d20 >= {expl} for success", | ||||
|   "ACKS.roll.reaction": "Reaction roll", | ||||
|   "ACKS.roll.initiative": "Group {group} rolls for Initiative!", | ||||
|   "ACKS.roll.individualInit": "{name} rolls for Initiative!", | ||||
|  | @ -68,8 +68,8 @@ | |||
|   "ACKS.Retainer": "Retainer", | ||||
|   "ACKS.RetainerWage": "Wage", | ||||
|   "ACKS.RetainerUpkeep": "Upkeep", | ||||
|   "ACKS.Loyalty": "Loyalty Rating", | ||||
|   "ACKS.LoyaltyShort": "LR", | ||||
|   "ACKS.Loyalty": "Henchmen Morale", | ||||
|   "ACKS.LoyaltyShort": "MOR", | ||||
| 
 | ||||
|   "ACKS.scores.str.long": "Strength", | ||||
|   "ACKS.scores.str.short": "STR", | ||||
|  | @ -116,11 +116,11 @@ | |||
|   "ACKS.ArmorClassNaked": "Naked Armor Class", | ||||
|   "ACKS.ArmorClass": "Armor Class", | ||||
|   "ACKS.ArmorClassShort": "AC", | ||||
|   "ACKS.AscArmorClassShort": "AAC", | ||||
|   "ACKS.AscArmorClassShort": "AC", | ||||
|   "ACKS.ArmorClassBonus": "Armor Class Bonus", | ||||
|   "ACKS.Thac0": "THAC0", | ||||
|   "ACKS.ABShort": "AB", | ||||
|   "ACKS.AB": "Attack Bonus", | ||||
|   "ACKS.ABShort": "Throw", | ||||
|   "ACKS.AB": "Throw", | ||||
|   "ACKS.MeleeShort": "MEL", | ||||
|   "ACKS.Melee": "Melee", | ||||
|   "ACKS.MeleeBonus": "Melee Bonus", | ||||
|  | @ -163,6 +163,8 @@ | |||
|   "ACKS.Setting.Initiative": "Initiative", | ||||
|   "ACKS.Setting.InitiativeHint": "Grouped or individual initiative.", | ||||
|   "ACKS.Setting.InitiativeIndividual": "Individual initiative", | ||||
| 																		    | ||||
| 																		    | ||||
|   "ACKS.Setting.InitiativeGroup": "Grouped Initiative", | ||||
|   "ACKS.Setting.RerollInitiative": "Initiative persistence", | ||||
|   "ACKS.Setting.RerollInitiativeHint": "Keeps, resets or rerolls initiative each round", | ||||
|  | @ -185,9 +187,9 @@ | |||
| 
 | ||||
|   "ACKS.items.Equip": "Equip", | ||||
|   "ACKS.items.Unequip": "Unequip", | ||||
|   "ACKS.items.Misc": "Misc", | ||||
|   "ACKS.items.Misc": "Items", | ||||
|   "ACKS.items.Weapons": "Weapons", | ||||
|   "ACKS.items.Treasure": "Treasure", | ||||
|   "ACKS.items.Treasure": "Heavy Items", | ||||
|   "ACKS.items.Armors": "Armors", | ||||
|   "ACKS.items.Weight": "Wgt.", | ||||
|   "ACKS.items.Qualities": "Qualities", | ||||
|  | @ -200,7 +202,7 @@ | |||
|   "ACKS.items.RollType": "Type", | ||||
|   "ACKS.items.Damage": "Damage", | ||||
|   "ACKS.items.ArmorAC": "AC", | ||||
|   "ACKS.items.ArmorAAC": "AAC", | ||||
|   "ACKS.items.ArmorAAC": "AC", | ||||
|   "ACKS.items.Bonus": "Bonus", | ||||
|   "ACKS.items.AtkBonus": "Attack Bonus", | ||||
|   "ACKS.items.roundAttacks": "Attacks Spent this Round", | ||||
|  | @ -241,9 +243,9 @@ | |||
| 
 | ||||
|   "ACKS.abilities.Requirements": "Requirements", | ||||
| 
 | ||||
|   "ACKS.exploration.ld.long": "Listen at Door", | ||||
|   "ACKS.exploration.ld.short": "Listen Door", | ||||
|   "ACKS.exploration.ld.abrev": "LD", | ||||
|   "ACKS.exploration.ld.long": "Listen for noises", | ||||
|   "ACKS.exploration.ld.short": "Hear Noise", | ||||
|   "ACKS.exploration.ld.abrev": "HN", | ||||
|   "ACKS.exploration.od.long": "Open Stuck Door", | ||||
|   "ACKS.exploration.od.short": "Open Door", | ||||
|   "ACKS.exploration.od.abrev": "OD", | ||||
|  | @ -272,9 +274,9 @@ | |||
|   "ACKS.colors.white": "White", | ||||
| 
 | ||||
|   "ACKS.reaction.check": "Reaction Check", | ||||
|   "ACKS.reaction.Hostile": "{name} is Hostile", | ||||
|   "ACKS.reaction.Unfriendly": "{name} is Unfriendly", | ||||
|   "ACKS.reaction.Neutral": "{name} is Neutral", | ||||
|   "ACKS.reaction.Indifferent": "{name} is Indifferent", | ||||
|   "ACKS.reaction.Friendly": "{name} is Friendly" | ||||
|   "ACKS.reaction.Hostile": "{name} is Hostile and attacks", | ||||
|   "ACKS.reaction.Unfriendly": "{name} is Unfriendly and may attack", | ||||
|   "ACKS.reaction.Neutral": "{name} is Neutral and uncertain", | ||||
|   "ACKS.reaction.Indifferent": "{name} is Indifferent and uninterested", | ||||
|   "ACKS.reaction.Friendly": "{name} is Friendly and helpful" | ||||
| } | ||||
|  |  | |||
|  | @ -333,12 +333,12 @@ export class AcksActor extends Actor { | |||
| 
 | ||||
|   rollExploration(expl, options = {}) { | ||||
|     const label = game.i18n.localize(`ACKS.exploration.${expl}.long`); | ||||
|     const rollParts = ["1d6"]; | ||||
|     const rollParts = ["1d20"]; | ||||
| 
 | ||||
|     const data = { | ||||
|       actor: this.data, | ||||
|       roll: { | ||||
|         type: "below", | ||||
|         type: "above", | ||||
|         target: this.data.data.exploration[expl], | ||||
|       }, | ||||
|       details: game.i18n.format("ACKS.roll.details.exploration", { | ||||
|  | @ -519,8 +519,9 @@ export class AcksActor extends Actor { | |||
|     let hasItems = false; | ||||
|     Object.values(this.data.items).forEach((item) => { | ||||
|       if (item.type == "item" && !item.data.treasure) { | ||||
|         if (option === "detailed") totalWeight += 166.6; | ||||
| 																    | ||||
|         hasItems = true; | ||||
| //        hasItems = true;
 | ||||
|       } | ||||
|       if ( | ||||
|         item.type == "item" && | ||||
|  | @ -531,7 +532,7 @@ export class AcksActor extends Actor { | |||
|         totalWeight += item.data.weight; | ||||
|       } | ||||
|     }); | ||||
|     if (option === "detailed" && hasItems) totalWeight += 80; | ||||
| //    if (option === "detailed" && hasItems) totalWeight += 166.6;
 | ||||
| 
 | ||||
|     data.encumbrance = { | ||||
|       pct: Math.clamped( | ||||
|  | @ -541,7 +542,7 @@ export class AcksActor extends Actor { | |||
|       ), | ||||
|       max: data.encumbrance.max, | ||||
|       encumbered: totalWeight > data.encumbrance.max, | ||||
|       value: totalWeight, | ||||
|       value: Math.round(totalWeight), | ||||
|     }; | ||||
| 
 | ||||
|     if (data.config.movementAuto && option != "disabled") { | ||||
|  | @ -553,15 +554,15 @@ export class AcksActor extends Actor { | |||
|     const data = this.data.data; | ||||
|     let option = game.settings.get("acks", "encumbranceOption"); | ||||
|     let weight = data.encumbrance.value; | ||||
|     let delta = data.encumbrance.max - 1600; | ||||
|     let delta = data.encumbrance.max - 20000; | ||||
|     if (["detailed", "complete"].includes(option)) { | ||||
|       if (weight > data.encumbrance.max) { | ||||
|         data.movement.base = 0; | ||||
|       } else if (weight > 800 + delta) { | ||||
|       } else if (weight > 10000 + delta) { | ||||
|         data.movement.base = 30; | ||||
|       } else if (weight > 600 + delta) { | ||||
|       } else if (weight > 7000 + delta) { | ||||
|         data.movement.base = 60; | ||||
|       } else if (weight > 400 + delta) { | ||||
|       } else if (weight > 5000 + delta) { | ||||
|         data.movement.base = 90; | ||||
|       } else { | ||||
|         data.movement.base = 120; | ||||
|  | @ -606,7 +607,7 @@ export class AcksActor extends Actor { | |||
|       (i) => i.type == "item" && i.data.treasure | ||||
|     ); | ||||
|     treasure.forEach((item) => { | ||||
|       total += item.data.quantity.value * item.data.cost; | ||||
|       total += item.data.quantity.value * item.data.cost | ||||
|     }); | ||||
|     data.treasure = total; | ||||
|   } | ||||
|  | @ -703,11 +704,13 @@ export class AcksActor extends Actor { | |||
| 
 | ||||
|     const od = { | ||||
|       0: 0, | ||||
|       3: 1, | ||||
|       9: 2, | ||||
|       13: 3, | ||||
|       16: 4, | ||||
|       18: 5, | ||||
|       3: 30, | ||||
|       4: 26, | ||||
|       6: 22,         | ||||
|       9: 18, | ||||
|       13: 14, | ||||
|       16: 10, | ||||
|       18: 6, | ||||
|     }; | ||||
|     data.exploration.odMod = AcksActor._valueFromTable( | ||||
|       od, | ||||
|  |  | |||
|  | @ -106,75 +106,91 @@ export const ACKS = { | |||
|   monster_saves: { | ||||
|     0: { | ||||
|       label: "Normal Human", | ||||
|       d: 14, | ||||
|       w: 15, | ||||
|       d: 15, | ||||
|       w: 17, | ||||
|       p: 16, | ||||
|       b: 17, | ||||
|       s: 18 | ||||
|     }, | ||||
|     1: { | ||||
|       label: "1-3", | ||||
|       d: 12, | ||||
|       w: 13, | ||||
|       label: "1", | ||||
|       d: 14, | ||||
|       w: 16, | ||||
|       p: 15, | ||||
|       b: 16, | ||||
|       s: 17 | ||||
|     }, | ||||
|     2: { | ||||
|       label: "2-3", | ||||
|       d: 13, | ||||
|       w: 15, | ||||
|       p: 14, | ||||
|       b: 15, | ||||
|       s: 16 | ||||
|     }, | ||||
|     4: { | ||||
|       label: "4-6", | ||||
|       d: 10, | ||||
|       w: 11, | ||||
|       label: "4", | ||||
|       d: 12, | ||||
|       w: 14, | ||||
|       p: 13, | ||||
|       b: 14, | ||||
|       s: 15 | ||||
|     }, | ||||
|     5: { | ||||
|       label: "5-6", | ||||
|       d: 11, | ||||
|       w: 13, | ||||
|       p: 12, | ||||
|       b: 13, | ||||
|       s: 14 | ||||
|     }, | ||||
|     7: { | ||||
|       label: "7-9", | ||||
|       d: 8, | ||||
|       w: 9, | ||||
|       label: "7", | ||||
|       d: 10, | ||||
|       w: 12, | ||||
|       p: 11, | ||||
|       b: 12, | ||||
|       s: 13 | ||||
|     }, | ||||
|     8: { | ||||
|       label: "8-9", | ||||
|       d: 9, | ||||
|       w: 11, | ||||
|       p: 10, | ||||
|       b: 10, | ||||
|       b: 11, | ||||
|       s: 12 | ||||
|     }, | ||||
|     10: { | ||||
|       label: "10-12", | ||||
|       d: 6, | ||||
|       w: 7, | ||||
|       label: "10", | ||||
|       d: 8, | ||||
|       w: 10, | ||||
|       p: 9, | ||||
|       b: 10, | ||||
|       s: 11 | ||||
|     }, | ||||
|     11: { | ||||
|       label: "11-12", | ||||
|       d: 7, | ||||
|       w: 9, | ||||
|       p: 8, | ||||
|       b: 8, | ||||
|       b: 9, | ||||
|       s: 10 | ||||
|     }, | ||||
|     13: { | ||||
|       label: "13-15", | ||||
|       d: 4, | ||||
|       w: 5, | ||||
|       label: "13", | ||||
|       d: 6, | ||||
|       w: 8, | ||||
|       p: 7, | ||||
|       b: 8, | ||||
|       s: 9 | ||||
|     }, | ||||
|     14: { | ||||
|       label: "14+", | ||||
|       d: 5, | ||||
|       w: 7, | ||||
|       p: 6, | ||||
|       b: 5, | ||||
|       b: 7, | ||||
|       s: 8 | ||||
|     }, | ||||
|     16: { | ||||
|       label: "16-18", | ||||
|       d: 2, | ||||
|       w: 3, | ||||
|       p: 4, | ||||
|       b: 3, | ||||
|       s: 6 | ||||
|     }, | ||||
|     19: { | ||||
|       label: "19-21", | ||||
|       d: 2, | ||||
|       w: 2, | ||||
|       p: 2, | ||||
|       b: 2, | ||||
|       s: 4 | ||||
|     }, | ||||
|     22: { | ||||
|       label: "22+", | ||||
|       d: 2, | ||||
|       w: 2, | ||||
|       p: 2, | ||||
|       b: 2, | ||||
|       s: 2 | ||||
|     }, | ||||
|   } | ||||
|   }, | ||||
| }; | ||||
|  | @ -16,14 +16,14 @@ export class AcksDice { | |||
|         result.isFailure = true; | ||||
|       } | ||||
|     } else if (data.roll.type == "below") { | ||||
|       // MORALE, EXPLORATION
 | ||||
|       // MORALE
 | ||||
|       if (roll.total <= result.target) { | ||||
|         result.isSuccess = true; | ||||
|       } else { | ||||
|         result.isFailure = true; | ||||
|       } | ||||
|     } else if (data.roll.type == "check") { | ||||
|       // SCORE CHECKS (1s and 20s)
 | ||||
|       // SCORE CHECKS (1s and 20s), EXPLORATION
 | ||||
|       if (die == 1 || (roll.total <= result.target && die < 20)) { | ||||
|         result.isSuccess = true; | ||||
|       } else { | ||||
|  |  | |||
|  | @ -34,6 +34,10 @@ export const registerHelpers = async function () { | |||
|     return parseFloat(lh) * parseFloat(rh); | ||||
|   }); | ||||
|      | ||||
|   Handlebars.registerHelper("multround", function (lh, rh) { | ||||
|     return Math.round((parseFloat(lh) * parseFloat(rh)) * 100) / 100; | ||||
|   }) | ||||
| 
 | ||||
|   Handlebars.registerHelper("roundWeight", function (weight) { | ||||
|     return Math.round(parseFloat(weight) / 100) / 10; | ||||
|   }); | ||||
|  |  | |||
|  | @ -2,7 +2,7 @@ | |||
|   "name": "acks", | ||||
|   "title": "Adventurer Conqueror Kings System", | ||||
|   "description": "Play B/X OSR modules with ACKS on Foundry VTT", | ||||
|   "version": "0.1.0", | ||||
|   "version": "0.2.0", | ||||
|   "minimumCoreVersion": "0.6.2", | ||||
|   "compatibleCoreVersion": "0.6.6", | ||||
|   "templateVersion": 2, | ||||
|  |  | |||
|  | @ -10,8 +10,8 @@ | |||
|         }, | ||||
|         "hp": { | ||||
|           "hd": "1d8", | ||||
|           "value": 20, | ||||
|           "max": 20 | ||||
|           "value": 4, | ||||
|           "max": 4 | ||||
|         }, | ||||
|         "ac": { | ||||
|           "value": 0, | ||||
|  | @ -31,19 +31,19 @@ | |||
|         }, | ||||
|         "saves": { | ||||
|           "death": { | ||||
|             "value": 0 | ||||
|             "value": 15 | ||||
|           }, | ||||
|           "wand": { | ||||
|             "value": 0 | ||||
|             "value": 17 | ||||
|           }, | ||||
|           "paralysis": { | ||||
|             "value": 0 | ||||
|             "value": 16 | ||||
|           }, | ||||
|           "breath": { | ||||
|             "value": 0 | ||||
|             "value": 17 | ||||
|           }, | ||||
|           "spell": { | ||||
|             "value": 0 | ||||
|             "value": 18 | ||||
|           } | ||||
|         }, | ||||
|         "movement": { | ||||
|  | @ -98,10 +98,10 @@ | |||
|         } | ||||
|       }, | ||||
|       "exploration": { | ||||
|         "ld": 1, | ||||
|         "od": 2, | ||||
|         "sd": 1, | ||||
|         "ft": 1 | ||||
|         "ld": 18, | ||||
|         "od": 18, | ||||
|         "sd": 18, | ||||
|         "ft": 18 | ||||
|       }, | ||||
|       "scores": { | ||||
|         "str": { | ||||
|  | @ -130,7 +130,7 @@ | |||
|         } | ||||
|       }, | ||||
|       "encumbrance": { | ||||
|         "max": 1600 | ||||
|         "max": 20000 | ||||
|       }, | ||||
|       "languages": { | ||||
|         "value": [] | ||||
|  | @ -140,7 +140,7 @@ | |||
|       "templates": ["common", "spellcaster"], | ||||
|       "details": { | ||||
|         "biography": "", | ||||
|         "alignment": "", | ||||
|         "alignment": "Neutral", | ||||
|         "xp": 0, | ||||
|         "treasure": { | ||||
|           "table": "", | ||||
|  | @ -150,7 +150,7 @@ | |||
|           "d": 0, | ||||
|           "w": 0 | ||||
|         }, | ||||
|         "morale": 0 | ||||
|         "morale": 7 | ||||
|       }, | ||||
|       "attacks": "" | ||||
|     } | ||||
|  | @ -165,7 +165,7 @@ | |||
|       }, | ||||
|       "treasure": false, | ||||
|       "cost": 0, | ||||
|       "weight": 0 | ||||
|       "weight": 166.6 | ||||
|     }, | ||||
|     "weapon": { | ||||
|       "range": { | ||||
|  | @ -184,7 +184,7 @@ | |||
|       "melee": true, | ||||
|       "cost": 0, | ||||
|       "equipped": false, | ||||
|       "weight": 0, | ||||
|       "weight": 167, | ||||
|       "counter": { | ||||
|         "value": 0, | ||||
|         "max": 0 | ||||
|  | @ -193,11 +193,11 @@ | |||
|     "armor": { | ||||
|       "description": "", | ||||
|       "ac": 9, | ||||
|       "aac": 10, | ||||
|       "aac": 0, | ||||
|       "type": "light", | ||||
|       "cost": 0, | ||||
|       "equipped": false, | ||||
|       "weight": 0 | ||||
|       "weight": 2000 | ||||
|     }, | ||||
|     "spell": { | ||||
|       "lvl": 1, | ||||
|  |  | |||
|  | @ -6,7 +6,7 @@ | |||
|         {{localize 'ACKS.Melee'}} ({{mod data.scores.str.mod}}) | ||||
|       </li> | ||||
|       <li> | ||||
|         {{localize 'ACKS.exploration.od.long'}} ({{data.exploration.odMod}} in 6) | ||||
|         {{localize 'ACKS.exploration.od.long'}} ({{data.exploration.odMod}}+) | ||||
|       </li> | ||||
|     </ol> | ||||
|   </div> | ||||
|  |  | |||
|  | @ -2,28 +2,28 @@ | |||
|   <li class="attribute flexrow" data-exploration="ld"> | ||||
|     <h4 class="attribute-name box-title" title="({{localize 'ACKS.exploration.ld.abrev'}}) {{localize 'ACKS.exploration.ld.long'}}"><a>{{ localize "ACKS.exploration.ld.short" }}</a></h4> | ||||
|     <div class="attribute-value"> | ||||
|       <input name="data.exploration.ld" type="text" value="{{data.exploration.ld}}" data-dtype="Number" placeholder="0" /> | ||||
|       <input name="data.exploration.ld" type="text" value="{{data.exploration.ld}}" value="18"  data-dtype="Number" placeholder="0" /> | ||||
|     </div> | ||||
|   </li> | ||||
|   <li class="attribute flexrow" data-exploration="od"> | ||||
|     <h4 class="attribute-name box-title" title="({{localize 'ACKS.exploration.od.abrev'}}) {{localize 'ACKS.exploration.od.long'}}"><a>{{ localize "ACKS.exploration.od.short" }}</a> | ||||
|     </h4> | ||||
|     <div class="attribute-value"> | ||||
|       <input name="data.exploration.od" type="text" value="{{data.exploration.od}}" placeholder="0" data-dtype="String" /> | ||||
|       <input name="data.exploration.od" type="text" value="{{data.exploration.od}}" value="18"  placeholder="0" data-dtype="String" /> | ||||
|     </div> | ||||
|   </li> | ||||
|   <li class="attribute flexrow" data-exploration="sd"> | ||||
|     <h4 class="attribute-name box-title" title="({{localize 'ACKS.exploration.sd.abrev'}}) {{localize 'ACKS.exploration.sd.long'}}"><a>{{ localize "ACKS.exploration.sd.short" }}</a> | ||||
|     </h4> | ||||
|     <div class="attribute-value"> | ||||
|       <input name="data.exploration.sd" type="text" value="{{data.exploration.sd}}" placeholder="0" data-dtype="String" /> | ||||
|       <input name="data.exploration.sd" type="text" value="{{data.exploration.sd}}" value="18"  placeholder="0" data-dtype="String" /> | ||||
|     </div> | ||||
|   </li> | ||||
|   <li class="attribute flexrow" data-exploration="ft"> | ||||
|     <h4 class="attribute-name box-title" title="({{localize 'ACKS.exploration.ft.abrev'}}) {{localize 'ACKS.exploration.ft.long'}}"><a>{{ localize "ACKS.exploration.ft.short" }}</a> | ||||
|     </h4> | ||||
|     <div class="attribute-value"> | ||||
|       <input name="data.exploration.ft" type="text" value="{{data.exploration.ft}}" placeholder="0" data-dtype="String" /> | ||||
|       <input name="data.exploration.ft" type="text" value="{{data.exploration.ft}}" value="18" placeholder="0" data-dtype="String" /> | ||||
|     </div> | ||||
|   </li> | ||||
| </ul> | ||||
|  |  | |||
|  | @ -176,7 +176,7 @@ | |||
|               </h4> | ||||
|             </a> | ||||
|           </div> | ||||
|           <div class="field-long">{{mult item.data.quantity.value item.data.cost}}</div> | ||||
|           <div class="field-long">{{multround item.data.quantity.value item.data.cost}}</div> | ||||
|           <div class="field-short quantity"> | ||||
|             <input value="{{item.data.quantity.value}}" type="text" | ||||
|               placeholder="0" />{{#if item.data.quantity.max}}<span>/{{item.data.quantity.max}}</span>{{/if}} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue