private void _createBuffBytes(List <BuffByteConfig> configArray, BattleNPC caster) { List <BuffByte> temporaryList = new List <BuffByte>(); foreach (BuffByteConfig config in configArray) { BuffByte buff = config.GenerateBuffByteFromByteType(this, caster); buff.Configuration.CustomFloat = m_Configuration.CustomFloat; temporaryList.Add(buff); } m_ManagedBuffs = temporaryList.ToArray(); }
public BuffByte GenerateBuffByteFromByteType(BuffActive newController, BattleNPC caster) { BuffByte returnObject = null; switch (ByteType) { case BuffByteType.Cleanse: returnObject = new CleanseBuffByte(this, newController, caster); break; case BuffByteType.Current_Health: returnObject = new CurrentHealthBuffByte(this, newController, caster); break; case BuffByteType.Delayed_Revive: returnObject = new DelayedReviveBuffByte(this, newController, caster); break; case BuffByteType.Experience: returnObject = new ExperienceBuffByte(this, newController, caster); break; case BuffByteType.Flat_Resistance: returnObject = new FlatResistanceBuffByte(this, newController, caster); break; case BuffByteType.Martyr: returnObject = new MartyrBuffByte(this, newController, caster); break; case BuffByteType.Maximum_Health: returnObject = new MaxHealthBuffByte(this, newController, caster); break; case BuffByteType.Move_Speed: returnObject = new MoveSpeedBuffByte(this, newController, caster); break; case BuffByteType.Readiness: returnObject = new ReadinessBuffByte(this, newController, caster); break; case BuffByteType.Resistance: returnObject = new ResistanceBuffByte(this, newController, caster); break; case BuffByteType.Retaliate: returnObject = new RetaliateBuffByte(this, newController, caster); break; case BuffByteType.Skill_Drop: returnObject = new SkillDropBuffByte(this, newController, caster); break; case BuffByteType.Skill_Level: returnObject = new SkillLevelBuffByte(this, newController, caster); break; case BuffByteType.Stun: returnObject = new StunDebuffByte(this, newController, caster); break; case BuffByteType.Taunt: returnObject = new TauntDebuffByte(this, newController, caster); break; default: break; } return(returnObject); }
private void _applyBuffDegrade(BuffByte ourBuff) { ourBuff.ApplyBuff(ourBuff.Configuration.BuffAmount * (1 - (m_DegradeCount * m_Configuration.DegradePercent))); m_DegradeCount++; }