r2mods/ilspy_dump/ror2_csproj/RoR2.Skills/VoidSurvivorBlasterSkillDef.cs

29 lines
995 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using EntityStates;
using EntityStates.VoidSurvivor.Weapon;
using JetBrains.Annotations;
using UnityEngine;
namespace RoR2.Skills;
public class VoidSurvivorBlasterSkillDef : SteppedSkillDef
{
public Sprite[] icons;
protected override EntityState InstantiateNextState([NotNull] GenericSkill skillSlot)
{
EntityState entityState = base.InstantiateNextState(skillSlot);
VoidSurvivorController component = skillSlot.GetComponent<VoidSurvivorController>();
if ((bool)component)
{
float corruptionPercentage = component.corruptionPercentage;
entityState = ((corruptionPercentage >= 75f) ? new FireBlaster4() : ((corruptionPercentage >= 50f) ? new FireBlaster3() : ((!(corruptionPercentage >= 25f)) ? ((FireBlasterBase)new FireBlaster1()) : ((FireBlasterBase)new FireBlaster2()))));
}
InstanceData instanceData = (InstanceData)skillSlot.skillInstanceData;
if (entityState is IStepSetter stepSetter)
{
stepSetter.SetStep(instanceData.step);
}
return entityState;
}
}