You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
743 B

using System;
using System.Collections.Generic;
[Serializable]
public struct SynergyProperty<T>
{
public Condition<T> activeCondition;
public BuffProperty[] _buffs;
}
public class SynergyData<T> : IHasBuff
{
SynergyProperty<T> property;
BuffData[] buffs;
public IReadOnlyList<BuffData> Buffs => buffs;
public SynergyData(SynergyProperty<T> property)
{
this.property = property;
buffs = new BuffData[property._buffs.Length];
for (int i = 0; i < property._buffs.Length; i++)
{
buffs[i] = new BuffData(property._buffs[i], this);
}
}
public bool CheckCondition(IReadOnlyList<T> currentState) => property.activeCondition.CheckCondition(currentState);
}