package SpinnerObjects import BuilderConstants import ChannelAbilityPreset // Frontpage spells public constant SPIN_ADD_SINGLE_ID = compiletime(ABIL_ID_GEN.next()) public constant SPIN_ADD_GROUP_ID = compiletime(ABIL_ID_GEN.next()) // Config Spellbook public constant SPIN_CONFIG_SPELLBOOK_ID = compiletime(ABIL_ID_GEN.next()) public constant SPIN_INC_SPEED_ID = compiletime(ABIL_ID_GEN.next()) public constant SPIN_DEC_SPEED_ID = compiletime(ABIL_ID_GEN.next()) public constant SPIN_COS_INC_ID = compiletime(ABIL_ID_GEN.next()) public constant SPIN_COS_DEC_ID = compiletime(ABIL_ID_GEN.next()) public constant SPIN_SIN_INC_ID = compiletime(ABIL_ID_GEN.next()) public constant SPIN_SIN_DEC_ID = compiletime(ABIL_ID_GEN.next()) @objectgen function genSpinner() new UnitDefinition(SPINNER_ID, 'ewsp') ..setUnitClassification("") ..setAttacksEnabled(0) ..setAnimationBlendTimeseconds(0) ..setAnimationCastBackswing(0) ..setDeathTimeseconds(0.1) ..setScalingValue(0.8) ..setIconGameInterface("ReplaceableTextures\\CommandButtons\\BTNspinner.blp") ..setButtonPositionX(1) ..setButtonPositionY(1) ..setModelFile("units\\undead\\Acolyte\\Acolyte.mdl") ..setSelectionScale(1) ..setSpeedBase(180) ..setTurnRate(3) ..setMovementType(MovementType.Foot) ..setUnitSoundSet("") ..setCollisionSize(0) ..setStructuresBuilt("") ..setNormalAbilities(commaList('A01H', 'A01E', SPIN_ADD_SINGLE_ID, SPIN_ADD_GROUP_ID, SPIN_CONFIG_SPELLBOOK_ID, MAKE_UNIT_INVISIBLE_ID, REMOVE_OBJECT_ID, GHOST_VIS_ID, INVULNERABILITY_ID)) ..setHotkey("S") ..setName("|cff949494Spinner") ..setTooltipBasic("|cffFFCC00Build |cff949494Spinner [S]") ..setTooltipExtended("Spins the selected units around itself in a circular motion." + "\nThe spinner itself can also be moved and controlled while spinning units.") ..setUpgradesUsed("") ..setBuildTime(1) ..setHitPointsMaximumBase(100000000) ..setSightRadiusDay(0) ..setSightRadiusNight(0) ..setFoodCost(0) ..setGoldCost(0) ..setLumberCost(0) ..setShadowImageUnit("") ..setIsaBuilding(false) ..setHideMinimapDisplay(true) new ChannelAbilityPreset(SPIN_ADD_SINGLE_ID, 1, true) ..presetTargetTypes(Targettype.UNIT) ..setName("Spinner: Spin Unit") ..setTooltipNormal(1, "Spin/Stop |cff219CEFUnit |r[|cffFFCC00A|r]") ..setTooltipNormalExtended(1, "Adds or removes the selected unit to the units spun by this spinner.") ..presetIcon("BTNWispSplode.blp") ..setRace(Race.Commoner) ..setTargetsAllowed(1, "allies,friend,invulnerable,notself,vulnerable") ..setCastRange(1, 1250.0) ..presetButtonPosNormal(1, 1) ..presetHotkey("A") new ChannelAbilityPreset(SPIN_ADD_GROUP_ID, 1, true) ..presetTargetTypes(Targettype.POINT) ..setName("Spinner: Spin Group") ..setTooltipNormal(1, "Spin/Stop |cff219CEFGroup |r[|cffFFCC00D|r]") ..setTooltipNormalExtended(1, "Adds or removes all units in the selected group.") ..presetIcon("ReplaceableTextures\\CommandButtons\\BTNDispelMagic.blp") ..setRace(Race.Commoner) ..setTargetsAllowed(1, "allies,friend,invulnerable,notself,vulnerable") ..setCastRange(1, 1250.0) ..presetOption(Option.TARGETIMAGE, true) ..presetButtonPosNormal(0, 1) ..presetAreaofEffect(lvl -> 300.0) ..presetHotkey("D") new ChannelAbilityPreset(SPIN_INC_SPEED_ID, 1, true) ..setName("Spinner: Increase Spin Speed") ..presetIcon("BTNincreaseAttackSpeed.blp") ..setTooltipNormal(1, "|cff3ABD52Increase|r Spin Speed [|cffFFCC00A|r]") ..setTooltipNormalExtended(1, "Increases the speed with which the targets are spun.") ..presetButtonPosNormal(0, 0) ..presetHotkey("Q") new ChannelAbilityPreset(SPIN_DEC_SPEED_ID, 1, true) ..setName("Spinner: Decrease Spin Speed") ..presetIcon("BTNdecreaseAttackSpeed.blp") ..setTooltipNormal(1, "|cff3ABD52Decrease|r Spin Speed [|cffFFCC00W|r]") ..setTooltipNormalExtended(1, "Decreases the speed with which the targets are spun.") ..presetButtonPosNormal(1, 0) ..presetHotkey("W") new ChannelAbilityPreset(SPIN_COS_INC_ID, 1, true) ..setName("Spinner: Increase Cos Factor") ..presetIcon("BTNIncreaseSin.blp") ..setTooltipNormal(1, "|cff3ABD52Increase|r Cos Factor [|cffFFCC00Q|r]") ..setTooltipNormalExtended(1, "Increases the factor of cos when calculation the spinning point.\r\nThis allows for elliptical movement.") ..presetButtonPosNormal(2, 0) ..presetHotkey("Q") new ChannelAbilityPreset(SPIN_COS_DEC_ID, 1, true) ..setName("Spinner: Decrease Cos Factor") ..presetIcon("BTNDecreaseSin.blp") ..setTooltipNormal(1, "|cff3ABD52Decrease|r Cos Factor [|cffFFCC00Q|r]") ..setTooltipNormalExtended(1, "Decreases the factor of cos when calculation the spinning point.\r\nThis allows for elliptical movement.") ..presetButtonPosNormal(2, 0) ..presetHotkey("Q") new ChannelAbilityPreset(SPIN_SIN_INC_ID, 1, true) ..setName("Spinner: Increase Sin Factor") ..presetIcon("BTNIncreaseCos.blp") ..setTooltipNormal(1, "|cff3ABD52Increase|r Sin Factor [|cffFFCC00Q|r]") ..setTooltipNormalExtended(1, "Increases the factor of sin when calculation the spinning point.\r\nThis allows for elliptical movement.") ..presetButtonPosNormal(2, 0) ..presetHotkey("Q") new ChannelAbilityPreset(SPIN_SIN_DEC_ID, 1, true) ..setName("Spinner: Decrease Sin Factor") ..presetIcon("BTNDecreaseCos.blp") ..setTooltipNormal(1, "|cff3ABD52Decrease|r Sin Factor [|cffFFCC00Q|r]") ..setTooltipNormalExtended(1, "Decreases the factor of sin when calculation the spinning point.\r\nThis allows for elliptical movement.") ..presetButtonPosNormal(2, 0) ..presetHotkey("Q") new AbilityDefinitionSpellBook(SPIN_CONFIG_SPELLBOOK_ID) ..setName("Spinner: Spin Options") ..presetIcon("BTNSpinOptions.blp") ..setMaximumSpells(1, 6) ..setMinimumSpells(1, 6) ..setSpellList(1, commaList(SPIN_SIN_INC_ID, SPIN_SIN_DEC_ID, SPIN_COS_INC_ID, SPIN_COS_DEC_ID, SPIN_INC_SPEED_ID, SPIN_DEC_SPEED_ID)) ..setItemAbility(false) ..presetButtonPosNormal(3, 0) ..presetHotkey("R") ..setTooltipNormal(1, "Open |cffFFAD29Spin Options |r[|cffFFCC00R|r]") ..setTooltipNormalExtended(1, "Lets you change properties of the spinning process like speed and form.") ..setSharedSpellCooldown(1, false)