Initial commit
This commit is contained in:
commit
c4a24c9fdf
142 changed files with 15491 additions and 0 deletions
91
JotunnModStub/Trol/TrolStatusEffects.cs
Normal file
91
JotunnModStub/Trol/TrolStatusEffects.cs
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
using Jotunn.Managers;
|
||||
using Jotunn.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RacesOfValheim
|
||||
{
|
||||
public class SE_TrolThrowRockCooldown : SE_Stats
|
||||
{
|
||||
public override void Setup(Character character)
|
||||
{
|
||||
base.Setup(character);
|
||||
name = "SE_TrolThrowRockCooldown";
|
||||
m_name = "Throw Rock Cooldown";
|
||||
m_tooltip = "You must wait before throwing another rock.";
|
||||
m_ttl = 60f; // 1 minute cooldown
|
||||
|
||||
// Try to find a rock-like icon, e.g. Stone
|
||||
GameObject itemPrefab = PrefabManager.Cache.GetPrefab<GameObject>("Stone");
|
||||
if (itemPrefab != null)
|
||||
{
|
||||
ItemDrop drop = itemPrefab.GetComponent<ItemDrop>();
|
||||
if (drop != null && drop.m_itemData.m_shared.m_icons.Length > 0)
|
||||
{
|
||||
m_icon = drop.m_itemData.m_shared.m_icons[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class SE_TrolTrueForm : SE_Stats
|
||||
{
|
||||
public override void Setup(Character character)
|
||||
{
|
||||
base.Setup(character);
|
||||
name = "SE_TrolTrueForm";
|
||||
m_name = "True Form";
|
||||
m_tooltip = "You have unleashed your inner troll!";
|
||||
m_ttl = 60f; // 1 minute duration
|
||||
|
||||
GameObject itemPrefab = PrefabManager.Cache.GetPrefab<GameObject>("Stone");
|
||||
if (itemPrefab != null)
|
||||
{
|
||||
ItemDrop drop = itemPrefab.GetComponent<ItemDrop>();
|
||||
if (drop != null && drop.m_itemData.m_shared.m_icons.Length > 0)
|
||||
{
|
||||
m_icon = drop.m_itemData.m_shared.m_icons[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class SE_TrolTrueFormCooldown : SE_Stats
|
||||
{
|
||||
public override void Setup(Character character)
|
||||
{
|
||||
base.Setup(character);
|
||||
name = "SE_TrolTrueFormCooldown";
|
||||
m_name = "True Form Cooldown";
|
||||
m_tooltip = "You are exhausted from your True Form.";
|
||||
m_ttl = 600f; // 10 minutes cooldown
|
||||
|
||||
GameObject itemPrefab = PrefabManager.Cache.GetPrefab<GameObject>("Stone");
|
||||
if (itemPrefab != null)
|
||||
{
|
||||
ItemDrop drop = itemPrefab.GetComponent<ItemDrop>();
|
||||
if (drop != null && drop.m_itemData.m_shared.m_icons.Length > 0)
|
||||
{
|
||||
m_icon = drop.m_itemData.m_shared.m_icons[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class TrolStatusEffects
|
||||
{
|
||||
public static void RegisterStatusEffects()
|
||||
{
|
||||
var cdSE = ScriptableObject.CreateInstance<SE_TrolThrowRockCooldown>();
|
||||
cdSE.name = "SE_TrolThrowRockCooldown";
|
||||
ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(cdSE, fixReference: false));
|
||||
|
||||
var tfSE = ScriptableObject.CreateInstance<SE_TrolTrueForm>();
|
||||
tfSE.name = "SE_TrolTrueForm";
|
||||
ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(tfSE, fixReference: false));
|
||||
|
||||
var tfCdSE = ScriptableObject.CreateInstance<SE_TrolTrueFormCooldown>();
|
||||
tfCdSE.name = "SE_TrolTrueFormCooldown";
|
||||
ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(tfCdSE, fixReference: false));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue