Pedro Gomes 9c136817b3 Updates to rogue-lite mechanics (WIP)
- visual update on riftraids
- ability unlock system through ability tomes
- (possible) bugfix sprite issue
- player reputation level
2025-01-18 23:14:12 +00:00

47 lines
1.5 KiB
C#

using Kryz.CharacterStats.Examples;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/*[CreateAssetMenu]
public class AbilityTomePage : ConsumableItem
{
public int abilityIndex;
public GameEvent_Int onAbilityTomePageLearned;
public override void Consume()
{
PlayerDataHandler.Instance.SaveAbilityTomeProgress(PlayerDataHandler.Instance.currentPlayerName.Value, abilityIndex, 1);
onAbilityTomePageLearned.Raise(abilityIndex);
}
}*/
[System.Serializable]
public class AbilityTomePageInstance : ConsumableItemInstance
{
public int abilityIndex;
public GameEvent_Int onAbilityTomePageLearned;
public AbilityTomePageInstance(BaseAbility ability, Item template, GameEvent_Int onAbilityTomePageLearned)
{
ItemName = "Forgotten "+ ability.displayName + "'s Tome Page";
Icon = template.Icon;
templateIndex = ItemIndexer.Instance.Items.IndexOf(template);
sellPricePlayer = template.sellPricePlayer;
sellPriceVendor = template.sellPriceVendor;
description = template.description;
templateIndex = AbilityIndexer.Instance.Abilities.IndexOf(ability);
abilityIndex = templateIndex;
this.onAbilityTomePageLearned = onAbilityTomePageLearned;
}
public override void Consume()
{
PlayerDataHandler.Instance.SaveAbilityTomeProgress(PlayerDataHandler.Instance.currentPlayerName.Value, abilityIndex, 1);
onAbilityTomePageLearned.Raise(abilityIndex);
}
}