Skip to content

Commit

Permalink
Update 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LynxCGames committed Apr 11, 2024
1 parent 2667d87 commit e065b19
Show file tree
Hide file tree
Showing 31 changed files with 320 additions and 278 deletions.
Binary file modified Assets/Monkey Ace/Tier5 Ace Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Projectiles/BeastOrbBird.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Projectiles/BeastOrbDino.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Projectiles/BeastOrbFish.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Projectiles/EnergyBeam.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Projectiles/GhostBall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Projectiles/LeadBall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
100 changes: 100 additions & 0 deletions Assets/Projectiles/Projectiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,46 @@ public override void ModifyDisplayNode(UnityDisplayNode node)
}
}

public class LeadBall : ModDisplay
{
public override string BaseDisplay => Generic2dDisplay;

public override void ModifyDisplayNode(UnityDisplayNode node)
{
Set2DTexture(node, Name);
}
}

public class GhostBall : ModDisplay
{
public override string BaseDisplay => Generic2dDisplay;

public override void ModifyDisplayNode(UnityDisplayNode node)
{
Set2DTexture(node, Name);
}
}

public class T4SouldOrb : ModDisplay
{
public override string BaseDisplay => Generic2dDisplay;

public override void ModifyDisplayNode(UnityDisplayNode node)
{
Set2DTexture(node, Name);
}
}

public class T5SouldOrb : ModDisplay
{
public override string BaseDisplay => Generic2dDisplay;

public override void ModifyDisplayNode(UnityDisplayNode node)
{
Set2DTexture(node, Name);
}
}

public class Laser : ModDisplay
{
public override string BaseDisplay => Generic2dDisplay;
Expand Down Expand Up @@ -164,6 +204,36 @@ public override void ModifyDisplayNode(UnityDisplayNode node)
}
}

public class SpectralOrb : ModDisplay
{
public override string BaseDisplay => Generic2dDisplay;

public override void ModifyDisplayNode(UnityDisplayNode node)
{
Set2DTexture(node, Name);
}
}

public class SpectralShard : ModDisplay
{
public override string BaseDisplay => Generic2dDisplay;

public override void ModifyDisplayNode(UnityDisplayNode node)
{
Set2DTexture(node, Name);
}
}

public class EnergyBeam : ModDisplay
{
public override string BaseDisplay => Generic2dDisplay;

public override void ModifyDisplayNode(UnityDisplayNode node)
{
Set2DTexture(node, Name);
}
}

public class ForceFields : ModDisplay
{
public override string BaseDisplay => Generic2dDisplay;
Expand Down Expand Up @@ -193,4 +263,34 @@ public override void ModifyDisplayNode(UnityDisplayNode node)
Set2DTexture(node, Name);
}
}

public class BeastOrbFish : ModDisplay
{
public override string BaseDisplay => Generic2dDisplay;

public override void ModifyDisplayNode(UnityDisplayNode node)
{
Set2DTexture(node, Name);
}
}

public class BeastOrbDino : ModDisplay
{
public override string BaseDisplay => Generic2dDisplay;

public override void ModifyDisplayNode(UnityDisplayNode node)
{
Set2DTexture(node, Name);
}
}

public class BeastOrbBird : ModDisplay
{
public override string BaseDisplay => Generic2dDisplay;

public override void ModifyDisplayNode(UnityDisplayNode node)
{
Set2DTexture(node, Name);
}
}
}
Binary file added Assets/Projectiles/SpectralOrb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Projectiles/SpectralShard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Projectiles/T4SouldOrb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Projectiles/T5SouldOrb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 1 addition & 5 deletions Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ namespace AlternatePaths;

public class AlternatePaths : BloonsTD6Mod
{
//foreach (var behavior in Game.instance.model.GetTower(TowerType.BananaFarm, 0, 0, 5).behaviors)
//{
// ModHelper.Msg<AlternatePaths>(behavior.TypeName());
//}
}

