Populate title based on class/level
This commit is contained in:
		
							parent
							
								
									7487d3d390
								
							
						
					
					
						commit
						e9731f9a90
					
				@ -760,8 +760,28 @@ const repeatingSum = (destinations, section, fields, ...extras) => {
 | 
			
		||||
                save_sp: saves[4],
 | 
			
		||||
                attack_throw: saves[5]
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            let title = getClassLevelTitle(v.level, v.class);
 | 
			
		||||
            setAttr({classtitle: title});
 | 
			
		||||
        });
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    /* PC Class Default Titles */
 | 
			
		||||
    const class_titles = {
 | 
			
		||||
        // 1,2,3,4,5,6,7,8,9,10,11,12,13,14
 | 
			
		||||
        'Fighter': ["Man-at-Arms", "Warrior", "Swordmaster", "Hero", "Exemplar", "Myrmidon", "Champion", "Epic Hero", "Warlord", "Warlord", "Warlord", "Warlord", "Warlord", "Overlord"],
 | 
			
		||||
        'Assassin': ["Thug", "Enforcer", "Torturer", "Slayer", "Destroyer", "Executioner", "Blackguard", "Assassin", "Master Assassin", "Master Assassin", "Master Assassin", "Master Assassin", "Master Assassin", "Grandfather of Assassins"],
 | 
			
		||||
        'Explorer': ["Scout", "Outrider", "Forester", "Explorer", "Guide", "Tracker", "Pathfinder", "Ranger", "Warden", "Warden", "Warden", "Warden", "Warden", "Lord Warden"],
 | 
			
		||||
        'Mage': ["Arcanist", "Seer", "Theurgist", "Magician", "Thaumaturge", "Enchanter", "Sorcerer", "Mage", "Wizard", "Wizard", "Wizard", "Wizard", "Wizard", "Archmage"],
 | 
			
		||||
        'Cleric': ["Catechist", "Acolyte", "Priest", "Curate", "Vicar", "Rector", "Prelate", "Bishop", "Patriarch", "Patriarch", "Patriarch", "Patriarch", "Patriarch", "Theocrat"],
 | 
			
		||||
        'Bladedancer': ["Blade-Initiate", "Blade-Daughter", "Blade-Singer", "Blade-Weaver", "Blade-Sister", "Blade-Adept", "Blade-Dancer", "Blade-Priestess", "Blade-Mistress", "Blade-Mistress", "Blade-Mistress", "Blade-Mistress", "Blade-Mistress", "Mistress of All Blades"],
 | 
			
		||||
        'Thief': ["Footpad", "Hood", "Robber", "Burglar", "Rogue", 'Scoundrel", "Pilferer", "Thief", "Master Thief", "Master Thief", "Master Thief", "Master Thief", "Master Thief", "Prince of Thieves"],
 | 
			
		||||
        'Bard': ["Reciter", "Versifier", "Archivist", "Annalist", "Chronicler", "Panegyrist", "Skald", "Rhapsodist", "Bard", "Bard", "Bard", "Bard", "Bard", "Master Bard"],
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    const getClassLevelTitle = function(level, class_name) {
 | 
			
		||||
        return class_titles[class_name][level - 1] || "the Unknown";
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    /* NPC Attack Throw */
 | 
			
		||||
    const calculateNpcHit = function(hd) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user