Name | Type | is_array | initial_value |
AllPlayer | force | No | |
Angle | real | Yes | |
ArmsPoint | location | Yes | |
ArmsUnit | unit | Yes | |
AvatarItemUG | group | No | |
BakuenAngle | real | No | |
BakuenDummy | unit | Yes | |
BakuenG1 | group | No | |
BakuenjinDamage | real | No | |
BakuenjinG | group | No | |
BakuenPoint | location | Yes | |
BakuenReal | real | No | |
BarrieraMedusaCast | unit | No | |
BarrieraMedusaCheck | boolean | No | |
BarrieraMedusaEffect | effect | No | |
BarrieraMedusaGroup | group | No | |
BarrieraMedusaPoint | location | Yes | |
BarrieraMedusaTimer | timer | No | |
bersswd | effect | No | |
BlackBurnCast | unit | No | |
BlackBurnCount | real | No | |
BlackBurnDummy | unit | Yes | |
BlackBurnEffect | effect | No | |
BlackBurnGroup | group | No | |
BlackBurnLoop | integervar | No | |
BlackBurnPoint | location | Yes | |
BlackBurnUngroup | group | No | |
BlinkPoint | location | No | |
BlinkPoint2 | location | No | |
BombaAmoniteCast | unit | No | |
BombaAmoniteDamage | real | No | |
BombaAmoniteDummy | unit | No | |
BombaAmoniteGroup | group | No | |
BombaAmoniteInteger | integer | No | |
BombaAmonitePoint | location | Yes | |
BombaAmoniteSize | real | No | |
BusterStormCast | unit | No | |
BusterStormLoop | integervar | No | |
BusterStormPoint | location | Yes | |
BusterStormTarg | unit | No | |
C_U | unit | Yes | |
CAIRandom | integer | No | |
CAIRandomAngle | real | No | |
CAIRandomCast | unit | No | |
CAIRandomDamage | real | No | |
CAIRandomDummy | unit | No | |
CAIRandomPoint | location | No | |
CAIRandomPoint2 | location | No | |
CAIRandomTarg | unit | No | |
CameraGroup | group | No | |
CARRandomDouble | integer | No | |
Caster | unit | Yes | |
caster | unit | No | |
caster2 | unit | No | |
Charge | real | No | |
CIARandomCastPoint | location | No | |
CountForCreep | integer | Yes | |
CountForCreepLeft | integer | Yes | |
CountForCreepRight | integer | Yes | |
CountForTournamet | integer | No | |
CoupoAngle | real | No | |
CoupoCast | unit | No | |
CoupoDist | real | No | |
CoupoGroup | group | No | |
CoupoPoint | location | Yes | |
CoupoTypeCreate | unitcode | No | |
DDS_EVENT | real | No | |
DemonLenCast | unit | No | |
DemonLenGroup | group | No | |
DemonLenPoint | location | Yes | |
DemonLenReal | real | Yes | |
DemonMistCast | unit | No | |
DemonMistPoint | location | Yes | |
Dialog | dialog | No | |
DialogButton | button | Yes | |
DialogButtonKillMode | button | Yes | |
DialogButtonMode | button | Yes | |
dmggroup | group | No | |
dummy | unit | No | |
dummy1 | unit | No | |
dummyloc | location | No | |
DyingwillFlameBlockChance | integer | Yes | |
DyingWillWingCast | unit | No | |
DyingWillWingEffect | effect | No | |
DyingWillWingPoint | location | No | |
effects | effect | Yes | |
effects1 | effect | Yes | |
ElectricoCast | unit | No | |
ElectricoPoint | location | No | |
ElectricoPoint2 | location | No | |
ElectricoPoint3 | location | No | |
ElectricoReal | real | No | |
ElectricoShieldCast | unit | No | |
ElectricoShieldCheck | boolean | No | |
ElectricoShieldDamage | real | No | |
ElectricoShieldPoint | location | No | |
ElectricoShieldReal | real | No | |
ElectricoTarg | unit | No | |
ElectricoTowerCast | unit | No | |
ElectricoTowerDummy | unit | Yes | |
ElectricoTowerGroup | group | No | |
ElectricoTowerLoop | integervar | No | |
ElectricoTowerPoint | location | No | |
ElectricoTowerTarg | location | No | |
EnableIcon | destructable | Yes | |
FastDanceAngle | real | No | |
FastDanceCast | unit | No | |
FastDanceCount | integer | No | |
FastDanceCount2 | integer | No | |
FastDanceDamage | real | No | |
FastDanceDist | real | No | |
FastDancePoint | location | Yes | |
FastDanceTarg | unit | No | |
FFATournamentTimer | timer | No | |
FloatTextSlelectUnit | texttag | Yes | |
Group | group | No | |
GurenInteger | integer | Yes | |
GurenPoint | location | Yes | |
GurenReal | real | Yes | |
GurenUnit | unit | Yes | |
GyuudonPoint | location | No | |
HasanagiAngle | real | No | |
HasanagiCast | unit | No | |
HasanagiCount | integer | No | |
HasanagiDummy | unit | No | |
HasanagiGroup | group | No | |
HasanagiIngnore | group | No | |
HasanagiPoint | location | Yes | |
HasanagiReal | real | No | |
HashGame | hashtable | No | |
hashgroup | group | No | |
hashice | hashtable | No | |
HellRingFormCast | unit | No | |
HellRingFormCheck | boolean | No | |
HeroGone | boolean | Yes | |
HeroRevive | unit | Yes | |
HeroType | unitcode | Yes | |
HungryGhostAbility | abilcode | Yes | |
HungryGhostCast | unit | No | |
HungryGhostSaveAbi | abilcode | No | |
HungryGhostTarg | unit | No | |
ice_expansiontime | real | No | |
iceangle | real | No | |
icecast | unit | No | |
icedamage | real | No | |
icedamagerange | real | No | |
icedistanceinterval | real | No | |
iceduration | real | No | |
iceintegera | integervar | No | |
iceinterval | integer | No | |
iceloc | location | No | |
iceoff | location | No | |
icereal | real | No | |
IconDisHero | destructablecode | Yes | |
IconHero | destructablecode | Yes | |
IconMultiboard | imagefile | Yes | |
IllusionCounterAngle | real | No | |
IllusionCounterCast | unit | No | |
IllusionCounterDummy | unit | No | |
IllusionCounterPoint | location | No | |
IllusionCounterPoint2 | location | No | |
IllusionCounterRandom | integer | No | |
IllusionCounterReal | real | No | |
IllusionCounterTarg | unit | No | |
IllusionEnterPoint | location | Yes | |
IllusionForestCast | unit | No | |
IllusionForestDest | destructable | Yes | |
IllusionForestGroup | group | No | |
IllusionForestLoop | integervar | No | |
IllusionForestPoint | location | No | |
IllusionForestPointG | location | No | |
IllusionForestReal | real | No | |
IllusionForestTarg | location | No | |
IllusionForestUnit | unit | Yes | |
IllusionModeCast | unit | No | |
IllusionModePoint | location | Yes | |
IllusionSoldierCast | unit | No | |
IllusionSoldierGroup | group | No | |
IllusionSoldierPoint | location | Yes | |
IllusionStrikeCast | unit | No | |
IllusionStrikePoint | location | No | |
IllusionStrikePoint2 | location | No | |
IllusionStrikeReal | real | No | |
IllusionStrikeTarg | unit | No | |
Int | integer | No | |
Integer | integer | No | |
integers | integer | Yes | |
integers1 | integer | Yes | |
InvisibleRocketCast | unit | No | |
InvisibleRocketLoop | integervar | No | |
InvisibleRocketPoint | location | No | |
InvisibleRocketReal | real | No | |
InvisibleRocketTarg | unit | No | |
ItemLimit | integer | No | |
ItemUnit | unit | Yes | |
jella | unit | Yes | |
JuhakuAngle | real | No | |
JuhakuCaster | unit | No | |
JuhakuDMG | group | No | |
JuhakuDummy | unit | No | |
JuhakuPoint | location | Yes | |
JuhakuRelease | group | No | |
KangaryuuCast | unit | No | |
KangaryuuDummy | unit | No | |
KangaryuuPoint | location | No | |
KangaryuuPoint2 | location | No | |
KangaryuuPoint3 | location | No | |
KangaryuuReal | real | No | |
KankaryuuGroup | group | No | |
KaryuukenUnit | unit | Yes | |
KatonCast | unit | No | |
KatonCount | integer | No | |
KatonDamage | real | No | |
KatonFireCast | unit | No | |
KatonGroup | group | No | |
KatonIgnore | group | No | |
KatonPoint | location | No | |
KatonPoint2 | location | No | |
KatonPointup | location | No | |
KatonRealPoint | real | No | |
KatonUnit | unit | No | |
KatonUnit2 | unit | No | |
KillModePoint | integer | No | |
Lambo10Point | location | No | |
Lambo10yearCast | unit | No | |
LamboBoxAngle | real | No | |
LamboBoxCast | unit | No | |
LamboBoxCheck | boolean | No | |
LamboBoxDummy | unit | No | |
LamboBoxDummy2 | unit | No | |
LamboBoxGroup | group | No | |
LamboBoxIgnore | group | No | |
LamboBoxPoint | location | No | |
LamboBoxPointCast | location | No | |
LamboBoxPointD | location | No | |
LamboBoxPointDummy | location | No | |
LamboBoxPointOrder | location | Yes | |
LamboBoxPointTarg | location | No | |
LamboBoxReal | real | No | |
LamboCheck | boolean | No | |
LamboSound | location | No | |
LegreCast | unit | No | |
LightningCheck | group | No | |
LigreDummy | unit | No | |
LigreGroup | group | No | |
LigreGroupDamage | group | No | |
LigreLoop | integervar | No | |
LigrePoint | location | No | |
LigrePoint2 | location | No | |
LigrePoint3 | location | No | |
LigreTarg | location | No | |
LRoarP | location | Yes | |
MaxHero | integer | No | |
MaximumComPoint | location | Yes | |
MaximumComUnit | unit | Yes | |
MBBool | boolean | No | |
MBBool2 | boolean | No | |
MBInt | integer | No | |
MBInt2 | integer | No | |
MBPoint | location | Yes | |
MemoHero | integer | Yes | |
Meteor | unit | No | |
MeteorzCast | unit | No | |
MeteorzEffect | effect | No | |
MeteorzPoint | location | No | |
Minato | unit | No | |
Minato2 | unit | No | |
Minato_Points | location | Yes | |
Minato_Real | real | Yes | |
Minato_Units | unit | Yes | |
MinatoBlink | unit | Yes | |
MinkStormCast | unit | No | |
MinkStormDummy | unit | Yes | |
MinkStormGroup | group | No | |
MinkStormLoop | integervar | No | |
MinkStormPoint | location | No | |
MinkStormTarg | location | No | |
Minute | integer | No | |
MistSandHoleCast | unit | No | |
MistSandHoleGroup | group | No | |
MistSandHolePoint | location | Yes | |
Move | integer | No | |
MukuroCheck | boolean | No | |
MukuroForm | unit | No | |
Mukuroint | integer | No | |
MukuroUnit | unit | No | |
MultiboardCountDown | integer | Yes | |
Mystogan | unit | Yes | |
MystoganMWGroup | group | No | |
Natsu | unit | No | |
NatsuPoint | location | No | |
NeedleRCast | unit | No | |
NeedleRCheck | boolean | No | |
NeedleRClone | unit | No | |
NeedleRCount | integer | No | |
NeedleRCPoint | location | No | |
NeedleRDest | destructable | Yes | |
NeedleRDummy | unit | No | |
NeedleRGroup | group | No | |
NeedleRLoop | integervar | No | |
NeedleRMana | real | Yes | |
NeedleRPoint | location | Yes | |
NeedleRPolar | location | No | |
NeedleRRange | real | No | |
NeedleRSize | real | No | |
NeedleRTarg | unit | No | |
NeedleRTPoint | location | No | |
NeedleRTPoint2 | location | No | |
NeedleSphereReCheck | boolean | No | |
NLBWCount | integer | No | |
NSRCAST | unit | No | |
NSRCATPOS | location | No | |
NSRDUMMY | unit | Yes | |
NSRINDEX | integer | No | |
NSRTARG | unit | No | |
NSRTARGPOS | location | No | |
OldIcon | destructable | Yes | |
P10Revive | timer | No | |
P11Revive | timer | No | |
P12Revive | timer | No | |
P2Revive | timer | No | |
P3Revive | timer | No | |
P4Revive | timer | No | |
P6Revive | timer | No | |
P7Revive | timer | No | |
P8Revive | timer | No | |
PainPoint | location | Yes | |
PainPoint1 | location | Yes | |
PeacockAngle | real | No | |
PeacockCast | unit | No | |
PeacockDummy | unit | No | |
PeacockGroup | group | No | |
PeacockPoint | location | Yes | |
PeinCheckDeath | integer | No | |
PeinCheckDeath1 | integer | No | |
PeinRandomAi | integer | No | |
PeinRandomAi1 | integer | No | |
PlayerInteger | integer | No | |
Playeritem | integer | No | |
PlayerWin | boolean | No | |
Point | location | No | |
PointModeTeam | integer | Yes | |
points | location | Yes | |
points1 | location | Yes | |
PointSelectUnit | location | Yes | |
Position | location | Yes | |
ProjCheck | boolean | No | |
ProjTimer | timer | No | |
PropagationCast | unit | No | |
PropagationCount | integer | No | |
PropagationDest | destructable | Yes | |
PropagationDummy | unit | Yes | |
PropagationGroup | group | No | |
PropagationIgnore | group | No | |
PropagationLoop | integervar | No | |
PropagationLoop2 | integervar | No | |
PropagationPoint | location | Yes | |
R_I | integer | Yes | |
R_P | location | Yes | |
R_R | real | Yes | |
R_T | timer | Yes | |
R_U | unit | Yes | |
RainBoxCarnageCast | unit | No | |
RainBoxCarnageEffect | effect | No | |
RainCanage | integer | No | |
RainCarnageBoxDummy | unit | No | |
RainSeaShellReal | real | No | |
RainSeaShellsCast | unit | No | |
RainSeaShellsGroup | group | No | |
RainSeaShellsPoint | location | Yes | |
RandomHero | integer | No | |
RemoveHeroOut | group | No | |
RemoveHeroWhenOut | group | No | |
removeloc | location | No | |
Roar2Distance | real | No | |
RoarTargets | group | Yes | |
RocketBomBGroup | group | No | |
RocketBomBPoint | location | No | |
RocketBomBReal | real | No | |
RocketLancherDummy | unit | No | |
RocketLancherPoint | location | No | |
RocketLancherPoint2 | location | No | |
RocketLancherReal | real | No | |
RocketLancherTarg | unit | No | |
RocketLauncherCasr | unit | No | |
Sasuke_Effects | effect | Yes | |
ScoreDeath | integer | Yes | |
ScoreKill | integer | Yes | |
Second | integer | No | |
SelectedYet | boolean | Yes | |
SelectHeroTime | real | No | |
SelectHeroTimer | timer | No | |
SelectHeroTimerWindow | timerdialog | No | |
SenCheck | boolean | No | |
SenMode | unit | No | |
SenModeForm | integer | No | |
SenninAura | location | No | |
SenninCheck | boolean | No | |
SenninModeCast | unit | No | |
SenninModeForm | integer | No | |
SenpouChouAngle | real | Yes | |
SenpouChouBall | unit | Yes | |
SenpouChouDamage | real | No | |
SenpouChouDist | real | Yes | |
SenpouChouDummy | unit | Yes | |
SenpouChouEffect | integer | No | |
SenpouChouGroup | group | No | |
SenpouChouIndex | integer | No | |
SenpouChouInt | integer | No | |
SenpouChouInt2 | integer | No | |
SenpouChouOodaraSize | real | Yes | |
SenpouChouPoint | location | Yes | |
SenpouChouTarget | unit | No | |
SenpouChouUnit | unit | No | |
SharkChainCast | unit | No | |
SharkChainDamage | real | No | |
SharkChainDummy | unit | No | |
SharkChainGroup | group | No | |
SharkChainLoop | integervar | No | |
SharkChainPoint | location | No | |
SharkChainPoint2 | location | No | |
SharkChainTarg | unit | No | |
ShieldOfSasunoChance | integer | Yes | |
ShieldOfSasunoPlayer | integer | No | |
ShigureAllEff | effect | No | |
ShigureAllGroup | group | No | |
ShigureAllPoint | location | Yes | |
ShigureAllUnit | unit | Yes | |
ShigureSoen10CastP | location | No | |
ShigureSoen10CastPT | location | No | |
ShigureSoen10PC | location | No | |
ShigureSoen2Cast | unit | No | |
ShigureSoen2Dummy | unit | No | |
ShigureSoen2Group | group | No | |
ShigureSoen2Point | location | No | |
ShigureSoen2Point2 | location | No | |
ShigureSoen2Point3 | location | No | |
ShigureSoen2Time | real | No | |
ShigureSoen8Angle | real | No | |
ShigureSoen8Camera | group | No | |
ShigureSoen8Cast | unit | No | |
ShigureSoen8Count | integer | No | |
ShigureSoen8Damage | real | No | |
ShigureSoen8Dummy | unit | No | |
ShigureSoen8PT2 | location | No | |
ShigureSoen8T | unit | No | |
ShigureSoen9Damage | real | No | |
ShigureSoenCount | integer | No | |
ShigureSoenDefLoop | integervar | No | |
ShigureSoenDefMem | integer | No | |
ShigureSoenOffAngle | real | No | |
ShigureSoenOffCamera | group | No | |
ShigureSoenOffCast | unit | No | |
ShigureSoenOffCount | integer | No | |
ShigureSoenOffDamage | real | No | |
ShigureSoenOffenMem | integer | No | |
ShigureSoenOffGroup | group | No | |
ShigureSoenOffIgnore | group | No | |
ShigureSoenOffMana | real | No | |
ShigureSoenOffPoint | location | Yes | |
ShigureSoenOffTarg | unit | No | |
ShigureSoenPC | location | No | |
ShigureSoenPT | location | No | |
ShigureSouen10Cast | unit | No | |
ShigureSouen9A | unit | No | |
ShigureSouen9Cast | unit | No | |
ShigureSouen9Count | integer | No | |
ShigureSouen9Hight | real | No | |
ShigureSouen9Polar | location | No | |
ShigureSouen9Timer | timer | No | |
ShigureSouenRyuu9P | location | No | |
Shiki | unit | Yes | |
ShikiL | location | Yes | |
ShikiReal | real | Yes | |
Shiro | unit | No | |
ShiroPos | location | No | |
SixPathMem | integer | No | |
SixPathPoint | location | No | |
SqualoCast | unit | No | |
SqualoDiSqualoDamage | real | No | |
SqualoDiSqualoGroup | group | No | |
SqualoDummy | unit | No | |
SqualoDummy2 | unit | No | |
SqualoPoint | location | Yes | |
StanchCount | integer | No | |
StaunchAngle | real | No | |
StaunchCast | unit | No | |
StaunchPoint | location | Yes | |
StaunchTarg | unit | No | |
SunShineCast | unit | No | |
SunShineCheck | integer | No | |
SunshineCount | integer | No | |
SunshineDamage | real | No | |
SunshinePoint | location | Yes | |
SunshineString | string | No | |
SunshineText | texttag | No | |
swd | effect | No | |
Target | unit | No | |
target | unit | No | |
target2 | unit | No | |
TeamTournamentGroup | group | Yes | |
TeamTournamentTimer | timer | No | |
TemGroup | force | Yes | |
text | texttag | No | |
ThunderBoxCast | unit | No | |
ThunderBoxGroup | group | No | |
ThunderBoxLoop | integervar | No | |
ThunderBoxPoint | location | No | |
TimerP10 | timer | No | |
TimerP10Show | timerdialog | No | |
TimerP11 | timer | No | |
TimerP11Show | timerdialog | No | |
TimerP12 | timer | No | |
TimerP12Show | timerdialog | No | |
TimerP2 | timer | No | |
TimerP2Show | timerdialog | No | |
TimerP3 | timer | No | |
TimerP3Show | timerdialog | No | |
TimerP4 | timer | No | |
TimerP4Show | timerdialog | No | |
TimerP6 | timer | No | |
TimerP6Show | timerdialog | No | |
TimerP7 | timer | No | |
TimerP7Show | timerdialog | No | |
TimerP8 | timer | No | |
TimerP8Show | timerdialog | No | |
TotsukaCount | integer | No | |
TourInPause | group | No | |
Tournament2 | timer | No | |
Tournament2Show | timerdialog | No | |
TournamentCountPlayer | integer | No | |
TournamentDemonTimer | timer | No | |
TournamentDemonTimWin | timerdialog | No | |
TournamentDummy | unit | No | |
TournamentGroup | group | No | |
TournamentGroup2 | group | No | |
TournamentGroup3 | group | No | |
TournamentHero | unit | Yes | |
TournamentRandomPrcet | integer | No | |
TournamentRandomU | unit | Yes | |
TournamentShowTimer | timerdialog | No | |
TournamentTeamTimer | timer | No | |
TournamentTeamTimerShow | timerdialog | No | |
TournamentTeamWin | integer | No | |
TournamentTimer | timer | No | |
TournamentVersus | timer | No | |
TournamentVersusShow | timerdialog | No | |
TournamentWindow | timerdialog | No | |
TournametTimer | timer | No | |
TourRandomUnit | unit | No | |
TourTeamGroup | group | Yes | |
TourUnitLeft | unit | No | |
TsunamiAngle | real | No | |
TsunamiAngle1 | real | No | |
TsunamiCaster | unit | No | |
TsunamiCaster1 | unit | No | |
TsunamiDmg | group | No | |
TsunamiDmg1 | group | No | |
TsunamiDummy | unit | Yes | |
TsunamiDummy1 | unit | Yes | |
TsunamiPoint | location | Yes | |
TsunamiPoint1 | location | Yes | |
TsunamiRelease | group | No | |
TsunamiRelease1 | group | No | |
TsunamiWaves | rect | No | |
TsunamiWaves1 | rect | No | |
UBWOn | boolean | No | |
UltimateSwordCast | unit | No | |
UltimateSwordDummy | unit | Yes | |
UltimateSwordGroup | group | No | |
UltimateSwordLoop | integervar | No | |
UltimateSwordLoop2 | integervar | No | |
UltimateSwordPoint | location | No | |
UltimateSwordPointC | location | No | |
UltimateSwordTarg | location | No | |
UnderWorldCast | unit | No | |
UnderWorldGroup | group | No | |
UnderWorldGroup2 | group | No | |
UnderWorldPoint | location | Yes | |
Unit | unit | No | |
UnitIcon | unit | Yes | |
VerneirPoint | location | Yes | |
VerneirUnit | unit | Yes | |
VersusDemonCount | integer | No | |
VersusDemonLoop | integervar | No | |
VersusDemonRegion | group | No | |
WaterFallStrikeCast | unit | No | |
WaterFallStrikeDistance | real | No | |
WaterFallStrikeDummy | unit | No | |
WaterFallStrikeGroup | group | No | |
WaterFallStrikeIgnore | group | No | |
WaterfallStrikePoint | location | No | |
WaterfallStrikePoint2 | location | No | |
WaterFallStrikeReal | real | No | |
WaterFallStrikeTarg | location | No | |
WaterSpinCast | unit | No | |
WaterSpinCount | integer | No | |
WaterSpinDummy | unit | Yes | |
WaterSpinGroup | group | No | |
WaterSpinGroupIgnore | group | No | |
WaterSpinPoint | location | Yes | |
weaponeff | effect | No | |
WhiteDragonCast | unit | No | |
WhiteDragonDummy | unit | No | |
WhiteDragonGroup | group | No | |
WhiteDragonGroupIgnore | group | No | |
WhiteDragonLoop | integervar | No | |
WhiteDragonPoint | location | Yes | |
WingsCrimsonCast | unit | No | |
WingsCrimsonCheck | boolean | No | |
WingsCrimsonGroup | group | No | |
WingsCrimsonPoint | location | Yes | |
WingsCrimsonRight | integer | No | |
XBurnerCast | unit | No | |
XburnerCheck | boolean | No | |
XburnerCount | real | No | |
XBurnerDamage | real | No | |
XBurnerDamageCount | real | No | |
XBurnerDamageGroup | group | Yes | |
XBurnerDummy1 | unit | Yes | |
XBurnerDummy2 | unit | Yes | |
XBurnerDummy4 | unit | Yes | |
XBurnerGroupPause | group | No | |
XBurnerGroupSlow | group | No | |
XBurnerLoop | integer | No | |
XBurnerPointCast | location | No | |
XBurnerPointDamage | location | No | |
XBurnerPolar | location | No | |
XBurnerTarg | location | No | |
XburnerTime | integer | No | |
ZeroPointBreakCast | unit | No | |
ZeroPointBreakCheck | boolean | No | |
ZeroPointBreakPoint | location | Yes |
//TESH.scrollpos=0
//TESH.alwaysfold=0
library Globals
globals
hashtable HS = InitHashtable()
endglobals
function CinematicFilterGenericForPlayer takes player whichPlayer, real duration, blendmode bmode, string tex, real red0, real green0, real blue0, real trans0, real red1, real green1, real blue1, real trans1 returns nothing
if ( GetLocalPlayer() == whichPlayer ) then
call SetCineFilterTexture(tex)
call SetCineFilterBlendMode(bmode)
call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
call SetCineFilterStartUV(0, 0, 1, 1)
call SetCineFilterEndUV(0, 0, 1, 1)
call SetCineFilterStartColor(PercentTo255(red0), PercentTo255(green0), PercentTo255(blue0), PercentTo255(100-trans0))
call SetCineFilterEndColor(PercentTo255(red1), PercentTo255(green1), PercentTo255(blue1), PercentTo255(100-trans1))
call SetCineFilterDuration(duration)
call DisplayCineFilter(true)
endif
endfunction
function FilterGeneral takes unit c, unit t returns boolean
return IsUnitEnemy(t,GetOwningPlayer(c)) == true and GetWidgetLife(t) > 0.45 and IsUnitType(t,UNIT_TYPE_STRUCTURE) == false and GetUnitAbilityLevel(t,'Avul') <= 0 and GetWidgetLife(t) > 0.45
endfunction
function PickUnit takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())) == true and GetWidgetLife(GetFilterUnit()) > 0.45 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE) == false and GetUnitAbilityLevel(GetFilterUnit(),'Avul') <= 0
endfunction
function PickHero takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())) == true and GetWidgetLife(GetFilterUnit()) > 0.45 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO) == true and GetUnitAbilityLevel(GetFilterUnit(),'Avul') <= 0
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
library GroupRecycler
//This system was made by The_Reborn_Devil so if you use this credits should be given to him.
globals
private constant integer MAX_GROUPS = 8191 //The maximum amount of groups
private group array G [MAX_GROUPS]
private integer Total = 0
endglobals
function NewGroup takes nothing returns group
if Total == 0 then
set G[0] = CreateGroup()
else
set Total = Total - 1
endif
return G[Total]
endfunction
function ReleaseGroup takes group g returns nothing
if g == null then
debug call BJDebugMsg("WARNING: Trying to release a null group!")
else
if Total == MAX_GROUPS then
debug call BJDebugMsg("WARNING: Limit has been reached! Destroying group!") //The map already got more trouble than it can handle.
call DestroyGroup(g)
else
call GroupClear(g)
set G[Total] = g
set Total = Total + 1
endif
endif
endfunction
endlibrary
//TESH.scrollpos=36
//TESH.alwaysfold=0
library BORN initializer init
globals
private hashtable HS
endglobals
function PreloadAbility takes integer id returns nothing
set bj_lastCreatedUnit = CreateUnit(Player(12),DUMMY,0,0,0)
call UnitAddAbility(bj_lastCreatedUnit,id)
call UnitRemoveAbility(bj_lastCreatedUnit,id)
call RemoveUnit(bj_lastCreatedUnit)
endfunction
function CameraStop takes nothing returns nothing
local timer z = GetExpiredTimer()
local group gg = LoadGroupHandle(HS,GetHandleId(z),0)
local unit t
loop
set t = FirstOfGroup(gg)
exitwhen t == null
call CameraClearNoiseForPlayer(GetOwningPlayer(t))
call GroupRemoveUnit(gg,t)
endloop
call DestroyGroup(gg)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
set z = null
set gg = null
endfunction
function ShakeGroupCamera takes real time, real x, real y, real range, real shake returns nothing
local group g = CreateGroup()
local unit t
local timer z = CreateTimer()
call SaveGroupHandle(HS,GetHandleId(z),0,CreateGroup())
call GroupEnumUnitsInRange(g,x,y,range,null)
loop
set t = FirstOfGroup(g)
exitwhen t == null
if IsUnitType(t,UNIT_TYPE_HERO) == true then
call CameraSetEQNoiseForPlayer(GetOwningPlayer(t),shake)
call GroupAddUnit(LoadGroupHandle(HS,GetHandleId(z),0),t)
endif
call GroupRemoveUnit(g,t)
endloop
call TimerStart(z,time,false,function CameraStop)
set g = null
set z = null
endfunction
function SoundStart takes string s, real x, real y returns nothing
local sound t = CreateSound(s,false,false,false,10,10,"Default")
call SetSoundPosition(t,x,y,0)
call SetSoundVolume(t,127)
call StartSound(t)
set t = null
endfunction
function PolarX takes real x, real dist, real angle returns real
return x+dist*Cos(angle*bj_DEGTORAD)
endfunction
function PolarY takes real y, real dist, real angle returns real
return y+dist*Sin(angle*bj_DEGTORAD)
endfunction
function Angle takes real x1, real y1, real x2, real y2 returns real
return bj_RADTODEG * Atan2(y2-y1, x2-x1)
endfunction
private function MultiInstanceFilter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==true and GetUnitAbilityLevel(GetFilterUnit(),'Avul') != 1 and GetWidgetLife(GetFilterUnit()) > 0.45 and IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE)==false
endfunction
function Distance takes real x1, real y1, real x2, real y2 returns real
return SquareRoot((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1))
endfunction
function ResetSingleCooldown takes unit u, integer abilid returns boolean
local integer i = GetUnitAbilityLevel(u, abilid)
if i > 0 then
call UnitRemoveAbility(u, abilid)
call UnitAddAbility(u, abilid)
call SetUnitAbilityLevel(u, abilid, i)
return true
endif
return false
endfunction
function UnitCastAbilityTargetEx takes player p, integer abilid, integer abilv, string order, unit target, real x, real y, real z returns nothing
local unit e
set e = CreateUnit(p,'h008',x,y,bj_UNIT_FACING)
call SetUnitFlyHeight(e,z,0)
call UnitAddAbility(e,abilid)
call SetUnitAbilityLevel(e,abilid,abilv)
call IssueTargetOrder(e,order,target)
call UnitApplyTimedLife(e,'BTLF',1)
set e = null
endfunction
function AddLocalSpecialEffectTarget takes player whichPlayer, string modelName, widget targetWidget, string attachPointName returns effect
local string path = ""
if (GetLocalPlayer() == whichPlayer) then
set path = modelName
endif
set bj_lastCreatedEffect = AddSpecialEffectTarget(path, targetWidget, attachPointName)
return bj_lastCreatedEffect
endfunction
function PauseAction takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,0,GetHandleId(z))
call PauseUnit(c,false)
call FlushChildHashtable(HS,GetHandleId(z))
call DestroyTimer(z)
set z = null
set c = null
endfunction
function PauseUnitForSecond takes unit c, real time returns nothing
local timer z = CreateTimer()
if c != null then
call PauseUnit(c,true)
endif
call SaveUnitHandle(HS,0,GetHandleId(z),c)
call TimerStart(z,time,false,function PauseAction)
endfunction
private function init takes nothing returns nothing
set HS = InitHashtable()
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
library TimerUtils initializer init
//*********************************************************************
//* TimerUtils (red+blue+orange flavors for 1.24b+) 2.0
//* ----------
//*
//* To implement it , create a custom text trigger called TimerUtils
//* and paste the contents of this script there.
//*
//* To copy from a map to another, copy the trigger holding this
//* library to your map.
//*
//* (requires vJass) More scripts: htt://www.wc3c.net
//*
//* For your timer needs:
//* * Attaching
//* * Recycling (with double-free protection)
//*
//* set t=NewTimer() : Get a timer (alternative to CreateTimer)
//* set t=NewTimerEx(x) : Get a timer (alternative to CreateTimer), call
//* Initialize timer data as x, instead of 0.
//*
//* ReleaseTimer(t) : Relese a timer (alt to DestroyTimer)
//* SetTimerData(t,2) : Attach value 2 to timer
//* GetTimerData(t) : Get the timer's value.
//* You can assume a timer's value is 0
//* after NewTimer.
//*
//* Multi-flavor:
//* Set USE_HASH_TABLE to true if you don't want to complicate your life.
//*
//* If you like speed and giberish try learning about the other flavors.
//*
//********************************************************************
//================================================================
globals
//How to tweak timer utils:
// USE_HASH_TABLE = true (new blue)
// * SAFEST
// * SLOWEST (though hash tables are kind of fast)
//
// USE_HASH_TABLE = false, USE_FLEXIBLE_OFFSET = true (orange)
// * kinda safe (except there is a limit in the number of timers)
// * ALMOST FAST
//
// USE_HASH_TABLE = false, USE_FLEXIBLE_OFFSET = false (red)
// * THE FASTEST (though is only faster than the previous method
// after using the optimizer on the map)
// * THE LEAST SAFE ( you may have to tweak OFSSET manually for it to
// work)
//
private constant boolean USE_HASH_TABLE = true
private constant boolean USE_FLEXIBLE_OFFSET = false
private constant integer OFFSET = 0x100000
private integer VOFFSET = OFFSET
//Timers to preload at map init:
private constant integer QUANTITY = 256
//Changing this to something big will allow you to keep recycling
// timers even when there are already AN INCREDIBLE AMOUNT of timers in
// the stack. But it will make things far slower so that's probably a bad idea...
private constant integer ARRAY_SIZE = 8190
endglobals
//==================================================================================================
globals
private integer array data[ARRAY_SIZE]
private hashtable ht
endglobals
//It is dependent on jasshelper's recent inlining optimization in order to perform correctly.
function SetTimerData takes timer t, integer value returns nothing
static if(USE_HASH_TABLE) then
// new blue
call SaveInteger(ht,0,GetHandleId(t), value)
elseif (USE_FLEXIBLE_OFFSET) then
// orange
static if (DEBUG_MODE) then
if(GetHandleId(t)-VOFFSET<0) then
call BJDebugMsg("SetTimerData: Wrong handle id, only use SetTimerData on timers created by NewTimer")
endif
endif
set data[GetHandleId(t)-VOFFSET]=value
else
// new red
static if (DEBUG_MODE) then
if(GetHandleId(t)-OFFSET<0) then
call BJDebugMsg("SetTimerData: Wrong handle id, only use SetTimerData on timers created by NewTimer")
endif
endif
set data[GetHandleId(t)-OFFSET]=value
endif
endfunction
function GetTimerData takes timer t returns integer
static if(USE_HASH_TABLE) then
// new blue
return LoadInteger(ht,0,GetHandleId(t) )
elseif (USE_FLEXIBLE_OFFSET) then
// orange
static if (DEBUG_MODE) then
if(GetHandleId(t)-VOFFSET<0) then
call BJDebugMsg("SetTimerData: Wrong handle id, only use SetTimerData on timers created by NewTimer")
endif
endif
return data[GetHandleId(t)-VOFFSET]
else
// new red
static if (DEBUG_MODE) then
if(GetHandleId(t)-OFFSET<0) then
call BJDebugMsg("SetTimerData: Wrong handle id, only use SetTimerData on timers created by NewTimer")
endif
endif
return data[GetHandleId(t)-OFFSET]
endif
endfunction
//==========================================================================================
globals
private timer array tT[ARRAY_SIZE]
private integer tN = 0
private constant integer HELD=0x28829022
//use a totally random number here, the more improbable someone uses it, the better.
private boolean didinit = false
endglobals
private keyword init
//==========================================================================================
// I needed to decide between duplicating code ignoring the "Once and only once" rule
// and using the ugly textmacros. I guess textmacros won.
//
//! textmacro TIMERUTIS_PRIVATE_NewTimerCommon takes VALUE
// On second thought, no.
//! endtextmacro
function NewTimerEx takes integer value returns timer
if (tN==0) then
if (not didinit) then
//This extra if shouldn't represent a major performance drawback
//because QUANTITY rule is not supposed to be broken every day.
call init.evaluate()
set tN = tN - 1
else
//If this happens then the QUANTITY rule has already been broken, try to fix the
// issue, else fail.
debug call BJDebugMsg("NewTimer: Warning, Exceeding TimerUtils_QUANTITY, make sure all timers are getting recycled correctly")
set tT[0]=CreateTimer()
static if( not USE_HASH_TABLE) then
debug call BJDebugMsg("In case of errors, please increase it accordingly, or set TimerUtils_USE_HASH_TABLE to true")
static if( USE_FLEXIBLE_OFFSET) then
if (GetHandleId(tT[0])-VOFFSET<0) or (GetHandleId(tT[0])-VOFFSET>=ARRAY_SIZE) then
//all right, couldn't fix it
call BJDebugMsg("NewTimer: Unable to allocate a timer, you should probably set TimerUtils_USE_HASH_TABLE to true or fix timer leaks.")
return null
endif
else
if (GetHandleId(tT[0])-OFFSET<0) or (GetHandleId(tT[0])-OFFSET>=ARRAY_SIZE) then
//all right, couldn't fix it
call BJDebugMsg("NewTimer: Unable to allocate a timer, you should probably set TimerUtils_USE_HASH_TABLE to true or fix timer leaks.")
return null
endif
endif
endif
endif
else
set tN=tN-1
endif
call SetTimerData(tT[tN],value)
return tT[tN]
endfunction
function NewTimer takes nothing returns timer
return NewTimerEx(0)
endfunction
//==========================================================================================
function ReleaseTimer takes timer t returns nothing
if(t==null) then
debug call BJDebugMsg("Warning: attempt to release a null timer")
return
endif
if (tN==ARRAY_SIZE) then
debug call BJDebugMsg("Warning: Timer stack is full, destroying timer!!")
//stack is full, the map already has much more troubles than the chance of bug
call DestroyTimer(t)
else
call PauseTimer(t)
if(GetTimerData(t)==HELD) then
debug call BJDebugMsg("Warning: ReleaseTimer: Double free!")
return
endif
call SetTimerData(t,HELD)
set tT[tN]=t
set tN=tN+1
endif
endfunction
private function init takes nothing returns nothing
local integer i=0
local integer o=-1
local boolean oops = false
if ( didinit ) then
return
else
set didinit = true
endif
static if( USE_HASH_TABLE ) then
set ht = InitHashtable()
loop
exitwhen(i==QUANTITY)
set tT[i]=CreateTimer()
call SetTimerData(tT[i], HELD)
set i=i+1
endloop
set tN = QUANTITY
else
loop
set i=0
loop
exitwhen (i==QUANTITY)
set tT[i] = CreateTimer()
if(i==0) then
set VOFFSET = GetHandleId(tT[i])
static if(USE_FLEXIBLE_OFFSET) then
set o=VOFFSET
else
set o=OFFSET
endif
endif
if (GetHandleId(tT[i])-o>=ARRAY_SIZE) then
exitwhen true
endif
if (GetHandleId(tT[i])-o>=0) then
set i=i+1
endif
endloop
set tN = i
exitwhen(tN == QUANTITY)
set oops = true
exitwhen not USE_FLEXIBLE_OFFSET
debug call BJDebugMsg("TimerUtils_init: Failed a initialization attempt, will try again")
endloop
if(oops) then
static if ( USE_FLEXIBLE_OFFSET) then
debug call BJDebugMsg("The problem has been fixed.")
//If this message doesn't appear then there is so much
//handle id fragmentation that it was impossible to preload
//so many timers and the thread crashed! Therefore this
//debug message is useful.
elseif(DEBUG_MODE) then
call BJDebugMsg("There were problems and the new timer limit is "+I2S(i))
call BJDebugMsg("This is a rare ocurrence, if the timer limit is too low:")
call BJDebugMsg("a) Change USE_FLEXIBLE_OFFSET to true (reduces performance a little)")
call BJDebugMsg("b) or try changing OFFSET to "+I2S(VOFFSET) )
endif
endif
endif
endfunction
endlibrary
//TESH.scrollpos=11
//TESH.alwaysfold=0
library CSData initializer init
//****************************************************************************************************
// CSData 16.0
// ___________
// CSDatas are like UserData in units and items, they now use a hashtable instead of big arrays,
// should be faster and safer
//
// Notice that for public spells or systems to be distributed you should only use these
// for private objects (those who the mapper would never have access to) If you are making something
// for your map you can use them wherever you want.
//
// Best to be used in conjunction to CSArrays so you just specify an array id for a handle.
//
// DO NOT USE THIS ON THESE HANDLE TYPES: -lightning, -ubersplat, -image, -texttag,
// -any 'argument' handle (like playerstate, damagetype, etc)
//
//****************************************************************************************************
//====================================================================================================
globals
private constant integer MAX_HANDLE_ID_COUNT = 408000
// values lower than 8191: very fast, but very unsafe.
// values bigger than 8191: not that fast, the bigger the number is the slower the function gets
// Most maps don't really need a value bigger than 50000 here, but if you are unsure, leave it
// as the rather inflated value of 408000
endglobals
//=================================================================================================
// a.k.a H2I, changed name to CS_H2I to prevent conflicts with other systems, it then stayed that
// instead of changing to a private or public function since many outside spells use it.
//
function CS_H2I takes handle h returns integer //For compat
return GetHandleId(h) //
endfunction //
//==================================================================================================
globals
private hashtable ht
endglobals
//It is dependent on jasshelper's recent inlining optimization in order to perform correctly.
function SetCSData takes handle h, integer v returns nothing
call SaveInteger(ht , 0, GetHandleId(h) , v)
endfunction
function GetCSData takes handle h returns integer
return LoadInteger( ht, 0, GetHandleId(h) )
endfunction
private function init takes nothing returns nothing
set ht = InitHashtable()
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
library Func2 requires TimerUtils
globals
constant integer DUMMY = 'h002'
endglobals
function ImpaleUnitTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit t = LoadUnitHandle(HS,GetHandleId(z),0)
local real time = LoadReal(HS,GetHandleId(z),0)
local real time2 = LoadReal(HS,GetHandleId(z),1)
local real half = time2 / 5
local real fly
local unit d
set time = time - 0.02
call SaveReal(HS,GetHandleId(z),0,time)
if time >= half then
call SetUnitFlyHeight(t,GetUnitFlyHeight(t) + 25,0)
else
set half = half * 50
set fly = GetUnitFlyHeight(t) / half
call SetUnitFlyHeight(t,GetUnitFlyHeight(t) - fly,0)
endif
if time <= 0 then
call SetUnitFlyHeight(t,0,0)
call PauseUnit(t,false)
set d = CreateUnit(GetOwningPlayer(t),DUMMY,GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitAddAbility(d,'A02U')
call IssueTargetOrder(d,"slow",t)
call UnitApplyTimedLife(d,'BTLF',0.5)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set z = null
set t = null
set d = null
endfunction
function ImpaleUnit takes unit t, real time returns nothing
local timer z = CreateTimer()
call PauseUnit(t,true)
call UnitAddAbility(t,'Amrf')
call UnitRemoveAbility(t,'Amrf')
call SaveUnitHandle(HS,GetHandleId(z),0,t)
call SaveReal(HS,GetHandleId(z),0,time)
call SaveReal(HS,GetHandleId(z),1,time)
call TimerStart(z,0.02,true,function ImpaleUnitTimer)
set z = null
endfunction
function SpinUnitUp takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit t = LoadUnitHandle(HS,GetHandleId(z),0)
local real time = LoadReal(HS,GetHandleId(z),0)
local real angle = LoadReal(HS,GetHandleId(z),1)
local real MaxHight = LoadReal(HS,GetHandleId(z),2)
local real HightSpeed = LoadReal(HS,GetHandleId(z),3)
local real Dist = LoadReal(HS,GetHandleId(z),4)
local real x
local real y
set time = time - 0.02
call SaveReal(HS,GetHandleId(z),0,time)
if LoadReal(HS,GetHandleId(t),0) <= 0 then
if GetUnitFlyHeight(t) <= MaxHight / 2 then
set x = PolarX(GetUnitX(t),Dist,angle + 90)
set y = PolarY(GetUnitY(t),Dist,angle + 90)
call SetUnitPosition(t,x,y)
else
set x = PolarX(GetUnitX(t),Dist,angle - 90)
set y = PolarY(GetUnitY(t),Dist,angle - 90)
call SetUnitPosition(t,x,y)
endif
call SetUnitFlyHeight(t,GetUnitFlyHeight(t) + HightSpeed,0)
if GetUnitFlyHeight(t) >= MaxHight then
call SaveReal(HS,GetHandleId(t),0,1)
endif
else
if GetUnitFlyHeight(t) >= MaxHight / 2 then
set x = PolarX(GetUnitX(t),Dist,angle - 90)
set y = PolarY(GetUnitY(t),Dist,angle - 90)
call SetUnitPosition(t,x,y)
else
set x = PolarX(GetUnitX(t),Dist,angle + 90)
set y = PolarY(GetUnitY(t),Dist,angle + 90)
call SetUnitPosition(t,x,y)
endif
if GetUnitFlyHeight(t) - HightSpeed <= 0 then
call SetUnitFlyHeight(t,0,0)
else
call SetUnitFlyHeight(t,GetUnitFlyHeight(t) - HightSpeed,0)
endif
if GetUnitFlyHeight(t) <= 0.1 then
call SaveReal(HS,GetHandleId(t),0,0)
endif
endif
if time <= 0 then
call SetUnitFlyHeight(t,0,0)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(t))
call FlushChildHashtable(HS,GetHandleId(z))
endif
set z = null
set t = null
endfunction
function SpinUnit takes unit t, real angle, real time, real Dist, real MaxHight, real HightSpeed returns nothing
local timer z = CreateTimer()
call UnitAddAbility(t,'Amrf')
call UnitRemoveAbility(t,'Amrf')
call SaveUnitHandle(HS,GetHandleId(z),0,t)
call SaveReal(HS,GetHandleId(z),0,time)
call SaveReal(HS,GetHandleId(z),1,angle)
call SaveReal(HS,GetHandleId(z),2,MaxHight)
call SaveReal(HS,GetHandleId(z),3,HightSpeed)
call SaveReal(HS,GetHandleId(z),4,Dist)
call SaveReal(HS,GetHandleId(t),0,0)
call TimerStart(z,0.02,true,function SpinUnitUp)
set z = null
endfunction
function SlideUnitMoveUnit takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local real speed = LoadReal(HS,GetHandleId(z),1)
local real angle = Angle(GetUnitX(t),GetUnitY(t),GetUnitX(c),GetUnitY(c))
local real time = LoadReal(HS,GetHandleId(z),0)
local real x = PolarX(GetUnitX(t),speed,angle)
local real y = PolarY(GetUnitY(t),speed,angle)
set time = time - 0.02
call SetUnitPosition(t,x,y)
call SetUnitFacing(t,angle)
call SaveReal(HS,GetHandleId(z),0,time)
if time <= 0 then
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set z = null
set t = null
set c = null
endfunction
function SlideUnitToUnit takes unit c, unit t, real time returns nothing
local timer z = CreateTimer()
local real dist = Distance(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t)) / (time * 50)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,t)
call SaveReal(HS,GetHandleId(z),0,time)
call SaveReal(HS,GetHandleId(z),1,dist)
call TimerStart(z,0.02,true,function SlideUnitMoveUnit)
set z = null
endfunction
function ScaleTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit d = LoadUnitHandle(HS,GetHandleId(z),0)
local real scale = LoadReal(HS,GetHandleId(z),0)
local real size = LoadReal(HS,GetHandleId(z),1)
local real time = LoadReal(HS,GetHandleId(z),2)
set time = time - 0.02
set size = size + scale
call SetUnitScale(d,size,size,size)
if time <= 0 then
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
call SaveReal(HS,GetHandleId(z),1,size)
call SaveReal(HS,GetHandleId(z),2,time)
endif
set d = null
endfunction
function IncreaseScale takes unit d, real siez, real scale, real time returns nothing
local timer z = NewTimer()
call SetUnitScale(d,siez,siez,siez)
call SaveUnitHandle(HS,GetHandleId(z),0,d)
call SaveReal(HS,GetHandleId(z),0,scale)
call SaveReal(HS,GetHandleId(z),1,siez)
call SaveReal(HS,GetHandleId(z),2,time)
call TimerStart(z,0.02,true,function ScaleTimer)
set d = null
endfunction
function DustTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit d = LoadUnitHandle(HS,GetHandleId(z),0)
local real scale = LoadReal(HS,GetHandleId(z),0)
local real size = LoadReal(HS,GetHandleId(z),1)
local real time = LoadReal(HS,GetHandleId(z),2)
set time = time - 0.02
set size = size + scale
call SetUnitScale(d,size,size,size)
if time <= 0 then
call RemoveUnit(d)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
call SaveReal(HS,GetHandleId(z),1,size)
call SaveReal(HS,GetHandleId(z),2,time)
endif
set d = null
endfunction
function DustWave takes real siez, real scale, real time, real high, real x, real y, integer red, integer green, integer blue, integer trans returns nothing
local timer z = NewTimer()
local unit d = CreateUnit(Player(12),'h00B',x,y,0)
call SetUnitScale(d,siez,siez,siez)
call SetUnitVertexColor(d,red,green,blue,trans)
call SetUnitFlyHeight(d,high,0)
call SaveUnitHandle(HS,GetHandleId(z),0,d)
call SaveReal(HS,GetHandleId(z),0,scale)
call SaveReal(HS,GetHandleId(z),1,1)
call SaveReal(HS,GetHandleId(z),2,time)
call TimerStart(z,0.02,true,function DustTimer)
set d = null
endfunction
function SlideUnitMove takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit t = LoadUnitHandle(HS,GetHandleId(z),0)
local real speed = LoadReal(HS,GetHandleId(z),0)
local real angle = LoadReal(HS,GetHandleId(z),1)
local real time = LoadReal(HS,GetHandleId(z),2)
local string SFX = LoadStr(HS,GetHandleId(z),3)
local real timeslow = LoadReal(HS,GetHandleId(z),4)
local real xx
local real yy
set time = time - 0.02
set timeslow = timeslow - 0.02
call SaveReal(HS,GetHandleId(z),2,time)
call SaveReal(HS,GetHandleId(z),4,timeslow)
if SLOWMODE == false then
set xx = PolarX(GetUnitX(t),speed,angle)
set yy = PolarY(GetUnitY(t),speed,angle)
call DestroyEffect(AddSpecialEffect(SFX,GetUnitX(t),GetUnitY(t)))
call SetUnitPosition(t,xx,yy)
if time <= 0 then
call PauseTimer(z)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
else
set speed = speed * 0.2
set xx = PolarX(GetUnitX(t),speed,angle)
set yy = PolarY(GetUnitY(t),speed,angle)
call DestroyEffect(AddSpecialEffect(SFX,GetUnitX(t),GetUnitY(t)))
call SetUnitPosition(t,xx,yy)
if timeslow <= 0 then
call PauseTimer(z)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
endif
set z = null
set t = null
endfunction
function SlideUnitAngle takes unit t, real speed, real time, real angle, string SFX returns nothing
local timer z = CreateTimer()
call SaveUnitHandle(HS,GetHandleId(z),0,t)
call SaveReal(HS,GetHandleId(z),0,speed)
call SaveReal(HS,GetHandleId(z),1,angle)
call SaveReal(HS,GetHandleId(z),2,time)
call SaveReal(HS,GetHandleId(z),4,time * 5)
call SaveStr(HS,GetHandleId(z),3,SFX)
call TimerStart(z,0.02,true,function SlideUnitMove)
set z = null
endfunction
function FakePause takes unit cast, integer lv returns nothing
local unit c = cast
local real x = GetUnitX(c)
local real y = GetUnitY(c)
local unit e
set e = CreateUnit(GetOwningPlayer(c),DUMMY,x,y,bj_UNIT_FACING)
call UnitAddAbility(e,'A00E')
call SetUnitAbilityLevel(e,'A00E',lv)
call IssueTargetOrder(e,"thunderbolt",c)
call UnitApplyTimedLife(e,'BTLF',1)
set c = null
set e = null
endfunction
function EffectUnit takes unit c, real x, real y, real scale, integer id, real duration returns nothing
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),id,x,y,0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',duration)
call SetUnitScale(bj_lastCreatedUnit,scale,scale,scale)
endfunction
function EffectUnitColor takes unit c, real x, real y, real facing, real scale, integer id, real duration, integer red, integer green, integer blue, integer trans returns nothing
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),id,x,y,facing)
call SetUnitVertexColor(bj_lastCreatedUnit,red,green,blue,trans)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',duration)
call SetUnitScale(bj_lastCreatedUnit,scale,scale,scale)
endfunction
function SpawnEffect2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local string s = LoadStr(HS,0,GetHandleId(z))
local real x = LoadReal(HS,1,GetHandleId(z))
local real y = LoadReal(HS,2,GetHandleId(z))
local real update = LoadReal(HS,3,GetHandleId(z))
local real duration = LoadReal(HS,4,GetHandleId(z))
set duration = duration - update
call DestroyEffect(AddSpecialEffect(s,x,y))
if duration <= 0 then
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
call SaveReal(HS,4,GetHandleId(z),duration)
set z = null
endfunction
function SpawnEffect takes string s, real x, real y, real update, real duration returns nothing
local timer z = NewTimer()
call SaveStr(HS,0,GetHandleId(z),s)
call SaveReal(HS,1,GetHandleId(z),x)
call SaveReal(HS,2,GetHandleId(z),y)
call SaveReal(HS,3,GetHandleId(z),update)
call SaveReal(HS,4,GetHandleId(z),duration)
call TimerStart(z,update,true,function SpawnEffect2)
set z = null
endfunction
function AddSpecialEffectForPlayer takes string sfxpath, real x, real y, player p returns effect
local string path = sfxpath
if GetLocalPlayer() != p then
set path = ""
endif
return AddSpecialEffect( path, x, y )
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
library Jump initializer Init
globals
private integer DUMMY_ID = 'e000'
private integer array Ar
private constant real Interval = 0.025
private boolexpr Bool
private location Loc1 = Location(0, 0)
private location Loc2 = Location(0, 0)
private unit Dummy
private timer Tim = CreateTimer()
private integer Total = 0
private real MAX_X
private real MAX_Y
private real MIN_X
private real MIN_Y
endglobals
//===========================================================================
//========================================//
//Credits to Shadow1500 for this function!//
//========================================//
private function JumpParabola takes real dist, real maxdist, real curve returns real
local real t = (dist * 2) / maxdist - 1
return (- t * t + 1) * (maxdist / curve)
endfunction
//=======================================//
//Credits to PitzerMike for this function//
//=======================================//
private function TreeFilter takes nothing returns boolean
local destructable d = GetFilterDestructable()
local boolean i = IsDestructableInvulnerable(d)
local boolean result = false
call SetUnitPosition(Dummy, GetWidgetX(d), GetWidgetY(d))
if i then
call SetDestructableInvulnerable(d, false)
endif
set result = IssueTargetOrder(Dummy, "harvest", d)
if i then
call SetDestructableInvulnerable(d, true)
endif
call IssueImmediateOrder(Dummy, "stop")
set d = null
return result
endfunction
//===========================================================================
private function TreeKill takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
public struct Data
unit u
integer q
real md
real d
real c
real sin
real cos
integer i = 1
real p
real r
string s
static method create takes unit u, integer q, real x2, real y2, real c, real r, string s1, string s2, string anim returns Data
local Data dat = Data.allocate()
local real x1 = GetUnitX(u)
local real y1 = GetUnitY(u)
local real dx = x1 - x2
local real dy = y1 - y2
local real a = Atan2(y2 - y1, x2 - x1)
local location l1 = Location(x1, y1)
local location l2 = Location(x2, y2)
call MoveLocation(Loc1, x1, y1)
set dat.u = u
set dat.q = q
set dat.md = SquareRoot(dx * dx + dy * dy)
set dat.d = dat.md / q
set dat.c = c
set dat.sin = Sin(a)
set dat.cos = Cos(a)
set dat.p = (GetLocationZ(l2) - GetLocationZ(l1)) / q
set dat.r = r
set dat.s = s2
if s1 != "" and s1 != null then
call DestroyEffect(AddSpecialEffect(s1, x1, y1))
endif
call PauseUnit(u, true)
call SetUnitAnimation(u, anim)
call RemoveLocation(l1)
call RemoveLocation(l2)
set l1 = null
set l2 = null
return dat
endmethod
method onDestroy takes nothing returns nothing
local real x = GetUnitX(.u)
local real y = GetUnitY(.u)
local rect r
if .r != 0 then
set r = Rect(x - .r, y - .r, x + .r, y + .r)
call EnumDestructablesInRect(r, Bool, function TreeKill)
call RemoveRect(r)
set r = null
endif
if .s != "" and .s != null then
call DestroyEffect(AddSpecialEffect(.s, x, y))
endif
call PauseUnit(.u, false)
call IssueImmediateOrder(.u, "stop")
call SetUnitAnimation(.u, "stand")
call SetUnitFlyHeight(.u, 0, 0)
endmethod
endstruct
private function Execute takes nothing returns nothing
local Data dat
local integer i = 0
local real x
local real y
local location l
local real h
local rect r
loop
exitwhen i >= Total
set dat = Ar[i]
set x = GetUnitX(dat.u) + (dat.d) * dat.cos
set y = GetUnitY(dat.u) + (dat.d) * dat.sin
call MoveLocation(Loc2, x, y)
set h = JumpParabola(dat.d * dat.i, dat.md, dat.c) - (GetLocationZ(Loc2) - GetLocationZ(Loc1)) + dat.p * dat.i
if x < MAX_X and y < MAX_Y and x > MIN_X and y > MIN_Y then
call SetUnitX(dat.u, x)
call SetUnitY(dat.u, y)
endif
call SetUnitFlyHeight(dat.u, h, 0)
if dat.i >= dat.q then
call dat.destroy()
set Total = Total - 1
set Ar[i] = Ar[Total]
else
set dat.i = dat.i + 1
endif
set i = i + 1
endloop
if Total == 0 then
call PauseTimer(Tim)
endif
set l = null
endfunction
function Jump takes unit whichUnit, real dur, real destX, real destY, real curve, real radius, string sfx1, string sfx2, string anim returns nothing
local Data dat = Data.create(whichUnit, R2I(dur / Interval), destX, destY, curve, radius, sfx1, sfx2, anim)
if Total == 0 then
call TimerStart(Tim, Interval, true, function Execute)
endif
set Ar[Total] = dat
set Total = Total + 1
endfunction
private function Init takes nothing returns nothing
set Bool = Filter(function TreeFilter)
set MAX_X = GetRectMaxX(bj_mapInitialPlayableArea) - 64
set MAX_Y = GetRectMaxY(bj_mapInitialPlayableArea) - 64
set MIN_X = GetRectMinX(bj_mapInitialPlayableArea) + 64
set MIN_Y = GetRectMinY(bj_mapInitialPlayableArea) + 64
endfunction
endlibrary
//TESH.scrollpos=431
//TESH.alwaysfold=0
library Damage uses GroupRecycler, BORN, DragonForce
globals
private constant integer TAIJUTSU = 'h00F'
private constant integer NINJUTSU = 'h02W'
private constant integer GENJUTSU = 'h02X'
private constant integer REFLEX = 'I00R'
constant integer NINJUTSU_DAMAGE = 1
constant integer TAIJUTSU_DAMAGE = 2
constant integer GENJUTSU_DAMAGE = 3
boolean SLOWMODE = false
endglobals
function BurnMana takes unit t, real burn returns nothing
local texttag tt
local real mana = GetUnitState(t,UNIT_STATE_MANA)
call SetUnitState(t,UNIT_STATE_MANA,mana - burn)
set tt = CreateTextTag()
call SetTextTagText(tt,I2S(R2I(burn)),0.025)
call SetTextTagPos(tt,GetUnitX(t),GetUnitY(t),0)
call SetTextTagColor(tt,100,100,255,255)
call SetTextTagVelocity(tt,0,0.07)
call SetTextTagPermanent(tt,false)
call SetTextTagLifespan(tt,1.5)
set tt = null
endfunction
function ShrinkUnitCheck takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit t = LoadUnitHandle(HS,GetHandleId(z),0)
local real rr
if GetUnitAbilityLevel(t,'B013') == 0 then
set rr = I2R(GetUnitPointValue(t)) / 100
call SetUnitScale(t,rr,rr,rr)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set z = null
set t = null
endfunction
function ShrinkUnit takes unit c, unit t, real time returns nothing
local real i = time * 2
local integer r = R2I(i)
local unit d
local timer z
local real rr
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitAddAbility(d,'A081')
call SetUnitAbilityLevel(d,'A081',r)
call IssueTargetOrder(d,"soulburn",t)
call UnitApplyTimedLife(d,'BTLF',0.1)
if IsUnitType(t,UNIT_TYPE_HERO) == true then
set z = CreateTimer()
set rr = I2R(GetUnitPointValue(t)) / 200
call SetUnitScale(t,rr,rr,rr)
call SaveUnitHandle(HS,GetHandleId(z),0,t)
call TimerStart(z,0.06,true,function ShrinkUnitCheck)
endif
set d = null
endfunction
function DodgeTarget takes unit c, unit t returns nothing
local real x = PolarX(GetUnitX(t),GetRandomReal(100,300),GetRandomReal(0,360))
local real y = PolarY(GetUnitY(t),GetRandomReal(100,300),GetRandomReal(0,360))
call SetUnitPosition(t,x,y)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",x,y))
endfunction
function RootUnit takes unit c, unit t, real time returns nothing
local real i = time * 2
local integer r = R2I(i)
local unit d
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitAddAbility(d,'A01R')
call SetUnitAbilityLevel(d,'A01R',r)
call IssueTargetOrder(d,"entanglingroots",t)
call UnitApplyTimedLife(d,'BTLF',0.1)
set d = null
endfunction
function FreezeUnit takes unit c, unit t, real time returns nothing
local real i = time * 2
local integer r = R2I(i)
local unit d
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitAddAbility(d,'A06A')
call SetUnitAbilityLevel(d,'A06A',r)
call IssueTargetOrder(d,"thunderbolt",t)
call UnitApplyTimedLife(d,'BTLF',0.1)
set d = null
endfunction
function ConfuseUnit takes unit c, unit t, real time returns nothing
local real i = time * 2
local integer r = R2I(i)
local unit d
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitAddAbility(d,'A01T')
call SetUnitAbilityLevel(d,'A01T',r)
call IssueTargetOrder(d,"soulburn",t)
call UnitApplyTimedLife(d,'BTLF',0.1)
set d = null
endfunction
function SlowUnit takes unit c, unit t, real time returns nothing
local real i = time * 2
local integer r = R2I(i)
local unit d
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitAddAbility(d,'A07E')
call SetUnitAbilityLevel(d,'A07E',r)
call IssueTargetOrder(d,"slow",t)
call UnitApplyTimedLife(d,'BTLF',0.1)
set d = null
endfunction
function StunUnit takes unit c, unit t, real time returns nothing
local real i = time * 2
local integer r = R2I(i)
local unit d
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitAddAbility(d,'A02L')
call SetUnitAbilityLevel(d,'A02L',r)
call IssueTargetOrder(d,"thunderbolt",t)
call UnitApplyTimedLife(d,'BTLF',0.1)
set d = null
endfunction
private function MultiInstanceFilter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==true and GetUnitAbilityLevel(GetFilterUnit(),'Avul') != 1 and GetWidgetLife(GetFilterUnit()) > 0.45 and IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE)==false
endfunction
function GenJutsuDamage takes unit c, unit t, real r returns nothing
local unit d
local real cal = r
if GetUnitAbilityLevel(t,'A02M') >= 1 then
set cal = cal - (cal * (GetUnitAbilityLevel(t,'A02M') * 0.05))
endif
if GetUnitAbilityLevel(t,'A06O') >= 1 then
set cal = cal - (cal * (GetUnitAbilityLevel(t,'A06O') * 0.05))
endif
if GetUnitAbilityLevel(t,'A08G') >= 1 then
set cal = cal - (cal * 0.3)
endif
if GetUnitAbilityLevel(c,'BNht') >= 1 then
set cal = cal - (cal * 0.5)
endif
set d = CreateUnit(GetOwningPlayer(c),GENJUTSU,GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitDamageTarget(d,t,r,true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
call UnitApplyTimedLife(d,'BTLF',0.01)
set d = null
endfunction
function TaiJutsuDamage takes unit c, unit t, real r returns nothing
local unit d
local real cal = r
if cal >= 50 and UnitHasItemOfTypeBJ(t,REFLEX) == true and GetRandomReal(1,100) <= 5 then
set d = CreateUnit(GetOwningPlayer(t),TAIJUTSU,GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
call UnitDamageTarget(d,c,cal,true,true,null,DAMAGE_TYPE_MAGIC,null)
call UnitApplyTimedLife(d,'BTLF',0.01)
else
if GetUnitAbilityLevel(t,'B011') >= 1 then
call DodgeTarget(c,t)
set cal = 0
endif
if GetUnitAbilityLevel(c,'A01V') >= 1 then
set cal = cal - 80
endif
if GetUnitAbilityLevel(c,'BNht') >= 1 then
set cal = cal - (cal * 0.5)
endif
if GetUnitAbilityLevel(t,'B014') >= 1 then
set cal = cal + (cal * 0.5)
endif
if GetUnitAbilityLevel(t,'B015') >= 1 then
set cal = 0
call DragonForceCheck(t,r)
endif
if GetUnitAbilityLevel(t,'A08Q') >= 1 then
set cal = cal - (cal * (GetUnitAbilityLevel(t,'A08Q') * 0.1))
endif
if GetUnitTypeId(t) == 'H05R' then
set cal = cal - (cal * 0.3)
endif
if UnitHasItemOfTypeBJ(t,'I028') == true then
set cal = cal - (cal * 0.05)
endif
if UnitHasItemOfTypeBJ(t,'I02P') == true then
set cal = cal - (cal * 0.25)
endif
if UnitHasItemOfTypeBJ(t,'I029') == true then
set cal = cal - (cal * 0.1)
endif
if UnitHasItemOfTypeBJ(t,'I02A') == true then
set cal = cal - (cal * 0.15)
endif
if UnitHasItemOfTypeBJ(t,'I02B') == true then
set cal = cal - (cal * 0.2)
endif
if UnitHasItemOfTypeBJ(t,'I02C') == true then
set cal = cal - (cal * 0.25)
endif
if GetUnitAbilityLevel(t,'A067') >= 1 then
set cal = cal - (cal * (GetUnitAbilityLevel(t,'A067') * 0.07))
endif
if GetUnitAbilityLevel(t,'A08G') >= 1 then
set cal = cal - (cal * 0.3)
endif
if GetUnitAbilityLevel(t,'A02T') >= 1 and GetUnitTypeId(t) == 'H01K' then
set cal = cal - (cal * ((GetUnitAbilityLevel(t,'A02T') * 0.2) + 0.1))
endif
if GetUnitAbilityLevel(t,'B00D') >= 1 then
set cal = cal - (cal * (GetUnitAbilityLevel(t,'A02O') * 0.05))
endif
if GetUnitTypeId(t) == 'H02I' then
set cal = cal - (cal * (GetUnitAbilityLevel(t,'A02Z') * 0.05))
endif
if GetUnitAbilityLevel(t,'B00Z') >= 1 then
set cal = 0
endif
if cal > 0 then
set d = CreateUnit(GetOwningPlayer(c),TAIJUTSU,GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitDamageTarget(d,t,cal,true,true,null,DAMAGE_TYPE_MAGIC,null)
call UnitApplyTimedLife(d,'BTLF',0.01)
endif
endif
set d = null
endfunction
function NinJutsuDamage takes unit c, unit t, real r returns nothing
local unit d
local real cal = r
local texttag tt
if cal >= 50 and UnitHasItemOfTypeBJ(t,REFLEX) == true and GetRandomReal(1,100) <= 5 then
set d = CreateUnit(GetOwningPlayer(t),NINJUTSU,GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
call UnitDamageTarget(d,c,cal,true,true,null,DAMAGE_TYPE_MAGIC,null)
call UnitApplyTimedLife(d,'BTLF',0.01)
else
if GetUnitAbilityLevel(t,'B011') >= 1 then
call DodgeTarget(c,t)
set cal = 0
endif
if GetUnitAbilityLevel(t,'B015') >= 1 then
set cal = 0
call DragonForceCheck(t,r)
endif
if GetUnitAbilityLevel(t,'B012') >= 1 then
if GetRandomReal(1,100) <= 50 then
set cal = 0
endif
endif
if GetUnitAbilityLevel(c,'BNht') >= 1 then
set cal = cal - (cal * 0.5)
endif
if GetUnitAbilityLevel(c,'A01V') >= 1 then
set cal = cal - 80
endif
if GetUnitAbilityLevel(t,'A08Q') >= 1 then
set cal = cal - (cal * (GetUnitAbilityLevel(t,'A08Q') * 0.1))
endif
if GetUnitTypeId(t) == 'H05R' then
set cal = cal - (cal * 0.3)
endif
if UnitHasItemOfTypeBJ(t,'I024') == true then
set cal = cal - (cal * 0.05)
endif
if UnitHasItemOfTypeBJ(t,'I02P') == true then
set cal = cal - (cal * 0.25)
endif
if UnitHasItemOfTypeBJ(t,'I025') == true then
set cal = cal - (cal * 0.1)
endif
if UnitHasItemOfTypeBJ(t,'I026') == true then
set cal = cal - (cal * 0.15)
endif
if UnitHasItemOfTypeBJ(t,'I027') == true then
set cal = cal - (cal * 0.2)
endif
if UnitHasItemOfTypeBJ(t,'I02C') == true then
set cal = cal - (cal * 0.25)
endif
if GetUnitAbilityLevel(t,'A02T') >= 1 and GetUnitTypeId(t) == 'H01K' then
set cal = cal - (cal * ((GetUnitAbilityLevel(t,'A02T') * 0.2) + 0.1))
endif
if GetUnitAbilityLevel(t,'A08G') >= 1 then
set cal = cal - (cal * 0.3)
endif
if GetUnitAbilityLevel(t,'A02M') >= 1 then
set cal = cal - (cal * (GetUnitAbilityLevel(t,'A02M') * 0.02))
endif
if GetUnitAbilityLevel(t,'A06O') >= 1 then
set cal = cal - (cal * (GetUnitAbilityLevel(t,'A06O') * 0.02))
endif
if GetUnitAbilityLevel(t,'A067') >= 1 then
set cal = cal - (cal * (GetUnitAbilityLevel(t,'A067') * 0.07))
endif
if GetUnitAbilityLevel(t,'B00J') >= 1 then
set cal = cal - (cal * (GetUnitAbilityLevel(t,'A02W') * 0.03))
endif
if GetUnitTypeId(t) == 'H02I' then
set cal = cal - (cal * (GetUnitAbilityLevel(t,'A02Z') * 0.05))
endif
if GetUnitAbilityLevel(t,'B00Z') >= 1 then
set cal = 0
endif
if cal > 0 then
set d = CreateUnit(GetOwningPlayer(c),NINJUTSU,GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitDamageTarget(d,t,cal,true,true,null,DAMAGE_TYPE_MAGIC,null)
call UnitApplyTimedLife(d,'BTLF',0.01)
endif
endif
set d = null
set tt = null
endfunction
function DamageTarget takes unit c, unit t, real r, integer typedamage returns nothing
if typedamage == 1 then
call NinJutsuDamage(c,t,r)
elseif typedamage == 2 then
call TaiJutsuDamage(c,t,r)
elseif typedamage == 3 then
call GenJutsuDamage(c,t,r)
endif
endfunction
function AreaDamage takes unit u, real r, real x, real y, real a, integer typedamage returns nothing
local group g=CreateGroup()
local unit d
call GroupEnumUnitsInRange(g,x,y,a,Condition(function MultiInstanceFilter))
loop
set d=FirstOfGroup(g)
if typedamage == 1 then
call NinJutsuDamage(u,d,r)
elseif typedamage == 2 then
call TaiJutsuDamage(u,d,r)
elseif typedamage == 3 then
call GenJutsuDamage(u,d,r)
endif
exitwhen d==null
call GroupRemoveUnit(g,d)
endloop
call DestroyGroup(g)
set g=null
endfunction
function AreaDamageTimer takes unit u, real r, real x, real y, real a, integer typedamage returns nothing
local group g = CreateGroup()
local unit d
call GroupEnumUnitsInRange(g,x,y,a,null)
loop
set d = FirstOfGroup(g)
if IsUnitEnemy(d,GetOwningPlayer(u)) == true and GetUnitAbilityLevel(d,'Avul') != 1 and GetWidgetLife(d) > 0.45 and IsUnitType(d, UNIT_TYPE_STRUCTURE)==false then
if typedamage == 1 then
call NinJutsuDamage(u,d,r)
elseif typedamage == 2 then
call TaiJutsuDamage(u,d,r)
elseif typedamage == 3 then
call GenJutsuDamage(u,d,r)
endif
endif
exitwhen d==null
call GroupRemoveUnit(g,d)
endloop
call DestroyGroup(g)
set g = null
endfunction
private struct data
unit c
unit t
real times
real dam
method destroy takes nothing returns nothing
call UnitRemoveAbility(c,'B00C')
call .deallocate()
endmethod
static method AmaterasuTarget takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local group g
local unit v
local real damage
if GetWidgetLife(t) > 0.45 then
set times = times - 0.2
set damage = dam / 5
call DamageTarget(c,t,damage,GENJUTSU_DAMAGE)
set g = NewGroup()
call GroupEnumUnitsInRange(g,GetUnitX(t),GetUnitY(t),150,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and GetUnitAbilityLevel(v,'B00C') <= 0 and v != t then
call data.create(c,v,12,dam)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if times <= 0 then
call ReleaseTimer(z)
call .destroy()
endif
else
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target, real time, real damage returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local unit d
set .c = caster
set .t = target
set .times = time
set .dam = damage
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitAddAbility(d,'A02N')
call IssueTargetOrder(d,"soulburn",t)
call UnitApplyTimedLife(d,'BTLF',0.5)
call SetTimerData(z,this)
call TimerStart(z,0.2,true,function data.AmaterasuTarget)
set d = null
return this
endmethod
endstruct
function AmaterasuUnit takes unit c, unit t, real time, real damage returns nothing
if GetUnitAbilityLevel(t,'B00C') <= 0 then
call data.create(c,t,time,damage)
endif
endfunction
function StoneBroke1 takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local real damage = LoadReal(HS,GetHandleId(z),0)
call DamageTarget(c,t,damage,GENJUTSU_DAMAGE)
call UnitRemoveAbility(t,'B00I')
call SetUnitTimeScale(t,1)
call SetUnitVertexColor(t,255,255,255,255)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
set c = null
set t = null
endfunction
function StoneUnit takes unit c, unit t, real time, real damage returns nothing
local real i = time * 2
local integer r = R2I(i)
local unit d
local timer z
if GetUnitAbilityLevel(c,'B00I') <= 0 then
set z = NewTimer()
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitAddAbility(d,'A001')
call SetUnitAbilityLevel(d,'A001',r)
call IssueTargetOrder(d,"thunderbolt",t)
call UnitApplyTimedLife(d,'BTLF',0.5)
call SetUnitTimeScale(t,0)
call SetUnitVertexColor(t,20,20,20,255)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,t)
call SaveReal(HS,GetHandleId(z),0,damage)
call TimerStart(z,time,false,function StoneBroke1)
endif
set d = null
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
library RVN initializer init
globals
private hashtable HS
endglobals
function anglebetweenpoints takes real x1, real y1, real x2, real y2 returns real
return bj_RADTODEG * Atan2(y2-y1, x2-x1)
endfunction
private function MultiInstanceFilter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==true and GetUnitAbilityLevel(GetFilterUnit(),'Avul') != 1 and GetWidgetLife(GetFilterUnit()) > 0.45 and IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE)==false
endfunction
function AreaDamageEffect takes unit u, real r, real x, real y, real a, string eff returns nothing
local group g=CreateGroup()
local unit d
call GroupEnumUnitsInRange(g,x,y,a,Condition(function MultiInstanceFilter))
loop
set d=FirstOfGroup(g)
call UnitDamageTarget(u,d,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
call DestroyEffect(AddSpecialEffect(eff,GetUnitX(d),GetUnitY(d)))
exitwhen d==null
call GroupRemoveUnit(g,d)
endloop
call DestroyGroup(g)
set g=null
endfunction
function distancebetweenpoints takes real x1, real y1, real x2, real y2 returns real
return SquareRoot((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1))
endfunction
function SlideUnitMove10 takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,0,GetHandleId(z))
local real x = LoadReal(HS,0,GetHandleId(z))
local real y = LoadReal(HS,1,GetHandleId(z))
local real speed = LoadReal(HS,2,GetHandleId(z))
local real angle = anglebetweenpoints(GetUnitX(c),GetUnitY(c),x,y)
local real xx = PolarX(GetUnitX(c),speed,angle)
local real yy = PolarY(GetUnitY(c),speed,angle)
call SetUnitPosition(c,xx,yy)
if distancebetweenpoints(xx,yy,x,y) <= 50 then
call SetUnitPathing(c,true)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set c = null
set z = null
endfunction
function SlideUnitToXY takes unit c, real x, real y, real speed, real update returns nothing
local timer z = CreateTimer()
call SetUnitPathing(c,false)
call SaveUnitHandle(HS,0,GetHandleId(z),c)
call SaveReal(HS,0,GetHandleId(z),x)
call SaveReal(HS,1,GetHandleId(z),y)
call SaveReal(HS,2,GetHandleId(z),speed)
call TimerStart(z,update,true,function SlideUnitMove10)
set z = null
endfunction
function SlideUnitMove2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,0,GetHandleId(z))
local real x = LoadReal(HS,0,GetHandleId(z))
local real y = LoadReal(HS,1,GetHandleId(z))
local real speed = LoadReal(HS,2,GetHandleId(z))
local real time = LoadReal(HS,3,GetHandleId(z))
local real count = LoadReal(HS,4,GetHandleId(z))
local real angle = anglebetweenpoints(GetUnitX(c),GetUnitY(c),x,y)
local real xx = PolarX(GetUnitX(c),speed,angle)
local real yy = PolarY(GetUnitY(c),speed,angle)
set time = time * 50
set count = count + 1
if count >= time then
call SetUnitPathing(c,true)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
call SaveReal(HS,4,GetHandleId(z),count)
call SetUnitPosition(c,xx,yy)
set c = null
set z = null
endfunction
function SlideUnitToXYTime takes unit c, real x, real y, real speed, real time returns nothing
local timer z = CreateTimer()
call SetUnitPathing(c,false)
call SaveUnitHandle(HS,0,GetHandleId(z),c)
call SaveReal(HS,0,GetHandleId(z),x)
call SaveReal(HS,1,GetHandleId(z),y)
call SaveReal(HS,2,GetHandleId(z),speed)
call SaveReal(HS,3,GetHandleId(z),time)
call SaveReal(HS,4,GetHandleId(z),0)
call TimerStart(z,0.02,true,function SlideUnitMove2)
set z = null
endfunction
function SlideUnitMove3 takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,0,GetHandleId(z))
local unit t = LoadUnitHandle(HS,1,GetHandleId(z))
local real speed = LoadReal(HS,0,GetHandleId(z))
local real angle = anglebetweenpoints(GetUnitX(t),GetUnitY(t),GetUnitX(c),GetUnitY(c))
local real xx = PolarX(GetUnitX(t),speed,angle)
local real yy = PolarY(GetUnitY(t),speed,angle)
local real damage = LoadReal(HS,1,GetHandleId(z))
if distancebetweenpoints(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t)) <= 150 then
call SetUnitPathing(t,true)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl",GetUnitX(t),GetUnitY(t)))
call UnitDamageTarget(c,t,damage,true,true,null,DAMAGE_TYPE_DIVINE,null)
endif
call DestroyEffect(AddSpecialEffect("war3mapImported\\EarthSmash.mdx",GetUnitX(t),GetUnitY(t)))
call SetUnitPosition(t,xx,yy)
set c = null
set z = null
set t = null
endfunction
function SlideUnitToUnitDamage takes unit c, unit t, real speed, real update, real damage returns nothing
local timer z = CreateTimer()
call SetUnitPathing(t,false)
call SaveUnitHandle(HS,0,GetHandleId(z),c)
call SaveUnitHandle(HS,1,GetHandleId(z),t)
call SaveReal(HS,0,GetHandleId(z),speed)
call SaveReal(HS,1,GetHandleId(z),damage)
call TimerStart(z,update,true,function SlideUnitMove3)
set z = null
endfunction
function SlideUnitMove4 takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit t = LoadUnitHandle(HS,0,GetHandleId(z))
local unit c = LoadUnitHandle(HS,1,GetHandleId(z))
local real speed = LoadReal(HS,0,GetHandleId(z))
local real angle = LoadReal(HS,1,GetHandleId(z))
local real time = LoadReal(HS,2,GetHandleId(z))
local real count = LoadReal(HS,3,GetHandleId(z))
local real damage = LoadReal(HS,4,GetHandleId(z))
local real xx = PolarX(GetUnitX(t),speed,angle)
local real yy = PolarY(GetUnitY(t),speed,angle)
set count = count + 1
set time = time * 50
if count >= time then
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
call DestroyEffect(AddSpecialEffect("war3mapImported\\EarthSmash.mdx",GetUnitX(t),GetUnitY(t)))
call UnitDamageTarget(c,t,damage,true,true,null,DAMAGE_TYPE_DIVINE,null)
endif
call SetUnitPosition(t,xx,yy)
call SaveReal(HS,3,GetHandleId(z),count)
set z = null
set t = null
set c = null
endfunction
function SlideUnitAngleDamage takes unit t, unit c, real speed, real time, real angle, real damage returns nothing
local timer z = CreateTimer()
call SaveUnitHandle(HS,1,GetHandleId(z),c)
call SaveUnitHandle(HS,0,GetHandleId(z),t)
call SaveReal(HS,0,GetHandleId(z),speed)
call SaveReal(HS,1,GetHandleId(z),angle)
call SaveReal(HS,2,GetHandleId(z),time)
call SaveReal(HS,3,GetHandleId(z),0)
call SaveReal(HS,4,GetHandleId(z),damage)
call TimerStart(z,0.02,true,function SlideUnitMove4)
set z = null
endfunction
function PathingAction takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,0,GetHandleId(z))
call SetUnitPathing(c,true)
call FlushChildHashtable(HS,GetHandleId(z))
call DestroyTimer(z)
set z = null
set c = null
endfunction
function SetUnitPathingForSecond takes unit c, real time returns nothing
local timer z = CreateTimer()
if c != null then
call SetUnitPathing(c,false)
endif
call SaveUnitHandle(HS,0,GetHandleId(z),c)
call TimerStart(z,time,false,function PathingAction)
endfunction
function SlideUnitMove5 takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit t = LoadUnitHandle(HS,0,GetHandleId(z))
local unit c = LoadUnitHandle(HS,1,GetHandleId(z))
local real speed = LoadReal(HS,0,GetHandleId(z))
local real angle = LoadReal(HS,1,GetHandleId(z))
local real time = LoadReal(HS,2,GetHandleId(z))
local real count = LoadReal(HS,3,GetHandleId(z))
local real damage = LoadReal(HS,4,GetHandleId(z))
local real xx = PolarX(GetUnitX(t),speed,angle)
local real yy = PolarY(GetUnitY(t),speed,angle)
set count = count + 1
set time = time * 50
if count >= time then
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
call DestroyEffect(AddSpecialEffect("war3mapImported\\WhiteApplause.mdx",GetUnitX(t),GetUnitY(t)))
call UnitDamageTarget(c,t,damage,true,true,null,DAMAGE_TYPE_DIVINE,null)
endif
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",GetUnitX(t),GetUnitY(t)))
call SetUnitPosition(t,xx,yy)
call SaveReal(HS,3,GetHandleId(z),count)
set z = null
set t = null
set c = null
endfunction
function SlideUnitAngleDamageNeji takes unit t, unit c, real speed, real time, real angle, real damage returns nothing
local timer z = CreateTimer()
call SaveUnitHandle(HS,1,GetHandleId(z),c)
call SaveUnitHandle(HS,0,GetHandleId(z),t)
call SaveReal(HS,0,GetHandleId(z),speed)
call SaveReal(HS,1,GetHandleId(z),angle)
call SaveReal(HS,2,GetHandleId(z),time)
call SaveReal(HS,3,GetHandleId(z),0)
call SaveReal(HS,4,GetHandleId(z),damage)
call TimerStart(z,0.02,true,function SlideUnitMove5)
set z = null
endfunction
function SlideUnitMove7 takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit t = LoadUnitHandle(HS,0,GetHandleId(z))
local unit c = LoadUnitHandle(HS,1,GetHandleId(z))
local real speed = LoadReal(HS,0,GetHandleId(z))
local real angle = LoadReal(HS,1,GetHandleId(z))
local real time = LoadReal(HS,2,GetHandleId(z))
local real count = LoadReal(HS,3,GetHandleId(z))
local real damage = LoadReal(HS,4,GetHandleId(z))
local real xx = PolarX(GetUnitX(t),speed,angle)
local real yy = PolarY(GetUnitY(t),speed,angle)
local unit d
set count = count + 1
set time = time * 50
if count >= time then
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
call DestroyEffect(AddSpecialEffect("war3mapImported\\EarthSmash.mdx",GetUnitX(t),GetUnitY(t)))
set d = CreateUnit(GetOwningPlayer(c),'h01P',GetUnitX(c),GetUnitY(c),0)
call UnitDamageTarget(d,t,damage,true,true,null,DAMAGE_TYPE_DIVINE,null)
call UnitApplyTimedLife(d,'BTLF',0.1)
endif
call SetUnitPosition(t,xx,yy)
call SaveReal(HS,3,GetHandleId(z),count)
set z = null
set t = null
set c = null
set d = null
endfunction
function SlideUnitAngleDamageLee takes unit t, unit c, real speed, real time, real angle, real damage returns nothing
local timer z = CreateTimer()
call SaveUnitHandle(HS,1,GetHandleId(z),c)
call SaveUnitHandle(HS,0,GetHandleId(z),t)
call SaveReal(HS,0,GetHandleId(z),speed)
call SaveReal(HS,1,GetHandleId(z),angle)
call SaveReal(HS,2,GetHandleId(z),time)
call SaveReal(HS,3,GetHandleId(z),0)
call SaveReal(HS,4,GetHandleId(z),damage)
call TimerStart(z,0.02,true,function SlideUnitMove7)
set z = null
endfunction
private function init takes nothing returns nothing
set HS = InitHashtable()
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
library SlowMode
function SlowTime takes real time, real minus returns real
if SLOWMODE == false then
return time - minus
else
return time - (minus / 5)
endif
endfunction
function SlowDistanceX takes unit d, real dist, real a returns real
local real x = PolarX(GetUnitX(d),dist,a)
if SLOWMODE == false then
return x
else
set x = PolarX(GetUnitX(d),dist / 5,a)
return x
endif
endfunction
function SlowDistanceY takes unit d, real dist, real a returns real
local real y = PolarY(GetUnitY(d),dist,a)
if SLOWMODE == false then
return y
else
set y = PolarY(GetUnitY(d),dist / 5,a)
return y
endif
endfunction
endlibrary
//TESH.scrollpos=60
//TESH.alwaysfold=0
scope AdvanceStreak initializer init
globals
private constant integer SOUNDMINIMUMKILL = 3
private constant integer SOUNDMAXIMUMKILL = 11
private constant integer KILLCONTINUEMAX = 5
private constant integer KILLCONTINUEMIN = 2
private constant integer TIMEINTERVAL = 11
private constant string SOUNDKILL = "war3mapImported\\SoundKill"
private constant string SOUNDCONTINUEKILL = "war3mapImported\\KillContinue"
private constant string SOUNDFIRSTBLOOD = "war3mapImported\\firstblood.mp3"
private constant string DOTFILE = ".mp3"
integer array KILLCOUNT
integer array KILLINTIME
private integer FIRSTBLOOD = 0
private hashtable HSS = InitHashtable()
private force AllPlayer
endglobals
private function TextSound takes unit Killer, integer Kill returns string
local string s = ""
local unit c = Killer
local integer idc = GetPlayerId(GetOwningPlayer(c))
local string name = GetPlayerName(GetOwningPlayer(c))
set c = null
if Kill == 3 then
set s = COLOR[idc] + name + "|r is on a |cff80ff80Serial Killer|r"
elseif Kill == 4 then
set s = COLOR[idc] + name + "|r is |cff4B0082Ultimate Warrior|r"
elseif Kill == 5 then
set s = COLOR[idc] + name + "|r is |cffFF00FFLegendary|r!"
elseif Kill == 6 then
set s = COLOR[idc] + name + "|r is |cffFF8C00Onslaught|r"
elseif Kill == 7 then
set s = COLOR[idc] + name + "|r is |cffB8860BSavage Sick|r!|r"
elseif Kill == 8 then
set s = COLOR[idc] + name + "|r is |cffFF00FFDominating|r!!"
elseif Kill == 9 then
set s = COLOR[idc] + name + "|r is |cffFF0000Champion of New Reborn Vs Naruto|r!!!|r"
elseif Kill == 10 then
set s = COLOR[idc] + name + "|r is |cffFF0000Unbelievable|r!!!|r"
elseif Kill == 11 then
set s = COLOR[idc] + name + "|r is |cffFF8C00Immortal|r.HAIL TO THE CHAMPION BABY!!!!!|r"
endif
return s
endfunction
private function TextSoundKillContinue takes unit Killer, integer Kill returns string
local string s = ""
local unit c = Killer
local integer idc = GetPlayerId(GetOwningPlayer(c))
local string name = GetPlayerName(GetOwningPlayer(c))
set c = null
if Kill == 2 then
set s = COLOR[idc] + name + "|r just got a |cff0000CDDobble Taps|r!|r"
elseif Kill == 3 then
set s = COLOR[idc] + name + "|r just got a |cff80ff80No Change|r!!!|r"
elseif Kill == 4 then
set s = COLOR[idc] + name + "|r just got a |cff1E90FFWHOS NEXT|r!!!|r"
elseif Kill == 5 then
set s = COLOR[idc] + name + "|r just got a |cff4169E1HALL Yeah !!|r!!!|r"
endif
return s
endfunction
private function TextFirstBlood takes unit Killer returns string
local string s = ""
local unit c = Killer
local integer idc = GetPlayerId(GetOwningPlayer(c))
local string name = GetPlayerName(GetOwningPlayer(c))
set c = null
set s = COLOR[idc] + name + "|r just drew |cffFF0000FirstBlood! |r(+150 gold!)"
return s
endfunction
private function Conditions takes nothing returns boolean
return IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) == true
endfunction
private function SetKillInTime takes nothing returns nothing
local timer z = GetExpiredTimer()
local integer idc = LoadInteger(HSS,GetHandleId(z),0)
set KILLINTIME[idc] = 0
call DestroyTimer(z)
call FlushChildHashtable(HSS,GetHandleId(z))
set z = null
endfunction
private function Actions takes nothing returns nothing
local unit t = GetTriggerUnit()
local unit c = GetKillingUnit()
local integer idc = GetPlayerId(GetOwningPlayer(c))
local integer idt = GetPlayerId(GetOwningPlayer(t))
local sound s
local sound s2
local timer old
local timer z
local integer SaveKillInTime
call DisplayTextToForce(AllPlayer,COLOR[idc] + GetPlayerName(GetOwningPlayer(c)) + "|r pwned " + COLOR[idt] + GetPlayerName(GetOwningPlayer(t)) + "|r's head! for |cffffcc00110|r gold!!|r")
if GetPlayerController(GetOwningPlayer(c)) == MAP_CONTROL_USER then
set old = LoadTimerHandle(HSS,GetHandleId(c),0)
if old != null then
call DestroyTimer(old)
call FlushChildHashtable(HSS,GetHandleId(old))
call FlushChildHashtable(HSS,GetHandleId(c))
endif
set z = CreateTimer()
call SaveTimerHandle(HSS,GetHandleId(c),0,z)
call SaveInteger(HSS,GetHandleId(z),0,idc)
call TimerStart(z,TIMEINTERVAL,false,function SetKillInTime)
set FIRSTBLOOD = FIRSTBLOOD + 1
set KILLCOUNT[idc] = KILLCOUNT[idc] + 1
set KILLINTIME[idc] = KILLINTIME[idc] + 1
if KILLINTIME[idc] > KILLCONTINUEMAX then
set KILLINTIME[idc] = KILLCONTINUEMAX
endif
set KILLCOUNT[idt] = 0
if KILLCOUNT[idc] > SOUNDMAXIMUMKILL then
set KILLCOUNT[idc] = SOUNDMAXIMUMKILL
endif
set SaveKillInTime = KILLINTIME[idc]
if FIRSTBLOOD == 1 then
set s = CreateSound(SOUNDFIRSTBLOOD,false,false,false,10,10,"Default")
call SetSoundPosition(s,GetUnitX(c),GetUnitY(c),0)
call SetSoundVolume(s,127)
call StartSound(s)
call DisplayTextToForce(AllPlayer,TextFirstBlood(c))
else
if KILLCOUNT[idc] >= SOUNDMINIMUMKILL then
set s = CreateSound(SOUNDKILL + I2S(KILLCOUNT[idc]) + DOTFILE,false,false,false,10,10,"Default")
call SetSoundPosition(s,GetUnitX(c),GetUnitY(c),0)
call SetSoundVolume(s,127)
call StartSound(s)
call DisplayTextToForce(AllPlayer,TextSound(c,KILLCOUNT[idc]))
endif
call PolledWait(1)
set s2 = CreateSound(SOUNDCONTINUEKILL + I2S(SaveKillInTime) + DOTFILE,false,false,false,10,10,"Default")
call SetSoundPosition(s2,GetUnitX(c),GetUnitY(c),0)
call SetSoundVolume(s2,127)
call StartSound(s2)
call DisplayTextToForce(AllPlayer,TextSoundKillContinue(c,SaveKillInTime))
endif
endif
set t = null
set c = null
set s = null
set s2 = null
set old = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger( )
local integer index = 0
set COLOR[0] = "|c00ff0303"
set COLOR[1] = "|c000042ff"
set COLOR[2] = "|c001ce6b9"
set COLOR[3] = "|c00540081"
set COLOR[4] = "|c00fffc01"
set COLOR[5] = "|c00ff8000"
set COLOR[6] = "|c0020c000"
set COLOR[7] = "|c00e55bb0"
set COLOR[8] = "|c00959697"
set COLOR[9] = "|c007ebff1"
set COLOR[10] = "|c00106246"
set COLOR[11] = "|c004e2a04"
set AllPlayer = bj_FORCE_ALL_PLAYERS
loop
set KILLCOUNT[index] = 0
set KILLINTIME[index] = 0
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_DEATH,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set index = SOUNDMINIMUMKILL
call Preload(SOUNDFIRSTBLOOD)
loop
exitwhen index > SOUNDMAXIMUMKILL
call Preload(SOUNDKILL + I2S(index) + DOTFILE)
if index >= KILLCONTINUEMIN and index <= KILLCONTINUEMAX then
call Preload(SOUNDCONTINUEKILL + I2S(index) + DOTFILE)
endif
set index = index + 1
endloop
set t = null
endfunction
endscope
//TESH.scrollpos=73
//TESH.alwaysfold=0
library DDS initializer init
//-- Leakless Damage Detection --\\
globals
private constant integer LOCUS = 'Aloc'
real DDS_DAMAGE
unit DDS_SOURCE
unit DDS_TARGETED
unit array DDS_CHECK
integer DDS_COUNT = 0
trigger array DDS_TRIGGER
endglobals
// ===========================================================================
//! textmacro DDS_ARRAY takes vs
set DDS_COUNT = DDS_COUNT + 1
set DDS_CHECK[DDS_COUNT] = $vs$
set DDS_TRIGGER[DDS_COUNT] = CreateTrigger()
//! endtextmacro
private function DDSDamaged takes nothing returns boolean
set DDS_TARGETED = GetTriggerUnit()
set DDS_SOURCE = GetEventDamageSource()
set DDS_DAMAGE = GetEventDamage()
set udg_DDS_EVENT = 0.
set udg_DDS_EVENT = 1.
return false
endfunction
private function DDS_ADD takes nothing returns boolean
local trigger t
local unit c = GetFilterUnit()
local integer i = 1
local integer mem = 0
local integer sh = 0
if GetUnitAbilityLevel(c,LOCUS) == 0 then
loop
exitwhen i >= DDS_COUNT
if GetUnitTypeId(DDS_CHECK[i]) == 0 then
set mem = i
exitwhen true
endif
set i = i + 1
endloop
if mem == 0 then
//! runtextmacro DDS_ARRAY("c")
set sh = DDS_COUNT
else
call DestroyTrigger(DDS_TRIGGER[mem])
set DDS_TRIGGER[mem] = null
set DDS_CHECK[mem] = null
set DDS_CHECK[mem] = c
set DDS_TRIGGER[mem] = CreateTrigger()
set sh = mem
endif
call TriggerRegisterUnitEvent(DDS_TRIGGER[sh],c,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(DDS_TRIGGER[sh],Condition(function DDSDamaged))
endif
set t = null
set c = null
return false
endfunction
private function InitialDetection takes nothing returns nothing
local group g = CreateGroup()
local integer i = 0
local unit v
call GroupEnumUnitsInRect(g,GetWorldBounds(),null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if GetUnitAbilityLevel(v,LOCUS) == 0 then
//! runtextmacro DDS_ARRAY("v")
set DDS_TRIGGER[DDS_COUNT] = CreateTrigger()
call TriggerRegisterUnitEvent(DDS_TRIGGER[DDS_COUNT],v,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(DDS_TRIGGER[DDS_COUNT],Condition(function DDSDamaged))
endif
call GroupRemoveUnit(g,v)
endloop
call DestroyGroup(g)
set g = null
endfunction
// ===========================================================================
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local region r = CreateRegion()
call InitialDetection()
call RegionAddRect(r, GetWorldBounds())
call TriggerRegisterEnterRegion(t,r,Filter(function DDS_ADD))
set r = null
set t = null
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
library FlyingDamageText initializer init uses DDS
globals
private hashtable HS = InitHashtable()
private constant real PERIODIC = 0.03
private constant real BASE_SIZE = 0.075 // Base size of text.
private constant real LIFESPAN = 1.5 // Duration of text
// ----- Advance Edit -----\\
private constant real FDOWN = 2 // Flying down speed.
private constant real FSIZE = 0.00085 //Size decrease per 0.03 second
private constant real BASEHIGH = 35 // Base Flying High speed.
// ------ Text Color ------ \\
private constant integer RED = 255
private constant integer BLUE = 255
private constant integer GREEN = 255
// ------ Text Color Recieve------ \\
private constant integer RED1 = 255
private constant integer BLUE1 = 50
private constant integer GREEN1 = 50
endglobals
private struct data
unit c
unit t
real r
real time = LIFESPAN
texttag text
real high = BASEHIGH
real high2 = 0
real size = BASE_SIZE
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method periodic takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = LoadInteger(HS,GetHandleId(z),0)
set time = time - PERIODIC
set high = high - FDOWN
set high2 = high2 + high
set size = size - FSIZE
call SetTextTagText(text,I2S(R2I(r)),size)
call SetTextTagPosUnit(text,t,high2)
if time <= 0 then
call PauseTimer(z)
call DestroyTimer(z)
call DestroyTextTag(.text)
call FlushChildHashtable(HS,GetHandleId(z))
call .destroy()
endif
set z = null
endmethod
static method create takes unit caster, unit target, real damage returns data
local data this = data.allocate()
local timer z = CreateTimer()
set .c = caster
set .t = target
set .r = damage
set .text = CreateTextTag()
call SetTextTagText(text,I2S(R2I(r)),BASE_SIZE)
call SetTextTagPosUnit(text,t,0)
if IsPlayerAlly(GetLocalPlayer(),GetOwningPlayer(.c)) == true then
call SetTextTagColor(text,RED,GREEN,BLUE,255)
else
call SetTextTagColor(text,RED1,GREEN1,BLUE1,255)
endif
call SetTextTagVelocity(text,0.08,0)
call SaveInteger(HS,GetHandleId(z),0,this)
call TimerStart(z,PERIODIC,true,function data.periodic)
set z = null
return this
endmethod
endstruct
private function Actions takes nothing returns nothing
call data.create(DDS_SOURCE,DDS_TARGETED,DDS_DAMAGE)
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterVariableEvent(t,"udg_DDS_EVENT",EQUAL,0.)
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endlibrary
//TESH.scrollpos=21
//TESH.alwaysfold=0
library DragonForce
globals
private constant real DRAGONFORCELIMIT = 800
private constant real DRAGONFORCEDURATION = 40
hashtable DRAGONFORCE = InitHashtable()
endglobals
function DragonForceDuration takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0D2',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0BR',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0C3',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0BV',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0D3',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A062',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A063',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0AO',true)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
set z = null
set c = null
endfunction
function DragonForceCheck takes unit c, real r returns nothing
local real hp = GetWidgetLife(c)
local real check = LoadReal(DRAGONFORCE,GetHandleId(c),0)
local timer z
call SetWidgetLife(c,hp + r)
call SaveReal(DRAGONFORCE,GetHandleId(c),0,check + r)
if LoadReal(DRAGONFORCE,GetHandleId(c),0) >= DRAGONFORCELIMIT then
call UnitRemoveAbility(c,'B01U')
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0D3',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A062',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A063',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0AO',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A067',true)
if GetUnitAbilityLevel(c,'A0AO') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0AQ',true)
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0C3',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0BV',true)
call SetUnitAbilityLevel(c,'A067',GetUnitAbilityLevel(c,'A0D3'))
call SetUnitAbilityLevel(c,'A0C3',GetUnitAbilityLevel(c,'A062'))
call SetUnitAbilityLevel(c,'A0BR',GetUnitAbilityLevel(c,'A078'))
call SetUnitAbilityLevel(c,'A0BV',GetUnitAbilityLevel(c,'A063'))
call SoundStart("war3mapImported\\Mode.mp3",GetUnitX(c),GetUnitY(c))
set z = CreateTimer()
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call TimerStart(z,DRAGONFORCEDURATION,false,function DragonForceDuration)
endif
set z = null
endfunction
endlibrary
//TESH.scrollpos=7
//TESH.alwaysfold=0
function Trig_Vongola_SkyBox_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A081'
endfunction
function skyboxtakes takes nothing returns nothing
local unit c = GetTriggerUnit()
local real i = GetUnitState(c,UNIT_STATE_LIFE) + GetEventDamage()
call SetUnitState(c,UNIT_STATE_LIFE,i)
endfunction
function Trig_Vongola_SkyBox_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local effect e
local trigger t
local triggeraction t2
set e = AddSpecialEffectTarget("war3mapImported\\mantello de vongola primo.mdx",c,"origin")
set t = CreateTrigger()
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_DAMAGED)
set t2 = TriggerAddAction(t,function skyboxtakes)
call TriggerSleepAction(5)
call UnitRemoveAbility(c,'B01A')
call DestroyEffect(e)
call TriggerRemoveAction(t,t2)
call DestroyTrigger(t)
set e = null
set c = null
set t = null
set t2 = null
endfunction
//===========================================================================
function InitTrig_Vongola_SkyBox takes nothing returns nothing
local trigger o = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( o, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( o, Condition( function Trig_Vongola_SkyBox_Conditions ) )
call TriggerAddAction( o, function Trig_Vongola_SkyBox_Actions )
//preloading ----------------------------------------------------------
call Preload("war3mapImported\\mantello de vongola primo.mdx")
set bj_lastCreatedUnit = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'h002',0,0,0)
call UnitAddAbility(bj_lastCreatedUnit,'A09H')
call KillUnit(bj_lastCreatedUnit)
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Rain_Vongola_Rings_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A08R'
endfunction
function Trig_Rain_Vongola_Rings_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit e
local integer i = 0
local real x
local real y
loop
exitwhen i > 18
set x = PolarX(GetUnitX(c),200,i * 20)
set y = PolarY(GetUnitY(c),200,i * 20)
set e = CreateUnit(GetOwningPlayer(c),'h0F5',x,y,i * 20)
call UnitApplyTimedLife(e,'BTLF',1)
set e = null
set i = i + 1
endloop
set c = null
endfunction
//===========================================================================
function InitTrig_Rain_Vongola_Rings takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function Trig_Rain_Vongola_Rings_Conditions ) )
call TriggerAddAction(t, function Trig_Rain_Vongola_Rings_Actions )
endfunction
//TESH.scrollpos=3
//TESH.alwaysfold=0
function Trig_Thunder_Vongola_Rings__Conditions takes nothing returns boolean
return IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true
endfunction
function thunderrecon takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(), 'B019') > 0
endfunction
function thunderreact takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetEventDamageSource()
local unit d
if GetUnitAbilityLevel(t,'B019') > 0 then
set d = CreateUnit(GetOwningPlayer(c),'h002',GetUnitX(t),GetUnitY(t),0)
call UnitDamageTarget(d,t,GetEventDamage(),true,true,null,DAMAGE_TYPE_DIVINE,null)
call UnitApplyTimedLife(d,'BTLF',0.1)
else
call UnitDamageTarget(c,t,GetEventDamage(),true,true,null,DAMAGE_TYPE_DIVINE,null)
endif
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",GetUnitX(t),GetUnitY(t)))
set c = null
set d = null
set t = null
endfunction
function Trig_Thunder_Vongola_Rings_Actions takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function thunderrecon))
call TriggerAddAction(t,function thunderreact)
endfunction
function InitTrig_Thunder_Vongola_Rings takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterEnterRectSimple( t, bj_mapInitialPlayableArea )
call TriggerAddCondition( t, Condition( function Trig_Thunder_Vongola_Rings__Conditions ) )
call TriggerAddAction( t, function Trig_Thunder_Vongola_Rings_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Storm_Vongola_Rings_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A08S'
endfunction
function stormshotFilter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==true and GetUnitAbilityLevel(GetFilterUnit(),'Avul') != 1 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0 and IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE)==false
endfunction
function Trig_Storm_Vongola_Rings_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit e
local unit d
local group g = CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),500,Condition(function stormshotFilter))
loop
set d=FirstOfGroup(g)
set e = CreateUnit(GetOwningPlayer(c),'h002',GetUnitX(c),GetUnitY(c), bj_UNIT_FACING )
call UnitAddAbility(e,'A09F')
call IssueTargetOrder(e,"fingerofdeath",d)
call UnitApplyTimedLife(e,'BTLF',1)
exitwhen d==null
call GroupRemoveUnit(g,d)
set e = null
endloop
call DestroyGroup(g)
set g = null
set c = null
endfunction
//===========================================================================
function InitTrig_Storm_Vongola_Rings takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function Trig_Storm_Vongola_Rings_Conditions ) )
call TriggerAddAction( t, function Trig_Storm_Vongola_Rings_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Mist_Vongola_Rings_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A080'
endfunction
function Trig_Mist_Vongola_Rings_Actions takes nothing returns nothing
call DestroyEffect(AddSpecialEffect("war3mapImported\\WarpDarkCaster.mdx",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))
endfunction
//===========================================================================
function InitTrig_Mist_Vongola_Rings takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function Trig_Mist_Vongola_Rings_Conditions ) )
call TriggerAddAction( t, function Trig_Mist_Vongola_Rings_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope blackmistitem initializer init
private function Trig_Black_Mist_Illusion_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A09H'
endfunction
private function MultiInstanceFilter2 takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==true and GetUnitAbilityLevel(GetFilterUnit(),'Avul') != 1 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0 and IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE)==false
endfunction
private function Trig_Black_Mist_Illusion_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local integer i = 0
local real x
local real y
local group g = CreateGroup()
local unit d
local unit v
local unit array h
loop
exitwhen i > 9
set x = PolarX(GetUnitX(c),300,i * 40)
set y = PolarY(GetUnitY(c),300,i * 40)
set h[i] = CreateUnit(GetOwningPlayer(c),'h057',GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
set i = i + 1
endloop
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),500,Condition(function MultiInstanceFilter2))
loop
set d = FirstOfGroup(g)
set v = CreateUnit(GetOwningPlayer(d),'h008',GetUnitX(d),GetUnitY(d),bj_UNIT_FACING)
call UnitAddAbility(v,'A09I')
call IssueTargetOrder(v,"soulburn",d)
call UnitApplyTimedLife(v,'BTLF',1)
exitwhen d == null
call GroupRemoveUnit(g,d)
endloop
call TriggerSleepAction(6)
set i = 0
loop
exitwhen i > 9
call KillUnit(h[i])
set h[i] = null
set i = i + 1
endloop
set c = null
endfunction
//===========================================================================
private function init takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function Trig_Black_Mist_Illusion_Conditions ) )
call TriggerAddAction( t, function Trig_Black_Mist_Illusion_Actions )
endfunction
endscope
//TESH.scrollpos=4
//TESH.alwaysfold=0
function Trig_Sky_Vongola_Rings_Conditions takes nothing returns boolean
return IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true
endfunction
function skyringcon takes nothing returns boolean
return GetUnitAbilityLevel(GetEventDamageSource(), 'B01A') > 0
endfunction
function skyringact takes nothing returns nothing
local integer i = GetRandomInt(0,100)
local unit c = GetEventDamageSource()
local unit t = GetTriggerUnit()
local real a = GetRandomReal(0,360)
local real x = PolarX(GetUnitX(t),50,a)
local real y = PolarY(GetUnitY(t),50,a)
call SetUnitPosition(c,x,y)
if i < 15 then
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",GetUnitX(t),GetUnitY(t)))
call UnitDamageTarget(c,t,100,true,true,null,DAMAGE_TYPE_DIVINE,null)
endif
set c = null
set t = null
endfunction
function skyringact1 takes nothing returns nothing
local trigger t
set t = CreateTrigger()
call TriggerRegisterUnitEvent( t,GetTriggerUnit(), EVENT_UNIT_DAMAGED)
call TriggerAddCondition( t, Condition( function skyringcon ) )
call TriggerAddAction(t, function skyringact)
endfunction
//===========================================================================
function InitTrig_Sky_Vongola_Rings takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterEnterRectSimple( t, bj_mapInitialPlayableArea )
call TriggerAddCondition( t, Condition( function Trig_Sky_Vongola_Rings_Conditions ) )
call TriggerAddAction( t, function skyringact1)
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Ninja_Move_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A03P'
endfunction
function Trig_Ninja_Move_Actions takes nothing returns nothing
local real x = GetDestructableX(GetSpellTargetDestructable())
local real y = GetDestructableY(GetSpellTargetDestructable())
call TriggerSleepAction(0)
call DestructableRestoreLife(GetSpellTargetDestructable(),GetDestructableMaxLife(GetSpellTargetDestructable()),false)
call SetUnitPathing(GetTriggerUnit(), false )
call SetUnitPosition(GetTriggerUnit(),x,y)
call UnitAddAbility(GetTriggerUnit(),'Amrf')
call UnitRemoveAbility(GetTriggerUnit(),'Amrf')
call SetUnitFlyHeight(GetTriggerUnit(),150.,0.)
call SetUnitFlyHeight(GetTriggerUnit(),0.,1000.)
call SetUnitPathing(GetTriggerUnit(),true)
endfunction
function InitTrig_Ninja_Move takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Trig_Ninja_Move_Conditions))
call TriggerAddAction(t,function Trig_Ninja_Move_Actions)
set t = null
endfunction
//TESH.scrollpos=36
//TESH.alwaysfold=0
scope TeleportNew initializer init
globals
private constant integer SPELLID = 'A03R'
private constant string EFFECT = "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl"
endglobals
private struct data
unit c
unit t
real time = 2.5
effect e
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
if GetUnitCurrentOrder(c) == OrderId("magicleash") then
set time = time - 0.02
if time <= 0 then
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call SetUnitPosition(c,GetUnitX(t),GetUnitY(t))
call DestroyEffect(.e)
call ReleaseTimer(z)
call .destroy()
endif
else
call DestroyEffect(.e)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .t = target
call BJDebugMsg(OrderId2String(GetUnitCurrentOrder(c)))
call BJDebugMsg(I2S(OrderId("magicleash")))
set .e = AddSpecialEffectTarget(EFFECT3,c,"origin")
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
if IsUnitInGroup(c,udg_TournamentGroup) == true or IsUnitInGroup(c,udg_TourTeamGroup[1]) == true or IsUnitInGroup(c,udg_TourTeamGroup[2]) == true or IsUnitInGroup(c,udg_TourTeamGroup[3]) == true then
call DisplayTextToPlayer(GetOwningPlayer(c),0,0,"You can't use this item when you are in Tournament")
call IssueImmediateOrder(c,"holdposition")
endif
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function PickSelf takes nothing returns boolean
return GetOwningPlayer(GetFilterUnit()) == GetTriggerPlayer() and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO) == true
endfunction
function KillmeFinal takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit n = LoadUnitHandle(HS,GetHandleId(z),0)
local real time = LoadReal(HS,GetHandleId(z),0)
set time = time - 1
call SaveReal(HS,GetHandleId(z),0,time)
call DisplayTextToPlayer(GetOwningPlayer(n),0,0,I2S(R2I(time)) + " Second CountDown")
if time <= 0 and GetUnitAbilityLevel(n,'Avul') <= 0 then
call KillUnit(n)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
elseif GetWidgetLife(n) < 0.45 then
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set n = null
endfunction
function Trig_Killme_Actions takes nothing returns nothing
local player p = GetTriggerPlayer()
local group g = NewGroup()
local unit n
local timer z = NewTimer()
call GroupEnumUnitsInRect(g,GetWorldBounds(),function PickSelf)
set n = FirstOfGroup(g)
call DisplayTextToPlayer(GetOwningPlayer(n),0,0,"Hey Mung killme Bug tournament pa wa")
call SaveUnitHandle(HS,GetHandleId(z),0,n)
call SaveReal(HS,GetHandleId(z),0,10)
call TimerStart(z,1,true,function KillmeFinal)
call ReleaseGroup(g)
set n = null
set g = null
set p = null
endfunction
function InitTrig_Killme takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterPlayerChatEvent(t,Player(1), "killme", true )
call TriggerRegisterPlayerChatEvent(t,Player(2), "killme", true )
call TriggerRegisterPlayerChatEvent(t,Player(3), "killme", true )
call TriggerRegisterPlayerChatEvent(t,Player(5), "killme", true )
call TriggerRegisterPlayerChatEvent(t,Player(6), "killme", true )
call TriggerRegisterPlayerChatEvent(t,Player(7), "killme", true )
call TriggerRegisterPlayerChatEvent(t,Player(9), "killme", true )
call TriggerRegisterPlayerChatEvent(t,Player(10), "killme", true )
call TriggerRegisterPlayerChatEvent(t,Player(11), "killme", true )
call TriggerAddAction(t, function Trig_Killme_Actions )
endfunction
//TESH.scrollpos=24
//TESH.alwaysfold=0
scope Tsukuyomiz initializer init
globals
private constant real DURATION = 4
private constant integer SPELLID = 'A0C1'
private constant integer ITACHI = 'h04Z'
private constant string EFFECT7 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
private constant string EFFECT6 = "Abilities\\Weapons\\SerpentWardMissile\\SerpentWardMissile.mdl"
private constant string EFFECT = "Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl"
endglobals
private struct data
unit c
unit d
unit t
unit j
unit array e[28]
integer animate = 0
real time = 6
integer count = 27
method destroy takes nothing returns nothing
local integer i = 1
call SetUnitTimeScale(t,1)
loop
exitwhen i > 28
call RemoveUnit(e[i])
set i = i + 1
endloop
call PauseUnit(.t,false)
call RemoveUnit(.d)
call RemoveUnit(.j)
call SetUnitAnimation(.t,"death")
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real xx
local real yy
local integer i = 1
local real r = (GetUnitAbilityLevel(c,SPELLID) * 115) / 20
set time = time - 0.05
set xx = PolarX(GetUnitX(t),GetRandomReal(0,120),GetRandomReal(0,360))
set yy = PolarY(GetUnitY(t),GetRandomReal(0,120),GetRandomReal(0,360))
call DestroyEffect(AddSpecialEffect(EFFECT6,xx,yy))
call DestroyEffect(AddSpecialEffect(EFFECT7,xx,yy))
call DamageTarget(c,t,r,GENJUTSU_DAMAGE)
set animate = animate + 1
if animate >= 25 then
set animate = 0
loop
exitwhen i > 28
call SetUnitAnimation(e[i],"spell five")
set i = i + 1
endloop
endif
if time <= 0 then
call StunUnit(c,t,3)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired3 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local integer i = 1
loop
exitwhen i > 28
call SetUnitAnimation(e[i],"spell five")
set i = i + 1
endloop
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(t),GetUnitY(t)))
call TimerStart(z,0.05,true,function data.TimerExpired2)
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x
local real y
local real a
set count = count - 1
if count >= 19 then
set x = PolarX(GetUnitX(t),120,count * 40)
set y = PolarY(GetUnitY(t),120,count * 40)
elseif count >= 10 then
set x = PolarX(GetUnitX(t),200,(count * 40) + 30)
set y = PolarY(GetUnitY(t),200,(count * 40) + 30)
elseif count >= 1 then
set x = PolarX(GetUnitX(t),280,(count * 40) + 60)
set y = PolarY(GetUnitY(t),280,(count * 40) + 60)
endif
if count <= 0 then
call SetUnitTimeScale(t,0)
call TimerStart(z,2,true,function data.TimerExpired3)
else
set a = Angle(x,y,GetUnitX(t),GetUnitY(t))
set .e[count] = CreateUnit(GetOwningPlayer(c),ITACHI,x,y,a)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .t = target
set .d = CreateUnit(GetOwningPlayer(.c),'h051',GetUnitX(.t),GetUnitY(.t),bj_UNIT_FACING)
set .j = CreateUnit(GetOwningPlayer(.c),'h053',GetUnitX(.t),GetUnitY(.t),bj_UNIT_FACING)
call SetUnitVertexColor(.j,255,255,255,125)
call PauseUnit(t,true)
call SetUnitAnimation(t,"stand")
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit v
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Tsukuyomi.mp3",GetUnitX(c),GetUnitY(c))
endif
call data.create(c,t)
set t = null
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=21
//TESH.alwaysfold=0
scope Amaterasuitachiboss initializer init
globals
private constant real DISTANCE = 35
private constant real RADIUS = 200
private constant real MAXDIST = 1800
private constant integer BALL = 'h0C4'
private constant integer BALL2 = 'h00Y'
private constant integer FIRE = 'h0C2'
private constant integer SHARINGAN = 'h0C3'
private constant integer SPELLID = 'A0C2'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\DarkNova.mdx"
endglobals
private struct data
unit c
unit d
unit e
real a
real FirstX
real FirstY
group go
real time = 2
integer cal
real xx
real yy
real xtarget
real ytarget
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 120
local integer count = 0
local integer i = 0
set time = time - 0.04
if time > 0 then
set cal = cal + 1
if cal >= 3 then
set cal = 0
call EffectUnitColor(c,x,y,0,1,FIRE,6,255,255,255,255)
endif
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(d,x,y)
call SetUnitPosition(e,x,y)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupAddGroup(go,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
call SetUnitPathing(v,false)
call SetUnitPosition(v,x,y)
call ShowUnit(v,false)
call GroupRemoveUnit(g,v)
endloop
endif
if time <= 0 then
if time == 0 then
set xtarget = GetUnitX(d)
set ytarget = GetUnitY(d)
loop
exitwhen i >= 18
call EffectUnitColor(c,PolarX(GetUnitX(d),400,i * 20),PolarY(GetUnitY(d),400,i * 20),0,0.8,FIRE,6,255,255,255,255)
call EffectUnitColor(c,PolarX(GetUnitX(d),250,i * 20),PolarY(GetUnitY(d),250,i * 20),0,0.8,FIRE,6,255,255,255,255)
call EffectUnitColor(c,PolarX(GetUnitX(d),100,i * 20),PolarY(GetUnitY(d),100,i * 20),0,0.8,FIRE,6,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT6,PolarX(GetUnitX(d),200,i * 20),PolarY(GetUnitY(d),200,i * 20)))
set i = i + 1
endloop
loop
set v = FirstOfGroup(go)
exitwhen v == null
call SetUnitPathing(v,true)
call ShowUnit(v,true)
call AmaterasuUnit(c,v,12,r)
call GroupRemoveUnit(go,v)
endloop
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseGroup(go)
endif
call GroupEnumUnitsInRange(g,xtarget,ytarget,400,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and GetUnitAbilityLevel(v,'B00C') <= 0 then
call AmaterasuUnit(c,v,12,r)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupEnumUnitsInRange(g,xx,yy,Distance(xx,yy,xtarget,ytarget),null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and GetUnitAbilityLevel(v,'B00C') <= 0 then
if (Angle(xx,yy,xtarget,ytarget) + 360) - (Angle(xx,yy,GetUnitX(v),GetUnitY(v)) + 360) <= 10 and (Angle(xx,yy,xtarget,ytarget) + 360) - (Angle(xx,yy,GetUnitX(v),GetUnitY(v)) + 360) >= -10 then
call AmaterasuUnit(c,v,12,r)
endif
endif
call GroupRemoveUnit(g,v)
endloop
if time <= -6 then
call ReleaseTimer(z)
call .destroy()
endif
endif
call ReleaseGroup(g)
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .go = NewGroup()
set .c = caster
set .cal = 0
set .a = angle
set .xx = GetUnitX(c)
set .yy = GetUnitY(c)
set .d = CreateUnit(GetOwningPlayer(.c),BALL,xx,yy,.a)
set .e = CreateUnit(GetOwningPlayer(.c),FIRE,xx,yy,.a)
call SetUnitScale(.e,2.5,2.5,2.5)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
local unit d = CreateUnit(GetOwningPlayer(c),SHARINGAN,GetUnitX(c),GetUnitY(c),a)
call SetUnitTimeScale(d,5)
call PauseUnit(c,true)
call PolledWait(0.6)
call SetUnitTimeScale(d,0)
call PolledWait(0.5)
call data.create(c,a)
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Itachia.mp3",GetUnitX(c),GetUnitY(c))
endif
call PolledWait(0.3)
call RemoveUnit(d)
call PauseUnit(c,false)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Rasengan initializer init
globals
private constant integer SPELLID = 'A00N'
private constant integer SPELLID2 = 'A00O'
private constant integer BUFFID = 'B001'
private constant integer ICENOVA = 'h00S'
private constant integer NARUTO = 'h01B'
private constant integer BLUEBOMB = 'h01C'
private constant integer STONEDARK = 'h02E'
private constant integer STONE = 'h0CA'
private constant integer DT = 'h0CC'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT3 = "war3mapImported\\NewDirtEXNofire.mdx.mdx"
private constant string EFFECT4 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\NewDirtEXNofire.mdx.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private function AbilityCheck takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
if GetUnitAbilityLevel(c,BUFFID) <= 0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,false)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local integer i = 0
local real x = PolarX(GetUnitX(c),120,GetUnitFacing(c) - 90)
local real y = PolarY(GetUnitY(c),120,GetUnitFacing(c) - 90)
local timer z
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),NARUTO,x,y,GetUnitFacing(c) + 90)
call SetUnitAnimation(bj_lastCreatedUnit,"spell three")
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.6)
if GetUnitTypeId(c) != KAKASHI then
set z = NewTimer()
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,true)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call TimerStart(z,0.05,true,function AbilityCheck)
endif
set c = null
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function ActionsAttacked takes nothing returns nothing
local unit c = GetAttacker()
local unit t = GetTriggerUnit()
local real x
local real y
local real r = (GetUnitAbilityLevel(c,SPELLID) + 2) * GetHeroStr(c,true)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Rasengan.mp3",GetUnitX(t),GetUnitY(t))
endif
call UnitRemoveAbility(c,BUFFID)
call IssueImmediateOrder(c,"stop")
call SetUnitAnimation(c,"spell throw")
call TriggerSleepAction(0.)
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),1.0,DT,1,255,255,255,255)
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call SlideUnitAngle(t,26,0.6,a,EFFECT)
set c = null
set t = null
endfunction
private function ConditionsAttacked takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker())) == true and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE) == false and GetUnitAbilityLevel(GetAttacker(),BUFFID) >= 1
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger t2 = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call TriggerRegisterPlayerUnitEvent(t2,Player(index),EVENT_PLAYER_UNIT_ATTACKED,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
call TriggerAddCondition(t2,Condition(function ConditionsAttacked))
call TriggerAddAction(t2,function ActionsAttacked)
set t = null
set t2 = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope NewRasengan initializer init
globals
private constant integer SPELLID = 'A01B'
private constant integer SPELLID2 = 'A00O'
private constant integer BUFFID = 'B008'
private constant integer ICENOVA = 'h005'
private constant integer EXPLODE = 'h01O'
private constant integer BLUEBOMB = 'h01N'
private constant integer DT = 'h01D'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = PolarX(GetUnitX(c),120,GetUnitFacing(c) - 90)
local real y = PolarY(GetUnitY(c),120,GetUnitFacing(c) - 90)
set c = null
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function ActionsAttacked takes nothing returns nothing
local unit c = GetAttacker()
local unit t = GetTriggerUnit()
local real x
local real y
local real r = (GetUnitAbilityLevel(c,SPELLID) + 3) * GetHeroStr(c,true)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
call UnitRemoveAbility(c,BUFFID)
call IssueImmediateOrder(c,"stop")
call SetUnitAnimation(c,"spell four")
call TriggerSleepAction(0.)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2,ICENOVA,1,255,255,0,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),0,5,BLUEBOMB,1,255,255,0,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),120,5,BLUEBOMB,1,255,255,0,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),240,5,BLUEBOMB,1,255,255,0,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),120,5,EXPLODE,1,255,255,0,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),240,5,EXPLODE,1,255,255,0,255)
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call SlideUnitAngle(t,26,0.6,a,EFFECT)
set c = null
set t = null
endfunction
private function ConditionsAttacked takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker())) == true and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE) == false and GetUnitAbilityLevel(GetAttacker(),BUFFID) >= 1
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger t2 = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call TriggerRegisterPlayerUnitEvent(t2,Player(index),EVENT_PLAYER_UNIT_ATTACKED,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
call TriggerAddCondition(t2,Condition(function ConditionsAttacked))
call TriggerAddAction(t2,function ActionsAttacked)
set t = null
set t2 = null
endfunction
endscope
//TESH.scrollpos=66
//TESH.alwaysfold=0
scope SenJutsuRasengan initializer init
globals
private constant integer SPELLID = 'A00O'
private constant integer FLY = 'Amrf'
private constant integer BUFFID = 'B001'
private constant integer ICENOVA = 'h00S'
private constant integer NARUTO = 'h01B'
private constant integer BLUEBOMB = 'h01C'
private constant integer BLINKBIG = 'h011'
private constant integer DUST = 'h02C'
private constant integer DT = 'h01D'
private constant real RADIUS = 350
private constant string RASEN = "war3mapImported\\lxw jhxcom_2000.mdx"
private constant string EFFECT2 = "war3mapImported\\SkyNeutralBuildingExplosion.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local real r = (GetUnitAbilityLevel(c,'A01C') + 2) * GetHeroStr(c,true)
local effect array e
call SoundStart("war3mapImported\\Senjutsu.mp3",x,y)
set e[1] = AddSpecialEffectTarget(RASEN,c,"hand,rgiht")
set e[2] = AddSpecialEffectTarget(RASEN,c,"hand,left")
call UnitRemoveAbility(c,BUFFID)
call UnitAddAbility(c,FLY)
call UnitRemoveAbility(c,FLY)
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
if SLOWMODE == false then
call SetUnitFlyHeight(c,1000,3000)
call TriggerSleepAction(0.35)
call ShowUnit(c,false)
call TriggerSleepAction(0.5)
call SoundStart("war3mapImported\\Rasengan.mp3",GetUnitX(c),GetUnitY(c))
call ShowUnit(c,true)
call SetUnitFlyHeight(c,0,3000)
call SetUnitPosition(c,x,y)
call TriggerSleepAction(0.1)
call SetUnitAnimation(c,"spell throw")
call TriggerSleepAction(0.2)
else
call SetUnitFlyHeight(c,1000,600)
call TriggerSleepAction(1.65)
call ShowUnit(c,false)
call TriggerSleepAction(0.5)
call ShowUnit(c,true)
call SetUnitFlyHeight(c,0,600)
call SetUnitPosition(c,x,y)
call TriggerSleepAction(1.65)
call SoundStart("war3mapImported\\Rasengan.mp3",GetUnitX(c),GetUnitY(c))
call SetUnitAnimation(c,"spell throw")
call TriggerSleepAction(0.2)
endif
call DestroyEffect(AddSpecialEffect(EFFECT5,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
call AreaDamage(c,r,x,y,RADIUS,NINJUTSU_DAMAGE)
call EffectUnitColor(c,x,y,GetUnitFacing(c),3,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),3,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),3,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),3,BLINKBIG,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),1.2,DT,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),3.5,DUST,1,255,255,255,40)
call DestroyEffect(e[1])
call DestroyEffect(e[2])
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
set c = null
set e[1] = null
set e[2] = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Kagebunshin initializer init
globals
private constant integer SPELLID = 'A00P'
private constant integer SPELLID2 = 'A00R'
private constant integer SPELLID3 = 'A01G'
private constant integer SPELLID4 = 'A01I'
private constant integer SPELLID5 = 'A00S'
private constant integer BUFFID = 'B002'
endglobals
private function AbilityCheck takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local group g
local unit v
local integer count = 0
if HaveSavedInteger(TENSA,GetHandleId(c),0) == false then
set g = CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),20000,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitAlly(v,GetOwningPlayer(c)) == true and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(v,BUFFID) > 0 and IsUnitIllusion(v) == true then
set count = count + 1
endif
call GroupRemoveUnit(g,v)
endloop
call DestroyGroup(g)
if count <= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID5,false)
endif
if count <= 0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,false)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
else
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set c = null
set g = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local integer i = 0
local real x = PolarX(GetUnitX(c),120,GetUnitFacing(c) - 90)
local real y = PolarY(GetUnitY(c),120,GetUnitFacing(c) - 90)
local timer z
call SoundStart("war3mapImported\\KageBunshin.mp3",GetUnitX(c),GetUnitY(c))
if GetUnitAbilityLevel(c,SPELLID4) >= 1 or GetUnitAbilityLevel(c,SPELLID3) >= 1 then
call PolledWait(0.1)
set z = NewTimer()
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
if GetUnitAbilityLevel(c,SPELLID4) >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID5,true)
endif
if GetUnitAbilityLevel(c,SPELLID3) >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,true)
endif
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call TimerStart(z,0.05,true,function AbilityCheck)
endif
set c = null
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope OodamaKagebunshin initializer init
globals
private constant real DISTANCE = 18
private constant real RADIUS = 450
private constant integer SPELLID = 'A00R'
private constant integer OODAMABALL = 'h077'
private constant integer BUFFID = 'B002'
private constant integer ICENOVA = 'h00S'
private constant integer NARUTO = 'h01B'
private constant integer BLUEBOMB = 'h01C'
private constant integer BLINKBIG = 'h011'
private constant integer DT = 'h01D'
private constant integer FIRAGA = 'h00Z'
private constant integer DUST = 'h02C'
private constant string RASEN = "war3mapImported\\Rasengan.mdx"
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\SkyNeutralBuildingExplosion.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
endglobals
private struct data
unit c
unit d
unit t
real r
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4.,FIRAGA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.3,DT,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call KillUnit(c)
call ReleaseTimer(z)
call .destroy()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x
local real y
local real g = DISTANCE
if SLOWMODE == false then
set x = PolarX(GetUnitX(c),DISTANCE,a)
set y = PolarY(GetUnitY(c),DISTANCE,a)
else
set g = DISTANCE * 0.3
set x = PolarX(GetUnitX(c),g,a)
set y = PolarY(GetUnitY(c),g,a)
endif
call SetUnitPosition(c,x,y)
call SetUnitPosition(d,x,y)
call SetUnitFacing(c,a)
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 120 then
call SoundStart("war3mapImported\\SenpouOdama.mp3",GetUnitX(t),GetUnitY(t))
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call AreaDamageTimer(c,r,x,y,RADIUS,NINJUTSU_DAMAGE)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.5,DUST,1,255,255,255,40)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.3,DT,1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call RemoveUnit(d)
call TimerStart(z,0.5,false,function data.FinalTimer)
endif
endmethod
static method TimerWait takes nothing returns nothing
local timer z = GetExpiredTimer()
call TimerStart(z,0.02,true,function data.TimerExpired)
endmethod
static method create takes unit caster, unit target, real damage returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .t = target
set .r = damage
call PauseUnit(.c,true)
call SetUnitInvulnerable(.c,true)
call SetUnitPathing(.c,false)
call SetUnitAnimation(.c,"stand alternate")
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.5,DUST,1,255,255,255,40)
set .d = CreateUnit(GetOwningPlayer(.c),OODAMABALL,GetUnitX(.c),GetUnitY(.c),Angle(GetUnitX(.c),GetUnitY(.c),GetUnitX(.t),GetUnitY(.t)))
call SetTimerData(z,this)
if SLOWMODE == false then
call TimerStart(z,1.75,false,function data.TimerWait)
else
call TimerStart(z,5,false,function data.TimerWait)
endif
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetUnitX(c)
local real y = GetUnitY(c)
local group g = NewGroup()
local group bg
local unit b
local unit v
local integer count = 0
local integer number
local real r = GetUnitAbilityLevel(c,'A00Q') * 50
call GroupEnumUnitsInRange(g,x,y,20000,null)
set bg = NewGroup()
call GroupEnumUnitsInRange(bg,GetUnitX(c),GetUnitY(c),1000,Condition(function PickHero))
set number = CountUnitsInGroup(bg)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitAlly(v,GetOwningPlayer(c)) == true and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(v,BUFFID) > 0 and IsUnitIllusion(v) == true then
if number == 1 then
set b = FirstOfGroup(bg)
call SetUnitFacing(v,Angle(GetUnitX(v),GetUnitY(v),GetUnitX(b),GetUnitY(b)))
if Distance(GetUnitX(v),GetUnitY(v),GetUnitX(b),GetUnitY(b)) <= 1200 then
call data.create(v,b,r)
endif
elseif number >= 2 then
set b = FirstOfGroup(bg)
call SetUnitFacing(v,Angle(GetUnitX(v),GetUnitY(v),GetUnitX(b),GetUnitY(b)))
if Distance(GetUnitX(v),GetUnitY(v),GetUnitX(b),GetUnitY(b)) <= 1200 then
call data.create(v,b,r)
endif
call GroupRemoveUnit(bg,b)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
call ReleaseGroup(bg)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=33
//TESH.alwaysfold=0
scope Rasenkyuugan initializer init
globals
private constant integer SPELLID = 'A01E'
private constant integer BALL = 'h01P'
private constant integer NARUTO = 'h01Q'
private constant real RADIUS = 450
private constant string EFFECT = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
private constant integer ICENOVA = 'h005'
private constant integer EXPLODE = 'h01O'
private constant integer BLUEBOMB = 'h01N'
private constant integer DT = 'h01D'
private constant string EFFECT1 = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Boolean takes nothing returns boolean
return true
endfunction
private function TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit d = LoadUnitHandle(HS,GetHandleId(z),1)
local group g
local group use = LoadGroupHandle(HS,GetHandleId(z),2)
local integer count = LoadInteger(HS,GetHandleId(z),1)
local real time = LoadReal(HS,GetHandleId(z),0)
local unit v
local real a
local real x
local real y
local real r = (GetUnitAbilityLevel(c,SPELLID) * 30) / 50
set time = time - 0.02
set count = count + 1
if count >= 25 then
set count = 0
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(d),GetUnitY(d)))
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),0,8,BLUEBOMB,1,255,255,0,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),120,8,BLUEBOMB,1,255,255,0,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),240,8,BLUEBOMB,1,255,255,0,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),0,8,BLUEBOMB,1,255,255,0,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),120,8,BLUEBOMB,1,255,255,0,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),240,8,BLUEBOMB,1,255,255,0,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),120,5,EXPLODE,1,255,255,0,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),240,5,EXPLODE,1,255,255,0,255)
endif
call SaveReal(HS,GetHandleId(z),0,time)
call SaveInteger(HS,GetHandleId(z),1,count)
if time > 0 then
set g = NewGroup()
call GroupEnumUnitsInRange(g,GetUnitX(d),GetUnitY(d),RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set a = Angle(GetUnitX(v),GetUnitY(v),GetUnitX(d),GetUnitY(d))
set x = PolarX(GetUnitX(v),15,a)
set y = PolarY(GetUnitY(v),15,a)
call SetUnitPosition(v,x,y)
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
if IsUnitInGroup(v,use) == false then
call GroupAddUnit(use,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
else
loop
set v = FirstOfGroup(use)
exitwhen v == null
set a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(v),GetUnitY(v))
call SlideUnitAngle(v,25,0.9,a,EFFECT1)
call GroupRemoveUnit(use,v)
endloop
call RemoveUnit(d)
call ReleaseGroup(use)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set c = null
set d = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x
local real y
local group g = NewGroup()
local timer z = NewTimer()
local unit v
local real a
local unit d
call SaveGroupHandle(HS,GetHandleId(z),2,NewGroup())
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call SetUnitAnimation(c,"spell three")
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),1000,Filter(function PickHero))
loop
set v = FirstOfGroup(g)
exitwhen v == null
set a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(v),GetUnitY(v))
set x = PolarX(GetUnitX(v),150,a)
set y = PolarY(GetUnitY(v),150,a)
call DestroyEffect(AddSpecialEffect("war3mapImported\\shadowclone.mdx",x,y))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),NARUTO,x,y,a + 180)
call SetUnitAnimation(bj_lastCreatedUnit,"spell four")
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(v),GetUnitY(v)))
call SlideUnitToUnit(c,v,1.5)
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set d = CreateUnit(GetOwningPlayer(c),BALL,GetUnitX(c),GetUnitY(c),0)
call IncreaseScale(d,2,0.0266,1.5)
call PolledWait(1.5)
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,d)
call SaveReal(HS,GetHandleId(z),0,4)
call SaveInteger(HS,GetHandleId(z),1,0)
call TimerStart(z,0.02,true,function TimerExpired)
set c = null
set d = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=75
//TESH.alwaysfold=0
scope OodamaRasengan initializer init
globals
private constant real DISTANCE = 18
private constant real RADIUS = 450
private constant integer SPELLID = 'A00Q'
private constant integer OODAMABALL = 'h077'
private constant integer ICENOVA = 'h00S'
private constant integer NARUTO = 'h01B'
private constant integer BLUEBOMB = 'h01C'
private constant integer BLINKBIG = 'h011'
private constant integer DT = 'h01D'
private constant integer FIRAGA = 'h00Z'
private constant string RASEN = "war3mapImported\\Rasengan.mdx"
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\SkyNeutralBuildingExplosion.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
endglobals
private struct data
unit c
unit d
unit t
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4.,FIRAGA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.3,DT,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call ReleaseTimer(z)
call .destroy()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
call SetUnitPosition(c,x,y)
call SetUnitPosition(d,x,y)
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 120 then
call PauseUnit(.c,false)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(.c,true)
call SoundStart("war3mapImported\\SenpouOdama.mp3",GetUnitX(t),GetUnitY(t))
call DustWave(0.4,0.12,1.2,20,GetUnitX(t),GetUnitY(t),155,255,255,30)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.3,DT,1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call AreaDamageTimer(c,r,x,y,RADIUS,NINJUTSU_DAMAGE)
call RemoveUnit(d)
call TimerStart(z,0.5,false,function data.FinalTimer)
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .t = target
call PauseUnit(.c,true)
call SetUnitInvulnerable(c,true)
call SetUnitPathing(.c,false)
call SetUnitAnimation(.c,"stand alternate")
call DustWave(0.4,0.15,0.8,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
set .d = CreateUnit(GetOwningPlayer(.c),OODAMABALL,GetUnitX(.c),GetUnitY(.c),Angle(GetUnitX(.c),GetUnitY(.c),GetUnitX(.t),GetUnitY(.t)))
call IncreaseScale(.d,0.05,0.01266,1.5)
call PolledWait(1.75)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=30
//TESH.alwaysfold=0
scope WakuseiRasengan initializer init
globals
private constant real DISTANCE = 18
private constant real RADIUS = 650
private constant integer SPELLID = 'A01F'
private constant integer OODAMABALL = 'h01R'
private constant string EFFECT = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
private constant integer ICENOVA = 'h005'
private constant integer EXPLODE = 'h01O'
private constant integer BLUEBOMB = 'h01N'
private constant integer TORNADO = 'h01S'
private constant integer FIRAGA = 'h01T'
private constant string RASEN = "war3mapImported\\Rasengan.mdx"
private constant string EFFECT1 = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private struct data
unit c
unit d
unit t
integer cal = 0
real time = 4
group used
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local group g
local unit v
local real x
local real y
local real a
local real dist
local real r = (GetUnitAbilityLevel(c,SPELLID) * 70) / 50
set cal = cal + 1
if cal >= 12 then
set cal = 0
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),GetUnitFacing(c),3,FIRAGA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),GetUnitFacing(c),5,EXPLODE,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
endif
set time = time - 0.02
if time > 0 then
set g = NewGroup()
call GroupEnumUnitsInRange(g,GetUnitX(d),GetUnitY(d),RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set dist = Distance(GetUnitX(v),GetUnitY(v),GetUnitX(d),GetUnitY(d))
set a = Angle(GetUnitX(v),GetUnitY(v),GetUnitX(d),GetUnitY(d))
set x = PolarX(GetUnitX(d),dist,a - 6)
set y = PolarY(GetUnitY(d),dist,a - 6)
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call SetUnitPosition(v,x,y)
if IsUnitInGroup(v,used) == false then
call GroupAddUnit(used,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
else
loop
set v = FirstOfGroup(used)
exitwhen v == null
set a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(v),GetUnitY(v))
call SlideUnitAngle(v,25,0.9,a,EFFECT1)
call GroupRemoveUnit(used,v)
endloop
call RemoveUnit(d)
call ReleaseGroup(used)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = 50
call SetUnitPosition(c,x,y)
call SetUnitPosition(d,x,y)
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 120 then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call DustWave(0.4,0.12,1.2,20,GetUnitX(t),GetUnitY(t),155,255,255,30)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,EXPLODE,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),3,TORNADO,4,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call IncreaseScale(d,2,0.02,4)
call TimerStart(z,0.03,true,function data.FinalTimer)
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .t = target
set .used = NewGroup()
call PauseUnit(.c,true)
call SetUnitInvulnerable(.c,true)
call SetUnitPathing(.c,false)
call SetUnitAnimation(.c,"stand alternate")
call DustWave(0.4,0.15,0.8,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
set .d = CreateUnit(GetOwningPlayer(.c),OODAMABALL,GetUnitX(.c),GetUnitY(.c),Angle(GetUnitX(.c),GetUnitY(.c),GetUnitX(.t),GetUnitY(.t)))
call PolledWait(0.5)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=135
//TESH.alwaysfold=0
scope MiniRasenShuriken initializer init
globals
private constant real DISTANCE = 20
private constant real RADIUS = 220
private constant real MAXDIST = 1800
private constant integer BALL = 'h01M'
private constant integer ALMAGEST = 'h01A'
private constant integer RASENCIRCLE = 'h01V'
private constant integer RASENWAVE = 'h005'
private constant integer RASENBLAST = 'h01U'
private constant integer RASENBLUE = 'h01O'
private constant integer SPELLID = 'A01H'
private constant string EFFECT1 = "war3mapImported\\fdlxw jhxcom_2000.mdx"
private constant string EFFECT2 = "war3mapImported\\rasenshuriken2.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
private hashtable RASEN = InitHashtable()
endglobals
private struct data
unit c
unit d
unit e
real a
real FirstX
real FirstY
group go
real time
real scale = 2.0
real scaleNew = 0.8
integer cal = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method ShurikenBlast takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local integer i = 0
local group g = NewGroup()
local unit v
local real r = (GetUnitAbilityLevel(c,SPELLID) * 180) / 50
set time = time - 0.02
call GroupEnumUnitsInRange(g,GetUnitX(d),GetUnitY(d),450,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupAddGroup(go,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call SetUnitPathing(v,false)
call PauseUnit(v,true)
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time >= 4 then
set scale = scale + 0.01
set scaleNew = scaleNew + 0.021
set cal = cal + 1
if cal >= 13 then
set cal = 0
call DustWave(0.4,0.10,1.2,20,GetUnitX(d),GetUnitY(d),155,255,255,30)
endif
call SetUnitScale(d,scaleNew,scaleNew,scaleNew)
loop
exitwhen i >= 9
call SetUnitScale(LoadUnitHandle(RASEN,GetHandleId(z),i),scale,scale,scale)
set i = i + 1
endloop
elseif time > 0 then
set cal = cal + 1
if cal >= 18 then
set cal = 0
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),0,3,RASENWAVE,1,255,255,255,155)
call DustWave(0.4,0.10,1.3,20,GetUnitX(d),GetUnitY(d),155,255,255,30)
endif
if time == 3.98 then
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),0,1,RASENBLAST,3.5,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),0,2.25,ALMAGEST,4,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),0,4,RASENBLUE,1,255,255,255,255)
loop
exitwhen i >= 9
call SetUnitVertexColor(LoadUnitHandle(RASEN,GetHandleId(z),i),255,255,255,250)
set i = i + 1
endloop
endif
else
loop
set v = FirstOfGroup(go)
exitwhen v == null
call SetUnitPathing(v,true)
call PauseUnit(v,false)
call GroupRemoveUnit(go,v)
endloop
loop
exitwhen i >= 9
call RemoveUnit(LoadUnitHandle(RASEN,GetHandleId(z),i))
set i = i + 1
endloop
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call FlushChildHashtable(RASEN,GetHandleId(z))
call .destroy()
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = 50
local integer count = 0
local integer i = 0
set time = time - 0.02
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(d,x,y)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupAddGroup(go,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
call SetUnitPathing(v,false)
call SetUnitPosition(v,x,y)
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
set time = 7
loop
exitwhen i >= 9
call SaveUnitHandle(RASEN,GetHandleId(z),i,CreateUnit(GetOwningPlayer(c),RASENCIRCLE,GetUnitX(d),GetUnitY(d),i * 40))
call SetUnitVertexColor(LoadUnitHandle(RASEN,GetHandleId(z),i),255,255,255,50)
set i = i + 1
endloop
call TimerStart(z,0.02,true,function data.ShurikenBlast)
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .go = NewGroup()
set .time = 2
set .c = caster
set .a = angle
set .d = CreateUnit(GetOwningPlayer(.c),BALL,GetUnitX(.c),GetUnitY(.c),.a)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
call SoundStart("war3mapImported\\RasenShurikenThrow.mp3",GetUnitX(c),GetUnitY(c))
call data.create(c,a)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=48
//TESH.alwaysfold=0
scope RasenShuriken initializer init
globals
private constant real DISTANCE = 20
private constant real RADIUS = 270
private constant real MAXDIST = 1800
private constant integer BALL = 'h014'
private constant integer BALL2 = 'h015'
private constant integer ALMAGEST = 'h01A'
private constant integer RASENCIRCLE = 'h016'
private constant integer RASENWAVE = 'h019'
private constant integer RASENBLAST = 'h017'
private constant integer RASENBLUE = 'h018'
private constant integer SPELLID = 'A00L'
private constant integer EFFECTID = 'A00M'
private constant integer NARUTO = 'h01B'
private constant string EFFECT1 = "war3mapImported\\NewRasenshuriken.mdx"
private constant string EFFECT2 = "war3mapImported\\rasenshuriken4.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
private constant integer DUST = 'h02C'
private hashtable RASEN = InitHashtable()
endglobals
private struct data
unit c
unit d
unit e
unit array f[9]
real a
real FirstX
real FirstY
group go
real time
real scale = 1.7
real scaleNew = 1.8
integer cal = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method ShurikenBlast takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local integer i = 1
local group g = NewGroup()
local unit v
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 100) + 50) / 25
set time = time - 0.04
call GroupEnumUnitsInRange(g,GetUnitX(d),GetUnitY(d),450,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupAddGroup(go,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if Distance(GetUnitX(d),GetUnitY(d),GetUnitX(v),GetUnitY(v)) <= 550 then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call PauseUnit(v,true)
else
call SetUnitPathing(v,true)
call PauseUnit(v,false)
call GroupRemoveUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time >= 4 then
set scale = scale + 0.018
set scaleNew = scaleNew + 0.018
call SetUnitScale(e,scaleNew,scaleNew,scaleNew)
loop
exitwhen i > 9
call SetUnitScale(f[i],scale,scale,scale)
set i = i + 1
endloop
elseif time > 0 then
set cal = cal + 1
if cal >= 4 then
set cal = 0
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),GetUnitFacing(c),3.5,DUST,1,255,255,255,5)
endif
if time == 3.96 then
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),0,1,RASENBLAST,3.5,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),0,2.25,ALMAGEST,4,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),0,2,RASENBLUE,1,255,255,255,255)
loop
exitwhen i > 9
call SetUnitVertexColor(f[i],255,255,255,250)
set i = i + 1
endloop
endif
else
loop
set v = FirstOfGroup(go)
exitwhen v == null
call SetUnitPathing(v,true)
call PauseUnit(v,false)
call GroupRemoveUnit(go,v)
endloop
set i = 1
loop
exitwhen i > 9
call RemoveUnit(f[i])
set i = i + 1
endloop
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseGroup(go)
call ReleaseTimer(z)
call FlushChildHashtable(RASEN,GetHandleId(z))
call .destroy()
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = 50
local integer count = 0
local integer i = 1
set time = time - 0.02
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(d,x,y)
call SetUnitPosition(e,x,y)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupAddGroup(go,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
call SetUnitPathing(v,false)
call SetUnitPosition(v,x,y)
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
set time = 8
loop
exitwhen i > 9
set f[i] = CreateUnit(GetOwningPlayer(c),RASENCIRCLE,GetUnitX(d),GetUnitY(d),i * 40)
call SetUnitVertexColor(f[i],255,255,255,100)
call SoundStart("war3mapImported\\RasenShurikenThrow.mp3",GetUnitX(c),GetUnitY(c))
set i = i + 1
endloop
call TimerStart(z,0.04,true,function data.ShurikenBlast)
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .go = NewGroup()
set .time = 2
set .c = caster
set .a = angle
set .d = CreateUnit(GetOwningPlayer(.c),DUMMY,GetUnitX(.c),GetUnitY(.c),.a)
set .e = CreateUnit(GetOwningPlayer(.c),BALL2,GetUnitX(.c),GetUnitY(.c),.a)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
local effect array e
local real x = PolarX(GetUnitX(c),120,GetUnitFacing(c) - 90)
local real y = PolarY(GetUnitY(c),120,GetUnitFacing(c) - 90)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),NARUTO,x,y,GetUnitFacing(c) + 90)
call SetUnitAnimation(bj_lastCreatedUnit,"spell three")
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1.5)
call PauseUnit(c,true)
call SetUnitAnimation(c,"spell two")
call SoundStart("war3mapImported\\RasenShurikenEff.mp3",GetUnitX(c),GetUnitY(c))
set e[1] = AddSpecialEffectTarget(EFFECT1,c,"hand,right")
set e[2] = AddSpecialEffectTarget(EFFECT2,c,"hand,right")
call TriggerSleepAction(0.7)
call AddUnitAnimationProperties(c,"alternate",true)
call TriggerSleepAction(0.1)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),3.5,DUST,1,255,255,255,25)
call TriggerSleepAction(0.8)
call AddUnitAnimationProperties(c,"alternate",false)
call SetUnitAnimation(c,"spell throw")
call TriggerSleepAction(0.3)
call SoundStart("war3mapImported\\RasenShurikenThrow.mp3",GetUnitX(c),GetUnitY(c))
call DestroyEffect(e[1])
call DestroyEffect(e[2])
call PauseUnit(c,false)
call data.create(c,a)
set c = null
set e[1] = null
set e[2] = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=55
//TESH.alwaysfold=0
scope FakeRasenShuriken initializer init
globals
private constant real DISTANCE = 20
private constant real RADIUS = 200
private constant real MAXDIST = 1800
private constant integer BUFFID = 'B002'
private constant integer BALL = 'h014'
private constant integer BALL2 = 'h015'
private constant integer ALMAGEST = 'h01A'
private constant integer RASENCIRCLE = 'h016'
private constant integer RASENWAVE = 'h019'
private constant integer RASENBLAST = 'h017'
private constant integer RASENBLUE = 'h018'
private constant integer SPELLID = 'A00S'
private constant string EFFECT1 = "war3mapImported\\fdlxw jhxcom_2000.mdx"
private constant string EFFECT2 = "war3mapImported\\rasenshuriken2.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private struct data
unit c
unit d
unit e
real time
unit b
real a
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local integer count = 0
local integer i = 0
set time = time - 0.02
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(d,x,y)
call SetUnitPosition(e,x,y)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitType(v,UNIT_TYPE_HERO) then
set count = count + 1
exitwhen true
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if count >= 1 then
call ShowUnit(b,true)
call StunUnit(b,v,5)
call SetUnitPosition(b,GetUnitX(d),GetUnitY(d))
call PauseUnit(b,false)
call SetUnitAnimation(b,"attack")
call SetUnitInvulnerable(b,false)
call DestroyEffect(AddSpecialEffect("war3mapImported\\shadowclone.mdx",GetUnitX(b),GetUnitY(b)))
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseTimer(z)
call .destroy()
else
if time <= 0 then
call ShowUnit(b,true)
call SetUnitPosition(b,GetUnitX(d),GetUnitY(d))
call PauseUnit(b,false)
call SetUnitAnimation(b,"stand")
call SetUnitInvulnerable(b,false)
call DestroyEffect(AddSpecialEffect("war3mapImported\\shadowclone.mdx",GetUnitX(b),GetUnitY(b)))
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseTimer(z)
call .destroy()
endif
endif
endmethod
static method create takes unit caster, real angle, unit show returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .time = 2
set .c = caster
set .a = angle
set .b = show
set .d = CreateUnit(GetOwningPlayer(.c),BALL,GetUnitX(.c),GetUnitY(.c),.a)
set .e = CreateUnit(GetOwningPlayer(.c),BALL2,GetUnitX(.c),GetUnitY(.c),.a)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local real xx
local real yy
local group g = NewGroup()
local real a
local unit array b
local unit v
local integer count = 0
local effect array e
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),20000,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitAlly(v,GetOwningPlayer(c)) == true and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(v,BUFFID) > 0 and IsUnitIllusion(v) == true and IsUnitPaused(v) == false then
set count = count + 1
set b[count] = v
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if count >= 2 then
set xx = PolarX(GetUnitX(b[1]),120,GetUnitFacing(b[1]) - 90)
set yy = PolarY(GetUnitY(b[1]),120,GetUnitFacing(b[1]) - 90)
set a = Angle(GetUnitX(b[1]),GetUnitY(b[1]),x,y)
call SetUnitFacing(b[1],a)
call SetUnitPosition(b[2],xx,yy)
call SetUnitFacing(b[2],GetUnitFacing(b[1]) + 90)
call PauseUnit(b[1],true)
call PauseUnit(b[2],true)
call SetUnitInvulnerable(b[1],true)
call SetUnitInvulnerable(b[2],true)
call SetUnitAnimation(b[1],"spell two")
call SetUnitAnimation(b[2],"spell three")
call SoundStart("war3mapImported\\RasenShurikenEff.mp3",GetUnitX(c),GetUnitY(c))
call PolledWait(0.5)
call ShowUnit(b[2],false)
call DestroyEffect(AddSpecialEffect("war3mapImported\\shadowclone.mdx",GetUnitX(b[2]),GetUnitY(b[2])))
set e[1] = AddSpecialEffectTarget(EFFECT1,b[1],"hand,right")
set e[2] = AddSpecialEffectTarget(EFFECT2,b[1],"hand,right")
call PolledWait(0.5)
call SetUnitAnimation(b[1],"stand alternate")
call DustWave(1,0.16,0.7,20,GetUnitX(b[1]),GetUnitY(b[1]),155,255,255,30)
call PolledWait(0.8)
call SetUnitAnimation(b[1],"spell throw")
call PolledWait(0.4)
call SoundStart("war3mapImported\\RasenShurikenThrow.mp3",GetUnitX(c),GetUnitY(c))
call DestroyEffect(e[1])
call DestroyEffect(e[2])
call data.create(b[1],a,b[2])
call PauseUnit(b[1],false)
call SetUnitInvulnerable(b[1],false)
set b[1] = null
set b[2] = null
set e[1] = null
set e[2] = null
endif
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=87
//TESH.alwaysfold=0
scope KyuubiChakra initializer init
globals
private constant integer SPELLID = 'A01A'
private constant integer ICENOVA = 'h00S'
private constant integer EXPLODE = 'h01O'
private constant integer BLUEBOMB = 'h01N'
private constant integer DT = 'h01D'
private constant integer SPELLDASH = 'A00W'
private constant string EFFECT2 = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT5 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function ExpiredTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local trigger t = GetTriggeringTrigger()
local unit c = LoadUnitHandle(TENSA,GetHandleId(z),0)
if GetWidgetLife(c) > 0.45 then
if GetUnitAbilityLevel(c,'A01C') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01B',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00N',true)
endif
if GetUnitAbilityLevel(c,'A01D') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01E',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00P',true)
endif
if GetUnitAbilityLevel(c,'A01I') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01H',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00L',true)
endif
if GetUnitAbilityLevel(c,'A01G') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01F',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00Q',true)
endif
call DestroyTrigger(t)
call RemoveSavedInteger(TENSA,GetHandleId(c),0)
call ReleaseTimer(z)
call FlushChildHashtable(TENSA,GetHandleId(z))
endif
set t = null
set c = null
endfunction
private function ReturnFormDeath takes nothing returns nothing
local unit c = GetTriggerUnit()
local timer z = NewTimer()
call SaveUnitHandle(TENSA,GetHandleId(z),0,c)
call TimerStart(z,0.05,true,function ExpiredTimer)
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local trigger t
if HaveSavedInteger(TENSA,GetHandleId(c),0) == false then
call SaveInteger(TENSA,GetHandleId(c),0,1)
set t = CreateTrigger()
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function ReturnFormDeath)
call SaveTriggerHandle(TENSA,GetHandleId(c),0,t)
call DustWave(1,0.16,0.7,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(c),GetUnitY(c)))
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),1.2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,3,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,3,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),3,EXPLODE,1,255,255,255,255)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00R',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00S',false)
if GetUnitAbilityLevel(c,'A01C') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00N',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01B',true)
endif
if GetUnitAbilityLevel(c,'A01D') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00P',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01E',true)
endif
if GetUnitAbilityLevel(c,'A01I') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00L',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01H',true)
endif
if GetUnitAbilityLevel(c,'A01G') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00Q',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01F',true)
endif
else
call RemoveSavedInteger(TENSA,GetHandleId(c),0)
call DestroyTrigger(LoadTriggerHandle(TENSA,GetHandleId(c),0))
if GetUnitAbilityLevel(c,'A01C') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01B',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00N',true)
endif
if GetUnitAbilityLevel(c,'A01D') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01E',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00P',true)
endif
if GetUnitAbilityLevel(c,'A01I') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01H',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00L',true)
endif
if GetUnitAbilityLevel(c,'A01G') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01F',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00Q',true)
endif
endif
set t = null
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Clone_Death_Conditions takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit()) == 'h01B' or GetUnitTypeId(GetTriggerUnit()) == 'h01Q'
endfunction
function Trig_Clone_Death_Actions takes nothing returns nothing
call DestroyEffect(AddSpecialEffect("war3mapImported\\shadowclone.mdx",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))
call RemoveUnit(GetTriggerUnit())
endfunction
function InitTrig_Clone_Death takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition(t, Condition( function Trig_Clone_Death_Conditions ) )
call TriggerAddAction(t, function Trig_Clone_Death_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope KatonGoukakyuu initializer init
globals
private constant real DISTANCE = 20
private constant real RADIUS = 220
private constant real MAXDIST = 1600
private constant integer FIREBALL = 'h00L'
private constant integer FIREBALL2 = 'h001'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A00C'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
constant integer KAKASHI = 'H041'
endglobals
private struct data
unit c
unit d
unit e
real a
real time = 1.2
integer cal
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
local unit b
local integer count = 0
set time = time - 0.02
call SetUnitPosition(d,x,y)
call SetUnitPosition(e,x,y)
set cal = cal + 1
if cal >= 1 then
set cal = 0
if GetRandomReal(1,100) <= 40 then
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
elseif GetRandomReal(1,100) <= 70 then
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
else
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
endif
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set count = count + 1
exitwhen true
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if count >= 1 then
call AreaDamageTimer(c,r,GetUnitX(v),GetUnitY(v),350,NINJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(v),GetUnitY(v)))
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseTimer(z)
call .destroy()
else
if time <= 0 then
call AreaDamageTimer(c,r,GetUnitX(d),GetUnitY(d),350,NINJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(d),GetUnitY(d)))
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseTimer(z)
call .destroy()
endif
endif
endmethod
static method Cooldown takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00D',true)
call ReleaseTimer(z)
call .destroy()
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local timer z2
local data this = data.allocate()
set .c = caster
set .a = angle
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),.a)
set .e = CreateUnit(GetOwningPlayer(.c),FIREBALL2,GetUnitX(.c),GetUnitY(.c),.a)
set .cal = 0
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
if GetUnitTypeId(c) != KAKASHI then
set z2 = NewTimer()
call SetTimerData(z2,this)
call TimerStart(z2,20,false,function data.Cooldown)
endif
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Goukakyuu.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=90
//TESH.alwaysfold=0
scope KatonHousenka initializer init
globals
private constant real DISTANCE = 18
private constant real RADIUS = 200
private constant real MAXDIST = 1200
private constant integer FIREBALL = 'h00N'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A00D'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\FlameGroundEX.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private struct data
unit c
unit d
real a
real FirstX
real FirstY
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 20
local unit b
local integer count = 0
call SetUnitPosition(d,x,y)
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set count = count + 1
exitwhen true
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if count >= 1 then
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(v),GetUnitY(v)))
call AreaDamageTimer(c,r,GetUnitX(v),GetUnitY(v),RADIUS,NINJUTSU_DAMAGE)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
else
if Distance(x,y,FirstX,FirstY) <= 50 then
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(d),GetUnitY(d)))
call AreaDamageTimer(c,r,GetUnitX(d),GetUnitY(d),RADIUS,NINJUTSU_DAMAGE)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
endif
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = Angle(GetUnitX(c),GetUnitY(c),targetx,targety)
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),.a)
set .FirstX = targetx
set .FirstY = targety
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Cooldown takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A000',true)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local real xx
local real yy
local integer inn = 0
local timer z
if GetUnitTypeId(c) != KAKASHI then
set z = NewTimer()
call SoundStart("war3mapImported\\Housenka.mp3",GetUnitX(c),GetUnitY(c))
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call TimerStart(z,20,false,function Cooldown)
endif
call PauseUnit(c,true)
loop
exitwhen inn >= 8
set xx = PolarX(x,GetRandomReal(-350,350),GetRandomReal(0,360))
set yy = PolarY(y,GetRandomReal(-350,350),GetRandomReal(0,360))
call data.create(c,xx,yy)
call TriggerSleepAction(0.)
set inn = inn + 1
endloop
call PauseUnit(c,false)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=81
//TESH.alwaysfold=0
scope KatonGouryuuka initializer init
globals
private constant real DISTANCE = 20
private constant real RADIUS = 350
private constant real MAXDIST = 1200
private constant integer FIREBALL = 'h00O'
private constant integer FIREBALL2 = 'h001'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A000'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\FlameGroundEX.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
private constant string EFFECT7 = "war3mapImported\\Slam.mdx"
endglobals
private struct data
unit c
unit d
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = GetUnitAbilityLevel(c,SPELLID) * 30
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(d),GetUnitY(d)))
call DustWave(1,0.16,0.5,20,GetUnitX(d),GetUnitY(d),255,80,50,40)
call AreaDamageTimer(c,r,GetUnitX(d),GetUnitY(d),RADIUS,NINJUTSU_DAMAGE)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local real a = Angle(GetUnitX(caster),GetUnitY(caster),targetx,targety)
set .c = caster
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),a)
call Jump(.d,1.,targetx,targety,1,0,"","","")
call SetTimerData(z,this)
call TimerStart(z,1.,false,function data.TimerExpired)
return this
endmethod
endstruct
private function Cooldown takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00G',true)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
set c = null
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
local real x
local real y
local integer i = 2
local timer z
if GetUnitTypeId(c) != KAKASHI then
set z = NewTimer()
call SoundStart("war3mapImported\\Gouryuuka.mp3",GetUnitX(c),GetUnitY(c))
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call TimerStart(z,20,false,function Cooldown)
endif
call PauseUnit(c,true)
loop
exitwhen i >= 7
set x = PolarX(GetUnitX(c),i * 200,a)
set y = PolarY(GetUnitY(c),i * 200,a)
call data.create(c,x,y)
call TriggerSleepAction(0.)
set i = i + 1
endloop
call PauseUnit(c,false)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=98
//TESH.alwaysfold=0
scope KatonRyuuka initializer init
globals
private constant real DISTANCE = 30
private constant real RADIUS = 350
private constant real MAXDIST = 1200
private constant integer FIREBALL = 'h00P'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A00G'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
private constant string EFFECT7 = "war3mapImported\\Slam.mdx"
endglobals
private struct data
unit c
unit d
unit t
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local real r = GetUnitAbilityLevel(c,SPELLID) * 120
call SetUnitPosition(d,x,y)
if GetRandomReal(1,100) <= 40 then
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
elseif GetRandomReal(1,100) <= 70 then
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
else
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
endif
call DestroyEffect(AddSpecialEffect(EFFECT7,x,y))
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 50 then
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(t),GetUnitY(t)))
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method Cooldown takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00C',true)
call ReleaseTimer(z)
call .destroy()
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local timer z2
local data this = data.allocate()
set .c = caster
set .t = target
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),Angle(GetUnitX(.c),GetUnitY(.c),GetUnitX(.t),GetUnitY(.t)))
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
if GetUnitTypeId(c) != KAKASHI then
set z2 = NewTimer()
call SetTimerData(z2,this)
call TimerStart(z2,20,false,function data.Cooldown)
endif
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Ryuuka.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Chidori initializer init
globals
private constant integer SPELLID = 'A00H'
private constant integer SPELLID2 = 'A00I'
private constant integer BUFFID = 'B000'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h00R'
private constant integer LIGHTNING2 = 'h00Q'
private constant integer LIGHTNING3 = 'h00T'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
private constant string EFFECT4 = "war3mapImported\\lightning boom2.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private function AbilityCheck takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
if GetUnitAbilityLevel(c,BUFFID) <= 0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,false)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local integer i = 0
local real x
local real y
local timer z
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
loop
exitwhen i >= 12
set x = PolarX(GetUnitX(c),GetRandomReal(100,300),i * 30)
set y = PolarY(GetUnitY(c),GetRandomReal(100,300),i * 30)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
set i = i + 1
endloop
if GetUnitTypeId(c) != KAKASHI then
set z = NewTimer()
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,true)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call TimerStart(z,0.05,true,function AbilityCheck)
endif
set c = null
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function ActionsAttacked takes nothing returns nothing
local unit c = GetAttacker()
local unit t = GetTriggerUnit()
local integer i = 0
local real x
local real y
local real r = (GetUnitAbilityLevel(c,SPELLID) + 2) * GetHeroAgi(c,true)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Chidori.mp3",GetUnitX(t),GetUnitY(t))
endif
call UnitRemoveAbility(c,BUFFID)
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
loop
exitwhen i >= 12
set x = PolarX(GetUnitX(t),GetRandomReal(100,300),i * 30)
set y = PolarY(GetUnitY(t),GetRandomReal(100,300),i * 30)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
set i = i + 1
endloop
call AreaDamageTimer(c,r,GetUnitX(t),GetUnitY(t),300,NINJUTSU_DAMAGE)
call StunUnit(c,t,3)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),3,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,LIGHTNING,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.5,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5,LIGHTNING3,1,255,255,255,255)
set c = null
set t = null
endfunction
private function ConditionsAttacked takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker())) == true and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE) == false and GetUnitAbilityLevel(GetAttacker(),BUFFID) >= 1
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger t2 = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call TriggerRegisterPlayerUnitEvent(t2,Player(index),EVENT_PLAYER_UNIT_ATTACKED,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
call TriggerAddCondition(t2,Condition(function ConditionsAttacked))
call TriggerAddAction(t2,function ActionsAttacked)
set t = null
set t2 = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope ChidoriJutsu initializer init
globals
private constant integer SPELLID = 'A00I'
private constant integer BUFFID = 'B000'
private constant real MAXDIST = 1100
private constant integer BALLID = 'h00U'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h00R'
private constant integer LIGHTNING2 = 'h00Q'
private constant integer LIGHTNING3 = 'h00T'
private constant integer LIGHTNING4 = 'h00V'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
private constant string EFFECT4 = "war3mapImported\\lightning boom2.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private hashtable CHIDORI = InitHashtable()
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit d = LoadUnitHandle(HS,GetHandleId(z),2)
call RemoveUnit(d)
call PauseUnit(c,false)
call UnitRemoveAbility(c,BUFFID)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
set c = null
set d = null
endfunction
private function ChidoriEso takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local unit d = LoadUnitHandle(HS,GetHandleId(z),2)
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(d),20,a)
local real y = PolarY(GetUnitY(d),20,a)
local real xx = LoadReal(HS,GetHandleId(z),0)
local real yy = LoadReal(HS,GetHandleId(z),1)
local integer count = LoadInteger(HS,GetHandleId(z),2)
local integer i = 0
local real r = (GetUnitAbilityLevel(c,'A00H') + 2) * GetHeroAgi(c,true)
call SaveUnitHandle(CHIDORI,GetHandleId(z),count,CreateUnit(GetOwningPlayer(c),BALLID,x,y,a))
call SetUnitPosition(d,x,y)
set count = count + 1
call SaveInteger(HS,GetHandleId(z),2,count)
if Distance(GetUnitX(t),GetUnitY(t),x,y) <= 50 then
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call StunUnit(c,t,2)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),3,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),3,LIGHTNING,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,LIGHTNING3,1,255,255,255,255)
loop
exitwhen i >= count
call UnitApplyTimedLife(LoadUnitHandle(CHIDORI,GetHandleId(z),i),'BTLF',2)
set i = i + 1
endloop
call TimerStart(z,2,false,function FinalTimer)
elseif Distance(xx,yy,x,y) >= MAXDIST then
call UnitRemoveAbility(c,BUFFID)
loop
exitwhen i >= count
call RemoveUnit(LoadUnitHandle(CHIDORI,GetHandleId(z),i))
set i = i + 1
endloop
call PauseUnit(c,false)
call RemoveUnit(d)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
call FlushChildHashtable(CHIDORI,GetHandleId(z))
endif
endfunction
private function ChidoriNagashi takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local real time = LoadReal(HS,GetHandleId(z),0)
local group g = NewGroup()
local unit v
local real x
local real y
local real a
local real r = (GetUnitAbilityLevel(c,'A00H') * 50) / 50
set time = time - 0.02
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),350,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set a = Angle(GetUnitX(v),GetUnitY(v),GetUnitX(c),GetUnitY(c))
set x = PolarX(GetUnitX(v),-4,a)
set y = PolarY(GetUnitY(v),-4,a)
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call SetUnitX(v,x)
call SetUnitY(v,y)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
call SaveReal(HS,GetHandleId(z),0,time)
endif
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t
local real x
local real y
local timer z = NewTimer()
local unit d
if GetSpellTargetUnit() != null then
set t = GetSpellTargetUnit()
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(c),GetUnitY(c),GetUnitFacing(c))
call PauseUnit(c,true)
call SetUnitAnimation(c,"attack")
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,t)
call SaveUnitHandle(HS,GetHandleId(z),2,d)
call SaveReal(HS,GetHandleId(z),0,GetUnitX(c))
call SaveReal(HS,GetHandleId(z),1,GetUnitY(c))
call SaveInteger(HS,GetHandleId(z),2,0)
call TimerStart(z,0.02,true,function ChidoriEso)
else
set x = GetSpellTargetX()
set y = GetSpellTargetY()
call SoundStart("war3mapImported\\ChidoriNagashi.mp3",GetUnitX(c),GetUnitY(c))
call PauseUnit(c,true)
call UnitRemoveAbility(c,BUFFID)
call SetUnitAnimation(c,"spell slam")
call SetUnitInvulnerable(c,true)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),3,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),3,LIGHTNING,2,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),4,LIGHTNING2,2,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c) + 120,4,LIGHTNING2,3,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c) + 240,4,LIGHTNING2,3,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),5,LIGHTNING3,2,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),3,LIGHTNING4,2,255,255,255,255)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveReal(HS,GetHandleId(z),0,3)
call TimerStart(z,0.02,true,function ChidoriNagashi)
endif
set c = null
set t = null
set d = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Amaterasu initializer init
globals
private constant real DISTANCE = 35
private constant real RADIUS = 200
private constant real MAXDIST = 1800
private constant integer BALL = 'h00X'
private constant integer BALL2 = 'h00Y'
private constant integer FIRE = 'h00W'
private constant integer SHARINGAN = 'h02F'
private constant integer SPELLID = 'A00J'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\DarkNova.mdx"
endglobals
private struct data
unit c
unit d
unit e
real a
real FirstX
real FirstY
group go
real time = 2
integer cal
real xx
real yy
real xtarget
real ytarget
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 30
local integer count = 0
local integer i = 0
set time = time - 0.04
if time > 0 then
set cal = cal + 1
if cal >= 3 then
set cal = 0
call EffectUnitColor(c,x,y,0,1,FIRE,6,255,255,255,255)
endif
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(d,x,y)
call SetUnitPosition(e,x,y)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupAddGroup(go,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
call SetUnitPathing(v,false)
call SetUnitPosition(v,x,y)
call ShowUnit(v,false)
call GroupRemoveUnit(g,v)
endloop
endif
if time <= 0 then
if time == 0 then
set xtarget = GetUnitX(d)
set ytarget = GetUnitY(d)
loop
exitwhen i >= 18
call EffectUnitColor(c,PolarX(GetUnitX(d),400,i * 20),PolarY(GetUnitY(d),400,i * 20),0,0.8,FIRE,6,255,255,255,255)
call EffectUnitColor(c,PolarX(GetUnitX(d),250,i * 20),PolarY(GetUnitY(d),250,i * 20),0,0.8,FIRE,6,255,255,255,255)
call EffectUnitColor(c,PolarX(GetUnitX(d),100,i * 20),PolarY(GetUnitY(d),100,i * 20),0,0.8,FIRE,6,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT6,PolarX(GetUnitX(d),200,i * 20),PolarY(GetUnitY(d),200,i * 20)))
set i = i + 1
endloop
loop
set v = FirstOfGroup(go)
exitwhen v == null
call SetUnitPathing(v,true)
call ShowUnit(v,true)
call AmaterasuUnit(c,v,12,r)
call GroupRemoveUnit(go,v)
endloop
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseGroup(go)
endif
call GroupEnumUnitsInRange(g,xtarget,ytarget,400,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and GetUnitAbilityLevel(v,'B00C') <= 0 then
call AmaterasuUnit(c,v,12,r)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupEnumUnitsInRange(g,xx,yy,Distance(xx,yy,xtarget,ytarget),null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and GetUnitAbilityLevel(v,'B00C') <= 0 then
if (Angle(xx,yy,xtarget,ytarget) + 360) - (Angle(xx,yy,GetUnitX(v),GetUnitY(v)) + 360) <= 10 and (Angle(xx,yy,xtarget,ytarget) + 360) - (Angle(xx,yy,GetUnitX(v),GetUnitY(v)) + 360) >= -10 then
call AmaterasuUnit(c,v,12,r)
endif
endif
call GroupRemoveUnit(g,v)
endloop
if time <= -6 then
call ReleaseTimer(z)
call .destroy()
endif
endif
call ReleaseGroup(g)
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .go = NewGroup()
set .c = caster
set .cal = 0
set .a = angle
set .xx = GetUnitX(c)
set .yy = GetUnitY(c)
set .d = CreateUnit(GetOwningPlayer(.c),BALL,xx,yy,.a)
set .e = CreateUnit(GetOwningPlayer(.c),FIRE,xx,yy,.a)
call SetUnitScale(.e,2.5,2.5,2.5)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
local unit d = CreateUnit(GetOwningPlayer(c),SHARINGAN,GetUnitX(c),GetUnitY(c),a)
call SetUnitTimeScale(d,5)
call PauseUnit(c,true)
call PolledWait(0.6)
call SetUnitTimeScale(d,0)
call PolledWait(0.5)
call data.create(c,a)
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Amaterasu.mp3",GetUnitX(c),GetUnitY(c))
endif
call PolledWait(0.3)
call RemoveUnit(d)
call PauseUnit(c,false)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=33
//TESH.alwaysfold=0
scope kirin initializer init
globals
private constant real RADIUS = 1000
private constant integer FIREBALL = 'h00L'
private constant integer FIREBALL2 = 'h001'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A00K'
private constant integer EFFECTID = 'A00E'
private constant integer LIGHTNING = 'h010'
private constant integer LIGHTNING2 = 'h00Q'
private constant integer LIGHTNING3 = 'h012'
private constant integer LIGHTNING4 = 'h011'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING5 = 'h00R'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local unit d
local integer i = 0
local real spaceWave
local real timeWave
local real radiusRatio
local lightning l
local real r = (GetHeroAgi(c,true) * 15)
call PauseUnit(c,true)
call SetUnitAnimation(c,"spell three")
call UnitAddAbility(c,EFFECTID)
call PolledWait(0.1)
call SetUnitTimeScale(c,0)
call PolledWait(0.2)
set l = AddLightningEx("CLPB",true,GetUnitX(c),GetUnitY(c),180,GetUnitX(c),GetUnitY(c),1200)
call PolledWait(0.2)
set d = CreateUnit(GetOwningPlayer(c),LIGHTNING2,x,y,0)
call SetUnitFlyHeight(d,800,0)
call SetUnitScale(d,6,6,6)
call PolledWait(7)
call SetUnitTimeScale(c,1)
call DestroyLightning(l)
call EffectUnitColor(c,x,y,GetUnitFacing(c),9,LIGHTNING,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),7,LIGHTNING5,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),7,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),15,LIGHTNING3,1,155,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),25,LIGHTNING4,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),25,LIGHTNING4,1,255,255,255,255)
call PolledWait(0.3)
call AreaDamage(c,r,x,y,RADIUS,NINJUTSU_DAMAGE)
call EffectUnitColor(c,x,y,GetUnitFacing(c),15,LIGHTNING3,1,155,255,255,255)
set timeWave = 2.0 * 5 / 1
set spaceWave = 2.0 * 800 / 500
set radiusRatio = 1200 / 800
set bj_lastCreatedTerrainDeformation = TerrainDeformRipple(x,y,800,25,R2I(3 * 1000),1, spaceWave, timeWave, radiusRatio,false)
call PauseUnit(c,false)
call SoundStart("war3mapImported\\Sasuke - Kirin End.mp3",GetUnitX(c),GetUnitY(c))
call UnitRemoveAbility(c,EFFECTID)
loop
exitwhen i >= 8
call EffectUnitColor(c,x,y,GetUnitFacing(c),25,LIGHTNING4,1,255,255,255,255)
call TriggerSleepAction(0.)
set i = i + 1
endloop
call RemoveUnit(d)
set c = null
set d = null
set l = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope kiringear initializer init
globals
private constant real RADIUS = 1000
private constant integer FIREBALL = 'h00L'
private constant integer FIREBALL2 = 'h001'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A0CP'
private constant integer EFFECTID = 'A00E'
private constant integer LIGHTNING = 'h010'
private constant integer LIGHTNING2 = 'h00Q'
private constant integer LIGHTNING3 = 'h012'
private constant integer LIGHTNING4 = 'h011'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING5 = 'h00R'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local unit d
local integer i = 0
local real spaceWave
local real timeWave
local real radiusRatio
local lightning l
local real r = (GetHeroAgi(c,true) * 18)
call PauseUnit(c,true)
call SetUnitAnimation(c,"spell three")
call UnitAddAbility(c,EFFECTID)
call PolledWait(0.1)
call SetUnitTimeScale(c,0)
call PolledWait(0.2)
set l = AddLightningEx("CLPB",true,GetUnitX(c),GetUnitY(c),180,GetUnitX(c),GetUnitY(c),1200)
call PolledWait(0.2)
set d = CreateUnit(GetOwningPlayer(c),LIGHTNING2,x,y,0)
call SetUnitFlyHeight(d,800,0)
call SetUnitScale(d,6,6,6)
call PolledWait(7)
call SetUnitTimeScale(c,1)
call DestroyLightning(l)
call EffectUnitColor(c,x,y,GetUnitFacing(c),9,LIGHTNING,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),7,LIGHTNING5,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),7,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),15,LIGHTNING3,1,155,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),25,LIGHTNING4,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),25,LIGHTNING4,1,255,255,255,255)
call PolledWait(0.3)
call AreaDamage(c,r,x,y,RADIUS,NINJUTSU_DAMAGE)
call EffectUnitColor(c,x,y,GetUnitFacing(c),15,LIGHTNING3,1,155,255,255,255)
set timeWave = 2.0 * 5 / 1
set spaceWave = 2.0 * 800 / 500
set radiusRatio = 1200 / 800
set bj_lastCreatedTerrainDeformation = TerrainDeformRipple(x,y,800,25,R2I(3 * 1000),1, spaceWave, timeWave, radiusRatio,false)
call PauseUnit(c,false)
call SoundStart("war3mapImported\\Sasuke - Kirin End.mp3",GetUnitX(c),GetUnitY(c))
call UnitRemoveAbility(c,EFFECTID)
loop
exitwhen i >= 8
call EffectUnitColor(c,x,y,GetUnitFacing(c),25,LIGHTNING4,1,255,255,255,255)
call TriggerSleepAction(0.)
set i = i + 1
endloop
call RemoveUnit(d)
set c = null
set d = null
set l = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope HekkeKrosou2 initializer init
globals
private constant real DISTANCE = 60
private constant real RADIUS = 250
private constant real MAXDIST = 1500
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A006'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
endglobals
private struct data
unit c
unit d
real a
real time = 0.6
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,'A005') * 50
local unit b
local integer count = 0
set time = time - 0.03
call SetUnitPosition(d,x,y)
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set count = count + 1
exitwhen true
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if count >= 1 then
set g = NewGroup()
call GroupEnumUnitsInRange(g,GetUnitX(v),GetUnitY(v),RADIUS,Filter(function data.Boolean))
loop
set b = FirstOfGroup(g)
exitwhen b == null
if FilterGeneral(c,b) then
call DamageTarget(c,b,r,TAIJUTSU_DAMAGE)
call SlideUnitAngle(b,82,0.12,a,EFFECT)
endif
call GroupRemoveUnit(g,b)
endloop
call ReleaseGroup(g)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
call .deallocate()
else
if time <= 0 then
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
call .deallocate()
endif
endif
endmethod
static method create takes unit caster returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = GetUnitFacing(.c)
set .d = CreateUnit(GetOwningPlayer(.c),DUMMY,GetUnitX(.c),GetUnitY(.c),.a)
call EffectUnitColor(c,GetUnitX(.c),GetUnitY(.c),GetUnitFacing(.c),1.5,WAVE,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(.c),GetUnitY(.c),GetUnitFacing(.c),2,WAVE2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(.c),GetUnitY(.c),GetUnitFacing(.c),3,WAVE3,1,255,255,255,255)
call SetTimerData(z,this)
call TimerStart(z,0.03,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call SoundStart("war3mapImported\\Kuushou.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call data.create(GetTriggerUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=29
//TESH.alwaysfold=0
scope Kaiten initializer init
globals
private constant real RADIUS = 300
private constant integer SPELLID = 'A007'
private constant integer SPELLID2 = 'A009'
private constant integer DOME = 'h00H'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\IceNova.mdx"
private constant string EFFECT3 = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT4 = "war3mapImported\\BigExplosionBlue.mdx"
hashtable HEKKE = InitHashtable()
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,false)
call FlushChildHashtable(HS,GetHandleId(z))
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetUnitX(c)
local real y = GetUnitY(c)
local group g = NewGroup()
local unit d
local real r = (GetUnitAbilityLevel(c,SPELLID) + 2) * GetHeroAgi(c,true)
local real a
local timer z
local integer count = 0
local unit v
local unit b
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Kaiten.mp3",GetUnitX(c),GetUnitY(c))
endif
call PauseUnit(c,true)
call SetUnitAnimation(c,"spell slam")
call SetUnitInvulnerable(c,true)
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT4,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT4,x,y))
set b = CreateUnit(GetOwningPlayer(c),DOME,x,y,0)
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function PickUnit))
loop
set d = FirstOfGroup(g)
exitwhen d == null
set a = Angle(x,y,GetUnitX(d),GetUnitY(d))
call DamageTarget(c,d,r,TAIJUTSU_DAMAGE)
call SlideUnitAngle(d,25,0.5,a,EFFECT)
if IsUnitType(d,UNIT_TYPE_HERO) == true and count == 0 then
set v = d
call SaveUnitHandle(HEKKE,GetHandleId(c),0,v)
set count = count + 1
endif
call GroupRemoveUnit(g,d)
endloop
call ReleaseGroup(g)
call SetUnitPosition(b,x,y)
call PolledWait(1.2)
call RemoveUnit(b)
call SetUnitInvulnerable(c,false)
call PauseUnit(c,false)
call SetUnitAnimation(c,"stand")
if count >= 1 and GetUnitTypeId(c) != KAKASHI then
set z = NewTimer()
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,true)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call TimerStart(z,2,false,function TimerExpired)
endif
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Greate8Rotation initializer init
globals
private constant integer SPELLID = 'A009'
private constant integer DOME = 'h00H'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\IceNova.mdx"
private constant string EFFECT3 = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT4 = "war3mapImported\\BigExplosionBlue.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = LoadUnitHandle(HEKKE,GetHandleId(c),0)
local real x = GetUnitX(c)
local real y = GetUnitY(c)
local real xx
local real yy
local real r = ((GetUnitAbilityLevel(c,'A007') + 1) * GetHeroAgi(c,true)) / 2
local real a
local unit d
local integer count = 0
if t != null and GetWidgetLife(t) > 0.45 then
set d = CreateUnit(GetOwningPlayer(c),DOME,x,y,0)
set a = Angle(x,y,GetUnitX(t),GetUnitY(t))
call PauseUnit(c,true)
call SetUnitAnimation(c,"spell slam")
call SetUnitInvulnerable(c,true)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
loop
exitwhen count >= 8
set xx = PolarX(GetUnitX(t),-150,a)
set yy = PolarY(GetUnitY(t),-150,a)
call SetUnitX(c,xx)
call SetUnitY(c,yy)
call SetUnitPosition(d,xx,yy)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
if count >= 7 then
call SlideUnitAngle(t,25,0.5,a,EFFECT)
call DamageTarget(c,t,r,TAIJUTSU_DAMAGE)
else
call SlideUnitAngle(t,15,0.2,a,EFFECT)
endif
call PolledWait(0.2)
set count = count + 1
endloop
call RemoveUnit(d)
call SetUnitInvulnerable(c,false)
call PauseUnit(c,false)
call SetUnitAnimation(c,"stand")
endif
call FlushChildHashtable(HEKKE,GetHandleId(c))
set c = null
set d = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Byakugan_Conditions takes nothing returns boolean
return GetIssuedOrderId() == OrderId("immolation")
endfunction
function Trig_Byakugan_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
call UnitAddAbility(c,'A020')
call SetUnitAbilityLevel(c,'A02P',GetUnitAbilityLevel(c,'A02O'))
loop
call TriggerSleepAction(0.)
exitwhen GetUnitAbilityLevel(c,'B00D') <= 0
endloop
call UnitRemoveAbility(c,'A020')
set c = null
endfunction
function InitTrig_Byakugan takes nothing returns nothing
local trigger t = CreateTrigger()
set bj_lastCreatedUnit = CreateUnit(Player(11),DUMMY,0,0,0)
call UnitAddAbility(bj_lastCreatedUnit,'A020')
call UnitRemoveAbility(bj_lastCreatedUnit,'A020')
call RemoveUnit(bj_lastCreatedUnit)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function Trig_Byakugan_Conditions))
call TriggerAddAction(t,function Trig_Byakugan_Actions)
set t = null
endfunction
//TESH.scrollpos=69
//TESH.alwaysfold=0
scope RokujuuyonShou initializer init
globals
private constant integer SPELLID = 'A008'
private constant integer SPELLID2 = 'A000'
private constant integer SHADOWID = 'h00J'
private constant integer HEKKEID = 'h00I'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECTATT = "Abilities\\Weapons\\ZigguratMissile\\ZigguratMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\IceNova.mdx"
private constant string EFFECT3 = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT4 = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer WAVE4 = 'h05H'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,false)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
set c = null
endfunction
private function TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local integer count = LoadInteger(HS,GetHandleId(z),0)
local real a = LoadReal(HS,GetHandleId(z),1)
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 2 ) + 8 ) * GetHeroAgi(c,true)
local unit d
set count = count + 1
if t == null then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
if count >= 23 then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call SetUnitTimeScale(c,1)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,1.5,WAVE,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2,WAVE2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),a,3,WAVE3,1,255,255,255,255)
call DamageTarget(c,t,r,TAIJUTSU_DAMAGE)
call SlideUnitAngle(t,25,0.5,a,EFFECT)
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
call UnitAddAbility(d,'A05O')
call IssueTargetOrder(d,"soulburn",t)
call UnitApplyTimedLife(d,'BTLF',0.5)
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),2))
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),3))
if GetWidgetLife(t) < 0.45 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,true)
call TimerStart(z,10,false,function FinalTimer)
else
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
else
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),a,3,WAVE4,1,255,255,255,255)
call SetUnitAnimation(c,"attack")
call SetUnitAnimation(t,"death")
call SetUnitPosition(t,PolarX(GetUnitX(t),15,a),PolarY(GetUnitY(t),15,a))
call SetUnitPosition(c,PolarX(GetUnitX(t),-100,a),PolarY(GetUnitY(t),-100,a))
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(t),GetUnitY(t)))
call SoundStart("war3mapImported\\SoundPound.mp3",GetUnitX(c),GetUnitY(c))
call SaveInteger(HS,GetHandleId(z),0,count)
endif
endif
set c = null
set t = null
set d = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local integer i = 0
local unit d
local timer z = NewTimer()
local effect array e
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\ps2.mp3",GetUnitX(c),GetUnitY(c))
endif
set d = CreateUnit(GetOwningPlayer(c),HEKKEID,GetUnitX(c),GetUnitY(c),0)
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call PauseUnit(t,true)
call SetUnitInvulnerable(t,true)
call SetUnitAnimation(c,"spell")
call SetUnitTimeScale(c,3)
loop
exitwhen i >= 3
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOWID,GetUnitX(c),GetUnitY(c),0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1.5)
set i = i + 1
endloop
call PolledWait(1.5)
call RemoveUnit(d)
set e[1] = AddSpecialEffectTarget(EFFECTATT,c,"hand right")
set e[2] = AddSpecialEffectTarget(EFFECTATT,c,"hand left")
call SoundStart("war3mapImported\\Nejipalm.mp3",GetUnitX(c),GetUnitY(c))
call SetUnitPosition(c,PolarX(GetUnitX(t),-150,a),PolarY(GetUnitY(t),-150,a))
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,t)
call SaveEffectHandle(HS,GetHandleId(z),2,e[1])
call SaveEffectHandle(HS,GetHandleId(z),3,e[2])
call SaveInteger(HS,GetHandleId(z),0,0)
call SaveReal(HS,GetHandleId(z),1,a)
call TimerStart(z,0.20,true,function TimerExpired)
set c = null
set t = null
set d = null
set e[1] = null
set e[2] = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope hakke128Shou initializer init
globals
private constant real RADIUS = 500
private constant integer SPELLID = 'A00B'
private constant integer SHADOWID = 'h00J'
private constant integer HEKKEID = 'h00I'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECTATT = "Abilities\\Weapons\\ZigguratMissile\\ZigguratMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\IceNova.mdx"
private constant string EFFECT3 = "war3mapImported\\KamehaWave.mdx"
private constant string EFFECT4 = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local integer count = LoadInteger(HS,GetHandleId(z),0)
local group g = LoadGroupHandle(HS,GetHandleId(z),1)
local group do
local unit d
local real r = (GetUnitAbilityLevel(c,'A00B') * 3) + 2
call SetUnitFacing(c,GetUnitFacing(c) + 20)
set count = count + 1
if count >= 64 then
call PauseUnit(c,false)
call SetUnitTimeScale(c,1)
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),2))
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),3))
call SetUnitInvulnerable(c,false)
loop
set d = FirstOfGroup(g)
exitwhen d == null
call PauseUnit(d,false)
call GroupRemoveUnit(g,d)
endloop
call ReleaseGroup(g)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
call SetUnitAnimation(c,"attack")
call SoundStart("war3mapImported\\SoundPound.mp3",GetUnitX(c),GetUnitY(c))
set do = NewGroup()
call GroupAddGroup(g,do)
loop
set d = FirstOfGroup(do)
exitwhen d == null
call SetUnitAnimation(d,"death")
call DamageTarget(c,d,r,TAIJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(d),GetUnitY(d)))
call GroupRemoveUnit(do,d)
endloop
call ReleaseGroup(do)
call SaveInteger(HS,GetHandleId(z),0,count)
endif
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local integer i = 0
local unit d
local timer z = NewTimer()
local effect array e
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local group two = NewGroup()
local group g = NewGroup()
local unit enum
call SoundStart("war3mapImported\\128Pound.mp3",GetUnitX(c),GetUnitY(c))
call SaveGroupHandle(HS,GetHandleId(z),1,two)
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),RADIUS,Filter(function PickHero))
loop
set enum = FirstOfGroup(g)
exitwhen enum == null
call PauseUnit(enum,true)
call GroupAddUnit(two,enum)
call GroupRemoveUnit(g,enum)
endloop
set d = CreateUnit(GetOwningPlayer(c),HEKKEID,GetUnitX(c),GetUnitY(c),0)
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call SetUnitAnimation(c,"spell")
call SetUnitTimeScale(c,3)
loop
exitwhen i >= 4
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOWID,GetUnitX(c),GetUnitY(c),0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1.5)
set i = i + 1
endloop
call PolledWait(1.5)
call RemoveUnit(d)
set e[1] = AddSpecialEffectTarget(EFFECTATT,c,"hand right")
set e[2] = AddSpecialEffectTarget(EFFECTATT,c,"hand left")
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveEffectHandle(HS,GetHandleId(z),2,e[1])
call SaveEffectHandle(HS,GetHandleId(z),3,e[2])
call SaveInteger(HS,GetHandleId(z),0,0)
call TimerStart(z,0.15,true,function TimerExpired)
call ReleaseGroup(g)
set c = null
set d = null
set e[1] = null
set e[2] = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=36
//TESH.alwaysfold=0
scope Hasanageki initializer init
globals
private constant integer SPELLID = 'A00A'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer HEKKEID = 'h00I'
private constant integer SHADOWID = 'h00J'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECTATT = "Abilities\\Weapons\\ZigguratMissile\\ZigguratMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\IceNova.mdx"
private constant string EFFECT3 = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT4 = "war3mapImported\\BigExplosionBlue.mdx"
private constant string EFFECT5 = "war3mapImported\\howling2.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local real x = GetUnitX(c)
local real y = GetUnitY(c)
local real a = Angle(x,y,GetUnitX(t),GetUnitY(t))
local effect array e
local unit d
local integer count = 0
local integer i = 0
local real r = (GetHeroAgi(c,true) * 15)
call SoundStart("war3mapImported\\Hasanageki.mp3",GetUnitX(c),GetUnitY(c))
set d = CreateUnit(GetOwningPlayer(c),HEKKEID,GetUnitX(c),GetUnitY(c),0)
call PauseUnit(c,true)
call PauseUnit(t,true)
call SetUnitInvulnerable(c,true)
call SetUnitAnimation(c,"spell")
loop
exitwhen i >= 4
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOWID,GetUnitX(c),GetUnitY(c),0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1.5)
set i = i + 1
endloop
call TriggerSleepAction(1.5)
call RemoveUnit(d)
set e[1] = AddSpecialEffectTarget(EFFECTATT,c,"hand right")
set e[2] = AddSpecialEffectTarget(EFFECTATT,c,"hand left")
call SetUnitPosition(c,PolarX(GetUnitX(t),-150,a),PolarY(GetUnitY(t),-150,a))
call SetUnitAnimation(c,"attack")
call TriggerSleepAction(0.5)
call SetUnitAnimation(c,"attack")
call TriggerSleepAction(0.5)
call SetUnitAnimation(c,"attack")
call DamageTarget(c,t,r,TAIJUTSU_DAMAGE)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,1.5,WAVE,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,3,WAVE2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),a,5,WAVE3,1,255,255,255,255)
call SlideUnitAngle(t,15,1,a,EFFECT)
loop
exitwhen count >= 5
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),a,5,WAVE3,0.1,255,255,255,255)
call TriggerSleepAction(0.2)
set count = count + 1
endloop
call DestroyEffect(e[1])
call DestroyEffect(e[2])
call PauseUnit(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(c,false)
set c = null
set t = null
set e[1] = null
set e[2] = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=183
//TESH.alwaysfold=0
library CopyFunc
function IsItAbility4 takes integer idcheck returns boolean
local integer id = idcheck
if id == 'A065' then
return true
endif
if id == 'A02D' then
return true
endif
if id == 'A02F' then
return true
endif
if id == 'A02A' then
return true
endif
if id == 'A027' then
return true
endif
if id == 'A00J' then
return true
endif
if id == 'A019' then
return true
endif
if id == 'A008' then
return true
endif
if id == 'A01Y' then
return true
endif
if id == 'A02I' then
return true
endif
if id == 'A01L' then
return true
endif
if id == 'A01T' then
return true
endif
if id == 'A01E' then
return true
endif
if id == 'A01H' then
return true
endif
if id == 'A06D' then
return true
endif
if id == 'A06P' then
return true
endif
if id == 'A06U' then
return true
endif
return false
endfunction
function IsItAbility3 takes integer idcheck returns boolean
local integer id = idcheck
if id == 'A010' then
return true
endif
if id == 'A02O' then
return true
endif
if id == 'A00Q' then
return true
endif
if id == 'A01F' then
return true
endif
if id == 'A01K' then
return true
endif
if id == 'A003' then
return true
endif
if id == 'A01S' then
return true
endif
if id == 'A01X' then
return true
endif
if id == 'A06C' then
return true
endif
if id == 'A06X' then
return true
endif
return false
endfunction
function IsItAbility2 takes integer idcheck returns boolean
local integer id = idcheck
if id == 'A063' then
return true
endif
if id == 'A00P' then
return true
endif
if id == 'A00W' then
return true
endif
if id == 'A017' then
return true
endif
if id == 'A01E' then
return true
endif
if id == 'A00H' then
return true
endif
if id == 'A029' then
return true
endif
if id == 'A02C' then
return true
endif
if id == 'A02G' then
return true
endif
if id == 'A026' then
return true
endif
if id == 'A01P' then
return true
endif
if id == 'A002' then
return true
endif
if id == 'A01R' then
return true
endif
if id == 'A007' then
return true
endif
if id == 'A00U' then
return true
endif
if id == 'A01W' then
return true
endif
if id == 'A06B' then
return true
endif
if id == 'A06K' then
return true
endif
if id == 'A06V' then
return true
endif
return false
endfunction
function IsItAbility1 takes integer idcheck returns boolean
local integer id = idcheck
if id == 'A062' then
return true
endif
if id == 'A00N' then
return true
endif
if id == 'A01B' then
return true
endif
if id == 'A028' then
return true
endif
if id == 'A02E' then
return true
endif
if id == 'A02B' then
return true
endif
if id == 'A025' then
return true
endif
if id == 'A00T' then
return true
endif
if id == 'A00X' then
return true
endif
if id == 'A00C' then
return true
endif
if id == 'A000' then
return true
endif
if id == 'A00D' then
return true
endif
if id == 'A00G' then
return true
endif
if id == 'A01Q' then
return true
endif
if id == 'A005' then
return true
endif
if id == 'A01V' then
return true
endif
if id == 'A004' then
return true
endif
if id == 'A01J' then
return true
endif
if id == 'A018' then
return true
endif
if id == 'A069' then
return true
endif
if id == 'A06G' then
return true
endif
if id == 'A06T' then
return true
endif
return false
endfunction
endlibrary
//TESH.scrollpos=6
//TESH.alwaysfold=0
scope CopyJutsu initializer init
globals
private constant real DISTANCE = 40
private constant real RADIUS = 250
private constant real MAXDIST = 1250
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A021'
private constant integer SPELLID2 = 'A06Z'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant integer SPELL1 = 'A05T'
private constant integer SPELL2 = 'A05V'
private constant integer SPELL3 = 'A05X'
private constant integer SPELL4 = 'A05Z'
integer array COPY
integer array COPYSELF
integer array SPELLSELF
endglobals
private struct data
unit c
unit d
unit t
real time = 40
integer id
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
if time == 10 then
call DisplayTextToPlayer(GetOwningPlayer(c),0,0,"You have 10 second left before copied skill disappear")
endif
if GetWidgetLife(c) > 0.45 then
set time = time - 0.05
if GetUnitAbilityLevel(c,id) <= 0 then
call UnitRemoveAbility(c,id)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLSELF[GetPlayerId(GetOwningPlayer(c))],true)
call ReleaseTimer(z)
call .destroy()
else
if time <= 0 then
call UnitRemoveAbility(c,id)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLSELF[GetPlayerId(GetOwningPlayer(c))],true)
call ReleaseTimer(z)
call .destroy()
endif
endif
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(c),GetUnitY(c))
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local texttag f
call SetUnitPosition(d,x,y)
if Distance(GetUnitX(d),GetUnitY(d),GetUnitX(c),GetUnitY(c)) <= 80 then
call RemoveUnit(d)
set COPYSELF[GetPlayerId(GetOwningPlayer(c))] = id
if IsItAbility1(COPYSELF[GetPlayerId(GetOwningPlayer(c))]) then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELL1,false)
set SPELLSELF[GetPlayerId(GetOwningPlayer(c))] = SPELL1
elseif IsItAbility2(COPYSELF[GetPlayerId(GetOwningPlayer(c))]) then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELL2,false)
set SPELLSELF[GetPlayerId(GetOwningPlayer(c))] = SPELL2
elseif IsItAbility3(COPYSELF[GetPlayerId(GetOwningPlayer(c))]) then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELL3,false)
set SPELLSELF[GetPlayerId(GetOwningPlayer(c))] = SPELL3
elseif IsItAbility4(COPYSELF[GetPlayerId(GetOwningPlayer(c))]) then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELL4,false)
set SPELLSELF[GetPlayerId(GetOwningPlayer(c))] = SPELL4
endif
call UnitAddAbility(c,id)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),id,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,true)
set f = CreateTextTag()
call SetTextTagText(f,GetObjectName(id),0.025)
call SetTextTagPos(f,GetUnitX(c),GetUnitY(c),0)
call SetTextTagColor(f,255,255,50,255)
call SetTextTagVelocity(f,0,0.07)
call SetTextTagPermanent(f,false)
call SetTextTagLifespan(f,2)
call SetUnitAbilityLevel(c,id,GetUnitAbilityLevel(t,id))
call TimerStart(z,0.05,true,function data.TimerExpired2)
endif
set f = null
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .t = target
set .c = caster
call SoundStart("war3mapImported\\Sharingan Sound.mp3",GetUnitX(c),GetUnitY(c))
set .id = COPY[GetPlayerId(GetOwningPlayer(.t))]
set .d = CreateUnit(GetOwningPlayer(.c),'h042',GetUnitX(.t),GetUnitY(.t),bj_UNIT_FACING)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions2 takes nothing returns boolean
return GetSpellAbilityId() == SPELLID2
endfunction
private function Actions2 takes nothing returns nothing
local unit c = GetTriggerUnit()
call UnitRemoveAbility(c,COPYSELF[GetPlayerId(GetOwningPlayer(c))])
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLSELF[GetPlayerId(GetOwningPlayer(c))],true)
set c = null
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger t2 = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call TriggerRegisterPlayerUnitEvent(t2,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
call TriggerAddCondition(t2,Condition(function Conditions2))
call TriggerAddAction(t2,function Actions2)
set t = null
endfunction
endscope
//TESH.scrollpos=15
//TESH.alwaysfold=0
scope RaijuuHashiri initializer init
globals
private constant real DISTANCE = 18
private constant real RADIUS = 200
private constant real MAXDIST = 1200
private constant integer SPELLID = 'A05T'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h00R'
private constant integer LIGHTNING2 = 'h00Q'
private constant integer LIGHTNING3 = 'h00T'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
private constant string EFFECT4 = "war3mapImported\\lightning boom2.mdx"
endglobals
private struct data
unit c
unit d
unit t
integer animate = 0
lightning l
real dist = 0.01
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(d),dist,a)
local real y = PolarY(GetUnitY(d),dist,a)
local real r = (GetUnitAbilityLevel(c,SPELLID) * 1) * GetHeroAgi(c,true)
local integer i = 0
set dist = dist + 0.2
call MoveLightning(l,true,GetUnitX(c),GetUnitY(c),GetUnitX(d),GetUnitY(d))
call SetUnitX(d,x)
call SetUnitY(d,y)
call SetUnitFacing(d,a)
set animate = animate + 1
if animate >= 25 then
set animate = 0
call SetUnitAnimationByIndex(d,2)
endif
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 100 then
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),3,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,LIGHTNING,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.5,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5,LIGHTNING3,1,255,255,255,255)
call DestroyLightning(l)
loop
exitwhen i >= 12
set x = PolarX(GetUnitX(t),GetRandomReal(100,300),i * 30)
set y = PolarY(GetUnitY(t),GetRandomReal(100,300),i * 30)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
set i = i + 1
endloop
call AreaDamageTimer(c,r,GetUnitX(t),GetUnitY(t),RADIUS,NINJUTSU_DAMAGE)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit wolf, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .d = wolf
set .t = target
set .l = AddLightning("CLPB",true,GetUnitX(c),GetUnitY(c),GetUnitX(d),GetUnitY(d))
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local integer inn = 0
local unit d
local group g = NewGroup()
local unit t
call SoundStart("war3mapImported\\DogSound.mp3",GetUnitX(c),GetUnitY(c))
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),1500,Filter(function PickUnit))
loop
exitwhen inn >= 3
set t = GroupPickRandomUnit(g)
set d = CreateUnit(GetOwningPlayer(c),'h043',PolarX(GetUnitX(c),GetRandomReal(0,300),GetRandomReal(0,360)),PolarY(GetUnitY(c),GetRandomReal(0,300),GetRandomReal(0,360)),bj_UNIT_FACING)
call SetUnitVertexColor(d,255,255,255,150)
call SetUnitAnimationByIndex(d,2)
if t != null then
call data.create(c,d,t)
else
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(d),GetUnitY(d)))
call RemoveUnit(d)
endif
set d = null
set inn = inn + 1
endloop
call ReleaseGroup(g)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=15
//TESH.alwaysfold=0
scope Raikiri initializer init
globals
private constant real DISTANCE = 19
private constant real RADIUS = 350
private constant integer SPELLID = 'A05V'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h00R'
private constant integer LIGHTNING2 = 'h00Q'
private constant integer LIGHTNING3 = 'h00T'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
private constant string EFFECT4 = "war3mapImported\\lightning boom2.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private constant integer EFFECTID = 'A05W'
endglobals
private struct data
unit c
unit t
integer animate = 0
method destroy takes nothing returns nothing
call UnitRemoveAbility(c,EFFECTID)
call .deallocate()
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = (GetUnitAbilityLevel(c,SPELLID) * 1) * GetHeroAgi(c,true)
local integer i = 0
local real x
local real y
call AreaDamageTimer(c,r,GetUnitX(t),GetUnitY(t),350,NINJUTSU_DAMAGE)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),3,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,LIGHTNING,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.5,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5,LIGHTNING3,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.3,'h02C',1,255,255,255,255)
loop
exitwhen i >= 12
set x = PolarX(GetUnitX(t),GetRandomReal(100,300),i * 30)
set y = PolarY(GetUnitY(t),GetRandomReal(100,300),i * 30)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
set i = i + 1
endloop
call PauseUnit(c,false)
call SetUnitPathing(c,true)
call PauseUnit(t,false)
call ReleaseTimer(z)
call .destroy()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
call SetUnitPosition(c,x,y)
set animate = animate + 1
if animate >= 25 then
set animate = 0
call SetUnitAnimationByIndex(c,2)
endif
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 120 then
call SoundStart("war3mapImported\\Raikiri.mp3",GetUnitX(c),GetUnitY(c))
call PauseUnit(t,true)
call SetUnitAnimation(c,"spell two")
call TimerStart(z,0.4,false,function data.FinalTimer)
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 0
local real x
local real y
local real a = Angle(GetUnitX(caster),GetUnitY(caster),GetUnitX(target),GetUnitY(target))
set .c = caster
set .t = target
call PauseUnit(.c,true)
call SetUnitPathing(.c,false)
call TriggerSleepAction(0)
call SetUnitAnimation(.c,"spell one")
call DustWave(0.4,0.15,0.8,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call UnitAddAbility(c,EFFECTID)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
loop
exitwhen i >= 12
set x = PolarX(GetUnitX(c),GetRandomReal(100,300),i * 30)
set y = PolarY(GetUnitY(c),GetRandomReal(100,300),i * 30)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
set i = i + 1
endloop
call PolledWait(0.2)
call SetUnitAnimationByIndex(c,2)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=42
//TESH.alwaysfold=0
scope Chidoriraikiri initializer init
globals
private constant integer SPELLID = 'A0C0'
private constant integer SPELLID2 = 'A00I'
private constant integer BUFFID = 'B01P'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h00R'
private constant integer LIGHTNING2 = 'h00Q'
private constant integer LIGHTNING3 = 'h00T'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
private constant string EFFECT4 = "war3mapImported\\lightning boom2.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private function AbilityCheck takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
if GetUnitAbilityLevel(c,BUFFID) <= 0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,false)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local integer i = 0
local real x
local real y
local timer z
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
loop
exitwhen i >= 12
set x = PolarX(GetUnitX(c),GetRandomReal(100,300),i * 30)
set y = PolarY(GetUnitY(c),GetRandomReal(100,300),i * 30)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
set i = i + 1
endloop
if GetUnitTypeId(c) != KAKASHI then
set z = NewTimer()
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,true)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call TimerStart(z,0.05,true,function AbilityCheck)
endif
set c = null
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function ActionsAttacked takes nothing returns nothing
local unit c = GetAttacker()
local unit t = GetTriggerUnit()
local integer i = 0
local real x
local real y
local real r = (GetUnitAbilityLevel(c,SPELLID) + 6) * GetHeroAgi(c,true)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Raikiri.mp3",GetUnitX(t),GetUnitY(t))
endif
call UnitRemoveAbility(c,BUFFID)
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
loop
exitwhen i >= 12
set x = PolarX(GetUnitX(t),GetRandomReal(100,300),i * 30)
set y = PolarY(GetUnitY(t),GetRandomReal(100,300),i * 30)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
set i = i + 1
endloop
call AreaDamageTimer(c,r,GetUnitX(t),GetUnitY(t),300,NINJUTSU_DAMAGE)
call StunUnit(c,t,3)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),3,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,LIGHTNING,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.5,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5,LIGHTNING3,1,255,255,255,255)
set c = null
set t = null
endfunction
private function ConditionsAttacked takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker())) == true and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE) == false and GetUnitAbilityLevel(GetAttacker(),BUFFID) >= 1
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger t2 = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call TriggerRegisterPlayerUnitEvent(t2,Player(index),EVENT_PLAYER_UNIT_ATTACKED,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
call TriggerAddCondition(t2,Condition(function ConditionsAttacked))
call TriggerAddAction(t2,function ActionsAttacked)
set t = null
set t2 = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope RaitonKagebunshin initializer init
globals
private constant integer SPELLID = 'A05X'
private constant real RADIUS = 400
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h00R'
private constant integer LIGHTNING2 = 'h00Q'
private constant integer LIGHTNING3 = 'h00T'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
private constant string EFFECT4 = "war3mapImported\\lightning boom2.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private hashtable HT = InitHashtable()
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local player p = GetOwningPlayer(c)
local real r = GetUnitAbilityLevel(c,SPELLID) * 80
call SaveReal(HT,GetHandleId(p),0,r)
call SaveUnitHandle(HT,GetHandleId(p),0,c)
call UnitAddItemById(c,'I02K')
set c = null
set p = null
endfunction
private function Conditions2 takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'B00Q') >= 1 and IsUnitIllusion(GetTriggerUnit()) == true
endfunction
private function DeadLightning takes nothing returns nothing
local trigger t = GetTriggeringTrigger()
local unit c = GetTriggerUnit()
local real r = LoadReal(HT,GetHandleId(t),0)
local integer i = 0
local real x
local real y
call AreaDamageTimer(c,r,GetUnitX(c),GetUnitY(c),RADIUS,NINJUTSU_DAMAGE)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,3,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),4,LIGHTNING,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2.5,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),5,LIGHTNING3,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2.3,'h02C',1,255,255,255,255)
loop
exitwhen i >= 12
set x = PolarX(GetUnitX(c),GetRandomReal(100,300),i * 30)
set y = PolarY(GetUnitY(c),GetRandomReal(100,300),i * 30)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
set i = i + 1
endloop
call DestroyTrigger(t)
call FlushChildHashtable(HT,GetHandleId(t))
set t = null
set c = null
endfunction
private function Actions2 takes nothing returns nothing
local unit n = GetTriggerUnit()
local player p = GetOwningPlayer(n)
local unit c = LoadUnitHandle(HT,GetHandleId(p),0)
local real r = LoadReal(HT,GetHandleId(p),0)
local real xx = PolarX(GetUnitX(c),400,GetUnitFacing(c))
local real yy = PolarY(GetUnitY(c),400,GetUnitFacing(c))
local trigger t = CreateTrigger()
call SaveReal(HT,GetHandleId(t),0,r)
call TriggerRegisterUnitEvent(t,n,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function DeadLightning)
call SetUnitPosition(n,GetUnitX(c),GetUnitY(c))
call IssuePointOrder(n,"move",xx,yy)
call FlushChildHashtable(HT,GetHandleId(p))
set n = null
set c = null
set p = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger t2 = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
call TriggerRegisterEnterRectSimple(t2,bj_mapInitialPlayableArea)
call TriggerAddCondition(t2,Condition(function Conditions2))
call TriggerAddAction(t2,function Actions2)
set t = null
set t2 = null
endfunction
endscope
//TESH.scrollpos=8
//TESH.alwaysfold=0
scope Kamui initializer init
globals
private constant real DISTANCE = 15
private constant real RADIUS = 500
private constant integer SPELLID = 'A05Z'
private constant integer KAMUI = 'h00Y'
private constant integer DARKHOLE = 'h044'
private constant integer MANGEKYOU2 = 'h042'
private constant integer MANGEKYOU = 'h045'
private constant integer LIGHTNING = 'h00R'
private constant integer LIGHTNING2 = 'h00Q'
private constant integer LIGHTNING3 = 'h00T'
private constant integer KAMUI2 = 'h05G'
endglobals
private struct data
unit c
unit array d[5]
real x
real y
real time = 5
integer count = 0
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a
local real xx
local real yy
local group g = NewGroup()
local unit v
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 70) * 1) / 50
set time = time - 0.03
if GetWidgetLife(c) > 0.45 then
set count = count + 1
if count >= 4 then
set count = 0
call EffectUnitColor(c,x,y,GetRandomReal(0,360),4,KAMUI2,1.2,255,255,255,255)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set a = Angle(GetUnitX(v),GetUnitY(v),x,y)
set xx = PolarX(GetUnitX(v),14,a)
set yy = PolarY(GetUnitY(v),14,a)
call SetUnitPosition(v,xx,yy)
call DamageTarget(c,v,r,GENJUTSU_DAMAGE)
if IsUnitInGroup(v,go) == false then
call SetUnitPathing(v,false)
call GroupAddUnit(go,v)
endif
if Distance(GetUnitX(v),GetUnitY(v),x,y) > RADIUS then
call SetUnitPathing(v,true)
call GroupRemoveUnit(go,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
if time <= 0 then
loop
set v = FirstOfGroup(go)
exitwhen v == null
call SetUnitPathing(v,true)
call GroupRemoveUnit(go,v)
endloop
call RemoveUnit(d[1])
call RemoveUnit(d[2])
call RemoveUnit(d[3])
call RemoveUnit(d[4])
call PauseUnit(c,false)
call ReleaseTimer(z)
call .destroy()
endif
else
loop
set v = FirstOfGroup(go)
exitwhen v == null
call SetUnitPathing(v,true)
call GroupRemoveUnit(go,v)
endloop
call RemoveUnit(d[1])
call RemoveUnit(d[2])
call RemoveUnit(d[3])
call RemoveUnit(d[4])
call PauseUnit(c,false)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .x = targetx
set .y = targety
set .go = NewGroup()
call SoundStart("war3mapImported\\Sharingan Sound.mp3",GetUnitX(c),GetUnitY(c))
set .d[1] = CreateUnit(GetOwningPlayer(c),KAMUI,x,y,0)
set .d[2] = CreateUnit(GetOwningPlayer(c),DARKHOLE,x,y,0)
set .d[3] = CreateUnit(GetOwningPlayer(c),MANGEKYOU,x,y,0)
set .d[4] = CreateUnit(GetOwningPlayer(c),MANGEKYOU2,x,y,0)
call SetUnitScale(.d[4],2.75,2.75,2.75)
call SetUnitVertexColor(.d[3],255,255,255,80)
call PauseUnit(.c,true)
call TriggerSleepAction(0)
call SetUnitAnimation(.c,"spell channel")
call SetTimerData(z,this)
call TimerStart(z,0.03,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope spRaikiri initializer init
globals
private constant real DISTANCE = 25
private constant real RADIUS = 350
private constant integer SPELLID = 'A07G'
private constant integer YELLOW = 'h010'
private constant integer YELLOW2 = 'h00V'
private constant string EFFECT2 = "war3mapImported\\EMPBomb.mdx"
private constant string EFFECT3 = "war3mapImported\\AncientExplode(Blue).mdx"
private constant string EFFECT7 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\Astral Inprisonment.mdx"
private constant string EFFECT4 = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
private constant string EFFECT6 = "war3mapImported\\IceNova.mdx"
endglobals
private struct data
unit c
unit t
real time = 2
integer animate = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),14,a)
local real y = PolarY(GetUnitY(c),14,a)
local real xx = PolarX(GetUnitX(t),14,a)
local real yy = PolarY(GetUnitY(t),14,a)
local real r = (GetHeroAgi(c,true) * 15)
set time = time - 0.02
set animate = animate + 1
call SetUnitPosition(c,x,y)
call SetUnitPosition(t,xx,yy)
if animate >= 10 then
set animate = 0
call EffectUnitColor(c,xx,yy,360,4,'h010',2,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(t),GetUnitY(t)))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h06N',GetUnitX(c),GetUnitY(c),a + 100)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a + 100,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h06N',GetUnitX(c),GetUnitY(c),a + 80)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a + 80,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h06N',GetUnitX(c),GetUnitY(c),a - 100)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a - 100,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h06N',GetUnitX(c),GetUnitY(c),a - 80)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a - 80,"")
endif
if time <= 0 then
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call SetUnitVertexColor(c,255,255,255,255)
call PauseUnit(.c,false)
call SetUnitPathing(.c,true)
call SetUnitTimeScale(c,1)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(c),GetUnitY(c)))
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = 50
local integer i = 0
call SetUnitFacing(c,a)
call SetUnitPosition(c,x,y)
set animate = animate + 1
if animate >= 3 then
set animate = 0
call EffectUnitColor(c,x,y,360,1.3,YELLOW,2,255,255,255,255)
endif
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 150 then
set animate = 0
call ShakeGroupCamera(2,x,y,500,20)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(c),GetUnitY(c)))
call TimerStart(z,0.02,true,function data.FinalTimer)
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 0
local real x
local real y
local real a = Angle(GetUnitX(caster),GetUnitY(caster),GetUnitX(target),GetUnitY(target))
set .c = caster
set .t = target
call PauseUnit(.c,true)
call SetUnitPathing(.c,false)
call SetUnitVertexColor(c,255,255,125,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),360,2,YELLOW2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),360,2,YELLOW,2,255,255,255,255)
call PolledWait(1)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Raikiri Slash.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=42
//TESH.alwaysfold=0
scope Raiden initializer init
globals
private constant real DISTANCE = 12
private constant real RADIUS = 350
private constant integer SPELLID = 'A060'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h00R'
private constant integer LIGHTNING2 = 'h00Q'
private constant integer LIGHTNING3 = 'h00T'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
private constant string EFFECT4 = "war3mapImported\\lightning boom2.mdx"
private constant string EFFECT5 = "war3mapImported\\shadowclone.mdx"
private constant integer EFFECTID = 'A05W'
private constant integer EFFECTID2 = 'A00E'
endglobals
private struct data
unit c
unit d
real a
integer animate = 0
lightning l
real time = 3
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local group g = NewGroup()
local unit v
set time = time - 0.02
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,x,y)
set x = PolarX(GetUnitX(d),DISTANCE,a)
set y = PolarY(GetUnitY(d),DISTANCE,a)
call SetUnitPosition(d,x,y)
call MoveLightningEx(l,true,GetUnitX(c),GetUnitY(c),50,GetUnitX(d),GetUnitY(d),50)
endif
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),600,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and (Angle(GetUnitX(c),GetUnitY(c),GetUnitX(v),GetUnitY(v)) + 360) - (a + 270) <= 10 and (Angle(GetUnitX(c),GetUnitY(c),GetUnitX(v),GetUnitY(v)) + 360) - (a + 270) >= -10 and IsUnitInGroup(v,go) == false then
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(v),GetUnitY(v)))
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),GetUnitFacing(c),1,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),GetUnitFacing(c),1.5,LIGHTNING,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),GetUnitFacing(c),1,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),GetUnitFacing(c),1.5,LIGHTNING3,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),GetUnitFacing(c),4,'h047',1,255,255,255,255)
call DamageTarget(c,v,GetHeroAgi(c,true) * 15,NINJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
set animate = animate + 1
if animate >= 25 then
set animate = 0
call SetUnitAnimationByIndex(c,2)
call SetUnitAnimationByIndex(d,2)
endif
if time <= 0 then
call ReleaseGroup(go)
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(d),GetUnitY(d)))
call DestroyLightning(l)
call PauseUnit(c,false)
call UnitRemoveAbility(c,EFFECTID)
call SetUnitAnimation(c,"stand")
call SetUnitPathing(c,true)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 0
local real x = GetUnitX(caster)
local real y = GetUnitY(caster)
set .c = caster
set .a = angle
set .go = NewGroup()
call PauseUnit(.c,true)
call SetUnitPathing(.c,false)
call DestroyEffect(AddSpecialEffect(EFFECT5,x,y))
call TriggerSleepAction(0)
call SetUnitPosition(c,PolarX(x,300,.a + 90),PolarY(y,300,.a + 90))
set .d = CreateUnit(GetOwningPlayer(c),'h046',PolarX(x,300,.a - 90),PolarY(y,300,.a - 90),.a)
call SetUnitAnimation(.c,"spell one")
call SetUnitAnimation(.d,"spell one")
call TriggerSleepAction(0.2)
call SetUnitAnimation(c,"stand")
call SetUnitAnimation(d,"stand")
set .l = AddLightningEx("CLPB",true,GetUnitX(c),GetUnitY(c),50,GetUnitX(d),GetUnitY(d),50)
call UnitAddAbility(c,EFFECTID)
call UnitAddAbility(d,EFFECTID2)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(d),GetUnitY(d)))
loop
exitwhen i >= 12
set x = PolarX(GetUnitX(c),GetRandomReal(100,300),i * 30)
set y = PolarY(GetUnitY(c),GetRandomReal(100,300),i * 30)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
set x = PolarX(GetUnitX(d),GetRandomReal(100,300),i * 30)
set y = PolarY(GetUnitY(d),GetRandomReal(100,300),i * 30)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
set i = i + 1
endloop
call PolledWait(0.2)
call SetUnitAnimationByIndex(c,2)
call SetUnitAnimationByIndex(d,2)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=21
//TESH.alwaysfold=0
scope CrowIllusion
globals
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
endglobals
private struct data
unit c
unit d
unit t
real r
real time = 1.5
real SecX
real SecY
method destroy takes nothing returns nothing
call RemoveUnit(d)
call .deallocate()
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(d),25,a)
local real y = PolarY(GetUnitY(d),25,a)
call SetUnitPosition(d,x,y)
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 100 then
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DamageTarget(c,t,r,GENJUTSU_DAMAGE)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t))
local real x = GetUnitX(d)
local real y = GetUnitY(d)
set time = time - 0.04
if time <= 0 then
call RemoveUnit(d)
set .d = CreateUnit(GetOwningPlayer(.c),'h04Y',x,y,a)
call TimerStart(z,0.03,true,function data.FinalTimer)
else
if Distance(x,y,SecX,SecY) <= 50 then
call RemoveUnit(d)
set .d = CreateUnit(GetOwningPlayer(.c),'h04Y',x,y,a)
call TimerStart(z,0.03,true,function data.FinalTimer)
endif
endif
endmethod
static method create takes unit caster, unit target, real targetx, real targety, real damage returns thistype
local timer z = NewTimer()
local real a = Angle(GetUnitX(caster),GetUnitY(caster),targetx,targety)
local data this = data.allocate()
set .c = caster
set .t = target
set .r = damage
set .SecX = targetx
set .SecY = targety
set .d = CreateUnit(GetOwningPlayer(.c),'h04X',GetUnitX(.c),GetUnitY(.c),a)
call IssuePointOrder(.d,"move",.SecX,.SecY)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
function CrowIllusion takes unit caster, unit target, real targetx, real targety, real damage returns nothing
call data.create(caster,target,targetx,targety,damage)
endfunction
endscope
//TESH.scrollpos=6
//TESH.alwaysfold=0
scope KarasuBunshin initializer init
globals
private constant integer SPELLID = 'A06H'
private hashtable HT = InitHashtable()
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local player p = GetOwningPlayer(c)
local real r = GetHeroInt(c,true) * 6
call SaveReal(HT,GetHandleId(p),0,r)
call SaveUnitHandle(HT,GetHandleId(p),0,c)
call UnitAddItemById(c,'I02L')
set c = null
set p = null
endfunction
private function Conditions2 takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'B00V') >= 1 and IsUnitIllusion(GetTriggerUnit()) == true
endfunction
private function FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit k = LoadUnitHandle(HS,GetHandleId(z),1)
local integer count = LoadInteger(HS,GetHandleId(z),1)
local real r = LoadReal(HS,GetHandleId(z),0)
local real x = PolarX(GetUnitX(c),GetRandomReal(500,600),GetRandomReal(0,360))
local real y = PolarY(GetUnitY(c),GetRandomReal(500,600),GetRandomReal(0,360))
set count = count - 1
call CrowIllusion(c,k,x,y,r / 12)
call SaveInteger(HS,GetHandleId(z),1,count)
if count <= 0 then
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
endfunction
private function DeadLightning takes nothing returns nothing
local trigger t = GetTriggeringTrigger()
local unit c = GetTriggerUnit()
local unit k = GetKillingUnit()
local real r = LoadReal(HT,GetHandleId(t),0)
local group g
local unit v
local timer z
if IsUnitType(k,UNIT_TYPE_STRUCTURE) == false and k != null then
if IsUnitType(k,UNIT_TYPE_HERO) == true then
set z = NewTimer()
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,k)
call SaveReal(HS,GetHandleId(z),0,r)
call SaveInteger(HS,GetHandleId(z),1,12)
call TimerStart(z,0.02,true,function FinalTimer)
else
set g = NewGroup()
call GroupEnumUnitsInRect(g,GetWorldBounds(),null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if GetOwningPlayer(v) == GetOwningPlayer(k) and IsUnitType(v,UNIT_TYPE_HERO) == true and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(v,'Avul') <= 0 then
exitwhen true
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if v != null then
set z = NewTimer()
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,v)
call SaveReal(HS,GetHandleId(z),0,r)
call SaveInteger(HS,GetHandleId(z),1,12)
call TimerStart(z,0.02,true,function FinalTimer)
endif
endif
endif
call DestroyTrigger(t)
call FlushChildHashtable(HT,GetHandleId(t))
set t = null
set c = null
set k = null
endfunction
private function Actions2 takes nothing returns nothing
local unit n = GetTriggerUnit()
local player p = GetOwningPlayer(n)
local unit c = LoadUnitHandle(HT,GetHandleId(p),0)
local real r = LoadReal(HT,GetHandleId(p),0)
local real xx = PolarX(GetUnitX(c),400,GetUnitFacing(c))
local real yy = PolarY(GetUnitY(c),400,GetUnitFacing(c))
local trigger t = CreateTrigger()
call SaveReal(HT,GetHandleId(t),0,r)
call TriggerRegisterUnitEvent(t,n,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function DeadLightning)
call SetUnitPosition(n,GetUnitX(c),GetUnitY(c))
call IssuePointOrder(n,"move",xx,yy)
call FlushChildHashtable(HT,GetHandleId(p))
set n = null
set c = null
set p = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger t2 = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
call TriggerRegisterEnterRectSimple(t2,bj_mapInitialPlayableArea)
call TriggerAddCondition(t2,Condition(function Conditions2))
call TriggerAddAction(t2,function Actions2)
set t = null
set t2 = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope KatonGougakyuu initializer init
globals
private constant real DISTANCE = 30
private constant real RADIUS = 350
private constant real MAXDIST = 1500
private constant integer SPELLID = 'A06G'
private constant integer ABYSSFIRE90 = 'h009'
private constant integer ABYSSFIRE = 'h005'
private constant integer FIRER = 'h04H'
private constant integer FIREL = 'h04I'
private constant integer XLIGHT = 'h04G'
private constant integer REDDT = 'h02R'
private constant integer BALLFIRE = 'h04B'
private constant integer DUST = 'h00B'
private constant integer SHINY = 'h00C'
private constant integer WAVE = 'h008'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2.mdx"
endglobals
private struct data
unit c
unit d
unit f
unit j
unit array e[30]
integer animate = 0
real scale = 1
real fly = 25
integer count = 0
real FirstX
real FirstY
real SecX
real SecY
method destroy takes nothing returns nothing
local integer i = 1
loop
exitwhen i > count
call KillUnit(e[i])
set i = i + 1
endloop
call RemoveUnit(d)
call KillUnit(f)
call KillUnit(j)
call .deallocate()
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local group g
local unit v
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 30) * 1) / 50
if GetUnitCurrentOrder(c) == OrderId("tornado") then
set g = NewGroup()
call GroupEnumUnitsInRange(g,GetUnitX(d),GetUnitY(d),RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
if GetUnitAbilityLevel(v,'B00U') <= 0 then
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(v),DUMMY,GetUnitX(v),GetUnitY(v),bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A00F')
call IssueTargetOrder(bj_lastCreatedUnit,"slow",v)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.5)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set animate = animate + 1
if animate >= 20 then
set animate = 0
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),GetUnitFacing(c),0.6,'h04W',1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),GetUnitFacing(c),1.5,'h006',1,255,255,255,255)
endif
else
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),SecX,SecY)
local real x = PolarX(GetUnitX(d),20,a)
local real y = PolarY(GetUnitY(d),20,a)
call SetUnitPosition(d,x,y)
if GetUnitCurrentOrder(c) == OrderId("tornado") then
set animate = animate + 1
set scale = scale + 0.14
set fly = fly + 3.5
if animate >= 2 then
set animate = 0
set count = count + 1
set .e[count] = CreateUnit(GetOwningPlayer(c),'h04V',x,y,a)
call SetUnitScale(.e[count],scale,scale,scale)
call SetUnitFlyHeight(.e[count],fly,0)
endif
if Distance(x,y,SecX,SecY) <= 50 then
set animate = 0
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),GetUnitFacing(c),0.6,'h04W',1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),GetUnitFacing(c),1.5,'h006',1,255,255,255,255)
set .j = CreateUnit(GetOwningPlayer(.c),'h04U',GetUnitX(d),GetUnitY(d),a)
call TimerStart(z,0.02,true,function data.FinalTimer)
endif
else
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local real a = Angle(GetUnitX(caster),GetUnitY(caster),targetx,targety)
local data this = data.allocate()
set .c = caster
set .FirstX = PolarX(GetUnitX(.c),50,a)
set .FirstY = PolarY(GetUnitY(.c),50,a)
set .SecX = targetx
set .SecY = targety
set .d = CreateUnit(GetOwningPlayer(.c),'h00L',.FirstX,.FirstY,a)
call SetUnitScale(.d,6,6,6)
set .f = CreateUnit(GetOwningPlayer(.c),'h049',.FirstX,.FirstY,a)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\KatonGougakyuuITachi.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=115
//TESH.alwaysfold=0
scope KatonGoukakyuu2 initializer init
globals
private constant real DISTANCE = 20
private constant real RADIUS = 220
private constant real MAXDIST = 1600
private constant integer FIREBALL = 'h00L'
private constant integer FIREBALL2 = 'h001'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A0D1'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private struct data
unit c
unit d
unit e
real a
real time = 1.2
integer cal
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
local unit b
local integer count = 0
set time = time - 0.02
call SetUnitPosition(d,x,y)
call SetUnitPosition(e,x,y)
set cal = cal + 1
if cal >= 1 then
set cal = 0
if GetRandomReal(1,100) <= 40 then
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
elseif GetRandomReal(1,100) <= 70 then
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
else
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
endif
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set count = count + 1
exitwhen true
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if count >= 1 then
call AreaDamageTimer(c,r,GetUnitX(v),GetUnitY(v),350,NINJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(v),GetUnitY(v)))
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseTimer(z)
call .destroy()
else
if time <= 0 then
call AreaDamageTimer(c,r,GetUnitX(d),GetUnitY(d),350,NINJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(d),GetUnitY(d)))
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseTimer(z)
call .destroy()
endif
endif
endmethod
static method Cooldown takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0D1',true)
call ReleaseTimer(z)
call .destroy()
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local timer z2
local data this = data.allocate()
set .c = caster
set .a = angle
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),.a)
set .e = CreateUnit(GetOwningPlayer(.c),FIREBALL2,GetUnitX(.c),GetUnitY(.c),.a)
set .cal = 0
call SetTimerData(z,this)
call TimerStart(z,0.05,true,function data.TimerExpired)
if GetUnitTypeId(c) != KAKASHI then
set z2 = NewTimer()
call SetTimerData(z2,this)
call TimerStart(z2,20,false,function data.Cooldown)
endif
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\KatonGougakyuuITachi.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=27
//TESH.alwaysfold=0
scope BackStabSelf initializer init
globals
private constant integer SPELLID = 'A06K'
private constant integer DUMMYABILITYID = 'A06L'
private constant integer SPELLID2 = 'A06M'
private constant integer BUFFID = 'B00X'
private constant integer ICENOVA = 'h00S'
private constant integer BLUEBOMB = 'h01C'
private constant integer BLINKBIG = 'h011'
private constant integer DT = 'h01D'
private constant integer FIRAGA = 'h00Z'
private constant string RASEN = "war3mapImported\\Rasengan.mdx"
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\SkyNeutralBuildingExplosion.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private constant string EFFECT6 = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT7 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
private hashtable HT = InitHashtable()
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID and GetUnitAbilityLevel(GetTriggerUnit(),'A06J') <= 1
endfunction
private function FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local group g = CreateGroup()
local unit v
local unit c = LoadUnitHandle(HT,GetHandleId(z),0)
local integer count = 0
call GroupEnumUnitsInRect(g,GetWorldBounds(),null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitAlly(v,GetOwningPlayer(c)) == true and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(v,BUFFID) > 0 and IsUnitIllusion(v) == true then
set count = count + 1
endif
call GroupRemoveUnit(g,v)
endloop
call DestroyGroup(g)
if count <= 0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,false)
call ReleaseTimer(z)
call FlushChildHashtable(HT,GetHandleId(z))
endif
set g = null
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local player p = GetOwningPlayer(c)
local real r = GetHeroInt(c,true) * 3
local real r2 = GetUnitAbilityLevel(c,SPELLID) * 100
local real x = PolarX(GetUnitX(t),120,GetUnitFacing(t) + 180)
local real y = PolarY(GetUnitY(t),120,GetUnitFacing(t) + 180)
local real xx = GetUnitX(c)
local real yy = GetUnitY(c)
local real face = GetUnitFacing(c)
local timer z
call SetUnitPosition(c,x,y)
call SetUnitFacing(c,GetUnitFacing(t))
call SetUnitAnimation(c,"attack")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,DUMMYABILITYID)
call IssueTargetOrderById(bj_lastCreatedUnit,852274,c)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.5)
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(t),GetUnitY(t)))
call StunUnit(c,t,2)
call IssueTargetOrder(c,"attack",t)
call DamageTarget(c,t,r2,TAIJUTSU_DAMAGE)
call SaveReal(HT,GetHandleId(p),0,r)
call SaveReal(HT,GetHandleId(p),1,xx)
call SaveReal(HT,GetHandleId(p),2,yy)
call SaveReal(HT,GetHandleId(p),3,face)
call SaveUnitHandle(HT,GetHandleId(p),0,c)
if GetUnitTypeId(c) != KAKASHI then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,true)
set z = NewTimer()
call SaveUnitHandle(HT,GetHandleId(z),0,c)
call TimerStart(z,0.06,true,function FinalTimer)
endif
set c = null
set p = null
endfunction
private function Conditions2 takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),BUFFID) >= 1 and IsUnitIllusion(GetTriggerUnit()) == true
endfunction
private function DeadLightning takes nothing returns nothing
local trigger t = GetTriggeringTrigger()
local unit c = GetTriggerUnit()
local real r = LoadReal(HT,GetHandleId(t),0)
local integer i = 0
local real x
local real y
local group g
local real a
local unit v
set g = NewGroup()
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),400,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(v),GetUnitY(v))
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call SlideUnitAngle(v,16,0.6,a,"")
call ImpaleUnit(v,0.6)
call SetUnitAnimation(v,"death")
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2.3,DT,1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyTrigger(t)
call FlushChildHashtable(HT,GetHandleId(t))
set t = null
set c = null
endfunction
private function Actions2 takes nothing returns nothing
local unit n = GetTriggerUnit()
local player p = GetOwningPlayer(n)
local unit c = LoadUnitHandle(HT,GetHandleId(p),0)
local real r = LoadReal(HT,GetHandleId(p),0)
local real xx = LoadReal(HT,GetHandleId(p),1)
local real yy = LoadReal(HT,GetHandleId(p),2)
local real face = LoadReal(HT,GetHandleId(p),3)
local trigger t = CreateTrigger()
call SaveReal(HT,GetHandleId(t),0,r)
call TriggerRegisterUnitEvent(t,n,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function DeadLightning)
call SetUnitPosition(n,xx,yy)
call SetUnitFacing(n,face)
call IssueImmediateOrder(n,"holdposition")
call FlushChildHashtable(HT,GetHandleId(p))
set n = null
set c = null
set p = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger t2 = CreateTrigger()
local integer index = 0
call PreloadAbility(DUMMYABILITYID)
call PreloadAbility('A06A')
call PreloadAbility('A02L')
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
call TriggerRegisterEnterRectSimple(t2,bj_mapInitialPlayableArea)
call TriggerAddCondition(t2,Condition(function Conditions2))
call TriggerAddAction(t2,function Actions2)
set t = null
set t2 = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope ShadowBackStab initializer init
globals
private constant integer SPELLID = 'A06K'
private constant integer DUMMYABILITYID = 'A06N'
private constant integer SPELLID2 = 'A06M'
private constant integer BUFFID = 'B00Y'
private constant integer ICENOVA = 'h00S'
private constant integer BLUEBOMB = 'h01C'
private constant integer BLINKBIG = 'h011'
private constant integer DT = 'h01D'
private constant integer FIRAGA = 'h00Z'
private constant string RASEN = "war3mapImported\\Rasengan.mdx"
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\SkyNeutralBuildingExplosion.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private constant string EFFECT6 = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT7 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
private hashtable HT = InitHashtable()
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID and GetUnitAbilityLevel(GetTriggerUnit(),'A06J') == 2
endfunction
private function FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local group g = CreateGroup()
local unit v
local unit c = LoadUnitHandle(HT,GetHandleId(z),0)
local integer count = 0
call GroupEnumUnitsInRect(g,GetWorldBounds(),null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitAlly(v,GetOwningPlayer(c)) == true and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(v,BUFFID) > 0 and IsUnitIllusion(v) == true then
set count = count + 1
endif
call GroupRemoveUnit(g,v)
endloop
call DestroyGroup(g)
if count <= 0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,false)
call ReleaseTimer(z)
call FlushChildHashtable(HT,GetHandleId(z))
endif
set g = null
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local player p = GetOwningPlayer(c)
local real r = GetHeroInt(c,true) * 3
local real r2 = GetUnitAbilityLevel(c,SPELLID) * 100
local real x = PolarX(GetUnitX(t),150,GetUnitFacing(t) + 180)
local real y = PolarY(GetUnitY(t),150,GetUnitFacing(t) + 180)
local real xx = GetUnitX(c)
local real yy = GetUnitY(c)
local real face = GetUnitFacing(t) + 180
local timer z
call IssueImmediateOrder(c,"holdposition")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,DUMMYABILITYID)
call IssueTargetOrderById(bj_lastCreatedUnit,852274,c)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.5)
call DamageTarget(c,t,r2,TAIJUTSU_DAMAGE)
call SaveReal(HT,GetHandleId(p),0,r)
call SaveReal(HT,GetHandleId(p),1,x)
call SaveReal(HT,GetHandleId(p),2,y)
call SaveReal(HT,GetHandleId(p),3,face)
call SaveUnitHandle(HT,GetHandleId(p),0,t)
if GetUnitTypeId(c) != KAKASHI then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,true)
set z = NewTimer()
call SaveUnitHandle(HT,GetHandleId(z),0,c)
call TimerStart(z,0.06,true,function FinalTimer)
endif
set c = null
set p = null
endfunction
private function Conditions2 takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),BUFFID) >= 1 and IsUnitIllusion(GetTriggerUnit()) == true
endfunction
private function DeadLightning takes nothing returns nothing
local trigger t = GetTriggeringTrigger()
local unit c = GetTriggerUnit()
local real r = LoadReal(HT,GetHandleId(t),0)
local integer i = 0
local real x
local real y
local group g
local real a
local unit v
set g = NewGroup()
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),400,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(v),GetUnitY(v))
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call SlideUnitAngle(v,16,0.6,a,"")
call ImpaleUnit(v,0.6)
call SetUnitAnimation(v,"death")
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2.3,DT,1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyTrigger(t)
call FlushChildHashtable(HT,GetHandleId(t))
set t = null
set c = null
endfunction
private function Actions2 takes nothing returns nothing
local unit n = GetTriggerUnit()
local player p = GetOwningPlayer(n)
local unit tt = LoadUnitHandle(HT,GetHandleId(p),0)
local real r = LoadReal(HT,GetHandleId(p),0)
local real xx = LoadReal(HT,GetHandleId(p),1)
local real yy = LoadReal(HT,GetHandleId(p),2)
local real face = LoadReal(HT,GetHandleId(p),3)
local trigger t = CreateTrigger()
call SaveReal(HT,GetHandleId(t),0,r)
call TriggerRegisterUnitEvent(t,n,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function DeadLightning)
call SetUnitPosition(n,xx,yy)
call SetUnitFacing(n,face)
call IssueTargetOrder(n,"attack",tt)
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(tt),GetUnitY(tt)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(tt),GetUnitY(tt)))
call StunUnit(n,tt,2)
call FlushChildHashtable(HT,GetHandleId(p))
set n = null
set tt = null
set p = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger t2 = CreateTrigger()
local integer index = 0
call PreloadAbility(DUMMYABILITYID)
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
call TriggerRegisterEnterRectSimple(t2,bj_mapInitialPlayableArea)
call TriggerAddCondition(t2,Condition(function Conditions2))
call TriggerAddAction(t2,function Actions2)
set t = null
set t2 = null
endfunction
endscope
//TESH.scrollpos=74
//TESH.alwaysfold=0
scope MangekyouSharingan initializer init
globals
private hashtable ITACHI = InitHashtable()
private constant integer SHARINGAN = 'A06O'
private constant string EFFECT = "war3mapImported\\WarpDarkCaster.mdx"
endglobals
private function ActionsLeave takes nothing returns nothing
local unit c = GetTriggerUnit()
local trigger t = LoadTriggerHandle(ITACHI,GetHandleId(c),0)
if t != null then
call DestroyTrigger(t)
endif
set c = null
set t = null
endfunction
private function Conditions takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'Avul') <= 0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) == true
endfunction
private function CheckHero takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),SHARINGAN) >= 1 and GetEventDamage() > 50. and GetPlayerController(GetOwningPlayer(GetEventDamageSource())) == MAP_CONTROL_USER
endfunction
private function FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(ITACHI,GetHandleId(z),0)
local unit k = LoadUnitHandle(ITACHI,GetHandleId(z),1)
local integer count = LoadInteger(ITACHI,GetHandleId(z),1)
local real r = LoadReal(ITACHI,GetHandleId(z),0)
local real x = PolarX(GetUnitX(c),GetRandomReal(500,600),GetRandomReal(0,360))
local real y = PolarY(GetUnitY(c),GetRandomReal(500,600),GetRandomReal(0,360))
set count = count - 1
call CrowIllusion(c,k,x,y,r / 12)
call SaveInteger(ITACHI,GetHandleId(z),1,count)
if count <= 0 then
call ReleaseTimer(z)
call FlushChildHashtable(ITACHI,GetHandleId(z))
endif
endfunction
private function IchigoAction takes nothing returns nothing
local unit t = GetEventDamageSource()
local unit c = GetTriggerUnit()
local timer z
local group g
local unit v
local real r = GetHeroInt(c,true) * 3
if GetRandomReal(1,100) <= 12 then
if IsUnitType(c,UNIT_TYPE_HERO) == true then
set z = NewTimer()
call SaveUnitHandle(ITACHI,GetHandleId(z),0,c)
call SaveUnitHandle(ITACHI,GetHandleId(z),1,t)
call SaveReal(ITACHI,GetHandleId(z),0,r)
call SaveInteger(ITACHI,GetHandleId(z),1,12)
call UnitAddAbility(c,'Apiv')
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call TimerStart(z,0.02,true,function FinalTimer)
call TriggerSleepAction(2)
call UnitRemoveAbility(c,'Apiv')
else
set g = NewGroup()
call GroupEnumUnitsInRect(g,GetWorldBounds(),null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if GetOwningPlayer(v) == GetOwningPlayer(t) and IsUnitType(v,UNIT_TYPE_HERO) == true and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(v,'Avul') <= 0 then
exitwhen true
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if v != null then
set z = NewTimer()
call SaveUnitHandle(ITACHI,GetHandleId(z),0,c)
call SaveUnitHandle(ITACHI,GetHandleId(z),1,v)
call SaveReal(ITACHI,GetHandleId(z),0,r)
call SaveInteger(ITACHI,GetHandleId(z),1,12)
call UnitAddAbility(c,'Apiv')
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call TimerStart(z,0.02,true,function FinalTimer)
call TriggerSleepAction(2)
call UnitRemoveAbility(c,'Apiv')
endif
endif
endif
set c = null
set t = null
set g = null
set v = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local trigger t = CreateTrigger()
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function CheckHero))
call TriggerAddAction(t,function IchigoAction)
call SaveTriggerHandle(ITACHI,GetHandleId(c),0,t)
set t = null
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t2 = CreateTrigger()
local trigger t = CreateTrigger()
call TriggerRegisterEnterRectSimple(t2,bj_mapInitialPlayableArea)
call TriggerAddCondition(t2,Condition(function Conditions))
call TriggerAddAction(t2,function Actions)
call TriggerRegisterLeaveRectSimple(t,bj_mapInitialPlayableArea)
call TriggerAddAction(t,function ActionsLeave)
set t2 = null
set t = null
endfunction
endscope
//TESH.scrollpos=1
//TESH.alwaysfold=0
scope GreatShadowExplosion initializer init
globals
private constant integer SPELLID = 'A06M'
private constant integer BUFFID = 'B00X'
private constant integer BUFFID2 = 'B00Y'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetUnitX(c)
local real y = GetUnitY(c)
local group g = NewGroup()
local unit v
call GroupEnumUnitsInRect(g,GetWorldBounds(),null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitAlly(v,GetOwningPlayer(c)) == true and GetWidgetLife(v) > 0.45 and IsUnitIllusion(v) == true and GetUnitAbilityLevel(v,BUFFID) > 0 or GetUnitAbilityLevel(v,BUFFID2) > 0 then
call KillUnit(v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Tsukuyomi initializer init
globals
private constant real DURATION = 4
private constant integer SPELLID = 'A06P'
private constant integer ITACHI = 'h04Z'
private constant string EFFECT7 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
private constant string EFFECT6 = "Abilities\\Weapons\\SerpentWardMissile\\SerpentWardMissile.mdl"
private constant string EFFECT = "Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl"
endglobals
private struct data
unit c
unit d
unit t
unit j
unit array e[28]
integer animate = 0
real time = 6
integer count = 27
method destroy takes nothing returns nothing
local integer i = 1
call SetUnitTimeScale(t,1)
loop
exitwhen i > 28
call RemoveUnit(e[i])
set i = i + 1
endloop
call PauseUnit(.t,false)
call RemoveUnit(.d)
call RemoveUnit(.j)
call SetUnitAnimation(.t,"death")
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real xx
local real yy
local integer i = 1
local real r = (GetUnitAbilityLevel(c,SPELLID) * 55) / 20
set time = time - 0.05
set xx = PolarX(GetUnitX(t),GetRandomReal(0,120),GetRandomReal(0,360))
set yy = PolarY(GetUnitY(t),GetRandomReal(0,120),GetRandomReal(0,360))
call DestroyEffect(AddSpecialEffect(EFFECT6,xx,yy))
call DestroyEffect(AddSpecialEffect(EFFECT7,xx,yy))
call DamageTarget(c,t,r,GENJUTSU_DAMAGE)
set animate = animate + 1
if animate >= 25 then
set animate = 0
loop
exitwhen i > 28
call SetUnitAnimation(e[i],"spell five")
set i = i + 1
endloop
endif
if time <= 0 then
call StunUnit(c,t,3)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired3 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local integer i = 1
loop
exitwhen i > 28
call SetUnitAnimation(e[i],"spell five")
set i = i + 1
endloop
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(t),GetUnitY(t)))
call TimerStart(z,0.05,true,function data.TimerExpired2)
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x
local real y
local real a
set count = count - 1
if count >= 19 then
set x = PolarX(GetUnitX(t),120,count * 40)
set y = PolarY(GetUnitY(t),120,count * 40)
elseif count >= 10 then
set x = PolarX(GetUnitX(t),200,(count * 40) + 30)
set y = PolarY(GetUnitY(t),200,(count * 40) + 30)
elseif count >= 1 then
set x = PolarX(GetUnitX(t),280,(count * 40) + 60)
set y = PolarY(GetUnitY(t),280,(count * 40) + 60)
endif
if count <= 0 then
call SetUnitTimeScale(t,0)
call TimerStart(z,2,true,function data.TimerExpired3)
else
set a = Angle(x,y,GetUnitX(t),GetUnitY(t))
set .e[count] = CreateUnit(GetOwningPlayer(c),ITACHI,x,y,a)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .t = target
set .d = CreateUnit(GetOwningPlayer(.c),'h051',GetUnitX(.t),GetUnitY(.t),bj_UNIT_FACING)
set .j = CreateUnit(GetOwningPlayer(.c),'h053',GetUnitX(.t),GetUnitY(.t),bj_UNIT_FACING)
call SetUnitVertexColor(.j,255,255,255,125)
call PauseUnit(t,true)
call SetUnitAnimation(t,"stand")
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit v
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Tsukuyomi.mp3",GetUnitX(c),GetUnitY(c))
endif
call data.create(c,t)
set t = null
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=93
//TESH.alwaysfold=0
scope Tsukuyomigear initializer init
globals
private constant real DURATION = 4
private constant integer SPELLID = 'A0CQ'
private constant integer ITACHI = 'h0DN'
private constant string EFFECT7 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
private constant string EFFECT6 = "Abilities\\Weapons\\SerpentWardMissile\\SerpentWardMissile.mdl"
private constant string EFFECT = "Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl"
endglobals
private struct data
unit c
unit d
unit t
unit j
unit array e[28]
integer animate = 0
real time = 6
integer count = 27
method destroy takes nothing returns nothing
local integer i = 1
call SetUnitTimeScale(t,1)
loop
exitwhen i > 28
call RemoveUnit(e[i])
set i = i + 1
endloop
call PauseUnit(.t,false)
call RemoveUnit(.d)
call RemoveUnit(.j)
call SetUnitAnimation(.t,"death")
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real xx
local real yy
local integer i = 1
local real r = (GetUnitAbilityLevel(c,SPELLID) * 200) / 20
set time = time - 0.05
set xx = PolarX(GetUnitX(t),GetRandomReal(0,120),GetRandomReal(0,360))
set yy = PolarY(GetUnitY(t),GetRandomReal(0,120),GetRandomReal(0,360))
call DestroyEffect(AddSpecialEffect(EFFECT6,xx,yy))
call DestroyEffect(AddSpecialEffect(EFFECT7,xx,yy))
call DamageTarget(c,t,r,GENJUTSU_DAMAGE)
set animate = animate + 1
if animate >= 25 then
set animate = 0
loop
exitwhen i > 28
call SetUnitAnimation(e[i],"spell five")
set i = i + 1
endloop
endif
if time <= 0 then
call StunUnit(c,t,3)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired3 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local integer i = 1
loop
exitwhen i > 28
call SetUnitAnimation(e[i],"spell five")
set i = i + 1
endloop
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(t),GetUnitY(t)))
call TimerStart(z,0.05,true,function data.TimerExpired2)
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x
local real y
local real a
set count = count - 1
if count >= 19 then
set x = PolarX(GetUnitX(t),120,count * 40)
set y = PolarY(GetUnitY(t),120,count * 40)
elseif count >= 10 then
set x = PolarX(GetUnitX(t),200,(count * 40) + 30)
set y = PolarY(GetUnitY(t),200,(count * 40) + 30)
elseif count >= 1 then
set x = PolarX(GetUnitX(t),280,(count * 40) + 60)
set y = PolarY(GetUnitY(t),280,(count * 40) + 60)
endif
if count <= 0 then
call SetUnitTimeScale(t,0)
call TimerStart(z,2,true,function data.TimerExpired3)
else
set a = Angle(x,y,GetUnitX(t),GetUnitY(t))
set .e[count] = CreateUnit(GetOwningPlayer(c),ITACHI,x,y,a)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .t = target
set .d = CreateUnit(GetOwningPlayer(.c),'h051',GetUnitX(.t),GetUnitY(.t),bj_UNIT_FACING)
set .j = CreateUnit(GetOwningPlayer(.c),'h053',GetUnitX(.t),GetUnitY(.t),bj_UNIT_FACING)
call SetUnitVertexColor(.j,255,255,255,125)
call PauseUnit(t,true)
call SetUnitAnimation(t,"stand")
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit v
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Tsukuyomi.mp3",GetUnitX(c),GetUnitY(c))
endif
call data.create(c,t)
set t = null
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=11
//TESH.alwaysfold=0
scope Susanoo initializer init
globals
private constant integer SUSANOO = 'h052'
private constant integer SPELLID = 'A06Q'
private constant integer SPELLID2 = 'A06R'
private constant integer BUFFID = 'B00Z'
private constant string EFFECT = "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl"
endglobals
private struct data
unit c
unit d
trigger t
method destroy takes nothing returns nothing
call DestroyTrigger(t)
call RemoveUnit(.d)
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
call SetUnitPosition(d,GetUnitX(c),GetUnitY(c))
call SetUnitFacing(d,GetUnitFacing(c))
if GetUnitAbilityLevel(c,BUFFID) <= 0 then
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method Conditions takes nothing returns boolean
return GetUnitAbilityLevel(GetAttacker(),BUFFID) > 0
endmethod
static method Actions takes nothing returns nothing
local unit t = GetTriggerUnit()
local unit c = GetAttacker()
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
set c = null
set t = null
endmethod
static method create takes unit caster returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer index = 0
set .c = caster
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
set .t = CreateTrigger()
loop
call TriggerRegisterPlayerUnitEvent(.t,Player(index),EVENT_PLAYER_UNIT_ATTACKED,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(.t,Filter(function data.Conditions))
call TriggerAddAction(.t,function data.Actions)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,SPELLID2)
call IssueTargetOrder(bj_lastCreatedUnit,"innerfire",c)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.5)
set .d = CreateUnit(GetOwningPlayer(.c),SUSANOO,GetUnitX(.c),GetUnitY(.c),bj_UNIT_FACING)
call SetUnitVertexColor(.d,255,255,255,125)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=15
//TESH.alwaysfold=0
scope Amaterasuitachi initializer init
globals
private constant real DISTANCE = 35
private constant real RADIUS = 200
private constant real MAXDIST = 1800
private constant integer BALL = 'h0C4'
private constant integer BALL2 = 'h00Y'
private constant integer FIRE = 'h0C2'
private constant integer SHARINGAN = 'h0C3'
private constant integer SPELLID = 'A0BZ'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\DarkNova.mdx"
endglobals
private struct data
unit c
unit d
unit e
real a
real FirstX
real FirstY
group go
real time = 2
integer cal
real xx
real yy
real xtarget
real ytarget
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 120
local integer count = 0
local integer i = 0
set time = time - 0.04
if time > 0 then
set cal = cal + 1
if cal >= 3 then
set cal = 0
call EffectUnitColor(c,x,y,0,1,FIRE,6,255,255,255,255)
endif
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(d,x,y)
call SetUnitPosition(e,x,y)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupAddGroup(go,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
call SetUnitPathing(v,false)
call SetUnitPosition(v,x,y)
call ShowUnit(v,false)
call GroupRemoveUnit(g,v)
endloop
endif
if time <= 0 then
if time == 0 then
set xtarget = GetUnitX(d)
set ytarget = GetUnitY(d)
loop
exitwhen i >= 18
call EffectUnitColor(c,PolarX(GetUnitX(d),400,i * 20),PolarY(GetUnitY(d),400,i * 20),0,0.8,FIRE,6,255,255,255,255)
call EffectUnitColor(c,PolarX(GetUnitX(d),250,i * 20),PolarY(GetUnitY(d),250,i * 20),0,0.8,FIRE,6,255,255,255,255)
call EffectUnitColor(c,PolarX(GetUnitX(d),100,i * 20),PolarY(GetUnitY(d),100,i * 20),0,0.8,FIRE,6,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT6,PolarX(GetUnitX(d),200,i * 20),PolarY(GetUnitY(d),200,i * 20)))
set i = i + 1
endloop
loop
set v = FirstOfGroup(go)
exitwhen v == null
call SetUnitPathing(v,true)
call ShowUnit(v,true)
call AmaterasuUnit(c,v,12,r)
call GroupRemoveUnit(go,v)
endloop
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseGroup(go)
endif
call GroupEnumUnitsInRange(g,xtarget,ytarget,400,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and GetUnitAbilityLevel(v,'B00C') <= 0 then
call AmaterasuUnit(c,v,12,r)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupEnumUnitsInRange(g,xx,yy,Distance(xx,yy,xtarget,ytarget),null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and GetUnitAbilityLevel(v,'B00C') <= 0 then
if (Angle(xx,yy,xtarget,ytarget) + 360) - (Angle(xx,yy,GetUnitX(v),GetUnitY(v)) + 360) <= 10 and (Angle(xx,yy,xtarget,ytarget) + 360) - (Angle(xx,yy,GetUnitX(v),GetUnitY(v)) + 360) >= -10 then
call AmaterasuUnit(c,v,12,r)
endif
endif
call GroupRemoveUnit(g,v)
endloop
if time <= -6 then
call ReleaseTimer(z)
call .destroy()
endif
endif
call ReleaseGroup(g)
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .go = NewGroup()
set .c = caster
set .cal = 0
set .a = angle
set .xx = GetUnitX(c)
set .yy = GetUnitY(c)
set .d = CreateUnit(GetOwningPlayer(.c),BALL,xx,yy,.a)
set .e = CreateUnit(GetOwningPlayer(.c),FIRE,xx,yy,.a)
call SetUnitScale(.e,2.5,2.5,2.5)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
local unit d = CreateUnit(GetOwningPlayer(c),SHARINGAN,GetUnitX(c),GetUnitY(c),a)
call SetUnitTimeScale(d,5)
call PauseUnit(c,true)
call PolledWait(0.6)
call SetUnitTimeScale(d,0)
call PolledWait(0.5)
call data.create(c,a)
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Itachia.mp3",GetUnitX(c),GetUnitY(c))
endif
call PolledWait(0.3)
call RemoveUnit(d)
call PauseUnit(c,false)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope NamizakiRasengan initializer init
globals
private constant integer SPELLID = 'A07O'
private constant integer SPELLID2 = 'A00O'
private constant integer BUFFID = 'B013'
private constant integer ICENOVA = 'h00S'
private constant integer NARUTO = 'h062'
private constant integer BLUEBOMB = 'h0CF'
private constant integer STONEDARK = 'h0CB'
private constant integer STONE = 'h0CA'
private constant integer DT = 'h0CC'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT3 = "war3mapImported\\NewDirtEXNofire.mdx.mdx"
private constant string EFFECT4 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\NewDirtEXNofire.mdx.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private function AbilityCheck takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
if GetUnitAbilityLevel(c,BUFFID) <= 0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,false)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local integer i = 0
local real x = PolarX(GetUnitX(c),120,GetUnitFacing(c) - 90)
local real y = PolarY(GetUnitY(c),120,GetUnitFacing(c) - 90)
local timer z
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),NARUTO,x,y,GetUnitFacing(c) + 90)
call SetUnitAnimation(bj_lastCreatedUnit,"spell three")
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.6)
if GetUnitTypeId(c) != KAKASHI then
set z = NewTimer()
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,true)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call TimerStart(z,0.05,true,function AbilityCheck)
endif
set c = null
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function ActionsAttacked takes nothing returns nothing
local unit c = GetAttacker()
local unit t = GetTriggerUnit()
local real x
local real y
local real r = (GetUnitAbilityLevel(c,SPELLID) + 2) * GetHeroAgi(c,true)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\NamikazeRansengan2.mp3",GetUnitX(t),GetUnitY(t))
endif
call UnitRemoveAbility(c,BUFFID)
call IssueImmediateOrder(c,"stop")
call SetUnitAnimation(c,"spell one")
call TriggerSleepAction(0.)
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),3,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),3,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),1.0,DT,1,255,255,255,255)
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call SlideUnitAngle(t,26,0.6,a,EFFECT)
set c = null
set t = null
endfunction
private function ConditionsAttacked takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker())) == true and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE) == false and GetUnitAbilityLevel(GetAttacker(),BUFFID) >= 1
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger t2 = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call TriggerRegisterPlayerUnitEvent(t2,Player(index),EVENT_PLAYER_UNIT_ATTACKED,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
call TriggerAddCondition(t2,Condition(function ConditionsAttacked))
call TriggerAddAction(t2,function ActionsAttacked)
set t = null
set t2 = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope ThrowKnives initializer init
globals
private group getzugagroup = CreateGroup()
private unit getzugacast
endglobals
private function MultiInstanceFilter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(getzugacast))==true and GetUnitAbilityLevel(GetFilterUnit(),'Avul') != 1 and GetWidgetLife(GetFilterUnit()) > 0.45 and IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE)==false and IsUnitInGroup(GetFilterUnit(),getzugagroup) == false
endfunction
private function Trig_Getzuga_Tenshou_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A07R'
endfunction
private function getzugadamage takes nothing returns nothing
local timer z = GetExpiredTimer()
local real a = LoadReal(udg_HashGame,0,GetHandleId(z))
local unit c = LoadUnitHandle(udg_HashGame,0,GetHandleId(z))
local unit array d
local integer i = 1
local real x
local real y
local real im
local group g = CreateGroup()
local unit v
local unit e
local real r = GetUnitAbilityLevel(c,'A07R') * 100
set a = a - 40
set d[1] = LoadUnitHandle(udg_HashGame,1,GetHandleId(z))
set d[2] = LoadUnitHandle(udg_HashGame,2,GetHandleId(z))
set d[3] = LoadUnitHandle(udg_HashGame,3,GetHandleId(z))
set d[4] = LoadUnitHandle(udg_HashGame,4,GetHandleId(z))
set d[5] = LoadUnitHandle(udg_HashGame,5,GetHandleId(z))
loop
exitwhen i > 5
set x = PolarX(GetUnitX(d[i]),38,a)
set y = PolarY(GetUnitY(d[i]),38,a)
call SetUnitPosition(d[i],x,y)
call SetUnitFacing(d[i],a)
call GroupEnumUnitsInRange(g,x,y,140,Condition(function MultiInstanceFilter))
loop
set v = FirstOfGroup(g)
exitwhen v==null
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",GetUnitX(v),GetUnitY(v)))
call UnitDamageTarget(c,v,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
call GroupRemoveUnit(g,v)
call GroupAddUnit(getzugagroup,v)
endloop
set a = a + 20
set i = i + 1
endloop
call DestroyGroup(g)
set d[1] = null
set d[2] = null
set d[3] = null
set d[4] = null
set d[5] = null
set g = null
set z = null
set c = null
set e = null
endfunction
private function Trig_Getzuga_Tenshou_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local real a = anglebetweenpoints(GetUnitX(c),GetUnitY(c),x,y)
local timer z = CreateTimer()
local unit array d
set getzugacast = GetTriggerUnit()
call GroupClear(getzugagroup)
set d[1] = CreateUnit(GetOwningPlayer(c),'h070',GetUnitX(c),GetUnitY(c),a - 40)
set d[2] = CreateUnit(GetOwningPlayer(c),'h070',GetUnitX(c),GetUnitY(c),a - 20)
set d[3] = CreateUnit(GetOwningPlayer(c),'h070',GetUnitX(c),GetUnitY(c),a)
set d[4] = CreateUnit(GetOwningPlayer(c),'h070',GetUnitX(c),GetUnitY(c),a + 20)
set d[5] = CreateUnit(GetOwningPlayer(c),'h070',GetUnitX(c),GetUnitY(c),a + 40)
call SaveUnitHandle(udg_HashGame,0,GetHandleId(z),c)
call SaveUnitHandle(udg_HashGame,1,GetHandleId(z),d[1])
call SaveUnitHandle(udg_HashGame,2,GetHandleId(z),d[2])
call SaveUnitHandle(udg_HashGame,3,GetHandleId(z),d[3])
call SaveUnitHandle(udg_HashGame,4,GetHandleId(z),d[4])
call SaveUnitHandle(udg_HashGame,5,GetHandleId(z),d[5])
call PlaySoundBJ( gg_snd_Shurikenjustu1 )
call SaveReal(udg_HashGame,0,GetHandleId(z),a)
call TimerStart(z,0.04,true,function getzugadamage)
call TriggerSleepAction(1)
call PauseTimer(z)
call DestroyTimer(z)
call RemoveUnit(d[1])
call RemoveUnit(d[2])
call RemoveUnit(d[3])
call RemoveUnit(d[4])
call RemoveUnit(d[5])
set z = null
set c = null
set getzugacast = null
set d[1] = null
set d[2] = null
set d[3] = null
set d[4] = null
set d[5] = null
endfunction
//===========================================================================
private function init takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function Trig_Getzuga_Tenshou_Conditions ) )
call TriggerAddAction( t, function Trig_Getzuga_Tenshou_Actions )
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope LeeSpeed initializer init
globals
private constant integer SPELLID = 'A07S'
private constant integer DUMMYID = 'h024'
private constant integer TIME = 11
private constant string EFFECT = "war3mapImported\\Skyring.mdx"
endglobals
private function Trig_Lee_HighSpeed_Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function LeeMove takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(udg_HashGame,0,GetHandleId(z))
local unit t = LoadUnitHandle(udg_HashGame,1,GetHandleId(z))
local integer count = LoadInteger(udg_HashGame,0,GetHandleId(z))
local integer count2 = LoadInteger(udg_HashGame,1,GetHandleId(z))
local real x = GetUnitX(t)
local real y = GetUnitY(t)
local real ra = GetRandomReal(0,360)
local real raa = GetRandomReal(300,500)
local real xx = PolarX(x,150,ra)
local real yy = PolarY(y,150,ra)
local real xxx
local real yyy
local real a
local real x1
local real r = (GetUnitAbilityLevel(c,SPELLID) + 2) * GetHeroAgi(c,true)
local real y1
local integer i = 1
set count = count + 1
if count2 <= 0 then
set count2 = count2 + 1
set a = anglebetweenpoints(GetUnitX(c),GetUnitY(c),x,y)
set xxx = PolarX(x,150,a)
set yyy = PolarY(y,150,a)
call SetUnitPosition(c,xx,yy)
call SetUnitAnimation(c,"attack")
call SetUnitFacing(c,a)
call SlideUnitAngleDamageLee(t,c,20,0.2,a,0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl",GetUnitX(t),GetUnitY(t)))
else
set count2 = 0
set x1 = PolarX(x,raa,ra)
set y1 = PolarY(y,raa,ra)
call SetUnitPosition(c,x1,y1)
set a = anglebetweenpoints(GetUnitX(c),GetUnitY(c),x,y)
call SetUnitFacing(c,a)
call DestroyEffect(AddSpecialEffect(EFFECT,x1,y1))
endif
if count >= TIME then
call SlideUnitAngleDamageLee(t,c,20,0.2,a,r)
call PauseUnit(c,false)
call SetUnitTimeScale(c,1)
call DestroyTimer(z)
call FlushChildHashtable(udg_HashGame,GetHandleId(z))
endif
call SaveInteger(udg_HashGame,1,GetHandleId(z),count2)
call SaveInteger(udg_HashGame,0,GetHandleId(z),count)
set z = null
set c = null
set t = null
endfunction
private function Trig_Lee_HighSpeed_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local timer z = CreateTimer()
call PauseUnit(c,true)
call SetUnitTimeScale(c,3)
call SaveUnitHandle(udg_HashGame,0,GetHandleId(z),c)
call SaveUnitHandle(udg_HashGame,1,GetHandleId(z),t)
call SaveInteger(udg_HashGame,0,GetHandleId(z),0)
call SaveInteger(udg_HashGame,1,GetHandleId(z),0)
call TimerStart(z,0.2,true,function LeeMove)
set c = null
set t = null
set z = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition(t, Condition( function Trig_Lee_HighSpeed_Conditions ) )
call TriggerAddAction(t, function Trig_Lee_HighSpeed_Actions )
endfunction
endscope
//TESH.scrollpos=42
//TESH.alwaysfold=0
scope HiraishiCombo initializer init
globals
private constant real RADIUS = 350
private constant integer SPELLID = 'A07T'
private constant integer MAXHIT = 26
private constant string EFFECT = "war3mapImported\\EarthDetonation.mdx"
private constant string EFFECT2 = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT5 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
endglobals
private struct data
unit c
unit t
integer hit = 0
effect e
method destroy takes nothing returns nothing
call DestroyEffect(e)
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = GetRandomReal(0,360)
local real x = PolarX(GetUnitX(t),120,r)
local real y = PolarY(GetUnitY(t),120,r)
local integer i = 0
local real dam = GetUnitAbilityLevel(c,SPELLID) * 15
local real a = Angle(x,y,GetUnitX(t),GetUnitY(t))
call SetUnitPosition(c,x,y)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,x,y))
call SetUnitAnimation(c,"attack")
call SetUnitFacing(c,a)
call DamageTarget(c,t,dam,TAIJUTSU_DAMAGE)
set hit = hit + 1
if hit >= MAXHIT then
call PauseUnit(.c,false)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(.c,true)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 0
local real x
local real y
local real a = Angle(GetUnitX(caster),GetUnitY(caster),GetUnitX(target),GetUnitY(target))
set .c = caster
set .t = target
set e = AddSpecialEffectTarget("war3mapImported\\Blue Laser Ray.mdx",c,"weapon")
call PauseUnit(.c,true)
call SetUnitInvulnerable(c,true)
call SetUnitPathing(.c,false)
call SetUnitTimeScale(c,5)
call SetTimerData(z,this)
call TimerStart(z,0.15,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\minatocombo2.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=47
//TESH.alwaysfold=0
scope Comborasengan initializer init
globals
private constant integer SPELLID = 'A0C5'
private constant string EFFECT = "war3mapImported\\Shockwave(kirito).mdx"
private constant string EFFECT2 = "war3mapImported\\DTKuning.mdx"
private constant string EFFECT3 = "war3mapImported\\DTKuning.mdx"
private constant string EFFECT4 = "war3mapImported\\ice2.mdx"
private constant string EFFECT5 = "war3mapImported\\VoidDrown.mdx"
private constant string EFFECT6 = "war3mapImported\\ice2.mdx"
endglobals
private function Periodic takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local integer int = LoadInteger(HS,GetHandleId(z),0)
local real a = LoadReal(HS,GetHandleId(z),1)
local real r = GetRandomReal(45,55)
local real x = PolarX(GetUnitX(c),r,a)
local real y = PolarY(GetUnitY(c),r,a)
set int = int + 1
call SetUnitX(c,x)
call SetUnitY(c,y)
call SaveInteger(HS,GetHandleId(z),0,int)
if int >= 6 then
call SetUnitAnimation(t,"death")
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set c = null
set t = null
endfunction
private function PlayAnimation takes unit caster, unit target, real ang, string anim, real time returns nothing
local timer z = CreateTimer()
call SetUnitAnimationByIndex(caster,15)
call SoundStart("war3mapImported\\SlashKiritoz.mp3",GetUnitX(caster),GetUnitY(caster))
call SaveUnitHandle(HS,GetHandleId(z),0,caster)
call SaveUnitHandle(HS,GetHandleId(z),1,target)
call SaveInteger(HS,GetHandleId(z),0,0)
call SaveReal(HS,GetHandleId(z),1,ang)
call TimerStart(z,0.04,true,function Periodic)
set z = null
endfunction
private struct data
unit c
unit t
integer count = 0
effect e
real time = 0.3
real dist
method damage takes nothing returns real
return I2R ( GetHeroAgi(c,true) * 15 )
endmethod
method destroy takes nothing returns nothing
call PauseUnit(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(c,false)
call SetUnitInvulnerable(t,false)
call UnitDamageTarget(c,t,.damage(),true,true,null,DAMAGE_TYPE_DIVINE,null)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
call DestroyEffect(e)
call .deallocate()
endmethod
static method periodic3 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
call SetUnitAnimation(c,"attack")
call ReleaseTimer(z)
call .destroy()
set z = null
endmethod
static method periodic4 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
call SoundStart("war3mapImported\\KiritoWhak3z.mp3",GetUnitX(c),GetUnitY(c))
call ShakeGroupCamera(2,GetUnitX(c),GetUnitY(c),1000,12)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),270,6.0,'h0C7',3,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),270,5,'h0C6',0.5,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(t),GetUnitY(t)))
call TimerStart(z,1,false,function data.periodic3)
endmethod
static method periodic takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = GetRandomReal(0,360)
local real xx = PolarX(GetUnitX(t),GetRandomReal(90,150),r)
local real yy = PolarY(GetUnitY(t),GetRandomReal(90,150),r)
local real a
set time = time - 0.02
if time <= 0 then
set time = 0.3
call SetUnitPosition(c,xx,yy)
set a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
call PlayAnimation(c,t,r + 180,"Spell one",0.3)
call SetUnitFacing(c,a)
set count = count + 1
if count >= 24 then
set a = Angle(GetUnitX(t),GetUnitY(t),GetUnitX(c),GetUnitY(c))
call SetUnitFacing(c,a)
call SetUnitTimeScale(c,0.5)
call SetUnitAnimation(c,"Spell one")
call TimerStart(z,1.15,false,function data.periodic4)
endif
endif
set z = null
endmethod
static method periodic2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = GetRandomReal(0,360)
local real x = PolarX(GetUnitX(t),150,r)
local real y = PolarY(GetUnitY(t),150,r)
call SetUnitTimeScale(c,1.5)
call SetUnitPosition(c,x,y)
call SetUnitFacing(c,r + 180)
call PlayAnimation(c,t,r + 180,"attack",0.3)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call TimerStart(z,0.02,true,function data.periodic)
set z = null
endmethod
static method create takes unit caster, unit target returns data
local data this = data.allocate()
local timer z = CreateTimer()
set c = caster
set t = target
call PauseUnit(c,true)
call PauseUnit(t,true)
call SetUnitInvulnerable(c,true)
call SetUnitInvulnerable(t,true)
call SetUnitPathing(c,false)
call SetUnitAnimation(c,"Spell")
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(c),GetUnitY(c)))
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,4,'h0C8',0.5,255,255,255,155)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,3,'h0C9',0.5,255,255,255,155)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call SoundStart("war3mapImported\\Yondaimer.mp3",GetUnitX(c),GetUnitY(c))
call SetTimerData(z,this)
call TimerStart(z,0.5,true,function data.periodic2)
set z = null
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
call data.create(c,t)
set c = null
set t = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope SensaHattenshou initializer init
globals
private constant integer SPELLID = 'A0DE'
private constant string EFFECTATT = "Abilities\\Weapons\\SerpentWardMissile\\SerpentWardMissile11.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
private constant string EFFECT7 = "war3mapImported\\FreezingRing.mdx.mdx"
private constant string EFFECT5 = "war3mapImported\\fireworkswhite.mdxx"
private constant string EFFECT4 = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
private constant string EFFECT6 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
private constant string EFFECT8 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
private constant integer FIRE2 = 'h08O'
private constant integer FIRE3 = 'h08O'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local integer count = LoadInteger(HS,GetHandleId(z),0)
local real a = LoadReal(HS,GetHandleId(z),1)
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 2) + 0) * GetHeroAgi(c,true)
local unit d
local real random = GetRandomReal(-45,45)
set count = count + 1
if t == null then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
if count >= 10 then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call SetUnitTimeScale(c,1)
call SlideUnitAngle(t,15,0.5,a,"")
call DamageTarget(c,t,r,TAIJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),2))
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),3))
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
call SaveInteger(HS,GetHandleId(z),0,count)
call SetUnitAnimation(c,"Attack - 1")
call SetUnitAnimation(t,"Attack - 2")
call DestroyEffect(AddSpecialEffect(EFFECT8,GetUnitX(t),GetUnitY(t)))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h0EL',GetUnitX(c),GetUnitY(c),a + random)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1.3)
call SlideUnitAngle(bj_lastCreatedUnit,2,2.2,a + random,"")
call EffectUnitColor(c,PolarX(GetUnitX(t),-170,a),PolarX(GetUnitY(t),-170,a),a,GetRandomReal(0.4,1.7),'h0EM',1,255,255,255,255)
endif
endif
set c = null
set t = null
set d = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local integer i = 0
local timer z = NewTimer()
local effect array e
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\paljum2.mp3",GetUnitX(c),GetUnitY(c))
endif
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call PauseUnit(t,true)
call SetUnitInvulnerable(t,true)
call SetUnitTimeScale(c,3)
call ShakeGroupCamera(0.0,GetUnitX(c),GetUnitY(c),800,25)
set e[1] = AddSpecialEffectTarget(EFFECTATT,c,"hand right")
set e[2] = AddSpecialEffectTarget(EFFECTATT,c,"hand left")
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,4,FIRE2,4.5,255,255,255,255)
call SetUnitPosition(c,PolarX(GetUnitX(t),-120,a),PolarY(GetUnitY(t),-120,a))
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,t)
call SaveEffectHandle(HS,GetHandleId(z),2,e[1])
call SaveEffectHandle(HS,GetHandleId(z),3,e[2])
call SaveInteger(HS,GetHandleId(z),0,0)
call SaveReal(HS,GetHandleId(z),1,a)
call TimerStart(z,0.14,true,function TimerExpired)
set c = null
set t = null
set e[1] = null
set e[2] = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Seansa initializer init
globals
private constant integer SPELLID = 'A0DG'
private constant string EFFECT = "war3mapImported\\Shockwave(Blue).mdx"
private constant string EFFECT2 = "war3mapImported\\LightningNova.mdx"
private constant string EFFECT3 = "war3mapImported\\Dead Spirit by Deckai2.mdx"
private constant string EFFECT4 = "war3mapImported\\effect_ReiatsuOverFlowbyDeckai.mdx"
private constant string EFFECT5 = "war3mapImported\\Shockwave Blue.mdx"
private constant real RADIUS = 250
endglobals
private struct data
unit c
integer count = 0
real time = 0.2
real a
group go
method damage takes nothing returns real
return I2R(GetUnitAbilityLevel(c,SPELLID) * 100)
endmethod
method destroy takes nothing returns nothing
call GroupClear(go)
call DestroyGroup(go)
call PauseUnit(c,false)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
call .deallocate()
endmethod
static method periodic takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(c),120,a)
local real y = PolarY(GetUnitY(c),120,a)
local unit v
local group g = CreateGroup()
set time = time - 0.02
set count = count + 1
call GroupEnumUnitsInRange(g,x,y,RADIUS,null)
for v in g
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and IsUnitInGroup(v,go) == false and GetUnitAbilityLevel(v,'Avul') == 0 then
call GroupAddUnit(go,v)
call UnitDamageTarget(c,v,.damage(),true,true,null,DAMAGE_TYPE_DIVINE,null)
endif
endfor
call DestroyGroup(g)
if count >= 1 then
set count = 0
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,1,'h0AF',0.5,255,255,255,55)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,3,'h0AC',0.5,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
endif
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,x,y)
endif
if time <= 0 then
call ReleaseTimer(z)
call .destroy()
endif
set z = null
set g = null
set v = null
endmethod
static method periodic2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
call SetUnitTimeScale(c,2.5)
call SetUnitAnimationByIndex(c,5)
call SoundStart("war3mapImported\\Sensa.mp3",GetUnitX(c),GetUnitY(c))
call TimerStart(z,0.02,true,function data.periodic)
set z = null
endmethod
static method create takes unit caster, real angle returns data
local data this = data.allocate()
local timer z = CreateTimer()
set c = caster
set a = angle
set .go = CreateGroup()
call PauseUnit(c,true)
call SetUnitPathing(c,false)
call SetUnitAnimation(c,"attack")
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,4,'h0AC',0.5,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call SoundStart("war3mapImported\\1.mp3",GetUnitX(c),GetUnitY(c))
call SetTimerData(z,this)
call TimerStart(z,0.75,true,function data.periodic2)
set z = null
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
call data.create(c,a)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=12
//TESH.alwaysfold=0
scope Scoppio initializer init
globals
private constant real DISTANCE = 30
private constant real RADIUS = 220
private constant integer SPELLID = 'A004'
private constant integer ABYSSFIRE90 = 'h009'
private constant integer ABYSSFIRE = 'h005'
private constant integer REDDT = 'h02R'
private constant integer BALLFIRE = 'h02S'
private constant integer DUST = 'h00B'
private constant integer SHINY = 'h00C'
private constant integer WAVE = 'h008'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private struct data
unit c
unit d
real a
real time = 1
integer cal
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = (GetUnitAbilityLevel(c,SPELLID) + 3) * GetHeroAgi(c,true)
local unit b
local integer count = 0
set time = time - 0.02
if GetWidgetLife(d) > 0.45 then
call SetUnitPosition(d,x,y)
set cal = cal + 1
if cal >= 1 then
set cal = 0
call EffectUnitColor(c,x,y,.a,0.17,BALLFIRE,0.35,255,255,255,255)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set count = count + 1
exitwhen true
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if count >= 1 then
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),.a,3,ABYSSFIRE,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),.a,2,REDDT,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),.a,3.5,'h021',1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(v),GetUnitY(v)))
call AreaDamageTimer(c,r,GetUnitX(v),GetUnitY(v),300,NINJUTSU_DAMAGE)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
else
if time <= 0 then
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),.a,3,ABYSSFIRE,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),.a,2,REDDT,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),.a,3.5,'h021',1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(d),GetUnitY(d)))
call AreaDamageTimer(c,r,GetUnitX(d),GetUnitY(d),300,NINJUTSU_DAMAGE)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
endif
else
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
call PauseUnit(c,true)
call TriggerSleepAction(0.)
call SetUnitAnimation(c,"spell channel")
call PolledWait(0.5)
call PauseUnit(c,false)
set .d = CreateUnit(GetOwningPlayer(.c),BALLFIRE,GetUnitX(.c),GetUnitY(.c),.a)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),.a,2,ABYSSFIRE90,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),.a,1,SHINY,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),.a,1.5,ABYSSFIRE,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,3.5,'h02C',1,255,255,255,55)
set .cal = 0
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call SoundStart("war3mapImported\\GunEffect.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\ScopeoDela.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Bocciolo initializer init
globals
private constant real DISTANCE = 600
private constant real RADIUS = 220
private constant integer SPELLID = 'A002'
private constant integer ABYSSFIRE90 = 'h009'
private constant integer ABYSSFIRE = 'h005'
private constant integer REDDT = 'h02R'
private constant integer BALLFIRE = 'h02S'
private constant integer DUST = 'h00B'
private constant integer SHINY = 'h00C'
private constant integer WAVE = 'h008'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\Slam.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private struct data2
unit c
unit t
unit d
real range
real damg
real time = 0.60
real fly
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data2 this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(d),range,a)
local real y = PolarY(GetUnitY(d),range,a)
call SetUnitPosition(d,x,y)
call SetUnitFlyHeight(d,GetUnitFlyHeight(d) - fly,0)
set time = time - 0.02
if time <= 0 then
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(d),GetUnitY(d)))
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),a,1,'h021',1,255,255,255,255)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
elseif Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 50 then
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),a,1,'h021',1,255,255,255,255)
call StunUnit(c,t,0.5)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target, real damage returns thistype
local timer z = NewTimer()
local data2 this = data2.allocate()
set .c = caster
set .t = target
set damg = damage
set .d = CreateUnit(GetOwningPlayer(c),'h02S',GetUnitX(caster),GetUnitY(caster),0)
call SetUnitFlyHeight(d,600,0)
call SetUnitScale(d,0.3,0.3,0.3)
set range = Distance(GetUnitX(.c),GetUnitY(c),GetUnitX(t),GetUnitY(t)) / 20
set fly = GetUnitFlyHeight(d) / 20
call SetTimerData(z,this)
call TimerStart(z,0.03,true,function data2.TimerExpired)
return this
endmethod
endstruct
private struct data
unit c
unit t
integer hit = 30
integer cal = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(t),GetUnitY(t),GetUnitX(c),GetUnitY(c)) + 1.5
local real x = PolarX(GetUnitX(t),DISTANCE,a)
local real y = PolarY(GetUnitY(t),DISTANCE,a)
local real r = GetUnitAbilityLevel(c,SPELLID) * 6
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,x,y)
endif
call SetUnitFacing(c,a + 180)
set cal = cal + 1
if cal >= 10 then
set cal = 0
set hit = hit - 1
call SoundStart("war3mapImported\\SoundGun.mp3",GetUnitX(c),GetUnitY(c))
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call SetUnitAnimation(c,"spell channel three")
call data2.create(c,t,50)
endif
if hit <= 0 then
call PauseUnit(c,false)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
call SetUnitInvulnerable(c,false)
call SetUnitFlyHeight(c,0,0)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .t = target
call UnitAddAbility(c,'Amrf')
call UnitRemoveAbility(c,'Amrf')
call PauseUnit(c,true)
call SetUnitPathing(c,false)
call SetUnitInvulnerable(c,true)
call SetUnitTimeScale(c,3)
call SetUnitFlyHeight(c,450,0)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Borchero.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Boccioloz initializer init
globals
private constant real DISTANCE = 600
private constant real RADIUS = 220
private constant integer SPELLID = 'A0E8'
private constant integer ABYSSFIRE90 = 'h009'
private constant integer ABYSSFIRE = 'h005'
private constant integer REDDT = 'h02R'
private constant integer BALLFIRE = 'h02S'
private constant integer DUST = 'h00B'
private constant integer SHINY = 'h00C'
private constant integer WAVE = 'h008'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\Slam.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private struct data2
unit c
unit t
unit d
real range
real damg
real time = 0.60
real fly
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data2 this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(d),range,a)
local real y = PolarY(GetUnitY(d),range,a)
call SetUnitPosition(d,x,y)
call SetUnitFlyHeight(d,GetUnitFlyHeight(d) - fly,0)
set time = time - 0.02
if time <= 0 then
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(d),GetUnitY(d)))
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),a,1,'h021',1,255,255,255,255)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
elseif Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 50 then
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),a,1,'h021',1,255,255,255,255)
call StunUnit(c,t,0.5)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target, real damage returns thistype
local timer z = NewTimer()
local data2 this = data2.allocate()
set .c = caster
set .t = target
set damg = damage
set .d = CreateUnit(GetOwningPlayer(c),'h02S',GetUnitX(caster),GetUnitY(caster),0)
call SetUnitFlyHeight(d,600,0)
call SetUnitScale(d,0.3,0.3,0.3)
set range = Distance(GetUnitX(.c),GetUnitY(c),GetUnitX(t),GetUnitY(t)) / 20
set fly = GetUnitFlyHeight(d) / 20
call SetTimerData(z,this)
call TimerStart(z,0.03,true,function data2.TimerExpired)
return this
endmethod
endstruct
private struct data
unit c
unit t
integer hit = 30
integer cal = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(t),GetUnitY(t),GetUnitX(c),GetUnitY(c)) + 1.5
local real x = PolarX(GetUnitX(t),DISTANCE,a)
local real y = PolarY(GetUnitY(t),DISTANCE,a)
local real r = GetUnitAbilityLevel(c,SPELLID) * 6
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,x,y)
endif
call SetUnitFacing(c,a + 180)
set cal = cal + 1
if cal >= 10 then
set cal = 0
set hit = hit - 1
call SoundStart("war3mapImported\\SoundGun.mp3",GetUnitX(c),GetUnitY(c))
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call SetUnitAnimation(c,"spell channel three")
call data2.create(c,t,50)
endif
if hit <= 0 then
call PauseUnit(c,false)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
call SetUnitInvulnerable(c,false)
call SetUnitFlyHeight(c,0,0)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .t = target
call UnitAddAbility(c,'Amrf')
call UnitRemoveAbility(c,'Amrf')
call PauseUnit(c,true)
call SetUnitPathing(c,false)
call SetUnitInvulnerable(c,true)
call SetUnitTimeScale(c,3)
call SetUnitFlyHeight(c,450,0)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Borchero.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=94
//TESH.alwaysfold=0
scope Colpo initializer init
globals
private constant real DISTANCE = 30
private constant real RADIUS = 450
private constant integer SPELLID = 'A003'
private constant integer ABYSSFIRE90 = 'h009'
private constant integer ABYSSFIRE = 'h005'
private constant integer REDDT = 'h02R'
private constant integer BALLFIRE = 'h02S'
private constant integer DUST = 'h00B'
private constant integer SHINY = 'h00C'
private constant integer WAVE = 'h008'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private struct data
unit c
unit d
unit e
real time = 0.8
real dist
real fly
real a
real x
real y
integer cal
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x
local real y
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
set x = PolarX(GetUnitX(d),dist,a)
set y = PolarY(GetUnitY(d),dist,a)
call SetUnitPosition(d,x,y)
call SetUnitFlyHeight(d,GetUnitFlyHeight(d) - fly,0)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),BALLFIRE,x,y,0)
call SetUnitScale(bj_lastCreatedUnit,0.1,0.1,0.1)
call SetUnitFlyHeight(bj_lastCreatedUnit,GetUnitFlyHeight(d),0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.3)
set x = PolarX(GetUnitX(e),dist,a)
set y = PolarY(GetUnitY(e),dist,a)
call SetUnitPosition(e,x,y)
call SetUnitFlyHeight(e,GetUnitFlyHeight(e) - fly,0)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),BALLFIRE,x,y,0)
call SetUnitScale(bj_lastCreatedUnit,0.10,0.10,0.10)
call SetUnitFlyHeight(bj_lastCreatedUnit,GetUnitFlyHeight(e),0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.3)
set time = time - 0.02
if time <= 0 then
call RemoveUnit(e)
call RemoveUnit(d)
call PauseUnit(c,false)
call SetUnitFlyHeight(c,0,0)
call SetUnitTimeScale(c,1)
call AreaDamageTimer(c,r,x,y,RADIUS,NINJUTSU_DAMAGE)
call EffectUnitColor(c,x,y,.a,4.5,'h01T',1,255,255,255,255)
call EffectUnitColor(c,x,y,.a,3,ABYSSFIRE,1,255,255,255,255)
call EffectUnitColor(c,x,y,.a,2,REDDT,1,255,255,255,255)
call EffectUnitColor(c,x,y,.a,3.5,'h021',1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT4,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT5,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT6,x,y))
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .x = targetx
set .y = targety
set .a = Angle(GetUnitX(c),GetUnitY(c),x,y)
call UnitAddAbility(c,'Amrf')
call UnitRemoveAbility(c,'Amrf')
call SetUnitFlyHeight(c,460,0)
set .dist = Distance(GetUnitX(c),GetUnitY(c),x,y) / 40
set .fly = 600 / 40
call PauseUnit(c,true)
call SetUnitAnimation(c,"spell channel two")
call PolledWait(0.85)
set .d = CreateUnit(GetOwningPlayer(c),BALLFIRE,PolarX(GetUnitX(c),50,a + 90),PolarY(GetUnitY(c),50,a + 90),0)
call SetUnitFlyHeight(d,600,0)
call SetUnitScale(d,1,1,1)
set .e = CreateUnit(GetOwningPlayer(c),BALLFIRE,PolarX(GetUnitX(c),50,a - 90),PolarY(GetUnitY(c),50,a - 90),0)
call SetUnitFlyHeight(e,600,0)
call SetUnitScale(e,1,1,1)
call SetUnitTimeScale(c,0)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call SoundStart("war3mapImported\\GunEffect.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Colpo Di Aldio.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=21
//TESH.alwaysfold=0
scope Martello initializer init
globals
private constant real DISTANCE = 600
private constant real RADIUS = 270
private constant integer SPELLID = 'A02I'
private constant integer ABYSSFIRE90 = 'h009'
private constant integer ABYSSFIRE = 'h005'
private constant integer REDDT = 'h02R'
private constant integer BALLFIRE = 'h02S'
private constant integer DUST = 'h00B'
private constant integer SHINY = 'h00C'
private constant integer WAVE = 'h008'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\Slam.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private struct data2
unit c
unit t
unit d
real range
real damg
real time = 0.60
real fly
real xx
real yy
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data2 this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),xx,yy)
local real x = PolarX(GetUnitX(d),range,a)
local real y = PolarY(GetUnitY(d),range,a)
local real r = GetUnitAbilityLevel(c,SPELLID) * 35
call SetUnitPosition(d,x,y)
call SetUnitFlyHeight(d,GetUnitFlyHeight(d) - fly,0)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),BALLFIRE,x,y,0)
call SetUnitScale(bj_lastCreatedUnit,0.1,0.1,0.1)
call SetUnitFlyHeight(bj_lastCreatedUnit,GetUnitFlyHeight(d),0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.15)
set time = time - 0.02
if time <= 0 then
call AreaDamageTimer(c,r,GetUnitX(d),GetUnitY(d),RADIUS,NINJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(d),GetUnitY(d)))
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),a,1,'h021',1,255,255,255,255)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
elseif Distance(x,y,xx,yy) <= 50 then
call AreaDamageTimer(c,r,xx,yy,RADIUS,NINJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT3,xx,yy))
call EffectUnitColor(c,xx,yy,a,1,'h021',1,255,255,255,255)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real targetx, real targety, real damage returns thistype
local timer z = NewTimer()
local data2 this = data2.allocate()
set .c = caster
set .xx = targetx
set .yy = targety
set damg = damage
set .d = CreateUnit(GetOwningPlayer(c),BALLFIRE,GetUnitX(c),GetUnitY(c),0)
call SetUnitFlyHeight(d,600,0)
call SetUnitScale(d,0.3,0.3,0.3)
set range = Distance(GetUnitX(.c),GetUnitY(c),xx,yy) / 20
set fly = 600 / 20
call SetTimerData(z,this)
call TimerStart(z,0.03,true,function data2.TimerExpired)
return this
endmethod
endstruct
private struct data
unit c
real x
real y
integer hit = 40
integer cal = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real xx = PolarX(x,GetRandomReal(0,450),GetRandomReal(0,360))
local real yy = PolarY(y,GetRandomReal(0,450),GetRandomReal(0,360))
call SetUnitAnimation(c,"spell channel two")
call SoundStart("war3mapImported\\SoundGun.mp3",GetUnitX(c),GetUnitY(c))
set hit = hit - 1
call data2.create(c,xx,yy,50)
if hit <= 0 then
call PauseUnit(c,false)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
call SetUnitInvulnerable(c,false)
call SetUnitFlyHeight(c,0,0)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set x = targetx
set y = targety
call UnitAddAbility(c,'Amrf')
call UnitRemoveAbility(c,'Amrf')
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call SetUnitTimeScale(c,3)
call SetUnitFlyHeight(c,450,0)
call SetTimerData(z,this)
call TimerStart(z,0.15,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call SoundStart("war3mapImported\\GunEffect.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Mantelo Defiemma.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Martellogear initializer init
globals
private constant real DISTANCE = 600
private constant real RADIUS = 270
private constant integer SPELLID = 'A0CO'
private constant integer ABYSSFIRE90 = 'h009'
private constant integer ABYSSFIRE = 'h005'
private constant integer REDDT = 'h02R'
private constant integer BALLFIRE = 'h02S'
private constant integer DUST = 'h00B'
private constant integer SHINY = 'h00C'
private constant integer WAVE = 'h008'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\Slam.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private struct data2
unit c
unit t
unit d
real range
real damg
real time = 0.60
real fly
real xx
real yy
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data2 this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),xx,yy)
local real x = PolarX(GetUnitX(d),range,a)
local real y = PolarY(GetUnitY(d),range,a)
local real r = (GetUnitAbilityLevel(c,SPELLID) + 1) * GetHeroAgi(c,true)
call SetUnitPosition(d,x,y)
call SetUnitFlyHeight(d,GetUnitFlyHeight(d) - fly,0)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),BALLFIRE,x,y,0)
call SetUnitScale(bj_lastCreatedUnit,0.1,0.1,0.1)
call SetUnitFlyHeight(bj_lastCreatedUnit,GetUnitFlyHeight(d),0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.15)
set time = time - 0.02
if time <= 0 then
call AreaDamageTimer(c,r,GetUnitX(d),GetUnitY(d),RADIUS,NINJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(d),GetUnitY(d)))
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),a,1,'h021',1,255,255,255,255)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
elseif Distance(x,y,xx,yy) <= 50 then
call AreaDamageTimer(c,r,xx,yy,RADIUS,NINJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT3,xx,yy))
call EffectUnitColor(c,xx,yy,a,1,'h021',1,255,255,255,255)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real targetx, real targety, real damage returns thistype
local timer z = NewTimer()
local data2 this = data2.allocate()
set .c = caster
set .xx = targetx
set .yy = targety
set damg = damage
set .d = CreateUnit(GetOwningPlayer(c),BALLFIRE,GetUnitX(c),GetUnitY(c),0)
call SetUnitFlyHeight(d,600,0)
call SetUnitScale(d,0.3,0.3,0.3)
set range = Distance(GetUnitX(.c),GetUnitY(c),xx,yy) / 20
set fly = 600 / 20
call SetTimerData(z,this)
call TimerStart(z,0.03,true,function data2.TimerExpired)
return this
endmethod
endstruct
private struct data
unit c
real x
real y
integer hit = 40
integer cal = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real xx = PolarX(x,GetRandomReal(0,450),GetRandomReal(0,360))
local real yy = PolarY(y,GetRandomReal(0,450),GetRandomReal(0,360))
call SetUnitAnimation(c,"spell channel two")
call SoundStart("war3mapImported\\SoundGun.mp3",GetUnitX(c),GetUnitY(c))
set hit = hit - 1
call data2.create(c,xx,yy,50)
if hit <= 0 then
call PauseUnit(c,false)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
call SetUnitInvulnerable(c,false)
call SetUnitFlyHeight(c,0,0)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set x = targetx
set y = targety
call UnitAddAbility(c,'Amrf')
call UnitRemoveAbility(c,'Amrf')
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call SetUnitTimeScale(c,3)
call SetUnitFlyHeight(c,450,0)
call SetTimerData(z,this)
call TimerStart(z,0.15,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call SoundStart("war3mapImported\\GunEffect.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Mantelo Defiemma.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope LigreTempesta initializer init
globals
private constant real DISTANCE = 30
private constant real RADIUS = 220
private constant integer SPELLID = 'A02J'
private constant integer TIGER = 'h02T'
private constant integer ABYSSFIRE90 = 'h009'
private constant integer ABYSSFIRE = 'h005'
private constant integer WAVE = 'h008'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Other\\HowlOfTerror\\HowlCaster.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\NightElf\\Taunt\\TauntCaster.mdl"
private constant string EFFECT5 = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"
private constant string EFFECT4 = "Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl"
private constant string EFFECT6 = "Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local real xx = GetUnitX(c)
local real yy = GetUnitY(c)
local real x1
local real y1
local real a = Angle(xx,yy,x,y)
local unit d = CreateUnit(GetOwningPlayer(c),TIGER,xx,yy,a)
local integer i = 0
local group g
local group ignore = NewGroup()
local unit v
call SoundStart("war3mapImported\\XanxusGoDeath.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call SetUnitAnimation(d,"spell")
call PolledWait(0.2)
call EffectUnitColor(c,xx,yy,a,2,ABYSSFIRE90,1,255,255,255,255)
loop
exitwhen i >= 6
set g = NewGroup()
set x1 = PolarX(xx,i * 150,a)
set y1 = PolarY(yy,i * 150,a)
call DestroyEffect(AddSpecialEffect(EFFECT,x1,y1))
call DestroyEffect(AddSpecialEffect(EFFECT2,x1,y1))
call DestroyEffect(AddSpecialEffect(EFFECT3,x1,y1))
call DestroyEffect(AddSpecialEffect(EFFECT4,x1,y1))
call DestroyEffect(AddSpecialEffect(EFFECT5,x1,y1))
call GroupEnumUnitsInRange(g,x1,y1,300,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,ignore) == false then
call StoneUnit(c,v,4,1100)
call GroupAddUnit(ignore,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
call TriggerSleepAction(0)
set i = i + 1
endloop
call ReleaseGroup(ignore)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(d),GetUnitY(d)))
call RemoveUnit(d)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=29
//TESH.alwaysfold=0
scope ZeroPoint initializer init
globals
private constant integer SPELLID = 'A068'
private constant string EFFECT = "war3mapImported\\DivineRage.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function DamageFullLife takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
call SetWidgetLife(c,GetUnitState(c,UNIT_STATE_MAX_LIFE))
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
set c = null
set z = null
endfunction
private function Actions2 takes nothing returns nothing
local unit c = GetTriggerUnit()
local real r = GetEventDamage() * 2
local real life = GetWidgetLife(c)
local timer z
if life + r >= GetUnitState(c,UNIT_STATE_MAX_LIFE) then
set z = CreateTimer()
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call TimerStart(z,0.00,false,function DamageFullLife)
else
call SetWidgetLife(c,life + r)
endif
set z = null
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetUnitX(c)
local real y = GetUnitY(c)
local integer i = 0
local integer index = 0
local real xx
local real yy
local real random
local trigger t = CreateTrigger()
call PauseUnit(c,true)
call TriggerSleepAction(0)
call SetUnitAnimation(c,"spell channel")
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_DAMAGED)
call TriggerAddAction(t,function Actions2)
loop
exitwhen i >= 9
set index = 0
loop
exitwhen index >= 9
set xx = PolarX(x,120,index * 40)
set yy = PolarY(y,120,index * 40)
call DestroyEffect(AddSpecialEffect(EFFECT,xx,yy))
set index = index + 1
endloop
set index = 0
loop
exitwhen index >= 4
set random = GetRandomReal(0,360)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h04C',GetUnitX(c),GetUnitY(c),random)
call SetUnitScale(bj_lastCreatedUnit,0.8,0.8,0.8)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1.3)
call SlideUnitAngle(bj_lastCreatedUnit,25,1,random,"")
set index = index + 1
endloop
call DestroyEffect(AddSpecialEffectTarget(EFFECT,c,"hand"))
call DestroyEffect(AddSpecialEffectTarget(EFFECT,c,"head"))
call TriggerSleepAction(0.4)
set i = i + 1
endloop
call DestroyTrigger(t)
call PauseUnit(c,false)
set c = null
set t = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions) )
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope ZeroPointFirst initializer init
globals
private constant real DISTANCE = 25
private constant real RADIUS = 250
private constant integer SPELLID = 'A069'
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT3 = "war3mapImported\\IceNova.mdx"
private constant string EFFECT = "war3mapImported\\HolyStrike.mdx"
private constant string EFFECT2 = "Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl"
endglobals
private struct data
unit c
real time = 1.5
real x
real y
group go
integer animate = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),x,y)
local real xx = PolarX(GetUnitX(c),DISTANCE,a)
local real yy = PolarY(GetUnitY(c),DISTANCE,a)
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
local group g = NewGroup()
local unit v
local unit d
set time = time - 0.02
if IsTerrainPathable(xx,yy,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,xx,yy)
else
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call ReleaseTimer(z)
call ReleaseGroup(go)
call .destroy()
endif
call SetUnitPosition(c,xx,yy)
set animate = animate + 1
if animate >= 3 then
set animate = 0
if GetRandomReal(1,100) <= 50 then
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
call DestroyEffect(AddSpecialEffect(EFFECT,xx,yy))
else
call DestroyEffect(AddSpecialEffect(EFFECT3,xx,yy))
call DestroyEffect(AddSpecialEffect(EFFECT4,xx,yy))
endif
endif
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call FreezeUnit(c,v,2)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if Distance(x,y,xx,yy) <= 50 then
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call ReleaseTimer(z)
call ReleaseGroup(go)
call .destroy()
endif
set d = null
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .x = targetx
set .y = targety
set .go = NewGroup()
call SetUnitInvulnerable(.c,true)
call SetUnitPathing(.c,false)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
call SoundStart("war3mapImported\\Zero1.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=10
//TESH.alwaysfold=0
scope HyperXStream initializer init
globals
private constant real DISTANCE = 400
private constant real RADIUS = 450
private constant integer SPELLID = 'A06B'
private constant integer TORNADO = 'h02P'
private constant integer FIRESMOKE = 'h04A'
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT3 = "war3mapImported\\IceNova.mdx"
private constant string EFFECT = "war3mapImported\\HolyStrike.mdx"
private constant string EFFECT2 = "Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl"
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2.mdx"
endglobals
private struct data
unit c
real time = 3
real x
real y
group go
integer animate = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(x,y,GetUnitX(c),GetUnitY(c)) + 3.4
local real xx = PolarX(x,400,a)
local real yy = PolarY(y,400,a)
local real r = (GetUnitAbilityLevel(c,SPELLID) * 1200) / 150
local group g = NewGroup()
local unit v
local unit d
set time = time - 0.02
call SetUnitPosition(c,xx,yy)
if time >= 1.5 then
call SetUnitFlyHeight(c,GetUnitFlyHeight(c) + 7,0)
else
call SetUnitFlyHeight(c,GetUnitFlyHeight(c) - 7,0)
endif
call SetUnitFacing(c,a + 120)
call SetUnitAnimation(c,"walk alternate")
set animate = animate + 1
if animate >= 5 then
set animate = 0
call DestroyEffect(AddSpecialEffect(EFFECT6,x,y))
endif
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call PauseUnit(v,true)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupAddGroup(go,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
if Distance(GetUnitX(v),GetUnitY(v),x,y) > 400 then
call GroupRemoveUnit(go,v)
call PauseUnit(v,false)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
loop
set v = FirstOfGroup(go)
exitwhen v == null
call PauseUnit(v,false)
call GroupRemoveUnit(go,v)
endloop
call PauseUnit(c,false)
call SetUnitFlyHeight(c,0,0)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call ReleaseTimer(z)
call ReleaseGroup(go)
call .destroy()
endif
set d = null
endmethod
static method create takes unit caster returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 0
local real xx
local real yy
set .c = caster
set .x = GetUnitX(.c)
set .y = GetUnitY(.c)
set .go = NewGroup()
call PauseUnit(.c,true)
set xx = PolarX(.x,400,0)
set yy = PolarY(.y,400,0)
call SetUnitPosition(.c,xx,yy)
call SetUnitFacing(c,Angle(xx,yy,GetUnitX(c),GetUnitY(c)) + 120)
call SetUnitInvulnerable(.c,true)
call SetUnitPathing(.c,false)
call UnitAddAbility(.c,'Amrf')
call UnitRemoveAbility(.c,'Amrf')
call DestroyEffect(AddSpecialEffect(EFFECT6,x,y))
call EffectUnitColor(.c,x,y,90,1.5,TORNADO,3.3,255,255,255,255)
call EffectUnitColor(.c,x,y,270,1.5,TORNADO,3.3,255,255,255,255)
loop
exitwhen i >= 9
set xx = PolarX(x,360,i * 40)
set yy = PolarY(y,360,i * 40)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRESMOKE,xx,yy,270)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',3.3)
set xx = PolarX(x,240,(i * 60) + 30)
set yy = PolarY(y,240,(i * 60) + 30)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRESMOKE,xx,yy,270)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call SetUnitFlyHeight(bj_lastCreatedUnit,200,0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',3.3)
set xx = PolarX(x,120,(i * 60) + 60)
set yy = PolarY(y,120,(i * 60) + 60)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRESMOKE,xx,yy,270)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call SetUnitFlyHeight(bj_lastCreatedUnit,300,0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',3.3)
set i = i + 1
endloop
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\XStream.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=102
//TESH.alwaysfold=0
scope Xcannons initializer init
globals
private constant real DISTANCE = 30
private constant real RADIUS = 220
private constant integer SPELLID = 'A072'
private constant integer ABYSSFIRE90 = 'h009'
private constant integer ABYSSFIRE = 'h005'
private constant integer REDDT = 'h02R'
private constant integer BALLFIRE = 'h02S'
private constant integer DUST = 'h00B'
private constant integer SHINY = 'h00C'
private constant integer WAVE = 'h008'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private struct data
unit c
unit d
real a
real time = 1
integer cal
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = (GetUnitAbilityLevel(c,SPELLID) + 2) * GetHeroAgi(c,true)
local unit b
local integer count = 0
set time = time - 0.02
if GetWidgetLife(d) > 0.45 then
call SetUnitPosition(d,x,y)
set cal = cal + 1
if cal >= 1 then
set cal = 0
call EffectUnitColor(c,x,y,.a,0.17,BALLFIRE,0.35,255,255,255,255)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set count = count + 1
exitwhen true
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if count >= 1 then
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),.a,3,ABYSSFIRE,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),.a,2,REDDT,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),.a,3.5,'h021',1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(v),GetUnitY(v)))
call AreaDamageTimer(c,r,GetUnitX(v),GetUnitY(v),300,NINJUTSU_DAMAGE)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
else
if time <= 0 then
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),.a,3,ABYSSFIRE,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),.a,2,REDDT,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),.a,3.5,'h021',1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(d),GetUnitY(d)))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(d),GetUnitY(d)))
call AreaDamageTimer(c,r,GetUnitX(d),GetUnitY(d),300,NINJUTSU_DAMAGE)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
endif
else
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
call PauseUnit(c,true)
call TriggerSleepAction(0.)
call SetUnitAnimation(c,"spell throw")
call PolledWait(0.5)
call PauseUnit(c,false)
set .d = CreateUnit(GetOwningPlayer(.c),BALLFIRE,GetUnitX(.c),GetUnitY(.c),.a)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),.a,2,ABYSSFIRE90,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),.a,1,SHINY,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),.a,1.5,ABYSSFIRE,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,3.5,'h02C',1,255,255,255,55)
set .cal = 0
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call SoundStart("war3mapImported\\GunEffect.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
endif
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=87
//TESH.alwaysfold=0
scope Xcannon initializer init
globals
private constant real DISTANCE = 21
private constant real RADIUS = 350
private constant real MAXDIST = 1200
private constant integer SPELLID = 'A06C'
private constant integer ABYSSFIRE90 = 'h009'
private constant integer ABYSSFIRE = 'h005'
private constant integer REDDT = 'h02R'
private constant integer BALLFIRE = 'h04B'
private constant integer DUST = 'h00B'
private constant integer SHINY = 'h00C'
private constant integer WAVE = 'h008'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2.mdx"
endglobals
private struct data
unit c
unit d
unit d2
unit t
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local real r = (GetUnitAbilityLevel(c,SPELLID) + 1) * GetHeroAgi(c,true)
local unit v
local integer i = 0
call SetUnitPosition(d,x,y)
set a = Angle(GetUnitX(d2),GetUnitY(d2),GetUnitX(t),GetUnitY(t))
set x = PolarX(GetUnitX(d2),DISTANCE,a)
set y = PolarY(GetUnitY(d2),DISTANCE,a)
call SetUnitPosition(d2,x,y)
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 50 then
loop
exitwhen i >= 9
set x = PolarX(GetUnitX(t),200,i * 40)
set y = PolarY(GetUnitY(t),200,i * 40)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT4,x,y))
set i = i + 1
endloop
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),3,ABYSSFIRE,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2,REDDT,1,255,255,255,255)
call RemoveUnit(d)
call RemoveUnit(d2)
call ReleaseTimer(z)
call .destroy()
endif
set v = null
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local real a
local data this = data.allocate()
set .c = caster
set .t = target
set a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
set .d = CreateUnit(GetOwningPlayer(.c),BALLFIRE,PolarX(GetUnitX(.c),100,a + 90),PolarY(GetUnitY(.c),100,a + 90),Angle(GetUnitX(.c),GetUnitY(.c),GetUnitX(.t),GetUnitY(.t)))
set .d2 = CreateUnit(GetOwningPlayer(.c),BALLFIRE,PolarX(GetUnitX(.c),100,a - 90),PolarY(GetUnitY(.c),100,a - 90),Angle(GetUnitX(.c),GetUnitY(.c),GetUnitX(.t),GetUnitY(.t)))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(c),GetUnitY(c)))
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call SoundStart("war3mapImported\\GunEffect.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=27
//TESH.alwaysfold=0
scope XBurner initializer init
globals
private constant real DISTANCE = 30
private constant real RADIUS = 350
private constant real MAXDIST = 1500
private constant integer SPELLID = 'A06D'
private constant integer ABYSSFIRE90 = 'h009'
private constant integer ABYSSFIRE = 'h005'
private constant integer FIRER = 'h04H'
private constant integer FIREL = 'h04I'
private constant integer XLIGHT = 'h04G'
private constant integer REDDT = 'h02R'
private constant integer BALLFIRE = 'h04B'
private constant integer DUST = 'h00B'
private constant integer SHINY = 'h00C'
private constant integer WAVE = 'h008'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2.mdx"
endglobals
private struct data
unit c
real a
unit fr
unit fl
real time = 4.2
integer animate = 0
real DistSave = 0
real DistSave2 = 0
real FirstX
real FirstY
real SecX
real SecY
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(FirstX,DistSave,a)
local real y = PolarY(FirstY,DistSave,a)
local group g
local group g2
local integer i = 0
local real xx
local real yy
local unit v
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 200) + 50) / 10
if GetUnitCurrentOrder(c) == OrderId("tornado") then
set animate = animate + 1
if animate >= 5 then
set animate = 0
call EffectUnitColor(c,x,y,a,1.2,XLIGHT,1.5,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(c),GetUnitY(c)))
set x = PolarX(SecX,DistSave,a - 180)
set y = PolarY(SecY,DistSave,a - 180)
call EffectUnitColor(c,x,y,a,0.75,'h04J',1.5,255,255,255,255)
set g2 = NewGroup()
loop
exitwhen i >= 10
set xx = PolarX(GetUnitX(c),-300 + (i*60),a + 90)
set yy = PolarY(GetUnitY(c),-300 + (i*60),a + 90)
set g = NewGroup()
call GroupEnumUnitsInRange(g,xx,yy,MAXDIST + 300,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and (Angle(xx,yy,GetUnitX(v),GetUnitY(v)) + 360) - (a + 360) <= 6 and (Angle(xx,yy,GetUnitX(v),GetUnitY(v)) + 360) - (a + 360) >= -6 then
call GroupAddUnit(go,v)
call PauseUnit(v,true)
if IsUnitInGroup(v,g2) == false then
call GroupAddUnit(g2,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set i = i + 1
endloop
loop
set v = FirstOfGroup(g2)
exitwhen v == null
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call GroupRemoveUnit(g2,v)
endloop
call ReleaseGroup(g2)
endif
set DistSave = DistSave + DISTANCE
if DistSave >= MAXDIST then
set DistSave = 0
endif
else
loop
set v = FirstOfGroup(go)
exitwhen v == null
call PauseUnit(v,false)
call GroupRemoveUnit(go,v)
endloop
call ReleaseGroup(go)
call RemoveUnit(fr)
call RemoveUnit(fl)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(SecX,DistSave2,a - 180)
local real y = PolarY(SecY,DistSave2,a - 180)
if GetUnitCurrentOrder(c) == OrderId("tornado") then
set time = time - 0.02
set animate = animate + 1
if animate >= 5 then
set animate = 0
call EffectUnitColor(c,x,y,a,0.8,'h04J',1.5,255,255,255,255)
endif
set DistSave2 = DistSave2 + DISTANCE
if DistSave2 >= MAXDIST then
set DistSave2 = 0
endif
if time == 0.8 and GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\XBurner.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
if time == 0.4 then
call SetUnitAnimation(c,"spell two")
endif
if time <= 0 then
set animate = 0
set .fr = CreateUnit(GetOwningPlayer(.c),FIRER,GetUnitX(c),GetUnitY(c),.a)
call SetUnitScale(.fr,2.5,2.5,2.5)
call TimerStart(z,0.02,true,function data.FinalTimer)
endif
else
call RemoveUnit(fr)
call RemoveUnit(fl)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local group g = NewGroup()
local unit v
call GroupEnumUnitsInRect(g,bj_mapInitialPlayableArea,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitType(v,UNIT_TYPE_STRUCTURE) == false then
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(v),DUMMY,GetUnitX(v),GetUnitY(v),bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A06F')
call IssueTargetOrder(bj_lastCreatedUnit,"slow",v)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.5)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set .c = caster
set .a = angle
set .go = NewGroup()
set .FirstX = PolarX(GetUnitX(.c),250,.a)
set .FirstY = PolarY(GetUnitY(.c),250,.a)
set .SecX = PolarX(GetUnitX(.c),250,.a - 180)
set .SecY = PolarY(GetUnitY(.c),250,.a - 180)
set .fl = CreateUnit(GetOwningPlayer(.c),FIREL,GetUnitX(c),GetUnitY(c),.a - 180)
call SetUnitScale(.fl,2.5,2.5,2.5)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call SoundStart("war3mapImported\\XBurnerFire.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=24
//TESH.alwaysfold=0
scope XXBurner initializer init
globals
private constant real DISTANCE = 30
private constant real RADIUS = 500
private constant integer SPELLID = 'A06E'
private constant integer ABYSSFIRE90 = 'h009'
private constant integer ABYSSFIRE = 'h005'
private constant integer REDDT = 'h02R'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
private constant string EFFECT7 = "war3mapImported\\SolarBlast2.mdx"
endglobals
private struct data
unit c
unit d
unit w
real time = 7
real dist
real fly
real a
real x
real y
group go
integer animate = 0
integer cal = 0
effect array f[3]
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x
local real y
local real r = 950 / 50
local group g
local unit v
set x = PolarX(GetUnitX(d),dist,a)
set y = PolarY(GetUnitY(d),dist,a)
call SetUnitPosition(d,x,y)
call SetUnitFlyHeight(d,GetUnitFlyHeight(d) - fly,0)
set animate = animate + 1
if animate >= 3 then
set animate = 0
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h04G',x,y,0)
call SetUnitScale(bj_lastCreatedUnit,0.75,0.75,0.75)
call SetUnitFlyHeight(bj_lastCreatedUnit,GetUnitFlyHeight(d),0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.8)
endif
set cal = cal + 1
if cal >= 10 then
set cal = 0
call DestroyEffect(AddSpecialEffect(EFFECT5,.x,.y))
call EffectUnitColor(c,.x,.y,.a,3,ABYSSFIRE,1,255,255,255,255)
call EffectUnitColor(c,.x,.y,.a,4,'h04D',1,255,255,255,255)
call EffectUnitColor(c,.x,.y,.a,4,'h04D',1,255,255,255,255)
endif
set g = NewGroup()
call GroupEnumUnitsInRange(g,.x,.y,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call GroupAddUnit(go,v)
call PauseUnit(v,true)
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if GetUnitFlyHeight(d) <= 0.2 then
call SetUnitFlyHeight(d,650,0)
call SetUnitPosition(d,PolarX(GetUnitX(c),200,a),PolarY(GetUnitY(c),200,a))
endif
set time = time - 0.02
if time <= 0 then
loop
set v = FirstOfGroup(go)
exitwhen v == null
call PauseUnit(v,false)
call GroupRemoveUnit(go,v)
endloop
call ReleaseGroup(go)
call DestroyEffect(.f[1])
call DestroyEffect(.f[2])
call RemoveUnit(d)
call RemoveUnit(w)
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetUnitFlyHeight(c,0,0)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local group g = NewGroup()
local unit v
call GroupEnumUnitsInRect(g,bj_mapInitialPlayableArea,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitType(v,UNIT_TYPE_STRUCTURE) == false then
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(v),DUMMY,GetUnitX(v),GetUnitY(v),bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A06F')
call IssueTargetOrder(bj_lastCreatedUnit,"slow",v)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.5)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set .c = caster
set .x = targetx
set .y = targety
set .go = NewGroup()
set .a = Angle(GetUnitX(c),GetUnitY(c),x,y)
call UnitAddAbility(c,'Amrf')
call UnitRemoveAbility(c,'Amrf')
call SetUnitFlyHeight(c,550,0)
set .dist = Distance(GetUnitX(c),GetUnitY(c),x,y) / 20
set .fly = 650/20
set .f[1] = AddSpecialEffectTarget(EFFECT7,c,"hand right")
set .f[2] = AddSpecialEffectTarget(EFFECT7,c,"hand left")
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call SetUnitAnimation(c,"spell three")
call TriggerSleepAction(3.5)
if Distance(GetUnitX(.c),GetUnitY(.c),.x,.y) <= 300 then
set .w = CreateUnit(GetOwningPlayer(.c),'h04N',GetUnitX(.c),GetUnitY(.c),a)
elseif Distance(GetUnitX(.c),GetUnitY(.c),.x,.y) <= 400 then
set .w = CreateUnit(GetOwningPlayer(.c),'h04R',GetUnitX(.c),GetUnitY(.c),a)
elseif Distance(GetUnitX(.c),GetUnitY(.c),.x,.y) <= 500 then
set .w = CreateUnit(GetOwningPlayer(.c),'h04K',GetUnitX(.c),GetUnitY(.c),a)
elseif Distance(GetUnitX(.c),GetUnitY(.c),.x,.y) <= 600 then
set .w = CreateUnit(GetOwningPlayer(.c),'h04Q',GetUnitX(.c),GetUnitY(.c),a)
elseif Distance(GetUnitX(.c),GetUnitY(c),.x,.y) <= 700 then
set .w = CreateUnit(GetOwningPlayer(.c),'h04L',GetUnitX(.c),GetUnitY(.c),a)
elseif Distance(GetUnitX(.c),GetUnitY(.c),.x,.y) <= 800 then
set .w = CreateUnit(GetOwningPlayer(.c),'h04P',GetUnitX(.c),GetUnitY(.c),a)
elseif Distance(GetUnitX(.c),GetUnitY(.c),.x,.y) <= 900 then
set .w = CreateUnit(GetOwningPlayer(.c),'h04M',GetUnitX(.c),GetUnitY(.c),a)
elseif Distance(GetUnitX(.c),GetUnitY(.c),.x,.y) <= 1000 then
set .w = CreateUnit(GetOwningPlayer(.c),'h04O',GetUnitX(.c),GetUnitY(.c),a)
endif
set .d = CreateUnit(GetOwningPlayer(c),DUMMY,PolarX(GetUnitX(c),200,a),PolarY(GetUnitY(c),200,a),0)
call SetUnitFlyHeight(d,650,0)
call SetUnitScale(d,1,1,1)
call SetUnitTimeScale(c,0)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=74
//TESH.alwaysfold=0
scope WaterSlash initializer init
globals
private constant real DISTANCE = 25
private constant real RADIUS = 350
private constant integer SPELLID = 'A0CY'
private constant integer OODAMABALL = 'h01E'
private constant integer ICENOVA = 'h0DT'
private constant integer NARUTO = 'h01B'
private constant integer BLUEBOMB = 'h0DS'
private constant integer BLINKBIG = 'h011'
private constant integer DT = 'h0DU'
private constant integer FIRAGA = 'h00Z'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\WaterBullet.mdx"
private constant string EFFECT3 = "war3mapImported\\WaterBullet.mdx"
private constant string EFFECT4 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
endglobals
private struct data
unit c
unit t
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 2) + 6) * GetHeroStr(c,true)
local integer i = 0
call SetUnitPosition(c,x,y)
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 120 then
call PauseUnit(.c,false)
call SetUnitPathing(.c,true)
call SetUnitTimeScale(c,1)
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
loop
exitwhen i >= 9
set x = PolarX(GetUnitX(t),450,i * 40)
set y = PolarY(GetUnitY(t),450,i * 40)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h026',GetUnitX(t),GetUnitY(t),i * 40)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1.5)
call SlideUnitAngle(bj_lastCreatedUnit,20,1,i * 40,EFFECT3)
set i = i + 1
endloop
call DustWave(0.4,0.12,1.2,20,GetUnitX(t),GetUnitY(t),155,255,255,30)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5,ICENOVA,5,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),10,BLUEBOMB,2,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),10,BLUEBOMB,2,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5.3,DT,5,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 0
local real x
local real y
local real a = Angle(GetUnitX(caster),GetUnitY(caster),GetUnitX(target),GetUnitY(target))
set .c = caster
set .t = target
call PauseUnit(.c,true)
call SetUnitPathing(.c,false)
call SetUnitAnimation(.c,"spell walk")
call EffectUnitColor(c,PolarX(GetUnitX(c),10,a),PolarY(GetUnitY(c),10,a),a,10,'h0DS',3.,255,255,255,255)
call SoundStart("war3mapImported\\Scontro.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call DustWave(2.4,0.15,0.8,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
loop
exitwhen i >= 19
set x = PolarX(GetUnitX(c),120,i * 40)
set y = PolarY(GetUnitY(c),120,i * 40)
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
set i = i + 1
endloop
call PolledWait(1.8)
call SetUnitAnimation(c,"spell walk")
call PolledWait(0.2)
call SetUnitTimeScale(c,0)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Remove_Water_Conditions takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit()) == 'h04V' or GetUnitTypeId(GetTriggerUnit()) == 'h0F0' or GetUnitTypeId(GetTriggerUnit()) == 'h0EY'
endfunction
function Trig_Remove_Water_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x,y ))
call RemoveUnit(u)
set u = null
endfunction
//===========================================================================
function InitTrig_Remove_Water takes nothing returns nothing
local trigger o = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( o, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( o, Condition( function Trig_Remove_Water_Conditions ) )
call TriggerAddAction( o, function Trig_Remove_Water_Actions )
endfunction
//TESH.scrollpos=61
//TESH.alwaysfold=0
scope GetsugaTenshou initializer init
globals
private constant real DISTANCE = 30
private constant real RADIUS = 200
private constant real MAXDIST = 1200
private constant integer FIREBALL = 'h01H'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A00X'
private constant string EFFECT = "Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl"
endglobals
struct GetsugaTenshou
unit c
unit d
real a
real time = 1
group go
real r
private method destroy takes nothing returns nothing
call .deallocate()
endmethod
private static method Boolean takes nothing returns boolean
return true
endmethod
private static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local GetsugaTenshou this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local unit b
local integer count = 0
set time = time - 0.02
call SetUnitPosition(d,x,y)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function GetsugaTenshou.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle, real damage returns thistype
local timer z = NewTimer()
local GetsugaTenshou this = GetsugaTenshou.allocate()
set .c = caster
set .a = angle
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),.a)
set .go = NewGroup()
set .r = damage
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function GetsugaTenshou.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Rin4.mp3",GetUnitX(c),GetUnitY(c))
endif
call GetsugaTenshou.create(c,Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY()),r)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=72
//TESH.alwaysfold=0
scope BlackGetsugaTenshou initializer init
globals
private constant real DISTANCE = 35
private constant real RADIUS = 200
private constant real MAXDIST = 1200
private constant integer FIREBALL = 'h01G'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A00T'
private constant string EFFECT = "Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
struct BlackGetsugaTenshou
unit c
unit d
real a
real time = 1
group go
real r
private method destroy takes nothing returns nothing
call .deallocate()
endmethod
private static method Boolean takes nothing returns boolean
return true
endmethod
private static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local BlackGetsugaTenshou this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local unit b
local integer count = 0
set time = time - 0.02
call SetUnitPosition(d,x,y)
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function BlackGetsugaTenshou.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle, real damage returns thistype
local timer z = NewTimer()
local BlackGetsugaTenshou this = BlackGetsugaTenshou.allocate()
set .c = caster
set .a = angle
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),.a)
set .go = NewGroup()
set .r = damage
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function BlackGetsugaTenshou.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real r = (GetUnitAbilityLevel(c,SPELLID) + 3) * GetHeroAgi(c,true)
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Rin4.mp3",GetUnitX(c),GetUnitY(c))
endif
call BlackGetsugaTenshou.create(c,Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY()),r)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Zangetsu initializer init
globals
private constant integer SPELLID = 'A017'
private constant integer BUFFID = 'B003'
private constant integer ICENOVA = 'h00S'
private constant integer BLUEBOMB = 'h01C'
private constant integer DT = 'h01D'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\SkyNeutralBuildingExplosion.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local integer i = 0
call DustWave(1,0.16,0.7,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),1.2,ICENOVA,1,255,255,255,255)
set c = null
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope FlashdashAttack initializer init
globals
private constant real DISTANCE = 20
private constant real RADIUS = 300
private constant integer SPELLID = 'A00W'
private constant integer OODAMABALL = 'h01E'
private constant integer ICENOVA = 'h00S'
private constant integer BLUEBOMB = 'h01C'
private constant integer BLINKBIG = 'h011'
private constant integer DT = 'h01D'
private constant integer FIRAGA = 'h00Z'
private constant string RASEN = "war3mapImported\\Rasengan.mdx"
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\EarthDetonation.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
endglobals
private struct data
unit c
real a
real time = 1.5
integer cal = 0
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
local group g = NewGroup()
local unit v
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,x,y)
endif
set time = time - 0.02
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set cal = cal + 1
if cal >= 9 then
set cal = 0
call SetUnitAnimation(c,"attack alternate")
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
endif
if time <= 0 then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call SetUnitTimeScale(.c,1)
call DustWave(0.4,0.15,0.8,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
set .go = NewGroup()
call SetUnitInvulnerable(.c,true)
call SetUnitPathing(.c,false)
call SetUnitTimeScale(.c,3.5)
call PauseUnit(.c,true)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope TensaZangetsu initializer init
globals
hashtable TENSA = InitHashtable()
private constant integer SPELLID = 'A00V'
private constant integer ICENOVA = 'h00S'
private constant integer BLUEBOMB = 'h01C'
private constant integer DT = 'h01D'
private constant integer SPELLDASH = 'A00W'
private constant integer HOLLOWBUFF = 'B006'
private constant string EFFECT2 = "war3mapImported\\SkyNeutralBuildingExplosion.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function ExpiredTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local trigger t = GetTriggeringTrigger()
local unit c = LoadUnitHandle(TENSA,GetHandleId(z),0)
if GetWidgetLife(c) > 0.45 then
if GetUnitAbilityLevel(c,'A00Y') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00T',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00X',true)
endif
if GetUnitAbilityLevel(c,'A00Z') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00W',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A017',true)
endif
if GetUnitAbilityLevel(c,'A011') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A010',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A012',true)
endif
call RemoveSavedInteger(TENSA,GetHandleId(c),0)
call ReleaseTimer(z)
call FlushChildHashtable(TENSA,GetHandleId(z))
call DestroyTrigger(t)
endif
set t = null
set c = null
endfunction
private function ReturnFormDeath takes nothing returns nothing
local unit c = GetTriggerUnit()
local timer z = NewTimer()
call SaveUnitHandle(TENSA,GetHandleId(z),0,c)
call TimerStart(z,0.05,true,function ExpiredTimer)
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local trigger t
if HaveSavedInteger(TENSA,GetHandleId(c),0) == false then
call SoundStart("war3mapImported\\Rin2.mp3",GetUnitX(c),GetUnitY(c))
call SaveInteger(TENSA,GetHandleId(c),0,1)
set t = CreateTrigger()
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function ReturnFormDeath)
call SaveTriggerHandle(TENSA,GetHandleId(c),0,t)
call DustWave(1,0.16,0.7,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),1.2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),0.5,DT,1,255,255,255,255)
call UnitRemoveAbility(c,HOLLOWBUFF)
call UnitRemoveAbility(c,'B003')
if GetUnitAbilityLevel(c,'A00Y') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00X',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00T',true)
endif
if GetUnitAbilityLevel(c,'A00Z') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A017',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00W',true)
endif
if GetUnitAbilityLevel(c,'A011') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A012',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A010',true)
endif
else
call RemoveSavedInteger(TENSA,GetHandleId(c),0)
call DestroyTrigger(LoadTriggerHandle(TENSA,GetHandleId(c),0))
call UnitRemoveAbility(c,HOLLOWBUFF)
call UnitRemoveAbility(c,'B003')
if GetUnitAbilityLevel(c,'A00Y') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00T',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00X',true)
endif
if GetUnitAbilityLevel(c,'A00Z') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00W',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A017',true)
endif
if GetUnitAbilityLevel(c,'A011') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A010',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A012',true)
endif
endif
set t = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope HollowMask initializer init
globals
private constant integer SPELLID = 'A010'
private constant integer BUFFID = 'B003'
private constant integer ICENOVA = 'h00S'
private constant integer BLUEBOMB = 'h01C'
private constant integer STOMP = 'h01J'
private constant integer DT = 'h01D'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\DarkNova.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
function HollowMask takes unit c returns nothing
local unit d
call DustWave(1,0.16,0.7,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),1.2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),0.5,DT,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),120,2.2,STOMP,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),240,2.2,STOMP,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),360,2.2,STOMP,1,255,255,255,255)
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
call UnitAddAbility(d,'A013')
call IssueTargetOrder(d,"bloodlust",c)
call SetUnitAbilityLevel(d,'A013',GetUnitAbilityLevel(c,'A011'))
call UnitApplyTimedLife(d,'BTLF',0.5)
set d = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local integer i = 0
call HollowMask(c)
set c = null
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope HollowMaskNormal initializer init
globals
private constant integer BUFFID = 'B006'
endglobals
private function Conditions takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit()) == 'H01F'
endfunction
private function IchigoAction takes nothing returns nothing
local unit c = GetTriggerUnit()
if GetRandomReal(1,100) <= 2 and GetUnitAbilityLevel(c,BUFFID) <= 0 then
call HollowMask(c)
endif
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local trigger t = CreateTrigger()
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_DAMAGED)
call TriggerAddAction(t,function IchigoAction)
set c = null
set t = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterEnterRectSimple(t,bj_mapInitialPlayableArea)
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope IchihoBuffAttack initializer init
globals
private hashtable ICHI = InitHashtable()
private constant integer ICHIGO = 'H01F'
private constant integer ICHIGO2 = 'H01I'
private constant integer ZANGETSU = 'B003'
private constant integer HOLLOW = 'B004'
endglobals
private function ActionsLeave takes nothing returns nothing
local unit c = GetTriggerUnit()
local trigger t = LoadTriggerHandle(ICHI,GetHandleId(c),0)
if t != null then
call DestroyTrigger(t)
endif
set c = null
set t = null
endfunction
private function Conditions takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'Avul') <= 0
endfunction
private function CheckHero takes nothing returns boolean
return IsUnitType(GetEventDamageSource(),UNIT_TYPE_HERO) == true and GetUnitTypeId(GetEventDamageSource()) == ICHIGO or GetUnitTypeId(GetEventDamageSource()) == ICHIGO2
endfunction
private function IchigoAction takes nothing returns nothing
local unit c = GetEventDamageSource()
local unit t = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real r = ((GetUnitAbilityLevel(c,'A00T') + 2) * GetHeroStr(c,true)) / 3
local real r2 = (GetUnitAbilityLevel(c,'A00X') * GetHeroStr(c,true)) / 3
local real r3 = ((GetUnitAbilityLevel(c,'A018') + 3) * GetHeroStr(c,true)) / 3
if GetUnitAbilityLevel(c,ZANGETSU) > 0 then
if GetRandomReal(1,100) <= 15 then
call GetsugaTenshou.create(c,a,r2)
endif
elseif GetUnitTypeId(c) == ICHIGO2 then
if GetRandomReal(1,100) <= 50 then
call SetUnitX(c,PolarX(GetUnitX(t),120,GetRandomReal(0,360)))
call SetUnitY(c,PolarY(GetUnitY(t),120,GetRandomReal(0,360)))
set a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
call SetUnitFacing(c,a)
endif
if GetRandomReal(1,100) <= 20 then
call BlackGetsugaTenshou.create(c,a,r)
endif
elseif GetUnitTypeId(c) == 'H01K' then
if GetRandomReal(1,100) <= 15 then
call SetUnitX(c,PolarX(GetUnitX(t),120,GetRandomReal(0,360)))
call SetUnitY(c,PolarY(GetUnitY(t),120,GetRandomReal(0,360)))
set a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
call SetUnitFacing(c,a)
endif
if GetRandomReal(1,100) <= 15 then
call BlackGetsugaTenshou.create(c,a,r3)
endif
endif
set c = null
set t = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local trigger t = CreateTrigger()
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition(function CheckHero))
call TriggerAddAction(t,function IchigoAction)
call SaveTriggerHandle(ICHI,GetHandleId(c),0,t)
set t = null
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t2 = CreateTrigger()
local trigger t = CreateTrigger()
call TriggerRegisterEnterRectSimple(t2,bj_mapInitialPlayableArea)
call TriggerAddCondition(t2,Condition(function Conditions))
call TriggerAddAction(t2,function Actions)
call TriggerRegisterLeaveRectSimple(t,bj_mapInitialPlayableArea)
call TriggerAddAction(t,function ActionsLeave)
set t2 = null
set t = null
endfunction
endscope
//TESH.scrollpos=6
//TESH.alwaysfold=0
scope TrippleTenshou initializer init
globals
private constant real DISTANCE = 30
private constant real RADIUS = 200
private constant real MAXDIST = 1200
private constant integer FIREBALL = 'h01G'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A018'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Undead\\OrbOfDeath\\OrbOfDeathMissile.mdl"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
struct vastotenshou
unit c
unit d
real a
real time = 1
group go
private method destroy takes nothing returns nothing
call .deallocate()
endmethod
private static method Boolean takes nothing returns boolean
return true
endmethod
private static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local vastotenshou this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = ((GetUnitAbilityLevel(c,SPELLID) + 4) * GetHeroStr(c,true)) / 2
local unit b
local integer count = 0
set time = time - 0.02
if GetWidgetLife(d) > 0.45 then
call SetUnitPosition(d,x,y)
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function vastotenshou.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
else
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local vastotenshou this = vastotenshou.allocate()
set .c = caster
set .a = angle
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),.a)
set .go = NewGroup()
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function vastotenshou.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local real a = Angle(GetUnitX(c),GetUnitY(c),x,y) - 30
local integer i = 1
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Rin4.mp3",GetUnitX(c),GetUnitY(c))
endif
loop
exitwhen i > 3
call vastotenshou.create(c,a)
set a = a + 30
set i = i + 1
endloop
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope VastoCero initializer init
globals
private constant real DISTANCE = 35
private constant real RADIUS = 400
private constant real MAXDIST = 1200
private constant integer FIREBALL = 'h002'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SUPERBIG = 'h00A'
private constant integer SPELLID = 'A00U'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private struct data
unit c
unit d
real a
real time = 2
group go
integer cal = 0
private method destroy takes nothing returns nothing
call .deallocate()
endmethod
private static method Boolean takes nothing returns boolean
return true
endmethod
private static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 300
local unit b
local integer count = 0
set time = time - 0.02
set cal = cal + 1
if GetWidgetLife(d) > 0.45 then
call SetUnitPosition(d,x,y)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
if cal >= 2 then
set cal = 0
call EffectUnitColor(c,x,y,GetUnitFacing(c),4,SUPERBIG,1,255,255,255,255)
endif
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
else
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
set .d = CreateUnit(GetOwningPlayer(.c),DUMMY,GetUnitX(.c),GetUnitY(.c),.a)
set .go = NewGroup()
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
local unit dummy
local unit dummy2
local real x = PolarX(GetUnitX(c),120,a)
local real y = PolarY(GetUnitY(c),120,a)
local integer i = 0
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
set dummy = CreateUnit(GetOwningPlayer(c),'h00X',x,y,a)
call IncreaseScale(dummy,0.1,0.005,2)
set dummy2 = CreateUnit(GetOwningPlayer(c),'h00Y',x,y,a)
call IncreaseScale(dummy2,0.05,0.005,2)
loop
exitwhen i >= 5
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),360,1,'h01J',1,255,255,255,255)
call TriggerSleepAction(0.4)
set i = i + 1
endloop
call data.create(c,a)
call RemoveUnit(dummy)
call RemoveUnit(dummy2)
call TriggerSleepAction(0.5)
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
set dummy = null
set dummy2 = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope BlackMoon initializer init
globals
private constant integer SPELLID = 'A019'
private constant real DISTANCE = 30
private constant real RADIUS = 200
private constant real MAXDIST = 1200
private constant integer FIREBALL = 'h01G'
private constant integer MAXHIT = 15
private constant string EFFECT1 = "Abilities\\Spells\\Undead\\OrbOfDeath\\AnnihilationMissile.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Undead\\OrbOfDeath\\OrbOfDeathMissile.mdl"
endglobals
struct vastotenshous
unit c
unit d
real a
real time = 1
group go
private method destroy takes nothing returns nothing
call .deallocate()
endmethod
private static method Boolean takes nothing returns boolean
return true
endmethod
private static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local vastotenshous this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = (GetUnitAbilityLevel(c,SPELLID) * GetHeroStr(c,true)) / 4
local unit b
local integer count = 0
set time = time - 0.02
if GetWidgetLife(d) > 0.45 then
call SetUnitPosition(d,x,y)
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function vastotenshous.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
else
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local vastotenshous this = vastotenshous.allocate()
set .c = caster
set .a = angle
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),.a)
set .go = NewGroup()
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function vastotenshous.TimerExpired)
return this
endmethod
endstruct
private struct data
unit c
unit t
integer hit = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x
local real y
local real a
local group g = NewGroup()
local group use = NewGroup()
local unit v
set hit = hit + 1
if hit <= MAXHIT then
if hit == 1 then
if GetWidgetLife(t) > 0.45 then
set x = PolarX(GetUnitX(t),150,GetRandomReal(0,360))
set y = PolarY(GetUnitY(t),150,GetRandomReal(0,360))
call SetUnitPosition(c,x,y)
call SetUnitAnimation(c,"attack")
set a = Angle(x,y,GetUnitX(t),GetUnitY(t))
call SetUnitFacing(c,a)
call DestroyEffect(AddSpecialEffect(EFFECT1,x,y))
call vastotenshou.create(c,a)
else
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetUnitVertexColor(c,255,255,255,255)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call .destroy()
endif
else
call GroupEnumUnitsInRange(g,GetUnitX(t),GetUnitY(t),600,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
if FilterGeneral(c,v) then
call GroupAddUnit(use,v)
endif
exitwhen v == null
call GroupRemoveUnit(g,v)
endloop
set t = GroupPickRandomUnit(use)
call ReleaseGroup(g)
call ReleaseGroup(use)
if t != null then
set x = PolarX(GetUnitX(t),150,GetRandomReal(0,360))
set y = PolarY(GetUnitY(t),150,GetRandomReal(0,360))
call SetUnitPosition(c,x,y)
call SetUnitAnimation(c,"attack")
call DestroyEffect(AddSpecialEffect(EFFECT1,x,y))
set a = Angle(x,y,GetUnitX(t),GetUnitY(t))
call SetUnitFacing(c,a)
call vastotenshous.create(c,a)
else
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetUnitVertexColor(c,255,255,255,255)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call .destroy()
endif
endif
else
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetUnitVertexColor(c,255,255,255,255)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local thistype this = thistype.allocate()
set .c = caster
set .t = target
call PauseUnit(.c,true)
call SetUnitInvulnerable(c,true)
call SetUnitVertexColor(.c,255,255,255,125)
call SetUnitTimeScale(.c,3)
call SetTimerData(z,this)
call TimerStart(z,0.3,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=41
//TESH.alwaysfold=0
scope Byakurai initializer init
globals
private constant real DISTANCE = 30
private constant integer SPELLID = 'A01O'
private constant real RADIUS = 180
private constant real MAXDIST = 1200
private constant integer BALL = 'h00U'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h00R'
private constant integer LIGHTNING2 = 'h00Q'
private constant integer LIGHTNING3 = 'h00T'
private constant string EFFECT = "war3mapImported\\SkyNeutralBuildingExplosion.mdx"
endglobals
private struct data
unit c
unit d
real a
real time = 1
group go
private method destroy takes nothing returns nothing
call .deallocate()
endmethod
private static method Boolean takes nothing returns boolean
return true
endmethod
private static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetHeroAgi(c,true) * 4
local unit b
local integer count = 0
set time = time - 0.02
if GetWidgetLife(d) > 0.45 then
call SetUnitPosition(d,x,y)
call EffectUnitColor(c,x,y,a,2,BALL,1,255,255,255,255)
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call StunUnit(c,v,2)
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),GetUnitFacing(c),1,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),GetUnitFacing(c),1,LIGHTNING,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),GetUnitFacing(c),1,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(v),GetUnitY(v),GetUnitFacing(c),2,LIGHTNING3,1,255,255,255,255)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call PauseUnit(.c,false)
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
else
call PauseUnit(.c,false)
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
call PauseUnit(.c,true)
set .d = CreateUnit(GetOwningPlayer(.c),DUMMY,GetUnitX(.c),GetUnitY(.c),.a)
set .go = NewGroup()
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
library Sakura requires TimerUtils
globals
endglobals
function SakuraExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local unit d = LoadUnitHandle(HS,GetHandleId(z),2)
local real time = LoadReal(HS,GetHandleId(z),0)
local real damage = LoadReal(HS,GetHandleId(z),1) / 25
local real dist = Distance(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t))
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t)) + 12
local real x = PolarX(GetUnitX(t),dist,a)
local real y = PolarY(GetUnitY(t),dist,a)
local unit array e
local integer i = 1
set time = time - 0.04
loop
exitwhen i > 3
set e[i] = LoadUnitHandle(HS,GetHandleId(z),2 + i)
call SetUnitPosition(e[i],x,y)
set i = i + 1
endloop
call DamageTarget(c,t,damage,TAIJUTSU_DAMAGE)
call SetUnitPosition(d,x,y)
call SaveReal(HS,GetHandleId(z),0,time)
if time <= 0 then
set i = 1
loop
exitwhen i > 3
call KillUnit(e[i])
set i = i + 1
endloop
call KillUnit(d)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set c = null
set t = null
set d = null
endfunction
function SakuraTarget takes unit c, unit t, real time, real damage returns nothing
local timer z = NewTimer()
local real x = PolarX(GetUnitX(t),50,0)
local real y = PolarY(GetUnitY(t),50,0)
local unit d = CreateUnit(GetOwningPlayer(c),'h01X',x,y,0)
local unit array e
local integer i = 1
loop
exitwhen i > 3
set e[i] = CreateUnit(GetOwningPlayer(c),'h01X',x,y,0)
call SetUnitFlyHeight(e[i],60,0)
call SaveUnitHandle(HS,GetHandleId(z),2 + i,e[i])
set i = i + 1
endloop
call SetUnitFlyHeight(d,60,0)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,t)
call SaveUnitHandle(HS,GetHandleId(z),2,d)
call SaveReal(HS,GetHandleId(z),0,time)
call SaveReal(HS,GetHandleId(z),1,damage)
call TimerStart(z,0.04,true,function SakuraExpired)
endfunction
function BankaiSakuraExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit d = LoadUnitHandle(HS,GetHandleId(z),1)
local real time = LoadReal(HS,GetHandleId(z),0)
local real damage = LoadReal(HS,GetHandleId(z),1) / 2.5
local real a
local real x
local real y
local unit array e
local integer i = 1
local group g = NewGroup()
local unit v
if GetWidgetLife(d) > 0.45 then
set time = time - 0.4
call SaveReal(HS,GetHandleId(z),0,time)
set x = PolarX(GetUnitX(c),GetRandomReal(0,700),GetRandomReal(0,360))
set y = PolarY(GetUnitY(c),GetRandomReal(0,700),GetRandomReal(0,360))
call IssuePointOrder(d,"move",x,y)
call GroupEnumUnitsInRange(g,x,y,150,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
exitwhen true
endif
call GroupRemoveUnit(g,v)
endloop
if v != null then
endif
call ReleaseGroup(g)
set i = 1
loop
exitwhen i > 5
set x = PolarX(GetUnitX(c),GetRandomReal(0,700),GetRandomReal(0,360))
set y = PolarY(GetUnitY(c),GetRandomReal(0,700),GetRandomReal(0,360))
set e[i] = LoadUnitHandle(HS,GetHandleId(z),1 + i)
call IssuePointOrder(e[i],"move",x,y)
set i = i + 1
endloop
if time <= 0 then
set i = 1
loop
exitwhen i > 5
call KillUnit(e[i])
set i = i + 1
endloop
call KillUnit(d)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
else
set i = 1
loop
exitwhen i > 5
set e[i] = LoadUnitHandle(HS,GetHandleId(z),1 + i)
call KillUnit(e[i])
set i = i + 1
endloop
call KillUnit(d)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set i = 1
loop
exitwhen i > 5
set e[i] = null
set i = i + 1
endloop
set c = null
set d = null
endfunction
function BankaiSakura takes unit c, unit d, real time, real targetx, real targety, real damage returns nothing
local timer z = NewTimer()
local real x = targetx
local real y = targety
local unit array e
local integer i = 1
loop
exitwhen i > 5
set e[i] = CreateUnit(GetOwningPlayer(c),'h01X',x,y,0)
call SetUnitFlyHeight(e[i],100,0)
call SaveUnitHandle(HS,GetHandleId(z),1 + i,e[i])
set i = i + 1
endloop
call SetUnitFlyHeight(d,100,0)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,d)
call SaveReal(HS,GetHandleId(z),0,time)
call SaveReal(HS,GetHandleId(z),1,damage)
call TimerStart(z,1,true,function BankaiSakuraExpired)
endfunction
endlibrary
//TESH.scrollpos=99
//TESH.alwaysfold=0
scope SenbonSakura initializer init
globals
private constant real DISTANCE = 15
private constant real RADIUS = 250
private constant real MAXDIST = 1600
private constant integer FIREBALL = 'h01X'
private constant integer FIREBALL2 = 'h01Y'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A01J'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private struct data
unit c
unit array d[9]
real a
real time = 2
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x
local real y
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 65
local unit b
local integer count = 0
local integer i = 0
set time = time - 0.02
if GetWidgetLife(d[1]) > 0.45 then
set i = 1
loop
exitwhen i > 9
set x = PolarX(GetUnitX(d[i]),DISTANCE,a)
set y = PolarY(GetUnitY(d[i]),DISTANCE,a)
call SetUnitPosition(d[i],x,y)
set i = i + 1
endloop
call GroupEnumUnitsInRange(g,GetUnitX(d[3]),GetUnitY(d[3]),RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call SakuraTarget(c,v,2,r)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
set i = 1
loop
exitwhen i > 9
call KillUnit(d[i])
set i = i + 1
endloop
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
else
set i = 1
loop
exitwhen i > 9
call KillUnit(d[i])
set i = i + 1
endloop
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 1
local real x
local real y
local real count = -80
set .c = caster
set .a = angle
loop
exitwhen i > 9
set x = PolarX(GetUnitX(c),50,.a + count)
set y = PolarY(GetUnitY(c),50,.a + count)
set .d[i] = CreateUnit(GetOwningPlayer(.c),FIREBALL,x,y,i * 70)
call SpinUnit(.d[i],.a,2,1,250,10)
set count = count + 20
set i = i + 1
endloop
set .go = NewGroup()
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Senbonzakura.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=6
//TESH.alwaysfold=0
scope BankaiSenbonzakura initializer init
globals
private constant real RADIUS = 500
private constant integer SAKURA = 'h01X'
private constant integer BLADE = 'h01Y'
private constant integer SPELLID = 'A01K'
private constant real DURATION = 20
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit d = LoadUnitHandle(HS,GetHandleId(z),1)
local unit e = LoadUnitHandle(HS,GetHandleId(z),2)
local unit v
local real r = LoadReal(HS,GetHandleId(z),0)
local unit f = LoadUnitHandle(HS,GetHandleId(z),3)
if GetWidgetLife(c) > 0.45 then
set r = r - 0.05
call SaveReal(HS,GetHandleId(z),0,r)
call SetUnitPosition(d,GetUnitX(c),GetUnitY(c))
call SetUnitPosition(e,GetUnitX(c),GetUnitY(c))
call SetUnitPosition(f,GetUnitX(c),GetUnitY(c))
if r <= 0 then
call RemoveUnit(d)
call RemoveUnit(e)
call RemoveUnit(f)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
else
call RemoveUnit(d)
call RemoveUnit(e)
call RemoveUnit(f)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set c = null
set d = null
set e = null
set f = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = GetUnitFacing(c)
local integer i = 0
local real x = PolarX(GetUnitX(c),100,a + 90)
local real y = PolarY(GetUnitY(c),100,a + 90)
local real xx = PolarX(GetUnitX(c),100,a - 90)
local real yy = PolarY(GetUnitY(c),100,a - 90)
local real x1
local real y1
local timer z = NewTimer()
local unit d
local integer count = 0
local unit e
local unit f
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Bankai Senbonzakura.mp3",GetUnitX(c),GetUnitY(c))
endif
loop
exitwhen i >= 8
set x1 = PolarX(x,i * 70,a + 180)
set y1 = PolarY(y,i * 70,a + 180)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),BLADE,x1,y1,a + 90)
call SetUnitAnimation(bj_lastCreatedUnit,"birth")
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1.75)
set x1 = PolarX(xx,i * 70,a + 180)
set y1 = PolarY(yy,i * 70,a + 180)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),BLADE,x1,y1,a + 90)
call SetUnitAnimation(bj_lastCreatedUnit,"birth")
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1.75)
set i = i + 1
endloop
call PolledWait(1.75)
set i = 0
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(c),GetUnitY(c),0)
call UnitAddAbility(d,'AUls')
call SetUnitAbilityLevel(d,'AUls',GetUnitAbilityLevel(c,SPELLID))
call IssueImmediateOrder(d,"Locustswarm")
set e = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(c),GetUnitY(c),0)
call UnitAddAbility(e,'AUls')
call SetUnitAbilityLevel(e,'AUls',GetUnitAbilityLevel(c,SPELLID))
call IssueImmediateOrder(e,"Locustswarm")
set f = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(c),GetUnitY(c),0)
call UnitAddAbility(f,'AUls')
call SetUnitAbilityLevel(f,'AUls',GetUnitAbilityLevel(c,SPELLID))
call IssueImmediateOrder(f,"Locustswarm")
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,d)
call SaveUnitHandle(HS,GetHandleId(z),2,e)
call SaveUnitHandle(HS,GetHandleId(z),3,f)
call SaveReal(HS,GetHandleId(z),0,DURATION)
call TimerStart(z,0.1,true,function TimerExpired)
set c = null
set d = null
set e = null
set f = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=27
//TESH.alwaysfold=0
scope SenkeiSakura initializer init
globals
private constant real RADIUS = 400
private constant integer SPELLID = 'A01L'
private constant integer SENKEI = 'h01Z'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function SenkeiBlock takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local group g = NewGroup()
local real x = LoadReal(HS,GetHandleId(z),0)
local real y = LoadReal(HS,GetHandleId(z),1)
local real time = LoadReal(HS,GetHandleId(z),2)
local unit v
local real a
local real xx
local real yy
local unit d
local integer r = GetUnitAbilityLevel(c,SPELLID)
set time = time - 0.02
call SaveReal(HS,GetHandleId(z),2,time)
call GroupEnumUnitsInRange(g,x,y,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
if GetUnitAbilityLevel(v,'B00F') <= 0 then
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(v),GetUnitY(v),bj_UNIT_FACING)
call UnitAddAbility(d,'A02S')
call SetUnitAbilityLevel(d,'A02S',r)
call IssueTargetOrder(d,"soulburn",v)
call UnitApplyTimedLife(d,'BTLF',0.5)
set d = null
endif
if Distance(GetUnitX(v),GetUnitY(v),x,y) > RADIUS - 20 then
set a = Angle(GetUnitX(v),GetUnitY(v),x,y)
set xx = PolarX(GetUnitX(v),30,a)
set yy = PolarY(GetUnitY(v),30,a)
call SetUnitX(v,xx)
call SetUnitY(v,yy)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call UnitRemoveAbility(c,'B009')
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local integer i = 1
local real x = GetUnitX(c)
local real y = GetUnitY(c)
local timer z = NewTimer()
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\GurenBakuenjin.mp3",GetUnitX(c),GetUnitY(c))
endif
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SENKEI,GetUnitX(c),GetUnitY(c),0)
call SetUnitScale(bj_lastCreatedUnit,1.3,1.3,1.3)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',20)
call PolledWait(0.1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SENKEI,GetUnitX(c),GetUnitY(c),0)
call SetUnitScale(bj_lastCreatedUnit,1.3,1.3,1.3)
call SetUnitFlyHeight(bj_lastCreatedUnit,250,0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',20)
call PolledWait(0.1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SENKEI,GetUnitX(c),GetUnitY(c),0)
call SetUnitScale(bj_lastCreatedUnit,1.3,1.3,1.3)
call SetUnitFlyHeight(bj_lastCreatedUnit,500,0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',20)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveReal(HS,GetHandleId(z),0,x)
call SaveReal(HS,GetHandleId(z),1,y)
call SaveReal(HS,GetHandleId(z),2,20)
call TimerStart(z,0.02,true,function SenkeiBlock)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Shukei initializer init
globals
private constant real DISTANCE = 40
private constant real RADIUS = 350
private constant integer SPELLID = 'A01M'
private constant integer EFFECTID = 'A01N'
private constant string Wing = "war3mapImported\\AWING.mdx"
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
endglobals
private struct data
unit c
real a
real time = 0.75
integer cal = 0
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local unit v
call UnitRemoveAbility(c,EFFECTID)
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
loop
set v = FirstOfGroup(go)
exitwhen v == null
call DamageTarget(c,v,2000,TAIJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(v),GetUnitY(v)))
call PauseUnit(v,false)
call SetUnitTimeScale(v,1)
call GroupRemoveUnit(go,v)
endloop
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = 50
local group g = NewGroup()
local unit v
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitX(c,x)
call SetUnitY(c,y)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call GroupAddUnit(go,v)
call PauseUnit(v,true)
call SetUnitAnimation(v,"death")
call SetUnitTimeScale(v,0)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set time = time - 0.02
set cal = cal + 1
if cal >= 9 then
set cal = 0
endif
if time <= 0 then
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DustWave(0.4,0.15,0.8,20,GetUnitX(c),GetUnitY(c),255,255,255,30)
call TimerStart(z,1,false,function data.FinalTimer)
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
set .go = NewGroup()
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
call SoundStart("war3mapImported\\samchunsege.mp3",GetUnitX(c),GetUnitY(c))
call UnitAddAbility(c,EFFECTID)
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call SetUnitAnimation(c,"attack")
call PolledWait(0.2)
call SetUnitPathing(c,false)
call SetUnitTimeScale(c,0)
call PolledWait(1)
call data.create(c,a)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=7
//TESH.alwaysfold=0
scope GuraGuraShockWave initializer init
globals
private constant real DISTANCE = 15
private constant real RADIUS = 250
private constant real MAXDIST = 1600
private constant integer WAVE = 'h021'
private constant integer GURA = 'h022'
private constant integer STONE = 'h023'
private constant integer HOWL = 'h008'
private constant integer SPELLID = 'A01Q'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT3 = "war3mapImported\\howling2.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
local integer i = 1
local group g
local real x
local real y
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
local group ignore = NewGroup()
call PauseUnit(c,true)
call SetUnitAnimation(c,"spell")
set x = PolarX(GetUnitX(c),-200,a + 45)
set y = PolarY(GetUnitY(c),-200,a + 45)
call EffectUnitColor(c,x,y,a,2.5,GURA,1,125,125,255,255)
set x = PolarX(GetUnitX(c),-200,a - 45)
set y = PolarY(GetUnitY(c),-200,a - 45)
call EffectUnitColor(c,x,y,a,2.5,GURA,1,125,125,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2.5,HOWL,1,225,225,255,255)
call DustWave(0.4,0.13,1.0,20,GetUnitX(c),GetUnitY(c),255,255,255,30)
call SoundStart("war3mapImported\\whitebeardskills1.mp3",GetUnitX(c),GetUnitY(c))
call PolledWait(1.)
loop
exitwhen i >= 12
set x = PolarX(GetUnitX(c),i * 180,a)
set y = PolarY(GetUnitY(c),i * 180,a)
call EffectUnitColor(c,x,y,GetUnitFacing(c),2,WAVE,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),2,STONE,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
set g = NewGroup()
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function PickUnit))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitInGroup(v,ignore) == false then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call ImpaleUnit(v,1)
call SetUnitAnimation(v,"death")
call GroupAddUnit(ignore,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set i = i + 1
endloop
call ReleaseGroup(ignore)
call PauseUnit(c,false)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=45
//TESH.alwaysfold=0
scope GuraSwing initializer init
globals
private constant real DISTANCE = 18
private constant real RADIUS = 500
private constant integer SPELLID = 'A01R'
private constant integer OODAMABALL = 'h01E'
private constant integer ICENOVA = 'h00S'
private constant integer BLUEBOMB = 'h021'
private constant integer BLINKBIG = 'h023'
private constant integer STOMP = 'h024'
private constant integer DT = 'h01D'
private constant integer FIRAGA = 'h00Z'
private constant string RASEN = "war3mapImported\\Rasengan.mdx"
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\SkyNeutralBuildingExplosion.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
endglobals
private struct data
unit c
real targetx
real targety
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local group g
local unit v
local real a
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
call PauseUnit(.c,false)
call SetUnitInvulnerable(.c,false)
call SetUnitPathing(.c,true)
call DustWave(0.4,0.12,1.0,20,targetx,targety,155,255,255,30)
set g = NewGroup()
call GroupEnumUnitsInRange(g,targetx,targety,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set a = Angle(targetx,targety,GetUnitX(v),GetUnitY(v))
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call SlideUnitAngle(v,20,1,a,"")
call ImpaleUnit(v,1)
call SetUnitAnimation(v,"death")
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
call EffectUnitColor(c,targetx,targety,GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,targetx,targety,GetUnitFacing(c),3,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,targetx,targety,GetUnitFacing(c),3,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,targetx,targety,GetUnitFacing(c),2,STOMP,1,255,255,255,255)
call ReleaseTimer(z)
call .destroy()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),targetx,targety)
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = 50
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,x,y)
else
call SetUnitAnimation(c,"attack")
call TimerStart(z,0.6,false,function data.FinalTimer)
endif
if Distance(x,y,targetx,targety) <= 100 then
call SetUnitAnimation(c,"attack")
call TimerStart(z,0.6,false,function data.FinalTimer)
endif
endmethod
static method create takes unit caster, real x, real y returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set targetx = x
set targety = y
call PauseUnit(.c,true)
call SetUnitInvulnerable(.c,true)
call SetUnitPathing(.c,false)
call SetUnitAnimationByIndex(c,1)
call SetTimerData(z,this)
call SoundStart("war3mapImported\\whitebeardskills2.mp3",GetUnitX(c),GetUnitY(c))
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=24
//TESH.alwaysfold=0
scope QuakeBubble initializer init
globals
private constant integer SPELLID = 'A0AL'
private constant integer BALL = 'h022'
private constant integer BUFFID = 'B00B'
private constant integer ICENOVA = 'h00S'
private constant integer BLUEBOMB = 'h021'
private constant integer BLINKBIG = 'h023'
private constant integer STOMP = 'h024'
private constant integer HOWL = 'h008'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
endglobals
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),90,2.5,HOWL,1,225,225,255,255)
call DustWave(0.4,0.13,1.0,20,GetUnitX(c),GetUnitY(c),255,255,255,30)
call SoundStart("war3mapImported\\whitebeardskills3.mp3",GetUnitX(c),GetUnitY(c))
set c = null
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function ActionsAttacked takes nothing returns nothing
local unit c = GetAttacker()
local unit t = GetTriggerUnit()
local integer i = 0
local real r = (GetUnitAbilityLevel(c,SPELLID) + 2) * GetHeroStr(c,true)
local real x
local real y
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local unit d
call UnitRemoveAbility(c,BUFFID)
call PauseUnit(c,true)
call PauseUnit(t,true)
call IssueImmediateOrder(c,"stop")
call SetUnitAnimation(c,"attack - 1")
set d = CreateUnit(GetOwningPlayer(c),BALL,GetUnitX(t),GetUnitY(t),a)
call PolledWait(1.1)
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),a,2.5,'h00G',1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),1,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),1,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2,STOMP,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),a,2.5,HOWL,1,255,255,255,255)
call DustWave(0.4,0.12,1,20,GetUnitX(t),GetUnitY(t),255,255,255,30)
call SlideUnitAngle(t,30,1,a,EFFECT)
call ImpaleUnit(t,1)
call RemoveUnit(d)
call PauseUnit(t,false)
call PauseUnit(c,false)
set c = null
set t = null
endfunction
private function ConditionsAttacked takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker())) == true and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE) == false and GetUnitAbilityLevel(GetAttacker(),BUFFID) >= 1
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger t2 = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call TriggerRegisterPlayerUnitEvent(t2,Player(index),EVENT_PLAYER_UNIT_ATTACKED,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
call TriggerAddCondition(t2,Condition(function ConditionsAttacked))
call TriggerAddAction(t2,function ActionsAttacked)
set t = null
set t2 = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Tsunami initializer init
globals
private constant real DISTANCE = 15
private constant real RADIUS = 200
private constant real MAXDIST = 1600
private constant integer WAVE = 'h021'
private constant integer GURA = 'h022'
private constant integer STONE = 'h023'
private constant integer HOWL = 'h008'
private constant integer SPELLID = 'A01T'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT3 = "war3mapImported\\howling2.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private function Trig_Tsunami_Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Trig_Tsunami_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local real xc = GetUnitX(c)
local real yc = GetUnitY(c)
local real a = Angle(xc,yc,x,y)
local real xx = PolarX(xc,800,a + 90)
local real yy = PolarY(yc,800,a + 90)
local real xx2 = PolarX(xc,800,a - 90)
local real yy2 = PolarY(yc,800,a - 90)
local real xxx
local real yyy
local real xt
local real yt
local real xxx2
local real yyy2
local real xt2
local real yt2
local integer i = 1
local unit d
local unit v
local group g
local group ignore = NewGroup()
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 2) + 8) * GetHeroStr(c,true)
set x = PolarX(GetUnitX(c),-200,a + 45)
set y = PolarY(GetUnitY(c),-200,a + 45)
call EffectUnitColor(c,x,y,a,2.5,GURA,1,125,125,255,255)
set x = PolarX(GetUnitX(c),-200,a - 45)
set y = PolarY(GetUnitY(c),-200,a - 45)
call EffectUnitColor(c,x,y,a,2.5,GURA,1,125,125,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2.5,HOWL,1,225,225,255,255)
call DustWave(0.4,0.13,1.0,20,GetUnitX(c),GetUnitY(c),255,255,255,30)
call SoundStart("war3mapImported\\whitebeardskills4.mp3",GetUnitX(c),GetUnitY(c))
call PolledWait(0.8)
loop
exitwhen i > 50
set xxx = PolarX(xx,i * 30,a)
set yyy = PolarY(yy,i * 30,a)
set xt = PolarX(xxx,GetRandomReal(600,800),a - 90)
set yt = PolarY(yyy,GetRandomReal(600,800),a - 90)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",xxx,yyy))
set d = CreateUnit(GetOwningPlayer(c),'h026',xxx,yyy,a + 90)
call Jump(d,GetRandomReal(2.1,2.6),xt,yt,2.8,200,"","Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl","")
call UnitApplyTimedLife(d,'BTLF',0.01)
set d = null
set i = i + 1
endloop
set i = 1
loop
exitwhen i > 50
set xxx2 = PolarX(xx2,i * 30,a)
set yyy2 = PolarY(yy2,i * 30,a)
set xt2 = PolarX(xxx2,GetRandomReal(600,800),a + 90)
set yt2 = PolarY(yyy2,GetRandomReal(600,800),a + 90)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",xxx2,yyy2))
set d = CreateUnit(GetOwningPlayer(c),'h026',xxx2,yyy2,a + 270)
call Jump(d,GetRandomReal(2.1,2.6),xt2,yt2,2.8,200,"","Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl","")
call UnitApplyTimedLife(d,'BTLF',0.01)
set d = null
set i = i + 1
endloop
call ShakeGroupCamera(2.1,x,y,1200,10)
call TriggerSleepAction(2.1)
set i = 1
loop
exitwhen i > 10
set xxx2 = PolarX(xc,i * 150,a)
set yyy2 = PolarY(yc,i * 150,a)
set g = NewGroup()
call GroupEnumUnitsInRange(g,xxx2,yyy2,RADIUS,Filter(function PickUnit))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitInGroup(v,ignore) == false then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call StunUnit(c,v,2)
call SetUnitAnimation(v,"death")
call GroupAddUnit(ignore,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",xxx2,yyy2))
call DestroyEffect(AddSpecialEffect("war3mapImported\\WaterBullet.mdx",xxx2,yyy2))
set i = i + 1
endloop
call ReleaseGroup(ignore)
set i = 0
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger( )
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t, Condition( function Trig_Tsunami_Conditions ) )
call TriggerAddAction(t, function Trig_Tsunami_Actions )
endfunction
endscope
//TESH.scrollpos=1
//TESH.alwaysfold=0
scope SwayingLand initializer init
globals
private constant integer SPELLID = 'A01U'
private constant integer WAVE = 'h021'
private constant integer GURA = 'h022'
private constant integer STONE = 'h023'
private constant integer HOWL = 'h008'
private constant integer ICENOVA = 'h00S'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function TimerMoveLeft2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local real x
local real y
local group g = NewGroup()
local group g2 = LoadGroupHandle(HS,GetHandleId(z),1)
local unit v
local real time = LoadReal(HS,GetHandleId(z),0)
set time = time - 0.02
call SaveReal(HS,GetHandleId(z),0,time)
call GroupAddGroup(g2,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
set x = PolarX(GetUnitX(v),7,180)
set y = PolarY(GetUnitY(v),7,180)
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitX(v,x)
call SetUnitY(v,y)
endif
call GroupRemoveUnit(g,v)
endloop
if time <= 0 then
loop
set v = FirstOfGroup(g2)
exitwhen v == null
call SetCameraFieldForPlayer(GetOwningPlayer(v),CAMERA_FIELD_ROLL,0,2)
call GroupRemoveUnit(g2,v)
endloop
call ReleaseGroup(g2)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
call ReleaseGroup(g)
set c = null
endfunction
private function TimerMoveRight takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local real x
local real y
local group g = NewGroup()
local group g2 = LoadGroupHandle(HS,GetHandleId(z),1)
local unit v
local real time = LoadReal(HS,GetHandleId(z),0)
set time = time - 0.02
call SaveReal(HS,GetHandleId(z),0,time)
call GroupAddGroup(g2,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
set x = PolarX(GetUnitX(v),7,0)
set y = PolarY(GetUnitY(v),7,0)
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitX(v,x)
call SetUnitY(v,y)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
if time <= 0 then
call SaveReal(HS,GetHandleId(z),0,4)
call GroupAddGroup(g2,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
call SetCameraFieldForPlayer(GetOwningPlayer(v),CAMERA_FIELD_ROLL,80,4)
call GroupRemoveUnit(g,v)
endloop
call TimerStart(z,0.02,true,function TimerMoveLeft2)
endif
call ReleaseGroup(g)
set c = null
endfunction
private function TimerMoveLeft takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local real x
local real y
local group g = NewGroup()
local unit v
local group g2 = LoadGroupHandle(HS,GetHandleId(z),1)
local real time = LoadReal(HS,GetHandleId(z),0)
set time = time - 0.02
call SaveReal(HS,GetHandleId(z),0,time)
call GroupAddGroup(g2,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
set x = PolarX(GetUnitX(v),7,180)
set y = PolarY(GetUnitY(v),7,180)
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitX(v,x)
call SetUnitY(v,y)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
if time <= 0 then
call SaveReal(HS,GetHandleId(z),0,4)
call GroupAddGroup(g2,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
call SetCameraFieldForPlayer(GetOwningPlayer(v),CAMERA_FIELD_ROLL,-80,4)
call GroupRemoveUnit(g,v)
endloop
call TimerStart(z,0.02,true,function TimerMoveRight)
endif
call ReleaseGroup(g)
set c = null
endfunction
private function Actions takes nothing returns nothing
local group g = NewGroup()
local unit c = GetTriggerUnit()
local unit v
local timer z = NewTimer()
local real a = GetUnitFacing(c)
local real x
local real y
local group g2 = NewGroup()
call SaveGroupHandle(HS,GetHandleId(z),1,g2)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
set x = PolarX(GetUnitX(c),-200,a + 45)
set y = PolarY(GetUnitY(c),-200,a + 45)
call EffectUnitColor(c,x,y,a,2.5,GURA,1,125,125,255,255)
set x = PolarX(GetUnitX(c),-200,a - 45)
set y = PolarY(GetUnitY(c),-200,a - 45)
call EffectUnitColor(c,x,y,a,2.5,GURA,1,125,125,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2.5,HOWL,1,225,225,255,255)
call DustWave(0.4,0.13,1.0,20,GetUnitX(c),GetUnitY(c),255,255,255,30)
call SoundStart("war3mapImported\\whitebeardskills5.mp3",GetUnitX(c),GetUnitY(c))
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),20000,Filter(function PickHero))
loop
set v = FirstOfGroup(g)
exitwhen v == null
call GroupAddUnit(g2,v)
call SetCameraFieldForPlayer(GetOwningPlayer(v),CAMERA_FIELD_ROLL,80,4)
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveReal(HS,GetHandleId(z),0,4)
call TimerStart(z,0.02,true,function TimerMoveLeft)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope NigoriZake initializer init
globals
private constant real DISTANCE = 40
private constant real RADIUS = 350
private constant integer SPELLID = 'A01V'
private constant integer ICENOVA = 'h00S'
private constant integer STOMP = 'h024'
private constant string Wing = "war3mapImported\\AWING.mdx"
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Human\\Avatar\\AvatarCaster.mdl"
endglobals
private struct data
unit c
real xx
real yy
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),xx,yy)
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = (GetUnitAbilityLevel(c,SPELLID) + 2) * GetHeroStr(c,true)
local group g
local unit v
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,x,y)
else
set g = NewGroup()
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call StunUnit(c,v,3)
call SetUnitAnimation(v,"death")
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2,STOMP,1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DustWave(0.4,0.15,0.8,20,GetUnitX(c),GetUnitY(c),255,255,255,30)
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
call SetUnitScale(c,0.85,0.85,0.85)
call ReleaseTimer(z)
call .destroy()
endif
if Distance(x,y,xx,yy) <= 100 then
set g = NewGroup()
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call StunUnit(c,v,3)
call SetUnitAnimation(v,"death")
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2,STOMP,1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DustWave(0.4,0.15,0.8,20,GetUnitX(c),GetUnitY(c),255,255,255,30)
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
call SetUnitScale(c,0.85,0.85,0.85)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .xx = targetx
set .yy = targety
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\NigoriZake.mp3",GetUnitX(c),GetUnitY(c))
endif
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call SetUnitAnimation(c,"attack")
call SetUnitPathing(c,false)
call PolledWait(0.2)
call SetUnitTimeScale(c,0)
call SetUnitScale(c,1.15,1.15,1.15)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call PolledWait(0.5)
call SetUnitScale(c,1.4,1.4,1.4)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call PolledWait(1)
call data.create(c,x,y)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=9
//TESH.alwaysfold=0
scope Rachoumon initializer init
globals
private constant real DISTANCE = 60
private constant real RADIUS = 350
private constant integer SPELLID = 'A01W'
private constant integer ICENOVA = 'h00S'
private constant integer STOMP = 'h024'
private constant integer WAVE = 'h028'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
endglobals
private struct data
unit c
unit t
real xx
real yy
real a
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(c),DISTANCE,.a)
local real y = PolarY(GetUnitY(c),DISTANCE,.a)
local real r = (GetUnitAbilityLevel(c,SPELLID) * GetHeroStr(c,true))
call SetUnitPosition(c,x,y)
if Distance(x,y,xx,yy) <= 100 then
call DamageTarget(c,t,r,TAIJUTSU_DAMAGE)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),1.5,STOMP,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2,WAVE,1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call PauseUnit(c,false)
call PauseUnit(t,false)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
call SetUnitScale(c,0.85,0.85,0.85)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .t = target
set .c = caster
set .a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
set xx = PolarX(GetUnitX(t),200,a)
set yy = PolarY(GetUnitY(t),200,a)
call PauseUnit(t,true)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
call PauseUnit(c,true)
call SetUnitAnimation(c,"attack")
call SetUnitPathing(c,false)
call PolledWait(0.2)
call data.create(c,t)
call SoundStart("war3mapImported\\Zoro2.mp3",GetUnitX(c),GetUnitY(c))
set c = null
set t = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=12
//TESH.alwaysfold=0
scope RokudonoSuji initializer init
globals
private constant real DISTANCE = 30
private constant real RADIUS = 300
private constant integer FIREBALL = 'h029'
private constant integer ICENOVA = 'h00S'
private constant integer STOMP = 'h024'
private constant integer WAVE = 'h028'
private constant integer SPELLID = 'A01X'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
endglobals
private struct data
unit c
unit d
real a
real time = 1
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 40
local unit b
local integer count = 0
set time = time - 0.02
if GetWidgetLife(d) > 0.45 then
call SetUnitPosition(d,x,y)
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
else
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),.a)
set .go = NewGroup()
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = GetUnitFacing(c)
local integer i = 0
local real count = -50
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Zoro3.mp3",GetUnitX(c),GetUnitY(c))
endif
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2.5,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),1,STOMP,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),1,WAVE,1,255,255,255,255)
loop
exitwhen i >= 6
call data.create(GetTriggerUnit(),a + count)
set count = count + 20
set i = i + 1
endloop
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=27
//TESH.alwaysfold=0
scope tatsumaki initializer init
globals
private constant real DISTANCE = 7
private constant real RADIUS = 6
private constant real MAXDIST = 1800
private constant integer BALL = 'h02A'
private constant integer BALL2 = 'h02B'
private constant integer SPELLID = 'A01Y'
private constant integer HOWL = 'h008'
private constant string EFFECT2 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
endglobals
private struct data
unit c
unit d
unit e
unit f
unit k
unit h
unit j
unit l
real time = 6
group go
real a
integer cal = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 25) * 40) / 50
local real dist
local real ang
local real xx
local real yy
local integer count = 1
set time = time - 0.02
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(d,x,y)
call SetUnitPosition(e,x,y)
call SetUnitPosition(f,x,y)
call SetUnitPosition(k,x,y)
call SetUnitPosition(h,x,y)
call SetUnitPosition(j,x,y)
call SetUnitPosition(l,x,y)
endif
set cal = cal + 1
if cal >= 5 then
set cal = 0
call SetUnitAnimation(f,"stand")
call SetUnitAnimation(k,"stand")
call SetUnitAnimation(h,"stand")
call SetUnitAnimation(j,"stand")
call SetUnitAnimation(l,"stand")
call EffectUnitColor(c,x,y,GetUnitFacing(c),2.5,'h02C',0.5,255,255,255,20)
endif
call GroupEnumUnitsInRange(g,x,y,300,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
if IsUnitInGroup(v,go) == false then
call SetUnitPathing(v,false)
endif
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupAddGroup(go,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
set count = count + 1
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
if count <= 2 then
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(v),GetUnitY(v)))
endif
set dist = Distance(GetUnitX(d),GetUnitY(d),GetUnitX(v),GetUnitY(v))
set ang = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(v),GetUnitY(v)) - 2
set xx = PolarX(GetUnitX(d),dist,ang)
set yy = PolarY(GetUnitY(d),dist,ang)
if IsTerrainPathable(xx,yy,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(v,xx,yy)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
loop
set v = FirstOfGroup(go)
exitwhen v == null
call SetUnitPathing(v,true)
call GroupRemoveUnit(go,v)
endloop
call RemoveUnit(e)
call RemoveUnit(d)
call RemoveUnit(f)
call RemoveUnit(k)
call RemoveUnit(h)
call RemoveUnit(j)
call RemoveUnit(l)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .go = NewGroup()
set .c = caster
set .a = angle
set .d = CreateUnit(GetOwningPlayer(.c),BALL,GetUnitX(.c),GetUnitY(.c),.a)
set .e = CreateUnit(GetOwningPlayer(.c),BALL2,GetUnitX(.c),GetUnitY(.c),.a)
set .f = CreateUnit(GetOwningPlayer(.c),'h02C',GetUnitX(.c),GetUnitY(.c),.a)
call SetUnitScale(.f,1.5,1.5,1.5)
call SetUnitFlyHeight(.f,25,0)
call SetUnitVertexColor(.f,255,255,255,20)
call SetUnitTimeScale(.f,GetRandomReal(1,1.5))
set .k = CreateUnit(GetOwningPlayer(.c),'h02C',GetUnitX(.c),GetUnitY(.c),.a)
call SetUnitScale(.k,2,2,2)
call SetUnitFlyHeight(.k,150,0)
call SetUnitVertexColor(.k,255,255,255,20)
call SetUnitTimeScale(.k,GetRandomReal(1,1.5))
set .h = CreateUnit(GetOwningPlayer(.c),'h02C',GetUnitX(.c),GetUnitY(.c),.a)
call SetUnitScale(.h,2.5,2.5,2.5)
call SetUnitFlyHeight(.h,275,0)
call SetUnitVertexColor(.h,255,255,255,20)
call SetUnitTimeScale(.h,GetRandomReal(1,1.5))
set .j = CreateUnit(GetOwningPlayer(.c),'h02C',GetUnitX(.c),GetUnitY(.c),.a)
call SetUnitScale(.j,3,3,3)
call SetUnitFlyHeight(.j,400,0)
call SetUnitVertexColor(.j,255,255,255,20)
call SetUnitTimeScale(.j,GetRandomReal(1,1.5))
set .l = CreateUnit(GetOwningPlayer(.c),'h02C',GetUnitX(.c),GetUnitY(.c),.a)
call SetUnitScale(.l,3.5,3.5,3.5)
call SetUnitFlyHeight(.l,525,0)
call SetUnitVertexColor(.l,255,255,255,20)
call SetUnitTimeScale(.l,GetRandomReal(1,1.5))
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2.5,HOWL,1,225,225,255,255)
call DustWave(0.4,0.15,0.5,20,GetUnitX(c),GetUnitY(c),255,255,255,30)
call data.create(c,a)
call SoundStart("war3mapImported\\Zoro5.mp3",GetUnitX(c),GetUnitY(c))
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope tatsumakizz initializer init
globals
private constant real DISTANCE = 7
private constant real RADIUS = 6
private constant real MAXDIST = 1800
private constant integer BALL = 'h02A'
private constant integer BALL2 = 'h02B'
private constant integer SPELLID = 'A0E9'
private constant integer HOWL = 'h008'
private constant string EFFECT2 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
endglobals
private struct data
unit c
unit d
unit e
unit f
unit k
unit h
unit j
unit l
real time = 6
group go
real a
integer cal = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 25) * 40) / 50
local real dist
local real ang
local real xx
local real yy
local integer count = 1
set time = time - 0.02
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(d,x,y)
call SetUnitPosition(e,x,y)
call SetUnitPosition(f,x,y)
call SetUnitPosition(k,x,y)
call SetUnitPosition(h,x,y)
call SetUnitPosition(j,x,y)
call SetUnitPosition(l,x,y)
endif
set cal = cal + 1
if cal >= 5 then
set cal = 0
call SetUnitAnimation(f,"stand")
call SetUnitAnimation(k,"stand")
call SetUnitAnimation(h,"stand")
call SetUnitAnimation(j,"stand")
call SetUnitAnimation(l,"stand")
call EffectUnitColor(c,x,y,GetUnitFacing(c),2.5,'h02C',0.5,255,255,255,20)
endif
call GroupEnumUnitsInRange(g,x,y,300,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
if IsUnitInGroup(v,go) == false then
call SetUnitPathing(v,false)
endif
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupAddGroup(go,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
set count = count + 1
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
if count <= 2 then
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(v),GetUnitY(v)))
endif
set dist = Distance(GetUnitX(d),GetUnitY(d),GetUnitX(v),GetUnitY(v))
set ang = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(v),GetUnitY(v)) - 2
set xx = PolarX(GetUnitX(d),dist,ang)
set yy = PolarY(GetUnitY(d),dist,ang)
if IsTerrainPathable(xx,yy,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(v,xx,yy)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
loop
set v = FirstOfGroup(go)
exitwhen v == null
call SetUnitPathing(v,true)
call GroupRemoveUnit(go,v)
endloop
call RemoveUnit(e)
call RemoveUnit(d)
call RemoveUnit(f)
call RemoveUnit(k)
call RemoveUnit(h)
call RemoveUnit(j)
call RemoveUnit(l)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .go = NewGroup()
set .c = caster
set .a = angle
set .d = CreateUnit(GetOwningPlayer(.c),BALL,GetUnitX(.c),GetUnitY(.c),.a)
set .e = CreateUnit(GetOwningPlayer(.c),BALL2,GetUnitX(.c),GetUnitY(.c),.a)
set .f = CreateUnit(GetOwningPlayer(.c),'h02C',GetUnitX(.c),GetUnitY(.c),.a)
call SetUnitScale(.f,1.5,1.5,1.5)
call SetUnitFlyHeight(.f,25,0)
call SetUnitVertexColor(.f,255,255,255,20)
call SetUnitTimeScale(.f,GetRandomReal(1,1.5))
set .k = CreateUnit(GetOwningPlayer(.c),'h02C',GetUnitX(.c),GetUnitY(.c),.a)
call SetUnitScale(.k,2,2,2)
call SetUnitFlyHeight(.k,150,0)
call SetUnitVertexColor(.k,255,255,255,20)
call SetUnitTimeScale(.k,GetRandomReal(1,1.5))
set .h = CreateUnit(GetOwningPlayer(.c),'h02C',GetUnitX(.c),GetUnitY(.c),.a)
call SetUnitScale(.h,2.5,2.5,2.5)
call SetUnitFlyHeight(.h,275,0)
call SetUnitVertexColor(.h,255,255,255,20)
call SetUnitTimeScale(.h,GetRandomReal(1,1.5))
set .j = CreateUnit(GetOwningPlayer(.c),'h02C',GetUnitX(.c),GetUnitY(.c),.a)
call SetUnitScale(.j,3,3,3)
call SetUnitFlyHeight(.j,400,0)
call SetUnitVertexColor(.j,255,255,255,20)
call SetUnitTimeScale(.j,GetRandomReal(1,1.5))
set .l = CreateUnit(GetOwningPlayer(.c),'h02C',GetUnitX(.c),GetUnitY(.c),.a)
call SetUnitScale(.l,3.5,3.5,3.5)
call SetUnitFlyHeight(.l,525,0)
call SetUnitVertexColor(.l,255,255,255,20)
call SetUnitTimeScale(.l,GetRandomReal(1,1.5))
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2.5,HOWL,1,225,225,255,255)
call DustWave(0.4,0.15,0.5,20,GetUnitX(c),GetUnitY(c),255,255,255,30)
call data.create(c,a)
call SoundStart("war3mapImported\\Zoro5.mp3",GetUnitX(c),GetUnitY(c))
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope SanzenSekai initializer init
globals
private constant real DISTANCE = 40
private constant real RADIUS = 350
private constant integer SPELLID = 'A01Z'
private constant integer BLADE = 'h08O'
private constant integer DUST = 'h08O'
private constant string EFFECT = "war3mapImported\\6Slash.mdx"
private constant string EFFECT2 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
endglobals
private struct data
unit c
unit d
real a
real time = 0.75
integer cal = 0
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local unit v
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
loop
set v = FirstOfGroup(go)
exitwhen v == null
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(v),GetUnitY(v)))
call PauseUnit(v,false)
call SetUnitTimeScale(v,1)
call DamageTarget(c,v,GetHeroStr(c,true) * 15,TAIJUTSU_DAMAGE)
call GroupRemoveUnit(go,v)
endloop
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = 50
local group g = NewGroup()
local unit v
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,x,y)
call SetUnitPosition(d,x,y)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call GroupAddUnit(go,v)
call PauseUnit(v,true)
call SetUnitAnimation(v,"death")
call SetUnitTimeScale(v,0)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set time = time - 0.02
set cal = cal + 1
if cal >= 4 then
set cal = 0
call EffectUnitColor(c,x,y,GetUnitFacing(c),2.5,DUST,0.5,255,255,255,255)
endif
if time <= 0 then
call RemoveUnit(d)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DustWave(0.4,0.15,0.8,20,GetUnitX(c),GetUnitY(c),255,255,255,30)
call TimerStart(z,1,false,function data.FinalTimer)
endif
endmethod
static method create takes unit caster,unit eff, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .d = eff
set .a = angle
set .go = NewGroup()
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
local unit d = CreateUnit(GetOwningPlayer(c),BLADE,PolarX(GetUnitX(c),40,a),PolarY(GetUnitY(c),40,a),a)
local integer i = 0
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call SetUnitAnimation(c,"attack")
call SetUnitPathing(c,false)
call PolledWait(0.1)
call SetUnitTimeScale(c,0)
call SoundStart("war3mapImported\\CrossingSixPath.mp3",GetUnitX(c),GetUnitY(c))
loop
exitwhen i >= 15
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2.5,DUST,0.7,255,255,255,255)
call TriggerSleepAction(0)
set i = i + 1
endloop
call data.create(c,d,a)
set c = null
set d = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=27
//TESH.alwaysfold=0
scope SanzenSekaiz initializer init
globals
private constant real DISTANCE = 40
private constant real RADIUS = 350
private constant integer SPELLID = 'A0DB'
private constant integer BLADE = 'h0F8'
private constant integer DUST = 'h02C'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
endglobals
private struct data
unit c
unit d
real a
real time = 0.75
integer cal = 0
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local unit v
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
loop
set v = FirstOfGroup(go)
exitwhen v == null
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(v),GetUnitY(v)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(v),GetUnitY(v)))
call PauseUnit(v,false)
call SetUnitTimeScale(v,1)
call DamageTarget(c,v,GetHeroStr(c,true) * 13,TAIJUTSU_DAMAGE)
call GroupRemoveUnit(go,v)
endloop
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = 50
local group g = NewGroup()
local unit v
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,x,y)
call SetUnitPosition(d,x,y)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call GroupAddUnit(go,v)
call PauseUnit(v,true)
call SetUnitAnimation(v,"death")
call SetUnitTimeScale(v,0)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set time = time - 0.02
set cal = cal + 1
if cal >= 4 then
set cal = 0
call EffectUnitColor(c,x,y,GetUnitFacing(c),2.5,DUST,0.5,255,255,255,255)
endif
if time <= 0 then
call RemoveUnit(d)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DustWave(0.4,0.15,0.8,20,GetUnitX(c),GetUnitY(c),255,255,255,30)
call TimerStart(z,1,false,function data.FinalTimer)
endif
endmethod
static method create takes unit caster,unit eff, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .d = eff
set .a = angle
set .go = NewGroup()
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
local unit d = CreateUnit(GetOwningPlayer(c),BLADE,PolarX(GetUnitX(c),40,a),PolarY(GetUnitY(c),40,a),a)
local integer i = 0
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call SetUnitAnimation(c,"attack")
call SetUnitPathing(c,false)
call PolledWait(0.1)
call SetUnitTimeScale(c,0)
call SoundStart("war3mapImported\\SanzenSekai.mp3",GetUnitX(c),GetUnitY(c))
loop
exitwhen i >= 0
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2.5,DUST,0.7,255,255,255,255)
call TriggerSleepAction(0)
set i = i + 1
endloop
call data.create(c,d,a)
set c = null
set d = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=144
//TESH.alwaysfold=0
scope Onigiri initializer init
globals
private constant integer SPELLID = 'A0CD'
private constant integer DUMMYABILITYID = 'A06L'
private constant integer SPELLID2 = 'A000'
private constant integer BUFFID = 'B00X'
private constant integer ICENOVA = 'h00S'
private constant integer BLUEBOMB = 'h01C'
private constant integer BLINKBIG = 'h011'
private constant integer DT = 'h01D'
private constant integer FIRAGA = 'h00Z'
private constant string RASEN = "war3mapImported\\Rasengan.mdx"
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\SkyNeutralBuildingExplosion.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\Firaga3.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private constant string EFFECT6 = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT7 = "Units\\Undead\\Abomination\\AbominationExplosion.mdl"
private hashtable HT = InitHashtable()
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID and GetUnitAbilityLevel(GetTriggerUnit(),'A06J') <= 1
endfunction
private function FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local group g = CreateGroup()
local unit v
local unit c = LoadUnitHandle(HT,GetHandleId(z),0)
local integer count = 0
call GroupEnumUnitsInRect(g,GetWorldBounds(),null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitAlly(v,GetOwningPlayer(c)) == true and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(v,BUFFID) > 0 and IsUnitIllusion(v) == true then
set count = count + 1
endif
call GroupRemoveUnit(g,v)
endloop
call DestroyGroup(g)
if count <= 0 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,false)
call ReleaseTimer(z)
call FlushChildHashtable(HT,GetHandleId(z))
endif
set g = null
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local player p = GetOwningPlayer(c)
local real r = GetHeroInt(c,true) * 3
local real r2 = (GetUnitAbilityLevel(c,SPELLID) + 2) * GetHeroStr(c,true)
local real x = PolarX(GetUnitX(t),120,GetUnitFacing(t) + 180)
local real y = PolarY(GetUnitY(t),120,GetUnitFacing(t) + 180)
local real xx = GetUnitX(c)
local real yy = GetUnitY(c)
local real face = GetUnitFacing(c)
local timer z
call SetUnitPosition(c,x,y)
call SetUnitFacing(c,GetUnitFacing(t))
call SetUnitAnimation(c,"attack")
call SoundStart("war3mapImported\\docham.mp3",GetUnitX(c),GetUnitY(c))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,DUMMYABILITYID)
call IssueTargetOrderById(bj_lastCreatedUnit,852274,c)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.5)
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(t),GetUnitY(t)))
call StunUnit(c,t,2)
call IssueTargetOrder(c,"attack",t)
call DamageTarget(c,t,r2,TAIJUTSU_DAMAGE)
call SaveReal(HT,GetHandleId(p),0,r)
call SaveReal(HT,GetHandleId(p),1,xx)
call SaveReal(HT,GetHandleId(p),2,yy)
call SaveReal(HT,GetHandleId(p),3,face)
call SaveUnitHandle(HT,GetHandleId(p),0,c)
if GetUnitTypeId(c) != KAKASHI then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,true)
set z = NewTimer()
call SaveUnitHandle(HT,GetHandleId(z),0,c)
call TimerStart(z,0.06,true,function FinalTimer)
endif
set c = null
set p = null
endfunction
private function Conditions2 takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),BUFFID) >= 1 and IsUnitIllusion(GetTriggerUnit()) == true
endfunction
private function DeadLightning takes nothing returns nothing
local trigger t = GetTriggeringTrigger()
local unit c = GetTriggerUnit()
local real r = LoadReal(HT,GetHandleId(t),0)
local integer i = 0
local real x
local real y
local group g
local real a
local unit v
set g = NewGroup()
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),400,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
set a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(v),GetUnitY(v))
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call SlideUnitAngle(v,16,0.6,a,"")
call ImpaleUnit(v,0.6)
call SetUnitAnimation(v,"death")
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),6,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2.3,DT,1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyTrigger(t)
call FlushChildHashtable(HT,GetHandleId(t))
set t = null
set c = null
endfunction
private function Actions2 takes nothing returns nothing
local unit n = GetTriggerUnit()
local player p = GetOwningPlayer(n)
local unit c = LoadUnitHandle(HT,GetHandleId(p),0)
local real r = LoadReal(HT,GetHandleId(p),0)
local real xx = LoadReal(HT,GetHandleId(p),1)
local real yy = LoadReal(HT,GetHandleId(p),2)
local real face = LoadReal(HT,GetHandleId(p),3)
local trigger t = CreateTrigger()
call SaveReal(HT,GetHandleId(t),0,r)
call TriggerRegisterUnitEvent(t,n,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function DeadLightning)
call SetUnitPosition(n,xx,yy)
call SetUnitFacing(n,face)
call IssueImmediateOrder(n,"holdposition")
call FlushChildHashtable(HT,GetHandleId(p))
set n = null
set c = null
set p = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger t2 = CreateTrigger()
local integer index = 0
call PreloadAbility(DUMMYABILITYID)
call PreloadAbility('A06A')
call PreloadAbility('A02L')
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
call TriggerRegisterEnterRectSimple(t2,bj_mapInitialPlayableArea)
call TriggerAddCondition(t2,Condition(function Conditions2))
call TriggerAddAction(t2,function Actions2)
set t = null
set t2 = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope ZeroPointFirstz initializer init
globals
private constant real DISTANCE = 25
private constant real RADIUS = 250
private constant integer SPELLID = 'A0BQ'
private constant string EFFECT4 = "Doodads\\Icecrown\\Rocks\\Icecrown_Crystal\\Icecrown_Crystal2.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl"
private constant string EFFECT = "Doodads\\Icecrown\\Rocks\\Icecrown_Crystal\\Icecrown_Crystal2.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathTargetArt.mdl"
endglobals
private struct data
unit c
real time = 1.5
real x
real y
group go
integer animate = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),x,y)
local real xx = PolarX(GetUnitX(c),DISTANCE,a)
local real yy = PolarY(GetUnitY(c),DISTANCE,a)
local real r = (GetUnitAbilityLevel(c,SPELLID) + 2) * GetHeroAgi(c,true)
local group g = NewGroup()
local unit v
local unit d
set time = time - 0.02
if IsTerrainPathable(xx,yy,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,xx,yy)
else
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call ReleaseTimer(z)
call ReleaseGroup(go)
call .destroy()
endif
call SetUnitPosition(c,xx,yy)
set animate = animate + 1
if animate >= 3 then
set animate = 0
if GetRandomReal(1,100) <= 50 then
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
call DestroyEffect(AddSpecialEffect(EFFECT,xx,yy))
else
call DestroyEffect(AddSpecialEffect(EFFECT3,xx,yy))
call DestroyEffect(AddSpecialEffect(EFFECT4,xx,yy))
endif
endif
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call FreezeUnit(c,v,2)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if Distance(x,y,xx,yy) <= 50 then
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call ReleaseTimer(z)
call ReleaseGroup(go)
call .destroy()
endif
set d = null
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .x = targetx
set .y = targety
set .go = NewGroup()
call SetUnitInvulnerable(.c,true)
call SetUnitPathing(.c,false)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
call SoundStart("war3mapImported\\ip.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope RaikouHoukoz initializer init
globals
private integer check
private group gammagroup = CreateGroup()
endglobals
private function Trig_ShotPlasma_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A0DI'
endfunction
private function PlasmaMove takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit e = LoadUnitHandle(udg_HashGame,0,GetHandleId(z))
local real a = LoadReal(udg_HashGame,0,GetHandleId(z))
local real x = PolarX(GetUnitX(e),14,a)
local real y = PolarY(GetUnitY(e),14,a)
local unit c = LoadUnitHandle(udg_HashGame,1,GetHandleId(z))
local unit d
local real r = GetUnitAbilityLevel(c,'A0DI') * 100
local group g = CreateGroup()
call SetUnitPosition(e,x,y)
set check = check + 1
call GroupEnumUnitsInRange(g,x,y,300,null)
loop
set d=FirstOfGroup(g)
exitwhen d==null
if IsUnitEnemy(d,GetOwningPlayer(c))==true and GetUnitAbilityLevel(d,'Avul') != 1 and GetWidgetLife(d) > 0.45 and IsUnitType(d, UNIT_TYPE_STRUCTURE)==false and IsUnitInGroup(d,gammagroup) == false then
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathTargetArt.mdl",GetUnitX(d),GetUnitY(d)))
call UnitDamageTarget(c,d,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
endif
call GroupRemoveUnit(g,d)
call GroupAddUnit(gammagroup,d)
endloop
if check >= 10 then
set check = 0
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h0ET',GetUnitX(e),GetUnitY(e),0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.7)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\FrostArmor\\FrostArmorDamage.mdl",GetUnitX(e),GetUnitY(e)))
endif
set e = null
set z = null
endfunction
private function Trig_ShotPlasma_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local location t = GetSpellTargetLoc()
local real x = GetLocationX(t)
local real y = GetLocationY(t)
local real xx = GetUnitX(c)
local real yy = GetUnitY(c)
local unit d
local timer z = CreateTimer()
local effect e
local real a = anglebetweenpoints(xx,yy,x,y)
set check = 0
call GroupClear(gammagroup)
call SoundStart("war3mapImported\\peasantbeak.mp3",GetUnitX(c),GetUnitY(c))
set d = CreateUnit(GetOwningPlayer(c),'h0EU',xx,yy,bj_UNIT_FACING)
call SetUnitFlyHeight(d,100,0)
set e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathTargetArt.mdl",d,"chest")
call SaveUnitHandle(udg_HashGame,0,GetHandleId(z),d)
call SaveReal(udg_HashGame,0,GetHandleId(z),a)
call SaveUnitHandle(udg_HashGame,1,GetHandleId(z),c)
call TimerStart(z,0.02,true,function PlasmaMove)
call TriggerSleepAction(2)
call PauseTimer(z)
call DestroyTimer(z)
call FlushChildHashtable(udg_HashGame,GetHandleId(z))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\FrostArmor\\FrostArmorDamage.mdl",GetUnitX(d),GetUnitY(d)))
call DestroyEffect(e)
call RemoveUnit(d)
call RemoveLocation(t)
set d = null
set e = null
set z = null
set t = null
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function Trig_ShotPlasma_Conditions ) )
call TriggerAddAction( t, function Trig_ShotPlasma_Actions )
set t = null
call Preload("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl")
set bj_lastCreatedUnit = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'h008',0,0,0)
call UnitAddAbility(bj_lastCreatedUnit,'A052')
call KillUnit(bj_lastCreatedUnit)
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope IceTime initializer init
globals
private constant real DISTANCE = 40
private constant real RADIUS = 500
private constant integer SPELLID = 'A0DJ'
private constant integer TORNADO1 = 'h0EV'
private constant integer TORNADO2 = 'h0EW'
private constant integer TORNADO3 = 'h0EX'
private constant integer HOWL = 'h080'
private constant integer ICENOVA = 'h080'
endglobals
private struct data
unit c
real time = 4
integer cal = 0
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = GetUnitAbilityLevel(c,SPELLID) * 2
local group g = NewGroup()
local unit v
set time = time - 0.02
set cal = cal + 1
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupAddGroup(go,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
if Distance(GetUnitX(c),GetUnitY(c),GetUnitX(v),GetUnitY(v)) > RADIUS then
call GroupRemoveUnit(go,v)
call PauseUnit(v,false)
endif
call PauseUnit(v,true)
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if cal >= 8 then
set cal = 0
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,2,HOWL,5,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,1,ICENOVA,5,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,3.4,'h080',5,255,255,255,55)
endif
if time <= 0 then
loop
set v = FirstOfGroup(go)
exitwhen v == null
call PauseUnit(v,false)
call GroupRemoveUnit(go,v)
endloop
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call SetUnitAnimation(c,"attack2")
call PauseUnit(c,false)
call ReleaseTimer(z)
call ReleaseGroup(go)
call .destroy()
endif
endmethod
static method create takes unit caster returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .go = NewGroup()
call PauseUnit(c,true)
call SetUnitInvulnerable(.c,true)
call SetUnitPathing(.c,false)
call SetUnitAnimation(c,"spell 1")
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,5.7,TORNADO1,3,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,4.2,TORNADO1,3,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,4.6,TORNADO1,2.5,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,4.1,TORNADO1,2.5,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),90,3,TORNADO2,2.5,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),90,3.4,TORNADO2,4,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,4,TORNADO3,4,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,4.3,TORNADO3,4,255,255,255,100)
call SetTimerData(z,this)
call SoundStart("war3mapImported\\IceTime.mp3",GetUnitX(c),GetUnitY(c))
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=9
//TESH.alwaysfold=0
scope Tsunamiboss initializer init
globals
private constant real DISTANCE = 15
private constant real RADIUS = 200
private constant real MAXDIST = 1600
private constant integer WAVE = 'h021'
private constant integer GURA = 'h022'
private constant integer STONE = 'h023'
private constant integer HOWL = 'h008'
private constant integer SPELLID = 'A0DZ'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT3 = "war3mapImported\\howling2.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private function Trig_Tsunami_Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Trig_Tsunami_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local real xc = GetUnitX(c)
local real yc = GetUnitY(c)
local real a = Angle(xc,yc,x,y)
local real xx = PolarX(xc,800,a + 90)
local real yy = PolarY(yc,800,a + 90)
local real xx2 = PolarX(xc,800,a - 90)
local real yy2 = PolarY(yc,800,a - 90)
local real xxx
local real yyy
local real xt
local real yt
local real xxx2
local real yyy2
local real xt2
local real yt2
local integer i = 1
local unit d
local unit v
local group g
local group ignore = NewGroup()
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 2) + 8) * GetHeroStr(c,true)
set x = PolarX(GetUnitX(c),-200,a + 45)
set y = PolarY(GetUnitY(c),-200,a + 45)
call EffectUnitColor(c,x,y,a,2.5,GURA,1,125,125,255,255)
set x = PolarX(GetUnitX(c),-200,a - 45)
set y = PolarY(GetUnitY(c),-200,a - 45)
call EffectUnitColor(c,x,y,a,2.5,GURA,1,125,125,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2.5,HOWL,1,225,225,255,255)
call DustWave(0.4,0.13,1.0,20,GetUnitX(c),GetUnitY(c),255,255,255,30)
call SoundStart("war3mapImported\\whitebeardskills4.mp3",GetUnitX(c),GetUnitY(c))
call PolledWait(0.8)
loop
exitwhen i > 50
set xxx = PolarX(xx,i * 30,a)
set yyy = PolarY(yy,i * 30,a)
set xt = PolarX(xxx,GetRandomReal(600,800),a - 90)
set yt = PolarY(yyy,GetRandomReal(600,800),a - 90)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",xxx,yyy))
set d = CreateUnit(GetOwningPlayer(c),'h026',xxx,yyy,a + 90)
call Jump(d,GetRandomReal(2.1,2.6),xt,yt,2.8,200,"","Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl","")
call UnitApplyTimedLife(d,'BTLF',0.01)
set d = null
set i = i + 1
endloop
set i = 1
loop
exitwhen i > 50
set xxx2 = PolarX(xx2,i * 30,a)
set yyy2 = PolarY(yy2,i * 30,a)
set xt2 = PolarX(xxx2,GetRandomReal(600,800),a + 90)
set yt2 = PolarY(yyy2,GetRandomReal(600,800),a + 90)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",xxx2,yyy2))
set d = CreateUnit(GetOwningPlayer(c),'h026',xxx2,yyy2,a + 270)
call Jump(d,GetRandomReal(2.1,2.6),xt2,yt2,2.8,200,"","Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl","")
call UnitApplyTimedLife(d,'BTLF',0.01)
set d = null
set i = i + 1
endloop
call ShakeGroupCamera(2.1,x,y,1200,10)
call TriggerSleepAction(2.1)
set i = 1
loop
exitwhen i > 10
set xxx2 = PolarX(xc,i * 150,a)
set yyy2 = PolarY(yc,i * 150,a)
set g = NewGroup()
call GroupEnumUnitsInRange(g,xxx2,yyy2,RADIUS,Filter(function PickUnit))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitInGroup(v,ignore) == false then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call StunUnit(c,v,2)
call SetUnitAnimation(v,"death")
call GroupAddUnit(ignore,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",xxx2,yyy2))
call DestroyEffect(AddSpecialEffect("war3mapImported\\WaterBullet.mdx",xxx2,yyy2))
set i = i + 1
endloop
call ReleaseGroup(ignore)
set i = 0
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger( )
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t, Condition( function Trig_Tsunami_Conditions ) )
call TriggerAddAction(t, function Trig_Tsunami_Actions )
endfunction
endscope
//TESH.scrollpos=33
//TESH.alwaysfold=0
scope SeaEmpress initializer init
globals
private constant integer SPELLID = 'A022'
private constant integer ICENOVA = 'h00S'
private constant integer EXPLODE = 'h01O'
private constant integer BLUEBOMB = 'h01N'
private constant integer DT = 'h01D'
private constant integer SPELLDASH = 'A00W'
private constant string EFFECT2 = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT5 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
hashtable ERZA = InitHashtable()
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function ExpiredTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local trigger t = GetTriggeringTrigger()
local unit c = LoadUnitHandle(ERZA,GetHandleId(z),0)
if GetWidgetLife(c) > 0.45 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A025',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A026',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A027',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02W',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A031',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A023',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A024',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02H',true)
call RemoveSavedInteger(ERZA,GetHandleId(c),0)
call ReleaseTimer(z)
call FlushChildHashtable(ERZA,GetHandleId(z))
call DestroyTrigger(t)
endif
set t = null
set c = null
endfunction
private function ReturnFormDeath takes nothing returns nothing
local unit c = GetTriggerUnit()
local timer z = NewTimer()
call SaveUnitHandle(ERZA,GetHandleId(z),0,c)
call TimerStart(z,0.05,true,function ExpiredTimer)
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local trigger t
if HaveSavedInteger(ERZA,GetHandleId(c),0) == false then
call SaveInteger(ERZA,GetHandleId(c),0,1)
set t = CreateTrigger()
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function ReturnFormDeath)
call SaveTriggerHandle(ERZA,GetHandleId(c),0,t)
call DustWave(1,0.16,0.7,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),1.2,ICENOVA,1,255,255,255,255)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A023',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A031',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A024',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02H',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A025',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A026',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A027',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02W',true)
call SetUnitAbilityLevel(c,'A025',GetUnitAbilityLevel(c,SPELLID))
call SetUnitAbilityLevel(c,'A026',GetUnitAbilityLevel(c,SPELLID))
call SetUnitAbilityLevel(c,'A02W',GetUnitAbilityLevel(c,SPELLID))
call SetUnitAbilityLevel(c,'A027',GetUnitAbilityLevel(c,SPELLID) / 2)
else
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A025',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A026',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A027',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02W',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A031',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A023',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A024',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02H',true)
call RemoveSavedInteger(ERZA,GetHandleId(c),0)
call DestroyTrigger(LoadTriggerHandle(ERZA,GetHandleId(c),0))
endif
set t = null
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=19
//TESH.alwaysfold=0
scope WaterRelease initializer init
globals
private constant real DISTANCE = 30
private constant real RADIUS = 350
private constant real MAXDIST = 1200
private constant integer FIREBALL = 'h026'
private constant integer ICENOVA = 'h00S'
private constant integer NARUTO = 'h01B'
private constant integer BLUEBOMB = 'h01C'
private constant integer DT = 'h01D'
private constant integer SPELLID = 'A025'
private constant string EFFECT = "war3mapImported\\WaterBullet.mdx"
private constant string EFFECT2 = "Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"
endglobals
private struct data
unit c
unit d
unit t
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
local unit v
call SetUnitPosition(d,x,y)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 50 then
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),3,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),3,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),1.2,DT,1,255,255,255,255)
set v = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
call UnitAddAbility(v,'A02U')
call IssueTargetOrder(v,"slow",t)
call UnitApplyTimedLife(v,'BTLF',0.5)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
set v = null
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .t = target
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),Angle(GetUnitX(.c),GetUnitY(.c),GetUnitX(.t),GetUnitY(.t)))
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=70
//TESH.alwaysfold=0
scope WaterMove initializer init
globals
private constant real DISTANCE = 25
private constant real RADIUS = 350
private constant integer SPELLID = 'A026'
private constant string EFFECT2 = "Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"
endglobals
private struct data
unit c
real x
real y
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),x,y)
local real xx = PolarX(GetUnitX(c),DISTANCE,a)
local real yy = PolarY(GetUnitY(c),DISTANCE,a)
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
local group g = NewGroup()
local unit v
local unit d
if IsTerrainPathable(xx,yy,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,xx,yy)
else
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call DustWave(0.4,0.15,0.8,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call ReleaseTimer(z)
call ReleaseGroup(go)
call .destroy()
endif
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
call UnitAddAbility(d,'A02U')
call IssueTargetOrder(d,"slow",v)
call UnitApplyTimedLife(d,'BTLF',0.5)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if Distance(x,y,xx,yy) <= 50 then
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call DustWave(0.4,0.15,0.8,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call ReleaseTimer(z)
call ReleaseGroup(go)
call .destroy()
endif
set d = null
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .x = targetx
set .y = targety
set .go = NewGroup()
call SetUnitInvulnerable(.c,true)
call SetUnitPathing(.c,false)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=12
//TESH.alwaysfold=0
scope HeavenWheel initializer init
globals
private constant integer SPELLID = 'A023'
private constant integer ICENOVA = 'h00S'
private constant integer EXPLODE = 'h01O'
private constant integer BLUEBOMB = 'h01N'
private constant integer DT = 'h01D'
private constant integer SPELLDASH = 'A00W'
private constant string EFFECT2 = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT5 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function ExpiredTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local trigger t = GetTriggeringTrigger()
local unit c = LoadUnitHandle(ERZA,GetHandleId(z),0)
if GetWidgetLife(c) > 0.45 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A031',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A022',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A024',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02H',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A028',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A029',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02A',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02Y',false)
call RemoveSavedInteger(ERZA,GetHandleId(c),0)
call ReleaseTimer(z)
call FlushChildHashtable(ERZA,GetHandleId(z))
call DestroyTrigger(t)
endif
set t = null
set c = null
endfunction
private function ReturnFormDeath takes nothing returns nothing
local unit c = GetTriggerUnit()
local timer z = NewTimer()
call SaveUnitHandle(ERZA,GetHandleId(z),0,c)
call TimerStart(z,0.05,true,function ExpiredTimer)
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local trigger t
if HaveSavedInteger(ERZA,GetHandleId(c),0) == false then
call SaveInteger(ERZA,GetHandleId(c),0,1)
set t = CreateTrigger()
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function ReturnFormDeath)
call SaveTriggerHandle(ERZA,GetHandleId(c),0,t)
call DustWave(1,0.16,0.7,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),1.2,ICENOVA,1,255,255,255,255)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A022',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A031',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A024',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02H',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A028',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A029',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02A',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02Y',true)
call SetUnitAbilityLevel(c,'A028',GetUnitAbilityLevel(c,SPELLID))
call SetUnitAbilityLevel(c,'A029',GetUnitAbilityLevel(c,SPELLID))
call SetUnitAbilityLevel(c,'A02Y',GetUnitAbilityLevel(c,SPELLID))
call SetUnitAbilityLevel(c,'A02A',GetUnitAbilityLevel(c,SPELLID) / 2)
else
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A031',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A022',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A024',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02H',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A028',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A029',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02A',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02Y',false)
call RemoveSavedInteger(ERZA,GetHandleId(c),0)
call DestroyTrigger(LoadTriggerHandle(ERZA,GetHandleId(c),0))
endif
set t = null
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope BladeMove
globals
private constant real DISTANCE = 30
private constant real RADIUS = 200
private constant integer BLADE = 'h02M'
endglobals
struct BladeMove
unit c
unit d
real a
real time
group go
real r
private method destroy takes nothing returns nothing
call .deallocate()
endmethod
private static method Boolean takes nothing returns boolean
return true
endmethod
private static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local BladeMove this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local unit b
local integer count = 0
set time = time - 0.02
if GetWidgetLife(d) > 0.45 then
call SetUnitPosition(d,x,y)
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function BladeMove.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
else
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit dummy, real angle, real times, real damage returns thistype
local timer z = NewTimer()
local BladeMove this = BladeMove.allocate()
set .c = caster
set .a = angle
set .time = times
set .d = dummy
set .r = damage
set .go = NewGroup()
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function BladeMove.TimerExpired)
return this
endmethod
endstruct
struct BladeMove2
unit c
unit d
real a
real time
group go
real r
private method destroy takes nothing returns nothing
call .deallocate()
endmethod
private static method Boolean takes nothing returns boolean
return true
endmethod
private static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local BladeMove2 this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),35,a)
local real y = PolarY(GetUnitY(d),35,a)
local group g = NewGroup()
local unit v
local unit b
local integer count = 0
set time = time - 0.02
if GetWidgetLife(d) > 0.45 then
call SetUnitPosition(d,x,y)
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function BladeMove2.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
else
call RemoveUnit(d)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
private static method TimerExpired1 takes nothing returns nothing
local timer z = GetExpiredTimer()
local BladeMove2 this = GetTimerData(z)
call TimerStart(z,0.02,true,function BladeMove2.TimerExpired)
endmethod
static method create takes unit caster, unit dummy, real angle, real times, real damage returns thistype
local timer z = NewTimer()
local BladeMove2 this = BladeMove2.allocate()
set .c = caster
set .a = angle
set .time = times
set .d = dummy
set .r = damage
set .go = NewGroup()
call SetTimerData(z,this)
call TimerStart(z,1,false,function BladeMove2.TimerExpired1)
return this
endmethod
endstruct
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope BlackWing initializer init
globals
private constant integer SPELLID = 'A031'
private constant integer ICENOVA = 'h00S'
private constant integer EXPLODE = 'h01O'
private constant integer BLUEBOMB = 'h01N'
private constant integer DT = 'h01D'
private constant integer SPELLDASH = 'A00W'
private constant string EFFECT2 = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT5 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function ExpiredTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local trigger t = GetTriggeringTrigger()
local unit c = LoadUnitHandle(ERZA,GetHandleId(z),0)
if GetWidgetLife(c) > 0.45 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A023',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A022',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A024',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02H',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02B',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02C',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02D',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02X',false)
call RemoveSavedInteger(ERZA,GetHandleId(c),0)
call ReleaseTimer(z)
call FlushChildHashtable(ERZA,GetHandleId(z))
call DestroyTrigger(t)
endif
set t = null
set c = null
endfunction
private function ReturnFormDeath takes nothing returns nothing
local unit c = GetTriggerUnit()
local timer z = NewTimer()
call SaveUnitHandle(ERZA,GetHandleId(z),0,c)
call TimerStart(z,0.05,true,function ExpiredTimer)
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local trigger t
if HaveSavedInteger(ERZA,GetHandleId(c),0) == false then
call SaveInteger(ERZA,GetHandleId(c),0,1)
set t = CreateTrigger()
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function ReturnFormDeath)
call SaveTriggerHandle(ERZA,GetHandleId(c),0,t)
call DustWave(1,0.16,0.7,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),1.2,ICENOVA,1,255,255,255,255)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A022',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A023',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A024',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02H',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02B',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02C',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02D',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02X',true)
call SetUnitAbilityLevel(c,'A02B',GetUnitAbilityLevel(c,SPELLID))
call SetUnitAbilityLevel(c,'A02C',GetUnitAbilityLevel(c,SPELLID))
call SetUnitAbilityLevel(c,'A02X',GetUnitAbilityLevel(c,SPELLID))
call SetUnitAbilityLevel(c,'A02D',GetUnitAbilityLevel(c,SPELLID) / 2)
else
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A023',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A022',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A024',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02H',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02B',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02C',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02D',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02X',false)
call RemoveSavedInteger(ERZA,GetHandleId(c),0)
call DestroyTrigger(LoadTriggerHandle(ERZA,GetHandleId(c),0))
endif
set t = null
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope ShadowAttack initializer init
globals
private constant real DISTANCE = 25
private constant real RADIUS = 350
private constant integer SPELLID = 'A02B'
private constant integer ICENOVA = 'h00S'
private constant integer BLUEBOMB = 'h01C'
private constant integer STOMP = 'h01J'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT5 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
endglobals
private struct data
unit c
unit t
real time = 0.5
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real xx = PolarX(GetUnitX(t),DISTANCE,a)
local real yy = PolarY(GetUnitY(t),DISTANCE,a)
local real xxx = PolarX(xx,150,a)
local real yyy = PolarY(yy,150,a)
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
set time = time - 0.02
call SetUnitPosition(c,x,y)
call SetUnitPosition(t,xx,yy)
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
if time <= 0 then
call DustWave(1,0.16,0.7,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call SetUnitPosition(c,xxx,yyy)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),1.2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),120,2.2,STOMP,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),240,2.2,STOMP,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),360,2.2,STOMP,1,255,255,255,255)
call DamageTarget(c,t,r,TAIJUTSU_DAMAGE)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = 50
local integer i = 0
call SetUnitPosition(c,x,y)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 150 then
call PauseUnit(.c,false)
call SetUnitPathing(.c,true)
call SetUnitTimeScale(c,1)
call TimerStart(z,0.02,true,function data.FinalTimer)
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 0
local real x
local real y
local real a = Angle(GetUnitX(caster),GetUnitY(caster),GetUnitX(target),GetUnitY(target))
set .c = caster
set .t = target
call PauseUnit(.c,true)
call SetUnitPathing(.c,false)
call SetUnitAnimation(c,"attack")
call PolledWait(0.2)
call SetUnitTimeScale(c,0)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope MoonGlimpse initializer init
globals
private constant real RADIUS = 350
private constant integer SPELLID = 'A02D'
private constant integer MAXHIT = 26
private constant string EFFECT = "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT5 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
endglobals
private struct data
unit c
unit t
integer hit = 0
effect e
method destroy takes nothing returns nothing
call DestroyEffect(e)
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = GetRandomReal(0,360)
local real x = PolarX(GetUnitX(t),120,r)
local real y = PolarY(GetUnitY(t),120,r)
local integer i = 0
local real dam = GetUnitAbilityLevel(c,SPELLID) * 15
local real a = Angle(x,y,GetUnitX(t),GetUnitY(t))
call SetUnitPosition(c,x,y)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,x,y))
call SetUnitAnimation(c,"attack")
call SetUnitFacing(c,a)
call DamageTarget(c,t,dam,TAIJUTSU_DAMAGE)
set hit = hit + 1
if hit >= MAXHIT then
call PauseUnit(.c,false)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(.c,true)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 0
local real x
local real y
local real a = Angle(GetUnitX(caster),GetUnitY(caster),GetUnitX(target),GetUnitY(target))
set .c = caster
set .t = target
set e = AddSpecialEffectTarget("war3mapImported\\Blue Laser Ray.mdx",c,"weapon")
call PauseUnit(.c,true)
call SetUnitInvulnerable(c,true)
call SetUnitPathing(.c,false)
call SetUnitTimeScale(c,5)
call SetTimerData(z,this)
call TimerStart(z,0.15,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\MoonGlimpse.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=92
//TESH.alwaysfold=0
scope Samurai initializer init
globals
private constant integer SPELLID = 'A0AS'
private constant integer ICENOVA = 'h00S'
private constant integer EXPLODE = 'h01O'
private constant integer BLUEBOMB = 'h01N'
private constant string EFFECT2 = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT5 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function ExpiredTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local trigger t = GetTriggeringTrigger()
local unit c = LoadUnitHandle(ERZA,GetHandleId(z),0)
if GetWidgetLife(c) > 0.45 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A031',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A022',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A023',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02H',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02E',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02F',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02G',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02Z',false)
call RemoveSavedInteger(ERZA,GetHandleId(c),0)
call ReleaseTimer(z)
call FlushChildHashtable(ERZA,GetHandleId(z))
call DestroyTrigger(t)
endif
set t = null
set c = null
endfunction
private function ReturnFormDeath takes nothing returns nothing
local unit c = GetTriggerUnit()
local timer z = NewTimer()
call SaveUnitHandle(ERZA,GetHandleId(z),0,c)
call TimerStart(z,0.05,true,function ExpiredTimer)
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local trigger t
if HaveSavedInteger(ERZA,GetHandleId(c),0) == false then
call SaveInteger(ERZA,GetHandleId(c),0,1)
set t = CreateTrigger()
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function ReturnFormDeath)
call SaveTriggerHandle(ERZA,GetHandleId(c),0,t)
call DustWave(1,0.16,0.7,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),1.2,ICENOVA,1,255,255,255,255)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A022',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A031',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A023',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02H',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02E',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02F',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02G',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02Z',true)
call SetUnitAbilityLevel(c,'A02E',GetUnitAbilityLevel(c,SPELLID))
call SetUnitAbilityLevel(c,'A02G',GetUnitAbilityLevel(c,SPELLID))
call SetUnitAbilityLevel(c,'A02Z',GetUnitAbilityLevel(c,SPELLID))
call SetUnitAbilityLevel(c,'A02F',GetUnitAbilityLevel(c,SPELLID) / 2)
call TriggerSleepAction(0)
call AddUnitAnimationProperties(c,"alternate",false)
call AddUnitAnimationProperties(c,"walk",false)
else
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A031',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A022',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A023',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02H',true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02E',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02F',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02G',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A02Z',false)
call RemoveSavedInteger(ERZA,GetHandleId(c),0)
call DestroyTrigger(LoadTriggerHandle(ERZA,GetHandleId(c),0))
endif
set t = null
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=21
//TESH.alwaysfold=0
scope TornadoAccord initializer init
globals
private constant real DISTANCE = 25
private constant real RADIUS = 350
private constant integer SPELLID = 'A02E'
endglobals
private struct data
unit c
real time = 1.5
real a
integer cal = 0
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real xx = PolarX(GetUnitX(c),DISTANCE,a)
local real yy = PolarY(GetUnitY(c),DISTANCE,a)
local real r = (GetUnitAbilityLevel(c,SPELLID) * 2.5) * GetHeroAgi(c,true)
local group g = NewGroup()
local unit v
set time = time - 0.02
set cal = cal + 1
if IsTerrainPathable(xx,yy,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,xx,yy)
endif
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if cal >= 5 then
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2,'h00G',5,255,255,255,255)
endif
if time <= 0 then
call SetUnitPathing(c,true)
call SetUnitAnimation(c,"stand")
call PauseUnit(c,false)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
set .go = NewGroup()
call PauseUnit(c,true)
call SetUnitPathing(.c,false)
call SetUnitAnimation(c,"Attack Walk Stand Spin Alternate")
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope SamuraiCombo initializer init
globals
private constant real DISTANCE = 25
private constant real RADIUS = 350
private constant integer SPELLID = 'A0AS'
private constant integer ICENOVA = 'h08M'
private constant string EFFECT = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT2 = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local real a
local real r = (GetUnitAbilityLevel(c,SPELLID) + 1) * GetHeroAgi(c,true)
call SoundStart("war3mapImported\\HibariStillAmature.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call PauseUnit(t,true)
call PauseUnit(c,true)
call SetUnitPosition(c,PolarX(GetUnitX(t),120,225),PolarY(GetUnitY(t),120,225))
call SetUnitFacingToFaceUnitTimed(c,t,0)
call SetUnitAnimation(c,"attack")
call PolledWait(0.2)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call SlideUnitAngle(t,16,0.3,45,EFFECT)
call SlideUnitAngle(c,16,0.3,45,EFFECT)
call PolledWait(0.2)
call SetUnitPosition(c,PolarX(GetUnitX(t),120,315),PolarY(GetUnitY(t),120,315))
call SetUnitFacingToFaceUnitTimed(c,t,0)
call SetUnitAnimation(c,"attack")
call PolledWait(0.2)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call SlideUnitAngle(t,16,0.3,135,EFFECT)
call SlideUnitAngle(c,16,0.3,135,EFFECT)
call SetUnitAnimation(c,"attack")
call PolledWait(0.2)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call SetUnitPosition(c,PolarX(GetUnitX(t),120,0),PolarY(GetUnitY(t),120,0))
call SetUnitFacingToFaceUnitTimed(c,t,0)
call SetUnitAnimation(c,"attack")
call SlideUnitAngle(t,16,0.2,180,EFFECT)
call SlideUnitAngle(c,16,0.2,180,EFFECT)
call PolledWait(0.2)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call SetUnitPosition(c,PolarX(GetUnitX(t),120,315),PolarY(GetUnitY(t),120,315))
call SetUnitFacingToFaceUnitTimed(c,t,0)
call SetUnitAnimation(c,"attack")
call SlideUnitAngle(t,16,0.5,135,EFFECT)
call SlideUnitAngle(c,16,0.5,135,EFFECT)
call PolledWait(0.5)
call SetUnitAnimation(c,"attack")
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call SetUnitPosition(c,PolarX(GetUnitX(t),120,0),PolarY(GetUnitY(t),120,0))
call SetUnitFacingToFaceUnitTimed(c,t,0)
call SlideUnitAngle(t,20,0.6,180,EFFECT)
call DamageTarget(c,t,r,TAIJUTSU_DAMAGE)
call PauseUnit(t,false)
call PauseUnit(c,false)
set c = null
set t = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope ThousandRequip initializer init
globals
private constant real DISTANCE = 25
private constant real RADIUS = 600
private constant integer SPELLID = 'A02H'
private constant integer BLADE = 'h02Q'
private constant integer MAXHIT = 18
private constant string EFFECT2 = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT = "war3mapImported\\Slam.mdx"
private constant integer HOWL = 'h008'
private constant integer ICENOVA = 'h024'
endglobals
private struct data
unit c
real x
real y
integer hit = MAXHIT
unit array e[MAXHIT]
integer cal = 1
effect f
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local group g = NewGroup()
local real xx
local real yy
local integer r = GetRandomInt(1,hit)
local integer i = 0
local unit v
local real a
if cal == 0 then
set cal = cal + 1
set xx = PolarX(x,GetRandomReal(0,RADIUS - 200),GetRandomReal(0,360))
set yy = PolarY(y,GetRandomReal(0,RADIUS - 200),GetRandomReal(0,360))
call SetUnitPosition(c,xx,yy)
call SetUnitAnimation(c,"attack")
call DestroyEffect(AddSpecialEffect(EFFECT,xx,yy))
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,1,HOWL,5,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,1.5,ICENOVA,5,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,1.5,'h02C',1,255,255,255,55)
call AreaDamageTimer(c,250,xx,yy,250,TAIJUTSU_DAMAGE)
if hit <= 0 then
call SetUnitTimeScale(c,1)
call PauseUnit(c,false)
call SetUnitVertexColor(c,255,255,255,255)
call SetUnitInvulnerable(c,false)
call DestroyEffect(f)
call .destroy()
call ReleaseTimer(z)
endif
else
set cal = cal + 1
if cal >= 6 then
set cal = 0
set xx = GetUnitX(e[r])
set yy = GetUnitY(e[r])
call SetUnitPosition(c,xx,yy)
call SetUnitFacing(c,Angle(xx,yy,x,y))
set i = r
call RemoveUnit(e[r])
set hit = hit - 1
loop
exitwhen i > hit
set e[i] = e[i + 1]
set i = i + 1
endloop
endif
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
if Distance(GetUnitX(v),GetUnitY(v),x,y) > RADIUS - 20 then
set a = Angle(GetUnitX(v),GetUnitY(v),x,y)
set xx = PolarX(GetUnitX(v),30,a)
set yy = PolarY(GetUnitY(v),30,a)
call SetUnitX(v,xx)
call SetUnitY(v,yy)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 1
local real xx
local real yy
local real ace = 360 / MAXHIT
set .c = caster
set .x = targetx
set .y = targety
set f = AddSpecialEffectTarget("war3mapImported\\Blue Laser Ray.mdx",c,"weapon")
call PauseUnit(c,true)
call SetUnitTimeScale(c,3)
call SetUnitInvulnerable(c,true)
call SetUnitVertexColor(c,255,255,155,255)
loop
exitwhen i > MAXHIT
set xx = PolarX(x,600,i * ace)
set yy = PolarY(y,600,i * ace)
set e[i] = CreateUnit(GetOwningPlayer(c),BLADE,xx,yy,(i * ace) + 180)
call SetUnitFlyHeight(e[i],50,600)
call EffectUnitColor(c,xx,yy,270,1,'h02Z',4,255,255,255,255)
set i = i + 1
endloop
set i = 1
call PolledWait(0.9)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=113
//TESH.alwaysfold=0
scope FireDragonRoar initializer init
globals
private constant real DISTANCE = 38
private constant real RADIUS = 180
private constant real MAXDIST = 1600
private constant integer FIREBALL = 'h04B'
private constant integer FIREBALL2 = 'h001'
private constant integer FIRE = 'h04A'
private constant integer FIRE2 = 'h049'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A062'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2.mdx"
endglobals
private struct data
unit c
unit d
unit e
real a
real time = 0.7
integer cal
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 35
set time = time - 0.02
if GetWidgetLife(d) > 0.45 then
call SetUnitPosition(d,x,y)
call SetUnitPosition(e,x,y)
set cal = cal + 1
if cal >= 2 then
set cal = 0
if GetRandomReal(1,100) <= 40 then
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call EffectUnitColor(c,x,y,GetUnitFacing(c),2.3,FIRE,1,255,255,255,255)
elseif GetRandomReal(1,100) <= 70 then
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
else
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
endif
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call ReleaseGroup(go)
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseTimer(z)
call .destroy()
endif
else
call ReleaseGroup(go)
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
set .go = NewGroup()
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(c),GetUnitY(c)))
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),.a)
set .e = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),.a)
set .cal = 0
call SetTimerData(z,this)
call TimerStart(z,.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\KaryuuHoukou.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()),1.2,FIRE2,1,255,255,255,255)
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()) + 10)
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()) - 10)
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=83
//TESH.alwaysfold=0
scope ThunderFlameRoar initializer init
globals
private constant real DISTANCE = 45
private constant real RADIUS = 180
private constant real MAXDIST = 1600
private constant integer FIREBALL = 'h04B'
private constant integer FIREBALL2 = 'h001'
private constant integer FIRE = 'h04A'
private constant integer FIRE2 = 'h049'
private constant integer FIRE3 = 'h085'
private constant integer FIRE4 = 'h084'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A0AM'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissile.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2.mdx"
endglobals
private struct data
unit c
unit d
unit e
real a
real time = 2.5
real scale = 4.5
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 1200
set time = time - 0.04
if time >= 0.03 then
set scale = scale + 0.1
call EffectUnitColor(c,x,y,a,scale,FIRE3,1.5,255,255,255,255)
call SetUnitPosition(d,x,y)
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
endif
if time <= 0 then
call PauseUnit(c,false)
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
set .go = NewGroup()
call PauseUnit(c,true)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(c),GetUnitY(c)))
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),.a)
set e = CreateUnit(GetOwningPlayer(.c),FIRE4,GetUnitX(.c),GetUnitY(.c),.a)
call SetUnitAnimation(e,"birth")
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,1.2,FIRE2,1,255,255,255,255)
call SetTimerData(z,this)
call TimerStart(z,0.09,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Raienryuu.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope ThunderFlameDragonRoar initializer init
globals
private constant real DISTANCE = 38
private constant real MAXDIST = 1600
private constant integer SPELLID = 'A0C3'
private constant integer REDHARVEST = 'h084'
private constant integer XANXUSMISSILE3 = 'h0C5'
private constant integer LAXUSSPARK = 'h055'
private constant integer YELLOWGROUNDAURA = 'h057'
private constant integer HEALINGWIND = 'h049'
private constant string EFFECT = "war3mapImported\\YellowNeutralBuildingExplosion.mdx"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2.mdx"
endglobals
private struct data
unit c
unit d
real a
real h = 75
real h2 = 75
real time = 5
real scale = 1.5
real scale2 = 1.5
real radius = 200
integer count = 0
group go
method destroy takes nothing returns nothing
call PauseUnit(c,false)
call SetUnitTimeScale(c,1)
call RemoveUnit(d)
call ReleaseGroup(go)
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 1200
set time = time - 0.04
if time >= 3 then
if scale <= 8 then
set scale = scale + 0.07
endif
if scale <= 7.5 then
set scale2 = scale2 + 0.10
endif
set radius = radius + DISTANCE
set h = h + 7
set h2 = h2 + 7
set count = count + 1
call SetUnitPosition(d,x,y)
call EffectUnitColor(c,x,y,a,scale,XANXUSMISSILE3,4,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,h,0)
if count == 1 then
call EffectUnitColor(c,x,y,a,scale2,LAXUSSPARK,4,255,255,255,205)
call SetUnitFlyHeight(bj_lastCreatedUnit,h2,0)
else
set count = 0
endif
endif
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),radius,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and (Angle(GetUnitX(c),GetUnitY(c),GetUnitX(v),GetUnitY(v)) + 360) - (a + 360) <= 20 and (Angle(GetUnitX(c),GetUnitY(c),GetUnitX(v),GetUnitY(v)) + 360) - (a + 360) >= -20 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
if time <= 0 then
call ReleaseTimer(z)
call .destroy()
endif
call ReleaseGroup(g)
set g = null
set z = null
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
call PauseUnit(c,true)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,1.8,REDHARVEST,2.5,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,1.8,REDHARVEST,2.5,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(c),GetUnitY(c)))
call TriggerSleepAction(2)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(c),GetUnitY(c)))
call SetUnitTimeScale(c,0.2)
call ShakeGroupCamera(5,GetUnitX(c),GetUnitY(c),1800,15)
set .go = NewGroup()
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
set .d = CreateUnit(GetOwningPlayer(.c),LAXUSSPARK,GetUnitX(.c),GetUnitY(.c),.a)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call SoundStart("war3mapImported\\Raienryuu.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call SetUnitTimeScale(GetTriggerUnit(),0)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),270,5,YELLOWGROUNDAURA,3,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,0)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()),2,HEALINGWIND,3,255,255,255,255)
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=63
//TESH.alwaysfold=0
scope FireDragonWing initializer init
globals
private constant real DISTANCE = 15
private constant real RADIUS = 350
private constant integer FIRE = 'h04A'
private constant integer SPELLID = 'A063'
private constant integer EFFECTID = 'A064'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2.mdx"
endglobals
private struct data
unit c
real a
real time = 2
integer cal = 0
group go
method destroy takes nothing returns nothing
call UnitRemoveAbility(c,EFFECTID)
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = (GetUnitAbilityLevel(c,SPELLID) + 1) * GetHeroStr(c,true)
local group g = NewGroup()
local unit v
set time = time - 0.02
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitX(c,x)
call SetUnitY(c,y)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call GroupAddUnit(go,v)
call SetUnitAnimation(v,"death")
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set cal = cal + 1
if cal >= 12 then
set cal = 0
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h04C',GetUnitX(c),GetUnitY(c),a + 100)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a + 100,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h04C',GetUnitX(c),GetUnitY(c),a + 80)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a + 80,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h04C',GetUnitX(c),GetUnitY(c),a - 100)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a - 100,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h04C',GetUnitX(c),GetUnitY(c),a - 80)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a - 80,"")
call SetUnitAnimation(c,"attack")
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(c),GetUnitY(c)))
endif
if time <= 0 then
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call PauseUnit(c,false)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call ReleaseGroup(go)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
set .go = NewGroup()
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Yokugeki.mp3",GetUnitX(c),GetUnitY(c))
endif
call UnitAddAbility(c,EFFECTID)
call PauseUnit(c,true)
call SetUnitTimeScale(c,3)
call data.create(c,a)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=15
//TESH.alwaysfold=0
scope FireDragonFist initializer init
globals
private constant integer SPELLID = 'A065'
private constant string EFFECTATT = "Abilities\\Weapons\\SerpentWardMissile\\SerpentWardMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\NUKE2.mdx"
private constant string EFFECT3 = "war3mapImported\\NuclearExplosion.mdx"
private constant string EFFECT7 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT5 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT4 = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2.mdx"
private constant string EFFECT8 = "war3mapImported\\Holy_Fire_Slam3.mdx"
private constant integer FIRE2 = 'h049'
private constant integer FIRE3 = 'h02R'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local integer count = LoadInteger(HS,GetHandleId(z),0)
local real a = LoadReal(HS,GetHandleId(z),1)
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 2) + 6) * GetHeroStr(c,true)
local unit d
local real random = GetRandomReal(-45,45)
set count = count + 1
if t == null then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
if count >= 30 then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call SetUnitTimeScale(c,1)
call SlideUnitAngle(t,25,0.5,a,"")
call DamageTarget(c,t,r,TAIJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),2))
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),3))
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
call SaveInteger(HS,GetHandleId(z),0,count)
call SetUnitAnimation(c,"attack")
call SetUnitAnimation(t,"death")
call DestroyEffect(AddSpecialEffect(EFFECT8,GetUnitX(t),GetUnitY(t)))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h04C',GetUnitX(c),GetUnitY(c),a + random)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1.3)
call SlideUnitAngle(bj_lastCreatedUnit,25,1.3,a + random,"")
call SoundStart("war3mapImported\\SoundPound.mp3",GetUnitX(c),GetUnitY(c))
call EffectUnitColor(c,PolarX(GetUnitX(t),-170,a),PolarX(GetUnitY(t),-170,a),a,GetRandomReal(0.4,1.7),'h05I',1,255,255,255,255)
endif
endif
set c = null
set t = null
set d = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local integer i = 0
local timer z = NewTimer()
local effect array e
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Karyuuken.mp3",GetUnitX(c),GetUnitY(c))
endif
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call PauseUnit(t,true)
call SetUnitInvulnerable(t,true)
call SetUnitTimeScale(c,3)
call ShakeGroupCamera(4.5,GetUnitX(c),GetUnitY(c),800,25)
set e[1] = AddSpecialEffectTarget(EFFECTATT,c,"hand right")
set e[2] = AddSpecialEffectTarget(EFFECTATT,c,"hand left")
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,4,FIRE2,4.5,255,255,255,255)
call SetUnitPosition(c,PolarX(GetUnitX(t),-120,a),PolarY(GetUnitY(t),-120,a))
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,t)
call SaveEffectHandle(HS,GetHandleId(z),2,e[1])
call SaveEffectHandle(HS,GetHandleId(z),3,e[2])
call SaveInteger(HS,GetHandleId(z),0,0)
call SaveReal(HS,GetHandleId(z),1,a)
call TimerStart(z,0.16,true,function TimerExpired)
set c = null
set t = null
set e[1] = null
set e[2] = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=2
//TESH.alwaysfold=0
scope SakuraBlade initializer init
globals
private constant real DISTANCE = 40
private constant real RADIUS = 500
private constant integer SPELLID = 'A0AQ'
private constant integer TORNADO1 = 'h02N'
private constant integer TORNADO2 = 'h02O'
private constant integer TORNADO3 = 'h02P'
private constant integer HOWL = 'h08K'
private constant integer ICENOVA = 'h08J'
endglobals
private struct data
unit c
real time = 4
integer cal = 0
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = GetUnitAbilityLevel(c,SPELLID) * 7
local group g = NewGroup()
local unit v
set time = time - 0.02
set cal = cal + 1
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupAddGroup(go,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
if Distance(GetUnitX(c),GetUnitY(c),GetUnitX(v),GetUnitY(v)) > RADIUS then
call GroupRemoveUnit(go,v)
call PauseUnit(v,false)
endif
call PauseUnit(v,true)
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if cal >= 8 then
set cal = 0
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,2,HOWL,5,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,1,ICENOVA,5,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,0.4,'h08L',5,255,255,255,55)
endif
if time <= 0 then
loop
set v = FirstOfGroup(go)
exitwhen v == null
call PauseUnit(v,false)
call GroupRemoveUnit(go,v)
endloop
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call SetUnitAnimation(c,"attack2")
call PauseUnit(c,false)
call ReleaseTimer(z)
call ReleaseGroup(go)
call .destroy()
endif
endmethod
static method create takes unit caster returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .go = NewGroup()
call PauseUnit(c,true)
call SetUnitInvulnerable(.c,true)
call SetUnitPathing(.c,false)
call SetUnitAnimation(c,"spell 1")
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,3.7,TORNADO1,3,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,3.2,TORNADO1,3,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,3.6,TORNADO1,2.5,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,3.1,TORNADO1,2.5,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),90,2,TORNADO2,2.5,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),90,2.4,TORNADO2,4,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,3,TORNADO3,4,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,3.3,TORNADO3,4,255,255,255,100)
call SetTimerData(z,this)
call SoundStart("war3mapImported\\GurenBakuenjin.mp3",GetUnitX(c),GetUnitY(c))
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=21
//TESH.alwaysfold=0
scope GurenFlameMode initializer init
globals
private constant real DISTANCE = 40
private constant real RADIUS = 500
private constant integer SPELLID = 'A0AQ'
private constant integer TORNADO1 = 'h02N'
private constant integer TORNADO2 = 'h02O'
private constant integer TORNADO3 = 'h02P'
private constant integer HOWL = 'h08K'
private constant integer ICENOVA = 'h08J'
endglobals
private struct data
unit c
real time = 4
integer cal = 0
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = GetUnitAbilityLevel(c,SPELLID) * 7
local group g = NewGroup()
local unit v
set time = time - 0.02
set cal = cal + 1
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupAddGroup(go,g)
loop
set v = FirstOfGroup(g)
exitwhen v == null
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
if Distance(GetUnitX(c),GetUnitY(c),GetUnitX(v),GetUnitY(v)) > RADIUS then
call GroupRemoveUnit(go,v)
call PauseUnit(v,false)
endif
call PauseUnit(v,true)
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if cal >= 8 then
set cal = 0
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,2,HOWL,5,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,1,ICENOVA,5,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,3.5,'h02C',1,255,255,255,55)
endif
if time <= 0 then
loop
set v = FirstOfGroup(go)
exitwhen v == null
call PauseUnit(v,false)
call GroupRemoveUnit(go,v)
endloop
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call SetUnitAnimation(c,"attack2")
call PauseUnit(c,false)
call ReleaseTimer(z)
call ReleaseGroup(go)
call .destroy()
endif
endmethod
static method create takes unit caster returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .go = NewGroup()
call PauseUnit(c,true)
call SetUnitInvulnerable(.c,true)
call SetUnitPathing(.c,false)
call SetUnitAnimation(c,"spell 1")
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,3.7,TORNADO1,5,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,3.2,TORNADO1,5,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,3.6,TORNADO1,5,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,3.1,TORNADO1,5,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),90,2,TORNADO2,5,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),90,2.4,TORNADO2,5,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,3,TORNADO3,5,255,255,255,100)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,3.3,TORNADO3,5,255,255,255,100)
call SetTimerData(z,this)
call SoundStart("war3mapImported\\GurenBakuenjin.mp3",GetUnitX(c),GetUnitY(c))
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=63
//TESH.alwaysfold=0
scope RaienryunoKen initializer init
globals
private constant integer SPELLID = 'A0AO'
private constant string EFFECTATT = "Abilities\\Weapons\\SerpentWardMissile\\SerpentWardMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\NUKE2.mdx"
private constant string EFFECT3 = "war3mapImported\\Lightiningbeamwave.mdx"
private constant string EFFECT7 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT5 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT4 = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2.mdx"
private constant string EFFECT8 = "war3mapImported\\Holy_Fire_Slam2.mdx"
private constant integer FIRE2 = 'h049'
private constant integer FIRE3 = 'h02R'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local integer count = LoadInteger(HS,GetHandleId(z),0)
local real a = LoadReal(HS,GetHandleId(z),1)
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 1) + 12) * GetHeroStr(c,true)
local unit d
local real random = GetRandomReal(-45,45)
set count = count + 1
if t == null then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
if count >= 30 then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call SetUnitTimeScale(c,1)
call SlideUnitAngle(t,25,0.5,a,"")
call DamageTarget(c,t,r,TAIJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),2))
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),3))
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
call SaveInteger(HS,GetHandleId(z),0,count)
call SetUnitAnimation(c,"attack")
call SetUnitAnimation(t,"death")
call DestroyEffect(AddSpecialEffect(EFFECT8,GetUnitX(t),GetUnitY(t)))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h08E',GetUnitX(c),GetUnitY(c),a + random)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1.3)
call SlideUnitAngle(bj_lastCreatedUnit,25,1.3,a + random,"")
call SoundStart("war3mapImported\\SoundPound.mp3",GetUnitX(c),GetUnitY(c))
call EffectUnitColor(c,PolarX(GetUnitX(t),-170,a),PolarX(GetUnitY(t),-170,a),a,GetRandomReal(0.4,1.7),'h08F',1,255,255,255,255)
endif
endif
set c = null
set t = null
set d = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local integer i = 0
local timer z = NewTimer()
local effect array e
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Natsunoken.mp3",GetUnitX(c),GetUnitY(c))
endif
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call PauseUnit(t,true)
call SetUnitInvulnerable(t,true)
call SetUnitTimeScale(c,3)
call ShakeGroupCamera(4.5,GetUnitX(c),GetUnitY(c),800,25)
set e[1] = AddSpecialEffectTarget(EFFECTATT,c,"hand right")
set e[2] = AddSpecialEffectTarget(EFFECTATT,c,"hand left")
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,4,FIRE2,4.5,255,255,255,255)
call SetUnitPosition(c,PolarX(GetUnitX(t),-120,a),PolarY(GetUnitY(t),-120,a))
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,t)
call SaveEffectHandle(HS,GetHandleId(z),2,e[1])
call SaveEffectHandle(HS,GetHandleId(z),3,e[2])
call SaveInteger(HS,GetHandleId(z),0,0)
call SaveReal(HS,GetHandleId(z),1,a)
call TimerStart(z,0.16,true,function TimerExpired)
set c = null
set t = null
set e[1] = null
set e[2] = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=42
//TESH.alwaysfold=0
scope PhoenixSword initializer init
globals
private constant real DISTANCE = 25
private constant real RADIUS = 350
private constant integer SPELLID = 'A066'
private constant integer YELLOW = 'h072'
private constant integer YELLOW2 = 'h04E'
private constant string EFFECT2 = "war3mapImported\\NUKE2.mdx"
private constant string EFFECT3 = "war3mapImported\\NuclearExplosion.mdx"
private constant string EFFECT7 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT5 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT4 = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
private constant string EFFECT6 = "war3mapImported\\BigExplosionBlue.mdx.mdx"
endglobals
private struct data
unit c
unit t
real time = 2
integer animate = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),14,a)
local real y = PolarY(GetUnitY(c),14,a)
local real xx = PolarX(GetUnitX(t),14,a)
local real yy = PolarY(GetUnitY(t),14,a)
local real r = (GetHeroAgi(c,true) * 15)
set time = time - 0.02
set animate = animate + 1
call SetUnitPosition(c,x,y)
call SetUnitPosition(t,xx,yy)
if animate >= 10 then
set animate = 0
call EffectUnitColor(c,xx,yy,360,4,'h072',2,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(t),GetUnitY(t)))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h073',GetUnitX(c),GetUnitY(c),a + 100)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a + 100,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h073',GetUnitX(c),GetUnitY(c),a + 80)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a + 80,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h073',GetUnitX(c),GetUnitY(c),a - 100)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a - 100,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h073',GetUnitX(c),GetUnitY(c),a - 80)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a - 80,"")
endif
if time <= 0 then
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call SetUnitVertexColor(c,255,255,255,255)
call PauseUnit(.c,false)
call SetUnitPathing(.c,true)
call SetUnitTimeScale(c,1)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(c),GetUnitY(c)))
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = 50
local integer i = 0
call SetUnitFacing(c,a)
call SetUnitPosition(c,x,y)
set animate = animate + 1
if animate >= 3 then
set animate = 0
call EffectUnitColor(c,x,y,360,1.3,YELLOW,2,255,255,255,255)
endif
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 150 then
set animate = 0
call ShakeGroupCamera(2,x,y,500,20)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(c),GetUnitY(c)))
call TimerStart(z,0.02,true,function data.FinalTimer)
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 0
local real x
local real y
local real a = Angle(GetUnitX(caster),GetUnitY(caster),GetUnitX(target),GetUnitY(target))
set .c = caster
set .t = target
call PauseUnit(.c,true)
call SetUnitPathing(.c,false)
call SetUnitVertexColor(c,255,255,125,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),360,2,YELLOW2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),360,2,YELLOW,2,255,255,255,255)
call PolledWait(1)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Rin3.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=120
//TESH.alwaysfold=0
scope PhoenixSword2 initializer init
globals
private constant real DISTANCE = 25
private constant real RADIUS = 350
private constant integer SPELLID = 'A0DA'
private constant integer YELLOW = 'h04D'
private constant integer YELLOW2 = 'h0EB'
private constant string EFFECT2 = "war3mapImported\\NUKE2.mdx"
private constant string EFFECT3 = "war3mapImported\\NuclearExplosion.mdx"
private constant string EFFECT7 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT5 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT4 = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2.mdx"
endglobals
private struct data
unit c
unit t
real time = 2
integer animate = 0
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),14,a)
local real y = PolarY(GetUnitY(c),14,a)
local real xx = PolarX(GetUnitX(t),14,a)
local real yy = PolarY(GetUnitY(t),14,a)
local real r = (GetHeroStr(c,true) * 3)
set time = time - 0.02
set animate = animate + 1
call SetUnitPosition(c,x,y)
call SetUnitPosition(t,xx,yy)
if animate >= 10 then
set animate = 0
call EffectUnitColor(c,xx,yy,360,4,'h04D',2,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(t),GetUnitY(t)))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h04C',GetUnitX(c),GetUnitY(c),a + 100)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a + 100,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h04C',GetUnitX(c),GetUnitY(c),a + 80)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a + 80,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h04C',GetUnitX(c),GetUnitY(c),a - 100)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a - 100,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h04C',GetUnitX(c),GetUnitY(c),a - 80)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a - 80,"")
endif
if time <= 0 then
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call SetUnitVertexColor(c,255,255,255,255)
call PauseUnit(.c,false)
call SetUnitPathing(.c,true)
call SetUnitTimeScale(c,1)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(c),GetUnitY(c)))
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = 50
local integer i = 0
call SetUnitFacing(c,a)
call SetUnitPosition(c,x,y)
set animate = animate + 1
if animate >= 3 then
set animate = 0
call EffectUnitColor(c,x,y,360,1.3,YELLOW,2,255,255,255,255)
endif
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 150 then
set animate = 0
call ShakeGroupCamera(2,x,y,500,20)
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(c),GetUnitY(c)))
call TimerStart(z,0.02,true,function data.FinalTimer)
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 0
local real x
local real y
local real a = Angle(GetUnitX(caster),GetUnitY(caster),GetUnitX(target),GetUnitY(target))
set .c = caster
set .t = target
call PauseUnit(.c,true)
call SetUnitPathing(.c,false)
call SetUnitVertexColor(c,255,255,125,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),360,2,YELLOW2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),360,2,YELLOW,2,255,255,255,255)
call PolledWait(1)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\KaryuuNoGetitetsu3.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope KyuubiChakraz initializer init
globals
private constant integer SPELLID = 'A0B0'
private constant integer ICENOVA = 'h00S'
private constant integer EXPLODE = 'h0BB'
private constant integer BLUEBOMB = 'h01N'
private constant integer DT = 'h0BC'
private constant integer SPELLDASH = 'A00W'
private constant string EFFECT2 = "war3mapImported\\Shockwave(Kirito).mdx"
private constant string EFFECT5 = "war3mapImported\\Shockwave(Kirito).mdx"
private constant string EFFECT3 = "war3mapImported\\Shockwave(Kirito).mdx"
private constant string EFFECT4 = "war3mapImported\\Shockwave(Kirito).mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function ExpiredTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local trigger t = GetTriggeringTrigger()
local unit c = LoadUnitHandle(TENSA,GetHandleId(z),0)
if GetWidgetLife(c) > 0.45 then
if GetUnitAbilityLevel(c,'A062') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01B',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00N',true)
endif
if GetUnitAbilityLevel(c,'A063') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01E',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00P',true)
endif
if GetUnitAbilityLevel(c,'A067') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01H',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00L',true)
endif
if GetUnitAbilityLevel(c,'A065') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A01F',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00Q',true)
endif
call DestroyTrigger(t)
call RemoveSavedInteger(TENSA,GetHandleId(c),0)
call ReleaseTimer(z)
call FlushChildHashtable(TENSA,GetHandleId(z))
endif
set t = null
set c = null
endfunction
private function ReturnFormDeath takes nothing returns nothing
local unit c = GetTriggerUnit()
local timer z = NewTimer()
call SaveUnitHandle(TENSA,GetHandleId(z),0,c)
call TimerStart(z,0.05,true,function ExpiredTimer)
set c = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local trigger t
if HaveSavedInteger(TENSA,GetHandleId(c),0) == false then
call SaveInteger(TENSA,GetHandleId(c),0,1)
set t = CreateTrigger()
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function ReturnFormDeath)
call SaveTriggerHandle(TENSA,GetHandleId(c),0,t)
call DustWave(1,0.16,0.7,20,GetUnitX(c),GetUnitY(c),155,255,255,30)
call SoundStart("war3mapImported\\Mode.mp3",GetUnitX(c),GetUnitY(c))
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(c),GetUnitY(c)))
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),1.2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),0,3,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,3,BLUEBOMB,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),3,EXPLODE,1,255,255,255,255)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00R',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A00S',false)
if GetUnitAbilityLevel(c,'A062') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A062',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0AM',true)
endif
if GetUnitAbilityLevel(c,'A063') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A063',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0AQ',true)
endif
if GetUnitAbilityLevel(c,'A067') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A067',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A070',true)
endif
if GetUnitAbilityLevel(c,'A065') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A065',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0AO',true)
endif
else
call RemoveSavedInteger(TENSA,GetHandleId(c),0)
call DestroyTrigger(LoadTriggerHandle(TENSA,GetHandleId(c),0))
if GetUnitAbilityLevel(c,'A062') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0AM',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A062',true)
endif
if GetUnitAbilityLevel(c,'A063') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0AQ',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A063',true)
endif
if GetUnitAbilityLevel(c,'A067') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A070',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A067',true)
endif
if GetUnitAbilityLevel(c,'A065') >= 1 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A0AO',false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),'A065',true)
endif
endif
set t = null
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Gekitetsu initializer init
globals
private constant real DISTANCE = 38
private constant real RADIUS = 350
private constant integer SPELLID = 'A0BR'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h00R'
private constant integer LIGHTNING2 = 'h00Q'
private constant integer LIGHTNING3 = 'h057'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "war3mapImported\\YellowBoom.mdx"
private constant string EFFECT4 = "war3mapImported\\lightning boom2.mdx"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx"
private constant integer EFFECTID = 'A0BS'
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2.mdx"
endglobals
private struct data
unit c
unit t
integer animate = 0
method destroy takes nothing returns nothing
call UnitRemoveAbility(c,EFFECTID)
call .deallocate()
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = (GetUnitAbilityLevel(c,SPELLID) * 8) * GetHeroStr(c,true)
local integer i = 0
local real x
local real y
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
call ShakeGroupCamera(0.6,GetUnitX(c),GetUnitY(c),700,12)
call UnitDamageTarget(c,t,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.5,ICENOVA,1,255,255,55,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5,'h056',1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5,'h055',1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.3,'h0B4',1,255,255,55,55)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),1.5,'h0B5',1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),1.2,'h0B7',1,255,255,255,155)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,'h01O',1,255,255,255,255)
call SoundStart("war3mapImported\\Explode1.mp3",GetUnitX(t),GetUnitY(t))
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),1,'h0B8',1,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.3)
call SlideUnitAngle(t,20,0.8,a,EFFECT3)
call PauseUnit(c,false)
call SetUnitPathing(c,true)
call PauseUnit(t,false)
call ReleaseTimer(z)
call .destroy()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
if Distance(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t)) <= 1800 then
set x = PolarX(GetUnitX(c),DISTANCE,a)
set y = PolarY(GetUnitY(c),DISTANCE,a)
call SetUnitPosition(c,x,y)
set animate = animate + 1
if animate >= 13 then
set animate = 0
call SetUnitAnimationByIndex(c,1)
endif
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 120 then
call PauseUnit(t,true)
call SetUnitAnimation(c,"spell Three")
call TimerStart(z,0.3,false,function data.FinalTimer)
endif
else
call PauseUnit(c,false)
call SetUnitPathing(c,true)
call PauseUnit(t,false)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 0
local real x
local real y
local real a = Angle(GetUnitX(caster),GetUnitY(caster),GetUnitX(target),GetUnitY(target))
set .c = caster
set .t = target
call PauseUnit(.c,true)
call SetUnitAnimation(c,"Attack")
call SetUnitPathing(.c,false)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,5,LIGHTNING3,3,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,0)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2,'h049',3,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,0.7,'h04W',3,255,255,255,155)
call SetUnitTimeScale(bj_lastCreatedUnit,0.5)
call UnitAddAbility(c,EFFECTID)
call SetUnitTimeScale(.c,2.5)
call SoundStart("war3mapImported\\Getitetsu.mp3",GetUnitX(c),GetUnitY(c))
call TriggerSleepAction(1.2)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=27
//TESH.alwaysfold=0
scope DragonGodBrilliant initializer init
globals
private constant real DISTANCE = 38
private constant real RADIUS = 450
private constant integer SPELLID = 'A0BV'
private constant integer LIGHTNING = 'h0BE' //FireSphere
private constant integer LIGHTNING2 = 'h0BH' //Abilities\Spells\Human\SpellSteal\SpellStealMissile.mdl
private constant integer LIGHTNING3 = 'h0BG' //DarknessSphere
private constant integer LIGHTNING4 = 'h0BK' //RedRing
private constant integer LIGHTNING5 = 'h0AO' //DTPurple
private constant integer FIRAGA = 'h05E' //Firaga
private constant integer R1 = 'h0BJ' //RedRed
private constant integer R2 = 'h0BI' //purplepurple
private constant string SOUND = "war3mapImported\\Ryuujin no Kouen.mp3"
private integer CACHE
endglobals
private function GetParabolaZ takes real x,real d,real h returns real
return 4 * h * x * (d - x) / (d * d)
endfunction
private struct data
unit c
unit e1
unit e2
unit e3
unit array d[12]
real x
real y
real a
real xx
real yy
real tra = 0
real maxdist
real time = 4
real scale = 1
group g
method destroy takes nothing returns nothing
local integer i = 1
local unit e
for e in g
call PauseUnit(e,false)
endfor
for i = 1 to 12
call RemoveUnit(d[i])
endfor
call RemoveUnit(e1)
call RemoveUnit(e2)
call RemoveUnit(e3)
call SetUnitFlyHeight(c,0,0)
call PauseUnit(c,false)
call SetUnitPathing(c,true)
call DestroyGroup(g)
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method GroupAction takes nothing returns nothing
local data this = CACHE
local unit e = GetEnumUnit()
local real r = (GetUnitAbilityLevel(c,SPELLID) * 300) / 5
call SetUnitAnimation(e,"death")
call PauseUnit(e,true)
call UnitDamageTarget(c,e,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
set e = null
endmethod
static method Periodic takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local integer i = 1
local group gg
local unit e
set time = time - 0.2
set scale = scale + 0.15
set gg = CreateGroup()
call GroupEnumUnitsInRange(gg,x,y,RADIUS,null)
for e in gg
if FilterGeneral(c,e) and IsUnitInGroup(e,g) == false then
call GroupAddUnit(g,e)
endif
endfor
call DestroyGroup(gg)
set CACHE = this
call ForGroup(g,function data.GroupAction)
for i = 1 to 12
call SetUnitScale(d[i],scale,scale,scale)
endfor
if GetRandomInt(1,2) == 1 then
call EffectUnitColor(c,x,y,GetUnitFacing(c),1.4,LIGHTNING5,1,255,255,255,255)
else
call EffectUnitColor(c,x,y,GetUnitFacing(c),1.4,LIGHTNING4,1,255,255,255,255)
endif
if time <= 0 then
call EffectUnitColor(c,x,y,GetUnitFacing(c),4.5,FIRAGA,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),1.5,LIGHTNING4,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),1.5,LIGHTNING5,1,255,255,255,255)
call PauseTimer(z)
call ReleaseTimer(z)
call .destroy()
endif
set gg = null
set e = null
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real high
local real dist
local real x1
local real y1
local integer i = 1
if tra >= maxdist then
for i = 1 to 6
set d[i] = CreateUnit(GetOwningPlayer(c),R1,x,y,i * 60)
endfor
for i = 7 to 12
set d[i] = CreateUnit(GetOwningPlayer(c),R2,x,y,(i * 60) + 30)
endfor
call SetUnitTimeScale(c,1)
call SetUnitPosition(e1,x,y)
call SetUnitPosition(e2,x,y)
call SetUnitPosition(e3,x,y)
call TimerStart(z,0.2,true,function data.Periodic)
else
set dist = maxdist * 0.02
set tra = tra + dist
set high = GetParabolaZ(tra,maxdist,400)
set x1 = PolarX(xx,tra,a)
set y1 = PolarY(yy,tra,a)
call SetUnitPosition(c,x1,y1)
call SetUnitFlyHeight(c,high,0)
set x1 = PolarX(GetUnitX(e1),dist,a)
set y1 = PolarY(GetUnitY(e1),dist,a)
call SetUnitPosition(e1,x1,y1)
call SetUnitFlyHeight(e1,high,0)
set x1 = PolarX(GetUnitX(e2),dist,a)
set y1 = PolarY(GetUnitY(e2),dist,a)
call SetUnitPosition(e2,x1,y1)
call SetUnitFlyHeight(e2,high,0)
set x1 = PolarX(GetUnitX(e3),dist,a)
set y1 = PolarY(GetUnitY(e3),dist,a)
call SetUnitPosition(e3,x1,y1)
call SetUnitFlyHeight(e3,high,0)
endif
endmethod
static method create takes unit caster, real xx1, real yy1 returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local real xxx
local real yyy
set .c = caster
set .x = xx1
set .y = yy1
call SoundStart(SOUND,x,y)
set g = CreateGroup()
set xx = GetUnitX(c)
set yy = GetUnitY(c)
set .a = Angle(xx,yy,x,y)
call SetUnitPathing(c,false)
set xxx = PolarX(xx,200,a + 90)
set yyy = PolarY(yy,200,a + 90)
set e1 = CreateUnit(GetOwningPlayer(c),LIGHTNING,xxx,yyy,0)
set e2 = CreateUnit(GetOwningPlayer(c),LIGHTNING2,xxx,yyy,0)
call SetUnitScale(e2,18,18,18)
set xxx = PolarX(xx,200,a - 90)
set yyy = PolarY(yy,200,a - 90)
set e3 = CreateUnit(GetOwningPlayer(c),LIGHTNING3,xxx,yyy,0)
set maxdist = Distance(xx,yy,x,y)
call PauseUnit(c,true)
call SetUnitTimeScale(c,0)
call UnitAddAbility(c,'Amrf')
call UnitRemoveAbility(c,'Amrf')
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=12
//TESH.alwaysfold=0
scope LightningBody initializer init
globals
private constant real DISTANCE = 35
private constant real RADIUS = 350
private constant integer SPELLID = 'A06S'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h055'
private constant integer LIGHTNING2 = 'h056'
private constant integer LIGHTNING3 = 'h057'
private constant integer LIGHTNING4 = 'h058'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
endglobals
private struct data
unit c
real x
real y
integer animate = 0
method destroy takes nothing returns nothing
call SetUnitPathing(c,true)
call SetUnitVertexColor(c,255,255,255,255)
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),x,y)
local real xx = PolarX(GetUnitX(c),DISTANCE,a)
local real yy = PolarY(GetUnitY(c),DISTANCE,a)
local real r = GetUnitState(c,UNIT_STATE_MANA)
if IsTerrainPathable(xx,yy,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,xx,yy)
call SetUnitState(c,UNIT_STATE_MANA,r - 1.2)
else
call ReleaseTimer(z)
call .destroy()
endif
set animate = animate + 1
if animate >= 2 then
set animate = 0
call EffectUnitColor(c,xx,yy,270,1.5,LIGHTNING,0.06,255,255,255,255)
call EffectUnitColor(c,xx,yy,270,1.5,LIGHTNING2,0.01,255,255,255,255)
endif
if Distance(x,y,xx,yy) <= 50 or GetWidgetLife(c) <= 0.45 or GetUnitState(c,UNIT_STATE_MANA) <= 0 then
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .x = targetx
set .y = targety
call SetUnitPathing(.c,false)
call SetUnitVertexColor(c,255,255,125,255)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=39
//TESH.alwaysfold=0
scope LightningDragonRoar initializer init
globals
private constant real DISTANCE = 26
private constant real RADIUS = 250
private constant real MAXDIST = 1600
private constant integer SPELLID = 'A06T'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h055'
private constant integer LIGHTNING2 = 'h056'
private constant integer LIGHTNING3 = 'h057'
private constant integer LIGHTNING4 = 'h058'
private constant string EFFECT = "war3mapImported\\YellowNeutralBuildingExplosion.mdx"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
endglobals
private struct data
unit c
unit d
unit e
unit f
real a
real time = 1.1
integer cal
lightning array l[4]
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
set time = time - 0.02
if GetWidgetLife(d) > 0.45 then
set cal = cal + 1
if cal >= 3 then
set cal = 0
call EffectUnitColor(c,GetUnitX(d),GetUnitY(d),a,1.5,LIGHTNING4,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(e),GetUnitY(e),a,1.5,LIGHTNING4,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(f),GetUnitY(f),a,1.5,LIGHTNING4,1,255,255,255,255)
if GetRandomReal(1,100) <= 30 then
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
elseif GetRandomReal(1,100) <= 70 then
call EffectUnitColor(c,x,y,GetUnitFacing(c),2,LIGHTNING,1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
else
call EffectUnitColor(c,x,y,GetUnitFacing(c),2,'h00Q',1,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
call EffectUnitColor(c,x,y,a,1.5,'h00D',1,255,255,255,255)
endif
endif
call SetUnitPosition(d,x,y)
set x = PolarX(GetUnitX(e),DISTANCE,a)
set y = PolarY(GetUnitY(e),DISTANCE,a)
call SetUnitPosition(e,x,y)
set x = PolarX(GetUnitX(f),DISTANCE,a)
set y = PolarY(GetUnitY(f),DISTANCE,a)
call SetUnitPosition(f,x,y)
call MoveLightningEx(l[1],true,PolarX(GetUnitX(.c),160,a + 65),PolarY(GetUnitY(.c),160,a + 65),60,GetUnitX(.e),GetUnitY(.e),60)
call MoveLightningEx(l[2],true,PolarX(GetUnitX(.c),160,a - 65),PolarY(GetUnitY(.c),160,a - 65),60,GetUnitX(.f),GetUnitY(.f),60)
call MoveLightningEx(l[3],true,PolarX(GetUnitX(.c),60,a),PolarY(GetUnitY(.c),60,a),200,GetUnitX(.d),GetUnitY(.d),200)
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call ReleaseGroup(go)
call RemoveUnit(d)
call RemoveUnit(e)
call RemoveUnit(f)
call DestroyLightning(l[1])
call DestroyLightning(l[2])
call DestroyLightning(l[3])
call ReleaseTimer(z)
call .destroy()
endif
else
call ReleaseGroup(go)
call RemoveUnit(d)
call RemoveUnit(e)
call RemoveUnit(f)
call DestroyLightning(l[1])
call DestroyLightning(l[2])
call DestroyLightning(l[3])
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
set .go = NewGroup()
call PauseUnit(c,true)
call SetUnitAnimation(c,"spell slam")
call TriggerSleepAction(1)
call PauseUnit(c,false)
set .d = CreateUnit(GetOwningPlayer(.c),LIGHTNING4,PolarX(GetUnitX(.c),170,a),PolarY(GetUnitY(.c),170,a),.a)
call SetUnitScale(.d,1.5,1.5,1.5)
set .e = CreateUnit(GetOwningPlayer(.c),LIGHTNING4,PolarX(GetUnitX(.c),170,a + 7),PolarY(GetUnitY(.c),170,a + 7),.a)
call SetUnitScale(.e,1.5,1.5,1.5)
set .f = CreateUnit(GetOwningPlayer(.c),LIGHTNING4,PolarX(GetUnitX(.c),170,a - 7),PolarY(GetUnitY(.c),170,a - 7),.a)
call SetUnitScale(.f,1.5,1.5,1.5)
set .l[1] = AddLightningEx("CLPB",true,PolarX(GetUnitX(.c),160,a + 65),PolarY(GetUnitY(.c),160,a + 65),60,GetUnitX(.e),GetUnitY(.e),60)
set .l[2] = AddLightningEx("CLPB",true,PolarX(GetUnitX(.c),160,a - 65),PolarY(GetUnitY(.c),160,a - 65),60,GetUnitX(.f),GetUnitY(.f),60)
set .l[3] = AddLightningEx("FORK",true,PolarX(GetUnitX(.c),60,a),PolarY(GetUnitY(.c),60,a),200,GetUnitX(.d),GetUnitY(.d),200)
set .cal = 0
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\RairyuuHoukou.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),270,3,LIGHTNING3,1.5,255,255,255,255)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),90,3,LIGHTNING3,1.5,255,255,255,255)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),180,3,LIGHTNING3,1.5,255,255,255,255)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),180,0.3,'h05B',2,255,255,255,255)
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=5
//TESH.alwaysfold=0
scope LightningDragonFist initializer init
globals
private constant real DISTANCE = 22
private constant real RADIUS = 250
private constant real MAXDIST = 1600
private constant integer SPELLID = 'A06V'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h055'
private constant integer LIGHTNING2 = 'h056'
private constant integer LIGHTNING3 = 'h057'
private constant integer LIGHTNING4 = 'h058'
private constant integer LIGHTNING5 = 'h05D'
private constant integer LIGHTNING8 = 'h010'
private constant integer LIGHTNING9 = 'h00Q'
private constant integer LIGHTNING10 = 'h012'
private constant integer LIGHTNING11 = 'h011'
private constant integer LIGHTNING12 = 'h00R'
private constant string EFFECT = "war3mapImported\\YellowNeutralBuildingExplosion.mdx"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
endglobals
private struct data
unit c
unit d
unit t
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local real r = (GetUnitAbilityLevel(c,SPELLID) + 1) * GetHeroStr(c,true)
call SetUnitPosition(d,x,y)
call SetUnitFacing(d,a + 180)
if GetRandomReal(1,100) <= 40 then
call EffectUnitColor(c,x,y,270,1.5,LIGHTNING,0.1,255,255,255,255)
elseif GetRandomReal(1,100) <= 70 then
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call EffectUnitColor(c,x,y,270,1.5,LIGHTNING2,0.1,255,255,255,255)
else
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
call EffectUnitColor(c,x,y,a,1.5,'h00D',1,255,255,255,255)
endif
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 50 then
call ShakeGroupCamera(1,x,y,1000,10)
call DamageTarget(c,t,r,TAIJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,x,y,GetUnitFacing(c),9,LIGHTNING8,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),6,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),8,LIGHTNING11,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),8,LIGHTNING11,1,255,255,255,255)
call SlideUnitAngle(t,26,0.6,a,EFFECT2)
call RemoveUnit(d)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .t = target
call PauseUnit(c,true)
call TriggerSleepAction(1)
set .d = CreateUnit(GetOwningPlayer(.c),LIGHTNING5,GetUnitX(.c),GetUnitY(.c),Angle(GetUnitX(.c),GetUnitY(.c),GetUnitX(.t),GetUnitY(.t)) + 180)
call SetUnitVertexColor(.d,255,230,100,100)
call PauseUnit(c,false)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\RairyuuHouken.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),270,3,LIGHTNING3,1.5,255,255,255,255)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),90,3,LIGHTNING3,1.5,255,255,255,255)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),180,3,LIGHTNING3,1.5,255,255,255,255)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),180,0.3,'h05B',2,255,255,255,255)
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=27
//TESH.alwaysfold=0
scope MeleeCombo initializer init
globals
private constant real DISTANCE = 22
private constant real RADIUS = 250
private constant real MAXDIST = 1600
private constant integer SPELLID = 'A06X'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h055'
private constant integer LIGHTNING2 = 'h056'
private constant integer LIGHTNING3 = 'h057'
private constant integer LIGHTNING4 = 'h058'
private constant integer LIGHTNING5 = 'h05D'
private constant integer LIGHTNING8 = 'h010'
private constant integer LIGHTNING9 = 'h00Q'
private constant integer LIGHTNING10 = 'h012'
private constant integer LIGHTNING11 = 'h011'
private constant integer LIGHTNING12 = 'h00R'
private constant string EFFECT = "war3mapImported\\YellowNeutralBuildingExplosion.mdx"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
endglobals
private struct data
unit c
unit t
real time = 0.6
method destroy takes nothing returns nothing
call PauseUnit(c,false)
call SetUnitTimeScale(c,1)
call SetUnitPathing(c,true)
call SetUnitVertexColor(.c,255,255,255,255)
call .deallocate()
endmethod
static method TimerExpired5 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = (GetUnitAbilityLevel(c,SPELLID) + 2) * GetHeroStr(c,true)
set time = time - 0.02
call SetUnitPosition(c,x,y)
if GetRandomReal(1,100) <= 40 then
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),LIGHTNING,x,y,a)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call SetUnitFlyHeight(bj_lastCreatedUnit,GetUnitFlyHeight(c),0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.1)
elseif GetRandomReal(1,100) <= 70 then
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),LIGHTNING2,x,y,a)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call SetUnitFlyHeight(bj_lastCreatedUnit,GetUnitFlyHeight(c),0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.1)
else
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h00D',x,y,a)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call SetUnitFlyHeight(bj_lastCreatedUnit,GetUnitFlyHeight(c),0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.1)
endif
if time <= 0 then
call DamageTarget(c,t,r,TAIJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,x,y,GetUnitFacing(c),8,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),5,LIGHTNING11,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),5,LIGHTNING11,1,255,255,255,255)
call SetUnitFlyHeight(t,0,0)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired4 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
call SetUnitAnimation(c,"attack")
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5,LIGHTNING11,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5,LIGHTNING11,1,255,255,255,255)
call SlideUnitAngle(t,12,1,a,EFFECT2)
call Jump(c,1,PolarX(GetUnitX(t),500,a),PolarY(GetUnitY(t),500,a),2.5,200,"",EFFECT2,"")
call TimerStart(z,0.02,true,function data.TimerExpired5)
endmethod
static method TimerExpired3 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
call SetUnitAnimation(c,"attack")
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5,LIGHTNING11,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5,LIGHTNING11,1,255,255,255,255)
call UnitAddAbility(t,'Amrf')
call UnitRemoveAbility(t,'Amrf')
call SetUnitFlyHeight(t,150,300)
call SetUnitAnimation(t,"death")
call TimerStart(z,0.6,false,function data.TimerExpired4)
endmethod
static method TimerExpired2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
set time = time - 0.02
call SetUnitPosition(c,x,y)
if GetRandomReal(1,100) <= 40 then
call EffectUnitColor(c,x,y,270,1.5,LIGHTNING,0.1,255,255,255,255)
elseif GetRandomReal(1,100) <= 70 then
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call EffectUnitColor(c,x,y,270,1.5,LIGHTNING2,0.1,255,255,255,255)
else
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
call EffectUnitColor(c,x,y,a,1.5,'h00D',1,255,255,255,255)
endif
if time <= 0 then
set time = 1
call SetUnitAnimation(c,"attack")
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,x,y,GetUnitFacing(c),4,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),5,LIGHTNING11,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),5,LIGHTNING11,1,255,255,255,255)
call TimerStart(z,0.6,false,function data.TimerExpired3)
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = GetUnitAbilityLevel(c,SPELLID) * GetHeroStr(c,true)
call SetUnitPosition(c,x,y)
if GetRandomReal(1,100) <= 40 then
call EffectUnitColor(c,x,y,270,1.5,LIGHTNING,0.1,255,255,255,255)
elseif GetRandomReal(1,100) <= 70 then
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call EffectUnitColor(c,x,y,270,1.5,LIGHTNING2,0.1,255,255,255,255)
else
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
call EffectUnitColor(c,x,y,a,1.5,'h00D',1,255,255,255,255)
endif
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 120 then
call StunUnit(c,t,4)
call SetUnitAnimation(c,"attack")
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,x,y,GetUnitFacing(c),4,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),5,LIGHTNING11,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),5,LIGHTNING11,1,255,255,255,255)
call SlideUnitAngle(t,15,0.6,a,EFFECT2)
call SlideUnitAngle(c,15,0.6,a,"")
call TimerStart(z,0.02,true,function data.TimerExpired2)
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .t = target
call PauseUnit(c,true)
call SetUnitTimeScale(c,2)
call SetUnitPathing(c,false)
call SetUnitVertexColor(.c,255,255,100,150)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=105
//TESH.alwaysfold=0
scope RagingBolt initializer init
globals
private constant real DISTANCE = 35
private constant real RADIUS = 450
private constant integer SPELLID = 'A06U'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h055'
private constant integer LIGHTNING2 = 'h056'
private constant integer LIGHTNING3 = 'h057'
private constant integer LIGHTNING4 = 'h058'
private constant integer LIGHTNING5 = 'h05A'
private constant integer LIGHTNING6 = 'h05B'
private constant integer LIGHTNING7 = 'h05C'
private constant integer LIGHTNING8 = 'h010'
private constant integer LIGHTNING9 = 'h00Q'
private constant integer LIGHTNING10 = 'h012'
private constant integer LIGHTNING11 = 'h011'
private constant integer LIGHTNING12 = 'h00R'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
endglobals
private struct data
unit c
unit d
unit e
lightning array l[4]
integer animate = 0
real x
real y
real time = 3
real fly = 600
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local group g = NewGroup()
local unit v
local real r = (GetUnitAbilityLevel(c,SPELLID) * 10) + 7
set time = time - 0.1
set animate = animate + 1
if animate >= 3 then
set animate = 0
call EffectUnitColor(c,x,y,GetUnitFacing(c),9,LIGHTNING8,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),6,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),8,LIGHTNING11,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),8,LIGHTNING11,1,255,255,255,255)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) then
if Distance(x,y,GetUnitX(v),GetUnitY(v)) <= RADIUS then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call PauseUnit(v,true)
call GroupAddUnit(go,v)
else
call SetUnitPathing(v,true)
call PauseUnit(v,false)
call GroupRemoveUnit(go,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
if time <= 0 then
call EffectUnitColor(c,x,y,90,7,'h01C',1,255,255,255,255)
call EffectUnitColor(c,x,y,90,7,'h01C',1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),5,'h00Z',1,155,255,255,255)
set v = null
loop
set v = FirstOfGroup(go)
exitwhen v == null
call SetUnitPathing(v,true)
call PauseUnit(v,false)
call GroupRemoveUnit(go,v)
endloop
call RemoveUnit(.d)
call RemoveUnit(.e)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
set animate = animate + 1
set time = time - 0.02
call MoveLightningEx(.l[1],true,GetUnitX(c),GetUnitY(c),100,PolarX(.x,GetRandomReal(50,200),GetRandomReal(0,360)),PolarY(.y,GetRandomReal(50,200),GetRandomReal(0,360)),fly)
call MoveLightningEx(.l[2],true,GetUnitX(c),GetUnitY(c),100,PolarX(.x,GetRandomReal(50,200),GetRandomReal(0,360)),PolarY(.y,GetRandomReal(50,200),GetRandomReal(0,360)),fly)
call MoveLightningEx(.l[3],true,GetUnitX(c),GetUnitY(c),100,x,y,fly)
if animate >= 5 then
set animate = 0
endif
if time == 1 then
call SetUnitFlyHeight(.d,0,600)
call SetUnitFlyHeight(.e,0,600)
endif
if time <= 1 then
set fly = fly - 12
endif
if time <= 0 then
set animate = 0
call SoundStart("war3mapImported\\LightningExplode.mp3",GetUnitX(c),GetUnitY(c))
set time = 2.5
call ShakeGroupCamera(3,x,y,1000,15)
call PauseUnit(.c,false)
call EffectUnitColor(c,x,y,GetUnitFacing(c),6,LIGHTNING8,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),6,LIGHTNING,3,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),4,LIGHTNING10,1,155,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),11,LIGHTNING11,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),11,LIGHTNING11,1,255,255,255,255)
call DestroyLightning(.l[1])
call DestroyLightning(.l[2])
call DestroyLightning(.l[3])
call TimerStart(z,0.1,true,function data.TimerExpired2)
endif
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .x = targetx
set .y = targety
set .go = NewGroup()
call PauseUnit(.c,true)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,0.3,'h05B',3,255,255,255,255)
call TriggerSleepAction(0.1)
call SetUnitAnimation(.c,"spell channel")
set .d = CreateUnit(GetOwningPlayer(.c),LIGHTNING7,.x,.y,270)
call SetUnitFlyHeight(.d,600,0)
set .e = CreateUnit(GetOwningPlayer(.c),LIGHTNING5,.x,.y,270)
call SetUnitFlyHeight(.e,600,0)
set .l[1] = AddLightningEx("FORK",true,GetUnitX(c),GetUnitY(c),100,PolarX(.x,GetRandomReal(100,200),GetRandomReal(0,360)),PolarY(.y,GetRandomReal(100,200),GetRandomReal(0,360)),600)
set .l[2] = AddLightningEx("CLPB",true,GetUnitX(c),GetUnitY(c),100,PolarX(.x,GetRandomReal(100,200),GetRandomReal(0,360)),PolarY(.y,GetRandomReal(100,200),GetRandomReal(0,360)),600)
set .l[3] = AddLightningEx("CLSB",true,GetUnitX(c),GetUnitY(c),100,PolarX(.x,GetRandomReal(100,200),GetRandomReal(0,360)),PolarY(.y,GetRandomReal(100,200),GetRandomReal(0,360)),600)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\RagingBolt.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()),1.2,'h059',1,255,255,255,255)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),270,3,LIGHTNING3,3,255,255,255,255)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),90,3,LIGHTNING3,3,255,255,255,255)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),180,3,LIGHTNING3,3,255,255,255,255)
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope LightningSpear initializer init
globals
private constant real DISTANCE = 22
private constant real RADIUS = 250
private constant real MAXDIST = 1600
private constant integer SPELLID = 'A06W'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h055'
private constant integer LIGHTNING2 = 'h056'
private constant integer LIGHTNING3 = 'h057'
private constant integer LIGHTNING4 = 'h0AA'
private constant integer LIGHTNING5 = 'h05D'
private constant integer LIGHTNING8 = 'h010'
private constant integer LIGHTNING9 = 'h00Q'
private constant integer LIGHTNING10 = 'h012'
private constant integer LIGHTNING11 = 'h011'
private constant integer LIGHTNING12 = 'h00R'
private constant string EFFECT = "war3mapImported\\YellowNeutralBuildingExplosion.mdx"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
endglobals
private struct data
unit c
unit d
unit t
integer animate
real time = 2.5
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method TimerExpired2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = (GetUnitAbilityLevel(c,SPELLID) * 15) * GetHeroStr(c,true)
local real x = GetUnitX(t)
local real y = GetUnitY(t)
set time = time - 0.1
set animate = animate + 1
if animate >= 3 then
set animate = 0
call EffectUnitColor(c,x,y,GetUnitFacing(c),9,LIGHTNING8,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),6,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),7,LIGHTNING11,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),7,LIGHTNING11,1,255,255,255,255)
call EffectUnitColor(c,x,y,270,6,'h04D',1,255,255,255,255)
endif
if time <= 0 then
call PauseUnit(t,false)
call StunUnit(c,t,3)
call EffectUnitColor(c,x,y,180,6,'h00A',1,255,255,255,255)
call EffectUnitColor(c,x,y,90,4,'h01O',1,255,255,255,255)
call EffectUnitColor(c,x,y,90,2,'h006',1,255,255,255,255)
call EffectUnitColor(c,x,y,180,3.5,'h005',1,255,255,255,255)
call EffectUnitColor(c,x,y,90,4.5,'h04S',1,255,255,255,255)
call EffectUnitColor(c,x,y,90,7,'h01C',1,255,255,255,255)
call EffectUnitColor(c,x,y,90,7,'h01C',1,255,255,255,255)
call EffectUnitColor(c,x,y,270,10,'h05F',1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),6,'h05E',1,255,255,255,255)
call RemoveUnit(.d)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local real r = 15 * GetHeroStr(c,true)
call SetUnitPosition(d,x,y)
call SetUnitFacing(d,a)
if GetRandomReal(1,100) <= 40 then
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call EffectUnitColor(c,x,y,270,1.5,LIGHTNING,0.1,255,255,255,255)
elseif GetRandomReal(1,100) <= 70 then
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call EffectUnitColor(c,x,y,270,1.5,LIGHTNING2,0.1,255,255,255,255)
else
call DestroyEffect(AddSpecialEffect(EFFECT3,x,y))
call EffectUnitColor(c,x,y,a,1.5,'h00D',1,255,255,255,255)
endif
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 50 then
call ShakeGroupCamera(3,x,y,1000,10)
call DamageTarget(c,t,r,NINJUTSU_DAMAGE)
call DustWave(0.4,0.15,0.8,20,GetUnitX(t),GetUnitY(t),255,255,125,30)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,x,y,GetUnitFacing(c),9,LIGHTNING8,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),6,LIGHTNING2,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),4,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),8,LIGHTNING11,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),8,LIGHTNING11,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),4,LIGHTNING10,1,155,255,255,255)
call PauseUnit(t,true)
call TimerStart(z,0.1,true,function data.TimerExpired2)
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .t = target
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call SetUnitAnimation(.c,"spell throw")
call SetUnitTimeScale(.c,0)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,1.5,LIGHTNING,0.1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,1.5,LIGHTNING2,0.1,255,255,255,255)
set .d = CreateUnit(GetOwningPlayer(.c),LIGHTNING4,GetUnitX(.c),GetUnitY(.c),Angle(GetUnitX(.c),GetUnitY(.c),GetUnitX(.t),GetUnitY(.t)))
call SetUnitFlyHeight(.d,150,0)
call TriggerSleepAction(1)
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\RairyuuHoutengeki.mp3",GetUnitX(c),GetUnitY(c))
endif
call TriggerSleepAction(1)
call SetUnitTimeScale(c,1)
call PolledWait(0.5)
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),270,3,LIGHTNING3,3,255,255,255,255)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),90,3,LIGHTNING3,3,255,255,255,255)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),180,3,LIGHTNING3,3,255,255,255,255)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),180,0.2,'h05B',2,255,255,255,255)
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=134
//TESH.alwaysfold=0
scope Skyscrapper initializer init
globals
private constant integer SPELLID = 'A0BM'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID and IsUnitIllusion(GetSpellTargetUnit()) == false
endfunction
private function DataGo takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local unit d = LoadUnitHandle(HS,GetHandleId(z),2)
local real high = LoadReal(HS,GetHandleId(z),0)
local real time = LoadReal(HS,GetHandleId(z),1)
set time = time - 0.04
if time >= 0 then
set high = high + 40
call SetUnitFlyHeight(d,high,0)
call SetCameraFieldForPlayer(GetOwningPlayer(t),CAMERA_FIELD_ZOFFSET,GetUnitFlyHeight(d) + 100,0)
call SaveReal(HS,GetHandleId(z),0,high)
else
if time >= -4.25 then
call SetCameraFieldForPlayer(GetOwningPlayer(t),CAMERA_FIELD_ZOFFSET,GetUnitFlyHeight(d) + 100,0)
else
call PauseTimer(z)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
endif
call SaveReal(HS,GetHandleId(z),1,time)
set z = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local integer HP = GetUnitTypeId(t)
local unit d
local player cp = GetOwningPlayer(c)
local player tp = GetOwningPlayer(t)
local real x = GetUnitX(t)
local real y = GetUnitY(t)
local timer z = CreateTimer()
local real a = Angle(GetUnitX(c),GetUnitY(c),x,y)
local real xxx = PolarX(GetUnitX(c),100,a)
local real yyy = PolarY(GetUnitY(c),100,a)
local real r1
local real r2
local unit e
local real xx
local real yy
local integer i = 0
local sound s = gg_snd_Mystogan2
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 0) + 15) * GetHeroInt(c,true)
call SetSoundPosition(s,0,0,0)
call StartSound(s)
call SetUnitTimeScale(c,0)
call PauseUnit(c,true)
call DestroyEffect(AddSpecialEffect("war3mapImported\\EnergyBurst.mdx",xxx,yyy))
call EffectUnitColor(c,xxx,yyy,a,1.1,'h0AR',1,155,25,255,255)
call ShakeGroupCamera(0.2,xxx,yyy,500,1)
call SoundStart("war3mapImported\\MagicCircle.mp3",GetUnitX(c),GetUnitY(c))
call PauseUnit(t,true)
call SetUnitInvulnerable(t,true)
call DestroyEffect(AddSpecialEffect("war3mapImported\\EnergyBurst.mdx",xxx,yyy))
call TriggerSleepAction(1)
set x = GetUnitX(t)
set y = GetUnitY(t)
for i = 1 to 10
set r1 = GetRandomReal(0,600)
set r2 = GetRandomReal(0,360)
set xxx = PolarX(x,r1,r2)
set yyy = PolarY(y,r1,r2)
call EffectUnitColor(c,xxx,yyy,a,3,'h0AQ',1,255,255,255,155)
call SetUnitTimeScale(bj_lastCreatedUnit,0.4)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
endfor
call TriggerSleepAction(0.5)
call SetUnitTimeScale(c,1)
call PauseUnit(c,false)
set d = CreateUnit(tp,HP,GetUnitX(t),GetUnitY(t),GetUnitFacing(t))
call SetUnitInvulnerable(d,true)
call SetHeroLevel(d,40,false)
call SuspendHeroXP(d,false)
call PauseUnit(d,true)
call UnitAddAbility(d,'Aloc')
call UnitAddAbility(d,'Amrf')
call UnitRemoveAbility(d,'Amrf')
call SetUnitPosition(d,GetUnitX(t),GetUnitY(t))
call EffectUnitColor(c,x,y,270,1,'h0AS',1,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,4000,0)
if GetLocalPlayer() == tp then
call SetUnitVertexColor(t,255,255,255,0)
endif
if GetLocalPlayer() != tp then
call SetUnitScale(d,0,0,0)
endif
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,4,'h0AO',0.5,255,255,255,255)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,6,'h005',0.5,255,255,255,255)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,8,'h0AP',1,255,255,255,255)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,8,'h0AO',1,255,255,255,55)
call SetUnitTimeScale(bj_lastCreatedUnit,0.4)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,t)
call SaveUnitHandle(HS,GetHandleId(z),2,d)
call SaveReal(HS,GetHandleId(z),0,0)
call SaveReal(HS,GetHandleId(z),1,4)
call SetCameraTargetControllerNoZForPlayer(GetOwningPlayer(t),d,0,0,false)
call TimerStart(z,0.04,true,function DataGo)
call TriggerSleepAction(1.5)
call EffectUnitColor(c,x,y,270,4,'h0AO',0.5,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.4)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,6,'h005',0.5,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.4)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,8,'h0AP',1,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.4)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,8,'h069',1,255,255,255,55)
call SetUnitTimeScale(bj_lastCreatedUnit,0.4)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call SetCameraFieldForPlayer(tp,CAMERA_FIELD_ANGLE_OF_ATTACK,280,1.5)
call TriggerSleepAction(1.5)
call SetCameraFieldForPlayer(tp,CAMERA_FIELD_ANGLE_OF_ATTACK,330,1.5)
call TriggerSleepAction(1.5)
set xx = PolarX(x,350,90)
set yy = PolarY(y,350,90)
set e = CreateUnit(tp,'h0AT',xx,yy,Angle(xx,yy,x,y))
if GetLocalPlayer() != tp then
call SetUnitScale(e,0,0,0)
endif
call SetUnitFlyHeight(e,5000,0)
call SetUnitFlyHeight(e,3800,900)
call SetUnitFacing(d,90)
set s = gg_snd_MonsterRoar
call SetSoundPosition(s,0,0,0)
if GetLocalPlayer() == tp then
call StartSound(s)
endif
call TriggerSleepAction(3)
set xx = PolarX(x,20,270)
set yy = PolarY(y,20,270)
call EffectUnitColor(c,xx,yy,270,55,'h0AU',1,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.5)
call SetUnitFlyHeight(bj_lastCreatedUnit,3250,0)
call TriggerSleepAction(0.5)
call EffectUnitColor(c,x,y,270,8,'h0AU',1,255,255,255,255)
call TriggerSleepAction(0.3)
call SoundStart("war3mapImported\\BrokenGlass.mp3",xx,yy)
call RemoveUnit(e)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call UnitDamageTarget(c,t,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
call RemoveUnit(d)
call ResetToGameCameraForPlayer(tp,0)
if GetLocalPlayer() == tp then
call SetUnitVertexColor(t,255,255,255,255)
endif
set c = null
set t = null
set d = null
set e = null
set cp = null
set tp = null
set s = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=15
//TESH.alwaysfold=0
scope Skyscrappergear initializer init
globals
private constant integer SPELLID = 'A0CR'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID and IsUnitIllusion(GetSpellTargetUnit()) == false
endfunction
private function DataGo takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local unit d = LoadUnitHandle(HS,GetHandleId(z),2)
local real high = LoadReal(HS,GetHandleId(z),0)
local real time = LoadReal(HS,GetHandleId(z),1)
set time = time - 0.04
if time >= 0 then
set high = high + 40
call SetUnitFlyHeight(d,high,0)
call SetCameraFieldForPlayer(GetOwningPlayer(t),CAMERA_FIELD_ZOFFSET,GetUnitFlyHeight(d) + 100,0)
call SaveReal(HS,GetHandleId(z),0,high)
else
if time >= -4.25 then
call SetCameraFieldForPlayer(GetOwningPlayer(t),CAMERA_FIELD_ZOFFSET,GetUnitFlyHeight(d) + 100,0)
else
call PauseTimer(z)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
endif
call SaveReal(HS,GetHandleId(z),1,time)
set z = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local integer HP = GetUnitTypeId(t)
local unit d
local player cp = GetOwningPlayer(c)
local player tp = GetOwningPlayer(t)
local real x = GetUnitX(t)
local real y = GetUnitY(t)
local timer z = CreateTimer()
local real a = Angle(GetUnitX(c),GetUnitY(c),x,y)
local real xxx = PolarX(GetUnitX(c),100,a)
local real yyy = PolarY(GetUnitY(c),100,a)
local real r1
local real r2
local unit e
local real xx
local real yy
local integer i = 0
local sound s = gg_snd_Mystogan2
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 0) + 18) * GetHeroInt(c,true)
call SetSoundPosition(s,0,0,0)
call StartSound(s)
call SetUnitTimeScale(c,0)
call PauseUnit(c,true)
call DestroyEffect(AddSpecialEffect("war3mapImported\\EnergyBurst.mdx",xxx,yyy))
call EffectUnitColor(c,xxx,yyy,a,1.1,'h0AR',1,155,25,255,255)
call ShakeGroupCamera(0.2,xxx,yyy,500,1)
call SoundStart("war3mapImported\\MagicCircle.mp3",GetUnitX(c),GetUnitY(c))
call PauseUnit(t,true)
call SetUnitInvulnerable(t,true)
call DestroyEffect(AddSpecialEffect("war3mapImported\\EnergyBurst.mdx",xxx,yyy))
call TriggerSleepAction(1)
set x = GetUnitX(t)
set y = GetUnitY(t)
for i = 1 to 10
set r1 = GetRandomReal(0,600)
set r2 = GetRandomReal(0,360)
set xxx = PolarX(x,r1,r2)
set yyy = PolarY(y,r1,r2)
call EffectUnitColor(c,xxx,yyy,a,3,'h0AQ',1,255,255,255,155)
call SetUnitTimeScale(bj_lastCreatedUnit,0.4)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
endfor
call TriggerSleepAction(0.5)
call SetUnitTimeScale(c,1)
call PauseUnit(c,false)
set d = CreateUnit(tp,HP,GetUnitX(t),GetUnitY(t),GetUnitFacing(t))
call SetUnitInvulnerable(d,true)
call SetHeroLevel(d,40,false)
call SuspendHeroXP(d,false)
call PauseUnit(d,true)
call UnitAddAbility(d,'Aloc')
call UnitAddAbility(d,'Amrf')
call UnitRemoveAbility(d,'Amrf')
call SetUnitPosition(d,GetUnitX(t),GetUnitY(t))
call EffectUnitColor(c,x,y,270,1,'h0AS',1,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,4000,0)
if GetLocalPlayer() == tp then
call SetUnitVertexColor(t,255,255,255,0)
endif
if GetLocalPlayer() != tp then
call SetUnitScale(d,0,0,0)
endif
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,4,'h0AO',0.5,255,255,255,255)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,6,'h005',0.5,255,255,255,255)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,8,'h0AP',1,255,255,255,255)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,8,'h0AO',1,255,255,255,55)
call SetUnitTimeScale(bj_lastCreatedUnit,0.4)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,t)
call SaveUnitHandle(HS,GetHandleId(z),2,d)
call SaveReal(HS,GetHandleId(z),0,0)
call SaveReal(HS,GetHandleId(z),1,4)
call SetCameraTargetControllerNoZForPlayer(GetOwningPlayer(t),d,0,0,false)
call TimerStart(z,0.04,true,function DataGo)
call TriggerSleepAction(1.5)
call EffectUnitColor(c,x,y,270,4,'h0AO',0.5,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.4)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,6,'h005',0.5,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.4)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,8,'h0AP',1,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.4)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call EffectUnitColor(c,x,y,270,8,'h069',1,255,255,255,55)
call SetUnitTimeScale(bj_lastCreatedUnit,0.4)
if GetLocalPlayer() != tp then
call SetUnitScale(bj_lastCreatedUnit,0,0,0)
endif
call SetCameraFieldForPlayer(tp,CAMERA_FIELD_ANGLE_OF_ATTACK,280,1.5)
call TriggerSleepAction(1.5)
call SetCameraFieldForPlayer(tp,CAMERA_FIELD_ANGLE_OF_ATTACK,330,1.5)
call TriggerSleepAction(1.5)
set xx = PolarX(x,350,90)
set yy = PolarY(y,350,90)
set e = CreateUnit(tp,'h0AT',xx,yy,Angle(xx,yy,x,y))
if GetLocalPlayer() != tp then
call SetUnitScale(e,0,0,0)
endif
call SetUnitFlyHeight(e,5000,0)
call SetUnitFlyHeight(e,3800,900)
call SetUnitFacing(d,90)
set s = gg_snd_MonsterRoar
call SetSoundPosition(s,0,0,0)
if GetLocalPlayer() == tp then
call StartSound(s)
endif
call TriggerSleepAction(3)
set xx = PolarX(x,20,270)
set yy = PolarY(y,20,270)
call EffectUnitColor(c,xx,yy,270,55,'h0AU',1,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.5)
call SetUnitFlyHeight(bj_lastCreatedUnit,3250,0)
call TriggerSleepAction(0.5)
call EffectUnitColor(c,x,y,270,8,'h0AU',1,255,255,255,255)
call TriggerSleepAction(0.3)
call SoundStart("war3mapImported\\BrokenGlass.mp3",xx,yy)
call RemoveUnit(e)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call UnitDamageTarget(c,t,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
call RemoveUnit(d)
call ResetToGameCameraForPlayer(tp,0)
if GetLocalPlayer() == tp then
call SetUnitVertexColor(t,255,255,255,255)
endif
set c = null
set t = null
set d = null
set e = null
set cp = null
set tp = null
set s = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope SacredSong initializer init
globals
private constant real RADIUS = 400
private constant integer SPELLID = 'A0BU'
private constant integer STAFF1 = 'h0B9'
private constant integer STAFF2 = 'h09H'
private constant integer STAFF3 = 'h09I'
private constant integer STAFF4 = 'h09J'
private constant integer STAFF5 = 'h09K'
private constant integer MAGICSEAL = 'h082'
private constant integer MAGICSEAL90 = 'h0AR'
private constant integer BOMB1 = 'h0AW'
private constant integer BOMB2 = 'h0AP'
private constant integer LIGHTUP = 'h0BD'
private integer CACHE
endglobals
private struct data
unit c
real x
real y
integer count = 0
group good
real time = 7
lightning array l[5]
method destroy takes nothing returns nothing
local unit enumUnit
for enumUnit in good
call PauseUnit(enumUnit,false)
endfor
call GroupClear(good)
call DestroyGroup(.good)
call .deallocate()
endmethod
static method GroupAction takes nothing returns nothing
local data this = CACHE
local unit e = GetEnumUnit()
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 300) + 1000) / 60
if Distance(GetUnitX(e),GetUnitY(e),x,y) <= RADIUS then
call SetUnitAnimation(e,"death")
call PauseUnit(e,true)
call UnitDamageTarget(c,e,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
else
call PauseUnit(e,false)
call GroupRemoveUnit(good,e)
endif
set e = null
endmethod
static method TimerExpired3 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local group g
local unit e
set count = count + 1
if ModuloInteger(count,4) == 1 then
call EffectUnitColor(c,x,y,270,4.5,BOMB1,1,255,255,255,255)
call EffectUnitColor(c,x,y,270,8,BOMB2,1,255,55,255,255)
call DestroyEffect(AddSpecialEffect("war3mapImported\\ShockwavePurple.mdx",x,y))
endif
set g = CreateGroup()
call GroupEnumUnitsInRange(g,x,y,RADIUS,null)
for e in g
if FilterGeneral(c,e) and IsUnitInGroup(e,.good) == false then
call GroupAddUnit(good,e)
endif
endfor
call DestroyGroup(g)
set CACHE = this
call ForGroup(good,function data.GroupAction)
if count >= 60 then
call PauseTimer(z)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local integer i = 0
set count = count + 1
if count == 1 then
call EffectUnitColor(c,x,y,270,1.2,MAGICSEAL,6,255,255,50,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,375,0)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call ShakeGroupCamera(0.3,x,y,RADIUS,5)
call SoundStart("war3mapImported\\MagicCircle.mp3",GetUnitX(c),GetUnitY(c))
elseif count == 2 then
call EffectUnitColor(c,x,y,270,1,MAGICSEAL,6,50,50,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,450,0)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call ShakeGroupCamera(0.3,x,y,RADIUS,5)
call SoundStart("war3mapImported\\MagicCircle.mp3",GetUnitX(c),GetUnitY(c))
elseif count == 3 then
call EffectUnitColor(c,x,y,270,0.8,MAGICSEAL,6,255,55,55,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,525,0)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call ShakeGroupCamera(0.3,x,y,RADIUS,5)
call SoundStart("war3mapImported\\MagicCircle.mp3",GetUnitX(c),GetUnitY(c))
elseif count == 4 then
call EffectUnitColor(c,x,y,270,1.2,MAGICSEAL,6,255,125,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call ShakeGroupCamera(0.3,x,y,RADIUS,5)
call SoundStart("war3mapImported\\MagicCircle.mp3",GetUnitX(c),GetUnitY(c))
elseif count == 5 then
call EffectUnitColor(c,x,y,270,1.1,MAGICSEAL,6,205,25,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,675,0)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call ShakeGroupCamera(0.3,x,y,RADIUS,5)
call SoundStart("war3mapImported\\MagicCircle.mp3",GetUnitX(c),GetUnitY(c))
endif
if count >= 8 then
set count = 0
for i = 1 to 5
call DestroyLightning(l[i])
endfor
call TimerStart(z,0.05,true,function data.TimerExpired3)
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real xx
local real yy
local real array xxx
local real array yyy
local integer i = 1
set count = count + 1
set xx = PolarX(x,RADIUS,count * 72)
set yy = PolarY(y,RADIUS,count * 72)
if count == 1 then
call EffectUnitColor(c,xx,yy,count * 72,2,STAFF1,4.5,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,3000)
elseif count == 2 then
call EffectUnitColor(c,xx,yy,count * 72,2,STAFF2,4.5,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,3000)
elseif count == 3 then
call EffectUnitColor(c,xx,yy,count * 72,2,STAFF3,4.5,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,3000)
elseif count == 4 then
call EffectUnitColor(c,xx,yy,count * 72,2,STAFF4,4.5,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,3000)
elseif count == 5 then
call EffectUnitColor(c,xx,yy,count * 72,2,STAFF5,4.5,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,3000)
endif
if count == 10 then
set xx = PolarX(GetUnitX(c),65,Angle(GetUnitX(c),GetUnitY(c),x,y))
set yy = PolarY(GetUnitY(c),65,Angle(GetUnitX(c),GetUnitY(c),x,y))
call EffectUnitColor(c,xx,yy,Angle(GetUnitX(c),GetUnitY(c),x,y),1,MAGICSEAL90,1.5,155,45,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call ShakeGroupCamera(0.3,GetUnitX(c),GetUnitY(c),RADIUS,4)
endif
if count >= 12 then
set count = 0
for i = 1 to 5
set xxx[i] = PolarX(x,RADIUS,i * 72)
set yyy[i] = PolarY(y,RADIUS,i * 72)
endfor
for i = 1 to 5
if i != 5 then
set l[i] = AddLightningEx("FORK",true,xxx[i],yyy[i],25,xxx[i + 1],yyy[i + 1],25)
else
set l[i] = AddLightningEx("FORK",true,xxx[i],yyy[i],25,xxx[1],yyy[1],25)
endif
endfor
call PauseUnit(c,false)
call EffectUnitColor(c,x,y,270,4,LIGHTUP,3.0,255,205,255,155)
call SetUnitPosition(bj_lastCreatedUnit,x,y)
call TimerStart(z,0.5,true,function data.TimerExpired2)
endif
endmethod
static method Periodic takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local group g = CreateGroup()
local unit v
local unit d
local real a
local real xx
local real yy
set time = time - 0.04
call GroupEnumUnitsInRange(g,x,y,RADIUS,null)
for v in g
if FilterGeneral(c,v) then
if GetUnitAbilityLevel(v,'B00F') <= 0 then
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(v),GetUnitY(v),bj_UNIT_FACING)
call UnitAddAbility(d,'A0BT')
call IssueTargetOrder(d,"soulburn",v)
call UnitApplyTimedLife(d,'BTLF',0.1)
set d = null
endif
if Distance(GetUnitX(v),GetUnitY(v),x,y) > RADIUS - 20 then
set a = Angle(GetUnitX(v),GetUnitY(v),x,y)
set xx = PolarX(GetUnitX(v),30,a)
set yy = PolarY(GetUnitY(v),30,a)
call SetUnitX(v,xx)
call SetUnitY(v,yy)
endif
endif
endfor
call DestroyGroup(g)
if time <= 0 then
call ReleaseTimer(z)
endif
set g = null
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local timer zz = NewTimer()
local data this = data.allocate()
set c = caster
set x = targetx
set y = targety
call PauseUnit(c,true)
set good = CreateGroup()
call SetTimerData(z,this)
call SetTimerData(zz,this)
call TimerStart(z,0.2,true,function data.TimerExpired)
call TimerStart(zz,0.04,true,function data.Periodic)
return this
endmethod
endstruct
private function Actions takes nothing returns nothing
call SoundStart("war3mapImported\\SacredSong.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=6
//TESH.alwaysfold=0
scope GroundShuttering initializer init
globals
private constant integer SPELLID = 'A0BX'
private constant real RADIUS = 450
private constant integer ID1 = 'h0AR' //mystoganaura -90angle
private constant integer ID2 = 'h0BV' //arcanemissilecomplete
private constant integer ID3 = 'h0AO' //DTPurple
private constant integer ID4 = 'h005' //Abyssal_Impact_Base
private constant integer ID5 = 'h0AP' //LightNova
private constant integer ID6 = 'h0AQ' //Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
private constant string EFFECT1 = "war3mapImported\\ShockwavePurple.mdx"
private constant string EFFECT2 = "war3mapImported\\AncientExplodeBlue.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local integer i
local unit array d
local real a = Angle(GetUnitX(c),GetUnitY(c),x,y)
local real xx = PolarX(GetUnitX(c),100,a)
local real yy = PolarY(GetUnitY(c),100,a)
local real a2
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
local group g
local unit e
call SetUnitTimeScale(c,0)
call EffectUnitColor(c,xx,yy,a,1.1,ID1,1,255,25,255,255)
call SoundStart("war3mapImported\\MagicCircle.mp3",GetUnitX(c),GetUnitY(c))
call ShakeGroupCamera(0.2,xx,yy,500,1)
call PauseUnit(c,true)
call PolledWait(1)
call SetUnitTimeScale(c,1)
call PauseUnit(c,false)
for i = 1 to 8
set xx = PolarX(x,300,i * 45)
set yy = PolarY(y,300,i * 45)
set a2 = Angle(xx,yy,x,y)
set d[i] = CreateUnit(GetOwningPlayer(c),ID2,xx,yy,a2)
call Jump(d[i],1,x,y,1,200,"","","")
call EffectUnitColor(c,xx,yy,a,0.3,ID3,0.5,255,255,255,255)
endfor
call PolledWait(1)
set g = CreateGroup()
call GroupEnumUnitsInRange(g,x,y,RADIUS,null)
for e in g
if FilterGeneral(c,e) then
call UnitDamageTarget(c,e,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
endif
endfor
call DestroyGroup(g)
call DestroyEffect(AddSpecialEffect(EFFECT1,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call EffectUnitColor(c,x,y,a,1.7,ID3,0.5,255,255,255,255)
call EffectUnitColor(c,x,y,a,2,ID4,0.5,255,255,255,255)
call EffectUnitColor(c,x,y,270,4,ID5,1,255,255,255,255)
call EffectUnitColor(c,x,y,270,4,ID6,1,255,255,255,55)
for i = 1 to 8
call RemoveUnit(d[i])
set d[i] = null
endfor
set c = null
set g = null
set e = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_MistBody_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A0C4'
endfunction
function Trig_MistBody_Actions takes nothing returns nothing
call DestroyEffect(AddSpecialEffect("war3mapImported\\WarpDarkCaster.mdx",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))
endfunction
//===========================================================================
function InitTrig_Mist_Body takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function Trig_Mist_Vongola_Rings_Conditions ) )
call TriggerAddAction( t, function Trig_Mist_Vongola_Rings_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Sema initializer init
globals
private constant integer SPELLID = 'A0C4'
private constant real RADIUS = 1500
private constant integer ID1 = 'h081' //LifeHigh
private constant integer ID2 = 'h0BR' //FairyLawLight
private constant integer ID3 = 'h0BS' //DTFairyLaw
private constant integer ID4 = 'h0BN' //mystoganaura
private constant integer ID5 = 'h0BQ' //LightNova
private constant integer ID6 = 'h0BP' //Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
private constant string SOUND = "war3mapImported\\Cerma.mp3"
endglobals
private function AreaDamageTimer takes unit u, real r, real x, real y, real a returns nothing
local group g = CreateGroup()
local unit d
call GroupEnumUnitsInRange(g,x,y,a,null)
loop
set d = FirstOfGroup(g)
if IsUnitEnemy(d,GetOwningPlayer(u)) == true and GetUnitAbilityLevel(d,'Avul') != 1 and GetWidgetLife(d) > 0.45 and IsUnitType(d, UNIT_TYPE_STRUCTURE)==false then
call UnitDamageTarget(u,d,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
endif
exitwhen d==null
call GroupRemoveUnit(g,d)
endloop
call DestroyGroup(g)
set g = null
endfunction
private struct data
unit c
unit b
integer i = 0
integer count = 0
real scale = 1
real scale2 = 1
method damage takes nothing returns real
return 2000.
endmethod
method destroy takes nothing returns nothing
call SetUnitInvulnerable(c,false)
call PauseUnit(c,false)
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = GetUnitFacing(c)
local real xx = PolarX(GetUnitX(c),25,a)
local real yy = PolarY(GetUnitY(c),25,a)
local real r
set i = i + 1
set count = count + 1
if i > 8 then
set scale = scale + 0.08
set scale2 = scale2 + 0.015
endif
if count >= 6 and i > 8 then
set count = 0
call EffectUnitColor(c,xx,yy,GetRandomReal(0,360),scale,ID2,1.5,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,50,0)
call EffectUnitColor(c,xx,yy,270,scale2,ID3,1,255,255,255,105)
endif
if i == 8 then
call SetUnitTimeScale(b,0)
endif
if i == 80 then
call EffectUnitColor(c,xx,yy,270,4,ID4,1,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
endif
if i == 95 then
call EffectUnitColor(c,xx,yy,180,8,ID5,1,255,255,255,255)
call EffectUnitColor(c,xx,yy,270,8,ID5,1,255,255,255,255)
endif
if i == 100 then
call EffectUnitColor(c,xx,yy,270,8,ID6,4.5,205,25,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.7)
call EffectUnitColor(c,xx,yy,270,scale2,ID3,1,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.7)
endif
if i >= 120 then
set r = damage()
call AreaDamageTimer(c,r,GetUnitX(c),GetUnitY(c),RADIUS)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local real a = GetUnitFacing(caster)
local real xx = PolarX(GetUnitX(caster),25,a)
local real yy = PolarY(GetUnitY(caster),25,a)
call SoundStart(SOUND,xx,yy)
call ShakeGroupCamera(4,xx,yy,2000,12)
set c = caster
set b = CreateUnit(GetOwningPlayer(c),ID1,xx,yy,270)
call SetUnitScale(b,0.35,0.35,0.35)
call SetUnitTimeScale(b,3)
call UnitApplyTimedLife(b,'BTLF',4)
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Cerma initializer init
globals
private constant real RADIUS = 400
private constant integer SPELLID = 'A0CG'
private constant integer STAFF1 = 'h0D8'
private constant integer STAFF2 = 'h0D8'
private constant integer STAFF3 = 'h0D8'
private constant integer STAFF4 = 'h0D8'
private constant integer STAFF5 = 'h0D8'
private constant integer MAGICSEAL = 'h0D9'
private constant integer MAGICSEAL90 = 'h0D8'
private constant integer BOMB1 = 'h0AP'
private constant integer BOMB2 = 'h0AW'
private constant integer LIGHTUP = 'h0D8'
private integer CACHE
endglobals
private struct data
unit c
real x
real y
integer count = 0
group good
real time = 7
lightning array l[5]
method destroy takes nothing returns nothing
local unit enumUnit
for enumUnit in good
call PauseUnit(enumUnit,false)
endfor
call GroupClear(good)
call DestroyGroup(.good)
call .deallocate()
endmethod
static method GroupAction takes nothing returns nothing
local data this = CACHE
local unit e = GetEnumUnit()
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 300) + 700) / 60
if Distance(GetUnitX(e),GetUnitY(e),x,y) <= RADIUS then
call SetUnitAnimation(e,"death")
call PauseUnit(e,true)
call UnitDamageTarget(c,e,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
else
call PauseUnit(e,false)
call GroupRemoveUnit(good,e)
endif
set e = null
endmethod
static method TimerExpired3 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local group g
local unit e
set count = count + 1
if ModuloInteger(count,4) == 1 then
call EffectUnitColor(c,x,y,270,4.5,BOMB1,1,255,255,255,255)
call EffectUnitColor(c,x,y,270,8,BOMB2,1,255,55,255,255)
call DestroyEffect(AddSpecialEffect("war3mapImported\\ShockwavePurple.mdx",x,y))
endif
set g = CreateGroup()
call GroupEnumUnitsInRange(g,x,y,RADIUS,null)
for e in g
if FilterGeneral(c,e) and IsUnitInGroup(e,.good) == false then
call GroupAddUnit(good,e)
endif
endfor
call DestroyGroup(g)
set CACHE = this
call ForGroup(good,function data.GroupAction)
if count >= 70 then
call PauseTimer(z)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method TimerExpired2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local integer i = 0
set count = count + 1
if count == 0 then
call EffectUnitColor(c,x,y,270,0.0,MAGICSEAL,0,255,255,50,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,375,0)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call ShakeGroupCamera(0.3,x,y,RADIUS,5)
call SoundStart("war3mapImported\\MagicCirclez.mp3",GetUnitX(c),GetUnitY(c))
elseif count == 0 then
call EffectUnitColor(c,x,y,270,0,MAGICSEAL,0,00,50,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,450,0)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call ShakeGroupCamera(0.3,x,y,RADIUS,5)
call SoundStart("war3mapImported\\MagicCirclez.mp3",GetUnitX(c),GetUnitY(c))
elseif count == 0 then
call EffectUnitColor(c,x,y,270,0.0,MAGICSEAL,0,255,55,55,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,525,0)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call ShakeGroupCamera(0.3,x,y,RADIUS,5)
call SoundStart("war3mapImported\\MagicCirclez.mp3",GetUnitX(c),GetUnitY(c))
elseif count == 0 then
call EffectUnitColor(c,x,y,270,0.0,MAGICSEAL,0,255,125,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call ShakeGroupCamera(0.3,x,y,RADIUS,5)
call SoundStart("war3mapImported\\MagicCirclez.mp3",GetUnitX(c),GetUnitY(c))
elseif count == 5 then
call EffectUnitColor(c,x,y,270,2.0,MAGICSEAL,5,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,675,0)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call ShakeGroupCamera(0.3,x,y,RADIUS,5)
call SoundStart("war3mapImported\\MagicCirclez.mp3",GetUnitX(c),GetUnitY(c))
endif
if count >= 5 then
set count = 0
for i = 1 to 5
call DestroyLightning(l[i])
endfor
call TimerStart(z,0.05,true,function data.TimerExpired3)
endif
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real xx
local real yy
local real array xxx
local real array yyy
local integer i = 1
set count = count + 1
set xx = PolarX(x,RADIUS,count * 72)
set yy = PolarY(y,RADIUS,count * 72)
if count == 1 then
call EffectUnitColor(c,xx,yy,count * 72,2,STAFF1,4.5,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,3000)
elseif count == 2 then
call EffectUnitColor(c,xx,yy,count * 72,2,STAFF2,4.5,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,3000)
elseif count == 2 then
call EffectUnitColor(c,xx,yy,count * 72,2,STAFF3,4.5,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,3000)
elseif count == 2 then
call EffectUnitColor(c,xx,yy,count * 72,2,STAFF4,4.5,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,3000)
elseif count == 2 then
call EffectUnitColor(c,xx,yy,count * 72,2,STAFF5,4.5,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,3000)
endif
if count == 0 then
set xx = PolarX(GetUnitX(c),65,Angle(GetUnitX(c),GetUnitY(c),x,y))
set yy = PolarY(GetUnitY(c),65,Angle(GetUnitX(c),GetUnitY(c),x,y))
call EffectUnitColor(c,xx,yy,Angle(GetUnitX(c),GetUnitY(c),x,y),1,MAGICSEAL90,1.5,155,45,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call ShakeGroupCamera(0.3,GetUnitX(c),GetUnitY(c),RADIUS,4)
endif
if count >= 0 then
set count = 0
for i = 0 to 0
set xxx[i] = PolarX(x,RADIUS,i * 0)
set yyy[i] = PolarY(y,RADIUS,i * 0)
endfor
for i = 0 to 0
if i != 0 then
set l[i] = AddLightningEx("",true,xxx[i],yyy[i],0,xxx[i + 1],yyy[i + 1],0)
else
set l[i] = AddLightningEx("",true,xxx[i],yyy[i],0,xxx[1],yyy[1],0)
endif
endfor
call PauseUnit(c,false)
call EffectUnitColor(c,x,y,270,4,LIGHTUP,3.0,255,205,255,155)
call SetUnitPosition(bj_lastCreatedUnit,x,y)
call TimerStart(z,0.5,true,function data.TimerExpired2)
endif
endmethod
static method Periodic takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local group g = CreateGroup()
local unit v
local unit d
local real a
local real xx
local real yy
set time = time - 0.04
call GroupEnumUnitsInRange(g,x,y,RADIUS,null)
for v in g
if FilterGeneral(c,v) then
if GetUnitAbilityLevel(v,'B00F') <= 0 then
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(v),GetUnitY(v),bj_UNIT_FACING)
call UnitAddAbility(d,'A0CH')
call IssueTargetOrder(d,"soulburn",v)
call UnitApplyTimedLife(d,'BTLF',0.1)
set d = null
endif
if Distance(GetUnitX(v),GetUnitY(v),x,y) > RADIUS - 0 then
set a = Angle(GetUnitX(v),GetUnitY(v),x,y)
set xx = PolarX(GetUnitX(v),0,a)
set yy = PolarY(GetUnitY(v),0,a)
call SetUnitX(v,xx)
call SetUnitY(v,yy)
endif
endif
endfor
call DestroyGroup(g)
if time <= 0 then
call ReleaseTimer(z)
endif
set g = null
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local timer zz = NewTimer()
local data this = data.allocate()
set c = caster
set x = targetx
set y = targety
call PauseUnit(c,true)
call TriggerSleepAction(0)
set good = CreateGroup()
call SetUnitTimeScale(c,2)
call SetUnitAnimation(c,"spell three")
call SetUnitTimeScale(c,0.6)
call TriggerSleepAction(3)
call SetTimerData(z,this)
call SetTimerData(zz,this)
call TimerStart(z,0.4,true,function data.TimerExpired)
call TimerStart(zz,0.04,true,function data.Periodic)
return this
endmethod
endstruct
private function Actions takes nothing returns nothing
call SoundStart("war3mapImported\\Cerma.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Meteor initializer init
globals
private constant integer SPELLID = 'A01S' // Meteor Skill ID. Look by ctrl + d at object editor
private constant integer METEOR = 'B01D' // Buff of Meteor
private constant integer BALL = 'h0BU' // Yellow Light ID of meteor
private constant integer SEALID = 'h082' // Magic Seal ID of meteor
private constant real SPEED = 50 // Meteor Speed per 0.04 second
private constant real LIMIT_RANGE = 1200 // LIMIT Range of meteor when click
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl" // effect impact when casting
endglobals
private function PolarX takes real x, real dist, real angle returns real
return x+dist*Cos(angle*bj_DEGTORAD)
endfunction
private function PolarY takes real y, real dist, real angle returns real
return y+dist*Sin(angle*bj_DEGTORAD)
endfunction
private function Angle takes real x1, real y1, real x2, real y2 returns real
return bj_RADTODEG * Atan2(y2-y1, x2-x1)
endfunction
private function Distance takes real x1, real y1, real x2, real y2 returns real
return SquareRoot((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1))
endfunction
function SoundStart2 takes string s, real x, real y, integer volum returns nothing
local sound t = CreateSound(s,false,false,false,10,10,"Default")
call SetSoundPosition(t,x,y,0)
call SetSoundVolume(t,volum)
call StartSound(t)
set t = null
endfunction
private struct data
unit c
integer count = 0
integer cal = 0
trigger t
unit st
real x
real y
real selfx
real selfy
real ang
real deang
real curve
real corner
integer random
timer z
method destroy takes nothing returns nothing
call SetUnitFlyHeight(c,0,300)
call DestroyTrigger(.t)
call PauseTimer(z)
call DestroyTimer(z)
call SetUnitPathing(c,true)
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
set cal = cal + 1
if cal >= 25 then
set cal = 0
endif
if IsUnitPaused(c) == false then
set count = count + 1
if count >= 20 and count <= 39 then
call SetUnitFlyHeight(c,100,300)
elseif count >= 40 then
set count = 0
call SetUnitFlyHeight(c,0,300)
endif
endif
if Distance(GetUnitX(c),GetUnitY(c),selfx,selfy) >= 2 then
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),BALL,GetUnitX(c),GetUnitY(c),270)
call SetUnitScale(bj_lastCreatedUnit,5,5,5)
call SetUnitVertexColor(bj_lastCreatedUnit,255,255,255,155)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.75)
call SetUnitFlyHeight(bj_lastCreatedUnit,GetUnitFlyHeight(c) + 100,0)
endif
set selfx = GetUnitX(c)
set selfy = GetUnitY(c)
if GetUnitAbilityLevel(c,METEOR) <= 0 then
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method MeteorMove takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real xx
local real yy
local real tang
call SetUnitAnimation(c,"stand ready")
if st == null then
set ang = Angle(GetUnitX(c),GetUnitY(c),x,y)
if random == 1 then
if deang > 0 then
set deang = deang - curve
else
set deang = 0
endif
set tang = ang - deang
elseif random == 2 then
set tang = (ang + corner) - deang
if deang < corner then
set deang = deang + curve
else
set deang = corner
endif
elseif random == 3 then
set tang = ang
endif
set xx = PolarX(GetUnitX(c),SPEED,tang)
set yy = PolarY(GetUnitY(c),SPEED,tang)
call SetUnitPosition(c,xx,yy)
call SetUnitFacing(c,tang)
if Distance(xx,yy,x,y) <= 60 then
call SetUnitPathing(c,true)
call PauseTimer(z)
call DestroyTimer(z)
set z = null
endif
elseif st != null then
set ang = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(st),GetUnitY(st))
if random == 1 then
if deang > 0 then
set deang = deang - curve
else
set deang = 0
endif
set tang = ang - deang
elseif random == 2 then
set tang = (ang + corner) - deang
if deang < corner then
set deang = deang + curve
else
set deang = corner
endif
elseif random == 3 then
set tang = ang
endif
set xx = PolarX(GetUnitX(c),SPEED,tang)
set yy = PolarY(GetUnitY(c),SPEED,tang)
call SetUnitPosition(c,xx,yy)
call SetUnitFacing(c,tang)
if Distance(xx,yy,GetUnitX(st),GetUnitY(st)) <= 100 then
call SetUnitPathing(c,true)
call PauseTimer(z)
call DestroyTimer(z)
set st = null
set z = null
endif
endif
endmethod
static method Meteor takes nothing returns nothing
local trigger t = GetTriggeringTrigger()
local data this = GetCSData(t)
local real xx
local real yy
if z != null then
call SetUnitPathing(c,true)
call PauseTimer(z)
call DestroyTimer(z)
endif
set st = null
if GetTriggerEventId() == EVENT_UNIT_ISSUED_POINT_ORDER then
set x = GetOrderPointX()
set y = GetOrderPointY()
elseif GetTriggerEventId() == EVENT_UNIT_ISSUED_TARGET_ORDER then
set st = GetOrderTargetUnit()
set x = GetUnitX(st)
set y = GetUnitY(st)
endif
if GetTriggerEventId() != EVENT_UNIT_ISSUED_ORDER and Distance(GetUnitX(c),GetUnitY(c),x,y) <= LIMIT_RANGE and IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPathing(c,false)
call SoundStart2("war3mapImported\\Wink.mp3",GetUnitX(c),GetUnitY(c),70)
set random = GetRandomInt(1,3)
set corner = GetRandomReal(40,90)
set curve = (corner / 20)
if random == 1 then
set deang = corner
elseif random == 2 then
set deang = 0
elseif random == 3 then
set deang = 0
endif
set z = CreateTimer()
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.MeteorMove)
set t = null
endif
endmethod
static method MeteorCon takes nothing returns boolean
return GetIssuedOrderId() == OrderId("move") or GetIssuedOrderId() == OrderId("smart") or GetIssuedOrderId() == OrderId("attack") or GetIssuedOrderId() == OrderId("holdposition")
endmethod
static method create takes unit caster returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
call SoundStart2("war3mapImported\\Meteor.mp3",GetUnitX(c),GetUnitY(c),127)
set .t = CreateTrigger()
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t,Condition(function data.MeteorCon))
call TriggerAddAction(t,function data.Meteor)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SEALID,GetUnitX(c),GetUnitY(c),270)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call SetUnitVertexColor(bj_lastCreatedUnit,255,255,105,255)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.5)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call SetUnitFlyHeight(bj_lastCreatedUnit,15,0)
call UnitAddAbility(c,'Amrf')
call UnitRemoveAbility(c,'Amrf')
call SetCSData(t,this)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
call SoundStart2("war3mapImported\\Meteor.mp3",0,0,127)
call SoundStart2("war3mapImported\\Wink.mp3",0,0,40)
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=18
//TESH.alwaysfold=0
scope GrandChariot initializer init
globals
private constant integer SPELLID = 'A0AU' // Raw code of spell id
private constant integer MISSILE = 'h08W' // Raw code of dummy model
private constant integer SKYBOMB = 'h08V' // Raw code of dummy model
private constant integer SKYRING = 'h08U' // Raw code of dummy model
private constant integer ICENOVA = 'h08T' // Raw code of dummy model
private constant integer LIGHTCANDY = 'h08S' // Raw code of dummy model
private constant integer FIRAGA = 'h08R' // Raw code of dummy model
private constant integer MEGABLAST = 'h08Q' // Raw code of dummy model
private constant integer MAGICCIRCLE90 = 'h08P' // Raw code of dummy model
private constant integer SHADOW = 'h08O' // Raw code of dummy model
private constant integer GALAXY = 'h08N' // Raw code of dummy model
private constant string EFFECT2 = "war3mapImported\\YellowNeutralBuildingExplosion.mdx"
private constant real RADIUS = 350 // Radius of each 7 blast
endglobals
private struct data
unit c
real targetx
real targety
unit array e[8]
lightning array l[7]
integer count = 3
method destroy takes nothing returns nothing
local integer i = 1
loop
exitwhen i > 7
call UnitApplyTimedLife(e[i],'BTLF',1)
if i != 7 then
call DestroyLightning(l[i])
endif
set i = i + 1
endloop
call PauseUnit(c,false)
call SetUnitTimeScale(c,1)
call SetUnitAnimation(c,"stand")
call .deallocate()
endmethod
method damage takes nothing returns real
local real r = (GetUnitAbilityLevel(c,'A0AU') + 18) * GetHeroInt(c,true)
return r
endmethod
static method onAction takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r
local real a = Angle(GetUnitX(c),GetUnitY(c),targetx,targety)
local integer i = 1
local real x = targetx
local real y = targety
local real xx
local real yy
local group g
local group go
local unit v
loop
exitwhen i > 7
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),LIGHTCANDY,GetUnitX(e[i]),GetUnitY(e[i]),a)
call SetUnitFlyHeight(bj_lastCreatedUnit,GetUnitFlyHeight(e[i]),0)
call SetUnitScale(bj_lastCreatedUnit,4,4,4)
call SetUnitVertexColor(bj_lastCreatedUnit,255,255,255,15)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set i = i + 1
endloop
if count == 2 then
call ShakeGroupCamera(1,targetx,targety,1200,10)
set xx = PolarX(x,560,a + 100)
set yy = PolarY(y,560,a + 100)
set g = CreateGroup()
set go = CreateGroup()
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set xx = PolarX(x,530,a + 50)
set yy = PolarY(y,530,a + 50)
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set xx = PolarX(x,350,a + 25)
set yy = PolarY(y,350,a + 25)
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
if IsUnitInGroup(v,go) == false then
call GroupAddUnit(go,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set xx = PolarX(x,0,a - 90)
set yy = PolarY(y,0,a - 90)
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
if IsUnitInGroup(v,go) == false then
call GroupAddUnit(go,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set xx = PolarX(x,180,a - 85)
set yy = PolarY(y,180,a - 85)
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
if IsUnitInGroup(v,go) == false then
call GroupAddUnit(go,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set xx = PolarX(x,320,a - 80)
set yy = PolarY(y,320,a - 80)
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
if IsUnitInGroup(v,go) == false then
call GroupAddUnit(go,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set xx = PolarX(x,700,a - 65)
set yy = PolarY(y,700,a - 65)
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
if IsUnitInGroup(v,go) == false then
call GroupAddUnit(go,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyGroup(g)
call DestroyGroup(go)
endif
set count = count - 1
if count <= 0 then
call ReleaseTimer(z)
call .destroy()
endif
set g = null
set go = null
endmethod
static method onAction3 takes nothing returns nothing
local timer z = GetExpiredTimer()
call TimerStart(z,0.2,true,function data.onAction)
endmethod
static method onAction2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),targetx,targety)
local real x = PolarX(GetUnitX(c),50,a)
local real y = PolarY(GetUnitY(c),50,a)
local real xx = PolarX(x,460,a + 90)
local real yy = PolarY(y,460,a + 90)
local real xx2 = PolarX(x,325,a + 90)
local real yy2 = PolarY(y,325,a + 90)
set l[1] = AddLightningEx("SPLK",true,xx,yy,95,xx2,yy2,230)
set xx = PolarX(x,200,a + 90)
set yy = PolarY(y,200,a + 90)
set l[2] = AddLightningEx("SPLK",true,xx2,yy2,230,xx,yy,220)
set xx2 = PolarX(x,180,a + 90)
set yy2 = PolarY(y,180,a + 90)
set l[3] = AddLightningEx("SPLK",true,xx,yy,220,xx2,yy2,95)
set xx = PolarX(x,0,a + 90)
set yy = PolarY(y,0,a + 90)
set l[4] = AddLightningEx("SPLK",true,xx2,yy2,95,xx,yy,65)
set xx2 = PolarX(x,180,a - 90)
set yy2 = PolarY(y,180,a - 90)
set l[5] = AddLightningEx("SPLK",true,xx,yy,65,xx2,yy2,140)
set xx = PolarX(x,450,a - 90)
set yy = PolarY(y,450,a - 90)
set l[6] = AddLightningEx("SPLK",true,xx2,yy2,140,xx,yy,250)
call TimerStart(z,1,false,function data.onAction3)
endmethod
static method onAction1 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),targetx,targety)
local real x = PolarX(GetUnitX(c),50,a)
local real y = PolarY(GetUnitY(c),50,a)
local real xx = PolarX(x,460,a + 90)
local real yy = PolarY(y,460,a + 90)
set e[1] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[1],95,95)
set xx = PolarX(x,325,a + 90)
set yy = PolarY(y,325,a + 90)
set e[2] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[2],230,230)
set xx = PolarX(x,200,a + 90)
set yy = PolarY(y,200,a + 90)
set e[3] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[3],220,220)
set xx = PolarX(x,180,a + 90)
set yy = PolarY(y,180,a + 90)
set e[4] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[5],95,95)
set xx = PolarX(x,0,a + 90)
set yy = PolarY(y,0,a + 90)
set e[5] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[5],65,65)
set xx = PolarX(x,180,a - 90)
set yy = PolarY(y,180,a - 90)
set e[6] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[6],140,140)
set xx = PolarX(x,450,a - 90)
set yy = PolarY(y,450,a - 90)
set e[7] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[7],250,250)
call TimerStart(z,1,true,function data.onAction2)
endmethod
static method create takes unit caster, real x, real y returns thistype
local data this = data.allocate()
local timer z = NewTimer()
call SoundStart("war3mapImported\\Grand.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
set c = caster
set targetx = x
set targety = y
call SetUnitTimeScale(c,0)
call PauseUnit(c,true)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,GetUnitX(c),GetUnitY(c),270)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,GetUnitX(c),GetUnitY(c),90)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,GetUnitX(c),GetUnitY(c),90)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,GetUnitX(c),GetUnitY(c),90)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),GALAXY,GetUnitX(c),GetUnitY(c),90)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,targetx,targety,270)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,targetx,targety,90)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,targetx,targety,90)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,targetx,targety,90)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
call SetTimerData(z,this)
call TimerStart(z,0.05,false,function data.onAction1)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index
set index = 0
call Preload("war3mapImported\\Skyraga.mdx")
loop
call TriggerRegisterPlayerUnitEvent(t, Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Beam initializer init
globals
private constant integer SPELLID = 'A0BY'
private constant real RADIUS = 450
private constant integer ID1 = 'h0BX' //mystoganaura -90angle
private constant integer ID2 = 'h0BW' //arcanemissilecomplete
private constant integer ID3 = 'h0ZZ' //DTPurple
private constant integer ID4 = 'h0BZ' //Abyssal_Impact_Base
private constant integer ID5 = 'h0C0' //LightNova
private constant integer ID6 = 'h0C1' //Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
private constant string EFFECT1 = "war3mapImported\\ShockwavePurple.mdx"
private constant string EFFECT2 = "war3mapImported\\AncientExplodeBlue.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local integer i
local unit array d
local real a = Angle(GetUnitX(c),GetUnitY(c),x,y)
local real xx = PolarX(GetUnitX(c),100,a)
local real yy = PolarY(GetUnitY(c),100,a)
local real a2
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
local group g
local unit e
call SetUnitTimeScale(c,0)
call EffectUnitColor(c,xx,yy,a,0.7,ID1,1,255,255,255,255)
call SoundStart("war3mapImported\\MagicCircle.mp3",GetUnitX(c),GetUnitY(c))
call ShakeGroupCamera(0.2,xx,yy,500,1)
call PauseUnit(c,true)
call PolledWait(1)
call SetUnitTimeScale(c,1)
call SoundStart("war3mapImported\\MiniExplode.mp3",GetUnitX(c),GetUnitY(c))
call PauseUnit(c,false)
for i = 1 to 8
set xx = PolarX(x,300,i * 45)
set yy = PolarY(y,300,i * 45)
set a2 = Angle(xx,yy,x,y)
set d[i] = CreateUnit(GetOwningPlayer(c),ID2,xx,yy,a2)
call Jump(d[i],1,x,y,1,200,"","","")
call EffectUnitColor(c,xx,yy,a,0.3,ID3,0.5,255,255,255,255)
endfor
call PolledWait(1)
set g = CreateGroup()
call GroupEnumUnitsInRange(g,x,y,RADIUS,null)
for e in g
if FilterGeneral(c,e) then
call UnitDamageTarget(c,e,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
endif
endfor
call DestroyGroup(g)
call DestroyEffect(AddSpecialEffect(EFFECT1,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,x,y))
call SoundStart("war3mapImported\\MiniExplode.mp3",GetUnitX(c),GetUnitY(c))
call EffectUnitColor(c,x,y,a,1.7,ID3,0.5,255,255,255,255)
call EffectUnitColor(c,x,y,a,4,ID4,0.5,255,255,255,255)
call EffectUnitColor(c,x,y,270,4,ID5,1,255,255,255,255)
call EffectUnitColor(c,x,y,270,4,ID6,5,255,255,255,55)
for i = 1 to 8
call RemoveUnit(d[i])
set d[i] = null
endfor
set c = null
set g = null
set e = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope HeavenlyBlast initializer init
globals
private constant integer SPELLID = 'A0CJ' // Raw code of spell id
private constant integer MISSILE = 'h0DG' // Raw code of dummy model
private constant integer SKYBOMB = 'h0DH' // Raw code of dummy model
private constant integer SKYRING = 'h0DI' // Raw code of dummy model
private constant integer ICENOVA = 'h0DJ' // Raw code of dummy model
private constant integer FREEZINGRING = 'h0DK' // Raw code of dummy model
private constant integer LIGHTCANDY = 'h0DL' // Raw code of dummy model
private constant integer LIGHTSTRIKEARRAY = 'h0DM' // Raw code of dummy model
private constant integer AURAID = 'h002' // Raw code of dummy model
private constant integer DUST = 'h002' // Raw code of dummy model
private constant string EFFECT2 = "war3mapImported\\SkyExplosion.mdx"
endglobals
private struct data
unit c
unit t
unit d
real angle
real time = 2
method destroy takes nothing returns nothing
call RemoveUnit(d)
call .deallocate()
endmethod
method damage takes nothing returns real
local real r = (GetUnitAbilityLevel(c,'A0AU') + 3) * GetHeroAgi(c,true)
return r
endmethod
static method onAction3 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(t),40,angle)
local real y = PolarY(GetUnitY(t),40,angle)
call SetUnitPosition(t,x,y)
call SetUnitPosition(d,x,y)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MISSILE,x,y,angle)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),LIGHTSTRIKEARRAY,x,y,angle)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
set time = time - 0.04
if time <= 0 then
call UnitDamageTarget(c,t,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),DUST,GetUnitX(t),GetUnitY(t),0)
call SetUnitScale(bj_lastCreatedUnit,2.5,2.5,2.5)
call SetUnitVertexColor(bj_lastCreatedUnit,100,100,255,50)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FREEZINGRING,GetUnitX(t),GetUnitY(t),0)
call SoundStart("war3mapImported\\MiniExplode.mp3",GetUnitX(c),GetUnitY(c))
call SetUnitScale(bj_lastCreatedUnit,3,3,3)
call SetUnitTimeScale(bj_lastCreatedUnit,0.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,GetUnitX(t),GetUnitY(t),0)
call SetUnitScale(bj_lastCreatedUnit,5.5,5.5,5.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,GetUnitX(t),GetUnitY(t),0)
call SetUnitScale(bj_lastCreatedUnit,5.5,5.5,5.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,GetUnitX(t),GetUnitY(t),0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,GetUnitX(t),GetUnitY(t),0)
call SetUnitScale(bj_lastCreatedUnit,4,4,4)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method onAction takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(d),50,a)
local real y = PolarY(GetUnitY(d),50,a)
call SetUnitPosition(d,x,y)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MISSILE,x,y,a)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.5)
set time = time - 0.04
if Distance(GetUnitX(d),GetUnitY(d),GetUnitX(t),GetUnitY(t)) <= 50 then
set angle = a
call TimerStart(z,0.04,true,function data.onAction3)
endif
endmethod
static method onAction2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),LIGHTCANDY,PolarX(GetUnitX(c),70,a),PolarY(GetUnitY(c),70,a),a)
call SetUnitScale(bj_lastCreatedUnit,0.65,0.65,0.65)
call SoundStart("war3mapImported\\MagicCircle.mp3",GetUnitX(c),GetUnitY(c))
call SetUnitVertexColor(bj_lastCreatedUnit,255,255,255,255)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set d = CreateUnit(GetOwningPlayer(c),MISSILE,PolarX(GetUnitX(c),70,a),PolarY(GetUnitY(c),70,a),a)
call SetUnitScale(d,8,8,8)
call PauseUnit(c,false)
call TimerStart(z,0.04,true,function data.onAction)
endmethod
static method onAction1 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
call SetUnitAnimation(c,"attack")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),DUST,GetUnitX(c),GetUnitY(c),0)
call SetUnitScale(bj_lastCreatedUnit,3,3,3)
call SetUnitVertexColor(bj_lastCreatedUnit,255,255,255,50)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call TimerStart(z,0.6,true,function data.onAction2)
endmethod
static method create takes unit caster, unit target returns thistype
local data this = data.allocate()
local timer z = NewTimer()
set c = caster
set t = target
call PauseUnit(c,true)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),AURAID,GetUnitX(c),GetUnitY(c),270)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',2.5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),AURAID,GetUnitX(c),GetUnitY(c),90)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',2.5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),AURAID,GetUnitX(c),GetUnitY(c),90)
call SetUnitScale(bj_lastCreatedUnit,4,4,4)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',2.5)
call SetTimerData(z,this)
call TimerStart(z,0.05,false,function data.onAction1)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index
set index = 0
loop
call TriggerRegisterPlayerUnitEvent(t, Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=15
//TESH.alwaysfold=0
scope GrandChariot initializer init
globals
private constant integer SPELLID = 'A0AU' // Raw code of spell id
private constant integer MISSILE = 'h08W' // Raw code of dummy model
private constant integer SKYBOMB = 'h08V' // Raw code of dummy model
private constant integer SKYRING = 'h08U' // Raw code of dummy model
private constant integer ICENOVA = 'h08T' // Raw code of dummy model
private constant integer LIGHTCANDY = 'h08S' // Raw code of dummy model
private constant integer FIRAGA = 'h08R' // Raw code of dummy model
private constant integer MEGABLAST = 'h08Q' // Raw code of dummy model
private constant integer MAGICCIRCLE90 = 'h08P' // Raw code of dummy model
private constant integer SHADOW = 'h08O' // Raw code of dummy model
private constant integer GALAXY = 'h08N' // Raw code of dummy model
private constant string EFFECT2 = "war3mapImported\\YellowNeutralBuildingExplosion.mdx"
private constant real RADIUS = 350 // Radius of each 7 blast
endglobals
private struct data
unit c
real targetx
real targety
unit array e[8]
lightning array l[7]
integer count = 3
method destroy takes nothing returns nothing
local integer i = 1
loop
exitwhen i > 7
call UnitApplyTimedLife(e[i],'BTLF',1)
if i != 7 then
call DestroyLightning(l[i])
endif
set i = i + 1
endloop
call PauseUnit(c,false)
call SetUnitTimeScale(c,1)
call SetUnitAnimation(c,"stand")
call ResetToGameCameraForPlayer(GetOwningPlayer(c),0)
call .deallocate()
call SetUnitFlyHeight(c,0,3000)
endmethod
method damage takes nothing returns real
local real r = (GetUnitAbilityLevel(c,'A0AU') + 15) * GetHeroAgi(c,true)
return r
endmethod
static method onAction takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r
local real a = Angle(GetUnitX(c),GetUnitY(c),targetx,targety)
local integer i = 1
local real x = targetx
local real y = targety
local real xx
local real yy
local group g
local group go
local unit v
loop
exitwhen i > 7
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),LIGHTCANDY,GetUnitX(e[i]),GetUnitY(e[i]),a)
call SetUnitFlyHeight(bj_lastCreatedUnit,GetUnitFlyHeight(e[i]),0)
call SetUnitScale(bj_lastCreatedUnit,4,4,4)
call SetUnitVertexColor(bj_lastCreatedUnit,255,255,255,15)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set i = i + 1
endloop
if count == 2 then
call ShakeGroupCamera(1,targetx,targety,1200,10)
set xx = PolarX(x,560,a + 100)
set yy = PolarY(y,560,a + 100)
set g = CreateGroup()
set go = CreateGroup()
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set xx = PolarX(x,530,a + 50)
set yy = PolarY(y,530,a + 50)
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set xx = PolarX(x,350,a + 25)
set yy = PolarY(y,350,a + 25)
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
if IsUnitInGroup(v,go) == false then
call GroupAddUnit(go,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SoundStart("war3mapImported\\MiniExplode.mp3",GetUnitX(c),GetUnitY(c))
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set xx = PolarX(x,0,a - 90)
set yy = PolarY(y,0,a - 90)
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
if IsUnitInGroup(v,go) == false then
call GroupAddUnit(go,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set xx = PolarX(x,180,a - 85)
set yy = PolarY(y,180,a - 85)
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
if IsUnitInGroup(v,go) == false then
call GroupAddUnit(go,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set xx = PolarX(x,320,a - 80)
set yy = PolarY(y,320,a - 80)
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
if IsUnitInGroup(v,go) == false then
call GroupAddUnit(go,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set xx = PolarX(x,700,a - 65)
set yy = PolarY(y,700,a - 65)
call GroupEnumUnitsInRange(g,xx,yy,RADIUS,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitEnemy(v,GetOwningPlayer(c)) == true and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(c,'Avul') <= 0 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,damage(),true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
if IsUnitInGroup(v,go) == false then
call GroupAddUnit(go,v)
endif
endif
call GroupRemoveUnit(g,v)
endloop
call GroupClear(g)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),FIRAGA,xx,yy,a)
call SetUnitScale(bj_lastCreatedUnit,2,2,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),MEGABLAST,xx,yy,a)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYBOMB,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,3.5,3.5,3.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyEffect(AddSpecialEffect(EFFECT2,xx,yy))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SKYRING,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1,1,1)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),ICENOVA,xx,yy,0)
call SetUnitScale(bj_lastCreatedUnit,1.5,1.5,1.5)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyGroup(g)
call DestroyGroup(go)
endif
set count = count - 1
if count <= 0 then
call ReleaseTimer(z)
call .destroy()
endif
set g = null
set go = null
endmethod
static method onAction3 takes nothing returns nothing
local timer z = GetExpiredTimer()
call TimerStart(z,0.4,true,function data.onAction)
call SoundStart("war3mapImported\\GrandChariot.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endmethod
static method onAction2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),targetx,targety)
local real x = PolarX(GetUnitX(c),50,a)
local real y = PolarY(GetUnitY(c),50,a)
local real xx = PolarX(x,460,a + 90)
local real yy = PolarY(y,460,a + 90)
local real xx2 = PolarX(x,325,a + 90)
local real yy2 = PolarY(y,325,a + 90)
call SetUnitAnimation(c,"spell two")
call SetUnitTimeScale(c,0.2)
call SoundStart("war3mapImported\\Wink.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call SetCameraFieldForPlayer(GetOwningPlayer(c),CAMERA_FIELD_ROTATION,GetUnitFacing(c),0)
call SetCameraFieldForPlayer(GetOwningPlayer(c),CAMERA_FIELD_ANGLE_OF_ATTACK,315,0)
call SetCameraFieldForPlayer(GetOwningPlayer(c),CAMERA_FIELD_TARGET_DISTANCE,1250,0)
set l[1] = AddLightningEx("SPLK",true,xx,yy,2250,xx2,yy2,2200)
set xx = PolarX(x,200,a + 90)
set yy = PolarY(y,200,a + 90)
set l[2] = AddLightningEx("SPLK",true,xx2,yy2,2200,xx,yy,2285)
set xx2 = PolarX(x,180,a + 90)
set yy2 = PolarY(y,180,a + 90)
set l[3] = AddLightningEx("SPLK",true,xx,yy,2285,xx2,yy2,2275)
set xx = PolarX(x,0,a + 90)
set yy = PolarY(y,0,a + 90)
set l[4] = AddLightningEx("SPLK",true,xx2,yy2,2275,xx,yy,2250)
set xx2 = PolarX(x,180,a - 90)
set yy2 = PolarY(y,180,a - 90)
set l[5] = AddLightningEx("SPLK",true,xx,yy,2250,xx2,yy2,2220)
set xx = PolarX(x,450,a - 90)
set yy = PolarY(y,450,a - 90)
set l[6] = AddLightningEx("SPLK",true,xx2,yy2,2220,xx,yy,2295)
call TimerStart(z,1,false,function data.onAction3)
endmethod
static method onAction1 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),targetx,targety)
local real x = PolarX(GetUnitX(c),50,a)
local real y = PolarY(GetUnitY(c),50,a)
local real xx = PolarX(x,460,a + 90)
local real yy = PolarY(y,460,a + 90)
set e[1] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[1],2095,3190)
set xx = PolarX(x,325,a + 90)
set yy = PolarY(y,325,a + 90)
set e[2] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[2],2230,3400)
set xx = PolarX(x,200,a + 90)
set yy = PolarY(y,200,a + 90)
set e[3] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[3],2220,3400)
set xx = PolarX(x,180,a + 90)
set yy = PolarY(y,180,a + 90)
set e[4] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[4],2095,3100)
set xx = PolarX(x,0,a + 90)
set yy = PolarY(y,0,a + 90)
set e[5] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[5],2065,3000)
set xx = PolarX(x,180,a - 90)
set yy = PolarY(y,180,a - 90)
set e[6] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[6],2140,3200)
set xx = PolarX(x,450,a - 90)
set yy = PolarY(y,450,a - 90)
set e[7] = CreateUnit(GetOwningPlayer(c),MAGICCIRCLE90,xx,yy,a)
call SetUnitFlyHeight(e[7],2250,3500)
call TimerStart(z,1,true,function data.onAction2)
endmethod
static method create takes unit caster, real x, real y returns thistype
local data this = data.allocate()
local timer z = NewTimer()
call SoundStart("war3mapImported\\ShijiSeiken.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
set c = caster
set targetx = x
set targety = y
call SetUnitTimeScale(c,0)
call PauseUnit(c,true)
call UnitAddAbility(c,'Amrf')
call UnitRemoveAbility(c,'Amrf')
call SetUnitFlyHeight(c,2100,3000)
call SetCameraFieldForPlayer(GetOwningPlayer(c),CAMERA_FIELD_ZOFFSET,2000,1)
call SetCameraFieldForPlayer(GetOwningPlayer(c),CAMERA_FIELD_TARGET_DISTANCE,1500,0)
call SetCameraFieldForPlayer(GetOwningPlayer(c),CAMERA_FIELD_ANGLE_OF_ATTACK,330,0)
call SetCameraFieldForPlayer(GetOwningPlayer(c),CAMERA_FIELD_ROTATION,GetUnitFacing(c) + 180,0)
call SetCameraTargetControllerNoZForPlayer(GetOwningPlayer(c),c,0,0,false)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,GetUnitX(c),GetUnitY(c),270)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,GetUnitX(c),GetUnitY(c),90)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,GetUnitX(c),GetUnitY(c),90)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,GetUnitX(c),GetUnitY(c),90)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),GALAXY,GetUnitX(c),GetUnitY(c),90)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,targetx,targety,270)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,targetx,targety,90)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,targetx,targety,90)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOW,targetx,targety,90)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',5)
call SetTimerData(z,this)
call TimerStart(z,0.05,false,function data.onAction1)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index
set index = 0
call Preload("war3mapImported\\Skyraga.mdx")
loop
call TriggerRegisterPlayerUnitEvent(t, Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_zxczxc_Actions takes nothing returns nothing
call SetCameraTargetControllerNoZForPlayer( Player(0), GetTriggerUnit(), 0, 0, false )
endfunction
//===========================================================================
function InitTrig_zxczxc_Copy takes nothing returns nothing
set gg_trg_zxczxc_Copy = CreateTrigger( )
call TriggerAddAction( gg_trg_zxczxc_Copy, function Trig_zxczxc_Actions )
endfunction
//TESH.scrollpos=66
//TESH.alwaysfold=0
scope Cerma initializer init
globals
private constant real RADIUS = 400
private constant integer SPELLID = 'A0CG'
private constant integer MAGICSEAL90 = 'h0E3'
private constant integer DARK = 'h0E1'
private constant integer BOMB1 = 'h0AP'
private constant integer BOMB2 = 'h0AW'
private integer CACHE
endglobals
private struct data
unit c
real x
real y
integer count = 0
group good
method destroy takes nothing returns nothing
local unit enumUnit
for enumUnit in good
call PauseUnit(enumUnit,false)
endfor
call GroupClear(good)
call DestroyGroup(.good)
call .deallocate()
endmethod
static method GroupAction takes nothing returns nothing
local data this = CACHE
local unit e = GetEnumUnit()
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 300) + 700) / 60
if Distance(GetUnitX(e),GetUnitY(e),x,y) <= RADIUS then
call SetUnitAnimation(e,"death")
call PauseUnit(e,true)
call UnitDamageTarget(c,e,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
else
call PauseUnit(e,false)
call GroupRemoveUnit(good,e)
endif
set e = null
endmethod
static method TimerExpired3 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local group g
local unit e
set count = count + 1
if ModuloInteger(count,6) == 1 then
call EffectUnitColor(c,x,y,270,1.5,BOMB1,1,255,155,255,255)
call EffectUnitColor(c,x,y,270,7.5,BOMB2,1,255,155,255,255)
call DestroyEffect(AddSpecialEffect("war3mapImported\\ShockwavePurple.mdx",x,y))
call EffectUnitColor(c,x,y,270,6,'h0AW',1,255,155,255,255)
endif
set g = CreateGroup()
call GroupEnumUnitsInRange(g,x,y,RADIUS,null)
for e in g
if FilterGeneral(c,e) and IsUnitInGroup(e,.good) == false then
call GroupAddUnit(good,e)
endif
endfor
call DestroyGroup(g)
set CACHE = this
call ForGroup(good,function data.GroupAction)
if count >= 100 then
call EffectUnitColor(c,x,y,270,6,'h0AW',1,255,155,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.3)
call PauseTimer(z)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real targetx, real targety returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set c = caster
set x = targetx
set y = targety
call SetUnitInvulnerable(c,true)
call PauseUnit(c,true)
set good = CreateGroup()
call EffectUnitColor(c,x,y,270,15,DARK,9,255,255,255,255)
call SetUnitTimeScale(c,2)
call SetUnitAnimation(c,"spell three")
call SetUnitTimeScale(c,0.6)
call TriggerSleepAction(2)
call EffectUnitColor(c,x,y,270,2.5,MAGICSEAL90,9,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,600,0)
call SetUnitTimeScale(bj_lastCreatedUnit,0.75)
call ShakeGroupCamera(6,GetUnitX(c),GetUnitY(c),1000,15)
call TriggerSleepAction(3)
call EffectUnitColor(c,x,y,270,6,'h0AW',8,255,55,255,125)
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired3)
return this
endmethod
endstruct
private function Actions takes nothing returns nothing
call SoundStart("war3mapImported\\Cerma.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=9
//TESH.alwaysfold=0
scope fastattack initializer init
globals
private constant integer SPELLID = 'A0D5'
private constant integer SPELLID2 = 'A000'
private constant integer SHADOWID = 'h00J'
private constant integer HEKKEID = 'h00I'
private constant string EFFECT = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
private constant string EFFECTATT = "Abilities\\Weapons\\ZigguratMissile\\ZigguratMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\IceNova.mdx"
private constant string EFFECT3 = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT4 = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer WAVE4 = 'h05H'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,true)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,false)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
set c = null
endfunction
private function TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local integer count = LoadInteger(HS,GetHandleId(z),0)
local real a = LoadReal(HS,GetHandleId(z),1)
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 2 ) + 8 ) * GetHeroAgi(c,true)
local unit d
set count = count + 1
if t == null then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
if count >= 32 then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call SetUnitTimeScale(c,1)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,1.5,WAVE,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2,WAVE2,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),a,3,WAVE3,1,255,255,255,255)
call DamageTarget(c,t,r,TAIJUTSU_DAMAGE)
call SlideUnitAngle(t,25,0.5,a,EFFECT)
set d = CreateUnit(GetOwningPlayer(c),DUMMY,GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
call UnitAddAbility(d,'A05O')
call IssueTargetOrder(d,"soulburn",t)
call UnitApplyTimedLife(d,'BTLF',0.5)
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),2))
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),3))
if GetWidgetLife(t) < 0.45 then
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID,false)
call SetPlayerAbilityAvailable(GetOwningPlayer(c),SPELLID2,true)
call TimerStart(z,10,false,function FinalTimer)
else
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
else
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),a,3,WAVE4,1,255,255,255,255)
call SetUnitAnimation(c,"attack")
call SetUnitAnimation(t,"death")
call SetUnitPosition(t,PolarX(GetUnitX(t),15,a),PolarY(GetUnitY(t),15,a))
call SetUnitPosition(c,PolarX(GetUnitX(t),-100,a),PolarY(GetUnitY(t),-100,a))
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(t),GetUnitY(t)))
call SoundStart("war3mapImported\\SoundPound.mp3",GetUnitX(c),GetUnitY(c))
call SaveInteger(HS,GetHandleId(z),0,count)
endif
endif
set c = null
set t = null
set d = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local integer i = 0
local unit d
local timer z = NewTimer()
local effect array e
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\Rokujuuyonshou.mp3",GetUnitX(c),GetUnitY(c))
endif
set d = CreateUnit(GetOwningPlayer(c),HEKKEID,GetUnitX(c),GetUnitY(c),0)
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call PauseUnit(t,true)
call SetUnitInvulnerable(t,true)
call SetUnitAnimation(c,"spell")
call SetUnitTimeScale(c,3)
loop
exitwhen i >= 4
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),SHADOWID,GetUnitX(c),GetUnitY(c),0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1.5)
set i = i + 1
endloop
call PolledWait(0.0)
call RemoveUnit(d)
set e[1] = AddSpecialEffectTarget(EFFECTATT,c,"hand right")
set e[2] = AddSpecialEffectTarget(EFFECTATT,c,"hand left")
call SetUnitPosition(c,PolarX(GetUnitX(t),-150,a),PolarY(GetUnitY(t),-150,a))
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,t)
call SaveEffectHandle(HS,GetHandleId(z),2,e[1])
call SaveEffectHandle(HS,GetHandleId(z),3,e[2])
call SaveInteger(HS,GetHandleId(z),0,0)
call SaveReal(HS,GetHandleId(z),1,a)
call TimerStart(z,0.20,true,function TimerExpired)
set c = null
set t = null
set d = null
set e[1] = null
set e[2] = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=86
//TESH.alwaysfold=0
scope Iron initializer init
globals
private constant real DISTANCE = 45
private constant real RADIUS = 180
private constant real MAXDIST = 1600
private constant integer FIREBALL = 'h0E8'
private constant integer FIREBALL2 = 'h001'
private constant integer FIRE = 'h04A'
private constant integer FIRE2 = 'h049'
private constant integer FIRE3 = 'h0E8'
private constant integer FIRE4 = 'h0E7'
private constant integer WAVE = 'h008'
private constant integer WAVE2 = 'h00G'
private constant integer WAVE3 = 'h00K'
private constant integer SPELLID = 'A0D7'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "war3mapImported\\CruiseMissilez.mdx"
private constant string EFFECT3 = "war3mapImported\\RedBomb.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.zmdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5z.mdx"
private constant string EFFECT6 = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
endglobals
private struct data
unit c
unit d
unit e
real a
real time = 2.5
real scale = 3
group go
method destroy takes nothing returns nothing
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
set time = time - 0.04
if time >= 1 then
set scale = scale + 0.2
call EffectUnitColor(c,x,y,a,scale,FIRE3,1.0,255,255,255,255)
call SetUnitPosition(d,x,y)
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
endif
if time <= 0 then
call PauseUnit(c,false)
call RemoveUnit(d)
call RemoveUnit(e)
call ReleaseGroup(go)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
set .go = NewGroup()
call PauseUnit(c,true)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(c),GetUnitY(c)))
set .d = CreateUnit(GetOwningPlayer(.c),FIREBALL,GetUnitX(.c),GetUnitY(.c),.a)
set e = CreateUnit(GetOwningPlayer(.c),FIRE4,GetUnitX(.c),GetUnitY(.c),.a)
call SetUnitAnimation(e,"birth")
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,3.2,FIRE2,1,255,255,255,255)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\ghoko.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope SkyDragonRoar initializer init
globals
private constant real DISTANCE = 70
private constant real CONEPICK = 20
//insert spell id code in object editor
private constant integer SPELLID = 'A0D8'
//put dummy code in object editor of the dummy
private constant integer DUMMY = 'h002'
private constant integer DT = 'h0E8'
private constant integer CYCLONE = 'h0E7'
//effect on the ground of wendy when roars
private constant string EFFECT = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
private hashtable HS = InitHashtable()
endglobals
private function Periodic takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit dt = LoadUnitHandle(HS,GetHandleId(z),0)
call SetUnitTimeScale(dt,0)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endfunction
private function DTSlow takes unit dt returns nothing
local timer z = CreateTimer()
call SetUnitTimeScale(dt,2)
call SaveUnitHandle(HS,GetHandleId(z),0,dt)
call TimerStart(z,0.27,false,function Periodic)
endfunction
private struct data
unit c
unit d
real a
real h = 125
real time = 3
real scale = 0.5
real scale2 = 0.5
group go
integer count = 0
real radius = 0
// insert damage. this mean level of ability x 100 damage. So it will be 100/200/300
method damage takes nothing returns real
local integer i = GetUnitAbilityLevel(c,SPELLID)
local real r = i * 100
return r
endmethod
method destroy takes nothing returns nothing
call RemoveUnit(d)
call GroupClear(go)
call DestroyGroup(go)
call PauseUnit(c,false)
call SetUnitTimeScale(c,1)
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = LoadInteger(HS,GetHandleId(z),0)
local real x = GetUnitX(d) + DISTANCE * Cos(a * bj_DEGTORAD)
local real y = GetUnitY(d) + DISTANCE * Sin(a * bj_DEGTORAD)
local group g = CreateGroup()
local unit v
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
set time = time - 0.04
if time >= 2 then
set scale = scale + 0.1
set scale2 = scale2 + 0.035
set h = h + 5
set count = count + 1
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),CYCLONE,x,y,a)
call SetUnitFlyHeight(bj_lastCreatedUnit,h,0)
call SetUnitScale(bj_lastCreatedUnit,scale,scale,scale)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',3)
if count >= 2 then
set count = 0
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),DT,x,y,a)
call SetUnitFlyHeight(bj_lastCreatedUnit,h,0)
call SetUnitScale(bj_lastCreatedUnit,scale2,scale2,scale2)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',3)
call DTSlow(bj_lastCreatedUnit)
endif
call SetUnitPosition(d,x,y)
set radius = radius + DISTANCE
endif
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),radius + 250,Filter(function data.Boolean))
for v in g
if IsUnitInGroup(v,go) == false and IsUnitType(v,UNIT_TYPE_STRUCTURE) == false and IsUnitEnemy(v,GetOwningPlayer(c)) and GetWidgetLife(v) > 0.45 and GetUnitAbilityLevel(v,'Avul') == 0 and (bj_RADTODEG * Atan2(GetUnitY(v) - GetUnitY(c), GetUnitX(v) - GetUnitX(c)) + 360) - (a + 360) <= CONEPICK and (bj_RADTODEG * Atan2(GetUnitY(v) - GetUnitY(c), GetUnitX(v) - GetUnitX(c)) + 360) - (a + 360) >= -CONEPICK then
call UnitDamageTarget(c,v,.damage(),true,true,null,DAMAGE_TYPE_DIVINE,null)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endfor
call DestroyGroup(g)
if time <= 0 then
call DestroyTimer(z)
call .destroy()
endif
set g = null
endmethod
static method TimerExpired2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = LoadInteger(HS,GetHandleId(z),0)
call SetUnitTimeScale(c,0)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
set .d = CreateUnit(GetOwningPlayer(.c),DUMMY,GetUnitX(.c),GetUnitY(.c),.a)
call SetUnitScale(d,3,3,3)
call TimerStart(z,0.04,true,function data.TimerExpired)
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = CreateTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
set .go = CreateGroup()
call SoundStart("war3mapImported\\ghoko.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call PauseUnit(c,true)
call SetUnitAnimationByIndex(c,8)
call SaveInteger(HS,GetHandleId(z),0,this)
call TimerStart(z,1.7,false,function data.TimerExpired2)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),bj_RADTODEG * Atan2(GetSpellTargetY() - GetUnitY(GetTriggerUnit()), GetSpellTargetX() - GetUnitX(GetTriggerUnit())))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope IronShadowDragonRoar initializer init
globals
private constant real DISTANCE = 38
private constant real MAXDIST = 1600
private constant integer SPELLID = 'A0D9'
private constant integer REDHARVEST = 'h08O'
private constant integer XANXUSMISSILE3 = 'h0EA'
private constant integer LAXUSSPARK = 'h0E9'
private constant integer YELLOWGROUNDAURA = 'h08O'
private constant integer HEALINGWIND = 'h049'
private constant string EFFECT = "war3mapImported\\YellowNeutralBuildingExplosion.mdx"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl"
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2z.mdx"
endglobals
private struct data
unit c
unit d
real a
real h = 75
real h2 = 75
real time = 5
real scale = 1.5
real scale2 = 1.5
real radius = 200
integer count = 0
group go
method destroy takes nothing returns nothing
call PauseUnit(c,false)
call SetUnitTimeScale(c,1)
call RemoveUnit(d)
call ReleaseGroup(go)
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(d),DISTANCE,a)
local real y = PolarY(GetUnitY(d),DISTANCE,a)
local group g = NewGroup()
local unit v
local real r = (GetUnitAbilityLevel(c,SPELLID) * 15) * GetHeroStr(c,true)
set time = time - 0.04
if time >= 3 then
if scale <= 8 then
set scale = scale + 0.07
endif
if scale <= 7.5 then
set scale2 = scale2 + 0.10
endif
set radius = radius + DISTANCE
set h = h + 7
set h2 = h2 + 7
set count = count + 1
call SetUnitPosition(d,x,y)
call EffectUnitColor(c,x,y,a,scale,XANXUSMISSILE3,1,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,h,0)
if count == 1 then
call EffectUnitColor(c,x,y,a,scale2,LAXUSSPARK,4,255,255,255,205)
call SetUnitFlyHeight(bj_lastCreatedUnit,h2,0)
else
set count = 0
endif
endif
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),radius,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and (Angle(GetUnitX(c),GetUnitY(c),GetUnitX(v),GetUnitY(v)) + 360) - (a + 360) <= 20 and (Angle(GetUnitX(c),GetUnitY(c),GetUnitX(v),GetUnitY(v)) + 360) - (a + 360) >= -20 and IsUnitInGroup(v,go) == false then
call UnitDamageTarget(c,v,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
call GroupAddUnit(go,v)
endif
call GroupRemoveUnit(g,v)
endloop
if time <= 0 then
call ReleaseTimer(z)
call .destroy()
endif
call ReleaseGroup(g)
set g = null
set z = null
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
call PauseUnit(c,true)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,1.8,REDHARVEST,2.5,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,1.8,REDHARVEST,2.5,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(c),GetUnitY(c)))
call TriggerSleepAction(2)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(c),GetUnitY(c)))
call SetUnitTimeScale(c,0.2)
call ShakeGroupCamera(5,GetUnitX(c),GetUnitY(c),1800,15)
set .go = NewGroup()
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
set .d = CreateUnit(GetOwningPlayer(.c),LAXUSSPARK,GetUnitX(.c),GetUnitY(.c),.a)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call SoundStart("war3mapImported\\ghoko.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call SetUnitTimeScale(GetTriggerUnit(),0)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),270,5,YELLOWGROUNDAURA,3,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,0)
call EffectUnitColor(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()),2,HEALINGWIND,3,255,255,255,255)
call data.create(GetTriggerUnit(),Angle(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetSpellTargetX(),GetSpellTargetY()))
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=63
//TESH.alwaysfold=0
scope TetsuKen initializer init
globals
private constant real DISTANCE = 38
private constant real RADIUS = 350
private constant integer SPELLID = 'A0E3'
private constant integer ICENOVA = 'h00S'
private constant integer LIGHTNING = 'h00R'
private constant integer LIGHTNING2 = 'h00Q'
private constant integer LIGHTNING3 = 'h00A'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl2"
private constant string EFFECT3 = "war3mapImported\\YellowBoom.mdx2"
private constant string EFFECT4 = "war3mapImported\\lightning boom2.mdx2"
private constant string EFFECT5 = "war3mapImported\\BigExplosionBlue.mdx2"
private constant integer EFFECTID = 'A000'
private constant string EFFECT6 = "war3mapImported\\Holy_Fire_Slam2z.mdx"
endglobals
private struct data
unit c
unit t
integer animate = 0
method destroy takes nothing returns nothing
call UnitRemoveAbility(c,EFFECTID)
call .deallocate()
endmethod
static method FinalTimer takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = (GetUnitAbilityLevel(c,SPELLID) * 3) * GetHeroStr(c,true)
local integer i = 0
local real x
local real y
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
call ShakeGroupCamera(0.6,GetUnitX(c),GetUnitY(c),700,12)
call UnitDamageTarget(c,t,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.5,ICENOVA,1,255,255,55,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5,'h00A',1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),5,'h01O',1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.3,'h0B4',1,255,255,55,55)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),2.5,'h00A',1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),1.2,'h0B7',1,255,255,255,155)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),4,'h01O',1,255,255,255,255)
call SoundStart("war3mapImported\\GiganEfek.mp3",GetUnitX(t),GetUnitY(t))
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetUnitFacing(c),1,'h0CV',1,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.3)
call SlideUnitAngle(t,20,0.8,a,EFFECT3)
call PauseUnit(c,false)
call SetUnitPathing(c,true)
call PauseUnit(t,false)
call ReleaseTimer(z)
call .destroy()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
if Distance(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t)) <= 1800 then
set x = PolarX(GetUnitX(c),DISTANCE,a)
set y = PolarY(GetUnitY(c),DISTANCE,a)
call SetUnitPosition(c,x,y)
set animate = animate + 1
if animate >= 13 then
set animate = 0
call SetUnitAnimationByIndex(c,1)
endif
if Distance(x,y,GetUnitX(t),GetUnitY(t)) <= 120 then
call PauseUnit(t,true)
call SetUnitAnimation(c,"spell one")
call TimerStart(z,0.3,false,function data.FinalTimer)
endif
else
call PauseUnit(c,false)
call SetUnitPathing(c,true)
call PauseUnit(t,false)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 0
local real x
local real y
local real a = Angle(GetUnitX(caster),GetUnitY(caster),GetUnitX(target),GetUnitY(target))
set .c = caster
set .t = target
call PauseUnit(.c,true)
call SetUnitAnimation(c,"spell one")
call SetUnitPathing(.c,false)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,5,LIGHTNING3,3,255,255,255,255)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,0)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2,'h049',3,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,1.7,'h0F9',3,255,255,255,155)
call SetUnitTimeScale(bj_lastCreatedUnit,0.5)
call UnitAddAbility(c,EFFECTID)
call SetUnitTimeScale(.c,2.5)
call SoundStart("war3mapImported\\Goken.mp3",GetUnitX(c),GetUnitY(c))
call TriggerSleepAction(1.2)
call SetTimerData(z,this)
call TimerStart(z,0.04,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Karma initializer init
globals
private constant real DISTANCE = 15
private constant real RADIUS = 250
private constant real MAXDIST = 1600
private constant integer WAVE = 'h0FD'
private constant integer GURA = 'h0FA'
private constant integer STONE = 'h0FB'
private constant integer HOWL = 'h0FC'
private constant integer SPELLID = 'A0E4'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT3 = "war3mapImported\\SuperBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\NewMassiveEX.mdx"
private constant string EFFECT5 = "war3mapImported\\NuclearExplosion5.mdx"
private constant string EFFECT6 = "war3mapImported\\SuperBigExplosion.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
local integer i = 1
local group g
local real x
local real y
local unit v
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 2) + 10) * GetHeroStr(c,true)
local group ignore = NewGroup()
call PauseUnit(c,true)
call SetUnitAnimation(c,"spell")
call SoundStart("war3mapImported\\GajeelStart.mp3",GetUnitX(c),GetUnitY(c))
set x = PolarX(GetUnitX(c),-200,a + 45)
set y = PolarY(GetUnitY(c),-200,a + 45)
call EffectUnitColor(c,x,y,a,3.5,GURA,1,125,125,255,255)
set x = PolarX(GetUnitX(c),-200,a - 45)
set y = PolarY(GetUnitY(c),-200,a - 45)
call EffectUnitColor(c,x,y,a,3.5,GURA,1,125,125,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,2.5,HOWL,1,225,225,255,255)
call DustWave(0.4,0.13,1.0,20,GetUnitX(c),GetUnitY(c),255,255,255,30)
call SoundStart("war3mapImported\\GajeelEND.mp3",GetUnitX(c),GetUnitY(c))
call PolledWait(1.)
loop
exitwhen i >= 15
set x = PolarX(GetUnitX(c),i * 180,a)
set y = PolarY(GetUnitY(c),i * 180,a)
call EffectUnitColor(c,x,y,GetUnitFacing(c),3,WAVE,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),2,STONE,1,255,255,255,255)
call EffectUnitColor(c,x,y,GetUnitFacing(c),2,ICENOVA,1,255,255,255,255)
set g = NewGroup()
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function PickUnit))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if IsUnitInGroup(v,ignore) == false then
call DamageTarget(c,v,r,NINJUTSU_DAMAGE)
call ImpaleUnit(v,1)
call SetUnitAnimation(v,"death")
call GroupAddUnit(ignore,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set i = i + 1
endloop
call ReleaseGroup(ignore)
call PauseUnit(c,false)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=84
//TESH.alwaysfold=0
scope VopalStrike initializer init
globals
private constant real DISTANCE = 15
private constant real RADIUS = 350
private constant integer FIRE = 'h09R'
private constant integer SPELLID = 'A0B3'
private constant integer EFFECTID = 'A0B4'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
private constant string EFFECT6 = "war3mapImported\\Dead Spirit by Deckai.mdx"
endglobals
private struct data
unit c
real a
real time = 2
integer cal = 0
group go
method destroy takes nothing returns nothing
call UnitRemoveAbility(c,EFFECTID)
call .deallocate()
endmethod
static method Boolean takes nothing returns boolean
return true
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(c),DISTANCE,a)
local real y = PolarY(GetUnitY(c),DISTANCE,a)
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
local group g = NewGroup()
local unit v
set time = time - 0.02
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitX(c,x)
call SetUnitY(c,y)
endif
call GroupEnumUnitsInRange(g,x,y,RADIUS,Filter(function data.Boolean))
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,go) == false then
call DamageTarget(c,v,r,TAIJUTSU_DAMAGE)
call GroupAddUnit(go,v)
call SetUnitAnimation(v,"death")
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
set cal = cal + 1
if cal >= 12 then
set cal = 0
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h09S',GetUnitX(c),GetUnitY(c),a + 100)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a + 100,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h09S',GetUnitX(c),GetUnitY(c),a + 80)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a + 80,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h09S',GetUnitX(c),GetUnitY(c),a - 100)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a - 100,"")
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h09S',GetUnitX(c),GetUnitY(c),a - 80)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',0.4)
call SlideUnitAngle(bj_lastCreatedUnit,15,0.4,a - 80,"")
call SetUnitAnimation(c,"Attack Alternate - 4")
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(c),GetUnitY(c)))
endif
if time <= 0 then
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call PauseUnit(c,false)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call ReleaseGroup(go)
call .destroy()
endif
endmethod
static method create takes unit caster, real angle returns thistype
local timer z = NewTimer()
local data this = data.allocate()
set .c = caster
set .a = angle
set .go = NewGroup()
call SetTimerData(z,this)
call TimerStart(z,0.02,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\KiritoWhak1.mp3",GetUnitX(c),GetUnitY(c))
endif
call UnitAddAbility(c,EFFECTID)
call PauseUnit(c,true)
call SetUnitTimeScale(c,3)
call data.create(c,a)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=60
//TESH.alwaysfold=0
scope TheEclipse initializer init
globals
private constant integer SPELLID = 'A0BL'
private constant string EFFECT = "war3mapImported\\Shockwave(Blue).mdx"
private constant string EFFECT2 = "war3mapImported\\LightningNova.mdx"
private constant string EFFECT3 = "war3mapImported\\Dead Spirit by Deckai2.mdx"
private constant string EFFECT4 = "war3mapImported\\effect_ReiatsuOverFlowbyDeckai.mdx"
private constant string EFFECT5 = "war3mapImported\\ArcaneExplosion.mdx"
private constant string EFFECT6 = "war3mapImported\\BlueCharge3.mdx"
endglobals
private function Periodic takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local integer int = LoadInteger(HS,GetHandleId(z),0)
local real a = LoadReal(HS,GetHandleId(z),1)
local real r = GetRandomReal(45,55)
local real x = PolarX(GetUnitX(c),r,a)
local real y = PolarY(GetUnitY(c),r,a)
set int = int + 1
call SetUnitX(c,x)
call SetUnitY(c,y)
call SaveInteger(HS,GetHandleId(z),0,int)
if int >= 6 then
call SetUnitAnimation(t,"death")
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set c = null
set t = null
endfunction
private function PlayAnimation takes unit caster, unit target, real ang, string anim, real time returns nothing
local timer z = CreateTimer()
call SetUnitAnimationByIndex(caster,15)
call SoundStart("war3mapImported\\SlashKirito.mp3",GetUnitX(caster),GetUnitY(caster))
call SaveUnitHandle(HS,GetHandleId(z),0,caster)
call SaveUnitHandle(HS,GetHandleId(z),1,target)
call SaveInteger(HS,GetHandleId(z),0,0)
call SaveReal(HS,GetHandleId(z),1,ang)
call TimerStart(z,0.04,true,function Periodic)
set z = null
endfunction
private struct data
unit c
unit t
integer count = 0
effect e
real time = 0.3
real dist
method damage takes nothing returns real
return I2R ( GetHeroAgi(c,true) * 10 )
endmethod
method destroy takes nothing returns nothing
call PauseUnit(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(c,false)
call SetUnitInvulnerable(t,false)
call UnitDamageTarget(c,t,.damage(),true,true,null,DAMAGE_TYPE_DIVINE,null)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
call DestroyEffect(e)
call .deallocate()
endmethod
static method periodic3 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
call SetUnitAnimation(c,"stand alternate")
call ReleaseTimer(z)
call .destroy()
set z = null
endmethod
static method periodic4 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 2) + 6) * GetHeroAgi(c,true)
call SoundStart("war3mapImported\\KiritoWhak3.mp3",GetUnitX(c),GetUnitY(c))
call ShakeGroupCamera(2,GetUnitX(c),GetUnitY(c),1000,12)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),270,2.5,'h0AH',2,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),270,4,'h0AB',0.5,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(t),GetUnitY(t)))
call TimerStart(z,1,false,function data.periodic3)
endmethod
static method periodic takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = GetRandomReal(0,360)
local real xx = PolarX(GetUnitX(t),GetRandomReal(90,150),r)
local real yy = PolarY(GetUnitY(t),GetRandomReal(90,150),r)
local real a
set time = time - 0.02
if time <= 0 then
set time = 0.3
call SetUnitPosition(c,xx,yy)
set a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
call PlayAnimation(c,t,r + 180,"attack alternate",0.3)
call SetUnitFacing(c,a)
set count = count + 1
if count >= 19 then
set a = Angle(GetUnitX(t),GetUnitY(t),GetUnitX(c),GetUnitY(c))
call SetUnitFacing(c,a)
call SetUnitTimeScale(c,0.5)
call SetUnitAnimation(c,"spell slam")
call TimerStart(z,1.15,false,function data.periodic4)
endif
endif
set z = null
endmethod
static method periodic2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = GetRandomReal(0,360)
local real x = PolarX(GetUnitX(t),150,r)
local real y = PolarY(GetUnitY(t),150,r)
call SetUnitTimeScale(c,1.5)
call SetUnitPosition(c,x,y)
call SetUnitFacing(c,r + 180)
call PlayAnimation(c,t,r + 180,"attack alternate",0.3)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call TimerStart(z,0.02,true,function data.periodic)
set z = null
endmethod
static method create takes unit caster, unit target returns data
local data this = data.allocate()
local timer z = CreateTimer()
set c = caster
set t = target
call PauseUnit(c,true)
call PauseUnit(t,true)
call SetUnitInvulnerable(c,true)
call SetUnitInvulnerable(t,true)
call SetUnitPathing(c,false)
call SetUnitAnimation(c,"spell one")
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(c),GetUnitY(c)))
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,4,'h0AD',0.5,255,255,255,155)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,4,'h0AC',0.5,255,255,255,155)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call SoundStart("war3mapImported\\KiritoWhak2.mp3",GetUnitX(c),GetUnitY(c))
call SetTimerData(z,this)
call TimerStart(z,0.5,true,function data.periodic2)
set z = null
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
call data.create(c,t)
set c = null
set t = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope SonicLeap initializer init
globals
private constant integer SPELLID = 'A0BJ'
private constant string EFFECT = "war3mapImported\\Shockwave(Blue).mdx"
private constant string EFFECT2 = "war3mapImported\\LightningNova.mdx"
private constant string EFFECT3 = "war3mapImported\\Dead Spirit by Deckai2.mdx"
private constant string EFFECT4 = "war3mapImported\\effect_ReiatsuOverFlowbyDeckai.mdx"
private constant string EFFECT5 = "war3mapImported\\Shockwave Blue.mdx"
endglobals
private struct data
unit c
integer count = 0
real time = 0.2
real a
method destroy takes nothing returns nothing
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
call .deallocate()
endmethod
static method periodic takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real x = PolarX(GetUnitX(c),120,a)
local real y = PolarY(GetUnitY(c),120,a)
local real r = GetUnitAbilityLevel(c,SPELLID) * 100
set time = time - 0.02
set count = count + 1
if count >= 1 then
set count = 0
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,1,'h0AF',0.5,255,255,255,55)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,3,'h0AD',0.5,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
endif
if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY) == false then
call SetUnitPosition(c,x,y)
endif
if time <= 0 then
call ReleaseTimer(z)
call .destroy()
endif
set z = null
endmethod
static method periodic2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
call SetUnitTimeScale(c,2.5)
call SetUnitAnimationByIndex(c,5)
call SoundStart("war3mapImported\\KiritoWhak2.mp3",GetUnitX(c),GetUnitY(c))
call TimerStart(z,0.02,true,function data.periodic)
set z = null
endmethod
static method create takes unit caster, real angle returns data
local data this = data.allocate()
local timer z = CreateTimer()
set c = caster
set a = angle
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call SetUnitPathing(c,false)
call SetUnitAnimation(c,"stand ready")
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,4,'h0AD',0.5,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call SoundStart("war3mapImported\\SwordCharge2.mp3",GetUnitX(c),GetUnitY(c))
call SetTimerData(z,this)
call TimerStart(z,0.75,true,function data.periodic2)
set z = null
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real a = Angle(GetUnitX(c),GetUnitY(c),GetSpellTargetX(),GetSpellTargetY())
call data.create(c,a)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Spell2 initializer init
globals
private constant integer SPELLID = 'A0AZ'
private constant string EFFECT = "war3mapImported\\Shockwave(Blue).mdx"
private constant string EFFECT2 = "war3mapImported\\LightningNova.mdx"
private constant string EFFECT3 = "war3mapImported\\Dead Spirit by Deckai2.mdx"
private constant string EFFECT4 = "war3mapImported\\Dead Spirit by Deckai.mdx"
private constant string EFFECT5 = "war3mapImported\\DT.mdx"
private constant string EFFECT6 = "war3mapImported\\Dead Spirit by Deckai.mdx"
endglobals
private function Periodic takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
call SetUnitAnimation(t,"death")
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
set c = null
set t = null
endfunction
private function PlayAnimation takes unit caster, unit target, integer value, real time returns nothing
local timer z = CreateTimer()
call SetUnitAnimationByIndex(caster,value)
call SoundStart("war3mapImported\\SlashKiritoz.mp3",GetUnitX(caster),GetUnitY(caster))
call SaveUnitHandle(HS,GetHandleId(z),0,caster)
call SaveUnitHandle(HS,GetHandleId(z),1,target)
call TimerStart(z,time,false,function Periodic)
set z = null
endfunction
private struct data
unit c
unit t
integer count = 0
effect e
real time = 0.6
real dist
method damage takes nothing returns real
return I2R ( GetHeroAgi(c,true) * 15 )
endmethod
method destroy takes nothing returns nothing
call PauseUnit(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(c,false)
call SetUnitInvulnerable(t,false)
call UnitDamageTarget(c,t,.damage(),true,true,null,DAMAGE_TYPE_DIVINE,null)
call SetUnitPathing(c,true)
call SetUnitTimeScale(c,1)
call DestroyEffect(e)
call .deallocate()
endmethod
static method periodic4 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real xx = PolarX(GetUnitX(c),dist,a)
local real yy = PolarY(GetUnitY(c),dist,a)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,1,'h0AF',0.5,255,255,255,55)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,3,'h0AD',0.5,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call SetUnitPosition(c,xx,yy)
if Distance(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t)) <= 140 then
call ShakeGroupCamera(1,GetUnitX(c),GetUnitY(c),1000,12)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),270,4,'h0AB',0.5,255,255,255,255)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),270,2.5,'h0AH',2.5,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method periodic3 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
set dist = Distance(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t)) / 5
call SetUnitTimeScale(c,1)
call TimerStart(z,0.02,true,function data.periodic4)
endmethod
static method periodic takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real xx = PolarX(GetUnitX(t),20,a)
local real yy = PolarY(GetUnitY(t),20,a)
local real x
local real y
local integer int
call SetUnitFacing(c,a)
set time = time - 0.02
if time <= 0 then
if count == 0 then
call SoundStart("war3mapImported\\KiritoWhak2z.mp3",GetUnitX(c),GetUnitY(c))
endif
if count == 9 then
call SoundStart("war3mapImported\\KiritoWhak1z.mp3",GetUnitX(c),GetUnitY(c))
endif
if count == 3 then
call SoundStart("war3mapImported\\KiritoFast1z.mp3",GetUnitX(c),GetUnitY(c))
endif
if count == 14 then
call SoundStart("war3mapImported\\KiritoFast2z.mp3",GetUnitX(c),GetUnitY(c))
endif
if count >= 4 and count <= 15 then
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetRandomReal(0,360),1.75,'h0AK',1,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,0.5)
call SetUnitFlyHeight(bj_lastCreatedUnit,100,0)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetRandomReal(0,360),2.5,'h0AK',1,255,255,255,45)
call SetUnitFlyHeight(bj_lastCreatedUnit,100,0)
if count == 15 then
call SetUnitTimeScale(c,1.5)
endif
set time = 0.34
elseif count < 4 then
set time = 0.5
elseif count > 15 then
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetRandomReal(0,360),2,'h0AK',1,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,1.5)
call SetUnitFlyHeight(bj_lastCreatedUnit,100,0)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,1.5,'h0AL',1,255,255,255,255)
call SetUnitTimeScale(bj_lastCreatedUnit,1.5)
call SetUnitFlyHeight(bj_lastCreatedUnit,0,0)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetRandomReal(0,360),3,'h0AK',1,255,255,255,45)
call SetUnitFlyHeight(bj_lastCreatedUnit,100,0)
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),GetRandomReal(0,360),2,'h0AG',1,255,255,255,155)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
if count == 16 then
call SetUnitTimeScale(c,2)
endif
set time = 0.25
endif
set int = GetRandomInt(12,17)
if int == 12 then
set int = 11
endif
if count < 29 then
call SetUnitPosition(t,xx,yy)
set x = PolarX(GetUnitX(t),120,a + 180)
set y = PolarY(GetUnitY(t),120,a + 180)
call SetUnitPosition(c,x,y)
call PlayAnimation(c,t,int,time)
elseif count == 29 then
set e = AddSpecialEffectTarget(EFFECT6,c,"weapon")
set time = 0.7
call SetUnitTimeScale(c,1)
call SetUnitAnimation(c,"attack alternate")
endif
if count >= 30 then
call SoundStart("war3mapImported\\SwordSlash2.mp3",GetUnitX(c),GetUnitY(c))
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call EffectUnitColor(c,GetUnitX(t),GetUnitY(t),270,0.25,'h0AI',0.5,255,255,255,255)
call SlideUnitAngle(t,0,0.0,a,"")
call SetUnitTimeScale(c,0.2)
call SetUnitAnimation(c,"attack alternate 4")
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,4,'h0AD',2.2,255,255,255,155)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,4,'h0AC',2.2,255,255,255,155)
call SetUnitTimeScale(bj_lastCreatedUnit,3)
call SoundStart("war3mapImported\\KiritoWhak3z.mp3",GetUnitX(c),GetUnitY(c))
call TimerStart(z,1.7,false,function data.periodic3)
endif
set count = count + 1
endif
set z = null
endmethod
static method periodic2 takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
local real x = PolarX(GetUnitX(t),120,a + 180)
local real y = PolarY(GetUnitY(t),120,a + 180)
call SetUnitPosition(c,x,y)
call SetUnitFacing(c,a)
call PlayAnimation(c,t,GetRandomInt(13,16),0.6)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call TimerStart(z,0.02,true,function data.periodic)
set z = null
endmethod
static method create takes unit caster, unit target returns data
local data this = data.allocate()
local timer z = CreateTimer()
set c = caster
set t = target
call PauseUnit(c,true)
call PauseUnit(t,true)
call SetUnitInvulnerable(c,true)
call SetUnitInvulnerable(t,true)
call SetUnitPathing(c,false)
call SetUnitAnimation(c,"spell two")
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(c),GetUnitY(c)))
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),270,4,'h0AD',2.0,255,255,255,155)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),180,4,'h0AN',1.5,255,255,255,155)
call SetUnitTimeScale(bj_lastCreatedUnit,2)
call SoundStart("war3mapImported\\Star.mp3",GetUnitX(c),GetUnitY(c))
call ShakeGroupCamera(15.0,GetUnitX(c),GetUnitY(c),800,25)
call SetTimerData(z,this)
call TimerStart(z,3.5,true,function data.periodic2)
set z = null
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
call data.create(c,t)
set c = null
set t = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Switch initializer init
globals
private constant integer SPELLID = 'A0BI'
private constant string EFFECT = "war3mapImported\\Shockwave(Blue).mdx"
private constant string EFFECT2 = "war3mapImported\\LightningNova.mdx"
private constant string EFFECT3 = "war3mapImported\\Dead Spirit by Deckai2.mdx"
private constant string EFFECT4 = "Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl"
private constant string EFFECT5 = "war3mapImported\\ArcaneExplosion.mdx"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local real x
local real y
local real xx
local real yy
if IsUnitPaused(t) then
call IssueImmediateOrder(c,"stop")
else
set x = GetUnitX(c)
set y = GetUnitY(c)
set xx = GetUnitX(t)
set yy = GetUnitY(t)
call SetUnitPosition(t,0,0)
call SetUnitPosition(c,xx,yy)
call SetUnitFacing(c,GetUnitFacing(t))
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(c),GetUnitY(c)))
call SetUnitPosition(t,x,y)
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT4,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call SoundStart("war3mapImported\\Switch.mp3",GetUnitX(c),GetUnitY(c))
endif
set c = null
set t = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=17
//TESH.alwaysfold=0
scope FireDragonFistz initializer init
globals
private constant integer SPELLID = 'A0B7'
private constant string EFFECTATT = "Abilities\\Weapons\\SerpentWardMissile\\SerpentWardMissile.mdl"
private constant string EFFECT2 = "war3mapImported\\AncientExplode(Blue).mdx"
private constant string EFFECT3 = "war3mapImported\\DT.mdx"
private constant string EFFECT7 = "war3mapImported\\FreezingRing.mdx.mdx"
private constant string EFFECT5 = "war3mapImported\\fireworkswhite.mdxx"
private constant string EFFECT4 = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
private constant string EFFECT6 = "war3mapImported\\Dead Spirit by Deckai.mdx"
private constant string EFFECT8 = "war3mapImported\\Dead Spirit by Deckai.mdx"
private constant integer FIRE2 = 'h09N'
private constant integer FIRE3 = 'h09O'
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(HS,GetHandleId(z),0)
local unit t = LoadUnitHandle(HS,GetHandleId(z),1)
local integer count = LoadInteger(HS,GetHandleId(z),0)
local real a = LoadReal(HS,GetHandleId(z),1)
local real r = ((GetUnitAbilityLevel(c,SPELLID) * 1) + 0) * GetHeroAgi(c,true)
local unit d
local real random = GetRandomReal(-45,45)
set count = count + 1
if t == null then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
if count >= 30 then
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call PauseUnit(t,false)
call SetUnitInvulnerable(t,false)
call SetUnitTimeScale(c,1)
call SlideUnitAngle(t,15,0.5,a,"")
call DamageTarget(c,t,r,TAIJUTSU_DAMAGE)
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT3,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT7,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),2))
call DestroyEffect(LoadEffectHandle(HS,GetHandleId(z),3))
call ReleaseTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
call SaveInteger(HS,GetHandleId(z),0,count)
call SetUnitAnimation(c,"Attack - 1")
call SetUnitAnimation(t,"Attack - 2")
call DestroyEffect(AddSpecialEffect(EFFECT8,GetUnitX(t),GetUnitY(t)))
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h09P',GetUnitX(c),GetUnitY(c),a + random)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1.3)
call SlideUnitAngle(bj_lastCreatedUnit,2,2.2,a + random,"")
call EffectUnitColor(c,PolarX(GetUnitX(t),-170,a),PolarX(GetUnitY(t),-170,a),a,GetRandomReal(0.4,1.7),'h09Q',1,255,255,255,255)
endif
endif
set c = null
set t = null
set d = null
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local integer i = 0
local timer z = NewTimer()
local effect array e
local real a = Angle(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
if GetUnitTypeId(c) != KAKASHI then
call SoundStart("war3mapImported\\KiritoFast2.mp3",GetUnitX(c),GetUnitY(c))
endif
call PauseUnit(c,true)
call SetUnitInvulnerable(c,true)
call PauseUnit(t,true)
call SetUnitInvulnerable(t,true)
call SetUnitTimeScale(c,3)
call ShakeGroupCamera(4.0,GetUnitX(c),GetUnitY(c),800,25)
set e[1] = AddSpecialEffectTarget(EFFECTATT,c,"hand right")
set e[2] = AddSpecialEffectTarget(EFFECTATT,c,"hand left")
call EffectUnitColor(c,GetUnitX(c),GetUnitY(c),a,4,FIRE2,4.5,255,255,255,255)
call SetUnitPosition(c,PolarX(GetUnitX(t),-120,a),PolarY(GetUnitY(t),-120,a))
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call SaveUnitHandle(HS,GetHandleId(z),1,t)
call SaveEffectHandle(HS,GetHandleId(z),2,e[1])
call SaveEffectHandle(HS,GetHandleId(z),3,e[2])
call SaveInteger(HS,GetHandleId(z),0,0)
call SaveReal(HS,GetHandleId(z),1,a)
call TimerStart(z,0.14,true,function TimerExpired)
set c = null
set t = null
set e[1] = null
set e[2] = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope MoonGlimpsez initializer init
globals
private constant real RADIUS = 350
private constant integer SPELLID = 'A0B5'
private constant integer MAXHIT = 26
private constant string EFFECT = "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl"
private constant string EFFECT2 = "war3mapImported\\Dead Spirit by Deckai.mdx"
private constant string EFFECT3 = "war3mapImported\\BlueBigExplosion.mdx"
private constant string EFFECT4 = "war3mapImported\\FreezingRing.mdx"
private constant string EFFECT5 = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
endglobals
private struct data
unit c
unit t
integer hit = 0
effect e
method destroy takes nothing returns nothing
call DestroyEffect(e)
call .deallocate()
endmethod
static method TimerExpired takes nothing returns nothing
local timer z = GetExpiredTimer()
local data this = GetTimerData(z)
local real r = GetRandomReal(0,360)
local real x = PolarX(GetUnitX(t),120,r)
local real y = PolarY(GetUnitY(t),120,r)
local integer i = 0
local real dam = GetUnitAbilityLevel(c,SPELLID) * 15
local real a = Angle(x,y,GetUnitX(t),GetUnitY(t))
call SetUnitPosition(c,x,y)
call DestroyEffect(AddSpecialEffect(EFFECT,x,y))
call DestroyEffect(AddSpecialEffect(EFFECT2,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect(EFFECT5,x,y))
call SetUnitAnimation(c,"Attack Alternate - 1")
call SetUnitFacing(c,a)
call DamageTarget(c,t,dam,TAIJUTSU_DAMAGE)
set hit = hit + 1
if hit >= MAXHIT then
call PauseUnit(.c,false)
call SetUnitInvulnerable(c,false)
call SetUnitPathing(.c,true)
call SetUnitTimeScale(c,1)
call ReleaseTimer(z)
call .destroy()
endif
endmethod
static method create takes unit caster, unit target returns thistype
local timer z = NewTimer()
local data this = data.allocate()
local integer i = 0
local real x
local real y
local real a = Angle(GetUnitX(caster),GetUnitY(caster),GetUnitX(target),GetUnitY(target))
set .c = caster
set .t = target
set e = AddSpecialEffectTarget("war3mapImported\\ice2.mdx",c,"weapon")
call PauseUnit(.c,true)
call SetUnitPathing(.c,false)
call SetUnitTimeScale(c,5)
call SetTimerData(z,this)
call TimerStart(z,0.15,true,function data.TimerExpired)
return this
endmethod
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit()) != KAKASHI then
call SoundStart("war3mapImported\\Kiritocombo.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endif
call data.create(GetTriggerUnit(),GetSpellTargetUnit())
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=21
//TESH.alwaysfold=0
scope needleass initializer init
globals
private real needledamage
endglobals
private function checkdamage takes nothing returns boolean
return GetUnitTypeId(GetEventDamageSource()) == 'h06T'
endfunction
private function dodamage takes nothing returns nothing
local unit c = GetEventDamageSource()
local unit t = GetTriggerUnit()
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(c),'h06W',GetUnitX(t),GetUnitY(t),0)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',1)
call DestroyTrigger(GetTriggeringTrigger())
call UnitDamageTarget(c,t,needledamage,true,true,null,DAMAGE_TYPE_DIVINE,null)
set c = null
set t = null
endfunction
private function Trig_Needle_Assault_J_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A07H'
endfunction
private function Trig_Needle_Assault_J_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local real x = GetUnitX(t)
local real y = GetUnitY(t)
local real xx
local real yy
local integer inn = 1
local trigger v = CreateTrigger()
local unit d
call SoundStart("war3mapImported\\HibariWarp2.mp3",x,y)
set needledamage = (GetUnitAbilityLevel(c,'A07H') + 2) * GetHeroAgi(c,true)
loop
exitwhen inn > 2
set xx = PolarX(x,500,inn * 180)
set yy = PolarY(y,500,inn * 180)
set d = CreateUnit(GetOwningPlayer(c),'h06T',xx,yy,bj_UNIT_FACING)
call UnitAddAbility(d,'A07M')
call IssueTargetOrder(d,"thunderbolt",t)
call UnitApplyTimedLife(d,'BTLF',1)
set inn = inn + 1
endloop
call TriggerRegisterUnitEvent(v,t,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(v,Condition(function checkdamage))
call TriggerAddAction(v,function dodamage)
set c = null
set t = null
set d = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition(t, Condition( function Trig_Needle_Assault_J_Conditions ) )
call TriggerAddAction(t, function Trig_Needle_Assault_J_Actions )
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Hibari_Kill_Conditions takes nothing returns boolean
return IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true and GetUnitTypeId(GetKillingUnit()) == 'H063'
endfunction
function Trig_Hibari_Kill_Actions takes nothing returns nothing
call SoundStart("war3mapImported\\Hibarikill1.mp3",GetUnitX(GetKillingUnit()),GetUnitY(GetKillingUnit()))
endfunction
//===========================================================================
function InitTrig_Hibari_kill takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition(t, Condition( function Trig_Hibari_Kill_Conditions ) )
call TriggerAddAction(t, function Trig_Hibari_Kill_Actions )
endfunction
//TESH.scrollpos=21
//TESH.alwaysfold=0
scope xstream initializer Init
globals
private constant integer SPELLID = 'A076'
private constant integer SPELLFLY = 'A078'
private constant string FIRE = "war3mapImported\\XStream.mdx"
private constant string EFFECTFIRE = "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl"
private constant real TIMEWAIT = 1
private constant real TIMEFLY = 300
private constant real TIMER = 0.01
endglobals
private function Trig_XStream_Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function move takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(udg_HashGame,0,GetHandleId(z))
local unit t = LoadUnitHandle(udg_HashGame,1,GetHandleId(z))
local real v = LoadReal(udg_HashGame,0,GetHandleId(z))
local real j = bj_RADTODEG * Atan2(GetUnitY(c)-GetUnitY(t),GetUnitX(c)-GetUnitX(t))
local real a = j + 3
local real x = PolarX(GetUnitX(t),v,a)
local real y = PolarY(GetUnitY(t),v,a)
call SetUnitPosition(c,x,y)
call SetUnitAnimation(c,"walk alternate")
call SetUnitFacing(c,j + 150)
set c = null
set t = null
set z = null
endfunction
private function Trig_XStream_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local real x = GetUnitX(t)
local real y = GetUnitY(t)
local timer z = CreateTimer()
local effect e
local effect f
local real a = distancebetweenpoints(GetUnitX(c),GetUnitY(c),x,y)
call SoundStart("war3mapImported\\XStream.mp3",GetUnitX(c),GetUnitY(c))
call UnitAddAbility(c,SPELLFLY)
call UnitRemoveAbility(c,SPELLFLY)
call SetUnitPathing(c,false)
call PauseUnit(t,true)
call PauseUnit(c,true)
call SetUnitInvulnerable(c, true)
set e = AddSpecialEffect(FIRE,x,y)
set f = AddSpecialEffectTarget(EFFECTFIRE,c,"origin")
call SaveUnitHandle(udg_HashGame,0,GetHandleId(z),c)
call SaveUnitHandle(udg_HashGame,1,GetHandleId(z),t)
call SaveReal(udg_HashGame,0,GetHandleId(z),a)
call TimerStart(z,TIMER,true,function move)
call SetUnitFlyHeight(c,300,TIMEFLY)
call TriggerSleepAction(TIMEWAIT)
call SetUnitFlyHeight(c,0,TIMEFLY)
call TriggerSleepAction(TIMEWAIT)
call SetUnitFlyHeight(c,0,0)
call PauseTimer(z)
call DestroyTimer(z)
call DestroyEffect(f)
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call UnitDamageTarget(c,t,GetUnitAbilityLevel(c,SPELLID) * 100,true,true,null,DAMAGE_TYPE_DIVINE,null)
call TriggerSleepAction(1.5)
call DestroyEffect(e)
call PauseUnit(t,false)
call SetUnitPathing(c,true)
set c = null
set e = null
set t = null
set f = null
endfunction
private function Init takes nothing returns nothing
local trigger o = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( o, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( o, Condition( function Trig_XStream_Conditions ) )
call TriggerAddAction( o, function Trig_XStream_Actions )
//preloading ----------------------------------------------------------
call Preload(FIRE)
call Preload(EFFECTFIRE)
set bj_lastCreatedUnit = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'h008',0,0,0)
call UnitAddAbility(bj_lastCreatedUnit,SPELLID)
call UnitAddAbility(bj_lastCreatedUnit,SPELLFLY)
call KillUnit(bj_lastCreatedUnit)
endfunction
endscope
//TESH.scrollpos=33
//TESH.alwaysfold=0
scope Nutsu initializer init
globals
private constant real DISTANCE = 30
private constant real RADIUS = 220
private constant integer SPELLID = 'A077'
private constant integer TIGER = 'h069'
private constant integer ABYSSFIRE90 = 'h009'
private constant integer ABYSSFIRE = 'h005'
private constant integer WAVE = 'h008'
private constant integer ICENOVA = 'h00S'
private constant string EFFECT = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
private constant string EFFECT2 = "Abilities\\Spells\\Other\\HowlOfTerror\\HowlCaster.mdl"
private constant string EFFECT3 = "Abilities\\Spells\\NightElf\\Taunt\\TauntCaster.mdl"
private constant string EFFECT5 = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"
private constant string EFFECT4 = "Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl"
private constant string EFFECT6 = "Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl"
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELLID
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local real xx = GetUnitX(c)
local real yy = GetUnitY(c)
local real x1
local real y1
local real a = Angle(xx,yy,x,y)
local unit d = CreateUnit(GetOwningPlayer(c),TIGER,xx,yy,a)
local integer i = 0
local group g
local group ignore = NewGroup()
local unit v
call SoundStart("war3mapImported\\nutsu2.mp3",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call SetUnitAnimation(d,"spell throw")
call PolledWait(0.2)
call EffectUnitColor(c,xx,yy,a,2,ABYSSFIRE90,1,255,255,255,255)
loop
exitwhen i >= 6
set g = NewGroup()
set x1 = PolarX(xx,i * 150,a)
set y1 = PolarY(yy,i * 150,a)
call DestroyEffect(AddSpecialEffect(EFFECT,x1,y1))
call DestroyEffect(AddSpecialEffect(EFFECT2,x1,y1))
call DestroyEffect(AddSpecialEffect(EFFECT3,x1,y1))
call DestroyEffect(AddSpecialEffect(EFFECT4,x1,y1))
call DestroyEffect(AddSpecialEffect(EFFECT5,x1,y1))
call GroupEnumUnitsInRange(g,x1,y1,300,null)
loop
set v = FirstOfGroup(g)
exitwhen v == null
if FilterGeneral(c,v) and IsUnitInGroup(v,ignore) == false then
call StoneUnit(c,v,4,1100)
call GroupAddUnit(ignore,v)
endif
call GroupRemoveUnit(g,v)
endloop
call ReleaseGroup(g)
call TriggerSleepAction(0)
set i = i + 1
endloop
call ReleaseGroup(ignore)
call DestroyEffect(AddSpecialEffect(EFFECT6,GetUnitX(d),GetUnitY(d)))
call RemoveUnit(d)
set c = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=31
//TESH.alwaysfold=0
function Trig_White_Finger_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A07B'
endfunction
function whitefingslid takes nothing returns nothing
local timer f = GetExpiredTimer()
local unit t = LoadUnitHandle(udg_HashGame,0,GetHandleId(f))
local unit d = LoadUnitHandle(udg_HashGame,1,GetHandleId(f))
local real a = anglebetweenpoints(GetUnitX(t),GetUnitY(t),GetUnitX(d),GetUnitY(d))
local real x1 = PolarX(GetUnitX(d),-22,a)
local real y1 = PolarY(GetUnitY(d),-22,a)
local unit e
local unit g
local real r = LoadReal(udg_HashGame,0,GetHandleId(f))
call SetUnitPosition(d,x1,y1)
set e = CreateUnit( GetOwningPlayer(d), 'h06A',GetUnitX(d),GetUnitY(d), bj_UNIT_FACING )
call UnitApplyTimedLife(e,'BTLF',1)
set e = null
if distancebetweenpoints(GetUnitX(t),GetUnitY(t),GetUnitX(d),GetUnitY(d)) < 120 then
call DestroyEffect(AddSpecialEffect("war3mapImported\\fireworkswhite.mdx",GetUnitX(t),GetUnitY(t)))
call UnitDamageTarget(d,t,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
call RemoveUnit(d)
set e = CreateUnit( GetOwningPlayer(d), 'h06B',GetUnitX(t),GetUnitY(t), bj_UNIT_FACING )
call UnitApplyTimedLife(e,'BTLF',1)
set e = null
set g = CreateUnit(GetOwningPlayer(d),'h002',GetUnitX(t),GetUnitY(t),0)
call UnitAddAbility(g,'A07A')
call IssueTargetOrder(g,"thunderbolt",t)
call UnitApplyTimedLife(g,'BTLF',1)
call DestroyTimer(f)
endif
set g = null
set f = null
set t = null
set d = null
endfunction
function Trig_White_Finger_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local unit d
local unit e
local timer z = CreateTimer()
local timer f = CreateTimer()
local real a
local real r = (GetUnitAbilityLevel(c,'A07B') + 2) * GetHeroStr(c,true)
call DestroyEffect(AddSpecialEffect("war3mapImported\\fireworkswhite.mdx",GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect("war3mapImported\\WhiteApplause.mdx",GetUnitX(c),GetUnitY(c)))
set d = CreateUnit( GetOwningPlayer(c), 'h06A',GetUnitX(c),GetUnitY(c), bj_UNIT_FACING )
call SaveUnitHandle(udg_HashGame,0,GetHandleId(f),t)
call SaveUnitHandle(udg_HashGame,1,GetHandleId(f),d)
call SaveReal(udg_HashGame,0,GetHandleId(f),r)
call TimerStart(f,0.03,true,function whitefingslid)
set d = null
set c = null
set t = null
call PlaySoundBJ( gg_snd_White_Finger2 )
endfunction
//===========================================================================
function InitTrig_White_Finger takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function Trig_White_Finger_Conditions ) )
call TriggerAddAction( t, function Trig_White_Finger_Actions )
set t = null
endfunction
//TESH.scrollpos=21
//TESH.alwaysfold=0
function Trig_White_Applause_Conditions takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit()) == 'H065'
endfunction
function whiteappcon takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'A0CC') >= 1 and IsUnitType(GetEventDamageSource(), UNIT_TYPE_STRUCTURE) == false and GetEventDamage() >= 100
endfunction
function whiteappslid takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit t = LoadUnitHandle(udg_HashGame,0,GetHandleId(z))
local real a = LoadReal(udg_HashGame,0,GetHandleId(z))
local real x = PolarX(GetUnitX(t),7,a)
local real y = PolarY(GetUnitY(t),7,a)
call SetUnitPosition(t,x,y)
call DestroyEffect(AddSpecialEffect("war3mapImported\\PiccoloMissile.mdx",x,y))
set t = null
set z = null
endfunction
function whiteappact takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetEventDamageSource()
local integer i = GetRandomInt(0,100)
local integer r = GetUnitAbilityLevel(c,'A0CC') * 50
local timer z
local real a
local integer v
if GetUnitAbilityLevel(c,'B010') > 0 then
set v = 10
else
set v = 15
endif
if distancebetweenpoints(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t)) < 2000 then
if i <= v then
call SoundStart("war3mapImported\\White Applause.mp3",GetUnitX(c),GetUnitY(c))
set z = CreateTimer()
set a = anglebetweenpoints(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t))
call SaveUnitHandle(udg_HashGame,0,GetHandleId(z),t)
call SaveReal(udg_HashGame,0,GetHandleId(z),a)
if GetUnitAbilityLevel(c,'B010') > 0 then
call DestroyEffect(AddSpecialEffect("war3mapImported\\DarkNova.mdx",GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect("war3mapImported\\DarkBlast.mdx.mdx",GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl",GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect("war3mapImported\\WarpDarkCaster.mdx",GetUnitX(c),GetUnitY(c)))
else
call DestroyEffect(AddSpecialEffect("war3mapImported\\fireworkswhite.mdx",GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect("war3mapImported\\WhiteApplause.mdx",GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl",GetUnitX(c),GetUnitY(c)))
call DestroyEffect(AddSpecialEffect("Units\\NightElf\\Wisp\\WispExplode.mdl",GetUnitX(c),GetUnitY(c)))
endif
call TimerStart(z,0.02,true,function whiteappslid)
call SetUnitState(c,UNIT_STATE_LIFE,GetUnitState(c,UNIT_STATE_LIFE) + GetEventDamage())
call UnitDamageTarget(c,t,r,true,true,null,DAMAGE_TYPE_DIVINE,null)
call TriggerSleepAction(1)
call PauseTimer(z)
call DestroyTimer(z)
set z = null
endif
endif
set c = null
set t = null
endfunction
function Trig_White_Applause_Actions takes nothing returns nothing
local trigger t = CreateTrigger()
local unit c = GetTriggerUnit()
call TriggerRegisterUnitEvent(t,c,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(t,Condition( function whiteappcon))
call TriggerAddAction(t,function whiteappact)
endfunction
//===========================================================================
function InitTrig_White_Applause takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterEnterRectSimple( t, bj_mapInitialPlayableArea )
call TriggerAddCondition( t, Condition( function Trig_White_Applause_Conditions ) )
call TriggerAddAction( t, function Trig_White_Applause_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Wing_Instantly_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A07D'
endfunction
function Trig_Wing_Instantly_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local real x = GetUnitX(t)
local real y = GetUnitY(t)
call DestroyEffect(AddSpecialEffect("war3mapImported\\BlackBlink.mdx",GetUnitX(c),GetUnitY(c)))
call SetUnitPosition(c,x,y)
set c = null
set t = null
endfunction
function InitTrig_Wing_Instantly takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition(t, Condition( function Trig_Wing_Instantly_Conditions ) )
call TriggerAddAction(t, function Trig_Wing_Instantly_Actions )
endfunction
//TESH.scrollpos=116
//TESH.alwaysfold=0
scope Multiboard initializer init
globals
multiboard MB
trigger MULTIBOARD
string array COLOR
string array ICON
endglobals
private function Actions takes nothing returns nothing
local integer i = 0
local integer inn
set MB = CreateMultiboard()
call MultiboardSetRowCount(MB,13)
call MultiboardSetColumnCount(MB,6)
call MultiboardSetTitleText(MB,"Anime Battle Stadium")
call MultiboardDisplay(MB,true)
call MultiboardMinimize(MB,true)
call MultiboardSetItemStyleBJ(MB,0,0,true,false)
call MultiboardSetItemValueBJ(MB,2,1,"|cff8080c0Player|r")
call MultiboardSetItemValueBJ(MB,3,1,"|cff00ff00Kill|r")
call MultiboardSetItemValueBJ(MB,4,1,"|cffff8040Death|r")
call MultiboardSetItemValueBJ(MB,5,1,"|cffffff80Level|r")
call MultiboardSetItemWidthBJ(MB,5,1,3.5)
call MultiboardSetItemValueBJ(MB,6,1,"|cff6ab5ffRespawn|r")
call MultiboardSetItemValueBJ(MB,2,2,COLOR[0] + "Team 1" + "|r")
call MultiboardSetItemValueBJ(MB,3,2,COLOR[0] + "------" + "|r")
call MultiboardSetItemValueBJ(MB,4,2,COLOR[0] + "------" + "|r")
call MultiboardSetItemValueBJ(MB,5,2,COLOR[0] + "------" + "|r")
call MultiboardSetItemValueBJ(MB,6,2,COLOR[0] + "------" + "|r")
set inn = 1
loop
exitwhen inn > 13
call MultiboardSetItemWidthBJ(MB,2,inn,9.5)
call MultiboardSetItemWidthBJ(MB,3,inn,3)
call MultiboardSetItemWidthBJ(MB,4,inn,3)
call MultiboardSetItemWidthBJ(MB,5,inn,3)
call MultiboardSetItemWidthBJ(MB,6,inn,3)
set inn = inn + 1
endloop
set inn = 1
loop
exitwhen inn > 3
call MultiboardSetItemStyleBJ(MB,1,inn + 2,false,true)
if GetPlayerController(Player(inn)) == MAP_CONTROL_USER and GetPlayerSlotState(Player(inn)) == PLAYER_SLOT_STATE_PLAYING then
call MultiboardSetItemIconBJ(MB,1,inn + 2,ICON[udg_MemoHero[inn + 1]])
call MultiboardSetItemValueBJ(MB,2,inn + 2,COLOR[inn] + GetPlayerName(Player(inn)) + "|r")
call MultiboardSetItemValueBJ(MB,3,inn + 2,"0")
call MultiboardSetItemValueBJ(MB,4,inn + 2,"0")
call MultiboardSetItemValueBJ(MB,5,inn + 2,"1")
else
call MultiboardSetItemValueBJ(MB,2,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,3,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,4,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,5,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,6,inn + 2,"-")
endif
set inn = inn + 1
endloop
call MultiboardSetItemValueBJ(MB,2,6,COLOR[4] + "Team 2" + "|r")
call MultiboardSetItemValueBJ(MB,3,6,COLOR[4] + "------" + "|r")
call MultiboardSetItemValueBJ(MB,4,6,COLOR[4] + "------" + "|r")
call MultiboardSetItemValueBJ(MB,5,6,COLOR[4] + "------" + "|r")
call MultiboardSetItemValueBJ(MB,6,6,COLOR[4] + "------" + "|r")
set inn = 5
loop
exitwhen inn > 7
call MultiboardSetItemStyleBJ(MB,1,inn + 2,false,true)
if GetPlayerController(Player(inn)) == MAP_CONTROL_USER and GetPlayerSlotState(Player(inn)) == PLAYER_SLOT_STATE_PLAYING then
call MultiboardSetItemIconBJ(MB,1,inn + 2,ICON[udg_MemoHero[inn + 1]])
call MultiboardSetItemValueBJ(MB,2,inn + 2,COLOR[inn] + GetPlayerName(Player(inn)) + "|r")
call MultiboardSetItemValueBJ(MB,3,inn + 2,"0")
call MultiboardSetItemValueBJ(MB,4,inn + 2,"0")
call MultiboardSetItemValueBJ(MB,5,inn + 2,"1")
else
call MultiboardSetItemValueBJ(MB,2,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,2,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,3,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,4,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,5,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,6,inn + 2,"-")
endif
set inn = inn + 1
endloop
call MultiboardSetItemValueBJ(MB,2,10,COLOR[8] + "Team 3" + "|r")
call MultiboardSetItemValueBJ(MB,3,10,COLOR[8] + "------" + "|r")
call MultiboardSetItemValueBJ(MB,4,10,COLOR[8] + "------" + "|r")
call MultiboardSetItemValueBJ(MB,5,10,COLOR[8] + "------" + "|r")
call MultiboardSetItemValueBJ(MB,6,10,COLOR[8] + "------" + "|r")
set inn = 9
loop
exitwhen inn > 11
call MultiboardSetItemStyleBJ(MB,1,inn + 2,false,true)
if GetPlayerController(Player(inn)) == MAP_CONTROL_USER and GetPlayerSlotState(Player(inn)) == PLAYER_SLOT_STATE_PLAYING then
call MultiboardSetItemIconBJ(MB,1,inn + 2,ICON[udg_MemoHero[inn + 1]])
call MultiboardSetItemValueBJ(MB,2,inn + 2,COLOR[inn] + GetPlayerName(Player(inn)) + "|r")
call MultiboardSetItemValueBJ(MB,3,inn + 2,"0")
call MultiboardSetItemValueBJ(MB,4,inn + 2,"0")
call MultiboardSetItemValueBJ(MB,5,inn + 2,"1")
else
call MultiboardSetItemValueBJ(MB,2,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,2,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,3,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,4,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,5,inn + 2,"-")
call MultiboardSetItemValueBJ(MB,6,inn + 2,"-")
endif
set inn = inn + 1
endloop
call MultiboardMinimize(MB,false)
set i = 1
endfunction
private function init takes nothing returns nothing
set MULTIBOARD = CreateTrigger()
set COLOR[0] = "|c00ff0303"
set COLOR[1] = "|c000042ff"
set COLOR[2] = "|c001ce6b9"
set COLOR[3] = "|c00540081"
set COLOR[4] = "|c00fffc01"
set COLOR[5] = "|c00ff8000"
set COLOR[6] = "|c0020c000"
set COLOR[7] = "|c00e55bb0"
set COLOR[8] = "|c00959697"
set COLOR[9] = "|c007ebff1"
set COLOR[10] = "|c00106246"
set COLOR[11] = "|c004e2a04"
set ICON[1] = "BTNNarutoON.blp"
set ICON[2] = "BTNSasukeON.blp"
set ICON[3] = "BTNNejiON.blp"
set ICON[4] = "BTNRinON.blp"
set ICON[5] = "BTNaokijiON.blp"
set ICON[6] = "BTNZoroON.blp"
set ICON[7] = "BTNnewgateON.blp"
set ICON[8] = "BTNXanxusON.blp"
set ICON[9] = "BTNMystogan1ON.blp"
set ICON[10] = "BTNKakashiON.blp"
set ICON[11] = "BTNnatsuzON.blp"
set ICON[12] = "BTNBTNTsunaON.blp"
set ICON[13] = "BTNBTNItachiON.blp"
set ICON[14] = "BTNLaxusON.blp"
set ICON[15] = "BTNHibariON.blp"
set ICON[16] = "BTNByakuranON.blp"
set ICON[17] = "BTN4thON.blp"
set ICON[18] = "BTNkiritoON.blp"
set ICON[19] = "BTNJellaON.blp"
set ICON[20] = "BTNnanayaON.blp"
set ICON[21] = "BTNYamamotoON.blp"
set ICON[22] = "BTNGajeelON.blp"
call TriggerAddAction(MULTIBOARD,function Actions)
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Revive initializer init
globals
hashtable REV = InitHashtable()
endglobals
private function Conditions takes nothing returns boolean
return IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) == true and GetUnitTypeId(GetTriggerUnit()) != 'H01K'
endfunction
private function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local unit k = GetKillingUnit()
local texttag t
call PauseUnit(c,false)
if GetUnitAbilityLevel(c,'A015') >= 1 then
if GetUnitUserData(c) != 5 then
set udg_ScoreDeath[GetConvertedPlayerId(GetOwningPlayer(c))] = udg_ScoreDeath[GetConvertedPlayerId(GetOwningPlayer(c))] + 1
call MultiboardSetItemValueBJ(MB,4,GetPlayerId(GetOwningPlayer(c)) + 2,I2S(udg_ScoreDeath[GetConvertedPlayerId(GetOwningPlayer(c)) + 1]))
if GetOwningPlayer(k) != Player(0) and GetOwningPlayer(k) != Player(4) and GetOwningPlayer(k) != Player(8) and k != null then
set udg_ScoreKill[GetConvertedPlayerId(GetOwningPlayer(k))] = udg_ScoreKill[GetConvertedPlayerId(GetOwningPlayer(k))] + 1
call MultiboardSetItemValueBJ(MB,3,GetPlayerId(GetOwningPlayer(k)) + 2,I2S(udg_ScoreKill[GetConvertedPlayerId(GetOwningPlayer(k))]))
call AdjustPlayerStateBJ(50 + ((GetUnitLevel(c)) * 5),GetOwningPlayer(k), PLAYER_STATE_RESOURCE_GOLD)
set t = CreateTextTag()
call SetTextTagText(t,I2S(50 + ((GetUnitLevel(c)) * 5)),0.025)
call SetTextTagPos(t,GetUnitX(k),GetUnitY(k),0)
call SetTextTagColor(t,255,255,50,255)
call SetTextTagVelocity(t,0,0.07)
call SetTextTagPermanent(t,false)
call SetTextTagLifespan(t,1.5)
endif
if k != null then
call DisplayTextToForce(udg_AllPlayer,COLOR[GetPlayerId(GetOwningPlayer(k))] + GetPlayerName(GetOwningPlayer(k)) + "|r" + " has killed " + COLOR[GetPlayerId(GetOwningPlayer(c))] + GetPlayerName(GetOwningPlayer(c)) + "|r")
else
call DisplayTextToForce(udg_AllPlayer,COLOR[GetPlayerId(GetOwningPlayer(c))] + GetPlayerName(GetOwningPlayer(c)) + "|r" + " has just killed himself")
endif
endif
else
set udg_TournamentHero[GetPlayerId(GetOwningPlayer(c)) + 1] = GetTriggerUnit()
set udg_ScoreDeath[GetConvertedPlayerId(GetOwningPlayer(c))] = udg_ScoreDeath[GetConvertedPlayerId(GetOwningPlayer(c))] + 1
call MultiboardSetItemValueBJ(MB,4,GetPlayerId(GetOwningPlayer(c)) + 2,I2S(udg_ScoreDeath[GetPlayerId(GetOwningPlayer(c)) + 1]))
if GetOwningPlayer(k) != Player(0) and GetOwningPlayer(k) != Player(4) and GetOwningPlayer(k) != Player(8) and k != null then
set udg_ScoreKill[GetConvertedPlayerId(GetOwningPlayer(k))] = udg_ScoreKill[GetConvertedPlayerId(GetOwningPlayer(k))] + 1
call MultiboardSetItemValueBJ(MB,3,GetPlayerId(GetOwningPlayer(k)) + 2,I2S(udg_ScoreKill[GetConvertedPlayerId(GetOwningPlayer(k))]))
call AdjustPlayerStateBJ(50 + ((GetUnitLevel(c)) * 5),GetOwningPlayer(k), PLAYER_STATE_RESOURCE_GOLD)
set t = CreateTextTag()
call SetTextTagText(t,I2S(50 + ((GetUnitLevel(c)) * 5)),0.025)
call SetTextTagPos(t,GetUnitX(k),GetUnitY(k),0)
call SetTextTagColor(t,255,255,50,255)
call SetTextTagVelocity(t,0,0.07)
call SetTextTagPermanent(t,false)
call SetTextTagLifespan(t,1.5)
endif
if k != null then
call DisplayTextToForce(udg_AllPlayer,COLOR[GetPlayerId(GetOwningPlayer(k))] + GetPlayerName(GetOwningPlayer(k)) + "|r" + " has killed " + COLOR[GetPlayerId(GetOwningPlayer(c))] + GetPlayerName(GetOwningPlayer(c)) + "|r")
else
call DisplayTextToForce(udg_AllPlayer,COLOR[GetPlayerId(GetOwningPlayer(c))] + GetPlayerName(GetOwningPlayer(c)) + "|r" + " has just killed himself")
endif
endif
set c = null
set t = null
set k = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_DEATH,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Level_Up_Hero_Conditions takes nothing returns boolean
return IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) == true
endfunction
function Trig_Level_Up_Hero_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
call MultiboardSetItemValueBJ(MB,5,GetPlayerId(GetOwningPlayer(c)) + 2,I2S(GetHeroLevel(c)))
set c = null
endfunction
function InitTrig_Level_Up_Hero takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_HERO_LEVEL)
call TriggerAddCondition(t, Condition(function Trig_Level_Up_Hero_Conditions))
call TriggerAddAction(t, function Trig_Level_Up_Hero_Actions)
set t = null
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope Revive initializer init
globals
hashtable REV = InitHashtable()
endglobals
private function Conditions takes nothing returns boolean
return IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) == true and GetUnitTypeId(GetTriggerUnit()) != 'H01K'
endfunction
private function Duration takes unit whichunit returns real
return 30.
endfunction
private function CoolDeath takes nothing returns nothing
local timer z = GetExpiredTimer()
local unit c = LoadUnitHandle(REV,GetHandleId(z),0)
local real duration = LoadReal(REV,GetHandleId(z),0)
set duration = duration - 1
call MultiboardSetItemValueBJ(MB,6,GetPlayerId(GetOwningPlayer(c)) + 2,I2S(R2I(duration)))
call SaveReal(REV,GetHandleId(z),0,duration)
if duration <= 0 then
if IsUnitAlly(c,Player(0)) then
call ReviveHero(c,GetRectCenterX(gg_rct_Team1Revive),GetRectCenterY(gg_rct_Team1Revive),true)
elseif IsUnitAlly(c,Player(4)) then
call ReviveHero(c,GetRectCenterX(gg_rct_Team2Revive),GetRectCenterY(gg_rct_Team2Revive),true)
elseif IsUnitAlly(c,Player(8)) then
call ReviveHero(c,GetRectCenterX(gg_rct_Team3Revive),GetRectCenterY(gg_rct_Team3Revive),true)
endif
call ResetToGameCameraForPlayer(GetOwningPlayer(c),0)
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call MultiboardSetItemValueBJ(MB,6,GetPlayerId(GetOwningPlayer(c)) + 2,"")
call DestroyTimer(z)
call FlushChildHashtable(REV,GetHandleId(z))
else
if GetWidgetLife(c) > 0.45 then
call ResetToGameCameraForPlayer(GetOwningPlayer(c),0)
call PauseUnit(c,false)
call SetUnitInvulnerable(c,false)
call MultiboardSetItemValueBJ(MB,6,GetPlayerId(GetOwningPlayer(c)) + 2,"")
call DestroyTimer(z)
call FlushChildHashtable(REV,GetHandleId(z))
endif
endif
set c = null
set z = null
endfunction
private function Actions takes nothing returns nothing
local timer z
local unit c = GetTriggerUnit()
local unit k = GetKillingUnit()
local texttag t
call PauseUnit(c,false)
if GetUnitAbilityLevel(c,'A015') >= 1 then
if HaveSavedInteger(VASTA,GetHandleId(c),0) == true then
set udg_TournamentHero[GetPlayerId(GetOwningPlayer(c)) + 1] = GetTriggerUnit()
set udg_ScoreDeath[GetConvertedPlayerId(GetOwningPlayer(c))] = udg_ScoreDeath[GetConvertedPlayerId(GetOwningPlayer(c))] + 1
call MultiboardSetItemValueBJ(MB,4,GetPlayerId(GetOwningPlayer(c)) + 2,I2S(udg_ScoreDeath[GetConvertedPlayerId(GetOwningPlayer(c)) + 1]))
if GetOwningPlayer(k) != Player(0) and GetOwningPlayer(k) != Player(4) and GetOwningPlayer(k) != Player(8) and k != null then
set udg_ScoreKill[GetConvertedPlayerId(GetOwningPlayer(k))] = udg_ScoreKill[GetConvertedPlayerId(GetOwningPlayer(k))] + 1
call MultiboardSetItemValueBJ(MB,3,GetPlayerId(GetOwningPlayer(k)) + 2,I2S(udg_ScoreKill[GetConvertedPlayerId(GetOwningPlayer(k))]))
call AdjustPlayerStateBJ(50 + ((GetUnitLevel(c)) * 5),GetOwningPlayer(k), PLAYER_STATE_RESOURCE_GOLD)
set t = CreateTextTag()
call SetTextTagText(t,I2S(50 + ((GetUnitLevel(c)) * 5)),0.025)
call SetTextTagPos(t,GetUnitX(k),GetUnitY(k),0)
call SetTextTagColor(t,255,255,50,255)
call SetTextTagVelocity(t,0,0.07)
call SetTextTagPermanent(t,false)
call SetTextTagLifespan(t,1.5)
endif
if k != null then
call DisplayTextToForce(udg_AllPlayer,COLOR[GetPlayerId(GetOwningPlayer(k))] + GetPlayerName(GetOwningPlayer(k)) + "|r" + " has killed " + COLOR[GetPlayerId(GetOwningPlayer(c))] + GetPlayerName(GetOwningPlayer(c)) + "|r")
else
call DisplayTextToForce(udg_AllPlayer,COLOR[GetPlayerId(GetOwningPlayer(c))] + GetPlayerName(GetOwningPlayer(c)) + "|r" + " has just killed himself")
endif
call MultiboardSetItemValueBJ(MB,6,GetPlayerId(GetOwningPlayer(c)) + 2,I2S(R2I(Duration(c))))
set z = CreateTimer()
call SaveUnitHandle(REV,GetHandleId(z),0,c)
call SaveReal(REV,GetHandleId(z),0,Duration(c))
call TimerStart(z,1,true,function CoolDeath)
endif
else
set udg_TournamentHero[GetPlayerId(GetOwningPlayer(c)) + 1] = GetTriggerUnit()
set udg_ScoreDeath[GetConvertedPlayerId(GetOwningPlayer(c))] = udg_ScoreDeath[GetConvertedPlayerId(GetOwningPlayer(c))] + 1
call MultiboardSetItemValueBJ(MB,4,GetPlayerId(GetOwningPlayer(c)) + 2,I2S(udg_ScoreDeath[GetPlayerId(GetOwningPlayer(c)) + 1]))
if GetOwningPlayer(k) != Player(0) and GetOwningPlayer(k) != Player(4) and GetOwningPlayer(k) != Player(8) and k != null then
set udg_ScoreKill[GetConvertedPlayerId(GetOwningPlayer(k))] = udg_ScoreKill[GetConvertedPlayerId(GetOwningPlayer(k))] + 1
call MultiboardSetItemValueBJ(MB,3,GetPlayerId(GetOwningPlayer(k)) + 2,I2S(udg_ScoreKill[GetConvertedPlayerId(GetOwningPlayer(k))]))
call AdjustPlayerStateBJ(50 + ((GetUnitLevel(c)) * 5),GetOwningPlayer(k), PLAYER_STATE_RESOURCE_GOLD)
set t = CreateTextTag()
call SetTextTagText(t,I2S(50 + ((GetUnitLevel(c)) * 5)),0.025)
call SetTextTagPos(t,GetUnitX(k),GetUnitY(k),0)
call SetTextTagColor(t,255,255,50,255)
call SetTextTagVelocity(t,0,0.07)
call SetTextTagPermanent(t,false)
call SetTextTagLifespan(t,1.5)
endif
if k != null then
call DisplayTextToForce(udg_AllPlayer,COLOR[GetPlayerId(GetOwningPlayer(k))] + GetPlayerName(GetOwningPlayer(k)) + "|r" + " has killed " + COLOR[GetPlayerId(GetOwningPlayer(c))] + GetPlayerName(GetOwningPlayer(c)) + "|r")
else
call DisplayTextToForce(udg_AllPlayer,COLOR[GetPlayerId(GetOwningPlayer(c))] + GetPlayerName(GetOwningPlayer(c)) + "|r" + " has just killed himself")
endif
call MultiboardSetItemValueBJ(MB,6,GetPlayerId(GetOwningPlayer(c)) + 2,I2S(R2I(Duration(c))))
set z = CreateTimer()
call SaveUnitHandle(REV,GetHandleId(z),0,c)
call SaveReal(REV,GetHandleId(z),0,Duration(c))
call TimerStart(z,1,true,function CoolDeath)
endif
set c = null
set t = null
set k = null
set z = null
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_DEATH,null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t,Condition(function Conditions))
call TriggerAddAction(t,function Actions)
set t = null
endfunction
endscope