fixed weapon weight not being calculated
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
# Shadowbane Inquisition Character Sheet
|
||||
head over to our [Discord](https://discord.gg/rc9Fwgp9qv) to learn more.
|
||||
|
||||
Head over to our [Discord](https://discord.gg/rc9Fwgp9qv) to learn more.
|
||||
|
||||
## Change log
|
||||
|
||||
#### TO DO:
|
||||
### TO DO
|
||||
|
||||
+ add curency field
|
||||
+ add a value field to inventory
|
||||
+ add inventory sorting (look into the Pathfinder Community Sheet)
|
||||
+ add Characteristics Bonus selector to weap dmg same with psykana
|
||||
+ add a buff menu (temp stats changes & fatigue ignore)
|
||||
+ make a changelog page
|
||||
@@ -13,11 +15,17 @@ head over to our [Discord](https://discord.gg/rc9Fwgp9qv) to learn more.
|
||||
+ weapons qualities and traits
|
||||
+ any chance you could update the Sustain rules on Psykana to be fixed?
|
||||
It only recognises 1 power and uses the wrong numbers
|
||||
#📜︱imperial-rules-bulletin Psyker Rules has the new stuff for it
|
||||
[#📜︱imperial-rules-bulletin](https://discord.com/channels/773033855481020456/829276251453128735/834380047372648488) Psyker Rules has the new stuff for it
|
||||
basically, -10 per Power on Focus and +10 per Power on Phenomena
|
||||
Hmm, actually, it changes around a bit based on rank...
|
||||
|
||||
#### v 0.1.5 Bug Fix
|
||||
|
||||
+ added inventory sorting (look into the Pathfinder Community Sheet)
|
||||
+ weapon names will be shortened if they are too long
|
||||
|
||||
#### v 0.1.4 Inventory update
|
||||
|
||||
+ fixed accurate damage
|
||||
+ changed 1 letter
|
||||
+ added a stat modifier table
|
||||
@@ -26,9 +34,10 @@ head over to our [Discord](https://discord.gg/rc9Fwgp9qv) to learn more.
|
||||
+ added a carry option for weapons
|
||||
|
||||
#### v 0.1.3 The weapon update
|
||||
|
||||
+ added limiter on roll targets
|
||||
+ Added multi hits location
|
||||
- reverted DoF Math to previous version
|
||||
+ reverted DoF Math to previous version
|
||||
+ finished Proven/Primitive/Vengeful weapon qualities
|
||||
+ added ranged weapon setting (overload/charge, maximal)
|
||||
+ fixed psyniscience in psykana
|
||||
@@ -36,10 +45,11 @@ head over to our [Discord](https://discord.gg/rc9Fwgp9qv) to learn more.
|
||||
+ fixed a bug in repeating skills that caused to roll a 0 instead of the characteristic
|
||||
+ change Scatter to 1d5 + 1 every odd DoF and 1d10 + 1 every odd DoF
|
||||
+ reworked weapons design
|
||||
- Fixed Unbound Psykers Unfettered adding unrequired Psychic Phenomena
|
||||
+ Fixed Unbound Psykers Unfettered adding unrequired Psychic Phenomena
|
||||
+ The button to rearrange items should know its place now
|
||||
|
||||
#### v 0.1.2
|
||||
|
||||
+ Degrees of Failure have learned the correct Math
|
||||
+ Psykana Powers now have damages options in a list
|
||||
+ Psykana Powers now have a choice to roll hit location
|
||||
|
||||
@@ -4112,8 +4112,6 @@ NOTE: replace worker by javascript for IDE functionality
|
||||
attr = {...attr, ...skillRoll(skill.replace('_char', ''), focus)};
|
||||
}
|
||||
if (attr) setAttrs(attr);
|
||||
console.table(values)
|
||||
console.table(attr)
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -4492,6 +4490,7 @@ NOTE: replace worker by javascript for IDE functionality
|
||||
idArray.forEach(id => fieldset_quantity.push (`repeating_gear_${id}_gear_quantity_r`));
|
||||
idArray.forEach(id => fieldset_carry.push (`repeating_gear_${id}_gear_carry_r`));
|
||||
getAttrs(['M_weapon_weight_t','R_weapon_weight_t','weight_total', 'gear_carry', 'gear_weight', 'gear_quantity', ...fieldset_weight, ...fieldset_quantity, ...fieldset_carry], v => {
|
||||
//console.table(v)
|
||||
const getValue = (id, field) => parseFloat(v[`repeating_gear_${id}_${field}`]) || 0
|
||||
const weight_base = parseFloat(v.gear_weight) * parseFloat(v.gear_quantity) * parseFloat(v.gear_carry)
|
||||
const weight_repeating = idArray.reduce((total, id) => total + (getValue(id, 'gear_weight_r') * getValue(id, 'gear_quantity_r') * getValue(id, 'gear_carry_r')), 0)
|
||||
@@ -4693,14 +4692,14 @@ NOTE: replace worker by javascript for IDE functionality
|
||||
const getSectionObjects = function (section, fields, callback) {
|
||||
if (!Array.isArray(fields)) fields = [fields];
|
||||
getSectionIDs(`repeating_${section}`, idArray => {
|
||||
const attrArray = idArray.reduce( (m,id) => [...m, ...(Object.values(fields).map(field => `repeating_${section}_${id}_${field}`))],[]);
|
||||
const attrArray = idArray.reduce( (m,id) => [...m, ...(Object.values(fields).map(field => `repeating_${section}_${id}_${(Array.isArray(field) ? field[1] : field)}`))],[]);
|
||||
getAttrs(attrArray, v => {
|
||||
const objects = [];
|
||||
idArray.forEach(id => {
|
||||
let obj = { _id : id, _source: `repeating_${section}_${id}` };
|
||||
for (var property in fields) {
|
||||
obj[property] = v[`repeating_${section}_${id}_${fields[property]}`]
|
||||
}
|
||||
fields.forEach( field => {
|
||||
obj[field[0]] = v[`repeating_${section}_${id}_${field[1]}`]
|
||||
})
|
||||
objects.push(obj)
|
||||
});
|
||||
callback(objects);
|
||||
@@ -4902,10 +4901,10 @@ NOTE: replace worker by javascript for IDE functionality
|
||||
on('sheet:opened', () => {
|
||||
getAttrs(oldVariables, values => {
|
||||
var attributes = {}
|
||||
let gear = {carry: values['gear_carry'], name: values['gear_name'], craft: values['gear_crafts'], quantity: values['gear_quantity'], avail: values['gear_avail'], weight: values['gear_weight'], desc: values['gear_desc']}
|
||||
let gear = {carry: values['gear_carry'], name: values['gear_name'], craftsmanship: values['gear_crafts'], quantity: values['gear_quantity'], avail: values['gear_avail'], weight: values['gear_weight'], desc: values['gear_desc']}
|
||||
if (!gear.name == '') attributes = {...attributes, ...mapGear(gear)}
|
||||
console.table(gear)
|
||||
console.log(attributes)
|
||||
console.table(attributes)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user