Big Species Update

All manner of Species updates, as well as some new CSS for journal entries and rollable tables.
This commit is contained in:
professorbunbury 2020-08-31 16:32:00 -04:00
parent 60c587024f
commit ebc70539ff
376 changed files with 5339 additions and 51 deletions

9
README.md.bak Normal file
View file

@ -0,0 +1,9 @@
# sw5e
SW5E Foundry VTT System
For easy install
In the Foundry Configuration and Setup window go to the Game Systems tab, click on the "Install System" button, and
place the following link into the Manifest URL at the bottom
https://raw.githubusercontent.com/unrealkakeman89/sw5e/master/system.json

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View file

@ -45,6 +45,7 @@
"SW5E.AlignmentND": "Neutral Dark",
"SW5E.AlignmentNL": "Neutral Light",
"SW5E.AlignmentBN": "Balenced Neutral",
"SW5E.Archetypes": "Archetypes",
"SW5E.ArmorClass": "Armor Class",
"SW5E.ArmorProperties": "Armor Properties",
"SW5E.ArmorProperAbsorptive": "Absorptive",
@ -282,36 +283,106 @@
"SW5E.JackOfAllTrades": "Jack of all Trades",
"SW5E.LairAct": "Lair Action",
"SW5E.Languages": "Languages",
"SW5E.LanguagesAleena": "Aleena",
"SW5E.LanguagesAntarian": "Antarian",
"SW5E.LanguagesAnzellan": "Anzellan",
"SW5E.LanguagesAqualish": "Aqualish",
"SW5E.LanguagesArdennian": "Ardennian",
"SW5E.LanguagesBalosur": "Balosur",
"SW5E.LanguagesBarabel": "Barabel",
"SW5E.LanguagesBasic": "Basic",
"SW5E.LanguagesBesalisk": "Besalisk",
"SW5E.LanguagesBinary": "Binary",
"SW5E.LanguagesBith": "Bith",
"SW5E.LanguagesBocce": "Bocce",
"SW5E.LanguagesBothese": "Bothese",
"SW5E.LanguagesCartharese": "Catharese",
"SW5E.LanguagesCatharese": "Catharese",
"SW5E.LanguagesCerean": "Cerean",
"SW5E.LanguagesChadra-Fan": "Chadra-Fan",
"SW5E.LanguagesChagri": "Chagri",
"SW5E.LanguagesCheunh": "Cheunh",
"SW5E.LanguagesDurese": "Durese",
"SW5E.LanguagesChevin": "Chevin",
"SW5E.LanguagesChironan": "Chironan",
"SW5E.LanguagesClawdite": "Clawdite",
"SW5E.LanguagesCodruese": "Codruese",
"SW5E.LanguagesColicoid": "Colicoid",
"SW5E.LanguagesDashadi": "Dashadi",
"SW5E.LanguagesDefel": "Defel",
"SW5E.LanguagesDevaronese": "Devaronese",
"SW5E.LanguagesDosh": "Dosh",
"SW5E.LanguagesDraethos": "Draethos",
"SW5E.LanguagesDug": "Dug",
"SW5E.LanguagesDurese": "Durese",
"SW5E.LanguagesEwokese": "Ewokese",
"SW5E.LanguagesFalleen": "Falleen",
"SW5E.LanguagesFelucianese": "Felucianese",
"SW5E.LanguagesGamorrese": "Gamorrese",
"SW5E.LanguagesGand": "Gand",
"SW5E.LanguagesGeonosian": "Geonosian",
"SW5E.LanguagesGivin": "Givin",
"SW5E.LanguagesGran": "Gran",
"SW5E.LanguagesGungan": "Gungan",
"SW5E.LanguagesHapan": "Hapan",
"SW5E.LanguagesHarchese": "Harchese",
"SW5E.LanguagesHerglese": "Herglese",
"SW5E.LanguagesHonoghran": "Honoghran",
"SW5E.LanguagesHuttese": "Huttese",
"SW5E.LanguagesIktotchese": "Iktotchese",
"SW5E.LanguagesIthorese": "Ithorese",
"SW5E.LanguagesJawaese": "Jawaese",
"SW5E.LanguagesKaleesh": "Kaleesh",
"SW5E.LanguagesKaminoan": "Kaminoan",
"SW5E.LanguagesKarkaran": "Karkaran",
"SW5E.LanguagesKelDor": "Kel Dor",
"SW5E.LanguagesKharan": "Kharan",
"SW5E.LanguagesKillik": "Killik",
"SW5E.LanguagesKlatooinian": "Klatooinian",
"SW5E.LanguagesKubazian": "Kubazian",
"SW5E.LanguagesKushiban": "Kushiban",
"SW5E.LanguagesKyuzo": "Kyuzo",
"SW5E.LanguagesLannik": "Lannik",
"SW5E.LanguagesLasat": "Lasat",
"SW5E.LanguagesLowickese": "Lowickese",
"SW5E.LanguagesMandoa": "Mando'a",
"SW5E.LanguagesMiralukese": "Miralukese",
"SW5E.LanguagesMirialan": "Mirialan",
"SW5E.LanguagesMonCal": "Mon Cal",
"SW5E.LanguagesMustafarian": "Mustafarian",
"SW5E.LanguagesMuun": "Muun",
"SW5E.LanguagesNautila": "Nautila",
"SW5E.LanguagesOrtolan": "Ortolan",
"SW5E.LanguagesPakPak": "Pak Pak",
"SW5E.LanguagesPyke": "Pyke",
"SW5E.LanguagesQuarrenese": "Quarrenese",
"SW5E.LanguagesRakata": "Rakata",
"SW5E.LanguagesRattataki": "Rattataki",
"SW5E.LanguagesRishii": "Rishii",
"SW5E.LanguagesRodese": "Rodese",
"SW5E.LanguagesSith": "Sith",
"SW5E.LanguagesTogruti": "Togruti",
"SW5E.LanguagesDosh": "Dosh",
"SW5E.LanguagesTwileki": "Twi'leki",
"SW5E.LanguagesTusken": "Tusken",
"SW5E.LanguagesSelkatha": "Selkatha",
"SW5E.LanguagesSemblan": "Semblan",
"SW5E.LanguagesShyriiwook": "Shyriiwook",
"SW5E.LanguagesZabraki": "Zabraki",
"SW5E.LanguagesShistavanen": "Shistavanen",
"SW5E.LanguagesSith": "Sith",
"SW5E.LanguagesSquibbian": "Squibbian",
"SW5E.LanguagesSriluurian": "Sriluurian",
"SW5E.LanguagesSsi-ruuvi": "Ssi-ruuvi",
"SW5E.LanguagesSullustese": "Sullustese",
"SW5E.LanguagesTalzzi": "Talzzi",
"SW5E.LanguagesThisspiasian": "Thisspiasian",
"SW5E.LanguagesTogorese": "Togorese",
"SW5E.LanguagesTogruti": "Togruti",
"SW5E.LanguagesToydarian": "Toydarian",
"SW5E.LanguagesTusken": "Tusken",
"SW5E.LanguagesTwileki": "Twi'leki",
"SW5E.LanguagesUgnaught": "Ugnaught",
"SW5E.LanguagesUmbaran": "Umbaran",
"SW5E.LanguagesUtapese": "Utapese",
"SW5E.LanguagesVerpine": "Verpine",
"SW5E.LanguagesVong": "Vong",
"SW5E.LanguagesVoss": "Voss",
"SW5E.LanguagesYevethan": "Yevethan",
"SW5E.LanguagesZabraki": "Zabraki",
"SW5E.LanguagesZygerrian": "Zygerrian",
"SW5E.LegAct": "Legd. Actions",
"SW5E.LegRes": "Legd. Resistance",
"SW5E.Level": "Level",
@ -346,7 +417,7 @@
"SW5E.PolymorphTmpClass": "Temporary Class",
"SW5E.PolymorphTokens": "Transform all linked tokens?",
"SW5E.PolymorphWildShape": "Wild Shape",
"SW5E.Concentrated": "Concentrate",
"SW5E.Concentrated": "Concentrate",
"SW5E.Price": "Price",
"SW5E.Proficiency": "Proficiency",
"SW5E.Proficient": "Proficient",
@ -459,7 +530,8 @@
"SW5E.PowerUnprepared": "Unprepared",
"SW5E.PowerUsage": "Power Usage",
"SW5E.Powerbook": "Powerbook",
"SW5E.SpeciesTraits": "Species Traits",
"SW5E.SpeciesDescription": "Description",
"SW5E.SpeciesTraits": "Species Traits",
"SW5E.SubclassName": "Subclass Name",
"SW5E.Supply": "Supply",
"SW5E.Target": "Target",
@ -477,7 +549,7 @@
"SW5E.TargetSphere": "Sphere",
"SW5E.TargetSquare": "Square",
"SW5E.TargetWall": "Wall",
"SW5E.TargetDroid": "Droid",
"SW5E.TargetDroid": "Droid",
"SW5E.Temp": "Temp",
"SW5E.TimeDay": "Days",
"SW5E.TimeHour": "Hours",

597
lang/en.json.bak Normal file
View file

