forked from TorannD/ValheimLegends
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSE_BiomeAsh.cs
57 lines (51 loc) · 1.7 KB
/
SE_BiomeAsh.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace ValheimLegends
{
public class SE_BiomeAsh : SE_Stats
{
public static Sprite AbilityIcon;
public static GameObject GO_SEFX;
[Header("SE_VL_BiomeAsh")]
public static float m_baseTTL = 600f;
public float resistModifier = .8f;
public float fireDamageOffset = 26f;
public bool doOnce = true;
public SE_BiomeAsh()
{
base.name = "SE_VL_BiomeAsh";
m_icon = AbilityIcon;
m_tooltip = "BiomeAsh";
m_name = "VL_BiomeAsh";
m_ttl = m_baseTTL;
doOnce = true;
}
public override void UpdateStatusEffect(float dt)
{
if (doOnce)
{
doOnce = false;
//ZLog.Log("setting up shell, level is " + m_character.GetLevel());
float sLevel = m_character.GetSkills().GetTotalSkill() / (float)m_character.GetSkills().GetSkillList().Count;
m_ttl = m_baseTTL + (5f * sLevel);
fireDamageOffset = (26f + (.4f * sLevel)) * VL_GlobalConfigs.g_DamageModifer;
resistModifier = .8f - (.002f * sLevel);
}
base.UpdateStatusEffect(dt);
}
public override void OnDamaged(HitData hit, Character attacker)
{
hit.m_damage.m_fire *= resistModifier;
hit.m_damage.m_poison *= resistModifier;
base.OnDamaged(hit, attacker);
}
public override bool CanAdd(Character character)
{
return true;
}
}
}