public PotionType(int damageValue, PotionEffectType effect, int maxLevel) { _damageValue = damageValue; _effectType = effect; _maxLevel = maxLevel; Values.Add(this); }
public PotionEffect(PotionEffectType type, int duration, int amplifier, bool ambient = true) { Debug.Assert(ReferenceEquals(null, type), "effect type cannot be null"); _type = type; _duration = duration; _amplifier = amplifier; _ambient = ambient; }
public static PotionType GetByEffect(PotionEffectType effectType) { if (effectType == null) { return(WATER); } foreach (PotionType type in PotionType.Values) { if (effectType.Equals(type._effectType)) { return(type); } } return(null); }