diff --git a/modules/avd12-item-sheet.js b/modules/avd12-item-sheet.js
index 13de253..c8f9643 100644
--- a/modules/avd12-item-sheet.js
+++ b/modules/avd12-item-sheet.js
@@ -57,8 +57,6 @@ export class Avd12ItemSheet extends ItemSheet {
name: this.object.name,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
- weaponSkills: CrucibleUtility.getWeaponSkills(),
- shieldSkills: CrucibleUtility.getShieldSkills(),
system: duplicate(this.object.system),
limited: this.object.limited,
options: this.options,
diff --git a/modules/avd12-utility.js b/modules/avd12-utility.js
index 493f1f5..7c558f2 100644
--- a/modules/avd12-utility.js
+++ b/modules/avd12-utility.js
@@ -64,12 +64,12 @@ export class Avd12Utility {
/* -------------------------------------------- */
static async ready() {
- const skills = await Avd12Utility.loadCompendium("fvtt-crucible-rpg.skills")
+ const skills = await Avd12Utility.loadCompendium("fvtt-avd12.skills")
this.skills = skills.map(i => i.toObject())
this.weaponSkills = duplicate(this.skills.filter(item => item.system.isweaponskill))
this.shieldSkills = duplicate(this.skills.filter(item => item.system.isshieldskill))
- const rollTables = await Avd12Utility.loadCompendium("fvtt-crucible-rpg.rolltables")
+ const rollTables = await Avd12Utility.loadCompendium("fvtt-avd12.rolltables")
this.rollTables = rollTables.map(i => i.toObject())
}
@@ -93,98 +93,6 @@ export class Avd12Utility {
}
return false
}
- /* -------------------------------------------- */
- static isWeaponPenetrating(weapon) {
- if (weapon && weapon.system.qualities.toLowerCase().includes("penetrating")) {
- return true
- }
- return false
- }
- /* -------------------------------------------- */
- static isWeaponLight(weapon) {
- if (weapon && weapon.system.qualities.toLowerCase().includes("light")) {
- return true
- }
- return false
- }
- /* -------------------------------------------- */
- static isWeaponHeavy(weapon) {
- if (weapon && weapon.system.qualities.toLowerCase().includes("heavy")) {
- return true
- }
- return false
- }
- /* -------------------------------------------- */
- static isWeaponHack(weapon) {
- if (weapon && weapon.system.qualities.toLowerCase().includes("hack")) {
- return true
- }
- return false
- }
- /* -------------------------------------------- */
- static isWeaponUndamaging(weapon) {
- if (weapon && weapon.system.qualities.toLowerCase().includes("undamaging")) {
- return true
- }
- return false
- }
- /* -------------------------------------------- */
- static isWeaponDangerous(weapon) {
- if (weapon && weapon.system.qualities.toLowerCase().includes("dangerous")) {
- return true
- }
- return false
- }
- /* -------------------------------------------- */
- static isWeaponDeadly(weapon) {
- if (weapon && weapon.system.qualities.toLowerCase().includes("deadly")) {
- return true
- }
- return false
- }
- static getWeaponRange(weapon) {
- if (weapon && weapon.system.isranged) {
- let rangeValue = weapon.system.range.replace(/[^0-9]/g, '')
- return Number(rangeValue)
- }
- return false
- }
- static getWeaponMaxRange(weapon) {
- if (weapon && weapon.system.isranged) {
- let rangeValue = weapon.system.maxrange.replace(/[^0-9]/g, '')
- return Number(rangeValue)
- }
- return false
- }
-
- /* -------------------------------------------- */
- static async getRollTableFromDiceColor(diceColor, displayChat = true) {
- let rollTableName = __color2RollTable[diceColor]
- if (rollTableName) {
- const pack = game.packs.get("fvtt-crucible-rpg.rolltables")
- const index = await pack.getIndex()
- const entry = index.find(e => e.name === rollTableName)
- let table = await pack.getDocument(entry._id)
- const draw = await table.draw({ displayChat: displayChat, rollMode: "gmroll" })
- return draw.results.length > 0 ? draw.results[0] : undefined
- }
- }
- /* -------------------------------------------- */
- static getSizeDice(sizeValue) {
- return __size2Dice[sizeValue]
- }
-
- /* -------------------------------------------- */
- static async getCritical(level, weapon) {
- const pack = game.packs.get("fvtt-crucible-rpg.rolltables")
-
- let tableName = "Crit " + level + " (" + this.upperFirst(weapon.system.damage) + ")"
- const index = await pack.getIndex()
- const entry = index.find(e => e.name === tableName)
- let table = await pack.getDocument(entry._id)
- const draw = await table.draw({ displayChat: false, rollMode: "gmroll" })
- return draw.results.length > 0 ? draw.results[0] : undefined
- }
/* -------------------------------------------- */
static async chatListeners(html) {
@@ -216,14 +124,10 @@ export class Avd12Utility {
static async preloadHandlebarsTemplates() {
const templatePaths = [
- 'systems/fvtt-crucible-rpg/templates/editor-notes-gm.html',
- 'systems/fvtt-crucible-rpg/templates/partial-roll-select.html',
- 'systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html',
- 'systems/fvtt-crucible-rpg/templates/partial-actor-status.html',
- 'systems/fvtt-crucible-rpg/templates/partial-options-abilities.html',
- 'systems/fvtt-crucible-rpg/templates/partial-item-nav.html',
- 'systems/fvtt-crucible-rpg/templates/partial-item-description.html',
- 'systems/fvtt-crucible-rpg/templates/partial-actor-equipment.html'
+ 'systems/fvtt-avd12/templates/actors/editor-notes-gm.hbs',
+ 'systems/fvtt-avd12/templates/items/partial-item-nav.hbs',
+ 'systems/fvtt-avd12/templates/items/partial-item-description.hbs',
+ 'systems/fvtt-avd12/templates/items/partial-options-weapons-types.hbs'
]
return loadTemplates(templatePaths);
}
@@ -319,7 +223,7 @@ export class Avd12Utility {
name: defender.name,
alias: defender.name,
//user: defender.id,
- content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-request-defense.html`, rollData),
+ content: await renderTemplate(`systems/fvtt-avd12/templates/chat-request-defense.html`, rollData),
whisper: [defender.id].concat(ChatMessage.getWhisperRecipients('GM')),
})
}
@@ -365,7 +269,7 @@ export class Avd12Utility {
/* -------------------------------------------- */
static async getFumble(weapon) {
- const pack = game.packs.get("fvtt-crucible-rpg.rolltables")
+ const pack = game.packs.get("fvtt-avd12.rolltables")
const index = await pack.getIndex()
let entry
@@ -404,7 +308,7 @@ export class Avd12Utility {
result.criticalText = result.critical.text
}
this.createChatWithRollMode(rollData.alias, {
- content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-attack-defense-result.html`, rollData)
+ content: await renderTemplate(`systems/fvtt-avd12/templates/chat-attack-defense-result.html`, rollData)
})
console.log("Results processed", rollData)
}
@@ -429,7 +333,7 @@ export class Avd12Utility {
if (game.user.isGM) {
this.processSuccessResult(rollData)
} else {
- game.socket.emit("system.fvtt-crucible-rpg", { msg: "msg_gm_process_attack_defense", data: rollData });
+ game.socket.emit("system.fvtt-avd12", { msg: "msg_gm_process_attack_defense", data: rollData });
}
}
}
@@ -638,7 +542,7 @@ export class Avd12Utility {
rollData.rollOrder = 1
rollData.rollType = (rollData.rollAdvantage == "roll-advantage") ? "Advantage" : "Disadvantage"
this.createChatWithRollMode(rollData.alias, {
- content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-generic-result.html`, rollData)
+ content: await renderTemplate(`systems/fvtt-avd12/templates/chat-generic-result.html`, rollData)
})
rollData.rollOrder = 2
@@ -648,7 +552,7 @@ export class Avd12Utility {
rollData.roll = myRoll2 // Tmp switch to display the proper results
rollData.nbSuccess = myRoll2.total
this.createChatWithRollMode(rollData.alias, {
- content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-generic-result.html`, rollData)
+ content: await renderTemplate(`systems/fvtt-avd12/templates/chat-generic-result.html`, rollData)
})
rollData.roll = myRoll // Revert the tmp switch
rollData.nbSuccess = myRoll.total
@@ -682,7 +586,7 @@ export class Avd12Utility {
actor.lastRoll = rollData
this.createChatWithRollMode(rollData.alias, {
- content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-generic-result.html`, rollData)
+ content: await renderTemplate(`systems/fvtt-avd12/templates/chat-generic-result.html`, rollData)
})
console.log("Rolldata result", rollData)
@@ -733,7 +637,7 @@ export class Avd12Utility {
chatGM.whisper = this.getUsers(user => user.isGM);
chatGM.content = "Blinde message of " + game.user.name + "
" + chatOptions.content;
console.log("blindMessageToGM", chatGM);
- game.socket.emit("system.fvtt-crucible-rpg", { msg: "msg_gm_chat_message", data: chatGM });
+ game.socket.emit("system.fvtt-avd12", { msg: "msg_gm_chat_message", data: chatGM });
}
diff --git a/template.json b/template.json
index 5c8c1f5..9d26f70 100644
--- a/template.json
+++ b/template.json
@@ -74,7 +74,7 @@
"value": 0,
"max": 0
},
- "resistances": {
+ "mitigation": {
"physical": {
"label": "Physical Damage",
"abbrev": "physical",
@@ -92,9 +92,9 @@
"iselemental": true,
"value": 0
},
- "cool": {
- "label": "Cool Damage",
- "abbrev": "cool",
+ "cold": {
+ "label": "Cold Damage",
+ "abbrev": "cold",
"iselemental": true,
"value": 0
},
@@ -113,11 +113,97 @@
"abbrev": "divine",
"value": 0
},
+ "arcane": {
+ "label": "Aracane Damage",
+ "abbrev": "arcane",
+ "value": 0
+ },
+ "poison": {
+ "label": "Poison Damage",
+ "abbrev": "poison",
+ "value": 0
+ },
"true": {
"label": "True Damage",
"abbrev": "true",
"value": 0
}
+ },
+ "bonus": {
+ "ranged": {
+ "attack": 0,
+ "damage": 0,
+ "crits": 0,
+ "brutals": 0
+ },
+ "slash": {
+ "attack": 0,
+ "damage": 0,
+ "crits": 0,
+ "brutals": 0
+ },
+ "blunt": {
+ "attack": 0,
+ "damage": 0,
+ "crits": 0,
+ "brutals": 0
+ },
+ "pierce": {
+ "attack": 0,
+ "damage": 0,
+ "crits": 0,
+ "brutals": 0
+ },
+ "unarmed": {
+ "attack": 0,
+ "damage": 0
+ },
+ "dodge": {
+ "armored": 0,
+ "light": 0,
+ "unarmored": 0
+ },
+ "stealth": {
+ "armored": 0,
+ "light": 0,
+ "unarmored": 0
+ },
+ "block": {
+ "armored": 0,
+ "light": 0,
+ "unarmored": 0
+ },
+ "physical": {
+ "armored": 0,
+ "light": 0,
+ "unarmored": 0
+ },
+ "elemental": {
+ "armored": 0,
+ "light": 0,
+ "unarmored": 0
+ },
+ "armored": {
+ "remove_stealth": false,
+ "cast_speed": 0
+ },
+ "craft": {
+ "smithing": 0,
+ "cooking": 0,
+ "scribing": 0,
+ "runecarving": 0,
+ "alchemy": 0,
+ "ammocraft": 0,
+ "engineering": 0
+ },
+ "weapon": {
+ "attack": 0,
+ "damage": 0
+ },
+ "spell": {
+ "attack": 0,
+ "damage": 0
+ }
}
},
"npccore": {
@@ -143,6 +229,54 @@
"module",
"money"
],
+ "templates": {
+ "commonitem": {
+ "focuspointsbonus": 0,
+ "focusregenbonus": 0,
+ "burnchancebonus": 0,
+ "mitigation": {
+ "physical": {
+ "value": 0
+ },
+ "psychic": {
+ "value": 0
+ },
+ "fire": {
+ "value": 0
+ },
+ "lightning": {
+ "value": 0
+ },
+ "cold": {
+ "value": 0
+ },
+ "dark": {
+ "value": 0
+ },
+ "divine": {
+ "value": 0
+ },
+ "arcane": {
+ "value": 0
+ }
+ },
+ "bonus": {
+ "block": {
+ "value": 0
+ },
+ "dodge": {
+ "value": 0
+ },
+ "resistance": {
+ "value": 0
+ }
+ },
+ "weight": 0,
+ "cost": 0,
+ "health": 0,
+ "movespeed": 0
+ }
+ },
"skill": {
"attribute": "",
"value": 0,
@@ -154,22 +288,24 @@
"description": ""
},
"armor": {
- "weight": 0,
- "cost": 0,
+ "templates": [
+ "commonitem"
+ ],
"equipped": false,
- "locationprotected": "",
"description": ""
},
"shield": {
- "weight": 0,
- "cost": 0,
+ "templates": [
+ "commonitem"
+ ],
"equipped": false,
"description": ""
},
"equipment": {
"equiptype": "",
- "cost": 0,
- "weight": 0,
+ "templates": [
+ "commonitem"
+ ],
"quantity": 0,
"equipped": false,
"description": ""
@@ -182,11 +318,34 @@
},
"weapon": {
"weapontype": "",
- "cost": 0,
- "weight": 0,
- "range": "",
- "maxrange": "",
+ "category": "",
+ "templates": [
+ "commonitem"
+ ],
+ "minrange": 0,
+ "maxrange": 0,
+ "throwrange": 0,
+ "magical": false,
+ "blackenediron": false,
+ "silvered": false,
"equipped": false,
+ "damages": {
+ "primary": {
+ "damagetype": "",
+ "dice": "",
+ "bonus": ""
+ },
+ "secondary": {
+ "damagetype": "",
+ "dice": "",
+ "bonus": ""
+ },
+ "tertiary": {
+ "damagetype": "",
+ "dice": "",
+ "bonus": ""
+ }
+ },
"description": ""
},
"module": {
diff --git a/templates/actors/actor-sheet.html b/templates/actors/actor-sheet.hbs
similarity index 100%
rename from templates/actors/actor-sheet.html
rename to templates/actors/actor-sheet.hbs
diff --git a/templates/actors/editor-notes-gm.hbs b/templates/actors/editor-notes-gm.hbs
new file mode 100644
index 0000000..4c17392
--- /dev/null
+++ b/templates/actors/editor-notes-gm.hbs
@@ -0,0 +1,6 @@
+{{#if data.isGM}}
+