This repository was archived by the owner on May 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathset.j
1539 lines (1504 loc) · 56.8 KB
/
set.j
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
globals
trigger sommonDeadTg = null
trigger sommonPointTg = null
trigger sommonLevelupTg = null
endglobals
struct hSet
private static integer currentChengqu = 0
private static trigger heroDeadTg = null
private static trigger enemyDeadTg = null
private static trigger enemyStopTg = null
private static trigger bossDeadTg = null
private static trigger destructableDeadTg = null
private static trigger luckyDrawTg = null
// 复苏之光
private static method fusuzhiguang takes nothing returns nothing
local timer t = GetExpiredTimer()
local unit u = htime.getUnit(t,1)
call htime.delTimer(t)
if(hgroup.isIn(u,sk_group_fusuzhiguang) == true)then
call hgroup.out(u,sk_group_fusuzhiguang)
endif
set t = null
set u = null
endmethod
// 奔腾霹雳
private static method bentengpili takes nothing returns nothing
local timer t = GetExpiredTimer()
local unit triggerUnit = htime.getUnit(t,1)
local integer i = htime.getInteger(t,2)
local hAttrHuntBean bean
local group g = null
local unit u = null
local hFilter hf
if(i > 60)then
call htime.delTimer(t)
set t = null
set triggerUnit = null
endif
call htime.setInteger(t,2,i+1)
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isEnemy(true,triggerUnit)
set g = hgroup.createByUnit(triggerUnit,1000,function hFilter.get)
call hf.destroy()
if(hgroup.count(g)>0)then
set u = GroupPickRandomUnit(g)
call hattr.subMove(u,150,5)
call heffect.toUnitLoc("war3mapImported\\eff_Lightnings_Long.mdl",u,1.00)
set u = null
endif
call GroupClear(g)
call DestroyGroup(g)
set g = null
set t = null
set triggerUnit = null
endmethod
private static method onHeroSkillHappen takes nothing returns nothing
local unit triggerUnit = hevent.getTriggerUnit()
local integer skillid = hevent.getTriggerSkill()
local integer triggerUID = 0
local location loc = null
local location loc2 = null
local hAttrHuntBean bean
local group g = null
local player p = null
local unit u = null
local integer i = 0
local hFilter hf
local timer t = null
local texttag ttg = null
if(skillid == 'A043')then // 召唤D级兵种
set p = GetOwningPlayer(triggerUnit)
set loc = GetSpellTargetLoc()
call SetUnitPosition( triggerUnit, GetUnitX(triggerUnit), GetUnitY(triggerUnit) )
if(GetPlayerState(p, PLAYER_STATE_RESOURCE_FOOD_CAP) - GetPlayerState(p, PLAYER_STATE_RESOURCE_FOOD_USED) <= 0) then
set ttg = hmsg.ttg2Unit(triggerUnit,"需要更多的人口",7,"",0,1.70,60.00)
call hmsg.style(ttg,"scale",0,0.1)
set ttg = null
elseif(hplayer.getGold(p) < 500)then
set ttg = hmsg.ttg2Unit(triggerUnit,"黄金不足",7,"",0,1.70,60.00)
call hmsg.style(ttg,"scale",0,0.1)
set ttg = null
else
call hplayer.subGold(p,500)
set triggerUID = g_summon_d[GetRandomInt(1,g_summon_count_d)]
set u = hunit.createUnit(p,triggerUID,loc)
call hGlobals.initSummon(u)
call hGlobals.initSummonAbility(u,null,null)
set u = null
endif
call RemoveLocation(loc)
set loc = null
elseif(skillid == 'A06F' or skillid == 'A06D' or skillid == 'A06I' or skillid == 'A07L')then // 召唤A~SSS
set p = GetOwningPlayer(triggerUnit)
set loc = GetSpellTargetLoc()
call SetUnitPosition( triggerUnit, GetUnitX(triggerUnit), GetUnitY(triggerUnit) )
if(GetPlayerState(p, PLAYER_STATE_RESOURCE_FOOD_CAP) - GetPlayerState(p, PLAYER_STATE_RESOURCE_FOOD_USED) <= 0) then
set ttg = hmsg.ttg2Unit(triggerUnit,"需要更多的人口",7,"",0,1.70,60.00)
call hmsg.style(ttg,"scale",0,0.1)
set ttg = null
else
if(skillid == 'A06F')then // A~S
call RemoveItem(GetItemOfTypeFromUnitBJ(triggerUnit, 'I024'))
elseif(skillid == 'A06D')then // A~SS
call RemoveItem(GetItemOfTypeFromUnitBJ(triggerUnit, 'I026'))
elseif(skillid == 'A06I')then // S~SS
call RemoveItem(GetItemOfTypeFromUnitBJ(triggerUnit, 'I025'))
elseif(skillid == 'A07L')then // S~SSS
call RemoveItem(GetItemOfTypeFromUnitBJ(triggerUnit, 'I027'))
endif
if(skillid == 'A06F')then // A~S
set i = GetRandomInt(1,15)
if(i == 7) then
set triggerUID = g_summon_s[GetRandomInt(1,g_summon_count_s)]
else
set triggerUID = g_summon_a[GetRandomInt(1,g_summon_count_a)]
endif
elseif(skillid == 'A06D')then // A~SS
set i = GetRandomInt(1,15)
if(i <= 1) then
set triggerUID = g_summon_ss[GetRandomInt(1,g_summon_count_ss)]
elseif(i < 6) then
set triggerUID = g_summon_s[GetRandomInt(1,g_summon_count_s)]
else
set triggerUID = g_summon_a[GetRandomInt(1,g_summon_count_a)]
endif
elseif(skillid == 'A06I')then // S~SS
set i = GetRandomInt(1,15)
if(i <= 3) then
set triggerUID = g_summon_ss[GetRandomInt(1,g_summon_count_ss)]
else
set triggerUID = g_summon_s[GetRandomInt(1,g_summon_count_s)]
endif
elseif(skillid == 'A07L')then // SS
set triggerUID = g_summon_ss[GetRandomInt(1,g_summon_count_ss)]
endif
set u = hunit.createUnit(p,triggerUID,loc)
call hGlobals.initSummon(u)
call hGlobals.initSummonAbility(u,null,null)
set u = null
endif
call RemoveLocation(loc)
set loc = null
endif
if(skillid == 'A08X' or skillid == 'A04F' or skillid == 'A09N' or skillid == 'A09O')then // 四种符咒
set loc = GetSpellTargetLoc()
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isEnemy(true,triggerUnit)
set g = hgroup.createByLoc(loc,400,function hFilter.get)
call hf.destroy()
if(hgroup.count(g)>0)then
loop
exitwhen(IsUnitGroupEmptyBJ(g) == true)
set u = FirstOfGroup(g)
call GroupRemoveUnit( g , u )
if(skillid == 'A08X')then // [特攻]号令·圣锤封印
call hability.swim(u,12)
elseif(skillid == 'A04F')then // [特攻]号令·圣盾封印
call hattr.subDefend(u,40,30)
call heffect.toUnit("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl",u,"origin",30)
elseif(skillid == 'A09N')then // [特攻]号令·圣斧封印
call hability.silent(u,30)
elseif(skillid == 'A09O')then // [特攻]号令·圣剑封印
call hability.unarm(u,30)
endif
set u = null
endloop
endif
call GroupClear(g)
call DestroyGroup(g)
set g = null
set loc = null
endif
if(skillid == 'A05K')then // 斩破 - 一刹
call SetUnitAnimation( triggerUnit, "attack slam" )
set loc = hevent.getTargetLoc()
set bean = hAttrHuntBean.create()
set bean.damage = 3 * hattr.getAttackPhysical(triggerUnit)
set bean.fromUnit = triggerUnit
set bean.huntEff = "Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl"
set bean.huntKind = "attack"
set bean.huntType = "physicalwind"
call hskill.leap(triggerUnit,loc,50,"Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",75,false,bean)
call bean.destroy()
elseif(skillid == 'A05L')then // 斩破 - 无影斩
call SetUnitVertexColorBJ( triggerUnit, 100, 100, 100, 75.00 )
set bean = hAttrHuntBean.create()
set bean.damage = hattr.getAttackPhysical(triggerUnit)
set bean.fromUnit = triggerUnit
set bean.huntEff = "Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl"
set bean.huntKind = "attack"
set bean.huntType = "physicalwind"
call hskill.shuttleToUnit(triggerUnit,hevent.getTargetUnit(),700,20,30,5,50,null,"attack",'A06K',bean)
call bean.destroy()
endif
if(skillid == 'A05M')then // 赤血 - 狂暴
call hattr.addAttackSpeed(triggerUnit,100,10)
call hattr.addMove(triggerUnit,100,10)
elseif(skillid == 'A05N')then // 赤血 - 剑刃风暴
call hattr.addHuntAmplitude(triggerUnit,I2R(GetUnitLevel(triggerUnit)) * 1, 10)
call hattr.addKnocking(triggerUnit,I2R(GetUnitLevel(triggerUnit)) * 50, 10)
endif
if(skillid == 'A05I')then // 暗影猎手 - 恩典
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isBuilding(false)
call hf.isAlly(true,triggerUnit)
call hf.isOwnerPlayer(false,players[12])
set g = hgroup.createByUnit(triggerUnit,600,function hFilter.get)
call hf.destroy()
if(hgroup.count(g)>0)then
loop
exitwhen(IsUnitGroupEmptyBJ(g) == true)
set u = FirstOfGroup(g)
call GroupRemoveUnit( g , u )
call hattr.addAttackPhysical(u,I2R(GetUnitLevel(triggerUnit)) * 2,30)
call heffect.toUnitLoc("war3mapImported\\eff_CallOfAggression.mdx",u,1.00)
set u = null
endloop
endif
call GroupClear(g)
call DestroyGroup(g)
set g = null
elseif(skillid == 'A05O')then // 暗影猎手 - 蛇棒
set loc = hevent.getTargetLoc()
set loc2 = GetUnitLoc(triggerUnit)
set i = 1
loop
exitwhen i > 3
set u = hunit.createUnitFacing(GetOwningPlayer(triggerUnit),'n04R',loc,hlogic.getDegBetweenLoc(loc2,loc))
call hunit.setPeriod(u,60)
call hattr.addLife(u,I2R(GetUnitLevel(triggerUnit)) * 15,59.9)
call hattr.addAttackPhysical(u,hattr.getAttackMagic(triggerUnit),0)
set u = null
set i=i+1
endloop
call RemoveLocation(loc)
call RemoveLocation(loc2)
endif
if(skillid == 'A04H')then // 大魔法师 - 召唤水元素
set hxy.x = GetUnitX(triggerUnit)
set hxy.y = GetUnitY(triggerUnit)
set hxy = hlogic.polarProjection(hxy,125.0,GetUnitFacing(triggerUnit))
set i = 1
loop
exitwhen i > 2
set u = hunit.createUnithXY(GetOwningPlayer(triggerUnit),'n04U',hxy)
call hunit.setPeriod(u,45)
call hattr.addAttackHuntType(u,"water",0)
call hattr.addLife(u,I2R(GetUnitLevel(triggerUnit)) * 15,44.9)
call hattrNatural.addWaterOppose(u,50,0)
call hattrNatural.addFireOppose(u,50,0)
call hattr.addAttackMagic(u,hattr.getAttackMagic(triggerUnit),0)
set i=i+1
endloop
elseif(skillid == 'A06J')then // 大魔法师 - 魔窍
call hattr.addMana(hevent.getTargetUnit(),100,10)
call hattr.addManaBack(hevent.getTargetUnit(),3.0,10)
call hattr.addAttackHuntType(hevent.getTargetUnit(),"ice",10)
elseif(skillid == 'A04G')then // 大魔法师 - 暴风雪
call hattr.addAttackHuntType(triggerUnit,"waterice",10.0)
endif
if(skillid == 'A0A5')then // 地穴领主 - 埋沙
call SetUnitAnimation( triggerUnit, "morph" )
call SetUnitVertexColor( triggerUnit, 255, 255, 255, 50 )
set loc = hevent.getTargetLoc()
set bean = hAttrHuntBean.create()
set bean.damage = 2 * hattr.getAttackPhysical(triggerUnit)
set bean.fromUnit = triggerUnit
set bean.huntEff = "Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl"
set bean.huntKind = "skill"
set bean.huntType = "physical"
call hskill.leap(triggerUnit,loc,20,"Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl",100,false,bean)
call bean.destroy()
endif
if(skillid == 'A0AA')then // 蝠王 - 血蝠爆破
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isBuilding(false)
call hf.isEnemy(true,triggerUnit)
set g = hgroup.createByUnit(triggerUnit,400,function hFilter.get)
call hf.destroy()
set bean = hAttrHuntBean.create()
if(his.night())then
set bean.damage = 60 * I2R(GetUnitLevel(triggerUnit))
else
set bean.damage = 30 * I2R(GetUnitLevel(triggerUnit))
endif
set bean.fromUnit = triggerUnit
set bean.huntEff = "war3mapImported\\eff_dark_night_bat.mdl"
set bean.huntKind = "skill"
set bean.huntType = "dark"
set i = 0
if(hgroup.count(g)>0)then
loop
exitwhen(IsUnitGroupEmptyBJ(g) == true or i > 6)
set u = FirstOfGroup(g)
call GroupRemoveUnit( g , u )
set bean.toUnit = u
call hattrHunt.huntUnit(bean)
set u = null
set i = i+1
endloop
endif
call bean.destroy()
call GroupClear(g)
call DestroyGroup(g)
set g = null
elseif(skillid == 'A0AB')then // 蝠王 - 毒蝠丧魂
if(his.night())then
call hattr.subLifeBack(hevent.getTargetUnit(),72*I2R(GetUnitLevel(triggerUnit)),15)
call hattrNatural.subPoison(hevent.getTargetUnit(),200,15)
else
call hattr.subLifeBack(hevent.getTargetUnit(),36*I2R(GetUnitLevel(triggerUnit)),15)
call hattrNatural.subPoison(hevent.getTargetUnit(),100,15)
endif
call heffect.toUnit("Abilities\\Spells\\Human\\Banish\\BanishTarget.mdl",hevent.getTargetUnit(),"origin",15)
endif
if(skillid == 'A06O')then // 圣骑士 - 神圣护甲
call hattr.setLifeBack(triggerUnit,hattr.getLife(triggerUnit)*0.1,5)
elseif(skillid == 'A06Q')then // 圣骑士 - 闪爆
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isBuilding(false)
call hf.isEnemy(true,triggerUnit)
set g = hgroup.createByUnit(triggerUnit,800,function hFilter.get)
call hf.destroy()
set bean = hAttrHuntBean.create()
set bean.damage = 20 * I2R(GetUnitLevel(triggerUnit))
set bean.fromUnit = triggerUnit
set bean.huntEff = "war3mapImported\\eff_flame_flash2.mdl"
set bean.huntKind = "skill"
set bean.huntType = "light"
set i = 0
if(hgroup.count(g)>0)then
loop
exitwhen(IsUnitGroupEmptyBJ(g) == true)
set u = FirstOfGroup(g)
call GroupRemoveUnit( g , u )
call hattrNatural.subLight(u,50,10)
if(i < 6)then
set bean.toUnit = u
call hattrHunt.huntUnit(bean)
endif
set u = null
set i = i + 1
endloop
endif
call bean.destroy()
call GroupClear(g)
call DestroyGroup(g)
set g = null
elseif(skillid == 'A06R')then // 圣骑士 - 复苏之光
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isBuilding(false)
call hf.isAlly(true,triggerUnit)
set g = hgroup.createByUnit(hevent.getTargetUnit(),275,function hFilter.get)
call hf.destroy()
if(hgroup.count(g)>0)then
loop
exitwhen(IsUnitGroupEmptyBJ(g) == true)
set u = FirstOfGroup(g)
call GroupRemoveUnit( g , u )
if(hgroup.isIn(u,sk_group_fusuzhiguang) == false)then
call hgroup.in(u,sk_group_fusuzhiguang)
call hattr.addAttackHuntType(u,"light",45.0)
call heffect.toUnit("war3mapImported\\eff_HolyAurora.mdx",u,"origin",43.50)
set t = htime.setTimeout(45.00,function thistype.fusuzhiguang)
call htime.setUnit(t,1,u)
endif
set u = null
endloop
endif
call GroupClear(g)
call DestroyGroup(g)
set g = null
endif
if(skillid == 'A06X')then // 魔剑士 - 冰钢之军
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isBuilding(false)
call hf.isAlly(true,triggerUnit)
set g = hgroup.createByUnit(triggerUnit,600,function hFilter.get)
call hf.destroy()
if(hgroup.count(g)>0)then
loop
exitwhen(IsUnitGroupEmptyBJ(g) == true)
set u = FirstOfGroup(g)
call GroupRemoveUnit( g , u )
call hattr.addDefend(u,I2R(GetUnitLevel(triggerUnit)),10)
call hattrNatural.addIceOppose(u,30,10)
set u = null
endloop
endif
call GroupClear(g)
call DestroyGroup(g)
set g = null
elseif(skillid == 'A06Y')then // 魔剑士 - 光焰冲锋
call SetUnitAnimation( triggerUnit, "attack" )
set loc = hevent.getTargetLoc()
set bean = hAttrHuntBean.create()
set bean.damage = 4 * hattr.getAttackMagic(triggerUnit)
set bean.fromUnit = triggerUnit
set bean.huntEff = "Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl"
set bean.huntKind = "skill"
set bean.huntType = "magicfire"
call hskill.leap(triggerUnit,loc,25,"Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",125,false,bean)
call bean.destroy()
endif
if(skillid == 'A072')then // 森林老鹿 - 森林庇护
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isAlly(true,triggerUnit)
set g = hgroup.createByUnit(triggerUnit,600,function hFilter.get)
call hf.destroy()
if(hgroup.count(g)>0)then
loop
exitwhen(IsUnitGroupEmptyBJ(g) == true)
set u = FirstOfGroup(g)
call GroupRemoveUnit( g , u )
call hattr.addLifeBack(u,3.0 * I2R(GetUnitLevel(triggerUnit)),30)
call hattr.addToughness(u,1.5 * I2R(GetUnitLevel(triggerUnit)),30)
set u = null
endloop
endif
call GroupClear(g)
call DestroyGroup(g)
set g = null
elseif(skillid == 'A073')then // 森林老鹿 - 缠绕
call hattrNatural.addWood(triggerUnit,1.0 * I2R(GetUnitLevel(triggerUnit)),60)
endif
if(skillid == 'A074')then // 巫妖 - 冽冰鬼盾
call hattr.addToughness(hevent.getTargetUnit(),2.0 * I2R(GetUnitLevel(triggerUnit)),20)
call hattr.addPunish(hevent.getTargetUnit(),50.0 * I2R(GetUnitLevel(triggerUnit)),20)
call hattrNatural.addIceOppose(hevent.getTargetUnit(),75,20)
elseif(skillid == 'A075')then // 巫妖 - 阴骨
call hattr.addAttackHuntType(hevent.getTargetUnit(),"ice",15)
call hattrNatural.addIce(hevent.getTargetUnit(),50.0,15)
elseif(skillid == 'A076')then // 巫妖 - 霜冻凝结
call hattr.subMove(hevent.getTargetUnit(),300.0,3)
call hattr.subAttackSpeed(hevent.getTargetUnit(),80.0,3)
elseif(skillid == 'A077')then // 巫妖 - 冰封
call hAttrEffect.addColdVal(triggerUnit,10.0,6)
call hAttrEffect.addColdDuring(triggerUnit,3.0,6)
call hAttrEffect.addFreezeVal(triggerUnit,10.0,6)
call hAttrEffect.addFreezeDuring(triggerUnit,3.0,6)
call hattrNatural.addIce(triggerUnit,1.0 * I2R(GetUnitLevel(triggerUnit)),6)
endif
if(skillid == 'A08H')then // 操火师 - 点燃
if(his.ally(triggerUnit,hevent.getTargetUnit()))then
call hattr.addAttackHuntType(hevent.getTargetUnit(),"fire",15)
call hattrNatural.addFire(hevent.getTargetUnit(),75.0,15)
else
call hattrNatural.subFire(hevent.getTargetUnit(),75.0,15)
endif
endif
if(skillid == 'A07E')then // 黑游 - 黑暗之箭
call hattrNatural.addDark(triggerUnit,3.0 * I2R(GetUnitLevel(triggerUnit)),11)
elseif(skillid == 'A07A')then // 黑游 - 寡言
call hattr.addAttackSpeed(triggerUnit,150.0,11)
call hAttrEffect.addSilentOdds(triggerUnit,100.0,11)
call hAttrEffect.addSilentDuring(triggerUnit,2.50,11)
elseif(skillid == 'A07B')then // 黑游 - 邪魅
call hattrNatural.addDark(triggerUnit,50,13)
call SetUnitAnimation( triggerUnit, "spell" )
set loc = hevent.getTargetLoc()
set bean = hAttrHuntBean.create()
set bean.damage = 5 * hattr.getAttackPhysical(triggerUnit)
set bean.fromUnit = triggerUnit
set bean.huntEff = "Abilities\\Spells\\NightElf\\shadowstrike\\shadowstrike.mdl"
set bean.huntKind = "attack"
set bean.huntType = "magicdark"
call hskill.leap(triggerUnit,loc,70,"Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",75,false,bean)
call bean.destroy()
endif
if(skillid == 'A078')then // 炼金 - 黄金之力
set p = GetOwningPlayer(triggerUnit)
call hattr.addAttackPhysical(hevent.getTargetUnit(),hplayer.getTotalGoldCost(p) * 0.004,10)
call hattr.addAttackSpeed(hevent.getTargetUnit(),hplayer.getTotalGoldCost(p) * 0.0001,10)
elseif(skillid == 'A07F')then // 炼金 - 看透生德
call hplayer.subGoldRatio(GetOwningPlayer(triggerUnit),15.0,50.00)
call hplayer.addExpRatio(GetOwningPlayer(triggerUnit),100.0,50.00)
endif
if(skillid == 'A0AE')then // 火焰巨魔 - 炎炮
set loc = GetSpellTargetLoc()
call heffect.toLoc("war3mapImported\\eff_NewGroundEX.mdl",loc,2.00)
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isBuilding(false)
call hf.isEnemy(true,triggerUnit)
set g = hgroup.createByLoc(loc,250,function hFilter.get)
call hf.destroy()
set bean = hAttrHuntBean.create()
set bean.damage = 8 * hattr.getAttackPhysical(triggerUnit)
set bean.fromUnit = triggerUnit
set bean.huntEff = "war3mapImported\\eff_Pillar_of_Flame_Orange.mdl"
set bean.huntKind = "skill"
set bean.huntType = "fire"
set i = 0
if(hgroup.count(g)>0)then
loop
exitwhen(IsUnitGroupEmptyBJ(g) == true or i > 5)
set u = FirstOfGroup(g)
call GroupRemoveUnit( g , u )
set bean.toUnit = u
call hattrHunt.huntUnit(bean)
set u = null
set i = i + 1
endloop
endif
call bean.destroy()
call GroupClear(g)
call DestroyGroup(g)
set g = null
call RemoveLocation(loc)
set loc = null
elseif(skillid == 'A0AG')then // 火焰巨魔 - 大爆炸
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isBuilding(false)
call hf.isEnemy(true,triggerUnit)
set g = hgroup.createByUnit(triggerUnit,800,function hFilter.get)
call hf.destroy()
set bean = hAttrHuntBean.create()
set bean.damage = 80 * I2R(GetUnitLevel(triggerUnit))
set bean.fromUnit = triggerUnit
set bean.huntEff = "war3mapImported\\eff_Pillar_of_Flame_Orange.mdl"
set bean.huntKind = "skill"
set bean.huntType = "fire"
set i = 0
if(hgroup.count(g)>0)then
loop
exitwhen(IsUnitGroupEmptyBJ(g) == true or i > 8)
set u = FirstOfGroup(g)
call GroupRemoveUnit( g , u )
set bean.toUnit = u
call hattrHunt.huntUnit(bean)
set u = null
set i = i + 1
endloop
endif
call bean.destroy()
call GroupClear(g)
call DestroyGroup(g)
set g = null
elseif(skillid == 'A0AF')then // 火焰巨魔 - 热传导
call hattr.subAttackSpeed(hevent.getTargetUnit(),50,20)
call hattr.subMove(hevent.getTargetUnit(),200,20)
call hattr.addAttackSpeed(triggerUnit,50,20)
call hattr.addMove(triggerUnit,200,20)
call heffect.toUnit("war3mapImported\\eff_Orchid.mdl",hevent.getTargetUnit(),"origin",20)
endif
if(skillid == 'A0AK')then // 机械师 - 报废工厂
set loc = GetSpellTargetLoc()
call heffect.toLoc("war3mapImported\\eff_NewGroundEX.mdl",loc,2.00)
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isBuilding(false)
call hf.isEnemy(true,triggerUnit)
set g = hgroup.createByLoc(loc,300,function hFilter.get)
call hf.destroy()
set bean = hAttrHuntBean.create()
set bean.damage = 1 * hattr.getAttackMagic(triggerUnit)
set bean.fromUnit = triggerUnit
set bean.huntEff = "war3mapImported\\eff_Pillar_of_Flame_Orange.mdl"
set bean.huntKind = "skill"
set bean.huntType = "fire"
set i = 0
if(hgroup.count(g)>0)then
loop
exitwhen(IsUnitGroupEmptyBJ(g) == true or i > 6)
set u = FirstOfGroup(g)
call GroupRemoveUnit( g , u )
set bean.toUnit = u
call hattrHunt.huntUnit(bean)
set u = null
set i = i + 1
endloop
endif
call bean.destroy()
call GroupClear(g)
call DestroyGroup(g)
set g = null
set i = 1
loop
exitwhen i > 5
set u = hunit.createUnit(GetOwningPlayer(triggerUnit),'n05U',loc)
call hunit.setPeriod(u,10)
call hattr.addAttackPhysical(u,0.3*hattr.getAttackPhysical(triggerUnit),0)
set u = null
set i = i + 1
endloop
call RemoveLocation(loc)
set loc = null
elseif(skillid == 'A0AJ')then // 机械师 - 过载机器
call hattr.addAttackPhysical(triggerUnit,GetUnitLevel(triggerUnit)*25,60)
call hattr.addAttackSpeed(triggerUnit,50,60)
endif
if(skillid == 'A097')then // 美杜莎 - 冲击
set loc = GetUnitLoc(triggerUnit)
set u = hunit.createUnitFacing(GetOwningPlayer(triggerUnit),'n05V',loc,hlogic.getDegBetweenLoc(loc,hevent.getTargetLoc()))
call hunit.setPeriod(u,1.16)
set bean = hAttrHuntBean.create()
set bean.damage = 4 * hattr.getAttackPhysical(triggerUnit)
set bean.fromUnit = triggerUnit
set bean.huntEff = "Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl"
set bean.huntKind = "skill"
set bean.huntType = "water"
set loc2 = PolarProjectionBJ(loc, 700, hlogic.getDegBetweenLoc(loc, hevent.getTargetLoc()))
call hskill.leap(u,loc2,12,"Abilities\\Spells\\Other\\CrushingWave\\CrushingWaveDamage.mdl",150,false,bean)
call bean.destroy()
set loc = null
set loc2 = null
set u = null
elseif(skillid == 'A098')then // 美杜莎 - 诅咒恐惧
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isBuilding(false)
call hf.isEnemy(true,triggerUnit)
set g = hgroup.createByUnit(hevent.getTargetUnit(),400,function hFilter.get)
call hf.destroy()
if(hgroup.count(g)>0)then
loop
exitwhen(IsUnitGroupEmptyBJ(g) == true)
set u = FirstOfGroup(g)
call GroupRemoveUnit( g , u )
call hattr.subAttackSpeed(u,60,10.0)
call heffect.toUnit("Abilities\\Spells\\Undead\\Curse\\CurseTarget.mdl",u,"overhead",10)
set u = null
endloop
endif
call GroupClear(g)
call DestroyGroup(g)
set g = null
elseif(skillid == 'A099')then // 美杜莎 - 石化
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isBuilding(false)
call hf.isEnemy(true,triggerUnit)
set g = hgroup.createByUnit(triggerUnit,400,function hFilter.get)
call hf.destroy()
if(hgroup.count(g)>0)then
loop
exitwhen(IsUnitGroupEmptyBJ(g) == true)
set u = FirstOfGroup(g)
call GroupRemoveUnit( g , u )
call hattr.subAttackSpeed( u, 300, 10.00 )
call hattr.subMove(u,1000,10.0)
call heffect.toUnit("war3mapImported\\eff_Void_Spear.mdl",u,"origin",10)
set u = null
endloop
endif
call GroupClear(g)
call DestroyGroup(g)
set g = null
endif
if(skillid == 'A0AL')then // 兽王 - 灰熊豪猪
set loc = hevent.getTargetLoc()
set u = hunit.createUnit(GetOwningPlayer(triggerUnit),'n05W',loc)
call hunit.setPeriod(u,60)
call hattr.addLife(u,I2R(GetUnitLevel(triggerUnit)) * 40,59.9)
call hattr.addAttackPhysical(u,hattr.getAttackPhysical(triggerUnit),0)
set u = hunit.createUnit(GetOwningPlayer(triggerUnit),'n05X',loc)
call hunit.setPeriod(u,60)
call hattr.addLife(u,I2R(GetUnitLevel(triggerUnit)) * 30,59.9)
call hattr.addAttackPhysical(u,hattr.getAttackMagic(triggerUnit),0)
set u = null
call RemoveLocation(loc)
elseif(skillid == 'A0AO')then // 兽王 - 犀牛冲撞
set loc = GetUnitLoc(triggerUnit)
set u = hunit.createUnitFacing(GetOwningPlayer(triggerUnit),'n05Y',loc,hlogic.getDegBetweenLoc(loc,hevent.getTargetLoc()))
call hunit.setPeriod(u,2.7)
set bean = hAttrHuntBean.create()
set bean.damage = 4 * hattr.getAttackPhysical(triggerUnit)
set bean.fromUnit = triggerUnit
set bean.huntEff = "war3mapImported\\eff_CorpseExplosion.mdl"
set bean.huntKind = "skill"
set bean.huntType = "physical"
set loc2 = PolarProjectionBJ(loc, 1200, hlogic.getDegBetweenLoc(loc, hevent.getTargetLoc()))
call hskill.leap(u,loc2,9,null,150,false,bean)
call bean.destroy()
set loc = null
set loc2 = null
set u = null
elseif(skillid == 'A0AN')then // 兽王 - 怒吼
set hf = hFilter.create()
call hf.isAlive(true)
call hf.isBuilding(false)
call hf.isAlly(true,triggerUnit)
call hf.isOwnerPlayer(false,players[12])
set g = hgroup.createByUnit(triggerUnit,600,function hFilter.get)
call hf.destroy()
if(hgroup.count(g)>0)then
loop
exitwhen(IsUnitGroupEmptyBJ(g) == true)
set u = FirstOfGroup(g)
call GroupRemoveUnit( g , u )
call hattr.addAttackPhysical(u,I2R(GetUnitLevel(triggerUnit)) * 4,10)
call heffect.toUnit("Abilities\\Spells\\NightElf\\BattleRoar\\RoarTarget.mdl",u,"overhead",10)
set u = null
endloop
endif
call GroupClear(g)
call DestroyGroup(g)
set g = null
endif
if(skillid == 'A0AP')then // 死骑 - 地狱冲击
set loc = GetUnitLoc(triggerUnit)
set u = hunit.createUnitFacing(GetOwningPlayer(triggerUnit),'n05Z',loc,hlogic.getDegBetweenLoc(loc,hevent.getTargetLoc()))
call hunit.setPeriod(u,0.89)
set bean = hAttrHuntBean.create()
set bean.damage = 4 * hattr.getAttackPhysical(triggerUnit)
set bean.fromUnit = triggerUnit
set bean.huntEff = "war3mapImported\\eff_burst_round_purple.mdl"
set bean.huntKind = "skill"
set bean.huntType = "ghost"
set loc2 = PolarProjectionBJ(loc, 800, hlogic.getDegBetweenLoc(loc, hevent.getTargetLoc()))
call hskill.leap(u,loc2,18,null,300,false,bean)
call bean.destroy()
set loc = null
set loc2 = null
set u = null
elseif(skillid == 'A0AS')then // 死骑 - 骷髅大军
set i = 1
loop
exitwhen i > 14
set hxy.x = GetUnitX(triggerUnit)
set hxy.y = GetUnitY(triggerUnit)
set hxy = hlogic.polarProjection(hxy,GetRandomReal(100,800),GetRandomReal(0,360))
if(GetRandomInt(1,2) == 1)then
set u = hunit.createUnithXY(GetOwningPlayer(triggerUnit),'n05S',hxy)
call hattr.addLife(u,I2R(GetUnitLevel(triggerUnit)) * 20,39.9)
call hattr.addAttackPhysical(u,hattr.getAttackPhysical(triggerUnit),0)
call SetUnitPathing( u, false )
else
set u = hunit.createUnithXY(GetOwningPlayer(triggerUnit),'n060',hxy)
call hattr.addLife(u,I2R(GetUnitLevel(triggerUnit)) * 10,39.9)
call hattr.addAttackPhysical(u,hattr.getAttackMagic(triggerUnit),0)
call SetUnitPathing( u, false )
endif
call hunit.setPeriod(u,40)
set u = null
set i = i+1
endloop
elseif(skillid == 'A0AR')then// 死骑 - 致命缠绕
call hattr.subDefend(hevent.getTargetUnit(),16,15)
call hattrNatural.subDarkOppose(hevent.getTargetUnit(),75,15)
endif
if(skillid == 'A0A2')then // 先知 - 幽冥之狼
set loc = hevent.getTargetLoc()
set i = 1
loop
exitwhen i > 2
set u = hunit.createUnit(GetOwningPlayer(triggerUnit),'n061',loc)
call hunit.setPeriod(u,60)
call hattr.addLife(u,I2R(GetUnitLevel(triggerUnit)) * 35,59.9)
call hattr.addAttackPhysical(u,hattr.getAttackMagic(triggerUnit),0)
set u = null
set i=i+1
endloop
call RemoveLocation(loc)
elseif(skillid == 'A0A3')then // 先知 - 雷霆攻击
call hattr.addAttackHuntType(hevent.getTargetUnit(),"thunder",15)
call hattrEffect.addLightningChainOdds(hevent.getTargetUnit(),50,15)
call hattrEffect.addLightningChainVal(hevent.getTargetUnit(),hattr.getAttackMagic(triggerUnit),15)
call hattrEffect.addLightningChainQty(hevent.getTargetUnit(),3,15)
call hattrEffect.setLightningChainModel(hevent.getTargetUnit(),lightningCode_shandianlian_ci)
elseif(skillid == 'A0A4')then // 先知 - 奔腾霹雳
set t = htime.setInterval(1.00,function thistype.bentengpili)
call htime.setUnit(t,1,triggerUnit)
call htime.setInteger(t,2,1)
set t = null
endif
if(skillid == 'A0AU')then // 影刺客 - 瞬杀
call heffect.toUnit("war3mapImported\\eff_in_a_flash2.mdl",triggerUnit,"origin",1)
if(his.enemy(triggerUnit,hevent.getTargetUnit()))then
call hattr.addAttackSpeed(triggerUnit,150,3)
call hattr.addAttackPhysical(triggerUnit,I2R(GetUnitLevel(triggerUnit))*15,3)
call hability.swim(hevent.getTargetUnit(),2.5)
if(his.night())then // 影刺客 - 影子戏法
call hattr.addKnocking(triggerUnit,2000,3)
else
call hattr.addMove(triggerUnit,200,6)
endif
endif
call SetUnitPosition(triggerUnit, GetUnitX(hevent.getTargetUnit()), GetUnitY(hevent.getTargetUnit()) )
endif
set triggerUnit = null
set loc = null
set loc2 = null
set g = null
set p = null
set u = null
set t = null
endmethod
private static method onHeroLevelUp takes nothing returns nothing
local unit u = hevent.getTriggerUnit()
local integer uid = GetUnitTypeId(u)
local integer lv = GetHeroLevel(u)
local real diffLv = I2R(lv - hhero.getHeroPrevLevel(u))
call hattr.addLife(u,diffLv*20,0)
call hattr.addAttackPhysical(u,diffLv*5,0)
call hattr.addAttackMagic(u,diffLv*5,0)
call hattr.addPunish(u,diffLv*50,0)
if(uid == 'H00I')then //赤血
call hattr.addHemophagia(u,diffLv*0.5,0)
endif
if(uid == 'H00K')then // 暗影猎手
call hattrEffect.addToxicVal(u,diffLv*0.4,0)
endif
if(uid == 'H00M')then // 大魔法师
call hattrNatural.addWater(u,diffLv*0.01,0)
endif
if(uid == 'H00X')then //操火师
call hattrNatural.addFire(u,diffLv*1,0)
endif
if(uid == 'H00P')then //森林老鹿
call hattrEffect.addBombVal(u,diffLv*30,0)
endif
if(uid == 'H004')then //死骑
call hattrEffect.addAttackPhysicalVal(u,3,0)
endif
set u = null
endmethod
private static method onHeroDead takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit killer = hevent.getLastDamageUnit(u)
local player p = GetOwningPlayer(u)
local unit tempu = null
local real rebornTime = REBORN_HERO
if(g_mon_isrunning == true)then
if(hgroup.isIn(u,sk_group_fusuzhiguang) == true)then
set rebornTime = 0
else
call hmsg.echo(GetUnitName(u)+" 被 "+GetUnitName(killer)+" 狠狠地击倒了!"+I2S(R2I(rebornTime))+" 秒后在原地复活~")
set tempu = hunit.createUnitXYFacing(p,'n05A',GetUnitX(u),GetUnitY(u),270)
call SetUnitVertexColor(tempu, 255, 255, 0, 200)
call hunit.shadow(GetUnitTypeId(u),GetUnitX(u),GetUnitY(u),270,100,0,75,120,rebornTime)
if(rebornTime>0)then
call SetUnitTimeScalePercent(tempu, 1000.0 / rebornTime)
endif
call hunit.del(tempu,rebornTime)
endif
call hunit.rebornAtXY(u,GetUnitX(u),GetUnitY(u),rebornTime,5.00)
endif
set u = null
set killer = null
set p = null
set tempu = null
endmethod
private static method onHeroKill takes nothing returns nothing
local unit killer = hevent.getKiller()
local unit bekiller = hevent.getTargetUnit()
local unit u = null
if(GetUnitAbilityLevel(killer,'A079') >= 1)then // 黑游 - 黑奴
call hattr.addAttackSpeed(killer,20,5.00)
set u = hunit.createUnitXY(GetOwningPlayer(killer),'n04W',GetUnitX(bekiller),GetUnitY(bekiller))
call hunit.setPeriod(u,5.00)
call hattr.addAttackHuntType(u,"dark",0)
call hattr.addLife(u,I2R(GetUnitLevel(killer)) * 10,0)
call hattrNatural.addDarkOppose(u,90,0)
call hattr.addAttackPhysical(u,hattr.getAttackPhysical(killer),0)
endif
if(GetUnitAbilityLevel(killer,'A07D') >= 1)then // 炼金 - 好运
call hplayer.addGold(GetOwningPlayer(killer),GetUnitLevel(killer)*4)
endif
set u = null
set killer = null
set bekiller = null
endmethod
// 选英雄
private static method onHeroPick takes nothing returns nothing
local unit u = hevent.getTriggerUnit()
local integer uid = GetUnitTypeId(u)
local string t = hhero.getHeroType(uid)
call TriggerRegisterUnitEvent( heroDeadTg, u, EVENT_UNIT_DEATH )
call hunit.setOpenPunish(u,true)
call hevent.onSkillHappen(u,function thistype.onHeroSkillHappen)
call hevent.onLevelUp(u,function thistype.onHeroLevelUp)
call hevent.onKill(u,function thistype.onHeroKill)
call UnitAddAbility(u,'A082') // reborn
call UnitAddAbility(u,'A043') // summon spring
//检测英雄类别
if(t == "str")then
call hattr.addMove(u,200,0)
call hattr.addLife(u,150,0)
call hattr.addMana(u,80,0)
call hattr.addManaBack(u,0.50,0)
call hattr.addAttackPhysical(u,15,0)
elseif(t == "agi")then
call hattr.addMove(u,220,0)
call hattr.addLife(u,130,0)
call hattr.addMana(u,80,0)
call hattr.addManaBack(u,1.00,0)
call hattr.addAttackPhysical(u,25,0)
elseif(t == "int")then
call hattr.addMove(u,180,0)
call hattr.addLife(u,100,0)
call hattr.addMana(u,120,0)
call hattr.addManaBack(u,2.00,0)
call hattr.addAttackMagic(u,20,0)
endif
if(uid == 'H001')then //斩破
call hattr.addAvoid(u,25,0)
call hattr.addAttackHuntType(u,"wind",0)
call hattrEffect.addAttackSpeedVal(u,3,0)
call hattrEffect.addAttackSpeedDuring(u,15,0)
endif
if(uid == 'H00K')then //盗影猎手
call hattrEffect.addToxicVal(u,0.4,0)
call hattrEffect.addToxicDuring(u,3,0)
endif
if(uid == 'H00M')then //大魔法师
call hattr.addManaBack(u,3.5,0)
call hattrNatural.addWater(u,0.01,0)
endif
if(uid == 'H007')then //地穴领主
call hattr.addResistance(u,10,0)
call hattr.addHuntRebound(u,30,0)
endif
if(uid == 'H005')then //蝠王
call hattr.addAttackHuntType(u,"dark",0)
call hattr.addHemophagia(u,10,0)
call hattr.addHemophagiaSkill(u,10,0)
endif
if(uid == 'H008')then //机械师
call hattr.addDefend(u,30,0)
endif
if(uid == 'H00A')then //兽王
call hattr.addLife(u,3000,0)
call hattr.addKnocking(u,1000,0)
endif
if(uid == 'H004')then //死骑
call hattr.addAttackHuntType(u,"ghost",0)
call hattrEffect.addAttackPhysicalVal(u,3,0)
call hattrEffect.addAttackPhysicalDuring(u,15,0)
call hattrEffect.addColdVal(u,40,0)
call hattrEffect.addColdDuring(u,15,0)
endif
if(uid == 'H003')then //先知
call hattr.addAttackHuntType(u,"thunder",0)
endif
if(uid == 'H00I')then //赤血
call hattr.addHemophagia(u,0.5,0)
call hattrEffect.addSplitVal(u,5,0)
call hattrEffect.addSplitDuring(u,7,0)
endif
if(uid == 'H00N')then //圣骑士
if(sk_group_fusuzhiguang == null)then
set sk_group_fusuzhiguang = CreateGroup()
endif
call hattr.addDefend(u,20.0,0)
call hattrNatural.addFireOppose(u,10.0,0)
call hattrNatural.addSoilOppose(u,10.0,0)
call hattrNatural.addWaterOppose(u,10.0,0)
call hattrNatural.addIceOppose(u,10.0,0)
call hattrNatural.addWindOppose(u,10.0,0)
call hattrNatural.addLightOppose(u,10.0,0)
call hattrNatural.addDarkOppose(u,10.0,0)
call hattrNatural.addWoodOppose(u,10.0,0)
call hattrNatural.addThunderOppose(u,10.0,0)
call hattrNatural.addPoisonOppose(u,10.0,0)
call hattrNatural.addMetalOppose(u,10.0,0)
call hattrNatural.addGhostOppose(u,10.0,0)
call hattrNatural.addDragonOppose(u,10.0,0)
endif
if(uid == 'H00O')then //魔剑士
call hattr.addInvincible(u,10.0,0)
call hattrEffect.addFreezeVal(u,10.0,0)
call hattrEffect.addFreezeDuring(u,5.0,0)
call hattrEffect.addColdVal(u,20.0,0)
call hattrEffect.addColdDuring(u,5.0,0)
endif
if(uid == 'H00C')then //火焰巨魔
call hattr.addAttackHuntType(u,"fire",0)
endif
if(uid == 'H00X')then //操火师
call hattr.addAttackHuntType(u,"fire",0)
call hattrNatural.addFire(u,1.0,0)
endif
if(uid == 'H00P')then //森林老鹿
call hattr.addAttackHuntType(u,"wood",0)
call hattrNatural.addWoodOppose(u,50.0,0)
call hattrEffect.setBombOdds(u,100,0)
call hattrEffect.setBombVal(u,30,0)
call hattrEffect.setBombRange(u,50,0)
call hattrEffect.setBombModel(u,"Abilities\\Spells\\NightElf\\EntanglingRoots\\EntanglingRootsTarget.mdl")
endif
if(uid == 'H00D')then //影刺客
call hattr.addAim(u,40,0)
call hattr.addAvoid(u,40,0)
call hattrEffect.addAttackSpeedVal(u,15.0,0)
call hattrEffect.addAttackSpeedDuring(u,5,0)