public class DartMonkeyAltPath : PathPlusPlus
public class DartMonkeyAltPath : PathPlusPlus
{
public override string Tower => TowerType.DartMonkey;
public override int UpgradeCount => 5;
Expand Down
6 changes: 3 additions & 3 deletions ModHelperData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

public static class ModHelperData
{
public const string WorksOnVersion = "41.3";
public const string Version = "1.2.1";
public const string WorksOnVersion = "42.0";
public const string Version = "1.2.2";
public const string Name = "4th Path Overhaul";
public const string Author = "LynxC";

public const string Description = "Adds a 4th upgrade path to every tower in the game. 10 towers currently available - " +
public const string Description = "Adds a 4th upgrade path to every tower in the game. 16 towers currently available - " +
"Dart Monkey, Boomerang Monkey, Bomb Shooter, Tack Shooter, Ice Monkey, Glue Gunner, Sniper Monkey, Monkey Sub, Monkey Ace, Heli Pilot, Dartling Gunner, Wizard, Ninja, Banana Farm, Spike Factory, and Engineer.";

public const string Dependencies = "doombubbles/paths-plus-plus";
Expand Down
File renamed without changes.
9 changes: 7 additions & 2 deletions Towers/Wizard.cs → Towers/Magic/Wizard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions;
using PathsPlusPlus;
using AlternatePaths;
using BTD_Mod_Helper.Api.Enums;
using Il2CppAssets.Scripts.Models.Towers.Filters;

namespace Wizard;

Expand Down Expand Up @@ -101,11 +103,14 @@ public override void ApplyUpgrade(TowerModel towerModel, int tier)
lightning.animation = 1;
lightning.projectile.GetDamageModel().immuneBloonProperties = BloonProperties.None;

if (towerModel.appliedUpgrades.Contains(UpgradeType.MonkeySense))
{
lightning.projectile.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);
}

towerModel.GetAttackModel().AddWeapon(lightning);

towerModel.GetAttackModel().weapons[0].rate /= 1.8f;


towerModel.GetAttackModel().weapons[0].projectile.GetDamageModel().damage += 3;
towerModel.GetAttackModel().weapons[0].projectile.pierce += 4;
}
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 2 additions & 5 deletions Towers/MonkeyAce.cs → Towers/Military/MonkeyAce.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ public override void ApplyUpgrade(TowerModel towerModel, int tier)
}


var carrier = Game.instance.model.GetTower(TowerType.MonkeyBuccaneer, 4).GetAttackModel(1).Duplicate();
var plane = Game.instance.model.GetTowerFromId("BuccaneerGreaterPlane").Duplicate();
var carrier = Game.instance.model.GetTower(TowerType.MonkeyBuccaneer, 5).GetAttackModel(1).Duplicate();
var plane = carrier.weapons[0].projectile.GetBehavior<CreateTowerModel>().tower;
var gatling = Game.instance.model.GetTower(TowerType.HeliPilot, 4).GetAttackModel().weapons[2].Duplicate();

plane.GetBehavior<TowerExpireOnParentUpgradedModel>().parentTowerUpgradeTier = 5;
Expand Down Expand Up @@ -215,11 +215,8 @@ public override void ApplyUpgrade(TowerModel towerModel, int tier)
plane.GetAttackModel(1).AddWeapon(gatling);


plane.baseId = "BuccaneerLesserPlane";
carrier.weapons[0].GetBehavior<SubTowerFilterModel>().baseSubTowerId = "BuccaneerLesserPlane";
carrier.weapons[0].GetBehavior<SubTowerFilterModel>().maxNumberOfSubTowers = 2;

carrier.weapons[0].projectile.GetBehavior<CreateTowerModel>().tower = plane;
towerModel.AddBehavior(carrier);
}
}
7 changes: 7 additions & 0 deletions Towers/MonkeySub.cs → Towers/Military/MonkeySub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using PathsPlusPlus;
using AlternatePaths;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions;
using BTD_Mod_Helper.Api.Enums;
using Il2CppAssets.Scripts.Models.Towers.Filters;

namespace MonketSub;

Expand Down Expand Up @@ -43,6 +45,11 @@ public override void ApplyUpgrade(TowerModel towerModel, int tier)
torpedo.projectile.scale /= 1.65f;
torpedo.name = "Torpedo";

if (towerModel.appliedUpgrades.Contains(UpgradeType.AdvancedIntel))
{
torpedo.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);
}

towerModel.GetAttackModel().AddWeapon(torpedo);
}
}
Expand Down
18 changes: 14 additions & 4 deletions Towers/Sniper.cs → Towers/Military/Sniper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,18 @@ public override void ApplyUpgrade(TowerModel towerModel, int tier)
var shrapnel = Game.instance.model.GetTower(TowerType.TackShooter).GetAttackModel().weapons[0].projectile.Duplicate();
shrapnel.pierce = 3;
shrapnel.GetBehavior<TravelStraitModel>().Lifespan *= 1.5f;
shrapnel.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);


