Trineks Manager - WIP implementation
This commit is contained in:
@@ -23,27 +23,14 @@ namespace Beyond
|
||||
{
|
||||
[SerializeField] private List<PlayerAttribute> m_playerAttributes = new List<PlayerAttribute>();
|
||||
|
||||
/// <summary>
|
||||
/// This array defines thresholds for brightness points. It is used to define multiplier applied to player brightness point on guild. Please see code.
|
||||
/// </summary>
|
||||
public static readonly int[] BrightnessPoints_Th =
|
||||
{
|
||||
30, 20, 0,
|
||||
};
|
||||
public static readonly int[] BrightnessPoints_Th = { 30, 20, 0 };
|
||||
|
||||
public List<PlayerAttribute> Attributes => m_playerAttributes;
|
||||
|
||||
public GameObject audioSource;
|
||||
|
||||
public AudioClip[] m_onHitClips,
|
||||
m_noFaithClips,
|
||||
m_cantDoThatYetClips,
|
||||
m_BrightnessLostClips,
|
||||
m_BrightnessGainedClips,
|
||||
m_deathClips;
|
||||
|
||||
public AudioClip[] consumeDefaultSounds, consumeFaithSounds, consumeGemstoneSounds, equipWeaponSounds, equipConsumablesSounds, equipPowerSounds, unequipWeaponSounds, unequipConsumablesSounds, unequipPowerSounds, changePageSounds, changeCategorySounds, openMenuSounds,
|
||||
acceptGuiltSounds, declineGuiltSounds, fullyChargedSounds;
|
||||
public AudioClip[] m_onHitClips, m_noFaithClips, m_cantDoThatYetClips, m_BrightnessLostClips, m_BrightnessGainedClips, m_deathClips;
|
||||
public AudioClip[] consumeDefaultSounds, consumeFaithSounds, consumeGemstoneSounds, equipWeaponSounds, equipConsumablesSounds, equipPowerSounds, unequipWeaponSounds, unequipConsumablesSounds, unequipPowerSounds, changePageSounds, changeCategorySounds, openMenuSounds, acceptGuiltSounds, declineGuiltSounds, fullyChargedSounds;
|
||||
|
||||
private List<bItemType> weaponTypes = new List<bItemType> { bItemType.Swords, bItemType.Axes };
|
||||
private List<bItemType> consumablesTypes = new List<bItemType> { bItemType.Consumable, bItemType.ConsumablesFaith };
|
||||
@@ -84,7 +71,36 @@ namespace Beyond
|
||||
private bMeleeCombatInput m_meleeCombatInput;
|
||||
|
||||
public MagicAttacks Magic => m_magicAttacks;
|
||||
public bMeleeCombatInput MeleeCombatInput => m_meleeCombatInput;
|
||||
public bMeleeCombatInput MeleeCombatInput => m_meleeCombatInput;
|
||||
|
||||
// --- TRINKET SYSTEM INTEGRATION START ---
|
||||
private TrinketManager.TrinketStats m_trinketStats = new TrinketManager.TrinketStats
|
||||
{
|
||||
healthMult = 1f,
|
||||
defenseMult = 1f,
|
||||
faithMult = 1f,
|
||||
damageMult = 1f,
|
||||
speedMult = 1f,
|
||||
faithRegenMult = 1f,
|
||||
attackSpeedMult = 1f,
|
||||
thornDamageMult = 1f
|
||||
};
|
||||
|
||||
public TrinketManager.TrinketStats CurrentTrinketStats => m_trinketStats;
|
||||
|
||||
public void UpdateTrinketStats(TrinketManager.TrinketStats newStats)
|
||||
{
|
||||
m_trinketStats = newStats;
|
||||
// Force stats recalculation
|
||||
UodatePlayerStatistics();
|
||||
|
||||
// Apply immediate effects
|
||||
if (m_vController)
|
||||
{
|
||||
m_vController.speedMultiplier = m_trinketStats.speedMult;
|
||||
}
|
||||
}
|
||||
// --- TRINKET SYSTEM INTEGRATION END ---
|
||||
|
||||
public PlayerAttribute MaturityAttribute
|
||||
{
|
||||
@@ -115,35 +131,21 @@ namespace Beyond
|
||||
|
||||
private void SetMaturityAttributeIfNull()
|
||||
{
|
||||
if (maturityAttribute == null)
|
||||
{
|
||||
maturityAttribute = GetAttribute("Maturity");
|
||||
}
|
||||
if (maturityAttribute == null) maturityAttribute = GetAttribute("Maturity");
|
||||
}
|
||||
|
||||
private void SetBrightnessAttributeIfNull()
|
||||
{
|
||||
if (brightnessAttribute == null)
|
||||
{
|
||||
brightnessAttribute = GetAttribute("BrightnessPoints");
|
||||
}
|
||||
if (brightnessAttribute == null) brightnessAttribute = GetAttribute("BrightnessPoints");
|
||||
}
|
||||
|
||||
private void SetFaithAttributeIfNull()
|
||||
{
|
||||
if (maturityAttribute == null)
|
||||
{
|
||||
faithAttribute = GetAttribute("Faith");
|
||||
}
|
||||
if (maturityAttribute == null) faithAttribute = GetAttribute("Faith");
|
||||
}
|
||||
|
||||
[SerializeField] public MenuScroll menuScroll;
|
||||
|
||||
// [SerializeField]
|
||||
//private int faithRegenValue = 1;
|
||||
|
||||
// private float faithRegenTime = 1f;
|
||||
// private float faithCurrentTime = 0f;
|
||||
public float sceneDependantFaithRegenMultiplier = 1f, faithRegenMultiplier = 1f;
|
||||
|
||||
private float healthBaseMaxValue = 200;
|
||||
@@ -155,7 +157,7 @@ namespace Beyond
|
||||
private System.Action onMenuScrollClosed;
|
||||
public System.Action<float> onStatsUpdated;
|
||||
private UnityAction<Transform> onDialogueEnded;
|
||||
private bLockOn m_lockOn; //cached lock on component
|
||||
private bLockOn m_lockOn;
|
||||
public bLockOn LockOn => m_lockOn;
|
||||
private vLadderAction ladderAction;
|
||||
|
||||
@@ -167,10 +169,7 @@ namespace Beyond
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (s_instance == null)
|
||||
{
|
||||
s_instance = this;
|
||||
}
|
||||
if (s_instance == null) s_instance = this;
|
||||
else
|
||||
{
|
||||
Debug.LogError($"Player instance already exists! Destroying...({gameObject.name})");
|
||||
@@ -192,13 +191,10 @@ namespace Beyond
|
||||
m_meleeCombatInput = GetComponent<bMeleeCombatInput>();
|
||||
}
|
||||
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
//InitAttributesValues();
|
||||
HideUI.SetActive += OnCustcene;
|
||||
if (m_vInputs)
|
||||
m_vInputs.forceWalking = false;
|
||||
if (m_vInputs) m_vInputs.forceWalking = false;
|
||||
}
|
||||
|
||||
protected void Start()
|
||||
@@ -209,10 +205,7 @@ namespace Beyond
|
||||
DialogueManager.instance.conversationStarted += OnConversationStarted;
|
||||
DialogueManager.instance.conversationEnded += OnConversationEnded;
|
||||
m_Respawner.m_onRespawned.AddListener(ResetInputs);
|
||||
|
||||
// m_Respawner.m_onRespawnedStart.AddListener(ResetAnimator);
|
||||
m_vController.onDead.AddListener(ResetAnimator);
|
||||
//CheckAttributesValues();
|
||||
if (m_meleeManager)
|
||||
{
|
||||
m_meleeManager.onDamageHit.AddListener(OnDamageHit);
|
||||
@@ -221,11 +214,28 @@ namespace Beyond
|
||||
|
||||
private void OnDamageHit(vHitInfo arg0)
|
||||
{
|
||||
// Slow motion logic (existing)
|
||||
if (slowMoOnHtScale < 1f - float.Epsilon)
|
||||
{
|
||||
//TimeController.Instance.SetTimeScaleForSec(slowMoOnHtScale, slowMoOnHitTime);
|
||||
TimeController.Instance.Reset();
|
||||
}
|
||||
|
||||
// 1. Health Vampirism
|
||||
if (m_trinketStats.effectHealthVampirism)
|
||||
{
|
||||
// Logic: Heal 2% of Player's Max Health per hit
|
||||
// Mathf.Max ensures we always heal at least 1 HP
|
||||
int healAmount = Mathf.Max(1, (int)(MaxHealth * 0.02f));
|
||||
m_vController.ChangeHealth(healAmount);
|
||||
}
|
||||
|
||||
// 2. Faith Vampirism
|
||||
if (m_trinketStats.effectFaithVampirism)
|
||||
{
|
||||
// Logic: Add 1 Faith point per hit
|
||||
UpdateFaithCurrentValue(1);
|
||||
}
|
||||
// ----------------------------
|
||||
}
|
||||
|
||||
private void OnConversationStarted(Transform transform)
|
||||
@@ -247,15 +257,14 @@ namespace Beyond
|
||||
{
|
||||
RemoveAttributeListeners();
|
||||
UnregisterLuaFunctions();
|
||||
if (menuScroll != null)
|
||||
menuScroll.OnClosed -= onMenuScrollClosed;
|
||||
if (menuScroll != null) menuScroll.OnClosed -= onMenuScrollClosed;
|
||||
if (DialogueManager.instance != null)
|
||||
{
|
||||
DialogueManager.instance.conversationStarted -= OnConversationStarted;
|
||||
if (DialogueManager.instance != null)
|
||||
DialogueManager.instance.conversationEnded -= OnConversationEnded;
|
||||
}
|
||||
m_Respawner.m_onRespawned.RemoveListener(ResetInputs);
|
||||
m_Respawner.m_onRespawnedStart.RemoveListener(ResetAnimator);
|
||||
// m_vController.onDead.RemoveListener(ResetAnimatior);
|
||||
}
|
||||
|
||||
protected void Update()
|
||||
@@ -263,37 +272,11 @@ namespace Beyond
|
||||
float faith = faithAttribute.AttributeCurrentValue;
|
||||
faith += Time.deltaTime * faithRegenMultiplier;
|
||||
faithAttribute.SetValue(faith);
|
||||
/*
|
||||
faithCurrentTime += Time.deltaTime;
|
||||
|
||||
if (faithCurrentTime > faithRegenTime / faithRegenMultiplier)
|
||||
{
|
||||
faithCurrentTime -= faithCurrentTime;
|
||||
float newVal = faithAttribute.AttributeCurrentValue + 1;
|
||||
if (newVal > faithAttribute.AttributeMaxValue)
|
||||
{
|
||||
newVal = faithAttribute.AttributeMaxValue;
|
||||
}
|
||||
else if (newVal < faithAttribute.AttributeMinValue)
|
||||
{
|
||||
newVal = faithAttribute.AttributeMinValue;
|
||||
}
|
||||
faithAttribute.SetValue(newVal);
|
||||
}
|
||||
*/
|
||||
// bThirdPersonController controller = (bThirdPersonController)m_vController;
|
||||
// controller.animatorStateInfos.stateInfos.vToList().ForEach(info => { Debug.Log(info.layer); Debug.Log(info.tags.Count); info.tags.ForEach(tag => Debug.Log(tag)); });
|
||||
}
|
||||
|
||||
public void ResetInputs()
|
||||
{
|
||||
// ResetAnimator();
|
||||
bThirdPersonController controller = (bThirdPersonController)m_vController;
|
||||
//controller.triggerDieBehaviour = false;
|
||||
//m_vInputs.SetLockAllInput(false);
|
||||
//controller.EnableGravityAndCollision();
|
||||
//controller.StopCharacter();
|
||||
//controller.disableAnimations = false;
|
||||
controller.triggerDieBehaviour = false;
|
||||
ladderAction = GetComponent<vLadderAction>();
|
||||
ladderAction.ResetPlayerSettings();
|
||||
@@ -311,18 +294,11 @@ namespace Beyond
|
||||
controller.RemoveAnimatorTags();
|
||||
}
|
||||
|
||||
public void PlayNoFaithClip()
|
||||
{
|
||||
PlayRandomSound(m_noFaithClips);
|
||||
}
|
||||
|
||||
// ... [Audio Play Methods - kept same] ...
|
||||
public void PlayNoFaithClip() { PlayRandomSound(m_noFaithClips); }
|
||||
private void PlayRandomSound(AudioClip[] sounds)
|
||||
{
|
||||
//so we do not get bunch of sounds at the game start
|
||||
if (Time.timeSinceLevelLoad < 1f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Time.timeSinceLevelLoad < 1f) return;
|
||||
int soundsCount = sounds.Length;
|
||||
if (audioSource != null && soundsCount > 0)
|
||||
{
|
||||
@@ -331,161 +307,76 @@ namespace Beyond
|
||||
audioObject.GetComponent<AudioSource>().PlayOneShot(clip);
|
||||
}
|
||||
}
|
||||
|
||||
public void PlayICantDoThatYet()
|
||||
{
|
||||
PlayRandomSound(m_cantDoThatYetClips);
|
||||
}
|
||||
|
||||
public void PlayBrightnessLost()
|
||||
{
|
||||
PlayRandomSound(m_BrightnessLostClips);
|
||||
}
|
||||
|
||||
public void PlayBrightnessGained()
|
||||
{
|
||||
PlayRandomSound(m_BrightnessGainedClips);
|
||||
}
|
||||
|
||||
public void PlayMaturityGained()
|
||||
{
|
||||
PlayRandomSound(m_BrightnessGainedClips);
|
||||
}
|
||||
|
||||
public void PlayICantDoThatYet() { PlayRandomSound(m_cantDoThatYetClips); }
|
||||
public void PlayBrightnessLost() { PlayRandomSound(m_BrightnessLostClips); }
|
||||
public void PlayBrightnessGained() { PlayRandomSound(m_BrightnessGainedClips); }
|
||||
public void PlayMaturityGained() { PlayRandomSound(m_BrightnessGainedClips); }
|
||||
public void PlayConsumeSound(bItem consumedItem)
|
||||
{
|
||||
if (consumedItem.type == bItemType.ConsumablesFaith)
|
||||
{
|
||||
PlayRandomSound(consumeFaithSounds);
|
||||
}
|
||||
else if (consumedItem.type == bItemType.Gemstones)
|
||||
{
|
||||
PlayRandomSound(consumeGemstoneSounds);
|
||||
}
|
||||
else if (consumedItem.type == bItemType.PowerScroll)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayRandomSound(consumeDefaultSounds);
|
||||
}
|
||||
if (consumedItem.type == bItemType.ConsumablesFaith) PlayRandomSound(consumeFaithSounds);
|
||||
else if (consumedItem.type == bItemType.Gemstones) PlayRandomSound(consumeGemstoneSounds);
|
||||
else if (consumedItem.type == bItemType.PowerScroll) { }
|
||||
else PlayRandomSound(consumeDefaultSounds);
|
||||
}
|
||||
|
||||
public void PlayFullyChargedSound()
|
||||
{
|
||||
PlayRandomSound(fullyChargedSounds);
|
||||
}
|
||||
|
||||
public void PlayFullyChargedSound() { PlayRandomSound(fullyChargedSounds); }
|
||||
public void PlayEquipSound(bEquipArea equipArea, bItem item)
|
||||
{
|
||||
if (consumablesTypes.Contains(item.type))
|
||||
{
|
||||
PlayRandomSound(equipConsumablesSounds);
|
||||
}
|
||||
else if (weaponTypes.Contains(item.type))
|
||||
{
|
||||
PlayRandomSound(equipWeaponSounds);
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayRandomSound(equipPowerSounds);
|
||||
}
|
||||
if (consumablesTypes.Contains(item.type)) PlayRandomSound(equipConsumablesSounds);
|
||||
else if (weaponTypes.Contains(item.type)) PlayRandomSound(equipWeaponSounds);
|
||||
else PlayRandomSound(equipPowerSounds);
|
||||
}
|
||||
|
||||
public void PlayUnequipSound(bEquipArea equipArea, bItem item)
|
||||
{
|
||||
if (consumablesTypes.Contains(item.type))
|
||||
{
|
||||
PlayRandomSound(unequipConsumablesSounds);
|
||||
}
|
||||
else if (weaponTypes.Contains(item.type))
|
||||
{
|
||||
PlayRandomSound(unequipWeaponSounds);
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayRandomSound(unequipPowerSounds);
|
||||
}
|
||||
}
|
||||
|
||||
public void PlayCategoryChangeSound()
|
||||
{
|
||||
PlayRandomSound(changeCategorySounds);
|
||||
}
|
||||
|
||||
public void PlayChangePageSound()
|
||||
{
|
||||
PlayRandomSound(changePageSounds);
|
||||
}
|
||||
|
||||
public void PlayOpenMenuSound()
|
||||
{
|
||||
PlayRandomSound(openMenuSounds);
|
||||
}
|
||||
|
||||
public void PlayAcceptGuiltSound()
|
||||
{
|
||||
PlayRandomSound(acceptGuiltSounds);
|
||||
}
|
||||
|
||||
public void PlayDeclineGuiltSound()
|
||||
{
|
||||
PlayRandomSound(declineGuiltSounds);
|
||||
}
|
||||
|
||||
public void PlayOnHitSound()
|
||||
{
|
||||
PlayRandomSound(m_onHitClips);
|
||||
}
|
||||
|
||||
public void PlayOnDeathSound()
|
||||
{
|
||||
PlayRandomSound(m_deathClips);
|
||||
if (consumablesTypes.Contains(item.type)) PlayRandomSound(unequipConsumablesSounds);
|
||||
else if (weaponTypes.Contains(item.type)) PlayRandomSound(unequipWeaponSounds);
|
||||
else PlayRandomSound(unequipPowerSounds);
|
||||
}
|
||||
public void PlayCategoryChangeSound() { PlayRandomSound(changeCategorySounds); }
|
||||
public void PlayChangePageSound() { PlayRandomSound(changePageSounds); }
|
||||
public void PlayOpenMenuSound() { PlayRandomSound(openMenuSounds); }
|
||||
public void PlayAcceptGuiltSound() { PlayRandomSound(acceptGuiltSounds); }
|
||||
public void PlayDeclineGuiltSound() { PlayRandomSound(declineGuiltSounds); }
|
||||
public void PlayOnHitSound() { PlayRandomSound(m_onHitClips); }
|
||||
public void PlayOnDeathSound() { PlayRandomSound(m_deathClips); }
|
||||
|
||||
private void OnCustcene(bool b)
|
||||
{
|
||||
m_audioSource.Stop();
|
||||
m_audioSource.clip = null;
|
||||
|
||||
//on ui show player should be killable and vice versa
|
||||
m_cutScenePlaying = !b;
|
||||
m_vController.isImmortal = !b;
|
||||
// Debug.LogError("is immortal: " + m_vController.isImmortal);
|
||||
}
|
||||
|
||||
public void OnReceivedDamage(vDamage damage)
|
||||
{
|
||||
if (m_cutScenePlaying)
|
||||
return;
|
||||
if (m_cutScenePlaying) return;
|
||||
|
||||
// --- TRINKET DEFENSE CALCULATION ---
|
||||
// defenseMult of 0.9 means 90% damage taken (10% reduction)
|
||||
if (Mathf.Abs(m_trinketStats.defenseMult - 1f) > float.Epsilon)
|
||||
{
|
||||
damage.damageValue = (int)(damage.damageValue * m_trinketStats.defenseMult);
|
||||
}
|
||||
// -----------------------------------
|
||||
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
HapticEngine.ImpactFeedbackHeavy();
|
||||
#endif
|
||||
if (m_onHitClips != null && m_onHitClips.Length > 0)
|
||||
PlayOnHitSound();
|
||||
if (m_onHitClips != null && m_onHitClips.Length > 0) PlayOnHitSound();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// death sound canceled as of now
|
||||
/// </summary>
|
||||
/// <param name="gameObject"></param>
|
||||
public void OnDead(GameObject gameObject)
|
||||
{
|
||||
if (m_cutScenePlaying)
|
||||
return;
|
||||
if (m_cutScenePlaying) return;
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
HapticEngine.ImpactFeedbackHeavy();
|
||||
#endif
|
||||
if (m_deathClips != null && m_deathClips.Length > 0)
|
||||
PlayOnDeathSound();
|
||||
if (m_deathClips != null && m_deathClips.Length > 0) PlayOnDeathSound();
|
||||
}
|
||||
|
||||
public void OnCheckpoint()
|
||||
{
|
||||
if (m_Respawner)
|
||||
{
|
||||
m_Respawner.SaveRespawnPoint();
|
||||
}
|
||||
if (m_Respawner) m_Respawner.SaveRespawnPoint();
|
||||
}
|
||||
|
||||
public List<Quest> GetAllGuilts()
|
||||
@@ -495,18 +386,14 @@ namespace Beyond
|
||||
Debug.LogError("There is no Players Journal component on player game object");
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Quest> guilts = new List<Quest>();
|
||||
|
||||
for (int i = 0; i < m_questJournal.questList.Count; i++)
|
||||
{
|
||||
if (m_questJournal.questList[i].isTrackable ==
|
||||
false) // if in future will be not trackable quest we also should check quest group
|
||||
if (m_questJournal.questList[i].isTrackable == false)
|
||||
{
|
||||
guilts.Add(m_questJournal.questList[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return guilts;
|
||||
}
|
||||
|
||||
@@ -514,7 +401,6 @@ namespace Beyond
|
||||
public void Debug_DisplayAllGuilts()
|
||||
{
|
||||
var guilts = GetAllGuilts();
|
||||
|
||||
guilts.ForEach(x => Debug.LogError(x.title));
|
||||
}
|
||||
|
||||
@@ -522,12 +408,8 @@ namespace Beyond
|
||||
{
|
||||
for (int i = 0; i < m_playerAttributes.Count; i++)
|
||||
{
|
||||
if (m_playerAttributes[i].AttributeName == name)
|
||||
{
|
||||
return m_playerAttributes[i];
|
||||
}
|
||||
if (m_playerAttributes[i].AttributeName == name) return m_playerAttributes[i];
|
||||
}
|
||||
|
||||
Debug.LogError("There is no player attribute such " + name);
|
||||
return null;
|
||||
}
|
||||
@@ -535,22 +417,14 @@ namespace Beyond
|
||||
public void SetAttribute(string name, int value)
|
||||
{
|
||||
PlayerAttribute playerAttribute = GetAttribute(name);
|
||||
if (playerAttribute == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (playerAttribute == null) return;
|
||||
playerAttribute.SetValue(value);
|
||||
}
|
||||
|
||||
public void SetAttribute(PlayerAttribute attribute)
|
||||
{
|
||||
PlayerAttribute playerAttribute = GetAttribute(attribute.AttributeName);
|
||||
if (playerAttribute == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (playerAttribute == null) return;
|
||||
playerAttribute.SetValue(attribute);
|
||||
}
|
||||
|
||||
@@ -566,24 +440,16 @@ namespace Beyond
|
||||
|
||||
private void InitAttributListeners()
|
||||
{
|
||||
//add listener
|
||||
brightnessAttribute = GetAttribute("BrightnessPoints");
|
||||
if (brightnessAttribute != null)
|
||||
{
|
||||
brightnessAttribute.OnValueChanged.AddListener(OnBrightnessPointsValueChanged);
|
||||
brightnessAttribute.OnValueChanged.AddListener(UpdatePlayerStatisticsOnBrightnessChange);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Couldnt get Brightness attribute ");
|
||||
}
|
||||
else Debug.LogError("Couldnt get Brightness attribute ");
|
||||
|
||||
faithAttribute = GetAttribute("Faith");
|
||||
|
||||
if (faithAttribute == null)
|
||||
{
|
||||
Debug.LogError("Couldnt get Faith attribute ");
|
||||
}
|
||||
if (faithAttribute == null) Debug.LogError("Couldnt get Faith attribute ");
|
||||
|
||||
maturityAttribute = GetAttribute("Maturity");
|
||||
if (maturityAttribute != null)
|
||||
@@ -591,10 +457,7 @@ namespace Beyond
|
||||
maturityAttribute.OnValueChanged.AddListener(UpdatePlayerStatisticsOnMaturityChange);
|
||||
maturityAttribute.OnValueChanged.AddListener(OnMaturityPointsValueChanged);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Couldnt get Maturity attribute ");
|
||||
}
|
||||
else Debug.LogError("Couldnt get Maturity attribute ");
|
||||
}
|
||||
|
||||
private void RemoveAttributeListeners()
|
||||
@@ -622,9 +485,7 @@ namespace Beyond
|
||||
|
||||
public void UodatePlayerStatistics()
|
||||
{
|
||||
float maturityMupltiplier = (float)(1 +
|
||||
(float)(0.5f * maturityAttribute.AttributeCurrentValue /
|
||||
maturityAttribute.AttributeMaxValue));
|
||||
float maturityMupltiplier = (float)(1 + (float)(0.5f * maturityAttribute.AttributeCurrentValue / maturityAttribute.AttributeMaxValue));
|
||||
float maxBrightness = brightnessAttribute.AttributeMaxValue;
|
||||
float halfB = maxBrightness / 2;
|
||||
float brightnessMultiplier = 1 + (brightnessAttribute.AttributeCurrentValue - halfB) / halfB;
|
||||
@@ -634,9 +495,7 @@ namespace Beyond
|
||||
|
||||
public void UpdatePlayerStatisticsOnBrightnessChange(float val = 0, float prevVal = 0)
|
||||
{
|
||||
float maturityMupltiplier = (float)(1 +
|
||||
(float)(0.5f * maturityAttribute.AttributeCurrentValue /
|
||||
maturityAttribute.AttributeMaxValue));
|
||||
float maturityMupltiplier = (float)(1 + (float)(0.5f * maturityAttribute.AttributeCurrentValue / maturityAttribute.AttributeMaxValue));
|
||||
float maxBrightness = brightnessAttribute.AttributeMaxValue;
|
||||
float halfB = maxBrightness / 2;
|
||||
float brightnessMultiplier = 1 + (val - halfB) / halfB;
|
||||
@@ -646,18 +505,34 @@ namespace Beyond
|
||||
|
||||
private void SetPlayerStatisticsBasedOn(float finalMultiplier)
|
||||
{
|
||||
faithRegenMultiplier = sceneDependantFaithRegenMultiplier * finalMultiplier;
|
||||
faithAttribute.AttributeMaxValue = Mathf.RoundToInt(faithBaseMaxValue * finalMultiplier);
|
||||
m_vController.maxHealth = Mathf.RoundToInt(finalMultiplier * healthBaseMaxValue);
|
||||
// --- TRINKET INTEGRATION IN STATS CALCULATION ---
|
||||
|
||||
// Faith Regen
|
||||
faithRegenMultiplier = sceneDependantFaithRegenMultiplier * finalMultiplier * m_trinketStats.faithRegenMult;
|
||||
|
||||
// Max Faith
|
||||
float totalFaithMult = finalMultiplier * m_trinketStats.faithMult;
|
||||
faithAttribute.AttributeMaxValue = Mathf.RoundToInt(faithBaseMaxValue * totalFaithMult);
|
||||
|
||||
// Max Health
|
||||
float totalHealthMult = finalMultiplier * m_trinketStats.healthMult;
|
||||
m_vController.maxHealth = Mathf.RoundToInt(totalHealthMult * healthBaseMaxValue);
|
||||
|
||||
// Reset health if caps changed downwards
|
||||
if (m_vController.maxHealth < m_vController.currentHealth)
|
||||
{
|
||||
m_vController.ResetHealth();
|
||||
}
|
||||
|
||||
// Health Recovery
|
||||
m_vController.SetHealthRecovery(finalMultiplier * healthBaseRegenValue);
|
||||
|
||||
// Stamina (assuming no trinket mult for stamina yet, if needed add m_trinketStats.staminaMult)
|
||||
m_vController.maxStamina = Mathf.Round(finalMultiplier * staminaBaseMaxValue);
|
||||
m_vController.staminaRecovery = (finalMultiplier * staminaBaseRegenValue);
|
||||
|
||||
// ------------------------------------------------
|
||||
|
||||
onStatsUpdated?.Invoke(finalMultiplier);
|
||||
}
|
||||
|
||||
@@ -675,51 +550,17 @@ namespace Beyond
|
||||
public void UpdateMaturityCurrentValue(int valueChange, int prevVal)
|
||||
{
|
||||
float newVal = maturityAttribute.AttributeCurrentValue + valueChange;
|
||||
|
||||
if (newVal > maturityAttribute.AttributeMaxValue)
|
||||
{
|
||||
newVal = maturityAttribute.AttributeMaxValue;
|
||||
}
|
||||
else if (newVal < maturityAttribute.AttributeMinValue)
|
||||
{
|
||||
newVal = maturityAttribute.AttributeMinValue;
|
||||
}
|
||||
|
||||
if (newVal > maturityAttribute.AttributeMaxValue) newVal = maturityAttribute.AttributeMaxValue;
|
||||
else if (newVal < maturityAttribute.AttributeMinValue) newVal = maturityAttribute.AttributeMinValue;
|
||||
maturityAttribute.SetValue(newVal);
|
||||
}
|
||||
|
||||
public float GetCurrentMaturityValue()
|
||||
{
|
||||
return maturityAttribute.AttributeCurrentValue;
|
||||
}
|
||||
|
||||
public double GetBrightness()
|
||||
{
|
||||
var attr = GetAttribute("BrightnessPoints");
|
||||
return (double)attr.AttributeCurrentValue;
|
||||
}
|
||||
|
||||
public void SetBrightness(double value)
|
||||
{
|
||||
brightnessAttribute.SetValue((int)value);
|
||||
//attr.CheckValueWithDatabase();
|
||||
}
|
||||
|
||||
public double GetMaturity()
|
||||
{
|
||||
var attr = GetAttribute("Maturity");
|
||||
return (double)attr.AttributeCurrentValue;
|
||||
}
|
||||
|
||||
public void SetMaturity(double value)
|
||||
{
|
||||
maturityAttribute.SetValue((int)value);
|
||||
}
|
||||
|
||||
public void UpdateBrightnessCurrentValue(int points)
|
||||
{
|
||||
UpdateBrightnessCurrentValue((float)points);
|
||||
}
|
||||
public float GetCurrentMaturityValue() { return maturityAttribute.AttributeCurrentValue; }
|
||||
public double GetBrightness() { var attr = GetAttribute("BrightnessPoints"); return (double)attr.AttributeCurrentValue; }
|
||||
public void SetBrightness(double value) { brightnessAttribute.SetValue((int)value); }
|
||||
public double GetMaturity() { var attr = GetAttribute("Maturity"); return (double)attr.AttributeCurrentValue; }
|
||||
public void SetMaturity(double value) { maturityAttribute.SetValue((int)value); }
|
||||
public void UpdateBrightnessCurrentValue(int points) { UpdateBrightnessCurrentValue((float)points); }
|
||||
|
||||
[Button]
|
||||
public void UpdateBrightnessCurrentValue(float points)
|
||||
@@ -729,26 +570,14 @@ namespace Beyond
|
||||
float multiplier = 1f;
|
||||
for (int i = 0; i < BrightnessPoints_Th.Length; i++)
|
||||
{
|
||||
if (brightnessAttribute.AttributeCurrentValue < BrightnessPoints_Th[i])
|
||||
{
|
||||
multiplier *= 0.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (brightnessAttribute.AttributeCurrentValue < BrightnessPoints_Th[i]) multiplier *= 0.5f;
|
||||
else break;
|
||||
}
|
||||
|
||||
brightnessAttribute.SetValue(brightnessAttribute.AttributeCurrentValue + (int)(points * multiplier));
|
||||
}
|
||||
else
|
||||
{
|
||||
//add only 50% of points if player is not confesed
|
||||
if (brightnessAttribute.AttributeCurrentValue < 50)
|
||||
{
|
||||
points = points / 2;
|
||||
}
|
||||
|
||||
if (brightnessAttribute.AttributeCurrentValue < 50) points = points / 2;
|
||||
brightnessAttribute.SetValue(brightnessAttribute.AttributeCurrentValue + points);
|
||||
}
|
||||
}
|
||||
@@ -765,16 +594,11 @@ namespace Beyond
|
||||
else if (DialogueManager.instance.IsConversationActive)
|
||||
{
|
||||
onMenuScrollClosed = () => { BarkBrightnessChange(value, prevValues); };
|
||||
// DialogueManager.instance.OnEndConversation += onMenuScrollClosed;
|
||||
var events = DialogueManager.instance.GetComponent<DialogueSystemEvents>();
|
||||
onMenuScrollClosed = () => { BarkBrightnessChange(value, prevValues); };
|
||||
// UnityEvent<Transform> ev= (transform) => { BarkBrightnessChange(value, prevValues); };
|
||||
onDialogueEnded = (transform) => { BarkBrightnessChange(value, prevValues); };
|
||||
// events.onConversationEnd += onDialogueEnded;
|
||||
events.conversationEvents.onConversationEnd.AddListener(onDialogueEnded);
|
||||
return;
|
||||
}
|
||||
|
||||
BarkBrightnessChange(value, prevValues);
|
||||
}
|
||||
|
||||
@@ -787,20 +611,9 @@ namespace Beyond
|
||||
public void BarkBrightnessChange(float value, float prevValues)
|
||||
{
|
||||
float difference = Mathf.Abs(value - prevValues);
|
||||
|
||||
if (difference < 1f)
|
||||
{
|
||||
//to not spam with small gains
|
||||
}
|
||||
else if (value > prevValues)
|
||||
{
|
||||
DialogueManager.BarkString("Brightness Points Gained!", Player.Instance.transform);
|
||||
}
|
||||
else
|
||||
{
|
||||
DialogueManager.BarkString("Brightness Points Lost!", Player.Instance.transform);
|
||||
}
|
||||
|
||||
if (difference < 1f) { }
|
||||
else if (value > prevValues) DialogueManager.BarkString("Brightness Points Gained!", Player.Instance.transform);
|
||||
else DialogueManager.BarkString("Brightness Points Lost!", Player.Instance.transform);
|
||||
ClearOnMenuScrollClosed();
|
||||
}
|
||||
|
||||
@@ -808,7 +621,6 @@ namespace Beyond
|
||||
{
|
||||
menuScroll.OnClosed -= onMenuScrollClosed;
|
||||
onMenuScrollClosed = null;
|
||||
|
||||
if (onDialogueEnded != null)
|
||||
{
|
||||
var events = DialogueManager.instance.GetComponent<DialogueSystemEvents>();
|
||||
@@ -817,16 +629,8 @@ namespace Beyond
|
||||
}
|
||||
}
|
||||
|
||||
public float GetCurrentFaithValue()
|
||||
{
|
||||
return faithAttribute.AttributeCurrentValue;
|
||||
}
|
||||
|
||||
public void UpdateFaithCurrentValue(int valueChange)
|
||||
{
|
||||
UpdateFaithCurrentValue((float)valueChange);
|
||||
}
|
||||
|
||||
public float GetCurrentFaithValue() { return faithAttribute.AttributeCurrentValue; }
|
||||
public void UpdateFaithCurrentValue(int valueChange) { UpdateFaithCurrentValue((float)valueChange); }
|
||||
public void UpdateFaithCurrentValue(float valueChange)
|
||||
{
|
||||
float newVal = faithAttribute.AttributeCurrentValue + valueChange;
|
||||
@@ -835,31 +639,19 @@ namespace Beyond
|
||||
|
||||
public void SetInteractableButtonImage(Sprite image)
|
||||
{
|
||||
if (!defaultInteractionImage)
|
||||
{
|
||||
defaultInteractionImage = interactionImage.sprite;
|
||||
}
|
||||
|
||||
if (!defaultInteractionImage) defaultInteractionImage = interactionImage.sprite;
|
||||
interactionImage.sprite = image;
|
||||
}
|
||||
|
||||
public void ResetIntaractableButtonImage()
|
||||
{
|
||||
if (!defaultInteractionImage)
|
||||
{
|
||||
defaultInteractionImage = interactionImage.sprite;
|
||||
}
|
||||
|
||||
if (!defaultInteractionImage) defaultInteractionImage = interactionImage.sprite;
|
||||
interactionImage.sprite = defaultInteractionImage;
|
||||
}
|
||||
|
||||
public void SetDialogueIntaractableButtonImage()
|
||||
{
|
||||
if (!defaultInteractionImage)
|
||||
{
|
||||
defaultInteractionImage = interactionImage.sprite;
|
||||
}
|
||||
|
||||
if (!defaultInteractionImage) defaultInteractionImage = interactionImage.sprite;
|
||||
interactionImage.sprite = dialogueInteractionImage;
|
||||
}
|
||||
|
||||
@@ -871,49 +663,24 @@ namespace Beyond
|
||||
|
||||
public void PlaySingleSound(AudioClip clipToPlay, bool destroyAfterPlaying = true)
|
||||
{
|
||||
// Opcjonalne op<6F>nienie na starcie poziomu, aby unikn<6B><6E> "spamowania" d<>wi<77>kami
|
||||
if (Time.timeSinceLevelLoad < 0.5f && clipToPlay != null)
|
||||
if (Time.timeSinceLevelLoad < 0.5f && clipToPlay != null) { }
|
||||
if (this.audioSource == null)
|
||||
{
|
||||
// Mo<4D>esz chcie<69> to odkomentowa<77>, je<6A>li d<>wi<77>ki na starcie s<> problemem
|
||||
// return;
|
||||
}
|
||||
|
||||
if (this.audioSource == null) // this.audioSource to pole GameObject (prefab) w Player.cs
|
||||
{
|
||||
Debug.LogWarning("Player's 'audioSource' (GameObject prefab) is not assigned in Inspector. Cannot play sound: " + (clipToPlay ? clipToPlay.name : "Unknown clip"));
|
||||
return;
|
||||
}
|
||||
if (clipToPlay == null)
|
||||
{
|
||||
Debug.LogWarning("Attempted to play a null AudioClip.");
|
||||
Debug.LogWarning("Player's 'audioSource' is not assigned.");
|
||||
return;
|
||||
}
|
||||
if (clipToPlay == null) return;
|
||||
|
||||
// Instancjonowanie prefabu d<>wi<77>kowego
|
||||
// Upewnij si<73>, <20>e prefab 'audioSource' ma komponent AudioSource
|
||||
GameObject audioObjectInstance = Instantiate(this.audioSource, transform.position, transform.rotation);
|
||||
AudioSource sourceComponent = audioObjectInstance.GetComponent<AudioSource>();
|
||||
|
||||
if (sourceComponent != null)
|
||||
{
|
||||
// PlayOneShot jest dobre dla efekt<6B>w, nie przerywa innych d<>wi<77>k<EFBFBD>w na tym samym source,
|
||||
// je<6A>li s<> one odtwarzane przez .Play() i nie u<>ywaj<61> tego samego kana<6E>u.
|
||||
sourceComponent.PlayOneShot(clipToPlay);
|
||||
|
||||
if (destroyAfterPlaying)
|
||||
{
|
||||
// Niszczymy obiekt GameObject zawieraj<61>cy AudioSource po zako<6B>czeniu odtwarzania klipu.
|
||||
// Dodajemy ma<6D>y bufor czasowy, aby upewni<6E> si<73>, <20>e d<>wi<77>k zd<7A><64>y si<73> odtworzy<7A> w ca<63>o<EFBFBD>ci.
|
||||
Destroy(audioObjectInstance, clipToPlay.length + 0.1f);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("The instantiated 'audioSource' prefab (from Player.cs) does not have an AudioSource component. Destroying instance.");
|
||||
Destroy(audioObjectInstance); // Posprz<72>taj, je<6A>li co<63> posz<73>o nie tak
|
||||
if (destroyAfterPlaying) Destroy(audioObjectInstance, clipToPlay.length + 0.1f);
|
||||
}
|
||||
else Destroy(audioObjectInstance);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
@@ -921,16 +688,13 @@ namespace Beyond
|
||||
{
|
||||
public string AttributeName;
|
||||
public float AttributeCurrentValue;
|
||||
|
||||
public float AttributeMaxValue;
|
||||
public float AttributeMinValue = 0;
|
||||
|
||||
public UnityEvent<float, float> OnValueChanged;
|
||||
|
||||
public void SetValue(PlayerAttribute attribute)
|
||||
{
|
||||
if (attribute.AttributeName != AttributeName)
|
||||
return;
|
||||
if (attribute.AttributeName != AttributeName) return;
|
||||
AttributeMaxValue = attribute.AttributeMaxValue;
|
||||
AttributeMinValue = attribute.AttributeMinValue;
|
||||
SetValue(attribute.AttributeCurrentValue);
|
||||
@@ -938,8 +702,6 @@ namespace Beyond
|
||||
|
||||
public void Init()
|
||||
{
|
||||
//var variable = DialogueLua.GetVariable(AttributeName).asInt;
|
||||
//AttributeCurrentValue = variable;
|
||||
DialogueLua.SetVariable(AttributeName, AttributeCurrentValue);
|
||||
}
|
||||
|
||||
@@ -947,36 +709,14 @@ namespace Beyond
|
||||
{
|
||||
if (value != AttributeCurrentValue)
|
||||
{
|
||||
/*
|
||||
if (value > AttributeMaxValue || value < AttributeMinValue)
|
||||
{
|
||||
Debug.LogWarning(
|
||||
$"Can't set variable. Out of range. AttributeName={AttributeName} with value want to be set to: {value}");
|
||||
return;
|
||||
}
|
||||
*/
|
||||
value = value > AttributeMaxValue ? AttributeMaxValue : value;
|
||||
value = value < AttributeMinValue ? AttributeMinValue : value;
|
||||
|
||||
OnValueChanged?.Invoke(value, AttributeCurrentValue);
|
||||
AttributeCurrentValue = value;
|
||||
DialogueLua.SetVariable(AttributeName, value);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public void CheckValueWithDatabase()
|
||||
{
|
||||
var variable = DialogueLua.GetVariable(AttributeName).asInt;
|
||||
if (variable == AttributeCurrentValue)
|
||||
{
|
||||
return;
|
||||
}
|
||||
AttributeCurrentValue = variable;
|
||||
OnValueChangedDatabase?.Invoke(variable);
|
||||
}
|
||||
*/
|
||||
|
||||
public void ClearValue()
|
||||
{
|
||||
AttributeCurrentValue = AttributeMinValue;
|
||||
|
||||
8
Assets/Scripts/Characters/Trinkets.meta
Normal file
8
Assets/Scripts/Characters/Trinkets.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c25b2a968165e4343811e5c63654e77b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -19,6 +19,7 @@ MonoBehaviour:
|
||||
piles of rubbish.
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 11
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -73,6 +74,7 @@ MonoBehaviour:
|
||||
over all creation.\u202F\u202F\_\r"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 16
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -126,6 +128,7 @@ MonoBehaviour:
|
||||
\r\nSusceptible to Melee Weapon and Fire.\r"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 14
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -179,6 +182,7 @@ MonoBehaviour:
|
||||
description: "The main currency in Vasiliean\u2019s lands."
|
||||
secondaryDescription: Secondary Description
|
||||
type: 13
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -236,6 +240,7 @@ MonoBehaviour:
|
||||
dolor.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 9
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -302,6 +307,7 @@ MonoBehaviour:
|
||||
It can be used to push away enemies or shatter their shields."
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 11
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -352,6 +358,7 @@ MonoBehaviour:
|
||||
description: Agate description.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 21
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -405,6 +412,7 @@ MonoBehaviour:
|
||||
are fear, manipulation, and lies.\u202F\_\r"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 17
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -454,6 +462,7 @@ MonoBehaviour:
|
||||
description: Golden Key
|
||||
secondaryDescription: Secondary Description
|
||||
type: 13
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -502,6 +511,7 @@ MonoBehaviour:
|
||||
food. Regenerates vitality.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -551,6 +561,7 @@ MonoBehaviour:
|
||||
description: Seed of Understanding.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 13
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -601,6 +612,7 @@ MonoBehaviour:
|
||||
Kingdom.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 21
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -656,6 +668,7 @@ MonoBehaviour:
|
||||
Tritellurians are likely to encounter in corrupted realms.\u202F\_\r"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 16
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -709,6 +722,7 @@ MonoBehaviour:
|
||||
used to prepare healing potions. Regenerates vitality.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -765,6 +779,7 @@ MonoBehaviour:
|
||||
their dark magic. Can be also used t oclear the passage ways. '
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 11
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -818,6 +833,7 @@ MonoBehaviour:
|
||||
the shadows in their corrupted cloud form. "
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 20
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -874,6 +890,7 @@ MonoBehaviour:
|
||||
Meat to eat.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -926,6 +943,7 @@ MonoBehaviour:
|
||||
food. Regenerates vitality.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -983,6 +1001,7 @@ MonoBehaviour:
|
||||
by El:\_\r</b>\nBreath of life\r\n"
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 10
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1031,6 +1050,7 @@ MonoBehaviour:
|
||||
situations of great evil and corruption.\u202F\_\r"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 16
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1086,6 +1106,7 @@ MonoBehaviour:
|
||||
Way of the Tree of Life.\_"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 15
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1139,6 +1160,7 @@ MonoBehaviour:
|
||||
vitality.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1200,6 +1222,7 @@ MonoBehaviour:
|
||||
body, soul, and spirit.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1268,6 +1291,7 @@ MonoBehaviour:
|
||||
their dark magic. Can be also used t oclear the passage ways. '
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 20
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1325,6 +1349,7 @@ MonoBehaviour:
|
||||
Regenerates vitality.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1374,6 +1399,7 @@ MonoBehaviour:
|
||||
description: Ligure description.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 21
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1432,6 +1458,7 @@ MonoBehaviour:
|
||||
vitality, faith, and brightness.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1503,6 +1530,7 @@ MonoBehaviour:
|
||||
of Light.\u202F\_\r\n"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 16
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1559,6 +1587,7 @@ MonoBehaviour:
|
||||
like Aldus PageMaker including versions of Lorem Ipsum.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 8
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1623,6 +1652,7 @@ MonoBehaviour:
|
||||
to heal plants and other creatures by breathing life into them. '
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 20
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1681,6 +1711,7 @@ MonoBehaviour:
|
||||
or attack B."
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 20
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1736,6 +1767,7 @@ MonoBehaviour:
|
||||
incoming threads from natural or supernatural realms. '
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 20
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1799,6 +1831,7 @@ MonoBehaviour:
|
||||
by Hey:</b>\_\r\nSong of Whispers"
|
||||
secondaryDescription: Scan spell description
|
||||
type: 10
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1846,6 +1879,7 @@ MonoBehaviour:
|
||||
description: Emerald description.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 21
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1900,6 +1934,7 @@ MonoBehaviour:
|
||||
or attack B."
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 11
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -1950,6 +1985,7 @@ MonoBehaviour:
|
||||
description: Gold is an ordinary ore often found by the rivers and in caves.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 13
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2003,6 +2039,7 @@ MonoBehaviour:
|
||||
rusty axe that will get the job done.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 9
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2085,6 +2122,7 @@ MonoBehaviour:
|
||||
food. Regenerates vitality.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2139,6 +2177,7 @@ MonoBehaviour:
|
||||
without them knowing they are being seen. '
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 11
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2192,6 +2231,7 @@ MonoBehaviour:
|
||||
Regenerates vitality.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2242,6 +2282,7 @@ MonoBehaviour:
|
||||
Kingdom.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 21
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2299,6 +2340,7 @@ MonoBehaviour:
|
||||
It can be used to push away enemies or shatter their shields."
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 20
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2357,6 +2399,7 @@ MonoBehaviour:
|
||||
vitality, faith, and brightness.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2425,6 +2468,7 @@ MonoBehaviour:
|
||||
and treasures waiting to be discovered.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 15
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2479,6 +2523,7 @@ MonoBehaviour:
|
||||
without them knowing they are being seen. '
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 20
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2533,6 +2578,7 @@ MonoBehaviour:
|
||||
description: Amethyst description
|
||||
secondaryDescription: Secondary Description
|
||||
type: 21
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2583,6 +2629,7 @@ MonoBehaviour:
|
||||
description: Cut Diamond description.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 21
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2637,6 +2684,7 @@ MonoBehaviour:
|
||||
can give damage to creatures in Shadow Scent form.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 14
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2685,6 +2733,7 @@ MonoBehaviour:
|
||||
in order to achieve egoistic desires and goals.\_\_\r"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 17
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2734,6 +2783,7 @@ MonoBehaviour:
|
||||
description: Resources examplary item description
|
||||
secondaryDescription: Secondary Description
|
||||
type: 13
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2871,7 +2921,9 @@ MonoBehaviour:
|
||||
- {fileID: 5246864980739031576}
|
||||
- {fileID: 95561586271533144}
|
||||
- {fileID: -5307908156765189853}
|
||||
inEdition: 1
|
||||
- {fileID: 6848363969753274938}
|
||||
- {fileID: 7127115710233842467}
|
||||
inEdition: 0
|
||||
itemsHidden: 1
|
||||
--- !u!114 &13007762861001616
|
||||
MonoBehaviour:
|
||||
@@ -2897,6 +2949,7 @@ MonoBehaviour:
|
||||
Susceptible to Sharp Melee Weapon and Quantum Power.\r"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 14
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -2951,6 +3004,7 @@ MonoBehaviour:
|
||||
that allow the use of limited portions of Quanta Power."
|
||||
secondaryDescription: Secondary Description
|
||||
type: 17
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3004,6 +3058,7 @@ MonoBehaviour:
|
||||
cuts through butter. Susceptible to Sharp Melee Weapon and Quantum Power."
|
||||
secondaryDescription: Secondary Description
|
||||
type: 14
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3056,6 +3111,7 @@ MonoBehaviour:
|
||||
food. Regenerates vitality.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3111,6 +3167,7 @@ MonoBehaviour:
|
||||
has been brave enough to try \u2026. "
|
||||
secondaryDescription: Secondary Description
|
||||
type: 14
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3169,6 +3226,7 @@ MonoBehaviour:
|
||||
Justice\r\nPurifying Blaze\r\n\r\n<b>Skill revealed by Shin:\_\r</b>\nFlame Walker"
|
||||
secondaryDescription: And this is spell push description
|
||||
type: 10
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3216,6 +3274,7 @@ MonoBehaviour:
|
||||
description: Justice seed.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 13
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3272,6 +3331,7 @@ MonoBehaviour:
|
||||
or hidden matter in an alternate realm can be seen.\_\r"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 17
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3324,6 +3384,7 @@ MonoBehaviour:
|
||||
shadows and ghosts.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 8
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3412,6 +3473,7 @@ MonoBehaviour:
|
||||
of Light. Its properties and usage are yet to be discovered. '
|
||||
secondaryDescription: Secondary Description
|
||||
type: 21
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3466,6 +3528,7 @@ MonoBehaviour:
|
||||
description: Sardius description.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 21
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3522,6 +3585,7 @@ MonoBehaviour:
|
||||
Ayin:</b>\_\r\nTo give sight and reveal secrets\_\r\n"
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 10
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 21300000, guid: 686309ee74ddecf4881a11c0f29efcc6, type: 3}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3574,6 +3638,7 @@ MonoBehaviour:
|
||||
to Sharp Melee Weapon and Quantum Power."
|
||||
secondaryDescription: Secondary Description
|
||||
type: 14
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3630,6 +3695,7 @@ MonoBehaviour:
|
||||
rutrum lectus, nec cursus arcu leo vitae risus.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 9
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3701,6 +3767,7 @@ MonoBehaviour:
|
||||
vitality, faith, and brightness.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3776,6 +3843,7 @@ MonoBehaviour:
|
||||
consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?
|
||||
secondaryDescription: Secondary Description
|
||||
type: 15
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3824,6 +3892,7 @@ MonoBehaviour:
|
||||
valuable because they can be used to upgrade skills - and much, much more.\_"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 18
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3873,6 +3942,7 @@ MonoBehaviour:
|
||||
description: Topaz description.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 21
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3930,6 +4000,7 @@ MonoBehaviour:
|
||||
and function of Chet:\_\r</b>\nTo chamber and protect new life\_\r\n"
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 10
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -3982,6 +4053,7 @@ MonoBehaviour:
|
||||
and Fire.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 14
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4035,6 +4107,7 @@ MonoBehaviour:
|
||||
faith.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 22
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4098,6 +4171,7 @@ MonoBehaviour:
|
||||
consequatur aut perferendis doloribus asperiores repellat.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 15
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4143,6 +4217,7 @@ MonoBehaviour:
|
||||
description: Onyx description.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 21
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4195,6 +4270,7 @@ MonoBehaviour:
|
||||
to each other.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 17
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4272,6 +4348,7 @@ MonoBehaviour:
|
||||
divine order into the lands.\u202F\_\r\nGuards the <b>Pathway of Honor</b>\n"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 16
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4322,6 +4399,7 @@ MonoBehaviour:
|
||||
creature''s body tissue. '
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 20
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4379,6 +4457,7 @@ MonoBehaviour:
|
||||
food. Regenerates vitality.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4431,6 +4510,7 @@ MonoBehaviour:
|
||||
can remain visible and tangible while entering into a new realm.\_\_"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 17
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4482,6 +4562,7 @@ MonoBehaviour:
|
||||
light making them more powerful and unlocking bonus features. '
|
||||
secondaryDescription: Secondary Description
|
||||
type: 21
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4539,6 +4620,7 @@ MonoBehaviour:
|
||||
heavy sword, an old friend that Bascileus can count on.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 8
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4618,6 +4700,7 @@ MonoBehaviour:
|
||||
description: Jasper description.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 21
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4671,6 +4754,7 @@ MonoBehaviour:
|
||||
in order to rule and protect the realms of the kingdom.\_"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 16
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4730,6 +4814,7 @@ MonoBehaviour:
|
||||
and the consequences of corruption.\r"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 17
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4783,6 +4868,7 @@ MonoBehaviour:
|
||||
expect to get away \u2013 their vicious Hellhounds will track you down.\r"
|
||||
secondaryDescription: Secondary Description
|
||||
type: 14
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4835,6 +4921,7 @@ MonoBehaviour:
|
||||
food. Regenerates vitality.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4886,6 +4973,7 @@ MonoBehaviour:
|
||||
piles of rubbish.
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 20
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4923,6 +5011,60 @@ MonoBehaviour:
|
||||
onDestroy:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &6848363969753274938
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f26af1dba799d7b438a8964126ada88a, type: 3}
|
||||
m_Name: Azure Gem
|
||||
m_EditorClassIdentifier:
|
||||
id: 96
|
||||
secondaryName: secondary Name
|
||||
description: Azure Gem - gives max health bonus
|
||||
secondaryDescription: Secondary Description
|
||||
type: 23
|
||||
trinketColor: 1
|
||||
icon: {fileID: 21300000, guid: 9e637b82da7408b45b28a9180b62ef60, type: 3}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
iconPath:
|
||||
secondaryIconPath:
|
||||
teriaryIconPath:
|
||||
stackable: 0
|
||||
maxStack: 1
|
||||
amount: 0
|
||||
originalObject: {fileID: 0}
|
||||
dropObject: {fileID: 0}
|
||||
attributes:
|
||||
- name: 21
|
||||
value: 50
|
||||
isOpen: 0
|
||||
isBool: 0
|
||||
- name: 22
|
||||
value: 10
|
||||
isOpen: 0
|
||||
isBool: 0
|
||||
isInEquipArea: 0
|
||||
checkColor: {r: 0, g: 1, b: 1, a: 1}
|
||||
isEquiped: 0
|
||||
destroyAfterUse: 0
|
||||
canBeUsed: 1
|
||||
canBeDroped: 0
|
||||
canBeDestroyed: 0
|
||||
EnableAnim: LowBack
|
||||
DisableAnim: LowBack
|
||||
enableDelayTime: 0.5
|
||||
disableDelayTime: 0.5
|
||||
customHandler:
|
||||
twoHandWeapon: 0
|
||||
onDestroy:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &6943909457763162876
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -4947,6 +5089,7 @@ MonoBehaviour:
|
||||
by accident, sometimes on purpose (injected humour and the like).
|
||||
secondaryDescription: Secondary Description
|
||||
type: 14
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -4994,6 +5137,7 @@ MonoBehaviour:
|
||||
is able to give damage to invisible enemies.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 8
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -5064,6 +5208,56 @@ MonoBehaviour:
|
||||
onDestroy:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &7127115710233842467
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f26af1dba799d7b438a8964126ada88a, type: 3}
|
||||
m_Name: Crimson Shard
|
||||
m_EditorClassIdentifier:
|
||||
id: 97
|
||||
secondaryName: secondary Name
|
||||
description: 'Damage Bonus Percentage: 20%'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 23
|
||||
trinketColor: 2
|
||||
icon: {fileID: 21300000, guid: 6952ccd6683db8344967f5c66ccd4dfa, type: 3}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
iconPath:
|
||||
secondaryIconPath:
|
||||
teriaryIconPath:
|
||||
stackable: 0
|
||||
maxStack: 1
|
||||
amount: 0
|
||||
originalObject: {fileID: 0}
|
||||
dropObject: {fileID: 0}
|
||||
attributes:
|
||||
- name: 24
|
||||
value: 20
|
||||
isOpen: 0
|
||||
isBool: 0
|
||||
isInEquipArea: 0
|
||||
checkColor: {r: 0.5372549, g: 0, b: 0, a: 1}
|
||||
isEquiped: 0
|
||||
destroyAfterUse: 0
|
||||
canBeUsed: 1
|
||||
canBeDroped: 0
|
||||
canBeDestroyed: 0
|
||||
EnableAnim: LowBack
|
||||
DisableAnim: LowBack
|
||||
enableDelayTime: 0.5
|
||||
disableDelayTime: 0.5
|
||||
customHandler:
|
||||
twoHandWeapon: 0
|
||||
onDestroy:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &7246819747924727621
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -5081,6 +5275,7 @@ MonoBehaviour:
|
||||
description: Silver is an ordinary ore often found by the rivers and in caves.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 13
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -5133,6 +5328,7 @@ MonoBehaviour:
|
||||
the shadows in their corrupted cloud form. "
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 11
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -5189,6 +5385,7 @@ MonoBehaviour:
|
||||
has been brave enough to try \u2026. "
|
||||
secondaryDescription: Secondary Description
|
||||
type: 14
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -5238,6 +5435,7 @@ MonoBehaviour:
|
||||
description: First Guilt
|
||||
secondaryDescription: Secondary Description
|
||||
type: 19
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -5286,6 +5484,7 @@ MonoBehaviour:
|
||||
their lands.
|
||||
secondaryDescription: Secondary Description
|
||||
type: 16
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -5335,6 +5534,7 @@ MonoBehaviour:
|
||||
description: Blueprint examplary item description
|
||||
secondaryDescription: Secondary Description
|
||||
type: 5
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -5383,6 +5583,7 @@ MonoBehaviour:
|
||||
food. Regenerates vitality.'
|
||||
secondaryDescription: Secondary Description
|
||||
type: 0
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
@@ -5433,6 +5634,7 @@ MonoBehaviour:
|
||||
incoming threads from natural or supernatural realms. '
|
||||
secondaryDescription: Not used if cant be used
|
||||
type: 11
|
||||
trinketColor: 0
|
||||
icon: {fileID: 0}
|
||||
secondaryIcon: {fileID: 0}
|
||||
teriaryIcon: {fileID: 0}
|
||||
|
||||
@@ -24,6 +24,12 @@ namespace Beyond
|
||||
[HideInInspector]
|
||||
public bItemType type;
|
||||
|
||||
// --- NEW TRINKET FIELD ---
|
||||
// Removed [HideInInspector] so you can see it in default inspector
|
||||
// If you have a custom Editor script for bItem, you may need to add a line there to draw this property.
|
||||
public TrinketColor trinketColor;
|
||||
// -------------------------
|
||||
|
||||
[HideInInspector]
|
||||
public Sprite icon, secondaryIcon, teriaryIcon;
|
||||
|
||||
@@ -94,9 +100,6 @@ namespace Beyond
|
||||
onDestroy.Invoke(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert Sprite icon to texture
|
||||
/// </summary>
|
||||
public Texture2D iconTexture
|
||||
{
|
||||
get
|
||||
@@ -124,22 +127,12 @@ namespace Beyond
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the Item Attribute via <seealso cref="vItemAttribute"/>
|
||||
/// </summary>
|
||||
/// <param name="attribute"></param>
|
||||
/// <returns></returns>
|
||||
public bItemAttribute GetItemAttribute(bItemAttributes attribute)
|
||||
{
|
||||
if (attributes != null) return attributes.Find(_attribute => _attribute.name == attribute);
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the Item Attribute via string
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
public bItemAttribute GetItemAttribute(string name)
|
||||
{
|
||||
if (attributes != null)
|
||||
@@ -147,11 +140,6 @@ namespace Beyond
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Selected Item Attributes via <seealso cref="vItemAttribute"/> by ignoring the ones you don't want
|
||||
/// </summary>
|
||||
/// <param name="ignore"></param>
|
||||
/// <returns></returns>
|
||||
public string GetItemAttributesText(List<bItemAttributes> ignore = null)
|
||||
{
|
||||
System.Text.StringBuilder text = new System.Text.StringBuilder();
|
||||
@@ -163,29 +151,15 @@ namespace Beyond
|
||||
return text.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Item Attribute Text
|
||||
/// </summary>
|
||||
/// <param name="i"></param>
|
||||
/// <returns></returns>
|
||||
protected string GetItemAttributeText(int i)
|
||||
{
|
||||
if (attributes.Count > 0 && i < attributes.Count)
|
||||
{
|
||||
if (attributes.Count > 0 && i < attributes.Count)
|
||||
{
|
||||
return attributes[i].GetDisplayText();
|
||||
}
|
||||
return attributes[i].GetDisplayText();
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Item Attribut Text with a custom Format to display
|
||||
/// </summary>
|
||||
/// <param name="i"></param>
|
||||
/// <param name="customFormat"></param>
|
||||
/// <returns></returns>
|
||||
protected string GetItemAttributeText(int i, string customFormat)
|
||||
{
|
||||
if (attributes.Count > 0 && i < attributes.Count)
|
||||
@@ -195,20 +169,11 @@ namespace Beyond
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Default Item type text
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ItemTypeText()
|
||||
{
|
||||
return ItemTypeText(type.DisplayFormat());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Custom Item type text
|
||||
/// </summary>
|
||||
/// <param name="format"> Custom format for text </param>
|
||||
/// <returns></returns>
|
||||
public string ItemTypeText(string format)
|
||||
{
|
||||
var _text = format;
|
||||
@@ -219,12 +184,6 @@ namespace Beyond
|
||||
return _text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Item Full Description text including item Name, Type, Description and Attributes
|
||||
/// </summary>
|
||||
/// <param name="format">Custom format</param>
|
||||
/// <param name="ignoreAttributes">Attributes to ignore</param>
|
||||
/// <returns></returns>
|
||||
public string GetFullItemDescription(string format = null, List<bItemAttributes> ignoreAttributes = null)
|
||||
{
|
||||
string text = "";
|
||||
|
||||
@@ -26,7 +26,8 @@ namespace Beyond
|
||||
[Description("")] Guilts = 19,
|
||||
[Description("")] PowerScroll = 20,
|
||||
[Description("")] Gemstones = 21,
|
||||
[Description("")] ConsumablesFaith = 22
|
||||
[Description("")] ConsumablesFaith = 22,
|
||||
[Description("")] Trinkets = 23,
|
||||
}
|
||||
|
||||
public enum bItemAttributes
|
||||
@@ -51,6 +52,24 @@ namespace Beyond
|
||||
[Description("")] MaxDamage = 17,
|
||||
[Description("")] Rarity = 18,
|
||||
[Description("Used for empowering swords")] Power = 19,
|
||||
[Description("Bonus Damage")] BonusDamage = 20
|
||||
[Description("Bonus Damage")] BonusDamage = 20,
|
||||
[Description("Health Bonus")] HealthBonusPercent = 21,
|
||||
[Description("Defense Bonus")] DefenseBonusPercent = 22,
|
||||
[Description("Faith Bonus")] FaithBonusPercent = 23,
|
||||
[Description("Damage Bonus")] DamageBonusPercent = 24,
|
||||
[Description("Move Speed Bonus")] MoveSpeedBonusPercent = 25,
|
||||
[Description("Attack Speed Bonus")] AttackSpeedBonusPercent = 26,
|
||||
[Description("Faith Regen Bonus")] FaithRegenBonusPercent = 27,
|
||||
[Description("Thorn Damage Bonus")] ThornDamageBonusPercent = 28
|
||||
}
|
||||
|
||||
public enum TrinketColor
|
||||
{
|
||||
None,
|
||||
Azure, // Water/Blue
|
||||
Crimson, // Fire/Red
|
||||
Viridian, // Nature/Green
|
||||
Bright, // Light
|
||||
Dark // Shadow
|
||||
}
|
||||
}
|
||||
73
Assets/Scripts/Powers/TrinketDebugger.cs
Normal file
73
Assets/Scripts/Powers/TrinketDebugger.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
using UnityEngine;
|
||||
using Sirenix.OdinInspector; // You are using Odin
|
||||
using Invector.vItemManager;
|
||||
|
||||
namespace Beyond
|
||||
{
|
||||
public class TrinketDebugger : MonoBehaviour
|
||||
{
|
||||
public bItemManager itemManager;
|
||||
public bEquipArea trinketArea;
|
||||
|
||||
[Header("Test Items")]
|
||||
public int azureItemId = 200; // ID of item you created in Phase 1
|
||||
public int crimsonItemId = 201;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if(!itemManager) itemManager = GetComponent<bItemManager>();
|
||||
}
|
||||
|
||||
[Button("Add & Equip Azure Gem")]
|
||||
public void TestEquipAzure()
|
||||
{
|
||||
// 1. Add to inventory
|
||||
var reference = new ItemReference(azureItemId);
|
||||
reference.amount = 1;
|
||||
itemManager.AddItem(reference);
|
||||
|
||||
// 2. Find the item object we just added
|
||||
var item = itemManager.GetItem(azureItemId);
|
||||
|
||||
// 3. Force Equip into first available slot
|
||||
if (item != null && trinketArea != null)
|
||||
{
|
||||
trinketArea.AddItemToEquipSlot(0, item, true);
|
||||
Debug.Log("<color=cyan>Test: Equipped Azure Gem</color>");
|
||||
}
|
||||
}
|
||||
|
||||
[Button("Equip 3 Azure (Test Calmness Harmony)")]
|
||||
public void TestFullAzureHarmony()
|
||||
{
|
||||
// Add 3 items
|
||||
itemManager.AddItem(new ItemReference(azureItemId) { amount = 1 });
|
||||
itemManager.AddItem(new ItemReference(azureItemId) { amount = 1 });
|
||||
itemManager.AddItem(new ItemReference(azureItemId) { amount = 1 });
|
||||
|
||||
// Get list of them
|
||||
var items = itemManager.items.FindAll(i => i.id == azureItemId);
|
||||
|
||||
// Equip to slots 0, 1, 2
|
||||
for(int i=0; i<3; i++)
|
||||
{
|
||||
if(i < items.Count)
|
||||
trinketArea.AddItemToEquipSlot(i, items[i], true);
|
||||
}
|
||||
Debug.Log("<color=cyan>Test: Equipped 3 Azure Gems</color>");
|
||||
}
|
||||
|
||||
[Button("Unequip All")]
|
||||
public void UnequipAll()
|
||||
{
|
||||
foreach(var slot in trinketArea.equipSlots)
|
||||
{
|
||||
if(slot.item != null)
|
||||
{
|
||||
trinketArea.RemoveItemOfEquipSlot(slot);
|
||||
}
|
||||
}
|
||||
Debug.Log("Test: Unequipped All");
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Powers/TrinketDebugger.cs.meta
Normal file
2
Assets/Scripts/Powers/TrinketDebugger.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b18079ac2a5e34669b98a17925ad9f90
|
||||
191
Assets/Scripts/Powers/TrinketManager.cs
Normal file
191
Assets/Scripts/Powers/TrinketManager.cs
Normal file
@@ -0,0 +1,191 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Invector.vItemManager;
|
||||
|
||||
namespace Beyond
|
||||
{
|
||||
public class TrinketManager : MonoBehaviour
|
||||
{
|
||||
[Header("References")]
|
||||
[Tooltip("Drag the bEquipArea used for Trinkets here")]
|
||||
[SerializeField] private bEquipArea trinketEquipArea;
|
||||
|
||||
[Header("Debug")]
|
||||
[SerializeField] private TrinketStats currentStats;
|
||||
|
||||
// Struct to pass calculated data to Player
|
||||
[System.Serializable]
|
||||
public struct TrinketStats
|
||||
{
|
||||
// Multipliers (1.0 = 100% / Normal)
|
||||
public float healthMult;
|
||||
public float defenseMult;
|
||||
public float faithMult;
|
||||
public float damageMult;
|
||||
public float speedMult;
|
||||
public float attackSpeedMult;
|
||||
public float faithRegenMult;
|
||||
public float thornDamageMult;
|
||||
|
||||
// Harmony Flags (Effects from table)
|
||||
// Renamed to match Player.cs usage
|
||||
public bool effectBalance; // Balance (Flask bonus)
|
||||
public bool effectCalmness; // Calmness (Longer shield)
|
||||
public bool effectFaithVampirism; // Trust (Faith vampirism) - Was effectTrust
|
||||
public bool effectBreeze; // Breeze (Freezing blast cost)
|
||||
public bool effectDetermination; // Determination (Combo damage)
|
||||
public bool effectHealthVampirism; // Vitality (Health vampirism) - Was effectVitality
|
||||
public bool effectEagerness; // Eagerness (Dash cooldown)
|
||||
public bool effectBloom; // Bloom (Spell cost reduced)
|
||||
public bool effectGrowth; // Growth (Cast restores HP)
|
||||
public bool effectRose; // Rose (Thorn damage)
|
||||
public bool effectDarkening; // The Darkening (Bonus dmg)
|
||||
public bool effectEclipse; // Eclipse (Bonus all)
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (!trinketEquipArea)
|
||||
{
|
||||
Debug.LogError($"[TrinketManager] No bEquipArea assigned on {gameObject.name}");
|
||||
return;
|
||||
}
|
||||
|
||||
// Subscribe to changes
|
||||
trinketEquipArea.onEquipItem.AddListener(OnTrinketChanged);
|
||||
trinketEquipArea.onUnequipItem.AddListener(OnTrinketChanged);
|
||||
|
||||
// Initial Calculation
|
||||
Invoke(nameof(RecalculateStats), 0.2f);
|
||||
}
|
||||
|
||||
private void OnTrinketChanged(bEquipArea area, bItem item)
|
||||
{
|
||||
RecalculateStats();
|
||||
}
|
||||
|
||||
public void RecalculateStats()
|
||||
{
|
||||
// 1. Reset Stats to Default
|
||||
TrinketStats stats = new TrinketStats
|
||||
{
|
||||
healthMult = 1f,
|
||||
defenseMult = 1f,
|
||||
faithMult = 1f,
|
||||
damageMult = 1f,
|
||||
speedMult = 1f,
|
||||
attackSpeedMult = 1f,
|
||||
faithRegenMult = 1f,
|
||||
thornDamageMult = 1f
|
||||
};
|
||||
|
||||
// 2. Get Currently Equipped Items
|
||||
List<bItem> equippedItems = new List<bItem>();
|
||||
foreach (var slot in trinketEquipArea.equipSlots)
|
||||
{
|
||||
if (slot.isValid && slot.item != null)
|
||||
{
|
||||
equippedItems.Add(slot.item);
|
||||
}
|
||||
}
|
||||
|
||||
// 3. Sum up Percentage Attributes
|
||||
foreach (var item in equippedItems)
|
||||
{
|
||||
stats.healthMult += GetPct(item, bItemAttributes.HealthBonusPercent);
|
||||
stats.defenseMult -= GetPct(item, bItemAttributes.DefenseBonusPercent); // Defense reduces damage taken
|
||||
stats.faithMult += GetPct(item, bItemAttributes.FaithBonusPercent);
|
||||
stats.damageMult += GetPct(item, bItemAttributes.DamageBonusPercent);
|
||||
stats.speedMult += GetPct(item, bItemAttributes.MoveSpeedBonusPercent);
|
||||
stats.attackSpeedMult += GetPct(item, bItemAttributes.AttackSpeedBonusPercent);
|
||||
stats.faithRegenMult += GetPct(item, bItemAttributes.FaithRegenBonusPercent);
|
||||
stats.thornDamageMult += GetPct(item, bItemAttributes.ThornDamageBonusPercent);
|
||||
}
|
||||
|
||||
// 4. Apply Harmonies (Based on Table)
|
||||
ApplyHarmonies(equippedItems, ref stats);
|
||||
|
||||
currentStats = stats;
|
||||
|
||||
// 5. Send to Player
|
||||
if (Player.Instance != null)
|
||||
{
|
||||
Player.Instance.UpdateTrinketStats(stats);
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyHarmonies(List<bItem> items, ref TrinketStats stats)
|
||||
{
|
||||
int azure = items.Count(i => i.trinketColor == TrinketColor.Azure);
|
||||
int crimson = items.Count(i => i.trinketColor == TrinketColor.Crimson);
|
||||
int viridian = items.Count(i => i.trinketColor == TrinketColor.Viridian);
|
||||
int bright = items.Count(i => i.trinketColor == TrinketColor.Bright);
|
||||
int dark = items.Count(i => i.trinketColor == TrinketColor.Dark);
|
||||
|
||||
// --- TABLE LOGIC IMPLEMENTATION ---
|
||||
|
||||
// Balance: Azure + Crimson + Viridian (A C V) -> Bonus Water of Life Flask
|
||||
if (azure >= 1 && crimson >= 1 && viridian >= 1)
|
||||
stats.effectBalance = true;
|
||||
|
||||
// Calmness: 3 Azure (A A A) -> Longer Shield
|
||||
if (azure >= 3)
|
||||
stats.effectCalmness = true;
|
||||
|
||||
// Trust: 2 Azure + 1 Crimson (A A C) -> Faith Vampirism
|
||||
if (azure >= 2 && crimson >= 1)
|
||||
stats.effectFaithVampirism = true;
|
||||
|
||||
// Breeze: 2 Azure + 1 Viridian (A A V) -> Freezing blast free
|
||||
if (azure >= 2 && viridian >= 1)
|
||||
stats.effectBreeze = true;
|
||||
|
||||
// Determination: 3 Crimson (C C C) -> Combo finish +5% dmg
|
||||
if (crimson >= 3)
|
||||
stats.effectDetermination = true;
|
||||
|
||||
// Vitality: 2 Crimson + 1 Azure (C C A) -> Health Vampirism
|
||||
if (crimson >= 2 && azure >= 1)
|
||||
stats.effectHealthVampirism = true;
|
||||
|
||||
// Eagerness: 2 Crimson + 1 Viridian (C C V) -> Reduce Dash Cooldown
|
||||
if (crimson >= 2 && viridian >= 1)
|
||||
stats.effectEagerness = true;
|
||||
|
||||
// Bloom: 3 Viridian (V V V) -> Spell cost reduced 20%
|
||||
if (viridian >= 3)
|
||||
stats.effectBloom = true;
|
||||
|
||||
// Growth: 2 Viridian + 1 Azure (V V A) -> Cast restores HP
|
||||
if (viridian >= 2 && azure >= 1)
|
||||
stats.effectGrowth = true;
|
||||
|
||||
// Rose: 2 Viridian + 1 Crimson (V V C) -> Bonus Thorn Dmg
|
||||
if (viridian >= 2 && crimson >= 1)
|
||||
{
|
||||
stats.effectRose = true;
|
||||
stats.thornDamageMult += 0.05f;
|
||||
}
|
||||
|
||||
// The Darkening: 3 Bright
|
||||
if (bright >= 3)
|
||||
stats.effectDarkening = true;
|
||||
|
||||
// Eclipse: 2 Bright + 1 Dark
|
||||
if (bright >= 1 && dark >= 1)
|
||||
stats.effectEclipse = true;
|
||||
}
|
||||
|
||||
// Helper: Convert Integer Attribute (5) to Float Percentage (0.05)
|
||||
private float GetPct(bItem item, bItemAttributes attrName)
|
||||
{
|
||||
var attr = item.GetItemAttribute(attrName);
|
||||
if (attr != null)
|
||||
{
|
||||
return (float)attr.value / 100f;
|
||||
}
|
||||
return 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Powers/TrinketManager.cs.meta
Normal file
2
Assets/Scripts/Powers/TrinketManager.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: daafd720d70724ce49b9d0c5c420a6e7
|
||||
Reference in New Issue
Block a user