public static void AbsoluteZero(TowerModel model) { var realSlow = model.GetBehavior <SlowBloonsZoneModel>(); var totem = Game.instance.model.GetTowerFromId("NaturesWardTotem"); var slow = totem.GetBehaviors <SlowBloonsZoneModel>().First(b => !b.name.Contains("NonMoabs")).Duplicate(); slow.zoneRadius = realSlow.zoneRadius; slow.bindRadiusToTowerRange = true; slow.radiusOffset = realSlow.radiusOffset; slow.mutator.Cast <SlowBloonsZoneModel.Mutator>().speedScale -= .1f; model.AddBehavior(slow); var buff = new RateSupportModel("RateSupportZoneModel_AbilityChoice", 2f / 3f, true, "AbsoluteZeroRateBuff2", false, 1, new Il2CppReferenceArray <TowerFilterModel>( new TowerFilterModel[] { new FilterInBaseTowerIdModel("FilterInBaseTowerIdModel_", new Il2CppStringArray(new [] { IceMonkey })) } ) , "", ""); buff.showBuffIcon = false; buff.appliesToOwningTower = true; model.AddBehavior(buff); }
public static void JunglesBounty(TowerModel model) { var village = Game.instance.model.GetTower(MonkeyVillage, 0, 0, 4); var behavior = village.GetBehavior <MonkeyCityIncomeSupportModel>().Duplicate(); behavior.incomeModifier = 1.15f; behavior.appliesToOwningTower = false; behavior.isUnique = false; model.AddBehavior(behavior); var boat = Game.instance.model.GetTower(MonkeyBuccaneer, 0, 0, 3); var cash = boat.GetBehavior <PerRoundCashBonusTowerModel>().Duplicate(); model.AddBehavior(cash); }
public static void SpiritoftheForest(TowerModel model) { JunglesBounty(model); var lives = new BonusLivesPerRoundModel("BonusLivesPerRoundModel", 25, 1f, "9bef6b3a7356f834eb953cc79622cdef"); model.AddBehavior(lives); }
public static void TechTerror(TowerModel model) { var ability = model.GetAbilites()[0]; var abilityAttack = ability.GetBehavior <ActivateAttackModel>().attacks[0].Duplicate(); var abilityWeapon = abilityAttack.weapons[0]; var effect = ability.GetBehavior <CreateEffectOnAbilityModel>().effectModel; abilityWeapon.projectile.display = effect.assetId; var effectBehavior = new CreateEffectOnExhaustFractionModel("CreateEffectOnExhaustFractionModel_Annihilation", "", effect, 0, false, 1.0f, -1f, false); abilityWeapon.projectile.AddBehavior(effectBehavior); /* * var sound = ability.GetBehavior<CreateSoundOnAbilityModel>().sound; * var soundBehavior = * new CreateSoundOnProjectileExhaustModel("AbilityChoice", sound, sound, sound, sound, sound); * abilityWeapon.projectile.AddBehavior(soundBehavior); */ abilityWeapon.projectile.GetDamageModel().damage /= 20; abilityWeapon.rate = 2.25f; abilityAttack.range = abilityWeapon.projectile.radius - 10; abilityAttack.fireWithoutTarget = false; model.AddBehavior(abilityAttack); }
public static void GroundZero(TowerModel model) { var ability = model.GetAbilites()[0]; var abilityAttack = ability.GetBehavior <ActivateAttackModel>().attacks[0].Duplicate(); var abilityWeapon = abilityAttack.weapons[0]; var effectModel = ability.GetBehavior <CreateEffectOnAbilityModel>().effectModel.Duplicate(); effectModel.scale = .5f; effectModel.useCenterPosition = false; var effectBehavior = new CreateEffectOnExhaustFractionModel("CreateEffectOnExhaustFractionModel_GroundZero", "", effectModel, 0, false, 1.0f, -1f, false); abilityWeapon.projectile.AddBehavior(effectBehavior); abilityWeapon.rate = 6; abilityWeapon.projectile.GetDamageModel().damage = 100; abilityWeapon.projectile.radius = 100; var airBehavior = model.GetAttackModels()[0].weapons[0].GetBehavior <FireFromAirUnitModel>(); abilityWeapon.behaviors = new Il2CppReferenceArray <WeaponBehaviorModel>(new WeaponBehaviorModel[] { airBehavior }); var sound = ability.GetBehavior <CreateSoundOnAbilityModel>().sound; var soundBehavior = new CreateSoundOnProjectileExhaustModel("CreateSoundOnProjectileExhaustModel_GroundZero", sound, sound, sound, sound, sound); abilityWeapon.projectile.AddBehavior(soundBehavior); model.AddBehavior(abilityAttack); }
public static void SpecialPoperations(TowerModel model) { var ability = model.GetAbilites()[1]; var behavior = new ActivateAbilityOnRoundStartModel("ActivateAbilityOnRoundStartModel_SpecialPoperations", ability.Duplicate()); ability.enabled = false; model.AddBehavior(behavior); var specialPops = model.GetAbilites()[2]; model.behaviors = model.behaviors.RemoveItem(specialPops); var marine = specialPops.GetBehavior <FindDeploymentLocationModel>().towerModel; var weapon = marine.GetAttackModels()[0].weapons[0].Duplicate(); var airBehavior = model.GetAttackModels()[0].weapons[0].GetBehavior <FireFromAirUnitModel>(); weapon.behaviors = new Il2CppReferenceArray <WeaponBehaviorModel>(new WeaponBehaviorModel[] { airBehavior }); weapon.ejectX = weapon.ejectY = weapon.ejectZ = 0; weapon.emission = model.GetWeapon().emission.Duplicate(); weapon.emission.Cast <EmissionWithOffsetsModel>().throwMarkerOffsetModels = new Il2CppReferenceArray <ThrowMarkerOffsetModel>(new[] { weapon.emission.Cast <EmissionWithOffsetsModel>().throwMarkerOffsetModels[0] }); weapon.emission.Cast <EmissionWithOffsetsModel>().throwMarkerOffsetModels[0].ejectX = 0; weapon.emission.Cast <EmissionWithOffsetsModel>().projectileCount = 1; model.GetAttackModels()[0].AddWeapon(weapon); }
public static void SupportChinook(TowerModel model) { var ability = model.GetAbilites()[1]; var behavior = new ActivateAbilityOnRoundStartModel("ActivateAbilityOnRoundStartModel_SupportChinook", ability.Duplicate()); ability.enabled = false; model.AddBehavior(behavior); }
public static void SummonPhoenix(TowerModel model) { var lord = Game.instance.model.GetTower(WizardMonkey, model.tiers[0], 5, model.tiers[2]); var permaBehavior = lord.GetBehavior <TowerCreateTowerModel>().Duplicate(); permaBehavior.towerModel.GetWeapon().rate *= 3; model.AddBehavior(permaBehavior); }
public static void SpikeStorm(TowerModel model) { var ability = model.GetAbilites()[0]; var abilityAttack = ability.GetBehavior <ActivateAttackModel>().attacks[0].Duplicate(); var abilityWeapon = abilityAttack.weapons[0]; abilityWeapon.fireBetweenRounds = false; abilityWeapon.rate *= 10; model.AddBehavior(abilityAttack); }
public static void AttackAndSupport(TowerModel model) { if (model.GetBehavior <SubmergeModel>() == null) { return; } model.targetTypes = Game.instance.model.GetTowerFromId(MonkeySub).targetTypes; var submergeEffect = model.GetBehavior <SubmergeEffectModel>().effectModel; var submerge = model.GetBehavior <SubmergeModel>(); if (submerge.heroXpScale > 1.0) { model.AddBehavior(new HeroXpScaleSupportModel("HeroXpScaleSupportModel_", true, submerge.heroXpScale, null)); } if (submerge.abilityCooldownSpeedScale > 1.0) { model.AddBehavior(new AbilityCooldownScaleSupportModel("AbilityCooldownScaleSupportModel_", true, submerge.abilityCooldownSpeedScale, true, false, null, submerge.buffLocsName, submerge.buffIconName, false, submerge.supportMutatorPriority)); } model.RemoveBehavior <SubmergeModel>(); foreach (var attackModel in model.GetAttackModels()) { if (attackModel.name.Contains("Submerge")) { attackModel.name = attackModel.name.Replace("Submerged", ""); attackModel.weapons[0].GetBehavior <EjectEffectModel>().effectModel.assetId = submerge.attackDisplayPath; } attackModel.RemoveBehavior <SubmergedTargetModel>(); } model.AddBehavior(new CreateEffectAfterTimeModel("CreateEffectAfterTimeModel_", submergeEffect, 0f, true)); }
public static void TransformingTonic(TowerModel model) { model.range += 9; var ability = model.GetAbilites()[0]; var abilityAttack = ability.GetBehavior <ActivateAttackModel>().attacks[0].Duplicate(); var abilityWeapon = abilityAttack.weapons[0]; abilityAttack.range = model.range; abilityWeapon.rate *= 3; model.AddBehavior(abilityAttack); }
public static void IceFortress(TowerModel model) { var behavior = new RemoveBloonModifiersModel("RemoveBloonModifiersModel_", false, true, false, false, false, new Il2CppStringArray(new string[0])); foreach (var projectileModel in model.GetAllProjectiles()) { projectileModel.AddBehavior(behavior.Duplicate()); } model.AddBehavior(new OverrideCamoDetectionModel("OverrideCamoDetectionModel_", true)); }
public static void TotalTransformation(TowerModel model) { model.range += 27; var ability = model.GetAbilites()[0]; var abilityAttack = ability.GetBehavior <ActivateAttackModel>().attacks[0].Duplicate(); var abilityWeapon = abilityAttack.weapons[0]; abilityAttack.range = model.range; abilityWeapon.rate /= 2; abilityWeapon.projectile.pierce += 10; abilityWeapon.projectile.GetDamageModel().damage += 1; model.AddBehavior(abilityAttack); }
public static void Snowstorm(TowerModel model) { var realSlow = model.GetBehavior <SlowBloonsZoneModel>(); var totem = Game.instance.model.GetTowerFromId("NaturesWardTotem"); var slow = totem.GetBehaviors <SlowBloonsZoneModel>().First(b => !b.name.Contains("NonMoabs")).Duplicate(); slow.zoneRadius = realSlow.zoneRadius; slow.bindRadiusToTowerRange = true; slow.radiusOffset = realSlow.radiusOffset; model.AddBehavior(slow); }
public static void RealHealthyBananas(TowerModel model) { var amount = model.tier + 1; var bonusLivesPerRoundModel = model.GetBehavior <BonusLivesPerRoundModel>(); if (bonusLivesPerRoundModel == null) { model.AddBehavior(new BonusLivesPerRoundModel("BonusLivesPerRoundModel_HealthyBananas", amount, 1.25f, "eb70b6823aec0644c81f873e94cb26cc")); } else { bonusLivesPerRoundModel.amount = amount; } }
public static void WizardLordPhoenix(TowerModel model) { var permaBehavior = model.GetBehavior <TowerCreateTowerModel>().Duplicate(); var lordPhoenix = model.GetAbilites()[0].GetBehavior <AbilityCreateTowerModel>().towerModel.Duplicate(); lordPhoenix.behaviors = lordPhoenix.behaviors.RemoveItemOfType <Model, TowerExpireModel>(); foreach (var weaponModel in lordPhoenix.GetWeapons()) { weaponModel.rate *= 3f; } permaBehavior.towerModel = lordPhoenix; model.AddBehavior(permaBehavior); }
public static void HomelandDefense(TowerModel model) { var ability = model.GetAbilites()[0]; var c2a = ability.GetBehavior <CallToArmsModel>(); var buffIndicator = c2a.Mutator.buffIndicator; var buff = new RateSupportModel("RateSupportModel_HomelandDefense", .5f, true, "Village:HomelandDefense", true, 1, new Il2CppReferenceArray <TowerFilterModel>(0), buffIndicator.buffName, buffIndicator.iconName) { onlyShowBuffIfMutated = true, isUnique = true }; model.AddBehavior(buff); }
public static void AceHardware(TowerModel model) { var towerModel = Game.instance.model.GetTower(MonkeyAce, 0, 0, 4); var attack = towerModel.GetAttackModels()[1].Duplicate(); var weapon = attack.weapons[0]; weapon.RemoveBehavior <AlternateProjectileModel>(); attack.range = 60 + 20 * model.tier; weapon.Rate = .6f - .1f * model.tier; weapon.projectile.GetDamageModel().damage = 1 + model.tier / 2; weapon.projectile.pierce = model.GetWeapon().projectile.pierce; if (model.appliedUpgrades.Contains("Spy Plane")) { weapon.projectile.filters.GetItemOfType <FilterModel, FilterInvisibleModel>().isActive = false; } model.AddBehavior(attack); }
public static void FirstStrikeCapability(TowerModel model) { var abilityAttack = model.GetAbilites()[0].GetBehavior <ActivateAttackModel>().attacks[0].Duplicate(); var abilityWeapon = abilityAttack.weapons[0]; abilityWeapon.rate = model.GetAbilites()[0].cooldown / 50f; foreach (var createProjectileOnExpireModel in abilityWeapon.projectile.GetBehaviors <CreateProjectileOnExpireModel>()) { createProjectileOnExpireModel.projectile.GetDamageModel().damage /= 50; if (createProjectileOnExpireModel.projectile.radius > 10) { createProjectileOnExpireModel.projectile.radius /= 2f; } } var asset = abilityWeapon.projectile.GetBehavior <CreateEffectOnExpireModel>(); asset.assetId = ""; asset.effectModel = new EffectModel(asset.name, asset.assetId, .5f, asset.lifespan, false, false, false, false, false, false, false); model.AddBehavior(abilityAttack); }