-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCustomizableParagon.cs
More file actions
33 lines (33 loc) · 1.75 KB
/
CustomizableParagon.cs
File metadata and controls
33 lines (33 loc) · 1.75 KB
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
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions;
using Il2CppAssets.Scripts.Models.Towers.Filters;
using Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors;
using static CustomizableTower.CustomizableTower;
namespace CustomizableTower
{
internal class CustomizableParagon : ModParagonUpgrade<CustomizableTowerClass>
{
public override int Cost => ParagonCost;
public override string DisplayName => ParagonName;
public override string Description => ParagonDescription;
public override string Icon => "CustomizableParagon-Icon";
public override string Portrait => "CustomizableParagon-Icon";
public override void ApplyUpgrade(TowerModel towerModel)
{
CustomizableTowerClass.TotalDamage += ParagonDamageBuff;
foreach(var WeaponModel in towerModel.GetWeapons())
{
WeaponModel.rate = ParagonSpeed;
WeaponModel.projectile.pierce = ParagonPierce;
WeaponModel.projectile.AddBehavior(new DamageModel(null, CustomizableTowerClass.TotalDamage, 9999999999999999999, false, false, true, Il2Cpp.BloonProperties.None, Il2Cpp.BloonProperties.None, false, false));
WeaponModel.emission = new ArcEmissionModel(null, ParagonMultiShotNumber, ParagonMultiShotOffset, ParagonMultiShotAngle, null, false, false);
}
towerModel.ApplyDisplay<CustomizableParagonDisplay>();
towerModel.range = ParagonRange;
towerModel.GetAttackModel().range = ParagonRange;
towerModel.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);
}
}
}