- New enemy Crazied Orc Grunt basic + Boss - New abilities for crazied orc grunt - bugfix Damage input modifier effect instance not using stat scaling properly - updated damage input/output modifier effects scaling - Added QoL shift+click on stat point allocation button to add +10 in a single click
90 lines
2.4 KiB
C#
90 lines
2.4 KiB
C#
using Photon.Pun;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class DamageOutputModifierEffectInstance : StatusEffectInstance
|
|
{
|
|
|
|
public float startingOutputModifierPercent;
|
|
|
|
public float currentOutputModifierPercent;
|
|
|
|
|
|
public float ModifyDamageOutput(float output)
|
|
{
|
|
return output = output * (1 + currentOutputModifierPercent);
|
|
}
|
|
|
|
public float GetHighestAmount(float value)
|
|
{
|
|
float highestAmount = value;
|
|
for (int i = 0; i < activeStacks.Count; i++)
|
|
{
|
|
if (((DamageOutputModifierEffect)activeStacks[i]).damageOutputModifierPercentage > highestAmount)
|
|
highestAmount = ((DamageOutputModifierEffect)activeStacks[i]).damageOutputModifierPercentage;
|
|
}
|
|
|
|
return highestAmount;
|
|
}
|
|
|
|
[PunRPC]
|
|
public void RPC_ApplyDamageOutputModifierEffect(int effectIndex, float value)
|
|
{
|
|
ApplyEffect(StatusEffectIndexer.Instance.StatusEffects[effectIndex], value);
|
|
}
|
|
|
|
public override void ApplyEffect(StatusEffect effect, float value)
|
|
{
|
|
base.ApplyEffect(effect, value);
|
|
}
|
|
|
|
protected override void AddStack(StatusEffect addedEffect, float value)
|
|
{
|
|
if (activeStacks.Count <= 0)
|
|
{
|
|
startingOutputModifierPercent = value;
|
|
currentOutputModifierPercent = value;
|
|
}
|
|
else if (canStack && (!activeStacks.Contains(addedEffect) || addedEffect.canApplyMultipleInstances))
|
|
{
|
|
currentOutputModifierPercent += value;
|
|
}
|
|
else
|
|
{
|
|
OnEffectStackAdded();
|
|
return;
|
|
}
|
|
|
|
base.AddStack(addedEffect, value);
|
|
}
|
|
|
|
protected override void RefreshEffect(StatusEffect effect, float value)
|
|
{
|
|
base.RefreshEffect(effect, value);
|
|
|
|
startingOutputModifierPercent = GetHighestAmount(value);
|
|
currentOutputModifierPercent = startingOutputModifierPercent;
|
|
|
|
OnEffectStackAdded();
|
|
}
|
|
|
|
protected override IEnumerator EffectStateCoroutine()
|
|
{
|
|
return base.EffectStateCoroutine();
|
|
}
|
|
|
|
protected override void EffectStateStarted()
|
|
{
|
|
base.EffectStateStarted();
|
|
}
|
|
|
|
protected override void EffectStateEnded()
|
|
{
|
|
startingOutputModifierPercent = 0;
|
|
currentOutputModifierPercent = startingOutputModifierPercent;
|
|
|
|
base.EffectStateEnded();
|
|
}
|
|
}
|