-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrobot.cs
1074 lines (975 loc) · 51.9 KB
/
robot.cs
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
using MelonLoader;
using BTD_Mod_Helper;
using robot;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Api.Display;
using BTD_Mod_Helper.Extensions;
using Il2CppAssets.Scripts.Unity.Bridge;
using Il2CppAssets.Scripts.Unity.Display;
using UnityEngine;
using Il2CppSystem.IO;
using Il2CppAssets.Scripts.Models.Towers.Behaviors;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.TowerSets;
using Il2CppAssets.Scripts.Unity.UI_New.InGame;
using Il2CppAssets.Scripts.Utils;
using System.Collections.Generic;
using Il2CppAssets.Scripts.Simulation.Towers;
using Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors;
using Il2CppAssets.Scripts.Unity;
using Il2Cpp;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions;
using Il2CppAssets.Scripts.Unity.Towers.Projectiles.Behaviors;
using Il2CppSystem.Runtime.Remoting.Lifetime;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.Behaviors;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors;
using Il2CppAssets.Scripts.Models;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions.Behaviors;
using Il2CppAssets.Scripts.Models.Towers.Filters;
using Il2CppAssets.Scripts.Models.Bloons.Behaviors;
using System.Linq;
using static Il2CppAssets.Scripts.Models.Rounds.FreeplayBloonGroupModel;
using BTD_Mod_Helper.Api;
using Il2CppNinjaKiwi.Common.ResourceUtils;
using Il2CppAssets.Scripts.Models.GenericBehaviors;
using BTD_Mod_Helper.Api.ModOptions;
using Il2CppAssets.Scripts.Simulation.Objects;
using Il2CppAssets.Scripts.Unity.Audio;
using HarmonyLib;
using Il2CppAssets.Scripts.Data.Gameplay.Mods;
[assembly: MelonInfo(typeof(robot.robot), ModHelperData.Name, ModHelperData.Version, ModHelperData.RepoOwner)]
[assembly: MelonGame("Ninja Kiwi", "BloonsTD6")]
namespace robot;
public class robot : BloonsTD6Mod
{
public int LastPortalSound;
public float LastSoundAgo;
public float LastHubSoundAgo;
[HarmonyPatch(typeof(AudioFactory), "Start")]
public class AudioFactoryStart_Patch
{
[HarmonyPostfix]
public static void Postfix(AudioFactory __instance)
{
foreach (UnityEngine.Object asset in ModContent.GetBundle<robot>("robot").LoadAllAssetsAsync<AudioClip>().allAssets)
{
__instance.RegisterAudioClip(asset.name, asset.Cast<AudioClip>());
}
}
}
public static void PlaySound(string name)
{
Game.instance.audioFactory.PlaySoundFromUnity(null, name, "Fx", -1, 1f, 0, false, "", false, false, true, Il2CppAssets.Scripts.Unity.Bridge.AudioType.FX);
}
public override void OnApplicationStart()
{
ModHelper.Msg<robot>("You got terminated!");
}
static int rnd(int min, int max)
{
System.Random random = new System.Random();
return random.Next(min, max);
}
public static readonly ModSettingHotkey RobotMonkeyHotkey = new(KeyCode.R, HotkeyModifier.Shift)
{
icon = ModContent.GetTextureGUID<robot>("Icon"),
};
private static float MovmentSpeed = 0.8f;
public Il2CppAssets.Scripts.Simulation.SMath.Vector2 CalculateNewPosition(float oldPosX, float oldPosY, float oldPosZ, float directionDegrees)
{
// Umwandlung des Winkels von Grad in Radiant
float directionRadians = directionDegrees * Mathf.Deg2Rad;
// Berechnung der neuen X und Z Positionen
float newX = oldPosX - Mathf.Cos(directionRadians) * MovmentSpeed; // 1.0f ist die Entfernung in Metern
float newZ = oldPosZ + Mathf.Sin(directionRadians) * MovmentSpeed;
return new Il2CppAssets.Scripts.Simulation.SMath.Vector2(newX, newZ);
}
public override void OnTowerCreated(Tower tower, Entity target, Model modelToUse)
{
if (tower != null && tower.towerModel.name.Contains("Robot"))
{
PlayRandomVoiceline();
}
}
public override void OnTowerSelected(Tower tower)
{
if (tower != null && tower.towerModel.name.Contains("Robot"))
{
PlayRandomVoiceline();
}
}
public void PlayRandomVoiceline()
{
if(LastSoundAgo < 0)
{
LastSoundAgo = 10;
int random1 = rnd(1, 8);
while (LastPortalSound == random1)
{
random1 = rnd(1, 8);
}
LastPortalSound = random1;
switch (random1)
{
case 1:
PlaySound("1");
break;
case 2:
PlaySound("2");
break;
case 3:
PlaySound("3");
break;
case 4:
PlaySound("4");
break;
case 5:
PlaySound("5");
break;
case 6:
PlaySound("6");
break;
case 7:
PlaySound("7");
break;
}
}
}
public override void OnUpdate()
{
if (InGameData.CurrentGame != null && InGame.Bridge != null)
{
List<Tower> towers = InGame.instance.GetTowers();
int TC = towers.Count;
LastSoundAgo -= 0.025f;
LastHubSoundAgo -= 0.025f;
for (int i = 0; i < TC; i++)
{
if (towers[i] != null && towers[i].towerModel.name.Contains("Robot"))
{
int TabBooster = 1;
if (Input.GetKey(KeyCode.Tab) && towers[i].towerModel.tiers[0] >= 2)
{
TabBooster = 2;
}
if ((Input.GetKeyDown(KeyCode.LeftShift) || Input.GetKeyDown(KeyCode.LeftShift)) && LastHubSoundAgo < 0)
{
PlaySound("8");
LastHubSoundAgo = 6;
}
if (rnd(1, 9999) == 22)
{
int random1 = rnd(1, 8);
switch (random1)
{
case 1:
towers[i].ShowTowerEffect("When I grow up, I want to be like Arnold Schwarzenegger, a real Terminator", 100000f);
break;
case 2:
towers[i].ShowTowerEffect("Luckily, no one knows that pressing LeftShift makes hub noises", 100000f);
break;
case 3:
towers[i].ShowTowerEffect("I hope the German Bloons scene gets revived someday... I really miss Bador's Bloons times", 100000f);
break;
case 4:
towers[i].ShowTowerEffect("Legends say that blue Barney destroyed Bergbauer's hard drive...", 100000f);
break;
case 5:
towers[i].ShowTowerEffect("Another fever dream mod... **** you, Bergbauer.", 100000f);
break;
case 6:
towers[i].ShowTowerEffect("I wish I were as lucky as Dirk and had a cool voice, not such a load of crap", 100000f);
break;
case 7:
towers[i].ShowTowerEffect("You definitely have to check out the Hypixel Skyblock Minecraft server. You can waste time there for free (just kidding)", 100000f);
break;
}
}
for (int i2 = 0; i2 < TimeManager.networkScale * TabBooster; i2++)
{
Il2CppAssets.Scripts.Simulation.SMath.Vector2 newPos = CalculateNewPosition(towers[i].Position.X, towers[i].Position.Z, towers[i].Position.Y, towers[i].Rotation + 90);
bool allowedToMove = true;
// Check if tower is within the allowable Y-axis upper bound and move upwards
if (!(newPos.y >= -109))
{
towers[i].RotateTower(rnd(-90, 90), false, false);
allowedToMove = false;
}
// Check if tower is within the allowable Y-axis lower bound and move downwards
if (!(newPos.y <= 114))
{
towers[i].RotateTower(rnd(-90, 90), false, false);
allowedToMove = false;
}
// Check if tower is within the allowable X-axis left bound and move left
if (!(newPos.x >= -145))
{
towers[i].RotateTower(rnd(-90, 90), false, false);
allowedToMove = false;
}
// Check if tower is within the allowable X-axis right bound and move right
if (!(newPos.x <= 145))
{
towers[i].RotateTower(rnd(-90, 90), false, false);
allowedToMove = false;
}
List<Tower> towers2 = InGame.instance.GetTowers();
int TC2 = towers2.Count;
for (int iT = 0; iT < TC2; iT++)
{
if (towers2[iT] != null && TC2 >= 2)
{
if (towers2[iT].Position.X != towers[i].Position.X)
{
float maxDistance = 3 + towers2[iT].towerModel.radius;
UnityEngine.Vector2 thisPosition = new UnityEngine.Vector2(newPos.x, newPos.y);
UnityEngine.Vector2 otherPosition = new UnityEngine.Vector2(towers2[iT].Position.X, towers2[iT].Position.Y);
// Berechne die Distanz zwischen den Positionen
float distance = UnityEngine.Vector2.Distance(thisPosition, otherPosition);
// Wenn die Distanz kleiner oder gleich der maximalen Entfernung ist
if (distance <= maxDistance)
{
//ModHelper.Msg<Monkeywalkaround>("distance: " + distance + " x1: " + newPos.x + " x2: " + towers2[iT].Position.X);
towers[i].RotateTower(rnd(-90, 90), false, false);
allowedToMove = false;
}
}
}
}
if (allowedToMove)
{
towers[i].PositionTower(newPos);
}
}
}
}
}
}
public static Shader? GetOutlineShader()
{
var superMonkey = GetVanillaAsset("Assets/Monkeys/DartMonkey/Graphics/SuperMonkey.prefab")?.Cast<GameObject>();
if (superMonkey == null)
{
return null;
}
superMonkey.AddComponent<UnityDisplayNode>();
var litOutlineShader = superMonkey.GetComponent<UnityDisplayNode>().GetMeshRenderer().material.shader;
return litOutlineShader;
}
public static UnityEngine.Object? GetVanillaAsset(string name)
{
foreach (var assetBundle in AssetBundle.GetAllLoadedAssetBundles().ToArray())
{
if (assetBundle.Contains(name))
{
return assetBundle.LoadAsset(name);
}
}
return null;
}
}
public class RobotDP : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Robot_000";
public override float Scale => 1;
public override void ModifyDisplayNode(UnityDisplayNode node)
{
foreach (var meshRenderer in node.GetMeshRenderers())
{
meshRenderer.ApplyOutlineShader();
meshRenderer.SetOutlineColor(new Color(108 / 255f, 0 / 255f, 0 / 255f));
}
}
}
public class Robot300DP : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Robot_300";
public override float Scale => 1;
}
public class Robot030DP : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Robot_030";
public override float Scale => 1;
}
public class Robot003DP : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Robot_003";
public override float Scale => 1;
}
public class Robot400DP : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Robot_400";
public override float Scale => 1;
}
public class Robot040DP : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Robot_040";
public override float Scale => 1;
}
public class Robot004DP : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Robot_004";
public override float Scale => 1;
}
public class Robot500DP : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Robot_500";
public override float Scale => 1;
}
public class Robot050DP : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Robot_050";
public override float Scale => 1;
}
public class Robot005DP : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Robot_005";
public override float Scale => 1;
}
public class RobotParagonGUID : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Robot_Paragon";
public override float Scale => 1;
}
public class Robot_Paragon_DP : ModTowerCustomDisplay<RobotTower>
{
public override float Scale => 1.0f + ParagonDisplayIndex * .025f; // Higher degree Paragon displays will be bigger
public override string AssetBundleName => "robot";
public override string PrefabName => "Robot_Paragon";
public override bool UseForTower(int[] tiers)
{
return IsParagon(tiers);
}
public Robot_Paragon_DP()
{
}
public Robot_Paragon_DP(int i)
{
ParagonDisplayIndex = i;
}
public override int ParagonDisplayIndex { get; } // Overriding in this way lets us set it in the constructor
public override IEnumerable<ModContent> Load()
{
for (var i = 0; i < TotalParagonDisplays; i++)
{
yield return new Robot_Paragon_DP(i);
}
}
public override string Name => nameof(Robot_Paragon_DP) + ParagonDisplayIndex; // make sure each instance has its own name
public override void ModifyDisplayNode(UnityDisplayNode node)
{
SetMeshTexture(node, nameof(Robot_Paragon_DP));
}
}
public class Fireball : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Fireball";
public override float Scale => 1;
}
public class Fireball300 : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Fireball300";
public override float Scale => 1;
}
public class FireballGreen555 : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "FireballGreen555";
public override float Scale => 1;
}
public class Fireball003 : ModCustomDisplay
{
public override string AssetBundleName => "robot";
public override string PrefabName => "Fireball003";
public override float Scale => 1;
}
public class Robo_Buff : ModBuffIcon
{
public override string Icon => "Icon";
public override int MaxStackSize => 0;
}
public class Robo_Paragon_Buff : ModBuffIcon
{
public override string Icon => "Paragon_Buff";
public override int MaxStackSize => 0;
}
public class RobotTower : ModTower
{
public override string DisplayName => "Robot";
public override string Name => "Robot";
public override string BaseTower => "DartMonkey-032";
public override TowerSet TowerSet => TowerSet.Magic;
public override int Cost => 2000;
public override int TopPathUpgrades => 5;
public override int MiddlePathUpgrades => 5;
public override int BottomPathUpgrades => 5;
public override string Portrait => "Icon";
public override string Icon => "Icon";
public override ParagonMode ParagonMode => ParagonMode.Base000;
public override ModSettingHotkey Hotkey => robot.RobotMonkeyHotkey;
public override string Description => "I'm going to terminate every Monk...i mean bloon | Never press LeftShift/Control!";
public override void ModifyBaseTowerModel(TowerModel towerModel)
{
towerModel.ApplyDisplay<RobotDP>();
towerModel.GetAttackModel().weapons[0].projectile.ApplyDisplay<Fireball>();
towerModel.range *= 1.3f;
towerModel.GetAttackModel().weapons[0].rate *= 1.25f;
towerModel.GetAttackModel().range = towerModel.range;
towerModel.GetAttackModel().weapons[0].projectile.GetBehavior<TravelStraitModel>().lifespan = 2;
towerModel.GetAttackModel().weapons[0].projectile.GetDamageModel().immuneBloonProperties = BloonProperties.Purple;
towerModel.GetAttackModel().weapons[0].projectile.pierce = 3;
towerModel.GetAttackModel().weapons[0].ejectY = 12;
towerModel.GetAttackModel().weapons[0].ejectX = 0;
towerModel.GetAttackModel().weapons[0].ejectZ = 0;
towerModel.GetAttackModel().offsetX = 0;
towerModel.GetAttackModel().offsetY = 0;
towerModel.GetAttackModel().offsetZ = 0;
towerModel.GetAttackModel().weapons[0].projectile.GetBehavior<TravelStraitModel>().speed = 150f;
}
public override bool IsValidCrosspath(int[] tiers) =>
ModHelper.HasMod("UltimateCrosspathing") || base.IsValidCrosspath(tiers);
}
public class M_1 : ModUpgrade<RobotTower>
{
public override int Path => Middle;
public override int Tier => 1;
public override int Cost => 750;
public override string DisplayName => "Actually hot!";
public override string Description => "You can set Bloons on fire now";
public override string Portrait => "Portrait_010";
public override void ApplyUpgrade(TowerModel towerModel)
{
var Fire = Game.instance.model.GetTower(TowerType.MortarMonkey, 0, 0, 2).GetAttackModel().weapons[0].projectile.GetBehavior<CreateProjectileOnExhaustFractionModel>().projectile.GetBehavior<AddBehaviorToBloonModel>();
Fire.lifespan = 9;
towerModel.GetAttackModel().weapons[0].projectile.AddBehavior(Fire);
towerModel.GetAttackModel().weapons[0].projectile.collisionPasses = new[] { -1, 0 };
}
}
public class B_1 : ModUpgrade<RobotTower>
{
public override int Path => Bottom;
public override int Tier => 1;
public override int Cost => 750;
public override string DisplayName => "Chat GPT V.2";
public override string Description => "Towers in your range recieves a small Attack-Buff";
public override string Portrait => "Portrait_001";
public override void ApplyUpgrade(TowerModel towerModel)
{
var Buff1 = new RangeSupportModel("RangeSupport", true, 0.1f, 0, "Range:Support", null, false, null, null);
var Buff2 = new PierceSupportModel("PierceSupport", true, 1f, "Pierce:Support", null, false, "PierceBuff", "Zombey_Buff");
var Buff3 = new RateSupportModel("MaudadoBuff", 0.95f, true, "Rate:Support", false, 1, null, "MaudadoBuff", "maudado_Buff", false);
var Buff4 = new DamageSupportModel("DamageAddaptive", true, 1, "Damage:Support", null, false, false, 0);
Buff1.ApplyBuffIcon<Robo_Buff>();
towerModel.AddBehavior(Buff2);
towerModel.AddBehavior(Buff3);
towerModel.AddBehavior(Buff4);
towerModel.AddBehavior(Buff1);
}
}
public class T_1 : ModUpgrade<RobotTower>
{
public override int Path => Top;
public override int Tier => 1;
public override int Cost => 750;
public override string DisplayName => "Speedhack!";
public override string Description => "You attack 15% faster";
public override string Portrait => "Portrait_100";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.GetAttackModel().weapons[0].rate *= 0.85f;
}
}
public class M_2 : ModUpgrade<RobotTower>
{
public override int Path => Middle;
public override int Tier => 2;
public override int Cost => 1000;
public override string DisplayName => "Aim Assist";
public override string Description => "Your Projectiles aim a bit towards the Bloons";
public override string Portrait => "Portrait_020";
public override void ApplyUpgrade(TowerModel towerModel)
{
var aimAssist = Game.instance.model.GetTowerFromId("Adora 20").GetAttackModel().weapons[0].projectile.GetBehavior<AdoraTrackTargetModel>().Duplicate();
aimAssist.maximumSpeed = 150;
aimAssist.minimumSpeed = 140;
towerModel.GetAttackModel().weapons[0].projectile.AddBehavior(aimAssist);
}
}
public class B_2 : ModUpgrade<RobotTower>
{
public override int Path => Bottom;
public override int Tier => 2;
public override int Cost => 1000;
public override string DisplayName => "Robot Stuff!";
public override string Description => "You clean the Tarn Ability away from Bloons!";
public override string Portrait => "Portrait_002";
public override void ApplyUpgrade(TowerModel towerModel)
{
var Spray = Game.instance.model.GetTower(TowerType.MonkeySub, 3,0,0).GetAttackModel(1).Duplicate();
towerModel.AddBehavior(Spray);
}
}
public class T_2 : ModUpgrade<RobotTower>
{
public override int Path => Top;
public override int Tier => 2;
public override int Cost => 1000;
public override string DisplayName => "Integrated Booster!";
public override string Description => "You move 200% faster if the key 'Tab' is pressed";
public override string Portrait => "Portrait_200";
public override void ApplyUpgrade(TowerModel towerModel)
{
}
}
public class M_3 : ModUpgrade<RobotTower>
{
public override int Path => Middle;
public override int Tier => 3;
public override int Cost => 7500;
public override string DisplayName => "Fire Aura";
public override string Description => "You are kinda hot.....like Isab but in generell this Upgrade adds a Fire Aura attack";
public override string Portrait => "Portrait_030";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.ApplyDisplay<Robot030DP>();
//towerModel.GetAttackModel().weapons[0].projectile.ApplyDisplay<Fireball300>();
var Fire = Game.instance.model.GetTower(TowerType.TackShooter, 5, 0, 0).GetAttackModel(0).Duplicate();
Fire.weapons[0].projectile.GetDamageModel().damage = 1;
towerModel.GetAttackModel().weapons[0].projectile.GetBehavior<TravelStraitModel>().speed = 165f;
Fire.weapons[0].projectile.pierce -= 2;
if (towerModel.appliedUpgrades.Contains(UpgradeID<M_5>()))
{
Fire.weapons[0].projectile.pierce += 3;
Fire.weapons[0].projectile.GetDamageModel().damage = 3;
}
towerModel.AddBehavior(Fire);
}
}
public class B_3 : ModUpgrade<RobotTower>
{
public override int Path => Bottom;
public override int Tier => 3;
public override int Cost => 5200;
public override string DisplayName => "Integrated Bloonshipper!";
public override string Description => "You shoot homing Tornados towards the Bloons";
public override string Portrait => "Portrait_003";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.ApplyDisplay<Robot003DP>();
towerModel.GetAttackModel().weapons[0].projectile.ApplyDisplay<Fireball003>();
towerModel.GetAttackModel().weapons[0].projectile.GetBehavior<TravelStraitModel>().speed = 240f;
towerModel.GetAttackModel().weapons[0].rate *= 0.95f;
var Tornade = Game.instance.model.GetTower(TowerType.Druid, 3, 0, 0).GetAttackModel(1).Duplicate();
var homing = Game.instance.model.GetTowerFromId("WizardMonkey-500").GetWeapon().projectile.GetBehavior<TrackTargetModel>().Duplicate();
Tornade.weapons[0].emission = new ArcEmissionModel("ArcEmissionModel_", 2, 0, 180, null, false, false);
Tornade.weapons[0].rate = 4f;
Tornade.weapons[0].projectile.GetBehavior<TravelStraitModel>().Lifespan *= 7.5f;
Tornade.weapons[0].projectile.GetBehavior<TravelStraitModel>().speed *= 2f;
if (towerModel.appliedUpgrades.Contains(UpgradeID<B_5>()))
{
var Tornade2 = Game.instance.model.GetTower(TowerType.Druid, 5, 0, 0).GetAttackModel().weapons.First(w => w.name.Contains("Superstorm")).Duplicate();
Tornade.weapons[0].rate = 2f;
Tornade.weapons[0].projectile.GetDamageModel().damage += 10f;
Tornade.weapons[0].projectile.GetBehavior<TravelStraitModel>().Lifespan *= 15;
Tornade.weapons[0].projectile.GetBehavior<TravelStraitModel>().speed *= 3f;
Tornade.weapons[0].projectile.pierce += 9999;
Tornade2.rate = 12.5f;
Tornade2.projectile.GetBehavior<TravelStraitModel>().Lifespan *= 25;
Tornade2.projectile.GetDamageModel().damage += 225;
Tornade2.projectile.GetBehavior<TravelStraitModel>().speed *= 1.15f;
Tornade2.projectile.pierce += 100;
Tornade2.projectile.AddBehavior(new DamageModifierForTagModel("DamageModifierForTagModel_Ceramic", "Ceramic", 1, 750, false, false));
Tornade2.projectile.AddBehavior(new DamageModifierForTagModel("DamageModifierForTagModel_Fortified", "Fortified", 2, 1, false, false));
Tornade2.projectile.AddBehavior(new DamageModifierForTagModel("Bad", "Bad", 4, 1, false, true));
Tornade2.projectile.AddBehavior(new TrackTargetModel("", 500, homing.trackNewTargets, true, homing.maxSeekAngle, homing.ignoreSeekAngle, homing.turnRate * 4, homing.overrideRotation, homing.useLifetimeAsDistance));
towerModel.GetAttackModel().AddWeapon(Tornade2);
}
Tornade.weapons[0].projectile.AddBehavior(new TrackTargetModel("", 500, homing.trackNewTargets, true, homing.maxSeekAngle, homing.ignoreSeekAngle, homing.turnRate * 4, homing.overrideRotation, homing.useLifetimeAsDistance));
towerModel.AddBehavior(Tornade);
}
}
public class T_3 : ModUpgrade<RobotTower>
{
public override int Path => Top;
public override int Tier => 3;
public override int Cost => 5600;
public override string DisplayName => "Anti Offtrack!";
public override string Description => "You always move towards the Bloons, and occasionally, cacti are placed along the track";
public override string Portrait => "Portrait_300";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.ApplyDisplay<Robot300DP>();
towerModel.GetAttackModel().weapons[0].projectile.ApplyDisplay<Fireball300>();
towerModel.GetAttackModel().weapons[0].projectile.GetBehavior<TravelStraitModel>().speed = 160f;
var Spike = Game.instance.model.GetTower(TowerType.NinjaMonkey, 0, 0, 2).GetAttackModel(1).Duplicate();
Spike.range = 9;
Spike.weapons[0].rate *= 2f;
Spike.weapons[0].projectile.ApplyDisplay<Cactus1DP>();
Spike.weapons[0].projectile.pierce = 10;
Spike.weapons[0].projectile.GetDamageModel().damage = 10;
var SpikeExplosionProjectile = Game.instance.model.GetTower(TowerType.BoomerangMonkey, 2, 0, 2).GetAttackModel().weapons[0].projectile.Duplicate();
SpikeExplosionProjectile.pierce = 3;
SpikeExplosionProjectile.ApplyDisplay<Small_Spike>();
SpikeExplosionProjectile.GetDamageModel().damage = 6;
SpikeExplosionProjectile.AddBehavior(new DamageModifierForTagModel("DamageModifierForTagModel_Fortified", "Fortified", 1, 8, false, false));
SpikeExplosionProjectile.AddBehavior(new DamageModifierForTagModel("DamageModifierForTagModel_Ddt", "Ddt", 1, 18, false, true));
SpikeExplosionProjectile.AddBehavior(new DamageModifierForTagModel("DamageModifierForTagModel_Ceramic", "Ceramic", 1, 7, false, false));
SpikeExplosionProjectile.AddBehavior(new DamageModifierForTagModel("Moab", "Moab", 1, 6, false, true));
SpikeExplosionProjectile.AddBehavior(new DamageModifierForTagModel("Bfb", "Bfb", 1, 8, false, true));
SpikeExplosionProjectile.AddBehavior(new DamageModifierForTagModel("Zomg", "Zomg", 1, 13, false, true));
SpikeExplosionProjectile.GetDamageModel().immuneBloonProperties = BloonProperties.None;
Spike.weapons[0].projectile.AddBehavior(new CreateProjectileOnExpireModel("SpectralShards", SpikeExplosionProjectile, new ArcEmissionModel("", 9, 0, 360, null, false, false), false));
Spike.weapons[0].projectile.AddBehavior(new CreateProjectileOnExhaustFractionModel("SpectralShards", SpikeExplosionProjectile, new ArcEmissionModel("", 9, 0, 360, null, false, false), 1, 1, false, false, true));
towerModel.AddBehavior(Spike);
var Aim = Game.instance.model.GetTower(TowerType.SniperMonkey, 1, 2, 0).GetAttackModel(0).Duplicate();
Aim.weapons[0].rate = 0.8f;
towerModel.AddBehavior(Aim);
}
}
public class M_4 : ModUpgrade<RobotTower>
{
public override int Path => Middle;
public override int Tier => 4;
public override int Cost => 10500;
public override string DisplayName => "Balls of Fire";
public override string Description => "You have now a global range Fire-Shooting Attack. Ability: Shoot 8 gigantic Fireballs around you";
public override string Portrait => "Portrait_040";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.ApplyDisplay<Robot040DP>();
var OldAttackModel = towerModel.GetAttackModel().Duplicate();
TowerModelBehaviorExt.GetBehavior<AttackModel>(towerModel).fireWithoutTarget = true;
towerModel.GetAttackModel().weapons[0].projectile.GetBehavior<TravelStraitModel>().speed = 185;
towerModel.GetAttackModel().weapons[0].projectile.ignoreBlockers = true;
towerModel.GetAttackModel().weapons[0].projectile.canCollisionBeBlockedByMapLos = false;
towerModel.GetAttackModel().weapons[0].rate *= 1.75f;
if (towerModel.appliedUpgrades.Contains(UpgradeID<M_5>()))
{
towerModel.GetAttackModel().weapons[0].rate *= 0.5f;
towerModel.GetAttackModel().weapons[0].projectile.GetBehavior<TravelStraitModel>().speed = 200;
towerModel.GetAttackModel().weapons[0].projectile.AddBehavior(new DamageModifierForTagModel("Moabs", "Moabs", 1, 1, false, true));
towerModel.GetAttackModel().weapons[0].projectile.AddBehavior(new DamageModifierForTagModel("DamageModifierForTagModel_Ceramic", "Ceramic", 1, 2, false, false));
OldAttackModel.weapons[0].projectile.AddBehavior(new DamageModifierForTagModel("Moabs", "Moabs", 1, 3, false, true));
}
towerModel.AddBehavior(OldAttackModel);
//Ability
var abilityModel = new AbilityModel("AbilityModel_Middle_4", "SmallFire",
"s", 0, 0,
GetSpriteReference("040"), 75f, null, false, false, null,
0, 0, 9999999, false, false);
var activateAttackModel = new ActivateAttackModel("ActivateAttackModel_SmallFire", 0, true, new Il2CppReferenceArray<AttackModel>(1), true, false, false, false, false);
abilityModel.AddBehavior(activateAttackModel);
var attackModel1 = activateAttackModel.attacks[0] = Game.instance.model.GetTower(TowerType.SuperMonkey, 0, 0, 2).GetAttackModel().Duplicate();
attackModel1.range = 2000;
attackModel1.fireWithoutTarget = true;
attackModel1.attackThroughWalls = true;
attackModel1.weapons[0].emission = new ArcEmissionModel("fireballSmall", 8, 0, 360, null, false, false);
attackModel1.weapons[0].projectile.ignoreBlockers = true;
attackModel1.weapons[0].projectile.canCollisionBeBlockedByMapLos = false;
attackModel1.weapons[0].projectile.ApplyDisplay<SmallFireDisplay>();
attackModel1.weapons[0].projectile.pierce = 500;
attackModel1.weapons[0].projectile.maxPierce = 999;
attackModel1.weapons[0].projectile.GetDamageModel().immuneBloonProperties = BloonProperties.None;
attackModel1.weapons[0].projectile.GetDamageModel().damage = 150;
attackModel1.weapons[0].projectile.GetBehavior<TravelStraitModel>().lifespan *= 10;
attackModel1.weapons[0].projectile.GetBehavior<TravelStraitModel>().speed *= 0.4f;
activateAttackModel.AddChildDependant(attackModel1);
towerModel.AddBehavior(abilityModel);
}
}
public class B_4 : ModUpgrade<RobotTower>
{
public override int Path => Bottom;
public override int Tier => 4;
public override int Cost => 9600;
public override string DisplayName => "Upgraded Bloonshipper!";
public override string Description => "You can push MOABs aside and sometimes shoot stunnig ligtnings at every enemy";
public override string Portrait => "Portrait_004";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.ApplyDisplay<Robot004DP>();
var attackModel = towerModel.GetAttackModel();
var lightning = Game.instance.model.GetTower(TowerType.Druid, 2).GetAttackModel().Duplicate();
lightning.RemoveBehavior<RotateToTargetModel>();
lightning.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);
lightning.range = 999;
lightning.weapons[1].rate *= 3;
lightning.weapons[1].projectile.GetDamageModel().damage = 3;
lightning.weapons[1].projectile.pierce = 500;
lightning.weapons[1].projectile.GetDamageModel().immuneBloonProperties = BloonProperties.None;
lightning.weapons[1].projectile.GetBehavior<DamageModel>().overrideDistributeBlocker = true;
lightning.weapons[1].projectile.collisionPasses = new int[] { 0, -1 };
if (towerModel.appliedUpgrades.Contains(UpgradeID<B_5>()))
{
lightning.weapons[1].rate = 2;
lightning.weapons[1].projectile.GetDamageModel().damage = 23;
lightning.weapons[1].projectile.pierce = 1250;
lightning.weapons[1].projectile.AddBehavior(new FreezeModel("FreezeModel_", 0f, 1.75f, "LigntningStun", 999, "Stun", true, new GrowBlockModel("GrowBlockModel_"), null, 1f, true, true));
attackModel.weapons[0].projectile.AddBehavior(new WindModel("WindModel_", 2.7f,3, 1f, true, null, 5, "Ddt", 5));
attackModel.weapons[0].projectile.AddBehavior(new WindModel("WindModel_", 2.5f,3, 1f, true, null, 3, "Moab", 5));
attackModel.weapons[0].projectile.AddBehavior(new WindModel("WindModel_", 2.5f,3, 1f, true, null, 2, "Bfb", 5));
attackModel.weapons[0].projectile.AddBehavior(new WindModel("WindModel_", 2.5f,3, 1f, true, null, 1, "Zomg", 5));
}
else
{
attackModel.weapons[0].projectile.AddBehavior(new WindModel("WindModel_", 2, 2.5f, 0.75f, true, null, 5, "Ddt", 3));
attackModel.weapons[0].projectile.AddBehavior(new WindModel("WindModel_", 2, 2.5f, 0.75f, true, null, 3, "Moab", 3));
attackModel.weapons[0].projectile.AddBehavior(new WindModel("WindModel_", 2, 2.5f, 0.75f, true, null, 2, "Bfb", 3));
attackModel.weapons[0].projectile.AddBehavior(new WindModel("WindModel_", 2, 2.5f, 0.75f, true, null, 1, "Zomg", 3));
lightning.weapons[1].projectile.AddBehavior(new FreezeModel("FreezeModel_", 0f, 1.5f, "LigntningStun", 999, "Stun", true, new GrowBlockModel("GrowBlockModel_"), null, 0.75f, true, true));
}
lightning.RemoveWeapon(lightning.weapons[0]);
towerModel.AddBehavior(lightning);
}
}
public class T_4 : ModUpgrade<RobotTower>
{
public override int Path => Top;
public override int Tier => 4;
public override int Cost => 12500;
public override string DisplayName => "Cactus Man";
public override string Description => "You launch spikes in all directions";
public override string Portrait => "Portrait_400";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.ApplyDisplay<Robot400DP>();
var attackModel1 = Game.instance.model.GetTower(TowerType.SuperMonkey, 0, 0, 2).GetAttackModel().Duplicate();
attackModel1.weapons[0].rate = 3;
attackModel1.fireWithoutTarget = true;
attackModel1.weapons[0].emission = new ArcEmissionModel("fireballSmall", 16, 0, 360, null, false, false);
attackModel1.weapons[0].projectile.ApplyDisplay<Small_Spike>();
attackModel1.weapons[0].projectile.pierce = 3;
attackModel1.weapons[0].projectile.maxPierce = 20;
attackModel1.weapons[0].projectile.GetDamageModel().immuneBloonProperties = BloonProperties.None;
attackModel1.weapons[0].projectile.GetDamageModel().damage = 6;
attackModel1.weapons[0].projectile.GetBehavior<TravelStraitModel>().lifespan *= 3;
attackModel1.weapons[0].projectile.GetBehavior<TravelStraitModel>().speed *= 0.8f;
if (towerModel.appliedUpgrades.Contains(UpgradeID<M_1>()))
{
attackModel1.weapons[0].projectile.ApplyDisplay<Small_Fire_Spike>();
var Fire = Game.instance.model.GetTower(TowerType.MortarMonkey, 0, 0, 2).GetAttackModel().weapons[0].projectile.GetBehavior<CreateProjectileOnExhaustFractionModel>().projectile.GetBehavior<AddBehaviorToBloonModel>();
Fire.lifespan = 3;
attackModel1.weapons[0].projectile.AddBehavior(Fire);
attackModel1.weapons[0].projectile.collisionPasses = new[] { -1, 0 };
}
if (towerModel.appliedUpgrades.Contains(UpgradeID<T_5>()))
{
attackModel1.weapons[0].emission = new ArcEmissionModel("fireballSmall", 24, 0, 360, null, false, false);
attackModel1.weapons[0].rate = 1.75f;
attackModel1.weapons[0].projectile.GetDamageModel().damage = 30;
attackModel1.weapons[0].projectile.pierce = 3;
attackModel1.weapons[0].projectile.maxPierce = 20;
var bomb = Game.instance.model.GetTower(TowerType.BombShooter, 0).GetAttackModel().weapons[0].projectile.Duplicate();
var blast = bomb.GetBehavior<CreateProjectileOnContactModel>().projectile.Duplicate();
var explosion = bomb.GetBehavior<CreateEffectOnContactModel>().Duplicate();
blast.GetDamageModel().damage = 10;
blast.AddBehavior(new DamageModifierForTagModel("DamageModifierForTagModel_Ceramic", "Ceramic", 1, 12, false, false));
blast.radius = 27;
blast.pierce = 12;
blast.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);
var contactModel = new CreateProjectileOnContactModel("smallExplosion", blast, new ArcEmissionModel("ArcEmissionModel_", 1, 0, 0, null, false, false), true, false, false)
{ name = "RifleBlast_" };
attackModel1.weapons[0].projectile.AddBehavior(contactModel);
attackModel1.weapons[0].projectile.AddBehavior(explosion);
}
towerModel.AddBehavior(attackModel1);
}
}
public class M_5 : ModUpgrade<RobotTower>
{
public override int Path => Middle;
public override int Tier => 5;
public override int Cost => 50000;
public override string DisplayName => "Overheated like Isab";
public override string Description => "Your Ability now shoots 16 Fireballs in 3 bursts";
public override string Portrait => "Portrait_050";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.GetAttackModel().weapons[0].rate *= 0.75f;
towerModel.ApplyDisplay<Robot050DP>();
//Ability
towerModel.RemoveBehavior<AbilityModel>();
var abilityModel = new AbilityModel("AbilityModel_Middle_5", "SmallFire",
"s", 0, 0,
GetSpriteReference("050"), 85f, null, false, false, null,
0, 0, 9999999, false, false);
var activateAttackModel = new ActivateAttackModel("ActivateAttackModel_SmallFire", 2.1f, true, new Il2CppReferenceArray<AttackModel>(1), true, false, false, false, false);
abilityModel.AddBehavior(activateAttackModel);
var attackModel1 = activateAttackModel.attacks[0] = Game.instance.model.GetTower(TowerType.SuperMonkey, 0, 0, 2).GetAttackModel().Duplicate();
attackModel1.range = 2000;
attackModel1.weapons[0].rate = 1;
attackModel1.fireWithoutTarget = true;
attackModel1.attackThroughWalls = true;
attackModel1.weapons[0].emission = new ArcEmissionModel("fireballSmall", 16, 0, 360, null, false, false);
attackModel1.weapons[0].projectile.ignoreBlockers = true;
attackModel1.weapons[0].projectile.canCollisionBeBlockedByMapLos = false;
attackModel1.weapons[0].projectile.ApplyDisplay<BigFireDisplay>();
attackModel1.weapons[0].projectile.pierce = 9009;
attackModel1.weapons[0].projectile.maxPierce = 9999;
attackModel1.weapons[0].projectile.GetDamageModel().immuneBloonProperties = BloonProperties.None;
attackModel1.weapons[0].projectile.GetDamageModel().damage = 750;
attackModel1.weapons[0].projectile.GetBehavior<TravelStraitModel>().lifespan *= 6;
attackModel1.weapons[0].projectile.GetBehavior<TravelStraitModel>().speed *= 0.65f;
activateAttackModel.AddChildDependant(attackModel1);
towerModel.AddBehavior(abilityModel);
}
}
public class B_5 : ModUpgrade<RobotTower>
{
public override int Path => Bottom;
public override int Tier => 5;
public override int Cost => 42500;
public override string DisplayName => "Living Hurricane";
public override string Description => "There's a little bit of Bloon in the air";
public override string Portrait => "Portrait_005";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.ApplyDisplay<Robot005DP>();
}
}
public class T_5 : ModUpgrade<RobotTower>
{
public override int Path => Top;
public override int Tier => 5;
public override int Cost => 47500;
public override string DisplayName => "Cactus God";
public override string Description => "What's better than spikes? Exploding spikes!";
public override string Portrait => "Portrait_500";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.ApplyDisplay<Robot500DP>();
towerModel.GetAttackModel().weapons[0].rate *= 0.66f;
towerModel.GetAttackModel().range *= 1.25f;
towerModel.GetAttackModel().weapons[0].projectile.GetDamageModel().damage += 5;
towerModel.GetAttackModel().weapons[0].projectile.GetBehavior<TravelStraitModel>().speed *= 1.33f;
towerModel.GetAttackModel().weapons[0].projectile.pierce += 4;
}
}
public class Paragon : ModParagonUpgrade<RobotTower>
{
public override int Cost => 900000;
public override string Description => "Hasta la vista ,Baby! Every Level grants you 2% more damage and other boosting effects!";
public override string DisplayName => "Terminator";
public override string Portrait => "Paragon";
public override string Icon => "Paragon";
public override void ApplyUpgrade(TowerModel towerModel)
{
int ParagonLevel = towerModel.tier;
//AttackOne
towerModel.ApplyDisplay<Robot_Paragon_DP>();
towerModel.GetAttackModel().weapons[0].projectile.ApplyDisplay<Fireball003>();
towerModel.GetAttackModel().weapons[0].emission = new ArcEmissionModel("paragonAttack", 16, 0, 360, null, false, false);
towerModel.GetAttackModel().fireWithoutTarget = true;
towerModel.GetAttackModel().weapons[0].rate = 1.25f;
towerModel.GetAttackModel().weapons[0].projectile.GetDamageModel().immuneBloonProperties = BloonProperties.None;
towerModel.GetAttackModel().weapons[0].projectile.pierce = 50 + ParagonLevel * 1;
towerModel.GetAttackModel().weapons[0].projectile.GetDamageModel().damage = 1000 + ParagonLevel * 20;
towerModel.GetAttackModel().weapons[0].projectile.AddBehavior(new WindModel("WindModel_", 16, 20, 1f, true, null, 1.15f, "Ddt", 2));
towerModel.GetAttackModel().weapons[0].projectile.GetBehavior<TravelStraitModel>().lifespan *= 4;
towerModel.GetAttackModel().weapons[0].projectile.GetBehavior<TravelStraitModel>().speed *= 6f;
towerModel.GetAttackModel().weapons[0].projectile.ignoreBlockers = true;
towerModel.GetAttackModel().weapons[0].projectile.canCollisionBeBlockedByMapLos = false;
var aimAssist = Game.instance.model.GetTowerFromId("Adora 20").GetAttackModel().weapons[0].projectile.GetBehavior<AdoraTrackTargetModel>().Duplicate();
aimAssist.maximumSpeed = 110;
aimAssist.minimumSpeed = 100;
towerModel.GetAttackModel().weapons[0].projectile.AddBehavior(aimAssist);
//AttackTwo
var am2 = Game.instance.model.GetTower(TowerType.DartMonkey, 0, 0, 2).GetAttackModel(0).Duplicate();
am2.fireWithoutTarget = true;
am2.weapons[0].projectile.GetDamageModel().immuneBloonProperties = BloonProperties.None;
am2.weapons[0].ejectY = 0;
am2.weapons[0].ejectX = 0;
am2.weapons[0].ejectZ = -6;
am2.weapons[0].projectile.GetDamageModel().damage = 400 + ParagonLevel * 4f;
am2.weapons[0].projectile.AddBehavior(new FreezeModel("FreezeModel_", 0.01f, 3.5f, "LigntningStun", 999, "Stun", true, new GrowBlockModel("GrowBlockModel_"), null, 1f, true, true));
am2.weapons[0].projectile.AddBehavior(new DamageModifierForTagModel("DamageModifierForTagModel_Fortified", "Fortified", 2, 0, false, false));