Files
zzz_REBIRTH__Utils/Scripts/Requirements/NPCs/CanMindControl.cs
2025-06-04 16:44:53 +09:30

61 lines
1.8 KiB
C#

public class CanMindControl : TargetedCompareRequirementBase
{
public override bool IsValid(MinEventParams _params)
{
if (!this.ParamsValid(_params))
{
return false;
}
if (_params.Self is EntityAliveV2)
{
EntityAliveV2 entitySource = _params.Self as EntityAliveV2;
if (entitySource.LeaderUtils.Owner)
{
ProgressionValue progressionValue = entitySource.LeaderUtils.Owner.Progression.GetProgressionValue("FuriousRamsayPerkBlackMagic");
int progressionLevel = progressionValue.Level;
if (this.value == 1)
{
if (progressionLevel < 4)
{
//Log.Out("CanMindControl-IsValid 1");
return true;
}
else
{
//Log.Out("CanMindControl-IsValid 1b");
}
}
else if (this.value == 2)
{
if (progressionLevel >= 4 && progressionLevel < 7)
{
//Log.Out("CanMindControl-IsValid 2");
return true;
}
else
{
//Log.Out("CanMindControl-IsValid 2b");
}
}
else if (this.value == 3)
{
if (progressionLevel >= 7)
{
//Log.Out("CanMindControl-IsValid 3");
return true;
}
else
{
//Log.Out("CanMindControl-IsValid 3b");
}
}
}
}
return false;
}
}