@ -0,0 +1,597 @@
{
"Star Wars 5th Edition": "Star Wars 5th Edition",
"SW5E.title": "Star Wars 5th Edition",
"SW5E.AbbreviationCR": "CR",
"SW5E.AbbreviationConc": "Conc.",
"SW5E.AbbreviationDC": "DC",
"SW5E.AbbreviationLR": "LR",
"SW5E.AbbreviationLbs": "lbs.",
"SW5E.AbbreviationSR": "SR",
"SW5E.Ability": "Ability",
"SW5E.AbilityCha": "Charisma",
"SW5E.AbilityCon": "Constitution",
"SW5E.AbilityDex": "Dexterity",
"SW5E.AbilityInt": "Intelligence",
"SW5E.AbilityModifier": "Ability Modifier",
"SW5E.AbilityStr": "Strength",
"SW5E.AbilityUseCantUse": "You are not currently able to use this ability!",
"SW5E.AbilityUseCharged": "charged",
"SW5E.AbilityUseConsume": "Consume Available Usage?",
"SW5E.AbilityUseDepleted": "depleted",
"SW5E.AbilityUseHint": "Configure how you would like to use the",
"SW5E.AbilityUseRechargeHint": "This ability uses a recharge mechanic and is currently",
"SW5E.AbilityUseWarnEnd": "available uses per",
"SW5E.AbilityUseWarnStart": "This ability has",
"SW5E.AbilityWis": "Wisdom",
"SW5E.Action": "Action",
"SW5E.ActionAbil": "Ability Check",
"SW5E.ActionHeal": "Healing",
"SW5E.ActionMPAK": "Melee Power Attack",
"SW5E.ActionMWAK": "Melee Weapon Attack",
"SW5E.ActionOther": "Other",
"SW5E.ActionRPAK": "Ranged Power Attack",
"SW5E.ActionRWAK": "Ranged Weapon Attack",
"SW5E.ActionSave": "Saving Throw",
"SW5E.ActionUtil": "Utility",
"SW5E.Add": "Add",
"SW5E.Advantage": "Advantage",
"SW5E.Alignment": "Alignment",
"SW5E.AlignmentCD": "Chaotic Dark",
"SW5E.AlignmentCL": "Chaotic Light",
"SW5E.AlignmentCN": "Chaotic Neutral",
"SW5E.AlignmentLD": "Lawful Dark",
"SW5E.AlignmentLL": "Lawful Light",
"SW5E.AlignmentLN": "Lawful Neutral",
"SW5E.AlignmentND": "Neutral Dark",
"SW5E.AlignmentNL": "Neutral Light",
"SW5E.AlignmentBN": "Balenced Neutral",
"SW5E.ArmorClass": "Armor Class",
"SW5E.ArmorProperties": "Armor Properties",
"SW5E.ArmorProperAbsorptive": "Absorptive",
"SW5E.ArmorProperAgile": "Agile",
"SW5E.ArmorProperAnchor": "Anchor",
"SW5E.ArmorProperAvoidant": "Avoidant",
"SW5E.ArmorProperBarbed": "Barbed",
"SW5E.ArmorProperCharging": "Charging",
"SW5E.ArmorProperConcealing": "Concealing",
"SW5E.ArmorProperCumbersome": "Cumbersome",
"SW5E.ArmorProperGauntleted": "Gauntleted",
"SW5E.ArmorProperImbalanced": "Imbalanced",
"SW5E.ArmorProperImpermeable": "Impermeable",
"SW5E.ArmorProperInsulated": "Insulated",
"SW5E.ArmorProperInterlocking": "Interlocking",
"SW5E.ArmorProperLambent": "Lambent",
"SW5E.ArmorProperLightweight": "Lightweight",
"SW5E.ArmorProperMagnetic": "Magnetic",
"SW5E.ArmorProperObscured": "Obscured",
"SW5E.ArmorProperPowered": "Powered",
"SW5E.ArmorProperReactive": "Reactive",
"SW5E.ArmorProperRegulated": "Regulated",
"SW5E.ArmorProperReinforced": "Reinforced",
"SW5E.ArmorProperResponsive": "Responsive",
"SW5E.ArmorProperRigid": "Rigid",
"SW5E.ArmorProperSilent": "Silent",
"SW5E.ArmorProperSpiked": "Spiked",
"SW5E.ArmorProperSteadfast": "Steadfast",
"SW5E.ArmorProperVersatile": "Versatile",
"SW5E.Attack": "Attack",
"SW5E.Attributes": "Attributes",
"SW5E.Attuned": "Attuned",
"SW5E.Background": "Background",
"SW5E.Biography": "Biography",
"SW5E.BonusAbilityCheck": "Global Ability Check Bonus",
"SW5E.BonusAbilitySave": "Global Saving Throw Bonus",
"SW5E.BonusAbilitySkill": "Global Skill Check Bonus",
"SW5E.BonusAction": "Bonus Action",
"SW5E.BonusMSAttack": "Melee Power Attack Bonus",
"SW5E.BonusMSDamage": "Melee Power Damage Bonus",
"SW5E.BonusMWAttack": "Melee Weapon Attack Bonus",
"SW5E.BonusMWDamage": "Melee Weapon Damage Bonus",
"SW5E.BonusRSAttack": "Ranged Power Attack Bonus",
"SW5E.BonusRSDamage": "Ranged Power Damage Bonus",
"SW5E.BonusRWAttack": "Ranged Weapon Attack Bonus",
"SW5E.BonusRWDamage": "Ranged Weapon Damage Bonus",
"SW5E.BonusSaveForm": "Update Bonuses",
"SW5E.BonusPowerDC": "Global Power DC Bonus",
"SW5E.BonusTitle": "Configure Actor Bonuses",
"SW5E.Bonuses": "Global Bonuses",
"SW5E.BonusesHint": "Define global bonuses as formulas which are added to certain rolls. For example: 1d4 + 2",
"SW5E.BonusesInstructions": "Configure character bonuses which are added to the appropriate dice roll",
"SW5E.ChallengeRating": "Challenge Rating",
"SW5E.Charged": "Charged",
"SW5E.Charges": "Charges",
"SW5E.ChatContextDamage": "Apply Damage",
"SW5E.ChatContextHealing": "Apply Healing",
"SW5E.ChatContextDoubleDamage": "Apply Double Damage",
"SW5E.ChatContextHalfDamage": "Apply Half Damage",
"SW5E.ChatFlavor": "Chat Message Flavor",
"SW5E.ClassLevels": "Class Levels",
"SW5E.ClassName": "Class Name",
"SW5E.ClassSkillsNumber": "Number of Starting Skills",
"SW5E.ClassSkillsChosen": "Chosen Class Skills",
"SW5E.ComponentMaterial": "Material",
"SW5E.ComponentSomatic": "Somatic",
"SW5E.ComponentVerbal": "Verbal",
"SW5E.ConBlinded": "Blinded",
"SW5E.ConCharmed": "Charmed",
"SW5E.ConDeafened": "Deafened",
"SW5E.ConExhaustion": "Exhaustion",
"SW5E.ConFrightened": "Frightened",
"SW5E.ConGrappled": "Grappled",
"SW5E.ConImm": "Condition Immunities",
"SW5E.ConIncapacitated": "Incapacitated",
"SW5E.ConInvisible": "Invisible",
"SW5E.ConParalyzed": "Paralyzed",
"SW5E.ConPetrified": "Petrified",
"SW5E.ConPoisoned": "Poisoned",
"SW5E.ConProne": "Prone",
"SW5E.ConRestrained": "Restrained",
"SW5E.ConShocked": "Shocked",
"SW5E.ConStunned": "Stunned",
"SW5E.ConUnconscious": "Unconscious",
"SW5E.Concentration": "Concentration",
"SW5E.ConsumableFood": "Food",
"SW5E.ConsumablePoison": "Poison",
"SW5E.ConsumableAdrenal": "Adrenal",
"SW5E.ConsumableExplosive": "Explosive",
"SW5E.ConsumableMedpac": "Medpac",
"SW5E.ConsumableTrinket": "Trinket",
"SW5E.ConsumableTechnology": "Technology",
"SW5E.ConsumableAmmunition": "Ammunition",
"SW5E.Consumed": "Consumed",
"SW5E.CostGP": "Cost (GP)",
"SW5E.Critical": "Critical",
"SW5E.CriticalHit": "Critical Hit",
"SW5E.Currency": "Currency",
"SW5E.CurrencyConvert": "Convert All Currency",
"SW5E.CurrencyConvertHint": "Convert all carried currency to the highest possible denomination to reduce the amount of coinage carried by the character. Be wary, this action cannot be undone.",
"SW5E.CurrencyGC": "Credits",
"SW5E.DamImm": "Damage Immunities",
"SW5E.DamRes": "Damage Resistances",
"SW5E.DamVuln": "Damage Vulnerabilities",
"SW5E.Damage": "Damage",
"SW5E.DamageAcid": "Acid",
"SW5E.DamageCold": "Cold",
"SW5E.DamageEnergy": "Energy",
"SW5E.DamageFire": "Fire",
"SW5E.DamageForce": "Force",
"SW5E.DamageIon": "ION",
"SW5E.DamageKinetic": "Kinetic",
"SW5E.DamageLightning": "Lightning",
"SW5E.DamageNecrotic": "Necrotic",
"SW5E.DamagePoison": "Poison",
"SW5E.DamagePsychic": "Psychic",
"SW5E.DamageSonic": "Sonic",
"SW5E.Day": "Day",
"SW5E.DeathSave": "Death Saves",
"SW5E.Default": "Default",
"SW5E.DefaultAbilityCheck": "Default Ability Check",
"SW5E.Description": "Description",
"SW5E.Details": "Details",
"SW5E.Disadvantage": "Disadvantage",
"SW5E.DistAny": "Any",
"SW5E.DistFt": "Feet",
"SW5E.DistMi": "Miles",
"SW5E.DistSelf": "Self",
"SW5E.DistTouch": "Touch",
"SW5E.Duration": "Duration",
"SW5E.EquipmentBonus": "Magical Bonus",
"SW5E.EquipmentClothing": "Clothing",
"SW5E.EquipmentHeavy": "Heavy Armor",
"SW5E.EquipmentLight": "Light Armor",
"SW5E.EquipmentMedium": "Medium Armor",
"SW5E.EquipmentNatural": "Natural Armor",
"SW5E.EquipmentShield": "Shield",
"SW5E.EquipmentShieldProficiency": "Shields",
"SW5E.EquipmentTrinket": "Trinket",
"SW5E.Equipped": "Equipped",
"SW5E.Exhaustion": "Exhaustion",
"SW5E.Expertise": "Expertise",
"SW5E.FeatureActionRecharge": "Action Recharge",
"SW5E.ItemTypeClass": "Class",
"SW5E.ItemTypeClassPl": "Class Levels",
"SW5E.ItemTypeConsumable": "Consumable",
"SW5E.ItemTypeConsumablePl": "Consumables",
"SW5E.ItemTypeContainer": "Container",
"SW5E.ItemTypeContainerPl": "Containers",
"SW5E.ItemTypeEquipment": "Equipment",
"SW5E.ItemTypeEquipmentPl": "Equipment",
"SW5E.ItemTypeLoot": "Loot",
"SW5E.ItemTypeLootPl": "Loot",
"SW5E.ItemTypeSpecies": "Species",
"SW5E.ItemTypeSpeciesPl": "Species",
"SW5E.ItemTypeTool": "Tool",
"SW5E.ItemTypeToolPl": "Tools",
"SW5E.ItemTypePower": "Power",
"SW5E.ItemTypePowerPl": "Powers",
"SW5E.ItemTypeWeapon": "Weapon",
"SW5E.ItemTypeWeaponPl": "Weapons",
"SW5E.FeatureActive": "Active Abilities",
"SW5E.FeatureAdd": "Create Feature",
"SW5E.FeatureAttack": "Feature Attack",
"SW5E.FeaturePassive": "Passive Abilities",
"SW5E.FeatureRechargeOn": "Recharge On",
"SW5E.FeatureRechargeResult": "1d6 Result",
"SW5E.FeatureUsage": "Feature Usage",
"SW5E.Features": "Features",
"SW5E.Filter": "Filter",
"SW5E.FilterNoPowers": "No powers found for this set of filters.",
"SW5E.NoPowerLevels": "This character has no powercaster levels, but you may add powers manually.",
"SW5E.FlagsInstructions": "Configure character features and traits which fine-tune behaviors of the SW5e system.",
"SW5E.FlagsSave": "Update Special Traits",
"SW5E.FlagsTitle": "Configure Special Traits",
"SW5E.Flat": "Flat",
"SW5E.Formula": "Formula",
"SW5E.GrantedAbilities": "Granted Abilities",
"SW5E.HalfProficient": "Half Proficient",
"SW5E.Healing": "Healing",
"SW5E.HealingTemp": "Healing (Temporary)",
"SW5E.Health": "Health",
"SW5E.HealthFormula": "Health Formula",
"SW5E.HitDice": "Hit Dice",
"SW5E.HitDiceUsed": "Hit Dice Used",
"SW5E.Identified": "Identified",
"SW5E.Initiative": "Initiative",
"SW5E.Inspiration": "Inspiration",
"SW5E.Inventory": "Inventory",
"SW5E.ItemActionType": "Action Type",
"SW5E.ItemActivationCondition": "Activation Condition",
"SW5E.ItemActivationCost": "Activation Cost",
"SW5E.ItemAttackBonus": "Attack Roll Bonus",
"SW5E.ItemConsumableActivation": "Consumable Activation",
"SW5E.ItemConsumableDetails": "Consumable Details",
"SW5E.ItemConsumableStatus": "Consumable Status",
"SW5E.ItemConsumableType": "Consumable Type",
"SW5E.ItemConsumableUsage": "Consumable Usage",
"SW5E.ItemConsumeOnUse": "Consume on Use",
"SW5E.ItemContainerCapacity": "Capacity",
"SW5E.ItemContainerCapacityItems": "Items",
"SW5E.ItemContainerCapacityType": "Capacity Type",
"SW5E.ItemContainerCapacityWeight": "Weight",
"SW5E.ItemContainerDetails": "Container Details",
"SW5E.ItemContainerProperties": "Container Properties",
"SW5E.ItemContainerWeightless": "Weightless Contents",
"SW5E.ItemCreate": "Create Item",
"SW5E.ItemDelete": "Delete Item",
"SW5E.ItemDestroyEmpty": "Destroy on Empty",
"SW5E.ItemEdit": "Edit Item",
"SW5E.ItemEquipmentAction": "Equipment Action",
"SW5E.ItemEquipmentDetails": "Equipment Details",
"SW5E.ItemEquipmentDexMod": "Max. Dexterity Modifier",
"SW5E.ItemEquipmentStatus": "Equipment Status",
"SW5E.ItemEquipmentStealthDisav": "Imposes Stealth Disadvantage",
"SW5E.ItemEquipmentType": "Equipment Type",
"SW5E.ItemEquipmentUsage": "Equipment Usage",
"SW5E.ItemName": "Item Name",
"SW5E.ItemRequiredStr": "Required Strength",
"SW5E.ItemToolProficiency": "Tool Proficiency",
"SW5E.ItemWeaponAttack": "Weapon Attack",
"SW5E.ItemWeaponDetails": "Weapon Details",
"SW5E.ItemWeaponProperties": "Weapon Properties",
"SW5E.ItemWeaponStatus": "Weapon Status",
"SW5E.ItemWeaponType": "Weapon Type",
"SW5E.ItemWeaponUsage": "Weapon Usage",
"SW5E.JackOfAllTrades": "Jack of all Trades",
"SW5E.LairAct": "Lair Action",
"SW5E.Languages": "Languages",
"SW5E.LanguagesBasic": "Basic",
"SW5E.LanguagesBinary": "Binary",
"SW5E.LanguagesBith": "Bith",
"SW5E.LanguagesBocce": "Bocce",
"SW5E.LanguagesBothese": "Bothese",
"SW5E.LanguagesCartharese": "Catharese",
"SW5E.LanguagesCheunh": "Cheunh",
"SW5E.LanguagesDurese": "Durese",
"SW5E.LanguagesDug": "Dug",
"SW5E.LanguagesEwokese": "Ewokese",
"SW5E.LanguagesGamorrese": "Gamorrese",
"SW5E.LanguagesGeonosian": "Geonosian",
"SW5E.LanguagesHapan": "Hapan",
"SW5E.LanguagesHuttese": "Huttese",
"SW5E.LanguagesJawaese": "Jawaese",
"SW5E.LanguagesKaleesh": "Kaleesh",
"SW5E.LanguagesKaminoan": "Kaminoan",
"SW5E.LanguagesKelDor": "Kel Dor",
"SW5E.LanguagesMandoa": "Mando'a",
"SW5E.LanguagesMonCal": "Mon Cal",
"SW5E.LanguagesPakPak": "Pak Pak",
"SW5E.LanguagesRodese": "Rodese",
"SW5E.LanguagesSith": "Sith",
"SW5E.LanguagesTogruti": "Togruti",
"SW5E.LanguagesDosh": "Dosh",
"SW5E.LanguagesTwileki": "Twi'leki",
"SW5E.LanguagesTusken": "Tusken",
"SW5E.LanguagesShyriiwook": "Shyriiwook",
"SW5E.LanguagesZabraki": "Zabraki",
"SW5E.LanguagesVong": "Vong",
"SW5E.LegAct": "Legd. Actions",
"SW5E.LegRes": "Legd. Resistance",
"SW5E.Level": "Level",
"SW5E.LevelScaling": "Level Scaling",
"SW5E.LimitedUses": "Limited Uses",
"SW5E.LongRest": "Long Rest",
"SW5E.Max": "Max",
"SW5E.Modifier": "Modifier",
"SW5E.Name": "Character Name",
"SW5E.NoCharges": "No Charges",
"SW5E.None": "None",
"SW5E.Normal": "Normal",
"SW5E.NotProficient": "Not Proficient",
"SW5E.OtherFormula": "Other Formula",
"SW5E.PlaceTemplate": "Place Measured Template",
"SW5E.Polymorph": "Polymorph",
"SW5E.PolymorphAcceptSettings": "Custom Settings",
"SW5E.PolymorphKeepBio": "Keep biography",
"SW5E.PolymorphKeepClass": "Keep proficiency bonus (leaves class items in sheet)",
"SW5E.PolymorphKeepFeats": "Keep features",
"SW5E.PolymorphKeepItems": "Keep equipment",
"SW5E.PolymorphKeepMental": "Keep mental ability scores (Int, Wis, Cha)",
"SW5E.PolymorphKeepPhysical": "Keep physical ability scores (Str, Dex, Con)",
"SW5E.PolymorphKeepSaves": "Keep saving throw proficiencies",
"SW5E.PolymorphKeepSkills": "Keep skill proficiencies",
"SW5E.PolymorphKeepPowers": "Keep powers",
"SW5E.PolymorphKeepVision": "Keep vision (character and token)",
"SW5E.PolymorphMergeSaves": "Merge saving throw proficiencies (take the highest)",
"SW5E.PolymorphMergeSkills": "Merge skill proficiencies (take the highest)",
"SW5E.PolymorphPromptTitle": "Transforming Actor",
"SW5E.PolymorphRestoreTransformation": "Restore Transformation",
"SW5E.PolymorphTmpClass": "Temporary Class",
"SW5E.PolymorphTokens": "Transform all linked tokens?",
"SW5E.PolymorphWildShape": "Wild Shape",
"SW5E.Concentrated": "Concentrate",
"SW5E.Price": "Price",
"SW5E.Proficiency": "Proficiency",
"SW5E.Proficient": "Proficient",
"SW5E.Quantity": "Quantity",
"SW5E.Species": "Species",
"SW5E.Range": "Range",
"SW5E.Rarity": "Rarity",
"SW5E.Reaction": "Reaction",
"SW5E.RequiredMaterials": "Required Materials",
"SW5E.Requirements": "Requirements",
"SW5E.ResourcePrimary": "Resource 1",
"SW5E.ResourceSecondary": "Resource 2",
"SW5E.ResourceTertiary": "Resource 3",
"SW5E.RestL": "L. Rest",
"SW5E.RestS": "S. Rest",
"SW5E.Ritual": "Ritual",
"SW5E.Roll": "Roll",
"SW5E.RollExample": "e.g. +1d4",
"SW5E.RollMode": "Roll Mode",
"SW5E.RollSituationalBonus": "Situational Bonus?",
"SW5E.Save": "Save",
"SW5E.ScalingFormula": "Scaling Formula",
"SW5E.SchoolLgt": "Light",
"SW5E.SchoolUni": "Universal",
"SW5E.SchoolDrk": "Dark",
"SW5E.SchoolTec": "Tech",
"SW5E.SchoolEnh": "Enhancement",
"SW5E.SenseBS": "Blindsight",
"SW5E.SenseDV": "Darkvision",
"SW5E.SenseTR": "Truesight",
"SW5E.SenseTS": "Tremorsense",
"SW5E.Senses": "Senses",
"SW5E.ShortRest": "Short Rest",
"SW5E.ShortRestHint": "Take a short rest? On a short rest you may spend remaining Hit Dice and recover primary or secondary resources.",
"SW5E.ShortRestNoHD": "No Hit Dice remaining",
"SW5E.ShortRestSelect": "Select Dice to Roll",
"SW5E.Size": "Size",
"SW5E.SizeGargantuan": "Gargantuan",
"SW5E.SizeHuge": "Huge",
"SW5E.SizeLarge": "Large",
"SW5E.SizeMedium": "Medium",
"SW5E.SizeSmall": "Small",
"SW5E.SizeTiny": "Tiny",
"SW5E.SkillAcr": "Acrobatics",
"SW5E.SkillAni": "Animal Handling",
"SW5E.SkillAth": "Athletics",
"SW5E.SkillDec": "Deception",
"SW5E.SkillIns": "Insight",
"SW5E.SkillInv": "Investigation",
"SW5E.SkillItm": "Intimidation",
"SW5E.SkillLor": "Lore",
"SW5E.SkillMed": "Medicine",
"SW5E.SkillNat": "Nature",
"SW5E.SkillPer": "Persuasion",
"SW5E.SkillPrc": "Perception",
"SW5E.SkillPrf": "Performance",
"SW5E.SkillPil": "Piloting",
"SW5E.SkillSlt": "Sleight of Hand",
"SW5E.SkillSte": "Stealth",
"SW5E.SkillSur": "Survival",
"SW5E.SkillTec": "Technology",
"SW5E.Slots": "Slots",
"SW5E.Source": "Source",
"SW5E.Special": "Special",
"SW5E.SpecialTraits": "Special Traits",
"SW5E.Speed": "Speed",
"SW5E.SpeedSpecial": "Special Movement",
"SW5E.PowerAbility": "Powercasting Ability",
"SW5E.PowerAdd": "Add Power",
"SW5E.PowerAtWill": "At-Will",
"SW5E.PowerCastConsume": "Consume Power Slot?",
"SW5E.PowerCastHint": "Configure how you would like to cast the",
"SW5E.PowerCastNoSlots": "You have no available power slots to cast this power",
"SW5E.PowerCastUpcast": "Cast at Level",
"SW5E.PowercasterLevel": "Powercaster Level",
"SW5E.PowerCastingHeader": "Power Casting",
"SW5E.Powercasting": "Powercasting",
"SW5E.PowerComponents": "Power Components",
"SW5E.PowerCreate": "Create Power",
"SW5E.PowerDC": "Power DC",
"SW5E.PowerDetails": "Power Details",
"SW5E.PowerEffects": "Power Effects",
"SW5E.PowerLevel": "Power Level",
"SW5E.PowerLevel0": "At-Will",
"SW5E.PowerLevel1": "1st Level",
"SW5E.PowerLevel2": "2nd Level",
"SW5E.PowerLevel3": "3rd Level",
"SW5E.PowerLevel4": "4th Level",
"SW5E.PowerLevel5": "5th Level",
"SW5E.PowerLevel6": "6th Level",
"SW5E.PowerLevel7": "7th Level",
"SW5E.PowerLevel8": "8th Level",
"SW5E.PowerLevel9": "9th Level",
"SW5E.PowerLevelPact": "Pact Slot",
"SW5E.PowerMaterials": "Powercasting Materials",
"SW5E.PowerName": "Power Name",
"SW5E.PowerNone": "None",
"SW5E.PowerPrepAtWill": "At-Will",
"SW5E.PowerPrepInnate": "Innate Powercasting",
"SW5E.PowerPrepPrepared": "Prepared",
"SW5E.PowerPrepAlways": "Always Prepared",
"SW5E.PowerConcentrationMode": "Power Concentration Mode",
"SW5E.PowerConcentrating": "Concentrating",
"SW5E.PowerProgArt": "Artificer",
"SW5E.PowerProgFull": "Full Caster",
"SW5E.PowerProgOverride": "Override slots",
"SW5E.PowerProgression": "Power Progression",
"SW5E.PowerSchool": "Power School",
"SW5E.PowerTarget": "Power Target",
"SW5E.PowerUnprepared": "Unprepared",
"SW5E.PowerUsage": "Power Usage",
"SW5E.Powerbook": "Powerbook",
"SW5E.SpeciesTraits": "Species Traits",
"SW5E.SubclassName": "Subclass Name",
"SW5E.Supply": "Supply",
"SW5E.Target": "Target",
"SW5E.TargetAlly": "Ally",
"SW5E.TargetCone": "Cone",
"SW5E.TargetCreature": "Creature",
"SW5E.TargetCube": "Cube",
"SW5E.TargetCylinder": "Cylinder",
"SW5E.TargetEnemy": "Enemy",
"SW5E.TargetLine": "Line",
"SW5E.TargetObject": "Object",
"SW5E.TargetRadius": "Radius",
"SW5E.TargetSelf": "Self",
"SW5E.TargetSpace": "Space",
"SW5E.TargetSphere": "Sphere",
"SW5E.TargetSquare": "Square",
"SW5E.TargetWall": "Wall",
"SW5E.TargetDroid": "Droid",
"SW5E.Temp": "Temp",
"SW5E.TimeDay": "Days",
"SW5E.TimeHour": "Hours",
"SW5E.TimeInst": "Instantaneous",
"SW5E.TimeMinute": "Minutes",
"SW5E.TimeMonth": "Months",
"SW5E.TimePerm": "Permanent",
"SW5E.TimeRound": "Rounds",
"SW5E.TimeTurn": "Turns",
"SW5E.TimeYear": "Years",
"SW5E.ToolArmormech": "Armormech's Tools",
"SW5E.ToolArmstech": "Armstech's Tools",
"SW5E.ToolArtificer": "Artificer's Tools",
"SW5E.ToolArtist": "Artist's Tools",
"SW5E.ToolAstrotech": "Astrotech's Tools",
"SW5E.ToolBiotech": "Biotech's Tools",
"SW5E.ToolConstructor": "Constructor's Tools",
"SW5E.ToolCybertech": "Cybertech's Tools",
"SW5E.ToolJeweler": "Jeweler's Tools",
"SW5E.ToolSurveyor": "Surveyor's Tools",
"SW5E.ToolSynthweaver": "Synthweavers's Tools",
"SW5E.ToolTinker": "Tinker's Tools",
"SW5E.ToolAntitoxkit": "Antitoxkit",
"SW5E.ToolArchaeologistKit": "Archaeologist Kit",
"SW5E.ToolAudiotechKit": "Audiotech's Kit",
"SW5E.ToolBioanalysisKit": "Bioanalysis Kit",
"SW5E.ToolBrewerKit": "Brewer's Kit",
"SW5E.ToolChefKit": "Chef's Kit",
"SW5E.ToolDemolitionKit": "Demolition Kit",
"SW5E.ToolDisguiseKit": "Disguise Kit",
"SW5E.ToolForgeryKit": "Forgery Kit",
"SW5E.ToolMechanicKit": "Mechanic's Kit",
"SW5E.ToolMunitionsKit": "Munitions Kit",
"SW5E.ToolPoisonKit": "Poisoner's Kit",
"SW5E.ToolScavengingKit": "Scavenging Kit",
"SW5E.ToolSecurityKit": "Security Kit",
"SW5E.ToolSlicerKit": "Slicer's Kit",
"SW5E.ToolSpiceKit": "Spicer's Kit",
"SW5E.ToolGamingSet": "Gaming Set",
"SW5E.ToolMusicalInstrument": "Musical Instrument",
"SW5E.ToolVehicle": "Vehicle (Land or Water)",
"SW5E.TraitArmorProf": "Armor Proficiencies",
"SW5E.TraitSelectorSpecial": "Special (Split with Semi-Colon)",
"SW5E.TraitToolProf": "Tool Proficiencies",
"SW5E.TraitWeaponProf": "Weapon Proficiencies",
"SW5E.Type": "Type",
"SW5E.Unequipped": "Not Equipped",
"SW5E.Unlimited": "Unlimited",
"SW5E.Usage": "Usage",
"SW5E.Use": "Use",
"SW5E.Uses": "Uses",
"SW5E.Versatile": "Versatile",
"SW5E.VersatileDamage": "Versatile Damage",
"SW5E.VsDC": "vs DC.",
"SW5E.WeaponAmmo": "Ammunition",
"SW5E.WeaponImprov": "Improvised",
"SW5E.WeaponMartialVW": "Martial Vibroweapon",
"SW5E.WeaponMartialProficiency": "Martial Weapons",
"SW5E.WeaponMartialB": "Martial Blaster",
"SW5E.WeaponMartialLW": "Martial Lightweapon",
"SW5E.WeaponNatural": "Natural",
"SW5E.WeaponPropertiesAmm": "Ammunition",
"SW5E.WeaponPropertiesBur": "Burst",
"SW5E.WeaponPropertiesDef": "Defensive",
"SW5E.WeaponPropertiesDex": "Dexterity Rqmt.",
"SW5E.WeaponPropertiesDrm": "Disarming",
"SW5E.WeaponPropertiesDgd": "Disguised",
"SW5E.WeaponPropertiesDis": "Disintegrate",
"SW5E.WeaponPropertiesDpt": "Disruptive",
"SW5E.WeaponPropertiesDou": "Double",
"SW5E.WeaponPropertiesFin": "Finesse",
"SW5E.WeaponPropertiesFix": "Fixed",
"SW5E.WeaponPropertiesFoc": "Focus",
"SW5E.WeaponPropertiesHvy": "Heavy",
"SW5E.WeaponPropertiesHid": "Hidden",
"SW5E.WeaponPropertiesKen": "Keen",
"SW5E.WeaponPropertiesLgt": "Light",
"SW5E.WeaponPropertiesLum": "Luminous",
"SW5E.WeaponPropertiesPic": "Piercing",
"SW5E.WeaponPropertiesRan": "Range",
"SW5E.WeaponPropertiesRap": "Rapid",
"SW5E.WeaponPropertiesRch": "Reach",
"SW5E.WeaponPropertiesRel": "Reload",
"SW5E.WeaponPropertiesRet": "Returning",
"SW5E.WeaponPropertiesShk": "Shocking",
"SW5E.WeaponPropertiesSpc": "Special",
"SW5E.WeaponPropertiesStr": "Strength Rqmt.",
"SW5E.WeaponPropertiesThr": "Thrown",
"SW5E.WeaponPropertiesTwo": "Two-Handed",
"SW5E.WeaponPropertiesVer": "Versatile",
"SW5E.WeaponPropertiesVic": "Vicious",
"SW5E.WeaponSimpleVW": "Simple Vibroweapon",
"SW5E.WeaponSimpleProficiency": "Simple Weapons",
"SW5E.WeaponSimpleB": "Simple Blaster",
"SW5E.WeaponSimpleLW": "Simple Lightweapon",
"SW5E.Weight": "Weight",
"SW5E.available": "available",
"SW5E.description": "A comprehensive game system for running games of Dungeons & Dragons 5th Edition in the Foundry VTT environment.",
"SW5E.of": "of",
"SW5E.power": "power",
"SETTINGS.5eAllowPolymorphingL": "Allow players to polymorph their own actors.",
"SETTINGS.5eAllowPolymorphingN": "Allow Polymorphing",
"SETTINGS.5eAutoCollapseCardL": "Automatically collapse Item Card descriptions in the Chat Log",
"SETTINGS.5eAutoCollapseCardN": "Collapse Item Cards in Chat",
"SETTINGS.5eAutoPowerTemplateL": "When a power is cast, defaults to begin the process to create the corresponding Measured Template if any (requires TRUSTED or higher player role)",
"SETTINGS.5eAutoPowerTemplateN": "Always place Power Template",
"SETTINGS.5eCurWtL": "Carried currency affects character encumbrance following the rules on PHB pg. 143.",
"SETTINGS.5eCurWtN": "Apply Currency Weight",
"SETTINGS.5eDiagDMG": "Dungeon Master's Guide (5/10/5)",
"SETTINGS.5eDiagL": "Configure which diagonal movement rule should be used for games within this system.",
"SETTINGS.5eDiagN": "Diagonal Movement Rule",
"SETTINGS.5eDiagPHB": "Player's Handbook (5/5/5)",
"SETTINGS.5eInitTBL": "Append the raw Dexterity ability score to break ties in Initiative.",
"SETTINGS.5eInitTBN": "Initiative Dexterity Tiebreaker",
"SETTINGS.5eNoExpL": "Remove experience bars from character sheets.",
"SETTINGS.5eNoExpN": "Disable Experience Tracking"
}

