-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlayer3Tower.cs
1105 lines (931 loc) · 40.9 KB
/
Player3Tower.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 System.Collections.Generic;
using System.Linq;
using BTD_Mod_Helper;
using BTD_Mod_Helper.Api.Display;
using BTD_Mod_Helper.Api.Enums;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;
using Il2CppSystem.Net.NetworkInformation;
using MelonLoader;
using weapondisplays;
using Player3.Displays;
using playerthree;
using UnityEngine;
using System;
using Object = UnityEngine.Object;
using Action = System.Action;
using bananafarmfake;
using Il2CppSystem.Runtime.ConstrainedExecution;
using RandomTowers;
using Il2CppSystem;
using Il2CppSystem.Diagnostics.Tracing;
using Il2CppSystem.ComponentModel;
using UnityEngine.Assertions.Comparers;
using Bomb;
using TemplateMod.MinionMonkey.Displays.Projectiles;
using System.Text;
using System.Threading.Tasks;
using TimeTraveler.Displays.Projectiles;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers.Behaviors;
using Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors;
using Il2CppAssets.Scripts.Models.TowerSets;
using Il2CppAssets.Scripts.Unity;
using Il2CppAssets.Scripts.Unity.Display;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions;
using Il2CppAssets.Scripts.Simulation.Towers;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2Cpp;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities;
[assembly: MelonGame("Ninja Kiwi", "BloonsTD6")]
namespace Player3Tower
{
public class Player3Tower : BloonsTD6Mod
{
public override void OnApplicationStart()
{
ModHelper.Msg<Player3Tower>("Player3Tower loaded!");
}
}
}
namespace player3displays
{
public abstract class Player3T1Display : ModTowerDisplay<player3>
{
public override float Scale => .9f;
public override void ModifyDisplayNode(UnityDisplayNode node)
{
node.RemoveBone("DartMonkeyDart");
}
public override void ModifyDisplayNodeAsync(UnityDisplayNode node, Action onComplete)
{
UseNode(GetDisplay(TowerType.BananaFarmer), bananaFarmer =>
{
var pitchfork = bananaFarmer.GetRenderers<SkinnedMeshRenderer>()[1].gameObject;
var newPitchFork = Object.Instantiate(pitchfork, node.transform.GetChild(0));
var pitchforkRenderer = newPitchFork.GetComponent<SkinnedMeshRenderer>();
pitchforkRenderer.rootBone = node.GetBone("NewMonkeyRigDart:MonkeyJnt_Spine02");
var boneNames = new[]
{
"NewMonkeyRigDart:MonkeyJnt_Hand_R", "NewMonkeyRigDart:MonkeyJnt_Hand_R",
"NewMonkeyRigDart:MonkeyJnt_Hand_R", "NewMonkeyRigDart:MonkeyJnt_Hand_R",
"NewMonkeyRigDart:MonkeyJnt_Hand_R"
};
pitchforkRenderer.bones = boneNames.Select(node.GetBone).ToIl2CppReferenceArray();
node.genericRenderers = node.genericRenderers.AddTo(pitchforkRenderer);
PostAddPitchfork(node, pitchfork);
node.RecalculateGenericRenderers();
onComplete();
});
}
protected virtual void PostAddPitchfork(UnityDisplayNode node, GameObject pitchfork)
{
node.genericRendererLayers = new Il2CppStructArray<int>(4);
}
}
public abstract class Player3500ForkDisplay : ModTowerDisplay<player3>
{
public override float Scale => .9f;
public override void ModifyDisplayNode(UnityDisplayNode node)
{
node.RemoveBone("AlchemistRig:Propjectile_R");
}
public override void ModifyDisplayNodeAsync(UnityDisplayNode node, Action onComplete)
{
UseNode(GetDisplay(TowerType.BananaFarmer), bananaFarmer =>
{
var pitchfork = bananaFarmer.GetRenderers<SkinnedMeshRenderer>()[1].gameObject;
var newPitchFork = Object.Instantiate(pitchfork, node.transform.GetChild(0));
var pitchforkRenderer = newPitchFork.GetComponent<SkinnedMeshRenderer>();
pitchforkRenderer.rootBone = node.GetBone("AlchemistRig:MonkeyJnt_Spine02");
var boneNames = new[]
{
"AlchemistRig:MonkeyJnt_Hand_R", "AlchemistRig:MonkeyJnt_Hand_R",
"AlchemistRig:MonkeyJnt_Hand_R", "AlchemistRig:MonkeyJnt_Hand_R",
"AlchemistRig:MonkeyJnt_Hand_R"
};
pitchforkRenderer.bones = boneNames.Select(node.GetBone).ToIl2CppReferenceArray();
node.genericRenderers = node.genericRenderers.AddTo(pitchforkRenderer);
PostAddPitchfork(node, pitchfork);
node.RecalculateGenericRenderers();
onComplete();
});
}
protected virtual void PostAddPitchfork(UnityDisplayNode node, GameObject pitchfork)
{
node.genericRendererLayers = new Il2CppStructArray<int>(4);
}
}
public class Player3BaseDisplay : Player3T1Display
{
public override string BaseDisplay => GetDisplay(TowerType.DartMonkey);
public override bool UseForTower(int[] tiers)
{
return tiers.Max() < 5 && tiers[2] < 3;
}
}
public class Player3500Display : Player3500ForkDisplay
{
public override string BaseDisplay => GetDisplay(TowerType.Alchemist, 0, 0, 5);
public override bool UseForTower(int[] tiers)
{
return tiers[0] == 5;
}
}
public class Player050Display : ModTowerDisplay<player3>
{
// Copy the Boomerang Monkey display
public override string BaseDisplay => GetDisplay(TowerType.Druid, 0, 4, 0);
public override bool UseForTower(int[] tiers)
{
return tiers[1] == 5;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
public class Player003Display : ModTowerDisplay<player3>
{
// Copy the Boomerang Monkey display
public override string BaseDisplay => GetDisplay(TowerType.Quincy);
public override bool UseForTower(int[] tiers)
{
return tiers[2] == 3;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
public class Player004Display : ModTowerDisplay<player3>
{
// Copy the Boomerang Monkey display
public override string BaseDisplay => GetDisplay(TowerType.Quincy);
public override bool UseForTower(int[] tiers)
{
return tiers[2] == 4;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
public class Player005Display : ModTowerDisplay<player3>
{
// Copy the Boomerang Monkey display
public override string BaseDisplay => GetDisplay(TowerType.BoomerangMonkey, 0, 5, 0);
public override bool UseForTower(int[] tiers)
{
return tiers[2] == 5;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
}
namespace weapondisplays
{
public class BananaDisplay : ModDisplay
{
public override string BaseDisplay => Generic2dDisplay;
public override void ModifyDisplayNode(UnityDisplayNode node)
{
Set2DTexture(node, "BananaDisplay");
}
}
}
namespace playerthree
{
public class player3 : ModTower
{
public override TowerSet TowerSet => TowerSet.Magic;
public override string BaseTower => TowerType.DartMonkey;
public override int Cost => 850;
public override int TopPathUpgrades => 5;
public override int MiddlePathUpgrades => 5;
public override int BottomPathUpgrades => 5;
public override string Description => "Player 3 joined the game";
public override void ModifyBaseTowerModel(TowerModel towerModel)
{
towerModel.range = 75;
var attackModel = towerModel.GetAttackModel();
var projectile = attackModel.weapons[0].projectile;
attackModel.range = 75;
attackModel.weapons[0].projectile.ApplyDisplay<weapondisplays.BananaDisplay>();
projectile.GetDamageModel().immuneBloonProperties = BloonProperties.Lead;
}
public override int GetTowerIndex(List<TowerDetailsModel> towerSet)
{
return towerSet.First(model => model.towerId == TowerType.NinjaMonkey).towerIndex + 1;
}
}
}
namespace playerthreeupgrades
{
public class Farmer : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => MIDDLE;
public override int Tier => 1;
public override int Cost => 1100;
public override string Description => "Now places farms at a slow speed";
public override void ApplyUpgrade(TowerModel towerModel)
{
var attackModel = towerModel.GetAttackModel();
var farm = Game.instance.model.GetTowerFromId("EngineerMonkey-200").GetAttackModel().Duplicate();
farm.range = towerModel.range;
farm.name = "Farm_Weapon";
farm.weapons[0].Rate = 15f;
farm.weapons[0].projectile.RemoveBehavior<CreateTowerModel>();
farm.weapons[0].projectile.ApplyDisplay<weapondisplays.BananaDisplay>();
farm.weapons[0].projectile.AddBehavior(new CreateTowerModel("BananaFarm000place", GetTowerModel<BananaFarmer000Farm>().Duplicate(), 0f, true, false, false, true, true));
towerModel.AddBehavior(farm);
var projectile = attackModel.weapons[0].projectile;
}
}
public class FasterTilling : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => MIDDLE;
public override int Tier => 2;
public override int Cost => 600;
public override string Description => "Farms are placed slightly faster";
public override void ApplyUpgrade(TowerModel towerModel)
{
var attackModel = towerModel.GetAttackModel();
var projectile = attackModel.weapons[0].projectile;
attackModel.weapons[0].projectile.ApplyDisplay<weapondisplays.BananaDisplay>();
foreach (var attacks in towerModel.GetAttackModels())
{
if (attacks.name.Contains("Farm"))
{
attacks.weapons[0].Rate -= 1.5f;
}
}
}
}
public class BetterRevenue : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => MIDDLE;
public override int Tier => 3;
public override int Cost => 2300;
public override string Description => "Farms are improved and make more money per round";
public override void ApplyUpgrade(TowerModel towerModel)
{
var attackModel = towerModel.GetAttackModel();
var projectile = attackModel.weapons[0].projectile;
foreach (var attacks in towerModel.GetAttackModels())
{
if (attacks.name.Contains("Farm"))
{
attacks.weapons[0].projectile.GetBehavior<CreateTowerModel>().tower = GetTowerModel<BananaFarmer120Farm>().Duplicate();
}
}
}
}
public class BananaForests : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => MIDDLE;
public override int Tier => 4;
public override int Cost => 12300;
public override string Description => "Replaces the farms with banana forests that last for longer";
public override void ApplyUpgrade(TowerModel towerModel)
{
var attackModel = towerModel.GetAttackModel();
var projectile = attackModel.weapons[0].projectile;
foreach (var attacks in towerModel.GetAttackModels())
{
if (attacks.name.Contains("Farm"))
{
attacks.weapons[0].Rate -= 1f;
attacks.weapons[0].projectile.GetBehavior<CreateTowerModel>().tower = GetTowerModel<BananaFarmer320Farm>().Duplicate();
}
}
}
}
public class BananaFactory : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => MIDDLE;
public override int Tier => 5;
public override int Cost => 126000;
public override string Description => "Farms become mega factorys that make LOTS of money";
public override void ApplyUpgrade(TowerModel towerModel)
{
var attackModel = towerModel.GetAttackModel();
var projectile = attackModel.weapons[0].projectile;
foreach (var attacks in towerModel.GetAttackModels())
{
if (attacks.name.Contains("Farm"))
{
attacks.weapons[0].projectile.GetBehavior<CreateTowerModel>().tower = GetTowerModel<BananaFarmer500Farm>().Duplicate();
}
}
}
}
public class SpikyBananas : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => TOP;
public override int Tier => 1;
public override int Cost => 100;
public override string Description => "Spiky bananas deal extra damage";
public override void ApplyUpgrade(TowerModel towerModel)
{
var attackModel = towerModel.GetAttackModel();
var projectile = attackModel.weapons[0].projectile;
projectile.GetDamageModel().damage += 1;
}
}
public class HeatTippedBananas : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => TOP;
public override int Tier => 2;
public override int Cost => 500;
public override string Description => "Now damages moab class bloons and deals x2 damage to ceramic bloons";
public override void ApplyUpgrade(TowerModel towerModel)
{
var attackModel = towerModel.GetAttackModel();
var projectile = attackModel.weapons[0].projectile;
projectile.GetDamageModel().damage += 1;
projectile.GetDamageModel().immuneBloonProperties = BloonProperties.None;
projectile.AddBehavior(new DamageModifierForBloonTypeModel("CeramicDamage", "ceramic", 2f, 0f, true));
}
}
public class BoxOTowers : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => TOP;
public override int Tier => 3;
public override int Cost => 1800;
public override string Description => "Throws a random assortment of towers";
public override void ApplyUpgrade(TowerModel towerModel)
{
var towerninja = Game.instance.model.GetTowerFromId("EngineerMonkey-200").GetAttackModel().Duplicate();
towerninja.range = towerModel.range;
towerninja.name = "Ninja_Tower";
towerninja.weapons[0].Rate = 15f;
towerninja.weapons[0].projectile.RemoveBehavior<CreateTowerModel>();
towerninja.weapons[0].projectile.ApplyDisplay<weapondisplays.BananaDisplay>();
towerninja.weapons[0].projectile.AddBehavior(new CreateTowerModel("Ninja320place", GetTowerModel<Ninja320>().Duplicate(), 0f, true, false, false, true, true));
towerModel.AddBehavior(towerninja);
var towersniper = Game.instance.model.GetTowerFromId("EngineerMonkey-200").GetAttackModel().Duplicate();
towersniper.range = towerModel.range;
towersniper.name = "Sniper_Tower";
towersniper.weapons[0].Rate = 4.5f;
towersniper.weapons[0].projectile.RemoveBehavior<CreateTowerModel>();
towersniper.weapons[0].projectile.ApplyDisplay<weapondisplays.BananaDisplay>();
towersniper.weapons[0].projectile.AddBehavior(new CreateTowerModel("Sniperplace", GetTowerModel<Sniper000>().Duplicate(), 0f, true, false, false, true, true));
towerModel.AddBehavior(towersniper);
var towerquincy = Game.instance.model.GetTowerFromId("EngineerMonkey-200").GetAttackModel().Duplicate();
towerquincy.range = towerModel.range;
towerquincy.name = "Quincy_Tower";
towerquincy.weapons[0].Rate = 12f;
towerquincy.weapons[0].projectile.RemoveBehavior<CreateTowerModel>();
towerquincy.weapons[0].projectile.ApplyDisplay<weapondisplays.BananaDisplay>();
towerquincy.weapons[0].projectile.AddBehavior(new CreateTowerModel("Quincyplace", GetTowerModel<Quincy>().Duplicate(), 0f, true, false, false, true, true));
towerModel.AddBehavior(towerquincy);
}
}
public class BiggerBox : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => TOP;
public override int Tier => 4;
public override int Cost => 2000;
public override string Description => "Throws towers faster and gains a new selection";
public override void ApplyUpgrade(TowerModel towerModel)
{
foreach (var attacks in towerModel.GetAttackModels())
{
if (attacks.name.Contains("Tower"))
{
attacks.weapons[0].Rate *= .8f;
}
}
var towerpat = Game.instance.model.GetTowerFromId("EngineerMonkey-200").GetAttackModel().Duplicate();
towerpat.range = towerModel.range;
towerpat.name = "Pat_Tower";
towerpat.weapons[0].Rate = 12f;
towerpat.weapons[0].projectile.RemoveBehavior<CreateTowerModel>();
towerpat.weapons[0].projectile.ApplyDisplay<weapondisplays.BananaDisplay>();
towerpat.weapons[0].projectile.AddBehavior(new CreateTowerModel("Patplace", GetTowerModel<PatFusty>().Duplicate(), 0f, true, false, false, true, true));
towerModel.AddBehavior(towerpat);
}
}
public class GoldenEmperor : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => TOP;
public override int Tier => 5;
public override int Cost => 58900;
public override string Description => "The Emperors army is much improved";
public override void ApplyUpgrade(TowerModel towerModel)
{
foreach (var attacks in towerModel.GetAttackModels())
{
if (attacks.name.Contains("Tower"))
{
attacks.weapons[0].Rate *= .8f;
}
if (attacks.name.Contains("Quincy"))
{
attacks.weapons[0].projectile.GetBehavior<CreateTowerModel>().tower = GetTowerModel<Quincy14>().Duplicate();
}
if (attacks.name.Contains("Pat"))
{
attacks.weapons[0].projectile.GetBehavior<CreateTowerModel>().tower = GetTowerModel<PatFusty14>().Duplicate();
}
if (attacks.name.Contains("Sniper"))
{
attacks.weapons[0].projectile.GetBehavior<CreateTowerModel>().tower = GetTowerModel<Sniper005>().Duplicate();
}
if (attacks.name.Contains("Ninja"))
{
attacks.weapons[0].projectile.GetBehavior<CreateTowerModel>().tower = GetTowerModel<Ninja520>().Duplicate();
}
}
}
}
public class QuickHands : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => BOTTOM;
public override int Tier => 1;
public override int Cost => 200;
public override string Description => "Quick Hands allow faster throwing";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.GetAttackModel().weapons[0].Rate -= .2f;
}
}
public class HeavyBananas : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => BOTTOM;
public override int Tier => 2;
public override int Cost => 300;
public override string Description => "Heavy bananas pierce through more bloons";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.GetAttackModel().weapons[0].projectile.pierce += 1;
}
}
public class QuadSuit : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => BOTTOM;
public override string DisplayName => "Q.U.A.D Suit";
public override int Tier => 3;
public override int Cost => 800;
public override string Description => "Gains Quincy Undercover Automated Defence suit that helps fight the bloons";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.GetAttackModel().weapons[0].Rate -= .2f;
towerModel.GetAttackModel().weapons[0].projectile.pierce += 1;
}
}
public class LaserReactorCore : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => BOTTOM;
public override int Tier => 4;
public override int Cost => 12500;
public override string Description => "Adds a massive targetable laser to the back of the suit";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.GetAttackModel().weapons[0] = Game.instance.model.GetTowerFromId("DartlingGunner-300").GetAttackModel().weapons[0].Duplicate();
towerModel.GetAttackModel().weapons[0].Rate *= .5f;
}
}
public class QuadExoAlpha : ModUpgrade<player3>
{
public override string Portrait => "player3-Portrait.png";
public override int Path => BOTTOM;
public override int Tier => 5;
public override int Cost => 115000;
public override string DisplayName => "Q.U.A.D Exo-Suit";
public override string Description => "The alpha exo suit improves abilities beyond human possibilities";
public override void ApplyUpgrade(TowerModel towerModel)
{
towerModel.AddBehavior(Game.instance.model.GetTowerFromId("SuperMonkey-050").GetBehavior<AbilityModel>().Duplicate());
var attackAbil = towerModel.GetBehavior<AbilityModel>();
towerModel.GetBehavior<AbilityModel>().icon = GetSpriteReference(mod, "QuadExoAlpha-Icon");
towerModel.GetBehavior<AbilityModel>().cooldown = 25f;
towerModel.GetAttackModel().weapons[0].Rate *= .01f;
towerModel.GetAttackModel().weapons[0].projectile.GetDamageModel().damage *= 3;
}
}
}
namespace bananafarmfake
{
public class BananaFarmer000Farm : ModTower
{
public override string Portrait => "000-BananaFarm";
public override string Name => "Banana Farm";
public override TowerSet TowerSet => TowerSet.Support;
public override string BaseTower => TowerType.BananaFarm;
public override bool DontAddToShop => true;
public override int Cost => 0;
public override int TopPathUpgrades => 0;
public override int MiddlePathUpgrades => 0;
public override int BottomPathUpgrades => 0;
public override string DisplayName => "Banana Farm";
public override string Description => "";
public override void ModifyBaseTowerModel(TowerModel towerModel)
{
towerModel.isSubTower = true;
towerModel.AddBehavior(new TowerExpireModel("ExpireModel", 45f, 3, false, false));
}
public class Player3Farm000Display : ModTowerDisplay<BananaFarmer000Farm>
{
public override float Scale => .6f;
public override string BaseDisplay => GetDisplay(TowerType.BananaFarm, 0, 0, 0);
public override bool UseForTower(int[] tiers)
{
return true;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
}
public class BananaFarmer120Farm : ModTower
{
public override string Portrait => "000-BananaFarm";
public override string Name => "Banana Farm 1-2-0";
public override TowerSet TowerSet => TowerSet.Support;
public override string BaseTower => "BananaFarm-120";
public override bool DontAddToShop => true;
public override int Cost => 0;
public override int TopPathUpgrades => 0;
public override int MiddlePathUpgrades => 0;
public override int BottomPathUpgrades => 0;
public override string DisplayName => "Improved Banana Farm";
public override string Description => "";
public override void ModifyBaseTowerModel(TowerModel towerModel)
{
towerModel.isSubTower = true;
towerModel.AddBehavior(new TowerExpireModel("ExpireModel", 45f, 1, false, false));
}
public class Player3Farm120Display : ModTowerDisplay<BananaFarmer120Farm>
{
public override float Scale => .6f;
public override string BaseDisplay => GetDisplay(TowerType.BananaFarm, 1, 2, 0);
public override bool UseForTower(int[] tiers)
{
return true;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
}
public class BananaFarmer320Farm : ModTower
{
public override string Portrait => "300-BananaFarm";
public override string Name => "Banana Farm 3-2-0";
public override TowerSet TowerSet => TowerSet.Support;
public override string BaseTower => "BananaFarm-320";
public override bool DontAddToShop => true;
public override int Cost => 0;
public override int TopPathUpgrades => 0;
public override int MiddlePathUpgrades => 0;
public override int BottomPathUpgrades => 0;
public override string DisplayName => "Improved Banana Forest";
public override string Description => "";
public override void ModifyBaseTowerModel(TowerModel towerModel)
{
towerModel.isSubTower = true;
towerModel.AddBehavior(new TowerExpireModel("ExpireModel", 50f, 1, false, false));
}
public class Player3Farm320Display : ModTowerDisplay<BananaFarmer320Farm>
{
public override float Scale => .6f;
public override string BaseDisplay => GetDisplay(TowerType.BananaFarm, 3, 2, 0);
public override bool UseForTower(int[] tiers)
{
return true;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
}
public class BananaFarmer500Farm : ModTower
{
public override string Portrait => "500-BananaFarm";
public override string Name => "Banana Farm 5-0-0";
public override TowerSet TowerSet => TowerSet.Support;
public override string BaseTower => "BananaFarm-500";
public override bool DontAddToShop => true;
public override int Cost => 0;
public override int TopPathUpgrades => 0;
public override int MiddlePathUpgrades => 0;
public override int BottomPathUpgrades => 0;
public override string DisplayName => "Improved Banana Factory";
public override string Description => "";
public override void ModifyBaseTowerModel(TowerModel towerModel)
{
towerModel.isSubTower = true;
towerModel.AddBehavior(new TowerExpireModel("ExpireModel", 30f, 1, false, false));
}
public class Player3Farm500Display : ModTowerDisplay<BananaFarmer500Farm>
{
public override float Scale => .6f;
public override string BaseDisplay => GetDisplay(TowerType.BananaFarm, 5, 2, 0);
public override bool UseForTower(int[] tiers)
{
return true;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
}
}
namespace RandomTowers
{
public class Ninja320 : ModTower
{
public override string Portrait => "320-Ninja";
public override string Name => "320 Ninja";
public override TowerSet TowerSet => TowerSet.Support;
public override string BaseTower => "NinjaMonkey-320";
public override bool DontAddToShop => true;
public override int Cost => 0;
public override int TopPathUpgrades => 0;
public override int MiddlePathUpgrades => 0;
public override int BottomPathUpgrades => 0;
public override string DisplayName => "Ninja 320";
public override string Description => "";
public override void ModifyBaseTowerModel(TowerModel towerModel)
{
towerModel.isSubTower = true;
towerModel.AddBehavior(new TowerExpireModel("ExpireModel", 15f, 1, false, false));
}
public class Player3Ninja1Display : ModTowerDisplay<Ninja320>
{
public override float Scale => .6f;
public override string BaseDisplay => GetDisplay(TowerType.NinjaMonkey, 3, 2, 0);
public override bool UseForTower(int[] tiers)
{
return true;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
}
public class Sniper000 : ModTower
{
public override string Portrait => "000-Sniper";
public override string Name => "000 Sniper";
public override TowerSet TowerSet => TowerSet.Support;
public override string BaseTower => TowerType.SniperMonkey;
public override bool DontAddToShop => true;
public override int Cost => 0;
public override int TopPathUpgrades => 0;
public override int MiddlePathUpgrades => 0;
public override int BottomPathUpgrades => 0;
public override string DisplayName => "Sniper 000";
public override string Description => "";
public override void ModifyBaseTowerModel(TowerModel towerModel)
{
towerModel.isSubTower = true;
towerModel.AddBehavior(new TowerExpireModel("ExpireModel", 20f, 1, false, false));
}
public class Player3Sniper1Display : ModTowerDisplay<Sniper000>
{
public override float Scale => .6f;
public override string BaseDisplay => GetDisplay(TowerType.SniperMonkey, 0, 0, 0);
public override bool UseForTower(int[] tiers)
{
return true;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
}
public class Quincy : ModTower
{
public override string Portrait => "1-Quincy";
public override string Name => "1 Quincy";
public override TowerSet TowerSet => TowerSet.Support;
public override string BaseTower => TowerType.Quincy;
public override bool DontAddToShop => true;
public override int Cost => 0;
public override int TopPathUpgrades => 0;
public override int MiddlePathUpgrades => 0;
public override int BottomPathUpgrades => 0;
public override string DisplayName => "Quincy 1";
public override string Description => "";
public override void ModifyBaseTowerModel(TowerModel towerModel)
{
towerModel.isSubTower = true;
towerModel.AddBehavior(new TowerExpireModel("ExpireModel", 30f, 1, false, false));
}
public class Player3Quincy1Display : ModTowerDisplay<Quincy>
{
public override float Scale => .6f;
public override string BaseDisplay => GetDisplay(TowerType.Quincy);
public override bool UseForTower(int[] tiers)
{
return true;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
}
public class PatFusty : ModTower
{
public override string Portrait => "1-PatFusty";
public override string Name => "1 PatFusty";
public override TowerSet TowerSet => TowerSet.Support;
public override string BaseTower => TowerType.PatFusty;
public override bool DontAddToShop => true;
public override int Cost => 0;
public override int TopPathUpgrades => 0;
public override int MiddlePathUpgrades => 0;
public override int BottomPathUpgrades => 0;
public override string DisplayName => "PatFusty 1";
public override string Description => "";
public override void ModifyBaseTowerModel(TowerModel towerModel)
{
towerModel.isSubTower = true;
towerModel.AddBehavior(new TowerExpireModel("ExpireModel", 30f, 1, false, false));
}
public class Player3Pat1Display : ModTowerDisplay<PatFusty>
{
public override float Scale => .6f;
public override string BaseDisplay => GetDisplay(TowerType.PatFusty);
public override bool UseForTower(int[] tiers)
{
return true;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
}
public class PatFusty14 : ModTower
{
public override string Portrait => "1-PatFusty";
public override string Name => "14 PatFusty";
public override TowerSet TowerSet => TowerSet.Support;
public override string BaseTower => "PatFusty 14";
public override bool DontAddToShop => true;
public override int Cost => 0;
public override int TopPathUpgrades => 0;
public override int MiddlePathUpgrades => 0;
public override int BottomPathUpgrades => 0;
public override string DisplayName => "PatFusty 14";
public override string Description => "";
public override void ModifyBaseTowerModel(TowerModel towerModel)
{
towerModel.isSubTower = true;
towerModel.AddBehavior(new TowerExpireModel("ExpireModel", 25f, 1, false, false));
}
public class Player3Pat10Display : ModTowerDisplay<PatFusty14>
{
public override float Scale => .6f;
public override string BaseDisplay => GetDisplay(TowerType.PatFusty);
public override bool UseForTower(int[] tiers)
{
return true;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
}
public class Quincy14 : ModTower
{
public override string Portrait => "1-Quincy";
public override string Name => "14 Quincy";
public override TowerSet TowerSet => TowerSet.Support;
public override string BaseTower => "Quincy 14";
public override bool DontAddToShop => true;
public override int Cost => 0;
public override int TopPathUpgrades => 0;
public override int MiddlePathUpgrades => 0;
public override int BottomPathUpgrades => 0;
public override string DisplayName => "Quincy 14";
public override string Description => "";
public override void ModifyBaseTowerModel(TowerModel towerModel)
{
towerModel.isSubTower = true;
towerModel.AddBehavior(new TowerExpireModel("ExpireModel", 25f, 1, false, false));
}
public class Player3Quincy10Display : ModTowerDisplay<Quincy14>
{
public override float Scale => .6f;
public override string BaseDisplay => GetDisplay(TowerType.Quincy);
public override bool UseForTower(int[] tiers)
{
return true;
}
public override void ModifyDisplayNode(UnityDisplayNode node)
{
}
}
}
public class Sniper005 : ModTower
{
public override string Portrait => "000-Sniper";
public override string Name => "005 Sniper";
public override TowerSet TowerSet => TowerSet.Support;
public override string BaseTower => "SniperMonkey-005";
public override bool DontAddToShop => true;
public override int Cost => 0;
public override int TopPathUpgrades => 0;
public override int MiddlePathUpgrades => 0;
public override int BottomPathUpgrades => 0;