Upload from upload_mods.ps1
This commit is contained in:
60
Scripts/Requirements/NPCs/CanMindControl.cs
Normal file
60
Scripts/Requirements/NPCs/CanMindControl.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user