# Class Of Ability
Grammar — Class of ability
Flags —Native
|Function
Returns the ability type of an ability. This is the non raw data version of an ability’s scope. Use catalog lookup functions to retrieve a data value or other information from the game data.
# Arguments
string
<gamelink::Abil> — Ability
Returns — int
<preset::AbilityClass>
native int AbilityClass(string ability);
# Related
Category: Catalog / Lookup
- Catalog Entry Is Default —
bool
— CatalogEntryIsDefault - Catalog Entry Is Valid —
bool
— CatalogEntryIsValid - Catalog Entry Class —
int
— CatalogEntryClass - Catalog Entry Count —
int
— CatalogEntryCount - Catalog Entry Get —
string
<catalogentry> — CatalogEntryGet - Catalog Entry Parent —
string
<catalogentry> — CatalogEntryParent - Catalog Entry Scope —
string
<catalogscope> — CatalogEntryScope - Catalog Field Count —
int
— CatalogFieldCount - Catalog Field Get —
string
<catalogfieldname> — CatalogFieldGet - Catalog Field Exists —
bool
— CatalogFieldExists - Catalog Field Is Array —
bool
— CatalogFieldIsArray - Catalog Field Is Scope —
bool
— CatalogFieldIsScope - Catalog Field Type —
string
— CatalogFieldType - Catalog Field Type Category —
int
<preset::FieldTypeCategory> — CatalogFieldTypeCategory - Catalog Field Value Get —
string
— CatalogFieldValueGet - Catalog Field Value Get As Integer —
int
— CatalogFieldValueGetAsInt - Catalog Field Value Get Flags As Integer —
int
— CatalogFieldValueGetFlagsAsInt - Catalog Field Value Get As Real —
fixed
— libNtve_gf_CatalogFieldValueGetAsReal - Catalog Field Value Count —
int
— CatalogFieldValueCount - Catalog Reference Get —
string
— CatalogReferenceGet - Catalog Reference Get As Integer —
int
— CatalogReferenceGetAsInt - Catalog Reference Get As Real —
fixed
— libNtve_gf_CatalogReferenceGetAsReal - Catalog Reference Count —
int
— CatalogReferenceCount - Class Of Ability —
int
<preset::AbilityClass> — AbilityClass - Cost Of Ability —
fixed
— libNtve_gf_CostOfAbility
# Examples
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:165
for ( ; auto5A8FAC35_i <= UnitAbilityCount(auto5A8FAC35_unit) ; auto5A8FAC35_i += 1 ) {
lv_abil = UnitAbilityGet(auto5A8FAC35_unit, auto5A8FAC35_i);
if ((AbilityClass(lv_abil) == lp_abilityClass)) {
lv_classIndex += 1;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:193
// Implementation
if ((AbilityClass(lp_ability) != c_classIdCAbil)) {
if ((AbilityClass(lp_ability) != lp_abilityClass)) {
return false;
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:194
// Implementation
if ((AbilityClass(lp_ability) != c_classIdCAbil)) {
if ((AbilityClass(lp_ability) != lp_abilityClass)) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:8039
// Implementation
if ((AbilityClass(lp_abilityLink) != c_classIdCAbilEffect) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectInstant) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectTarget) && (AbilityClass(lp_abilityLink) != c_classIdCAbilAugment) && (AbilityClass(lp_abilityLink) != c_classIdCAbilBehavior) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorph) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorphPlacement)) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:8039
// Implementation
if ((AbilityClass(lp_abilityLink) != c_classIdCAbilEffect) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectInstant) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectTarget) && (AbilityClass(lp_abilityLink) != c_classIdCAbilAugment) && (AbilityClass(lp_abilityLink) != c_classIdCAbilBehavior) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorph) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorphPlacement)) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:8039
// Implementation
if ((AbilityClass(lp_abilityLink) != c_classIdCAbilEffect) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectInstant) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectTarget) && (AbilityClass(lp_abilityLink) != c_classIdCAbilAugment) && (AbilityClass(lp_abilityLink) != c_classIdCAbilBehavior) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorph) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorphPlacement)) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:8039
// Implementation
if ((AbilityClass(lp_abilityLink) != c_classIdCAbilEffect) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectInstant) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectTarget) && (AbilityClass(lp_abilityLink) != c_classIdCAbilAugment) && (AbilityClass(lp_abilityLink) != c_classIdCAbilBehavior) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorph) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorphPlacement)) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:8039
// Implementation
if ((AbilityClass(lp_abilityLink) != c_classIdCAbilEffect) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectInstant) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectTarget) && (AbilityClass(lp_abilityLink) != c_classIdCAbilAugment) && (AbilityClass(lp_abilityLink) != c_classIdCAbilBehavior) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorph) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorphPlacement)) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:8039
// Implementation
if ((AbilityClass(lp_abilityLink) != c_classIdCAbilEffect) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectInstant) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectTarget) && (AbilityClass(lp_abilityLink) != c_classIdCAbilAugment) && (AbilityClass(lp_abilityLink) != c_classIdCAbilBehavior) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorph) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorphPlacement)) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:8039
// Implementation
if ((AbilityClass(lp_abilityLink) != c_classIdCAbilEffect) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectInstant) && (AbilityClass(lp_abilityLink) != c_classIdCAbilEffectTarget) && (AbilityClass(lp_abilityLink) != c_classIdCAbilAugment) && (AbilityClass(lp_abilityLink) != c_classIdCAbilBehavior) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorph) && (AbilityClass(lp_abilityLink) != c_classIdCAbilMorphPlacement)) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/SupportLib.galaxy:1649
for ( ; ( (auto8A789BA6_ai >= 0 && lv_itAbility <= auto8A789BA6_ae) || (auto8A789BA6_ai < 0 && lv_itAbility >= auto8A789BA6_ae) ) ; lv_itAbility += auto8A789BA6_ai ) {
lv_abilLink = UnitAbilityGet(lp_unit, lv_itAbility);
if ((lv_abilLink != "") && (lv_abilLink != null) && ((AbilityClass(lv_abilLink) == c_classIdCAbilAugment) || (AbilityClass(lv_abilLink) == c_classIdCAbilBehavior) || (AbilityClass(lv_abilLink) == c_classIdCAbilEffectInstant) || (AbilityClass(lv_abilLink) == c_classIdCAbilEffectTarget) || (AbilityClass(lv_abilLink) == c_classIdCAbilMorph))) {
lv_cooldownLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Cooldown.Link", lv_ownerofUnit);
libNtve_gf_UnitRemoveCooldown(lp_unit, lv_cooldownLink);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/SupportLib.galaxy:1649
for ( ; ( (auto8A789BA6_ai >= 0 && lv_itAbility <= auto8A789BA6_ae) || (auto8A789BA6_ai < 0 && lv_itAbility >= auto8A789BA6_ae) ) ; lv_itAbility += auto8A789BA6_ai ) {
lv_abilLink = UnitAbilityGet(lp_unit, lv_itAbility);
if ((lv_abilLink != "") && (lv_abilLink != null) && ((AbilityClass(lv_abilLink) == c_classIdCAbilAugment) || (AbilityClass(lv_abilLink) == c_classIdCAbilBehavior) || (AbilityClass(lv_abilLink) == c_classIdCAbilEffectInstant) || (AbilityClass(lv_abilLink) == c_classIdCAbilEffectTarget) || (AbilityClass(lv_abilLink) == c_classIdCAbilMorph))) {
lv_cooldownLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Cooldown.Link", lv_ownerofUnit);
libNtve_gf_UnitRemoveCooldown(lp_unit, lv_cooldownLink);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/SupportLib.galaxy:1649
for ( ; ( (auto8A789BA6_ai >= 0 && lv_itAbility <= auto8A789BA6_ae) || (auto8A789BA6_ai < 0 && lv_itAbility >= auto8A789BA6_ae) ) ; lv_itAbility += auto8A789BA6_ai ) {
lv_abilLink = UnitAbilityGet(lp_unit, lv_itAbility);
if ((lv_abilLink != "") && (lv_abilLink != null) && ((AbilityClass(lv_abilLink) == c_classIdCAbilAugment) || (AbilityClass(lv_abilLink) == c_classIdCAbilBehavior) || (AbilityClass(lv_abilLink) == c_classIdCAbilEffectInstant) || (AbilityClass(lv_abilLink) == c_classIdCAbilEffectTarget) || (AbilityClass(lv_abilLink) == c_classIdCAbilMorph))) {
lv_cooldownLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Cooldown.Link", lv_ownerofUnit);
libNtve_gf_UnitRemoveCooldown(lp_unit, lv_cooldownLink);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/SupportLib.galaxy:1649
for ( ; ( (auto8A789BA6_ai >= 0 && lv_itAbility <= auto8A789BA6_ae) || (auto8A789BA6_ai < 0 && lv_itAbility >= auto8A789BA6_ae) ) ; lv_itAbility += auto8A789BA6_ai ) {
lv_abilLink = UnitAbilityGet(lp_unit, lv_itAbility);
if ((lv_abilLink != "") && (lv_abilLink != null) && ((AbilityClass(lv_abilLink) == c_classIdCAbilAugment) || (AbilityClass(lv_abilLink) == c_classIdCAbilBehavior) || (AbilityClass(lv_abilLink) == c_classIdCAbilEffectInstant) || (AbilityClass(lv_abilLink) == c_classIdCAbilEffectTarget) || (AbilityClass(lv_abilLink) == c_classIdCAbilMorph))) {
lv_cooldownLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Cooldown.Link", lv_ownerofUnit);
libNtve_gf_UnitRemoveCooldown(lp_unit, lv_cooldownLink);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/SupportLib.galaxy:1649
for ( ; ( (auto8A789BA6_ai >= 0 && lv_itAbility <= auto8A789BA6_ae) || (auto8A789BA6_ai < 0 && lv_itAbility >= auto8A789BA6_ae) ) ; lv_itAbility += auto8A789BA6_ai ) {
lv_abilLink = UnitAbilityGet(lp_unit, lv_itAbility);
if ((lv_abilLink != "") && (lv_abilLink != null) && ((AbilityClass(lv_abilLink) == c_classIdCAbilAugment) || (AbilityClass(lv_abilLink) == c_classIdCAbilBehavior) || (AbilityClass(lv_abilLink) == c_classIdCAbilEffectInstant) || (AbilityClass(lv_abilLink) == c_classIdCAbilEffectTarget) || (AbilityClass(lv_abilLink) == c_classIdCAbilMorph))) {
lv_cooldownLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Cooldown.Link", lv_ownerofUnit);
libNtve_gf_UnitRemoveCooldown(lp_unit, lv_cooldownLink);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:4212
lv_ability = CatalogEntryGet(c_gameCatalogAbil, auto0FE65364_ai);
auto0FE65364_ai = auto0FE65364_ai + 1;
if ((AbilityClass(lv_ability) == c_classIdCAbilResearch)) {
lv_i = 0;
for ( ; ( (auto6642A659_ai >= 0 && lv_i <= auto6642A659_ae) || (auto6642A659_ai < 0 && lv_i >= auto6642A659_ae) ) ; lv_i += auto6642A659_ai ) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:1174
}
else if (true) {
if ((UnitTypeTestAttribute(UnitGetType(lp_orderedUnit), c_unitAttributeStructure) == true) && (AbilityClass(lv_abil) != c_classIdCAbilAttack) && (AbilityClass(lv_abil) != c_classIdCAbilMove) && (AbilityClass(lv_abil) != c_classIdCAbilStop) && (AbilityClass(lv_abil) != c_classIdCAbilTransport) && (AbilityClass(lv_abil) != c_classIdCAbilMorph) && (AbilityClass(lv_abil) != c_classIdCAbilMorphPlacement)) {
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:1174
}
else if (true) {
if ((UnitTypeTestAttribute(UnitGetType(lp_orderedUnit), c_unitAttributeStructure) == true) && (AbilityClass(lv_abil) != c_classIdCAbilAttack) && (AbilityClass(lv_abil) != c_classIdCAbilMove) && (AbilityClass(lv_abil) != c_classIdCAbilStop) && (AbilityClass(lv_abil) != c_classIdCAbilTransport) && (AbilityClass(lv_abil) != c_classIdCAbilMorph) && (AbilityClass(lv_abil) != c_classIdCAbilMorphPlacement)) {
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:1174
}
else if (true) {
if ((UnitTypeTestAttribute(UnitGetType(lp_orderedUnit), c_unitAttributeStructure) == true) && (AbilityClass(lv_abil) != c_classIdCAbilAttack) && (AbilityClass(lv_abil) != c_classIdCAbilMove) && (AbilityClass(lv_abil) != c_classIdCAbilStop) && (AbilityClass(lv_abil) != c_classIdCAbilTransport) && (AbilityClass(lv_abil) != c_classIdCAbilMorph) && (AbilityClass(lv_abil) != c_classIdCAbilMorphPlacement)) {
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:1174
}
else if (true) {
if ((UnitTypeTestAttribute(UnitGetType(lp_orderedUnit), c_unitAttributeStructure) == true) && (AbilityClass(lv_abil) != c_classIdCAbilAttack) && (AbilityClass(lv_abil) != c_classIdCAbilMove) && (AbilityClass(lv_abil) != c_classIdCAbilStop) && (AbilityClass(lv_abil) != c_classIdCAbilTransport) && (AbilityClass(lv_abil) != c_classIdCAbilMorph) && (AbilityClass(lv_abil) != c_classIdCAbilMorphPlacement)) {
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:1174
}
else if (true) {
if ((UnitTypeTestAttribute(UnitGetType(lp_orderedUnit), c_unitAttributeStructure) == true) && (AbilityClass(lv_abil) != c_classIdCAbilAttack) && (AbilityClass(lv_abil) != c_classIdCAbilMove) && (AbilityClass(lv_abil) != c_classIdCAbilStop) && (AbilityClass(lv_abil) != c_classIdCAbilTransport) && (AbilityClass(lv_abil) != c_classIdCAbilMorph) && (AbilityClass(lv_abil) != c_classIdCAbilMorphPlacement)) {
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:1174
}
else if (true) {
if ((UnitTypeTestAttribute(UnitGetType(lp_orderedUnit), c_unitAttributeStructure) == true) && (AbilityClass(lv_abil) != c_classIdCAbilAttack) && (AbilityClass(lv_abil) != c_classIdCAbilMove) && (AbilityClass(lv_abil) != c_classIdCAbilStop) && (AbilityClass(lv_abil) != c_classIdCAbilTransport) && (AbilityClass(lv_abil) != c_classIdCAbilMorph) && (AbilityClass(lv_abil) != c_classIdCAbilMorphPlacement)) {
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:13312
}
autoA1283C56_val = AbilityClass(lv_structureAbility);
if (autoA1283C56_val == c_classIdCAbilTrain) {
lv_commandCount = 0;
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicTactical.galaxy:635
for ( ; autoEE073BD6_i <= UnitAbilityCount(autoEE073BD6_unit) ; autoEE073BD6_i += 1 ) {
lv_itAbilLink = UnitAbilityGet(autoEE073BD6_unit, autoEE073BD6_i);
if ((AbilityClass(lv_itAbilLink) == c_classIdCAbilInventory)) {
lv_inventoryLink = lv_itAbilLink;
}