forked from Shardstone/trail-into-darkness
som qol fixes
This commit is contained in:
@@ -23,14 +23,14 @@ namespace Nox.Game {
|
||||
}
|
||||
|
||||
var healthModifiers = modifierResolver.CollectModifiers(entityDefinition, StatType.Health);
|
||||
var staminaModifiers = modifierResolver.CollectModifiers(entityDefinition, StatType.Mana);
|
||||
var manaModifiers = modifierResolver.CollectModifiers(entityDefinition, StatType.Mana);
|
||||
var levelModifiers = modifierResolver.CollectModifiers(entityDefinition, StatType.Level);
|
||||
var experienceModifiers = modifierResolver.CollectModifiers(entityDefinition, StatType.Experience);
|
||||
|
||||
return new EntityStats {
|
||||
stats = new[] {
|
||||
new Stat(StatType.Health, modifierResolver.Resolve(baseSettings.defaultEntityStats.GetValue(StatType.Health), healthModifiers, entityDefinition)),
|
||||
new Stat(StatType.Mana, modifierResolver.Resolve(baseSettings.defaultEntityStats.GetValue(StatType.Mana), staminaModifiers, entityDefinition)),
|
||||
new Stat(StatType.Mana, modifierResolver.Resolve(baseSettings.defaultEntityStats.GetValue(StatType.Mana), manaModifiers, entityDefinition)),
|
||||
new Stat(StatType.Level, modifierResolver.Resolve(baseSettings.defaultEntityStats.GetValue(StatType.Level), levelModifiers, entityDefinition)),
|
||||
new Stat(StatType.Experience, modifierResolver.Resolve(baseSettings.defaultEntityStats.GetValue(StatType.Experience), experienceModifiers, entityDefinition))
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Nox.UI {
|
||||
private int remainingPoints;
|
||||
private readonly int[] allocatedPoints = new int[4]; // Might, Reflex, Knowledge, Perception (AttributeType 1-4)
|
||||
private int previousHealth;
|
||||
private int previousStamina;
|
||||
private int previousMana;
|
||||
|
||||
// Modifier source tracking
|
||||
private PerksData racialPerks = new();
|
||||
@@ -87,8 +87,11 @@ namespace Nox.UI {
|
||||
var canStart = characterCreationRequests is { Count: > 0 };
|
||||
characterCreationReference.startGameButton.interactable = canStart;
|
||||
};
|
||||
characterCreationReference.startGameButton.interactable = false;
|
||||
characterCreationReference.startGameButton.onClick.AddListener(() => {
|
||||
if(characterCreationRequests == null || characterCreationRequests.Count == 0) {
|
||||
inGameLogger.Log("You must accept your character before starting the game.", "#FF4444");
|
||||
return;
|
||||
}
|
||||
Hide();
|
||||
menuGameStateData.startGameRequests?.Invoke(PlayMode.Adventure);
|
||||
});
|
||||
@@ -182,7 +185,7 @@ namespace Nox.UI {
|
||||
|
||||
// Initialize previous values so first change doesn't log a delta from 0
|
||||
previousHealth = workingStats.GetValue(StatType.Health);
|
||||
previousStamina = workingStats.GetValue(StatType.Mana);
|
||||
previousMana = workingStats.GetValue(StatType.Mana);
|
||||
}
|
||||
|
||||
private void ApplyRacialBonuses() {
|
||||
@@ -291,19 +294,19 @@ namespace Nox.UI {
|
||||
|
||||
// 10. Log stat deltas
|
||||
var newHealth = workingStats.GetValue(StatType.Health);
|
||||
var newStamina = workingStats.GetValue(StatType.Mana);
|
||||
var newMana = workingStats.GetValue(StatType.Mana);
|
||||
if(newHealth != previousHealth && previousHealth != 0) {
|
||||
var delta = newHealth - previousHealth;
|
||||
var sign = delta > 0 ? "+" : "";
|
||||
inGameLogger.Log($"Health: {previousHealth} -> {newHealth} ({sign}{delta})", "#87CEEB");
|
||||
}
|
||||
if(newStamina != previousStamina && previousStamina != 0) {
|
||||
var delta = newStamina - previousStamina;
|
||||
if(newMana != previousMana && previousMana != 0) {
|
||||
var delta = newMana - previousMana;
|
||||
var sign = delta > 0 ? "+" : "";
|
||||
inGameLogger.Log($"Stamina: {previousStamina} -> {newStamina} ({sign}{delta})", "#FFFF99");
|
||||
inGameLogger.Log($"Mana: {previousMana} -> {newMana} ({sign}{delta})", "#FFFF99");
|
||||
}
|
||||
previousHealth = newHealth;
|
||||
previousStamina = newStamina;
|
||||
previousMana = newMana;
|
||||
}
|
||||
|
||||
private PerksData BuildCombinedPerks() {
|
||||
|
||||
Reference in New Issue
Block a user