LeRatierBretonnien b029aba2b6
All checks were successful
Release Creation / build (release) Successful in 43s
Fix lethargy + charaster race
2025-04-06 09:52:48 +02:00

321 lines
11 KiB
JavaScript

import * as CHARACTER from "./character.mjs"
import * as WEAPON from "./weapon.mjs"
import * as ARMOR from "./armor.mjs"
import * as SPELL from "./spell.mjs"
import * as SKILL from "./skill.mjs"
import * as EQUIPMENT from "./equipment.mjs"
import * as CHARACTERISTICS from "./characteristic-tables.mjs"
import * as MONSTER from "./monster.mjs"
export const SYSTEM_ID = "fvtt-lethal-fantasy"
export const DEV_MODE = false
export const MONEY = {
tinbit: {
id: "tinbit",
abbrev: "tb",
label: "LETHALFANTASY.Money.Tinbits",
valuetb: 1
},
copper: {
id: "copper",
abbrev: "cp",
label: "LETHALFANTASY.Money.Coppers",
valuetb: 10
},
silver: {
id: "silver",
abbrev: "sp",
label: "LETHALFANTASY.Money.Silvers",
valuetb: 100
},
gold: {
id: "gold",
abbrev: "gp",
label: "LETHALFANTASY.Money.Golds",
valuetb: 1000
},
platinum: {
id: "platinum",
abbrev: "pp",
label: "LETHALFANTASY.Money.Platinums",
valuetb: 10000
}
}
export const MORTAL_CHOICES = {
"mankind": {label: "Mankind", value: "Mankind", defenseBonus: 0},
"elf": {label: "Elf", value: "Elf", defenseBonus: 0},
"dwarf": {label: "Dwarf", value: "Dwarf", defenseBonus: 0},
"halfelf": {label: "Half-Elf", value: "Half-Elf", defenseBonus: 0},
"halforc": {label: "Half-Orc", value: "Half-Orc", defenseBonus: 0},
"gnome": {label: "Gnome", value: "Gnome", defenseBonus: 2},
"shirefolk": {label: "Shire Folk", value: "Shire Folk", defenseBonus: 2},
"Elf": {label: "Elf", value: "Elf", defenseBonus: 0},
"Half-orc": {label: "Half-Orc", value: "Half-Orc", defenseBonus: 0},
"Dwarf": {label: "Dwarf", value: "Dwarf", defenseBonus: 0},
"Half-elf": {label: "Half-Elf", value: "Half-Elf", defenseBonus: 0},
"Gnome": {label: "Gnome", value: "Gnome", defenseBonus: 2},
"Shire Folk": {label: "Shire Folk", value: "Shire Folk", defenseBonus: 2},
"Mankind": {label: "Human", value: "Human", defenseBonus: 0},
}
export const FAVOR_CHOICES = {
"none": {label: "None", value: "none"},
"favor": {label: "Favor", value: "favor"},
"disfavor": {label: "Disfavor", value: "disfavor"}
}
export const MOVEMENT_CHOICES = {
"none": {label: "None (D8E)", value: "D8"},
"walk": {label: "Walk (D10E)", value: "D10"},
"jog": {label: "Jog (D12E)", value: "D12"},
"run": {label: "Run (D20E)", value: "D20"},
"incombat": {label: "In Combat (D12E)", value: "D12"}
}
export const MOVE_DIRECTION_CHOICES = {
"none": {label: "None (+0)", value: "0"},
"away": {label: "Away (+4)", value: "+4"},
"toward": {label: "Toward (+0)", value: "0"},
"lateral": {label: "Lateral (+10)", value: "+10"}
}
export const SIZE_CHOICES = {
"tiny": {label: "Tiny (+10)", value: "+10"},
"small": {label: "Small (+5)", value: "+5"},
"medium": {label: "Medium (+0)", value: "0"},
"huge": {label: "Huge (-10)", value: "-10"}
}
export const RANGE_CHOICES = {
"pointblank": {label: "Point Blank (-5)", value: "-5"},
"short": {label: "Short (+0)", value: "0"},
"medium": {label: "Medium (+8)", value: "+8"},
"long": {label: "Long (+15)", value: "+15"},
"extreme": {label: "Extreme (+20)", value: "+20"},
"beyondskill": {label: "Beyond Skill (+25)", value: "+25"}
}
export const ATTACKER_AIM_CHOICES = {
"simple": {label: "Simple (+0)", value: "0"},
"careful": {label: "Careful (-4)", value: "-4"},
"focused": {label: "Focused (-8)", value: "-8"}
}
export const SPELL_LETHARGY_DICE = {
"spellLevel1": {dice: "D6", level: "1-5", value: "6"},
"spellLevel6": {dice: "D8", level: "6-10", value: "8"},
"spellLevel11": {dice: "D10", value: "10", level: "11-15"},
"spellLevel16": {dice: "D12", value: "12", level: "16-20"},
"spellLevel21": {dice: "D20", value: "20", level: "21-25"}
}
export const INITIATIVE_DICE_CHOICES_PER_CLASS = {
"untrained": [
{ "name": "Asleep or totally distracted (2D12)", "value": "2D12" },
{ "name": "Awake but unsuspecting (2D8)", "value": "2D8" },
{ "name": "Declared Ready on Alert (2D6)", "value": "2D6" },
{ "name": "Aware of the enemy, can hear them but not see (2D4)", "value": "2D4" },
{ "name": "Aware and know exactly where the enemy is (2D3)", "value": "2D3" }
],
"fighter": [
{ "name": "Asleep or totally distracted (1D12)", "value": "1D12" },
{ "name": "Awake but unsuspecting (1D8)", "value": "1D8" },
{ "name": "Declared Ready on Alert (1D6)", "value": "1D6" },
{ "name": "Aware of the enemy, can hear them but not see (1D4)", "value": "1D4" },
{ "name": "Aware and know exactly where the enemy is (1D3)", "value": "1D3" }
],
"rogue": [
{ "name": "Asleep or totally distracted (1D10)", "value": "1D10" },
{ "name": "Awake but unsuspecting (1D8)", "value": "1D8" },
{ "name": "Declared Ready on Alert (1D6)", "value": "1D6" },
{ "name": "Aware of the enemy, can hear them but not see (1D3)", "value": "1D3" },
{ "name": "Aware and know exactly where the enemy is (1D2)", "value": "1D2" }
],
"ranger": [
{ "name": "Asleep or totally distracted (1D10)", "value": "1D10" },
{ "name": "Awake but unsuspecting (1D8)", "value": "1D8" },
{ "name": "Declared Ready on Alert (1D6)", "value": "1D6" },
{ "name": "Aware of the enemy, can hear them but not see (1D4)", "value": "1D4" },
{ "name": "Aware and know exactly where the enemy is (1D3)", "value": "1D3"}
],
"cleric": [
{ "name": "Asleep or totally distracted (1D12)", "value": "1D12" },
{ "name": "Awake but unsuspecting (1D10)", "value": "1D10" },
{ "name": "Declared Ready on Alert (1D8)", "value": "1D8" },
{ "name": "Aware of the enemy, can hear them but not see (1D6)", "value": "1D6" },
{ "name": "Aware and know exactly where the enemy is (1D4)", "value": "1D4" }
],
"magicuser": [
{ "name": "Sleeping to recover Aether Points (2D20)", "value": "2D20" },
{ "name": "Asleep or totally distracted (1D20)", "value": "1D20" },
{ "name": "Awake but unsuspecting (1D12)", "value": "1D12" },
{ "name": "Declared Ready on Alert (1D10)", "value": "1D10" },
{ "name": "Aware of the enemy, can hear them but not see (1D8)", "value": "1D8" },
{ "name": "Aware and know exactly where the enemy is (1D6)", "value": "1D6" }
]
}
export const CHAR_CLASSES = {
"untrained": "Untrained",
"fighter": "Fighter",
"rogue": "Rogue",
"ranger": "Ranger",
"cleric": "Cleric",
"magicuser": "Magic User"
}
export const CHAR_CLASSES_DEFINES = {
"untrained": {id: "untrained", label: "Untrained"},
"fighter": {id: "fighter", label: "Fighter"},
"rogue": {id: "rogue", label: "Rogue"},
"ranger": {id: "ranger", label: "Ranger"},
"cleric": {id: "cleric", label: "Cleric"},
"magicuser": {id: "magicuser", label: "Magic User"}
}
export const DICE_VALUES = {
"d3": "D3",
"d4": "D4",
"d6": "D6",
"d8": "D8",
"d10": "D10",
"d12": "D12",
"d20": "D20"
}
export const CHARACTERISTIC_ATTACK = [ "str", "int", "wis", "dex"]
export const CHARACTERISTIC_RANGED_ATTACK = [ "int", "wis", "dex"]
export const CHARACTERISTIC_DEFENSE = [ "int", "wis", "dex" ]
export const CHARACTERISTIC_DAMAGE = [ "str" ]
export const DEFENSE_DICE_VALUES = {
"d3": "D3",
"d4": "D4",
"d6": "D6",
"d8": "D8",
"d10": "D10"
}
export const CHOICE_DICE = {
"D4": "D4",
"D6": "D6",
"D8": "D8",
"D10": "D10",
"D12": "D12",
"D20": "D20"
}
export const MIRACLE_TYPES = {
"combat": "Combat",
"noncombat": "Non-Combat",
"ritualfaith": "Ritual of Faith"
}
export const SPELL_CRITICAL = {
"none": "None",
"electric": "Electric",
"fire": "Fire",
"cold": "Cold",
"force": "Force",
"acid": "Acid"
}
export const CHOICE_MODIFIERS = {
"-9": "-9",
"-8": "-8",
"-7": "-7",
"-6": "-6",
"-5": "-5",
"-4": "-4",
"-3": "-3",
"-2": "-2",
"-1": "-1",
"+0": "0",
"+1": "+1",
"+2": "+2",
"+3": "+3",
"+4": "+4",
"+5": "+5",
"+6": "+6",
"+7": "+7",
"+8": "+8",
"+9": "+9",
"+10": "+10",
"+11": "+11",
"+12": "+12",
"+13": "+13",
"+14": "+14",
"+15": "+15",
"+16": "+16",
"+17": "+17",
"+18": "+18",
"+19": "+19",
"+20": "+20",
"+21": "+21",
"+22": "+22",
"+23": "+23",
"+24": "+24",
"+25": "+25"
}
export const ASCII = `
······················································································································
: :
:@@@ @@@@@@@@ @@@@@@@ @@@ @@@ @@@@@@ @@@ @@@@@@@@ @@@@@@ @@@ @@@ @@@@@@@ @@@@@@ @@@@@@ @@@ @@@ :
:@@! @@! @!! @@! @@@ @@! @@@ @@! @@! @@! @@@ @@!@!@@@ @!! @@! @@@ !@@ @@! !@@ :
:@!! @!!!:! @!! @!@!@!@! @!@!@!@! @!! @!!!:! @!@!@!@! @!@@!!@! @!! @!@!@!@! !@@!! !@!@! :
:!!: !!: !!: !!: !!! !!: !!! !!: !!: !!: !!! !!: !!! !!: !!: !!! !:! !!: :
:: ::.: : : :: :: : : : : : : : : ::.: : : : : : :: : : : : : ::.: : .: :
: :
······················································································································
`
/**
* Include all constant definitions within the SYSTEM global export
* @type {Object}
*/
export const SYSTEM = {
id: SYSTEM_ID,
CHARACTERISTICS: CHARACTER.CHARACTERISTICS,
CHARACTERISTICS_TABLES: CHARACTERISTICS.TABLES,
CHARACTERISTICS_MAJOR: CHARACTERISTICS.MAJOR,
MONSTER_CHARACTERISTICS: MONSTER.MONSTER_CHARACTERISTICS,
MONSTER_RESIST: MONSTER.MONSTER_RESIST,
MONSTER_SAVES: MONSTER.MONSTER_SAVES,
SAVES: CHARACTER.SAVES,
CHALLENGES: CHARACTER.CHALLENGES,
SKILL_CATEGORY: SKILL.CATEGORY,
ARMOR_TYPE: ARMOR.TYPE,
EQUIPMENT_CATEGORY: EQUIPMENT.CATEGORY,
SPELL_RANGE: SPELL.RANGE,
WEAPON_TYPE: WEAPON.WEAPON_TYPE,
WEAPON_CLASS: WEAPON.WEAPON_CLASS,
COMBAT_PROGRESSION_DICE: DICE_VALUES,
SHIELD_DEFENSE_DICE: DEFENSE_DICE_VALUES,
WEAPON_CATEGORIES: WEAPON.WEAPON_CATEGORIES,
CHARACTERISTIC_ATTACK,
CHARACTERISTIC_RANGED_ATTACK,
CHARACTERISTIC_DEFENSE,
CHARACTERISTIC_DAMAGE,
INITIATIVE_DICE_CHOICES_PER_CLASS,
CHAR_CLASSES,
CHAR_CLASSES_DEFINES,
MONEY,
ASCII,
CHOICE_MODIFIERS,
CHOICE_DICE,
DEV_MODE,
MOVEMENT_CHOICES,
MOVE_DIRECTION_CHOICES,
SIZE_CHOICES,
RANGE_CHOICES,
FAVOR_CHOICES,
ATTACKER_AIM_CHOICES,
MORTAL_CHOICES,
SPELL_CRITICAL,
MIRACLE_TYPES,
SPELL_LETHARGY_DICE
}