View file

@ -626,36 +626,106 @@ SW5E.conditionTypes = {
// Languages
SW5E.languages = {
"aleena": "SW5E.LanguagesAleena",
"antarian": "SW5E.LanguagesAntarian",
"anzellan": "SW5E.LanguagesAnzellan",
"aqualish": "SW5E.LanguagesAqualish",
"ardennian": "SW5E.LanguagesArdennian",
"balosur": "SW5E.LanguagesBalosur",
"barabel": "SW5E.LanguagesBarabel",
"basic": "SW5E.LanguagesBasic",
"besalisk": "SW5E.LanguagesBesalisk",
"binary": "SW5E.LanguagesBinary",
"bith": "SW5E.LanguagesBith",
"bocce": "SW5E.LanguagesBocce",
"bothese": "SW5E.LanguagesBothese",
"catharese": "SW5E.LanguagesCartharese",
"cerean": "SW5E.LanguagesCerean",
"chadra-fan": "SW5E.LanguagesChadra-Fan",
"chagri": "SW5E.LanguagesChagri",
"cheunh": "SW5E.LanguagesCheunh",
"chevin": "SW5E.LanguagesChevin",
"chironan": "SW5E.LanguagesChironan",
"clawdite": "SW5E.LanguagesClawdite",
"codruese": "SW5E.LanguagesCodruese",
"colicoid": "SW5E.LanguagesColicoid",
"dashadi": "SW5E.LanguagesDashadi",
"defel": "SW5E.LanguagesDefel",
"devaronese": "SW5E.LanguagesDevaronese",
"dosh": "SW5E.LanguagesDosh",
"draethos": "SW5E.LanguagesDraethos",
"durese": "SW5E.LanguagesDurese",
"dug": "SW5E.LanguagesDug",
"ewokese": "SW5E.LanguagesEwokese",
"falleen": "SW5E.LanguagesFalleen",
"felucianese": "SW5E.LanguagesFelucianese",
"gamorrese": "SW5E.LanguagesGamorrese",
"gand": "SW5E.LanguagesGand",
"geonosian": "SW5E.LanguagesGeonosian",
"givin": "SW5E.LanguagesGivin",
"gran": "SW5E.LanguagesGran",
"gungan": "SW5E.LanguagesGungan",
"hapan": "SW5E.LanguagesHapan",
"harchese": "SW5E.LanguagesHarchese",
"herglese": "SW5E.LanguagesHerglese",
"honoghran": "SW5E.LanguagesHonoghran",
"huttese": "SW5E.LanguagesHuttese",
"iktotchese": "SW5E.LanguagesIktotchese",
"ithorese": "SW5E.LanguagesIthorese",
"jawaese": "SW5E.LanguagesJawaese",
"kaleesh": "SW5E.LanguagesKaleesh",
"kaminoan": "SW5E.LanguagesKaminoan",
"karkaran": "SW5E.LanguagesKarkaran",
"keldor": "SW5E.LanguagesKelDor",
"kharan": "SW5E.LanguagesKharan",
"killik": "SW5E.LanguagesKillik",
"klatooinian": "SW5E.LanguagesKlatooinian",
"kubazian": "SW5E.LanguagesKubazian",
"kushiban": "SW5E.LanguagesKushiban",
"kyuzo": "SW5E.LanguagesKyuzo",
"lannik": "SW5E.LanguagesLannik",
"lasat": "SW5E.LanguagesLasat",
"lowickese": "SW5E.LanguagesLowickese",
"mandoa": "SW5E.LanguagesMandoa",
"miralukese": "SW5E.LanguagesMiralukese",
"mirialan": "SW5E.LanguagesMirialan",
"moncal": "SW5E.LanguagesMonCal",
"mustafarian": "SW5E.LanguagesMustafarian",
"muun": "SW5E.LanguagesMuun",
"nautila": "SW5E.LanguagesNautila",
"ortolan": "SW5E.LanguagesOrtolan",
"pakpak": "SW5E.LanguagesPakPak",
"pyke": "SW5E.LanguagesPyke",
"quarrenese": "SW5E.LanguagesQuarrenese",
"rakata": "SW5E.LanguagesRakata",
"rattataki": "SW5E.LanguagesRattataki",
"rishii": "SW5E.LanguagesRishii",
"rodese": "SW5E.LanguagesRodese",
"selkatha": "SW5E.LanguagesSelkatha",
"semblan": "SW5E.LanguagesSemblan",
"shistavanen": "SW5E.LanguagesShistavanen",
"shyriiwook": "SW5E.LanguagesShyriiwook",
"sith": "SW5E.LanguagesSith",
"squibbian": "SW5E.LanguagesSquibbian",
"sriluurian": "SW5E.LanguagesSriluurian",
"ssi-ruuvi": "SW5E.LanguagesSsi-ruuvi",
"sullustese": "SW5E.LanguagesSullustese",
"talzzi": "SW5E.LanguagesTalzzi",
"thisspiasian": "SW5E.LanguagesThisspiasian",
"togorese": "SW5E.LanguagesTogorese",
"togruti": "SW5E.LanguagesTogruti",
"dosh": "SW5E.LanguagesDosh",
"twi'leki": "SW5E.LanguagesTwileki",
"toydarian": "SW5E.LanguagesToydarian",
"tusken": "SW5E.LanguagesTusken",
"shyriiwook": "SW5E.LanguagesShyriiwook",
"twi'leki": "SW5E.LanguagesTwileki",
"ugnaught": "SW5E.LanguagesUgnaught",
"umbaran": "SW5E.LanguagesUmbaran",
"utapese": "SW5E.LanguagesUtapese",
"verpine": "SW5E.LanguagesVerpine",
"vong": "SW5E.LanguagesVong",
"voss": "SW5E.LanguagesVoss",
"yevethan": "SW5E.LanguagesYevethan",
"zabraki": "SW5E.LanguagesZabraki",
"vong": "SW5E.LanguagesVong"
"zygerrian": "SW5E.LanguagesZygerrian"
};
// Character Level XP Requirements

839
module/config.js.bak Normal file
View file

@ -0,0 +1,839 @@
// Namespace D&D5e Configuration Values
export const SW5E = {};
// ASCII Artwork
SW5E.ASCII = `_______________________________
_
| |
___| |_ __ _ _ ____ ____ _ _ __ ___
/ __| __/ _\ | |__\ \ /\ / / _\ | |__/ __|
\__ \ || (_) | | \ V V / (_) | | \__ \
|___/\__\__/_|_| \_/\_/ \__/_|_| |___/
_______________________________`;
/**
* The set of Ability Scores used within the system
* @type {Object}
*/
SW5E.abilities = {
"str": "SW5E.AbilityStr",
"dex": "SW5E.AbilityDex",
"con": "SW5E.AbilityCon",
"int": "SW5E.AbilityInt",
"wis": "SW5E.AbilityWis",
"cha": "SW5E.AbilityCha"
};
/* -------------------------------------------- */
/**
* Character alignment options
* @type {Object}
*/
SW5E.alignments = {
'll': "SW5E.AlignmentLL",
'nl': "SW5E.AlignmentNL",
'cl': "SW5E.AlignmentCL",
'lb': "SW5E.AlignmentLB",
'bn': "SW5E.AlignmentBN",
'cb': "SW5E.AlignmentCB",
'ld': "SW5E.AlignmentLD",
'nd': "SW5E.AlignmentND",
'cd': "SW5E.AlignmentCD"
};
SW5E.weaponProficiencies = {
"sim": "SW5E.WeaponSimpleProficiency",
"bla": "SW5E.WeaponBlasterProficiency"
};
SW5E.toolProficiencies = {
"armor": "SW5E.ToolArmormech",
"arms": "SW5E.ToolArmstech",
"arti": "SW5E.ToolArtificer",
"art": "SW5E.ToolArtist",
"astro": "SW5E.ToolAstrotech",
"bio": "SW5E.ToolBiotech",
"con": "SW5E.ToolConstructor",
"cyb": "SW5E.ToolCybertech",
"jew": "SW5E.ToolJeweler",
"sur": "SW5E.ToolSurveyor",
"syn": "SW5E.ToolSynthweaver",
"tin": "SW5E.ToolTinker",
"ant": "SW5E.ToolAntitoxkit",
"arc": "SW5E.ToolArchaeologistKit",
"aud": "SW5E.ToolAudiotechKit",
"bioa": "SW5E.ToolBioanalysisKit",
"brew": "SW5E.ToolBrewerKit",
"chef": "SW5E.ToolChefKit",
"demo": "SW5E.ToolDemolitionKit",
"disg": "SW5E.ToolDisguiseKit",
"forg": "SW5E.ToolForgeryKit",
"mech": "SW5E.ToolMechanicKit",
"game": "SW5E.ToolGamingSet",
"poi": "SW5E.ToolPoisonKit",
"scav": "SW5E.ToolScavengingKit",
"secur": "SW5E.ToolSecurityKit",
"slic": "SW5E.ToolSlicerKit",
"spice": "SW5E.ToolSpiceKit",
"music": "SW5E.ToolMusicalInstrument",
"vehicle": "SW5E.ToolVehicle"
};
/* -------------------------------------------- */
/**
* This Object defines the various lengths of time which can occur in D&D5e
* @type {Object}
*/
SW5E.timePeriods = {
"inst": "SW5E.TimeInst",
"turn": "SW5E.TimeTurn",
"round": "SW5E.TimeRound",
"minute": "SW5E.TimeMinute",
"hour": "SW5E.TimeHour",
"day": "SW5E.TimeDay",
"month": "SW5E.TimeMonth",
"year": "SW5E.TimeYear",
"perm": "SW5E.TimePerm",
"spec": "SW5E.Special"
};
/* -------------------------------------------- */
/**
* This describes the ways that an ability can be activated
* @type {Object}
*/
SW5E.abilityActivationTypes = {
"none": "SW5E.None",
"action": "SW5E.Action",
"bonus": "SW5E.BonusAction",
"reaction": "SW5E.Reaction",
"minute": SW5E.timePeriods.minute,
"hour": SW5E.timePeriods.hour,
"day": SW5E.timePeriods.day,
"special": SW5E.timePeriods.spec,
"legendary": "SW5E.LegAct",
"lair": "SW5E.LairAct"
};
/* -------------------------------------------- */
// Creature Sizes
SW5E.actorSizes = {
"tiny": "SW5E.SizeTiny",
"sm": "SW5E.SizeSmall",
"med": "SW5E.SizeMedium",
"lg": "SW5E.SizeLarge",
"huge": "SW5E.SizeHuge",
"grg": "SW5E.SizeGargantuan"
};
SW5E.tokenSizes = {
"tiny": 1,
"sm": 1,
"med": 1,
"lg": 2,
"huge": 3,
"grg": 4
};
/* -------------------------------------------- */
/**
* Classification types for item action types
* @type {Object}
*/
SW5E.itemActionTypes = {
"mwak": "SW5E.ActionMWAK",
"rwak": "SW5E.ActionRWAK",
"mpak": "SW5E.ActionMPAK",
"rpak": "SW5E.ActionRPAK",
"save": "SW5E.ActionSave",
"heal": "SW5E.ActionHeal",
"abil": "SW5E.ActionAbil",
"util": "SW5E.ActionUtil",
"other": "SW5E.ActionOther"
};
/* -------------------------------------------- */
SW5E.itemCapacityTypes = {
"items": "SW5E.ItemContainerCapacityItems",
"weight": "SW5E.ItemContainerCapacityWeight"
};
/* -------------------------------------------- */
/**
* Enumerate the lengths of time over which an item can have limited use ability
* @type {Object}
*/
SW5E.limitedUsePeriods = {
"sr": "SW5E.ShortRest",
"lr": "SW5E.LongRest",
"day": "SW5E.Day",
"charges": "SW5E.Charges"
};
/* -------------------------------------------- */
/**
* The set of equipment types for armor, clothing, and other objects which can ber worn by the character
* @type {Object}
*/
SW5E.equipmentTypes = {
"light": "SW5E.EquipmentLight",
"medium": "SW5E.EquipmentMedium",
"heavy": "SW5E.EquipmentHeavy",
"bonus": "SW5E.EquipmentBonus",
"natural": "SW5E.EquipmentNatural",
"shield": "SW5E.EquipmentShield",
"clothing": "SW5E.EquipmentClothing",
"trinket": "SW5E.EquipmentTrinket"
};
/* -------------------------------------------- */
/**
* The set of Armor Proficiencies which a character may have
* @type {Object}
*/
SW5E.armorProficiencies = {
"lgt": SW5E.equipmentTypes.light,
"med": SW5E.equipmentTypes.medium,
"hvy": SW5E.equipmentTypes.heavy,
"shl": "SW5E.EquipmentShieldProficiency"
};
/* -------------------------------------------- */
/**
* Enumerate the valid consumable types which are recognized by the system
* @type {Object}
*/
SW5E.consumableTypes = {
"adrenal": "SW5E.ConsumableAdrenal",
"poison": "SW5E.ConsumablePoison",
"explosive": "SW5E.ConsumableExplosive",
"food": "SW5E.ConsumableFood",
"medpac": "SW5E.ConsumableMedpac",
"technology": "SW5E.ConsumableTechnology",
"ammunition": "SW5E.ConsumableAmmunition",
"trinket": "SW5E.ConsumableTrinket"
};
/* -------------------------------------------- */
/**
* The valid currency denominations supported by the 5e system
* @type {Object}
*/
SW5E.currencies = {
"CR": "SW5E.CurrencyCR",
};
/* -------------------------------------------- */
// Damage Types
SW5E.damageTypes = {
"acid": "SW5E.DamageAcid",
"cold": "SW5E.DamageCold",
"energy": "SW5E.DamageEnergy",
"fire": "SW5E.DamageFire",
"force": "SW5E.DamageForce",
"ion": "SW5E.DamageIon",
"kinetic": "SW5E.DamageKinetic",
"lightning": "SW5E.DamageLightning",
"necrotic": "SW5E.DamageNecrotic",
"poison": "SW5E.DamagePoison",
"psychic": "SW5E.DamagePsychic",
"Sonic": "SW5E.DamageSonic"
};
/* -------------------------------------------- */
// armor Types
SW5E.armorpropertiesTypes = {
"Absorptive": "SW5E.ArmorProperAbsorptive",
"Agile": "SW5E.ArmorProperAgile",
"Anchor": "SW5E.ArmorProperAnchor",
"Avoidant": "SW5E.ArmorProperAvoidant",
"Barbed": "SW5E.ArmorProperBarbed",
"Charging": "SW5E.ArmorProperCharging",
"Concealing": "SW5E.ArmorProperConcealing",
"Cumbersome": "SW5E.ArmorProperCumbersome",
"Gauntleted": "SW5E.ArmorProperGauntleted",
"Imbalanced": "SW5E.ArmorProperImbalanced",
"Impermeable": "SW5E.ArmorProperImpermeable",
"Insulated": "SW5E.ArmorProperInsulated",
"Interlocking": "SW5E.ArmorProperInterlocking",
"Lambent": "SW5E.ArmorProperLambent",
"Lightweight": "SW5E.ArmorProperLightweight",
"Magnetic": "SW5E.ArmorProperMagnetic",
"Obscured": "SW5E.ArmorProperObscured",
"Powered": "SW5E.ArmorProperPowered",
"Reactive": "SW5E.ArmorProperReactive",
"Regulated": "SW5E.ArmorProperRegulated",
"Reinforced": "SW5E.ArmorProperReinforced",
"Responsive": "SW5E.ArmorProperResponsive",
"Rigid": "SW5E.ArmorProperRigid",
"Silent": "SW5E.ArmorProperSilent",
"Spiked": "SW5E.ArmorProperSpiked",
"Steadfast": "SW5E.ArmorProperSteadfast",
"Versatile": "SW5E.ArmorProperVersatile"
};
/* -------------------------------------------- */
SW5E.distanceUnits = {
"none": "SW5E.None",
"self": "SW5E.DistSelf",
"touch": "SW5E.DistTouch",
"ft": "SW5E.DistFt",
"mi": "SW5E.DistMi",
"spec": "SW5E.Special",
"any": "SW5E.DistAny"
};
/* -------------------------------------------- */
/**
* Configure aspects of encumbrance calculation so that it could be configured by modules
* @type {Object}
*/
SW5E.encumbrance = {
currencyPerWeight: 50,
strMultiplier: 15
};
/* -------------------------------------------- */
/**
* This Object defines the types of single or area targets which can be applied in D&D5e
* @type {Object}
*/
SW5E.targetTypes = {
"none": "SW5E.None",
"self": "SW5E.TargetSelf",
"creature": "SW5E.TargetCreature",
"droid": "SW5E.TargetDroid",
"ally": "SW5E.TargetAlly",
"enemy": "SW5E.TargetEnemy",
"object": "SW5E.TargetObject",
"space": "SW5E.TargetSpace",
"radius": "SW5E.TargetRadius",
"sphere": "SW5E.TargetSphere",
"cylinder": "SW5E.TargetCylinder",
"cone": "SW5E.TargetCone",
"square": "SW5E.TargetSquare",
"cube": "SW5E.TargetCube",
"line": "SW5E.TargetLine",
"wall": "SW5E.TargetWall",
};
/* -------------------------------------------- */
/**
* Map the subset of target types which produce a template area of effect
* The keys are SW5E target types and the values are MeasuredTemplate shape types
* @type {Object}
*/
SW5E.areaTargetTypes = {
cone: "cone",
cube: "rect",
cylinder: "circle",
line: "ray",
radius: "circle",
sphere: "circle",
square: "rect",
wall: "ray"
};
/* -------------------------------------------- */
// Healing Types
SW5E.healingTypes = {
"healing": "SW5E.Healing",
"temphp": "SW5E.HealingTemp"
};
/* -------------------------------------------- */
/**
* Enumerate the denominations of hit dice which can apply to classes in the D&D5E system
* @type {Array.<string>}
*/
SW5E.hitDieTypes = ["d6", "d8", "d10", "d12"];
/* -------------------------------------------- */
/**
* Character senses options
* @type {Object}
*/
SW5E.senses = {
"bs": "SW5E.SenseBS",
"dv": "SW5E.SenseDV",
"ts": "SW5E.SenseTS",
"tr": "SW5E.SenseTR"
};
/* -------------------------------------------- */
/**
* The set of skill which can be trained in D&D5e
* @type {Object}
*/
SW5E.skills = {
"acr": "SW5E.SkillAcr",
"ani": "SW5E.SkillAni",
"ath": "SW5E.SkillAth",
"dec": "SW5E.SkillDec",
"ins": "SW5E.SkillIns",
"itm": "SW5E.SkillItm",
"inv": "SW5E.SkillInv",
"lor": "SW5E.SkillLor",
"med": "SW5E.SkillMed",
"nat": "SW5E.SkillNat",
"prc": "SW5E.SkillPrc",
"prf": "SW5E.SkillPrf",
"per": "SW5E.SkillPer",
"pil": "SW5E.SkillPil",
"slt": "SW5E.SkillSlt",
"ste": "SW5E.SkillSte",
"sur": "SW5E.SkillSur",
"tec": "SW5E.SkillTec",
};
/* -------------------------------------------- */
SW5E.powerPreparationModes = {
"always": "SW5E.PowerPrepAlways",
"atwill": "SW5E.PowerPrepAtWill",
"innate": "SW5E.PowerPrepInnate",
"prepared": "SW5E.PowerPrepPrepared"
};
SW5E.powerUpcastModes = ["always"];
SW5E.powerProgression = {
"none": "SW5E.PowerNone",
"full": "SW5E.PowerProgFull",
"artificer": "SW5E.PowerProgArt"
};
/* -------------------------------------------- */
/**
* The available choices for how power damage scaling may be computed
* @type {Object}
*/
SW5E.powerScalingModes = {
"none": "SW5E.PowerNone",
"atwill": "SW5E.PowerAtWill",
"level": "SW5E.PowerLevel"
};
/* -------------------------------------------- */
// Weapon Types
SW5E.weaponTypes = {
"simpleVW": "SW5E.WeaponSimpleVW",
"simpleB": "SW5E.WeaponSimpleB",
"simpleLW": "SW5E.WeaponSimpleLW",
"martialVW": "SW5E.WeaponMartialVW",
"martialB": "SW5E.WeaponMartialB",
"martialLW": "SW5E.WeaponMartialLW",
"natural": "SW5E.WeaponNatural",
"improv": "SW5E.WeaponImprov",
"ammo": "SW5E.WeaponAmmo"
};
/* -------------------------------------------- */
/**
* Define the set of weapon property flags which can exist on a weapon
* @type {Object}
*/
SW5E.weaponProperties = {
"amm": "SW5E.WeaponPropertiesAmm",
"bur": "SW5E.WeaponPropertiesBur",
"def": "SW5E.WeaponPropertiesDef",
"dex": "SW5E.WeaponPropertiesDex",
"drm": "SW5E.WeaponPropertiesDrm",
"dgd": "SW5E.WeaponPropertiesDgd",
"dis": "SW5E.WeaponPropertiesDis",
"dpt": "SW5E.WeaponPropertiesDpt",
"dou": "SW5E.WeaponPropertiesDou",
"hvy": "SW5E.WeaponPropertiesHvy",
"hid": "SW5E.WeaponPropertiesHid",
"fin": "SW5E.WeaponPropertiesFin",
"fix": "SW5E.WeaponPropertiesFix",
"foc": "SW5E.WeaponPropertiesFoc",
"ken": "SW5E.WeaponPropertiesKen",
"lgt": "SW5E.WeaponPropertiesLgt",
"lum": "SW5E.WeaponPropertiesLum",
"pic": "SW5E.WeaponPropertiesPic",
"rap": "SW5E.WeaponPropertiesRap",
"rch": "SW5E.WeaponPropertiesRch",
"rel": "SW5E.WeaponPropertiesRel",
"ret": "SW5E.WeaponPropertiesRet",
"shk": "SW5E.WeaponPropertiesShk",
"spc": "SW5E.WeaponPropertiesSpc",
"str": "SW5E.WeaponPropertiesStr",
"thr": "SW5E.WeaponPropertiesThr",
"two": "SW5E.WeaponPropertiesTwo",
"ver": "SW5E.WeaponPropertiesVer",
"vic": "SW5E.WeaponPropertiesVic"
};
// Power Components
SW5E.powerComponents = {
"V": "SW5E.ComponentVerbal",
"S": "SW5E.ComponentSomatic",
"M": "SW5E.ComponentMaterial"
};
// Power Schools
SW5E.powerSchools = {
"lgt": "SW5E.SchoolLgt",
"uni": "SW5E.SchoolUni",
"drk": "SW5E.SchoolDrk",
"tec": "SW5E.SchoolTec",
"enh": "SW5E.SchoolEnh"
};
// Power Levels
SW5E.powerLevels = {
0: "SW5E.PowerLevel0",
1: "SW5E.PowerLevel1",
2: "SW5E.PowerLevel2",
3: "SW5E.PowerLevel3",
4: "SW5E.PowerLevel4",
5: "SW5E.PowerLevel5",
6: "SW5E.PowerLevel6",
7: "SW5E.PowerLevel7",
8: "SW5E.PowerLevel8",
9: "SW5E.PowerLevel9"
};
/**
* Define the standard slot progression by character level.
* The entries of this array represent the power slot progression for a full power-caster.
* @type {Array[]}
*/
SW5E.SPELL_SLOT_TABLE = [
[2],
[3],
[4, 2],
[4, 3],
[4, 3, 2],
[4, 3, 3],
[4, 3, 3, 1],
[4, 3, 3, 2],
[4, 3, 3, 3, 1],
[4, 3, 3, 3, 2],
[4, 3, 3, 3, 2, 1],
[4, 3, 3, 3, 2, 1],
[4, 3, 3, 3, 2, 1, 1],
[4, 3, 3, 3, 2, 1, 1],
[4, 3, 3, 3, 2, 1, 1, 1],
[4, 3, 3, 3, 2, 1, 1, 1],
[4, 3, 3, 3, 2, 1, 1, 1, 1],
[4, 3, 3, 3, 3, 1, 1, 1, 1],
[4, 3, 3, 3, 3, 2, 1, 1, 1],
[4, 3, 3, 3, 3, 2, 2, 1, 1]
];
/* -------------------------------------------- */
// Polymorph options.
SW5E.polymorphSettings = {
keepPhysical: 'SW5E.PolymorphKeepPhysical',
keepMental: 'SW5E.PolymorphKeepMental',
keepSaves: 'SW5E.PolymorphKeepSaves',
keepSkills: 'SW5E.PolymorphKeepSkills',
mergeSaves: 'SW5E.PolymorphMergeSaves',
mergeSkills: 'SW5E.PolymorphMergeSkills',
keepClass: 'SW5E.PolymorphKeepClass',
keepFeats: 'SW5E.PolymorphKeepFeats',
keepPowers: 'SW5E.PolymorphKeepPowers',
keepItems: 'SW5E.PolymorphKeepItems',
keepBio: 'SW5E.PolymorphKeepBio',
keepVision: 'SW5E.PolymorphKeepVision'
};
/* -------------------------------------------- */
/**
* Skill, ability, and tool proficiency levels
* Each level provides a proficiency multiplier
* @type {Object}
*/
SW5E.proficiencyLevels = {
0: "SW5E.NotProficient",
1: "SW5E.Proficient",
0.5: "SW5E.HalfProficient",
2: "SW5E.Expertise"
};
/* -------------------------------------------- */
// Condition Types
SW5E.conditionTypes = {
"blinded": "SW5E.ConBlinded",
"charmed": "SW5E.ConCharmed",
"deafened": "SW5E.ConDeafened",
"exhaustion": "SW5E.ConExhaustion",
"frightened": "SW5E.ConFrightened",
"grappled": "SW5E.ConGrappled",
"incapacitated": "SW5E.ConIncapacitated",
"invisible": "SW5E.ConInvisible",
"paralyzed": "SW5E.ConParalyzed",
"petrified": "SW5E.ConPetrified",
"poisoned": "SW5E.ConPoisoned",
"prone": "SW5E.ConProne",
"restrained": "SW5E.ConRestrained",
"shocked": "SW5E.ConShocked",
"stunned": "SW5E.ConStunned",
"unconscious": "SW5E.ConUnconscious"
};
// Languages
SW5E.languages = {
"aleena": "SW5E.LanguagesAleena",
"antarian": "SW5E.LanguagesAntarian",
"anzellan": "SW5E.LanguagesAnzellan",
"aqualish": "SW5E.LanguagesAqualish",
"ardennian": "SW5E.LanguagesArdennian",
"balosur": "SW5E.LanguagesBalosur",
"barabel": "SW5E.LanguagesBarabel",
"basic": "SW5E.LanguagesBasic",
"besalisk": "SW5E.LanguagesBesalisk",
"binary": "SW5E.LanguagesBinary",
"bith": "SW5E.LanguagesBith",
"bocce": "SW5E.LanguagesBocce",
"bothese": "SW5E.LanguagesBothese",
"catharese": "SW5E.LanguagesCartharese",
"cerean": "SW5E.LanguagesCerean",
"chadra-fan": "SW5E.LanguagesChadra-Fan",
"chagri": "SW5E.LanguagesChagri",
"cheunh": "SW5E.LanguagesCheunh",
"chevin": "SW5E.LanguagesChevin",
"chironan": "SW5E.LanguagesChironan",
"clawdite": "SW5E.LanguagesClawdite",
"codruese": "SW5E.LanguagesCodruese",
"colicoid": "SW5E.LanguagesColicoid",
"dashadi": "SW5E.LanguagesDashadi",
"defel": "SW5E.LanguagesDefel",
"devaronese": "SW5E.LanguagesDevaronese",
"dosh": "SW5E.LanguagesDosh",
"draethos": "SW5E.LanguagesDraethos",
"durese": "SW5E.LanguagesDurese",
"dug": "SW5E.LanguagesDug",
"ewokese": "SW5E.LanguagesEwokese",
"falleen": "SW5E.LanguagesFalleen",
"felucianese": "SW5E.LanguagesFelucianese",
"gamorrese": "SW5E.LanguagesGamorrese",
"gand": "SW5E.LanguagesGand",
"geonosian": "SW5E.LanguagesGeonosian",
"givin": "SW5E.LanguagesGivin",
"gran": "SW5E.LanguagesGran",
"gungan": "SW5E.LanguagesGungan",
"hapan": "SW5E.LanguagesHapan",
"harchese": "SW5E.LanguagesHarchese",
"herglese": "SW5E.LanguagesHerglese",
"honoghran": "SW5E.LanguagesHonoghran",
"huttese": "SW5E.LanguagesHuttese",
"iktotchese": "SW5E.LanguagesIktotchese",
"ithorese": "SW5E.LanguagesIthorese",
"jawaese": "SW5E.LanguagesJawaese",
"kaleesh": "SW5E.LanguagesKaleesh",
"kaminoan": "SW5E.LanguagesKaminoan",
"karkaran": "SW5E.LanguagesKarkaran",
"keldor": "SW5E.LanguagesKelDor",
"kharan": "SW5E.LanguagesKharan",
"killik": "SW5E.LanguagesKillik",
"klatooinian": "SW5E.LanguagesKlatooinian",
"kubazian": "SW5E.LanguagesKubazian",
"kushiban": "SW5E.LanguagesKushiban",
"kyuzo": "SW5E.LanguagesKyuzo",
"lannik": "SW5E.LanguagesLannik",
"lasat": "SW5E.LanguagesLasat",
"lowickese": "SW5E.LanguagesLowickese",
"mandoa": "SW5E.LanguagesMandoa",
"miralukese": "SW5E.LanguagesMiralukese",
"mirialan": "SW5E.LanguagesMirialan",
"moncal": "SW5E.LanguagesMonCal",
"mustafarian": "SW5E.LanguagesMustafarian",
"muun": "SW5E.LanguagesMuun",
"nautila": "SW5E.LanguagesNautila",
"ortolan": "SW5E.LanguagesOrtolan",
"pakpak": "SW5E.LanguagesPakPak",
"pyke": "SW5E.LanguagesPyke",
"quarrenese": "SW5E.LanguagesQuarrenese",
"rakata": "SW5E.LanguagesRakata",
"rattataki": "SW5E.LanguagesRattataki",
"rishii": "SW5E.LanguagesRishii",
"rodese": "SW5E.LanguagesRodese",
"selkatha": "SW5E.LanguagesSelkatha",
"semblan": "SW5E.LanguagesSemblan",
"shistavanen": "SW5E.LanguagesShistavanen",
"shyriiwook": "SW5E.LanguagesShyriiwook",
"sith": "SW5E.LanguagesSith",
"squibbian": "SW5E.LanguagesSquibbian",
"sriluurian": "SW5E.LanguagesSriluurian",
"ssi-ruuvi": "SW5E.LanguagesSsi-ruuvi",
"sullustese": "SW5E.LanguagesSullustese",
"talzzi": "SW5E.LanguagesTalzzi",
"thisspiasian": "SW5E.LanguagesThisspiasian",
"togorese": "SW5E.LanguagesTogorese",
"togruti": "SW5E.LanguagesTogruti",
"toydarian": "SW5E.LanguagesToydarian",
"tusken": "SW5E.LanguagesTusken",
"twi'leki": "SW5E.LanguagesTwileki",
"ugnaught": "SW5E.LanguagesUgnaught",
"umbaran": "SW5E.LanguagesUmbaran",
"utapese": "SW5E.LanguagesUtapese",
"verpine": "SW5E.LanguagesVerpine",
"vong": "SW5E.LanguagesVong",
"voss": "SW5E.LanguagesVoss",
"yevethan": "SW5E.LanguagesYevethan",
"zabraki": "SW5E.LanguagesZabraki",
"zygerrian": "SW5E.LanguagesZygerrian"
};
// Character Level XP Requirements
SW5E.CHARACTER_EXP_LEVELS = [
0, 300, 900, 2700, 6500, 14000, 23000, 34000, 48000, 64000, 85000, 100000,
120000, 140000, 165000, 195000, 225000, 265000, 305000, 355000]
;
// Challenge Rating XP Levels
SW5E.CR_EXP_LEVELS = [
10, 200, 450, 700, 1100, 1800, 2300, 2900, 3900, 5000, 5900, 7200, 8400, 10000, 11500, 13000, 15000, 18000,
20000, 22000, 25000, 33000, 41000, 50000, 62000, 75000, 90000, 105000, 120000, 135000, 155000
];
// Configure Optional Character Flags
SW5E.characterFlags = {
"detailOriented": {
name: "Detail Oriented",
hint: "You have advantage on Intelligence (Investigation) checks within 5 feet.",
section: "Racial Traits",
type: Boolean
},
"keenSenses": {
name: "Keen Hearing and Smell",
hint: "You have advantage on Wisdom (Perception) checks that involve hearing or smell.",
section: "Racial Traits",
type: Boolean
},
"naturallyStealthy": {
name: "Naturally Stealthy",
hint: "You can attempt to hide even when you are obscured only by a creature that is your size or larger than you.",
section: "Racial Traits",
type: Boolean
},
"nimbleEscape": {
name: "Nimble Escape",
hint: "You can take the Disengage or Hide action as a bonus action.",
section: "Racial Traits",
type: Boolean
},
"powerfulBuild": {
name: "Powerful Build",
hint: "You count as one size larger when determining your carrying capacity and the weight you can push, drag, or lift.",
section: "Racial Traits",
type: Boolean
},
"programmer": {
name: "Programmer",
hint: "Whenever you make an Intelligence (Technology) check related to computers, you are considered to have expertise in the Technology skill.",
section: "Racial Traits",
type: Boolean
},
"techResistance": {
name: "Tech Resistance",
hint: "You have advantage on Dexterity and Intelligence saving throws against tech powers.",
section: "Racial Traits",
type: Boolean
},
"unarmedCombatant": {
name: "Unarmed Combatant",
hint: "Your unarmed strikes deal 1d4 kinetic damage. You can use your choice of your Strength or Dexterity modifier for the attack and damage rolls. You must use the same modifier for both rolls.",
section: "Racial Traits",
type: Boolean
},
"undersized": {
name: "Undersized",
hint: "You cant use heavy shields, martial weapons with the two-handed property unless it also has the light property, and if a martial weapon has the versatile property, you can only wield it in two hands.",
section: "Racial Traits",
type: Boolean
},
"initiativeAdv": {
name: "Advantage on Initiative",
hint: "Provided by feats or magical items.",
section: "Feats",
type: Boolean
},
"initiativeAlert": {
name: "Alert Feat",
hint: "Provides +5 to Initiative.",
section: "Feats",
type: Boolean
},
"jackOfAllTrades": {
name: "Jack of All Trades",
hint: "Half-Proficiency to Ability Checks in which you are not already Proficient.",
section: "Feats",
type: Boolean
},
"observantFeat": {
name: "Observant Feat",
hint: "Provides a +5 to passive Perception and Investigation.",
skills: ['prc','inv'],
section: "Feats",
type: Boolean
},
"remarkableAthlete": {
name: "Remarkable Athlete.",
hint: "Half-Proficiency (rounded-up) to physical Ability Checks and Initiative.",
abilities: ['str','dex','con'],
section: "Feats",
type: Boolean
},
"weaponCriticalThreshold": {
name: "Critical Hit Threshold",
hint: "Allow for expanded critical range; for example Improved or Superior Critical",
section: "Feats",
type: Number,
placeholder: 20
}
};

View file

@ -162,8 +162,9 @@ export class Item5e extends Item {
// Species Items
else if ( itemData.type === "species" ) {
labels.species = C.species[data.species];
}
}
// Equipment Items
else if ( itemData.type === "equipment" ) {
labels.armor = data.armor.value ? `${data.armor.value} AC` : "";
@ -346,6 +347,7 @@ export class Item5e extends Item {
// Rich text description
data.description.value = TextEditor.enrichHTML(data.description.value, htmlOptions);
// Item type specific properties
const props = [];
const fn = this[`_${this.data.type}ChatData`];

920
module/item/entity.js.bak Normal file
View file

@ -0,0 +1,920 @@
import { Dice5e } from "../dice.js";
import { AbilityUseDialog } from "../apps/ability-use-dialog.js";
import { AbilityTemplate } from "../pixi/ability-template.js";
/**
* Override and extend the basic :class:`Item` implementation
*/
export class Item5e extends Item {
/* -------------------------------------------- */
/* Item Properties */
/* -------------------------------------------- */
/**
* Determine which ability score modifier is used by this item
* @type {string|null}
*/
get abilityMod() {
const itemData = this.data.data;
if (!("ability" in itemData)) return null;
// Case 1 - defined directly by the item
if ( itemData.ability ) return itemData.ability;
// Case 2 - inferred from a parent actor
else if ( this.actor ) {
const actorData = this.actor.data.data;
if ( this.data.type === "power" ) return actorData.attributes.powercasting || "int";
else if ( this.data.type === "tool" ) return "int";
else return "str";
}
// Case 3 - unknown
return null
}
/* -------------------------------------------- */
/**
* Does the Item implement an attack roll as part of its usage
* @type {boolean}
*/
get hasAttack() {
return ["mwak", "rwak", "mpak", "rpak"].includes(this.data.data.actionType);
}
/* -------------------------------------------- */
/**
* Does the Item implement a damage roll as part of its usage
* @type {boolean}
*/
get hasDamage() {
return !!(this.data.data.damage && this.data.data.damage.parts.length);
}
/* -------------------------------------------- */
/**
* Does the Item implement a versatile damage roll as part of its usage
* @type {boolean}
*/
get isVersatile() {
return !!(this.hasDamage && this.data.data.damage.versatile);
}
/* -------------------------------------------- */
/**
* Does the item provide an amount of healing instead of conventional damage?
* @return {boolean}
*/
get isHealing() {
return (this.data.data.actionType === "heal") && this.data.data.damage.parts.length;
}
/* -------------------------------------------- */
/**
* Does the Item implement a saving throw as part of its usage
* @type {boolean}
*/
get hasSave() {
return !!(this.data.data.save && this.data.data.save.ability);
}
/* -------------------------------------------- */
/**
* Does the Item have a target
* @type {boolean}
*/
get hasTarget() {
const target = this.data.data.target;
return target && !["none",""].includes(target.type);
}
/* -------------------------------------------- */
/**
* Does the Item have an area of effect target
* @type {boolean}
*/
get hasAreaTarget() {
const target = this.data.data.target;
return target && (target.type in CONFIG.SW5E.areaTargetTypes);
}
/* -------------------------------------------- */
/**
* A flag for whether this Item is limited in it's ability to be used by charges or by recharge.
* @type {boolean}
*/
get hasLimitedUses() {
let chg = this.data.data.recharge || {};
let uses = this.data.data.uses || {};
return !!chg.value || (!!uses.per && (uses.max > 0));
}
/* -------------------------------------------- */
/* Data Preparation */
/* -------------------------------------------- */
/**
* Augment the basic Item data model with additional dynamic data.
*/
prepareData() {
super.prepareData();
// Get the Item's data
const itemData = this.data;
const actorData = this.actor ? this.actor.data : {};
const data = itemData.data;
const C = CONFIG.SW5E;
const labels = {};
// Classes
if ( itemData.type === "class" ) {
data.levels = Math.clamped(data.levels, 1, 20);
}
// Power Level, School, and Components
if ( itemData.type === "power" ) {
labels.level = C.powerLevels[data.level];
labels.school = C.powerSchools[data.school];
labels.components = Object.entries(data.components).reduce((arr, c) => {
if ( c[1] !== true ) return arr;
arr.push(c[0].titleCase().slice(0, 1));
return arr;
}, []);
}
// Feat Items
else if ( itemData.type === "feat" ) {
const act = data.activation;
if ( act && (act.type === C.abilityActivationTypes.legendary) ) labels.featType = "Legendary Action";
else if ( act && (act.type === C.abilityActivationTypes.lair) ) labels.featType = "Lair Action";
else if ( act && act.type ) labels.featType = data.damage.length ? "Attack" : "Action";
else labels.featType = "Passive";
}
// Species Items
else if ( itemData.type === "species" ) {
}
// Equipment Items
else if ( itemData.type === "equipment" ) {
labels.armor = data.armor.value ? `${data.armor.value} AC` : "";
}
// Activated Items
if ( data.hasOwnProperty("activation") ) {
// Ability Activation Label
let act = data.activation || {};
if ( act ) labels.activation = [act.cost, C.abilityActivationTypes[act.type]].filterJoin(" ");
// Target Label
let tgt = data.target || {};
if (["none", "touch", "self"].includes(tgt.units)) tgt.value = null;
if (["none", "self"].includes(tgt.type)) {
tgt.value = null;
tgt.units = null;
}
labels.target = [tgt.value, C.distanceUnits[tgt.units], C.targetTypes[tgt.type]].filterJoin(" ");
// Range Label
let rng = data.range || {};
if (["none", "touch", "self"].includes(rng.units) || (rng.value === 0)) {
rng.value = null;
rng.long = null;
}
labels.range = [rng.value, rng.long ? `/ ${rng.long}` : null, C.distanceUnits[rng.units]].filterJoin(" ");
// Duration Label
let dur = data.duration || {};
if (["inst", "perm"].includes(dur.units)) dur.value = null;
labels.duration = [dur.value, C.timePeriods[dur.units]].filterJoin(" ");
// Recharge Label
let chg = data.recharge || {};
labels.recharge = `Recharge [${chg.value}${parseInt(chg.value) < 6 ? "+" : ""}]`;
}
// Item Actions
if ( data.hasOwnProperty("actionType") ) {
// Save DC
let save = data.save || {};
if ( !save.ability ) save.dc = null;
else if ( this.isOwned ) { // Actor owned items
if ( save.scaling === "power" ) save.dc = actorData.data.attributes.powerdc;
else if ( save.scaling !== "flat" ) save.dc = this.actor.getPowerDC(save.scaling);
} else { // Un-owned items
if ( save.scaling !== "flat" ) save.dc = null;
}
labels.save = save.ability ? `DC ${save.dc || ""} ${C.abilities[save.ability]}` : "";
// Damage
let dam = data.damage || {};
if ( dam.parts ) {
labels.damage = dam.parts.map(d => d[0]).join(" + ").replace(/\+ -/g, "- ");
labels.damageTypes = dam.parts.map(d => C.damageTypes[d[1]]).join(", ");
}
}
// Assign labels
this.labels = labels;
}
/* -------------------------------------------- */
/**
* Roll the item to Chat, creating a chat card which contains follow up attack or damage roll options
* @return {Promise}
*/
async roll({configureDialog=true}={}) {
// Basic template rendering data
const token = this.actor.token;
const templateData = {
actor: this.actor,
tokenId: token ? `${token.scene._id}.${token.id}` : null,
item: this.data,
data: this.getChatData(),
labels: this.labels,
hasAttack: this.hasAttack,
isHealing: this.isHealing,
hasDamage: this.hasDamage,
isVersatile: this.isVersatile,
isPower: this.data.type === "power",
hasSave: this.hasSave,
hasAreaTarget: this.hasAreaTarget
};
// For feature items, optionally show an ability usage dialog
if (this.data.type === "feat") {
let configured = await this._rollFeat(configureDialog);
if ( configured === false ) return;
}
// Render the chat card template
const templateType = ["tool", "consumable"].includes(this.data.type) ? this.data.type : "item";
const template = `systems/sw5e/templates/chat/${templateType}-card.html`;
const html = await renderTemplate(template, templateData);
// Basic chat message data
const chatData = {
user: game.user._id,
type: CONST.CHAT_MESSAGE_TYPES.OTHER,
content: html,
speaker: {
actor: this.actor._id,
token: this.actor.token,
alias: this.actor.name
}
};
// Toggle default roll mode
let rollMode = game.settings.get("core", "rollMode");
if ( ["gmroll", "blindroll"].includes(rollMode) ) chatData["whisper"] = ChatMessage.getWhisperIDs("GM");
if ( rollMode === "blindroll" ) chatData["blind"] = true;
// Create the chat message
return ChatMessage.create(chatData);
}
/* -------------------------------------------- */
/**
* Additional rolling steps when rolling a feat-type item
* @private
* @return {boolean} whether the roll should be prevented
*/
async _rollFeat(configureDialog) {
if ( this.data.type !== "feat" ) throw new Error("Wrong Item type");
// Configure whether to consume a limited use or to place a template
const usesRecharge = !!this.data.data.recharge.value;
const uses = this.data.data.uses;
let usesCharges = !!uses.per && (uses.max > 0);
let placeTemplate = false;
let consume = usesRecharge || usesCharges;
// Determine whether the feat uses charges
configureDialog = configureDialog && (consume || this.hasAreaTarget);
if ( configureDialog ) {
const usage = await AbilityUseDialog.create(this);
if ( usage === null ) return false;
consume = Boolean(usage.get("consume"));
placeTemplate = Boolean(usage.get("placeTemplate"));
}
// Update Item data
const current = getProperty(this.data, "data.uses.value") || 0;
if ( consume && usesRecharge ) {
await this.update({"data.recharge.charged": false});
}
else if ( consume && usesCharges ) {
await this.update({"data.uses.value": Math.max(current - 1, 0)});
}
// Maybe initiate template placement workflow
if ( this.hasAreaTarget && placeTemplate ) {
const template = AbilityTemplate.fromItem(this);
if ( template ) template.drawPreview(event);
if ( this.owner && this.owner.sheet ) this.owner.sheet.minimize();
}
return true;
}
/* -------------------------------------------- */
/* Chat Cards */
/* -------------------------------------------- */
/**
* Prepare an object of chat data used to display a card for the Item in the chat log
* @param {Object} htmlOptions Options used by the TextEditor.enrichHTML function
* @return {Object} An object of chat data to render
*/
getChatData(htmlOptions) {
const data = duplicate(this.data.data);
const labels = this.labels;
// Rich text description
data.description.value = TextEditor.enrichHTML(data.description.value, htmlOptions);
// Item type specific properties
const props = [];
const fn = this[`_${this.data.type}ChatData`];
if ( fn ) fn.bind(this)(data, labels, props);
// General equipment properties
if ( data.hasOwnProperty("equipped") && !["loot", "tool"].includes(this.data.type) ) {
props.push(
data.equipped ? "Equipped" : "Not Equipped",
data.proficient ? "Proficient": "Not Proficient",
);
}
// Ability activation properties
if ( data.hasOwnProperty("activation") ) {
props.push(
labels.target,
labels.activation,
labels.range,
labels.duration
);
}
// Filter properties and return
data.properties = props.filter(p => !!p);
return data;
}
/* -------------------------------------------- */
/**
* Prepare chat card data for equipment type items
* @private
*/
_equipmentChatData(data, labels, props) {
props.push(
CONFIG.SW5E.equipmentTypes[data.armor.type],
labels.armor || null,
data.stealth.value ? "Stealth Disadvantage" : null,
);
}
/* -------------------------------------------- */
/**
* Prepare chat card data for weapon type items
* @private
*/
_weaponChatData(data, labels, props) {
props.push(
CONFIG.SW5E.weaponTypes[data.weaponType],
);
}
/* -------------------------------------------- */
/**
* Prepare chat card data for consumable type items
* @private
*/
_consumableChatData(data, labels, props) {
props.push(
CONFIG.SW5E.consumableTypes[data.consumableType],
data.uses.value + "/" + data.uses.max + " Charges"
);
data.hasCharges = data.uses.value >= 0;
}
/* -------------------------------------------- */
/**
* Prepare chat card data for tool type items
* @private
*/
_toolChatData(data, labels, props) {
props.push(
CONFIG.SW5E.abilities[data.ability] || null,
CONFIG.SW5E.proficiencyLevels[data.proficient || 0]
);
}
/* -------------------------------------------- */
/**
* Prepare chat card data for tool type items
* @private
*/
_lootChatData(data, labels, props) {
props.push(
"Loot",
data.weight ? data.weight + " lbs." : null
);
}
/* -------------------------------------------- */
/**
* Render a chat card for Power type data
* @return {Object}
* @private
*/
_powerChatData(data, labels, props) {
props.push(
labels.level,
labels.components,
);
}
/* -------------------------------------------- */
/**
* Prepare chat card data for items of the "Feat" type
* @private
*/
_featChatData(data, labels, props) {
props.push(data.requirements);
}
/* -------------------------------------------- */
/* Item Rolls - Attack, Damage, Saves, Checks */
/* -------------------------------------------- */
/**
* Place an attack roll using an item (weapon, feat, power, or equipment)
* Rely upon the Dice5e.d20Roll logic for the core implementation
*
* @return {Promise.<Roll>} A Promise which resolves to the created Roll instance
*/
rollAttack(options={}) {
const itemData = this.data.data;
const actorData = this.actor.data.data;
const flags = this.actor.data.flags.sw5e || {};
if ( !this.hasAttack ) {
throw new Error("You may not place an Attack Roll with this Item.");
}
const rollData = this.getRollData();
// Define Roll bonuses
const parts = [`@mod`];
if ( (this.data.type !== "weapon") || itemData.proficient ) {
parts.push("@prof");
}
// Attack Bonus
const actorBonus = actorData.bonuses[itemData.actionType] || {};
if ( itemData.attackBonus || actorBonus.attack ) {
parts.push("@atk");
rollData["atk"] = [itemData.attackBonus, actorBonus.attack].filterJoin(" + ");
}
// Compose roll options
const rollConfig = {
event: options.event,
parts: parts,
actor: this.actor,
data: rollData,
title: `${this.name} - Attack Roll`,
speaker: ChatMessage.getSpeaker({actor: this.actor}),
dialogOptions: {
width: 400,
top: options.event ? options.event.clientY - 80 : null,
left: window.innerWidth - 710
}
};
// Expanded weapon critical threshold
if (( this.data.type === "weapon" ) && flags.weaponCriticalThreshold) {
rollConfig.critical = parseInt(flags.weaponCriticalThreshold);
}
// Elven Accuracy
if ( ["weapon", "power"].includes(this.data.type) ) {
if (flags.elvenAccuracy && ["dex", "int", "wis", "cha"].includes(this.abilityMod)) {
rollConfig.elvenAccuracy = true;
}
}
// Apply Halfling Lucky
if ( flags.halflingLucky ) rollConfig.halflingLucky = true;
// Invoke the d20 roll helper
return Dice5e.d20Roll(rollConfig);
}
/* -------------------------------------------- */
/**
* Place a damage roll using an item (weapon, feat, power, or equipment)
* Rely upon the Dice5e.damageRoll logic for the core implementation
*
* @return {Promise.<Roll>} A Promise which resolves to the created Roll instance
*/
rollDamage({event, powerLevel=null, versatile=false}={}) {
const itemData = this.data.data;
const actorData = this.actor.data.data;
if ( !this.hasDamage ) {
throw new Error("You may not make a Damage Roll with this Item.");
}
const rollData = this.getRollData();
if ( powerLevel ) rollData.item.level = powerLevel;
// Define Roll parts
const parts = itemData.damage.parts.map(d => d[0]);
if ( versatile && itemData.damage.versatile ) parts[0] = itemData.damage.versatile;
if ( (this.data.type === "power") ) {
if ( (itemData.scaling.mode === "atwill") ) {
const lvl = this.actor.data.type === "character" ? actorData.details.level : actorData.details.powerLevel;
this._scaleAtWillDamage(parts, lvl, itemData.scaling.formula );
} else if ( powerLevel && (itemData.scaling.mode === "level") && itemData.scaling.formula ) {
this._scalePowerDamage(parts, itemData.level, powerLevel, itemData.scaling.formula );
}
}
// Define Roll Data
const actorBonus = actorData.bonuses[itemData.actionType] || {};
if ( actorBonus.damage && parseInt(actorBonus.damage) !== 0 ) {
parts.push("@dmg");
rollData["dmg"] = actorBonus.damage;
}
// Call the roll helper utility
const title = `${this.name} - Damage Roll`;
const flavor = this.labels.damageTypes.length ? `${title} (${this.labels.damageTypes})` : title;
return Dice5e.damageRoll({
event: event,
parts: parts,
actor: this.actor,
data: rollData,
title: title,
flavor: flavor,
speaker: ChatMessage.getSpeaker({actor: this.actor}),
dialogOptions: {
width: 400,
top: event ? event.clientY - 80 : null,
left: window.innerWidth - 710
}
});
}
/* -------------------------------------------- */
/**
* Adjust an at-will damage formula to scale it for higher level characters and monsters
* @private
*/
_scaleAtWillDamage(parts, level, scale) {
const add = Math.floor((level + 1) / 6);
if ( add === 0 ) return;
if ( scale && (scale !== parts[0]) ) {
parts[0] = parts[0] + " + " + scale.replace(new RegExp(Roll.diceRgx, "g"), (match, nd, d) => `${add}d${d}`);
} else {
parts[0] = parts[0].replace(new RegExp(Roll.diceRgx, "g"), (match, nd, d) => `${parseInt(nd)+add}d${d}`);
}
}
/* -------------------------------------------- */
/**
* Adjust the power damage formula to scale it for power level up-casting
* @param {Array} parts The original damage parts
* @param {number} baseLevel The default power level
* @param {number} powerLevel The casted power level
* @param {string} formula The scaling formula
* @private
*/
_scalePowerDamage(parts, baseLevel, powerLevel, formula) {
const upcastLevels = Math.max(powerLevel - baseLevel, 0);
if ( upcastLevels === 0 ) return parts;
const bonus = new Roll(formula).alter(0, upcastLevels);
parts.push(bonus.formula);
return parts;
}
/* -------------------------------------------- */
/**
* Place an attack roll using an item (weapon, feat, power, or equipment)
* Rely upon the Dice5e.d20Roll logic for the core implementation
*
* @return {Promise.<Roll>} A Promise which resolves to the created Roll instance
*/
async rollFormula(options={}) {
if ( !this.data.data.formula ) {
throw new Error("This Item does not have a formula to roll!");
}
// Define Roll Data
const rollData = this.getRollData();
const title = `${this.name} - Other Formula`;
// Invoke the roll and submit it to chat
const roll = new Roll(rollData.item.formula, rollData).roll();
roll.toMessage({
speaker: ChatMessage.getSpeaker({actor: this.actor}),
flavor: this.data.data.chatFlavor || title,
rollMode: game.settings.get("core", "rollMode")
});
return roll;
}
/* -------------------------------------------- */
/**
* Use a consumable item, deducting from the quantity or charges of the item.
*
* @return {Promise.<Roll>} A Promise which resolves to the created Roll instance or null
*/
async rollConsumable(options={}) {
const itemData = this.data.data;
// Dispatch a damage roll
let roll = null;
if ( itemData.damage.parts.length ) {
roll = await this.rollDamage(options);
}
// Dispatch an other formula
if ( itemData.formula ) {
roll = await this.rollFormula(options);
}
// Deduct consumed charges from the item
if ( itemData.uses.autoUse ) {
let q = itemData.quantity;
let c = itemData.uses.value;
// Deduct an item quantity
if ( c <= 1 && q > 1 ) {
await this.update({
'data.quantity': Math.max(q - 1, 0),
'data.uses.value': itemData.uses.max
});
}
// Optionally destroy the item
else if ( c <= 1 && q <= 1 && itemData.uses.autoDestroy ) {
await this.actor.deleteOwnedItem(this.id);
}
// Deduct the remaining charges
else {
await this.update({'data.uses.value': Math.max(c - 1, 0)});
}
}
return roll;
}
/* -------------------------------------------- */
/**
* Perform an ability recharge test for an item which uses the d6 recharge mechanic
* @prarm {Object} options
*
* @return {Promise.<Roll>} A Promise which resolves to the created Roll instance
*/
async rollRecharge(options={}) {
const data = this.data.data;
if ( !data.recharge.value ) return;
// Roll the check
const roll = new Roll("1d6").roll();
const success = roll.total >= parseInt(data.recharge.value);
// Display a Chat Message
const promises = [roll.toMessage({
flavor: `${this.name} recharge check - ${success ? "success!" : "failure!"}`,
speaker: ChatMessage.getSpeaker({actor: this.actor, token: this.actor.token})
})];
// Update the Item data
if ( success ) promises.push(this.update({"data.recharge.charged": true}));
return Promise.all(promises).then(() => roll);
}
/* -------------------------------------------- */
/**
* Roll a Tool Check
* Rely upon the Dice5e.d20Roll logic for the core implementation
*
* @return {Promise.<Roll>} A Promise which resolves to the created Roll instance
*/
rollToolCheck(options={}) {
if ( this.type !== "tool" ) throw "Wrong item type!";
// Prepare roll data
let rollData = this.getRollData();
const parts = [`@mod`, "@prof"];
const title = `${this.name} - Tool Check`;
// Call the roll helper utility
return Dice5e.d20Roll({
event: options.event,
parts: parts,
data: rollData,
template: "systems/sw5e/templates/chat/tool-roll-dialog.html",
title: title,
speaker: ChatMessage.getSpeaker({actor: this.actor}),
flavor: `${this.name} - Tool Check`,
dialogOptions: {
width: 400,
top: options.event ? options.event.clientY - 80 : null,
left: window.innerWidth - 710,
},
halflingLucky: this.actor.getFlag("sw5e", "halflingLucky" ) || false
});
}
/* -------------------------------------------- */
/**
* Prepare a data object which is passed to any Roll formulas which are created related to this Item
* @private
*/
getRollData() {
if ( !this.actor ) return null;
const rollData = this.actor.getRollData();
rollData.item = duplicate(this.data.data);
// Include an ability score modifier if one exists
const abl = this.abilityMod;
if ( abl ) {
const ability = rollData.abilities[abl];
rollData["mod"] = ability.mod || 0;
}
// Include a proficiency score
const prof = "proficient" in rollData.item ? (rollData.item.proficient || 0) : 1;
rollData["prof"] = Math.floor(prof * rollData.attributes.prof);
return rollData;
}
/* -------------------------------------------- */
/* Chat Message Helpers */
/* -------------------------------------------- */
static chatListeners(html) {
html.on('click', '.card-buttons button', this._onChatCardAction.bind(this));
html.on('click', '.item-name', this._onChatCardToggleContent.bind(this));
}
/* -------------------------------------------- */
/**
* Handle execution of a chat card action via a click event on one of the card buttons
* @param {Event} event The originating click event
* @returns {Promise} A promise which resolves once the handler workflow is complete
* @private
*/
static async _onChatCardAction(event) {
event.preventDefault();
// Extract card data
const button = event.currentTarget;
button.disabled = true;
const card = button.closest(".chat-card");
const messageId = card.closest(".message").dataset.messageId;
const message = game.messages.get(messageId);
const action = button.dataset.action;
// Validate permission to proceed with the roll
const isTargetted = action === "save";
if ( !( isTargetted || game.user.isGM || message.isAuthor ) ) return;
// Get the Actor from a synthetic Token
const actor = this._getChatCardActor(card);
if ( !actor ) return;
// Get the Item
const item = actor.getOwnedItem(card.dataset.itemId);
if ( !item ) {
return ui.notifications.error(`The requested item ${card.dataset.itemId} no longer exists on Actor ${actor.name}`)
}
const powerLevel = parseInt(card.dataset.powerLevel) || null;
// Get card targets
let targets = [];
if ( isTargetted ) {
targets = this._getChatCardTargets(card);
if ( !targets.length ) {
ui.notifications.warn(`You must have one or more controlled Tokens in order to use this option.`);
return button.disabled = false;
}
}
// Attack and Damage Rolls
if ( action === "attack" ) await item.rollAttack({event});
else if ( action === "damage" ) await item.rollDamage({event, powerLevel});
else if ( action === "versatile" ) await item.rollDamage({event, powerLevel, versatile: true});
else if ( action === "formula" ) await item.rollFormula({event});
// Saving Throws for card targets
else if ( action === "save" ) {
for ( let t of targets ) {
await t.rollAbilitySave(button.dataset.ability, {event});
}
}
// Consumable usage
else if ( action === "consume" ) await item.rollConsumable({event});
// Tool usage
else if ( action === "toolCheck" ) await item.rollToolCheck({event});
// Power Template Creation
else if ( action === "placeTemplate") {
const template = AbilityTemplate.fromItem(item);
if ( template ) template.drawPreview(event);
}
// Re-enable the button
button.disabled = false;
}
/* -------------------------------------------- */
/**
* Handle toggling the visibility of chat card content when the name is clicked
* @param {Event} event The originating click event
* @private
*/
static _onChatCardToggleContent(event) {
event.preventDefault();
const header = event.currentTarget;
const card = header.closest(".chat-card");
const content = card.querySelector(".card-content");
content.style.display = content.style.display === "none" ? "block" : "none";
}
/* -------------------------------------------- */
/**
* Get the Actor which is the author of a chat card
* @param {HTMLElement} card The chat card being used
* @return {Actor|null} The Actor entity or null
* @private
*/
static _getChatCardActor(card) {
// Case 1 - a synthetic actor from a Token
const tokenKey = card.dataset.tokenId;
if (tokenKey) {
const [sceneId, tokenId] = tokenKey.split(".");
const scene = game.scenes.get(sceneId);
if (!scene) return null;
const tokenData = scene.getEmbeddedEntity("Token", tokenId);
if (!tokenData) return null;
const token = new Token(tokenData);
return token.actor;
}
// Case 2 - use Actor ID directory
const actorId = card.dataset.actorId;
return game.actors.get(actorId) || null;
}
/* -------------------------------------------- */
/**
* Get the Actor which is the author of a chat card
* @param {HTMLElement} card The chat card being used
* @return {Array.<Actor>} An Array of Actor entities, if any
* @private
*/
static _getChatCardTargets(card) {
const character = game.user.character;
const controlled = canvas.tokens.controlled;
const targets = controlled.reduce((arr, t) => t.actor ? arr.concat([t.actor]) : arr, []);
if ( character && (controlled.length === 0) ) targets.push(character);
return targets;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Some files were not shown because too many files have changed in this diff Show more