Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:44:53 +09:30
commit f1fbbe67bb
1722 changed files with 165268 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
public class MinEventActionAddBuffRebirth : MinEventActionBuffModifierBase
{
public override void Execute(MinEventParams _params)
{
EntityPlayerLocal primaryPlayer = GameManager.Instance.World.GetPrimaryPlayer();
bool flag = !_params.Self.isEntityRemote | _params.IsLocal;
int num = -1;
if (_params.Buff != null)
{
num = _params.Buff.InstigatorId;
}
if (num == -1)
{
num = _params.Self.entityId;
}
for (int i = 0; i < this.targets.Count; i++)
{
float num2 = 0f;
for (int j = 0; j < this.buffNames.Length; j++)
{
string name = this.buffNames[j];
if (BuffManager.GetBuff(name) != null)
{
if (this.buffOneOnly && this.buffWeights != null)
{
num2 += this.buffWeights[j];
if (num2 >= this.targets[i].rand.RandomFloat)
{
primaryPlayer.Buffs.AddBuff(name, num, flag && this.targets[i].isEntityRemote, false);
break;
}
}
else if (this.buffWeights != null)
{
if (this.buffWeights[j] >= this.targets[i].rand.RandomFloat)
{
primaryPlayer.Buffs.AddBuff(name, num, flag && this.targets[i].isEntityRemote, false);
}
}
else
{
primaryPlayer.Buffs.AddBuff(name, num, flag && this.targets[i].isEntityRemote, false);
}
}
}
}
}
}