package OeSetup import AbilityObjEditing import Setup import Helper import PreloadSystem import CompiletimeInit @dinit function createObjects() lifeAbilitys() manaAbilitys() agiAbilitys() strAbilitys() intAbilitys() attackAbilitys() attackSpeedAbilitys() armorAbilitys() lifeRegAbilitys() manaRegAbilitys() permAttackItems() permAttackAbilitys() function lifeAbilitys() for int i = 'a' to 'a' + (maxBonSize - 1) if compiletime var obj = new AbilityDefinitionMaxLifeBonusLesser(lifeRaw + i) obj.setMaxLifeGained(1, (2).pow(i - 'a')) obj.setItemAbility(false) obj.setName("Bonus Life +") obj.setEditorSuffix((2).pow(i - 'a').toString()) else addAbilityToPreload(lifeRaw + i, 1) if compiletime var objN = new AbilityDefinitionMaxLifeBonusLesser(lifeRaw + '-') objN.setMaxLifeGained(1, -((2).pow(maxBonSize))) objN.setItemAbility(false) objN.setName("Bonus Life -") objN.setEditorSuffix((2).pow(maxBonSize).toString()) else addAbilityToPreload(lifeRaw + '-', 1) function manaAbilitys() for int i = 'a' to 'a' + (maxBonSize - 1) if compiletime var obj = new AbilityDefinitionMaxManaBonusLeast(manaRaw + i) obj.setMaxManaGained(1, (2).pow(i - 'a')) obj.setItemAbility(false) obj.setName("Bonus Mana +") obj.setEditorSuffix((2).pow(i - 'a').toString()) else addAbilityToPreload(manaRaw + i, 1) if compiletime var objN = new AbilityDefinitionMaxManaBonusLeast(manaRaw + '-') objN.setMaxManaGained(1, -((2).pow(maxBonSize))) objN.setItemAbility(false) objN.setName("Bonus Mana -") objN.setEditorSuffix((2).pow(maxBonSize).toString()) else addAbilityToPreload(manaRaw + '-', 1) function agiAbilitys() for int i = 'a' to 'a' + (maxBonSize - 1) if compiletime var obj = new AbilityDefinitionAgilityBonusPlus1(agiRaw + i) obj.setAgilityBonus(1, (2).pow(i - 'a')) obj.setItemAbility(false) obj.setName("Bonus Agi +") obj.setEditorSuffix((2).pow(i - 'a').toString()) else addAbilityToPreload(agiRaw + i, 1) if compiletime var objN = new AbilityDefinitionAgilityBonusPlus1(agiRaw + '-') objN.setHideButton(1, true) objN.setAgilityBonus(1, -((2).pow(maxBonSize))) objN.setItemAbility(false) objN.setName("Bonus Agi -") objN.setEditorSuffix((2).pow(maxBonSize).toString()) addAbilityToPreload(agiRaw + '-', 1) function strAbilitys() for int i = 'a' to 'a' + (maxBonSize - 1) if compiletime var obj = new AbilityDefinitionStrengthBonusPlus1(strRaw + i) obj.setStrengthBonus(1, (2).pow(i - 'a')) obj.setItemAbility(false) obj.setName("Bonus Str +") obj.setEditorSuffix((2).pow(i - 'a').toString()) else addAbilityToPreload(strRaw + i, 1) if compiletime var objN = new AbilityDefinitionStrengthBonusPlus1(strRaw + '-') objN.setStrengthBonus(1, -((2).pow(maxBonSize))) objN.setItemAbility(false) objN.setName("Bonus Str -") objN.setEditorSuffix((2).pow(maxBonSize).toString()) else addAbilityToPreload(strRaw + '-', 1) function intAbilitys() for int i = 'a' to 'a' + (maxBonSize - 1) if compiletime var obj = new AbilityDefinitionIntelligenceBonusPlus1(intRaw + i) obj.setIntelligenceBonus(1, (2).pow(i - 'a')) obj.setItemAbility(false) obj.setName("Bonus Int +") obj.setEditorSuffix((2).pow(i - 'a').toString()) else addAbilityToPreload(intRaw + i, 1) if compiletime var objN = new AbilityDefinitionIntelligenceBonusPlus1(intRaw + '-') objN.setIntelligenceBonus(1, -((2).pow(maxBonSize))) objN.setItemAbility(false) objN.setName("Bonus Int -") objN.setEditorSuffix((2).pow(maxBonSize).toString()) addAbilityToPreload(intRaw + '-', 1) function attackAbilitys() for int i = 'a' to 'a' + (maxBonSize - 1) if compiletime var obj = new AbilityDefinitionAttackBonusAItf(attackRaw + i) obj.setAttackBonus(1, (2).pow(i - 'a')) obj.setItemAbility(false) obj.setName("Bonus Attack +") obj.setEditorSuffix((2).pow(i - 'a').toString()) else addAbilityToPreload(attackRaw + i, 1) if compiletime var objN = new AbilityDefinitionAttackBonusAItf(attackRaw + '-') objN.setAttackBonus(1, -((2).pow(maxBonSize))) objN.setItemAbility(false) objN.setName("Bonus Attack -") objN.setEditorSuffix((2).pow(maxBonSize).toString()) else addAbilityToPreload(attackRaw + '-', 1) function attackSpeedAbilitys() for int i = 'a' to 'a' + (maxBonSize - 1) if compiletime var obj = new AbilityDefinitionAttackSpeedIncrease(attackSpeedRaw + i) obj.setAttackSpeedIncrease(1, ((2).pow(i - 'a'))/100) obj.setItemAbility(false) obj.setName("Bonus AttackSpeed +") obj.setEditorSuffix((2).pow(i - 'a').toString()) else addAbilityToPreload(attackSpeedRaw + i, 1) if compiletime var objN = new AbilityDefinitionAttackSpeedIncrease(attackSpeedRaw + '-') objN.setAttackSpeedIncrease(1, -(((2).pow(maxBonSize))/100)) objN.setItemAbility(false) objN.setName("Bonus AttackSpeed -") objN.setEditorSuffix((2).pow(maxBonSize).toString()) else addAbilityToPreload(attackSpeedRaw + '-', 1) function armorAbilitys() for int i = 'a' to 'a' + (maxBonSize - 1) if compiletime var obj = new AbilityDefinitionDefenseBonusPlus1(armorRaw + i) obj.setDefenseBonus(1, (2).pow(i - 'a')) obj.setItemAbility(false) obj.setName("Bonus Armor +") obj.setEditorSuffix((2).pow(i - 'a').toString()) else addAbilityToPreload(armorRaw + i, 1) if compiletime var objN = new AbilityDefinitionDefenseBonusPlus1(armorRaw + '-') objN.setDefenseBonus(1, -((2).pow(maxBonSize))) objN.setItemAbility(false) objN.setName("Bonus Armor -") objN.setEditorSuffix((2).pow(maxBonSize).toString()) else addAbilityToPreload(armorRaw + '-', 1) function lifeRegAbilitys() for int i = 'a' to 'a' + (maxBonSize - 1) if compiletime var obj = new AbilityDefinitionNeutralRegenhealthonly(lifeRegRaw + i) obj.setRace(Race.Other) obj.setPercentage(1, false) obj.setAreaofEffect(1,1) obj.setTargetsAllowed(1,"self") obj.setAmountofHitPointsRegenerated(1, ((2).pow(i - 'a'))*0.05) obj.setItemAbility(false) obj.setName("Bonus LifeReg +") obj.setEditorSuffix((2).pow(i - 'a').toString()) else addAbilityToPreload(lifeRegRaw + i, 1) if compiletime var objN = new AbilityDefinitionNeutralRegenhealthonly(lifeRegRaw + '-') objN.setRace(Race.Other) objN.setPercentage(1, false) objN.setAreaofEffect(1,1) objN.setTargetsAllowed(1,"self") objN.setAmountofHitPointsRegenerated(1, -(((2).pow(maxBonSize))*0.05)) objN.setItemAbility(false) objN.setName("Bonus LifeReg -") objN.setEditorSuffix((2).pow(maxBonSize).toString()) else addAbilityToPreload(lifeRegRaw + '-', 1) function manaRegAbilitys() for int i = 'a' to 'a' + (maxBonSize - 1) if compiletime var obj = new AbilityDefinitionNeutralRegenmanaonly(manaRegRaw + i) obj.setRace(Race.Other) obj.setPercentage(1, false) obj.setAreaofEffect(1,1) obj.setTargetsAllowed(1,"self") obj.setAmountRegenerated(1, ((2).pow(i - 'a'))*0.05) obj.setItemAbility(false) obj.setName("Bonus ManaReg +") obj.setEditorSuffix((2).pow(i - 'a').toString()) else addAbilityToPreload(manaRegRaw + i, 1) if compiletime var objN = new AbilityDefinitionNeutralRegenmanaonly(manaRegRaw + '-') objN.setRace(Race.Other) objN.setPercentage(1, false) objN.setAreaofEffect(1,1) objN.setTargetsAllowed(1,"self") objN.setAmountRegenerated(1, -(((2).pow(maxBonSize))*0.05)) objN.setItemAbility(false) objN.setName("Bonus manaReg -") objN.setEditorSuffix((2).pow(maxBonSize).toString()) else addAbilityToPreload(manaRegRaw + '-', 1) function permAttackItems() for int i = 'a' to 'a' + (maxBonSize - 1) if compiletime var u = createObjectDefinition("w3t", permAttackItemRaw + i, 'tint') u.setString("iabi", (permAttackRaw + i).asFourchar()) u.setString("ifil", "none.mdl") u.setInt("ihtp", 100) u.setString("iico", "ReplaceableTextures\\CommandButtons\\BTNArcaniteMelee.blp") u.setString("unam", "Attack Tome +" + (2).pow(i - 'a').toString()) u.setInt("iicd", 1) else addItemToPreload(permAttackItemRaw + i) if compiletime let un = createObjectDefinition("w3t", (permAttackItemRaw + 'C'), 'tint') un.setString("iabi", (permAttackRaw + 'C').asFourchar()) un.setString("ifil", "none.mdl") un.setInt("ihtp", 100) un.setString("iico", "ReplaceableTextures\\CommandButtons\\BTNArcaniteMelee.blp") un.setString("unam", "Attack Tome -" + (2).pow(maxBonSize).toString()) un.setInt("iicd", 1) else addItemToPreload(permAttackItemRaw + 'C') function permAttackAbilitys() for int i = 'a' to 'a' + (maxBonSize - 1) if compiletime let u = createObjectDefinition("w3a", permAttackRaw + i, 'AIaa') u.setLvlDataString("anam", 0, 0, "BonusMod - AttackPerm") u.setLvlDataString("ansf", 0, 0, "(+" + (2).pow(i - 'a').toString() + ")") u.setLvlDataString("acat", 0, 0, "") u.setLvlDataInt("Iaa1", 1, 1, (2).pow(i - 'a')) u.setLvlDataInt("aite", 0, 0, 1) if compiletime let un = createObjectDefinition("w3a", (permAttackRaw + 'C'), 'AIaa') un.setLvlDataString("anam", 0, 0, "BonusMod - AttackPerm") un.setLvlDataString("ansf", 0, 0, "(-" + (2).pow(maxBonSize).toString() + ")") un.setLvlDataString("acat", 0, 0, "") un.setLvlDataInt("Iaa1", 1, 1, -(2).pow(maxBonSize)) un.setLvlDataInt("aite", 0, 0, 1)