forked from GitHub-Mirrors/foundry-sw5e
skills v1
This commit is contained in:
parent
3d5024b0c5
commit
f4af3aad45
1 changed files with 67 additions and 1 deletions
|
@ -49,6 +49,63 @@ export default class CharacterImporter {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const skills = {
|
||||||
|
acr: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'acrobatics_type').current
|
||||||
|
},
|
||||||
|
ani: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'animal_handling_type').current
|
||||||
|
},
|
||||||
|
ath: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'athletics_type').current
|
||||||
|
},
|
||||||
|
dec: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'deception_type').current
|
||||||
|
},
|
||||||
|
ins: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'insight_type').current
|
||||||
|
},
|
||||||
|
inv: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'investigation_type').current
|
||||||
|
},
|
||||||
|
itm: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'intimidation_type').current
|
||||||
|
},
|
||||||
|
lor: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'lore_type').current
|
||||||
|
},
|
||||||
|
med: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'medicine_type').current
|
||||||
|
},
|
||||||
|
nat: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'nature_type').current
|
||||||
|
},
|
||||||
|
per: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'persuasion_type').current
|
||||||
|
},
|
||||||
|
pil: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'piloting_type').current
|
||||||
|
},
|
||||||
|
prc: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'perception_type').current
|
||||||
|
},
|
||||||
|
prf: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'performance_type').current
|
||||||
|
},
|
||||||
|
slt: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'sleight_of_hand_type').current
|
||||||
|
},
|
||||||
|
ste: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'stealth_type').current
|
||||||
|
},
|
||||||
|
sur: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'survival_type').current
|
||||||
|
},
|
||||||
|
tec: {
|
||||||
|
value: sourceCharacter.attribs.find(e => e.name == 'technology_type').current
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const targetCharacter = {
|
const targetCharacter = {
|
||||||
name: sourceCharacter.name,
|
name: sourceCharacter.name,
|
||||||
type: "character",
|
type: "character",
|
||||||
|
@ -58,7 +115,8 @@ export default class CharacterImporter {
|
||||||
attributes: {
|
attributes: {
|
||||||
ac: ac,
|
ac: ac,
|
||||||
hp: hp
|
hp: hp
|
||||||
}
|
},
|
||||||
|
skills: skills
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -77,6 +135,14 @@ export default class CharacterImporter {
|
||||||
await actor.createEmbeddedEntity("OwnedItem", assignedClass.data, { displaySheet: false });
|
await actor.createEmbeddedEntity("OwnedItem", assignedClass.data, { displaySheet: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static async addSkils(){
|
||||||
|
// data.skills.skill.value is all that matters
|
||||||
|
// value = 0 = regular
|
||||||
|
// value = 0.5 = half-proficient
|
||||||
|
// value = 1 = proficient
|
||||||
|
// value = 2 = expertise
|
||||||
|
}
|
||||||
|
|
||||||
static addImportButton(html){
|
static addImportButton(html){
|
||||||
const header = $("#actors").find("header.directory-header");
|
const header = $("#actors").find("header.directory-header");
|
||||||
const search = $("#actors").children().find("div.header-search");
|
const search = $("#actors").children().find("div.header-search");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue