void SetFoeName() { // Set type name with fallback MobileEnemy enemy; if (EnemyBasics.GetEnemy(foeType, out enemy)) { typeName = enemy.Name; } else { typeName = foeType.ToString(); } // Monster types get a random monster name // Always treating monsters as male for now as they don't have any gender in game files if ((int)foeType < 128) { DFRandom.srand(DateTime.Now.Millisecond); displayName = DaggerfallUnity.Instance.NameHelper.MonsterName(); return; } // TODO: Create a random humanoid foe name // Will get to this testing quests that assign player to defeat and return a class-based NPC Foe // Have more problems to solve before getting to name }
void SetFoeName() { // Set type name with fallback MobileEnemy enemy; if (EnemyBasics.GetEnemy(foeType, out enemy)) { typeName = enemy.Name; } else { typeName = foeType.ToString(); } // Monster types get a random monster name // Always treating monsters as male for now as they don't have any gender in game files if ((int)foeType < 128) { DFRandom.srand(DateTime.Now.Millisecond); displayName = DaggerfallUnity.Instance.NameHelper.MonsterName(); return; } // Randomly assign a gender for humanoid foes humanoidGender = (UnityEngine.Random.Range(0.0f, 1.0f) < 0.5f) ? Genders.Male : Genders.Female; // Create a random display name for humanoid foes DFRandom.srand(DateTime.Now.Millisecond); NameHelper.BankTypes nameBank = GameManager.Instance.PlayerGPS.GetNameBankOfCurrentRegion(); displayName = DaggerfallUnity.Instance.NameHelper.FullName(nameBank, humanoidGender); }
public override string HeldSoul() { // %hs if (parent.trappedSoulType == MobileTypes.None) { return(HardStrings.Nothing); } MobileEnemy soul; EnemyBasics.GetEnemy(parent.trappedSoulType, out soul); return(soul.Name); }
public override string HeldSoul() { // %hs if (parent.trappedSoulType == MobileTypes.None) { return(TextManager.Instance.GetLocalizedText("Nothing")); } MobileEnemy soul; EnemyBasics.GetEnemy(parent.trappedSoulType, out soul); return(TextManager.Instance.GetLocalizedEnemyName(soul.ID)); }
void ShowSecondaryAttributesGUI() { EditorGUILayout.Space(); showSecondaryAttributesFoldout = GUILayoutHelper.Foldout(showSecondaryAttributesFoldout, new GUIContent("Secondary Attributes"), () => { GUILayoutHelper.Indent(() => { EditorGUILayout.Space(); GUILayoutHelper.Horizontal(() => { EditorGUILayout.LabelField("Damage Modifier"); EditorGUILayout.SelectableLabel(FormulaHelper.DamageModifier(selectedCareer.Strength).ToString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { EditorGUILayout.LabelField("Max Encumbrance"); EditorGUILayout.SelectableLabel(FormulaHelper.MaxEncumbrance(selectedCareer.Strength).ToString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { EditorGUILayout.LabelField("Spell Points"); EditorGUILayout.SelectableLabel(FormulaHelper.SpellPoints(selectedCareer.Intelligence, selectedCareer.SpellPointMultiplierValue).ToString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { EditorGUILayout.LabelField("Magic Resist"); EditorGUILayout.SelectableLabel(FormulaHelper.MagicResist(selectedCareer.Willpower).ToString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { EditorGUILayout.LabelField("To Hit Modifier"); EditorGUILayout.SelectableLabel(FormulaHelper.ToHitModifier(selectedCareer.Agility).ToString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { EditorGUILayout.LabelField("Hit Points Modifier"); EditorGUILayout.SelectableLabel(FormulaHelper.HitPointsModifier(selectedCareer.Endurance).ToString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { EditorGUILayout.LabelField("Healing Rate Modifier"); EditorGUILayout.SelectableLabel(FormulaHelper.HealingRateModifier(selectedCareer.Endurance).ToString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); if (careerSource == CareerSource.Monsters) { MobileEnemy enemy; if (EnemyBasics.GetEnemy(selectedCareer.Name, out enemy)) { GUILayoutHelper.Horizontal(() => { string monsterHealth = string.Format("{0}-{1}", enemy.MinHealth, enemy.MaxHealth); EditorGUILayout.LabelField("Monster Health"); EditorGUILayout.SelectableLabel(monsterHealth, EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { string monsterDamage = string.Format("{0}-{1}", enemy.MinDamage, enemy.MaxDamage); EditorGUILayout.LabelField("Monster Damage 1"); EditorGUILayout.SelectableLabel(monsterDamage, EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { string monsterDamage2 = string.Format("{0}-{1}", enemy.MinDamage2, enemy.MaxDamage2); EditorGUILayout.LabelField("Monster Damage 2"); EditorGUILayout.SelectableLabel(monsterDamage2, EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { string monsterDamage3 = string.Format("{0}-{1}", enemy.MinDamage3, enemy.MaxDamage3); EditorGUILayout.LabelField("Monster Damage 3"); EditorGUILayout.SelectableLabel(monsterDamage3, EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { EditorGUILayout.LabelField("Required Metal"); EditorGUILayout.SelectableLabel(enemy.MinMetalToHit.ToString(), EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { string level = string.Format("{0}", enemy.Level); EditorGUILayout.LabelField("Level"); EditorGUILayout.SelectableLabel(level, EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); GUILayoutHelper.Horizontal(() => { string armorValue = string.Format("{0}", enemy.ArmorValue); EditorGUILayout.LabelField("Armor Value"); EditorGUILayout.SelectableLabel(armorValue, EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); }); } } }); }); }