public static LocalizedString Localize(SpellPowerType powerType, bool isPercentage) { Assert.IsTrue(StringsBySpellPowerType.ContainsKey(powerType), $"Missing localization for PowerType: {powerType}"); if (StringsBySpellPowerType.TryGetValue(powerType, out PowerTypeCostLink powerTypeEntry)) { return(isPercentage ? powerTypeEntry.LocalizedPercentageString : powerTypeEntry.LocalizedRawString); } return(MissingString); }
public bool HasPower(SpellPowerType spellPowerType) => spellPowerTypeInfoHashSet.Contains(spellPowerType);
public static UnitModifierType AsModifier(this SpellPowerType spellPowerType) => (UnitModifierType)(spellPowerType + (int)UnitModifierType.StartPowers);
public SpellResourceCost(SpellPowerType spellPower, int amount) { SpellPower = spellPower; Amount = amount; }