Dodge.
+
@@ -1127,7 +1131,7 @@
======================================================*/
const multistats = {
- luck_uses_max: {rule: 'special_stat', attributes: ['luck'], modifier: 10},
+ luck_uses_max: {rule: 'luck_uses', attributes: ['luck', 'has_faith'], modifier: 10},
build: {rule: 'special_stat', attributes: ['str', 'for'], modifier: 1},
build_dc: {rule: 'build_dc', attributes: ['build']},
health_max: {rule: 'special_stat', attributes: ['build'], modifier: 5},
@@ -1142,7 +1146,7 @@ const multistats = {
resilience: {rule: 'special_stat', attributes: ['str', 'fort'], modifier: 2},
resolve: {rule: 'special_stat', attributes: ['int', 'ins'], modifier: 2},
immunity: {rule: 'special_stat', attributes: ['for', 'luck'], modifier: 2},
- dodge: {rule: 'special_stat', attributes: ['agi', 'ins'], modifier: 2},
+ dodge: {rule: 'dodge', attributes: ['agi', 'ins', 'has_reflex'], modifier: 2},
full_dodge: {rule: 'full_dodge', attributes: ['dodge', 'str']},
parry: {rule: 'max', attributes: ['blades', 'brawl', 'clubs']},
riposte: {rule: 'max', attributes: ['blades', 'brawl', 'clubs']},
@@ -1189,6 +1193,21 @@ const multifunctions = {
max: (arr) => Math.max(...arr),
encumbered: (arr) => arr[0] > arr[1] || arr[2] >= 12 ? 'on' : '0',
greater_than_or_equal: (arr) => arr[0] >= arr[1] ? 'on' : '0',
+ luck_uses: function(arr, divisor) {
+ let luck = arr[0];
+ let has_faith = arr[1];
+ let luck_uses = Math.floor(luck / divisor)
+ luck_uses = luck_uses + (has_faith > 0 ? 3 : 0);
+ return luck_uses;
+ },
+ dodge: function(arr, divisor) {
+ let agi = arr[0];
+ let ins = arr[1];
+ let has_reflex = arr[2];
+ let dodge = Math.floor((agi + ins) / divisor)
+ dodge = dodge + (has_reflex > 0 ? 10 : 0);
+ return dodge;
+ },
prof: function(arr) {
let stat_val = parseInt(arr[0]) || 0;
let prof_mod = prof_mods[arr[1]];
@@ -1372,26 +1391,53 @@ const repeatingSum = (destinations, section, fields) => {
});
};
+const repeatingPresence = (destinations, section, fields, names) => {
+ if (!Array.isArray(destinations)) destinations = [destinations.replace(/\s/g, '').split(',')];
+ if (!Array.isArray(fields)) fields = [fields.replace(/\s/g, '').split(',')];
+ if (!Array.isArray(names)) names = [names.replace(/\s/g, '').split(',')];
+ getSectionIDs(`repeating_${section}`, idArray => {
+ const attrArray = idArray.reduce((m, id) => [...m, ...(fields.map(field => `repeating_${section}_${id}_${field}`))], []);
+ getAttrs([...attrArray], v => {
+ const checkValue = (section, id, field, name) => v[`repeating_${section}_${id}_${field}`].trim().toLowerCase() === `${name}` ||
+ v[`repeating_${section}_${id}_${field}`].trim().toLowerCase() === getTranslationByKey(`${name}`) ? 1 : 0;
+ const output = {};
+ destinations.forEach((destination, index) => {
+ output[destination] = idArray.reduce((total, id) => total + checkValue(section, id, fields[index], names[index]), 0);
+ });
+ console.log('repeatingPresence: destinations: "' + destinations + '"; section: "' + section + '"; fields: "' + fields + '"; names: "' + names + '"; output: "' + JSON.stringify(output));
+ setAttrs(output);
+ });
+ });
+};
+
+/* armor point total */
on('change:repeating_armor:armor_ap remove:repeating_armor', function() {
repeatingSum("armor_max","armor","armor_ap");
});
-
+/* armor cp total */
on('change:repeating_armor:armor_cp remove:repeating_armor', function() {
repeatingSum("armor_cp_total","armor","armor_cp");
});
-
+/* weapon cp total */
on('change:repeating_attack:attack_cp remove:repeating_attack', function() {
repeatingSum("attack_cp_total","attack","attack_cp");
});
-
+/* gear cp total */
on('change:repeating_gear:gear_cp remove:repeating_gear', function() {
repeatingSum("gear_cp_total","gear","gear_cp");
});
+/* detect Faith special ability */
+on('change:repeating_abilities:ability_name remove:repeating_abilities', function() {
+ repeatingPresence(["has_faith", "has_reflex"],"abilities",["ability_name", "ability_name"], ["faith", "reflex"]);
+});
+
+
+
/* END OF REPEATING SUMS */
diff --git a/Maximum Apocalypse/translation.json b/Maximum Apocalypse/translation.json
index 13b0b0d8dc..cd7ad35d61 100644
--- a/Maximum Apocalypse/translation.json
+++ b/Maximum Apocalypse/translation.json
@@ -1,146 +1,147 @@
{
- "character_name": "Character Name",
- "player_name": "Player Name",
- "primary_archetype": "Primary Archetype",
- "secondary_archetype": "Secondary Archetype",
- "personal_apocalypse": "Personal Apocalypse",
- "age": "Age",
- "firefighter": "Firefighter",
- "gunslinger": "Gunslinger",
- "hunter": "Hunter",
- "mechanic": "Mechanic",
- "priest": "Priest",
- "ronin": "Ronin",
- "scientist": "Scientist",
- "surgeon": "Surgeon",
- "thief": "Thief",
- "veteran": "Veteran",
- "alien_invasion": "Alien Invasion",
- "food_riots": "Food Riots",
- "kaiju_attack": "Kaiju Attack",
- "nuclear_holocaust": "Nuclear Holocaust",
- "peak_oil_collapse": "Peak Oil Collapse",
- "robot_upraising": "Robot Uprising",
- "seismic_cataclysm": "Seismic Cataclysm",
- "supernatural_horrors": "Supernatural Horrors",
- "the_rapture": "The Rapture",
- "time_paradox": "Time Paradox",
- "zombie_apocalypse": "Zombie Apocalypse",
- "child_0-15": "Child (0-15)",
- "youth_16-29": "Youth (16-29)",
- "middle_30-45": "Middle (30-45)",
- "mature_46-59": "Mature (46-59)",
- "geriatric_60+": "Geriatric (60+)",
- "strength": "Strength",
- "fortitude": "Fortitude",
- "agility": "Agility",
- "intelligence": "Intelligence",
- "instinct": "Instinct",
- "charisma": "Charisma",
- "fighting_skill": "Fighting Skill",
- "ballistic_skill": "Ballistic Skill",
- "skills": "Skills",
- "athletics": "Athletics",
- "archery": "Archery",
+ "-3_initiative": "-3 Initative",
+ "ability_name": "Ability Name",
"academics": "Academics",
- "crafting": "Crafting",
+ "acute": "Acute",
+ "age": "Age",
+ "agility": "Agility",
+ "alien_invasion": "Alien Invasion",
+ "ammo": "Ammo",
"animal_ken": "Animal Ken",
- "blades": "Blades",
- "firearms": "Firearms",
- "lockpick": "Lockpick",
- "mechanics": "Mechanics",
- "drive": "Drive",
- "charm": "Charm",
- "brawl": "Brawl",
- "heavy_weapons": "Heavy Weapons",
- "palming": "Palming",
- "medicine": "Medicine",
- "navigation": "Navigation",
- "command": "Command",
- "clubs": "Clubs",
- "stealth": "Stealth",
- "science": "Science",
- "perception": "Perception",
- "interrogate": "Interrogate",
- "wrangle": "Wrangle",
- "tech_use": "Tech Use",
- "survival": "Survival",
- "intimidate": "Intimidate",
- "tracking": "Tracking",
- "xenotech_use": "Xenotech Use",
- "luck": "Luck",
- "use_per_game": "Use Per Game",
- "base_stat_perc": "Base Stat %",
- "max": "Max",
- "current": "Current",
- "not_proficient": "Not Proficient",
- "proficient": "Proficient",
- "skilled": "Skilled",
- "trained": "Trained",
- "master": "Master",
- "proficiency_text": "Skills that are NOT PROFICIENT start as DISADVANTAGE and cannot have ADVANTAGE when rolled.",
- "special_stats": "Special Stats",
- "salvage": "Salvage",
- "resilience": "Resilience",
- "resolve": "Resolve",
- "immunity": "Immunity",
- "initiative": "Initiative",
- "health_points": "Health Points",
- "build": "Build",
+ "archery": "Archery",
+ "armor": "Armor",
"armor_piece": "Armor Piece",
"armor_points": "Armor Points",
- "armor": "Armor",
- "defensive_actions": "Defensive Actions",
- "threshold": "Threshold",
- "dodge": "Dodge",
- "full_dodge": "Full Dodge",
- "parry": "Parry",
- "riposte": "Riposte",
+ "athletics": "Athletics",
"attack": "Attack",
- "weapon_attacks": "Weapon Attacks",
- "weapon": "Weapon",
- "ammo": "Ammo",
- "traits": "Traits",
- "gear_inventory": "Gear Inventory",
- "item": "Item",
+ "ballistic_skill": "Ballistic Skill",
+ "base_stat_perc": "Base Stat %",
+ "blades": "Blades",
+ "brawl": "Brawl",
+ "build": "Build",
+ "build_repair": "Build / Repair",
+ "character_name": "Character Name",
"characteristic": "Characteristic",
- "special_abilities": "Special Abilities",
- "source": "Source",
- "ability_name": "Ability Name",
- "effect": "Effect",
- "inferior_cp": "Inferior CP",
- "superior_cp": "Superior CP",
+ "charisma": "Charisma",
+ "charm": "Charm",
+ "child_0-15": "Child (0-15)",
+ "clubs": "Clubs",
+ "command": "Command",
"cp_costs": "CP Costs",
- "heal": "Heal",
- "repair": "Repair",
- "one_per_4_hp": "1 per 4 HP",
- "one_per_4_cp": "1 per 4 CP",
- "three_per_armor_point": "3 per Armor pt",
- "resolve_dmg": "Resolve DMG",
- "unnerved": "Unnerved",
- "disadvantage_on_rolls": "Disadv. on Rolls",
- "shaken": "Shaken",
- "-3_initiative": "-3 Initative",
- "insanity_condition": "Insanity Condition",
- "stage": "Stage",
- "infection": "Infection",
- "incubation": "Incubation",
- "gestation": "Gestation",
- "symptomatic": "Symptomatic",
- "prodromal": "Prodromal",
- "acute": "Acute",
- "transform_die": "Transform/Die",
- "hunger": "Hunger",
- "starving": "Starving",
- "emaciated": "Emaciated",
+ "crafting": "Crafting",
+ "current": "Current",
"dead": "Dead",
- "build_repair": "Build / Repair",
- "repair_skill": "Repair Skill",
- "encumbrance": "Encumbrance",
- "disadvantage_on_dodge": "Disadv. on Dodge",
- "move": "Move",
- "yes": "Y",
- "experience": "Experience",
- "unused_xp": "Unused XP",
- "total_xp": "Total XP"
+ "defensive_actions": "Defensive Actions",
+ "disadvantage_on_dodge": "Disadv. on Dodge",
+ "disadvantage_on_rolls": "Disadv. on Rolls",
+ "dodge": "Dodge",
+ "drive": "Drive",
+ "effect": "Effect",
+ "emaciated": "Emaciated",
+ "encumbrance": "Encumbrance",
+ "experience": "Experience",
+ "fighting_skill": "Fighting Skill",
+ "firearms": "Firearms",
+ "firefighter": "Firefighter",
+ "food_riots": "Food Riots",
+ "fortitude": "Fortitude",
+ "full_dodge": "Full Dodge",
+ "gear_inventory": "Gear Inventory",
+ "geriatric_60+": "Geriatric (60+)",
+ "gestation": "Gestation",
+ "gunslinger": "Gunslinger",
+ "heal": "Heal",
+ "health_points": "Health Points",
+ "heavy_weapons": "Heavy Weapons",
+ "hunger": "Hunger",
+ "hunter": "Hunter",
+ "immunity": "Immunity",
+ "incubation": "Incubation",
+ "infection": "Infection",
+ "inferior_cp": "Inferior CP",
+ "initiative": "Initiative",
+ "insanity_condition": "Insanity Condition",
+ "instinct": "Instinct",
+ "intelligence": "Intelligence",
+ "interrogate": "Interrogate",
+ "intimidate": "Intimidate",
+ "item": "Item",
+ "kaiju_attack": "Kaiju Attack",
+ "lockpick": "Lockpick",
+ "luck": "Luck",
+ "master": "Master",
+ "mature_46-59": "Mature (46-59)",
+ "max": "Max",
+ "mechanic": "Mechanic",
+ "mechanics": "Mechanics",
+ "medicine": "Medicine",
+ "middle_30-45": "Middle (30-45)",
+ "move": "Move",
+ "navigation": "Navigation",
+ "not_proficient": "Not Proficient",
+ "nuclear_holocaust": "Nuclear Holocaust",
+ "one_per_4_cp": "1 per 4 CP",
+ "one_per_4_hp": "1 per 4 HP",
+ "palming": "Palming",
+ "parry": "Parry",
+ "peak_oil_collapse": "Peak Oil Collapse",
+ "perception": "Perception",
+ "personal_apocalypse": "Personal Apocalypse",
+ "player_name": "Player Name",
+ "priest": "Priest",
+ "primary_archetype": "Primary Archetype",
+ "prodromal": "Prodromal",
+ "proficiency_text": "Skills that are NOT PROFICIENT start as DISADVANTAGE and cannot have ADVANTAGE when rolled.",
+ "proficient": "Proficient",
+ "repair": "Repair",
+ "repair_skill": "Repair Skill",
+ "resilience": "Resilience",
+ "resolve": "Resolve",
+ "resolve_dmg": "Resolve DMG",
+ "riposte": "Riposte",
+ "robot_upraising": "Robot Uprising",
+ "ronin": "Ronin",
+ "salvage": "Salvage",
+ "science": "Science",
+ "scientist": "Scientist",
+ "secondary_archetype": "Secondary Archetype",
+ "seismic_cataclysm": "Seismic Cataclysm",
+ "shaken": "Shaken",
+ "skilled": "Skilled",
+ "skills": "Skills",
+ "source": "Source",
+ "special_abilities": "Special Abilities",
+ "special_stats": "Special Stats",
+ "stage": "Stage",
+ "starving": "Starving",
+ "stealth": "Stealth",
+ "strength": "Strength",
+ "superior_cp": "Superior CP",
+ "supernatural_horrors": "Supernatural Horrors",
+ "surgeon": "Surgeon",
+ "survival": "Survival",
+ "symptomatic": "Symptomatic",
+ "tech_use": "Tech Use",
+ "the_rapture": "The Rapture",
+ "thief": "Thief",
+ "three_per_armor_point": "3 per Armor pt",
+ "threshold": "Threshold",
+ "time_paradox": "Time Paradox",
+ "total_xp": "Total XP",
+ "tracking": "Tracking",
+ "trained": "Trained",
+ "traits": "Traits",
+ "transform_die": "Transform/Die",
+ "unnerved": "Unnerved",
+ "unused_xp": "Unused XP",
+ "use_per_game": "Use Per Game",
+ "veteran": "Veteran",
+ "weapon": "Weapon",
+ "weapon_attacks": "Weapon Attacks",
+ "wrangle": "Wrangle",
+ "xenotech_use": "Xenotech Use",
+ "yes": "Y",
+ "youth_16-29": "Youth (16-29)",
+ "zombie_apocalypse": "Zombie Apocalypse",
+ "threshold_modifier_text": "Threshold modifier prompt on every roll ?"
}
\ No newline at end of file