Naga'sShadow
Ultra Cool Member
- Reaction score
- 49
I'm creating a multi leveled spell based on a spell book. Every spell in the spellbook is leveled accordingly. I don't believe it is possible to place a multi leveled spell in a spellbook so every level is a different spell. Problem is detecting and using the spells using triggers. As each one is a different spell I need a different rawcode for each one. In the test function I'm working with now I have this monster as a condition function.
I could turn is sideways by using or instead of elseif but this is easier to read for the moment.
I know that the following won't work 'A00[x]' Where x is an index for a loop. Is there any way to condense this into something workable?
JASS:
private function conditions takes nothing returns boolean
if GetSpellAbilityId() == 039;A001039; then
return true
elseif GetSpellAbilityId() == 039;A002039; then
return true
elseif GetSpellAbilityId() == 039;A003039; then
return true
elseif GetSpellAbilityId() == 039;A004039; then
return true
elseif GetSpellAbilityId() == 039;A005039; then
return true
elseif GetSpellAbilityId() == 039;A006039; then
return true
elseif GetSpellAbilityId() == 039;A007039; then
return true
elseif GetSpellAbilityId() == 039;A008039; then
return true
elseif GetSpellAbilityId() == 039;A009039; then
return true
elseif GetSpellAbilityId() == 039;A00A039; then
return true
else
return false
endif
endfunction
I could turn is sideways by using or instead of elseif but this is easier to read for the moment.
I know that the following won't work 'A00[x]' Where x is an index for a loop. Is there any way to condense this into something workable?