if (towerModel.appliedUpgrades.Contains(UpgradeType.NightVisionGoggles))
{
shrapnel.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);
}

if (towerModel.appliedUpgrades.Contains(UpgradeType.FullMetalJacket))
{
shrapnel.GetDamageModel().immuneBloonProperties = BloonProperties.None;
}

if (towerModel.appliedUpgrades.Contains(UpgradeType.ShrapnelShot))
{
shrapnel.GetDamageModel().damage = 3;
Expand Down Expand Up @@ -169,27 +175,31 @@ public override void ApplyUpgrade(TowerModel towerModel, int tier)
rocket.rate = Game.instance.model.GetTower(TowerType.SniperMonkey).GetAttackModel().weapons[0].rate;
rocket.projectile.GetBehavior<TravelStraitModel>().Lifespan *= 3;
rocket.projectile.GetBehavior<TravelStraitModel>().Speed /= 1.45f;
rocket.projectile.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);


var shrapnel = Game.instance.model.GetTower(TowerType.TackShooter).GetAttackModel().weapons[0].projectile.Duplicate();
shrapnel.GetBehavior<TravelStraitModel>().Speed *= 1.5f;
shrapnel.GetBehavior<TravelStraitModel>().Lifespan *= 1.75f;
shrapnel.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);


var blast = rocket.projectile.GetBehavior<CreateProjectileOnContactModel>().projectile;
blast.GetDamageModel().damage = 7;
blast.radius = 30;
blast.pierce = 65;
blast.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);
blast.GetDamageModel().immuneBloonProperties = BloonProperties.None;


var explosion = rocket.projectile.GetBehavior<CreateEffectOnContactModel>().effectModel;
explosion.scale *= 3f;


if (towerModel.appliedUpgrades.Contains(UpgradeType.NightVisionGoggles))
{
rocket.projectile.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);
shrapnel.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);
blast.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);
}

if (towerModel.appliedUpgrades.Contains(UpgradeType.FullMetalJacket))
{
blast.GetDamageModel().damage += 1;
Expand Down
File renamed without changes.
11 changes: 5 additions & 6 deletions Towers/Boomerang.cs → Towers/Primary/Boomerang.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using AlternatePaths.Displays.Projectiles;
using System.Linq;
using Il2CppAssets.Scripts.Models.Towers.Weapons.Behaviors;
using Il2Cpp;

namespace Boomerang;

Expand All @@ -24,17 +25,14 @@ public class CamoTraining : UpgradePlusPlus<BoomerangAltPath>
public override string Portrait => "Tier1 Boomerang";

public override string DisplayName => "Camo Training";
public override string Description => "Can now hit and deal additional damage to Camo Bloons.";
public override string Description => "Can now hit and boomerangs deal additional damage to Camo Bloons.";

public override void ApplyUpgrade(TowerModel towerModel, int tier)
{
towerModel.GetDescendants<FilterInvisibleModel>().ForEach(model => model.isActive = false);

foreach (var weaponModel in towerModel.GetDescendants<WeaponModel>().ToArray())
{
weaponModel.projectile.hasDamageModifiers = true;
weaponModel.projectile.AddBehavior(new DamageModifierForTagModel("aaa", "Camo", 1, 1, false, false) { name = "CamoModifier_" });
}
towerModel.GetAttackModel().weapons[0].projectile.hasDamageModifiers = true;
towerModel.GetAttackModel().weapons[0].projectile.AddBehavior(new DamageModifierForTagModel("aaa", "Camo", 1, 1, false, false) { name = "CamoModifier_" });
}
}

Expand Down Expand Up @@ -138,6 +136,7 @@ public override void ApplyUpgrade(TowerModel towerModel, int tier)
foreach (var weaponModel in towerModel.GetDescendants<WeaponModel>().ToArray())
{
weaponModel.projectile.GetDamageModel().damage += 4;
weaponModel.projectile.GetDamageModel().immuneBloonProperties = BloonProperties.None;
weaponModel.projectile.GetBehavior<AddBehaviorToBloonModel>().GetBehavior<DamageOverTimeModel>().interval *= .5f;
weaponModel.projectile.GetBehavior<AddBehaviorToBloonModel>().GetBehavior<DamageOverTimeModel>().damage += 5;
weaponModel.projectile.GetBehavior<AddBehaviorToBloonModel>().lifespan *= 2;
Expand Down
Loading

0 comments on commit e065b19

Please sign in to comment.