Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:13:32 +09:30
commit 7345f42201
470 changed files with 51966 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
public class MinEventActionDecreaseProgressionLevelAndRefundSP : MinEventActionSetProgressionLevel
{
public override void Execute(MinEventParams _params)
{
EntityPlayerLocal entityPlayerLocal = this.targets[0] as EntityPlayerLocal;
if (this.targets != null)
{
ProgressionValue progressionValue = entityPlayerLocal.Progression.GetProgressionValue(this.progressionName);
if (progressionValue != null)
{
if (this.level >= 0 && this.level < progressionValue.Level)
{
ProgressionClass progressionClass = progressionValue.ProgressionClass;
int spcount = 0;
for (int i = this.level + 1; i <= progressionValue.Level; i++)
spcount += progressionClass.CalculatedCostForLevel(i);
progressionValue.Level = this.level;
entityPlayerLocal.Progression.SkillPoints += spcount;
entityPlayerLocal.Progression.bProgressionStatsChanged = true;
entityPlayerLocal.bPlayerStatsChanged = true;
}
}
}
}
}