forked from GitHub-Mirrors/foundry-sw5e
alpha
This commit is contained in:
parent
b38e51b20f
commit
90dfc64b0f
1 changed files with 8 additions and 1 deletions
|
@ -8,6 +8,8 @@ export default class CharacterImporter {
|
||||||
// v1 - just import the very basics: name, species, hp, ac and abilities
|
// v1 - just import the very basics: name, species, hp, ac and abilities
|
||||||
const characterName = sourceCharacter.name;
|
const characterName = sourceCharacter.name;
|
||||||
const species = sourceCharacter.attribs.find(o => o.name == "race").current;
|
const species = sourceCharacter.attribs.find(o => o.name == "race").current;
|
||||||
|
const background = sourceCharacter.attribs.find(o => o.name == "background").current;
|
||||||
|
const alignment = sourceCharacter.attribs.find(o => o.name == "alignment").current;
|
||||||
const hp = sourceCharacter.attribs.find(o => o.name == "hp").current;
|
const hp = sourceCharacter.attribs.find(o => o.name == "hp").current;
|
||||||
const hpTemp = sourceCharacter.attribs.find(o => o.name == "hp_temp").current;
|
const hpTemp = sourceCharacter.attribs.find(o => o.name == "hp_temp").current;
|
||||||
const ac = sourceCharacter.attribs.find(o => o.name == "ac").current;
|
const ac = sourceCharacter.attribs.find(o => o.name == "ac").current;
|
||||||
|
@ -61,6 +63,11 @@ export default class CharacterImporter {
|
||||||
proficient: charismaSaveProf
|
proficient: charismaSaveProf
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
details: {
|
||||||
|
species: species,
|
||||||
|
background: background,
|
||||||
|
alignment: alignment
|
||||||
|
},
|
||||||
attributes: {
|
attributes: {
|
||||||
ac: {
|
ac: {
|
||||||
value: ac
|
value: ac
|
||||||
|
@ -76,7 +83,7 @@ export default class CharacterImporter {
|
||||||
};
|
};
|
||||||
console.log(targetCharacter);
|
console.log(targetCharacter);
|
||||||
let actor = await Actor.create(targetCharacter);
|
let actor = await Actor.create(targetCharacter);
|
||||||
//CharacterImporter.addClasses(profession, professionLevel, actor);
|
CharacterImporter.addClasses(profession, professionLevel, actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
static async addClasses(profession, level, actor){
|
static async addClasses(profession, level, actor){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue