Exemple #1
0
 public Attribute3(Perk perk) : base(perk)
 {
     uniquePerkSkillName = $"MechanicMaster.Attribute1: Sniper and CrossbowHunter fire rate increase";
     handler            += (turret, cash) =>
     {
         if (turret.uniqueTurretName.Equals("Sniper") || turret.uniqueTurretName.Equals("CrossbowHunter"))
         {
             turret.AttackSpeed = turret.AttackSpeed + perk.currentLevel / 10 * deltaSpeed;
         }
     };
 }
Exemple #2
0
 public Skill3(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Never Fly Away";
     handler            += (turret, cash) =>
     {
         if (turret.uniqueTurretName.Equals("MachineGun") || turret.uniqueTurretName.Equals("PillBox"))
         {
             turret.targetFlyable = Turret.TargetFlyable.GroundAir;
         }
     };
 }
Exemple #3
0
 public Attribute2(Perk perk) : base(perk)
 {
     uniquePerkSkillName = $"{nameof(MadBomber)}.{nameof(Attribute2)}";
     handler            += (turret, cash) =>
     {
         if (turret is SharpnelThrower || turret is PatriotMissile || turret is RocketLauncher)
         {
             turret.MaxRange = (int)(turret.MaxRange * (1 + factor * perk.currentLevel));
         }
     };
 }
Exemple #4
0
 public Skill7(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Ranged Strike";
     handler            += (turret, cash) =>
     {
         if (turret is SharpnelThrower || turret is PatriotMissile || turret is RocketLauncher)
         {
             turret.MaxRange = (int)((1 + factor) * turret.MaxRange);
         }
     };
 }
Exemple #5
0
 public Skill4(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Ramrod and Reload";
     handler            += (turret, cash) =>
     {
         if (turret.uniqueTurretName.Equals("CrossbowHunter") || turret.uniqueTurretName.Equals("SniPer"))
         {
             turret.AttackSpeed = turret.AttackSpeed + deltaSpeed;
         }
     };
 }
Exemple #6
0
 public Attribute2(Perk perk) : base(perk)
 {
     uniquePerkSkillName = $"MechanicMaster.Attribute1: Sniper and CrossbowHunter basic damage increase";
     handler            += (turret, cash) =>
     {
         if (turret.uniqueTurretName.Equals("Sniper") || turret.uniqueTurretName.Equals("CrossbowHunter"))
         {
             turret.DamageFactor += perk.currentLevel * factor;
         }
     };
 }
Exemple #7
0
 public Skill8(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Millionare";
     handler            += (enemy) =>
     {
         enemy.EnemyKilledEvent += (e) =>
         {
             e.rewardcash = (int)(e.rewardcash * (1 + factor));
         };
     };
 }
Exemple #8
0
 public Attribute1(Perk perk) : base(perk)
 {
     uniquePerkSkillName = $"{nameof(MadBomber)}.Attribute1";
     handler            += (turret, cash) =>
     {
         if (turret is SharpnelThrower || turret is PatriotMissile || turret is RocketLauncher)
         {
             turret.DamageFactor += perk.currentLevel * factor;
         }
     };
 }
        public void InitPerks()
        {
            mm = GameObject.Find("Player/MechanicMaster").AddComponent <MechanicMaster>();
            mb = GameObject.Find("Player/MadBomber").AddComponent <MadBomber>();
            switch (currentPerkName)
            {
            case "MechanicMaster": currentPerk = mm; break;

            case "MadBomber": currentPerk = mb; break;
            }
        }
Exemple #10
0
 public Skill3(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "High explosion round";
     handler            += (turret, cash) =>
     {
         if (turret is SharpnelThrower || turret is PatriotMissile || turret is RocketLauncher)
         {
             turret.DamageFactor += factor;
         }
     };
 }
Exemple #11
0
 public Attribute4(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "MechanicMaster.Attribute4: Initialized cash bonus";
     handler            += (wave, cash) =>
     {
         if (gameManager.gameMode.currentWave == 1)
         {
             gameManager.gameMode.currentCash += (int)(cash * factor);
         }
     };
 }
Exemple #12
0
 public Attribute1(Perk perk) : base(perk)
 {
     uniquePerkSkillName = $"MechanicMaster.Attribute1";
     handler            += (turret, cash) =>
     {
         if (turret.uniqueTurretName.Equals("MachineGun") || turret.uniqueTurretName.Equals("PillBox"))
         {
             turret.DamageFactor += perk.currentLevel * factor;
         }
     };
 }
Exemple #13
0
 public Skill1(Perk perk) : base(perk)
 {
     uniquePerkSkillName = $"Speed Loader";
     handler            += (turret, cash) =>
     {
         if (turret is SharpnelThrower || turret is PatriotMissile || turret is RocketLauncher)
         {
             turret.AttackSpeed = (int)((1 + deltaSpeedFactor) * turret.AttackSpeed);
         }
         ;
     };
 }
Exemple #14
0
 public Skill1(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Armour Piercing Bullet";
     handler            += (turret, cash) =>
     {
         var utn = turret.uniqueTurretName;
         if (utn.Equals("MachineGun") || utn.Equals("CrossbowHunter") || utn.Equals("PillBox") || utn.Equals("SniPer"))
         {
             turret.DamageFactor += factor;
         }
     };
 }
Exemple #15
0
 public Skill2(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Aggregation";
     handler            += (turret, cash) =>
     {
         if (turret is PatriotMissile || turret is RocketLauncher)
         {
             var buff = turret.ContainsBuff("ExplosiveEffect") as ExplosiveEffect;
             turret.DamageFactor += damageFactor;
             turret.MaxRange      = (int)(turret.MaxRange * (1 - rangeFactor));
         }
     };
 }
Exemple #16
0
 public Skill4(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Back Off";
     handler            += (turret, cash) =>
     {
         if (turret is PatriotMissile || turret is RocketLauncher)
         {
             var stunBuff = new StunEffect {
                 duration = stunDuration, possibility = 1
             };
             stunBuff.uniqueBuffName = stunBuff.buffName + $":MadBomber.{uniquePerkSkillName}";
             turret.AppendBuff(new StunEffect {
                 duration = stunDuration, possibility = 1
             });
         }
     };
 }
Exemple #17
0
 public Skill8(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Bully";
     uniqueBuffName      = "ExplosiveEffect:Bully";
     handler            += (turret, cash) =>
     {
         if (turret is SharpnelThrower || turret is PatriotMissile || turret is RocketLauncher)
         {
             turret.AppendBuff(new ExplosiveEffectBully
             {
                 radius         = radius,
                 uniqueBuffName = uniqueBuffName,
                 damage         = turret.Damage,
                 damageType     = Turret.DamageType.Explosive
             });
         }
     };
 }
Exemple #18
0
 public Skill5(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "A New Type";
     uniqueBuffName      = $"ExplosiveEffect:MadBomber.{uniquePerkSkillName}";
     handler            += (turret, cash) =>
     {
         if (turret.uniqueTurretName == "MachineGun" || turret.uniqueTurretName == "PillBox")
         {
             var ee = new ExplosiveEffect {
                 damage = turret.Damage, radius = range, damageType = Turret.DamageType.Explosive, uniqueBuffName = uniqueBuffName
             };
             ee.damageFactor = 0;
             turret.AppendBuff(ee);
             var temp = turret.DamageFactor;
             turret.DamageFactor = ee.damage;
             ee.damageFactor     = temp;
         }
     };
 }
Exemple #19
0
 public Skill6(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Explosion Type";
     uniqueBuffName      = "ExplosiveEffect:ExplosionType";
     handler            += (turret, cash) =>
     {
         if (turret.uniqueTurretName == "MachineGun" || turret.uniqueTurretName == "PillBox")
         {
             turret.HasDirectHitDamage = false;
             turret.AppendBuff(new ExplosiveEffect
             {
                 damage         = turret.Damage,
                 damageType     = Turret.DamageType.Explosive,
                 radius         = radius,
                 uniqueBuffName = uniqueBuffName
             });
         }
     };
 }
        public void ChangePerk(string nextPerkName)
        {
            if (currentPerkName.Equals(nextPerkName))
            {
                return;
            }
            else
            {
                switch (nextPerkName)
                {
                case "MechanicMaster":
                    currentPerk = mm;
                    break;

                case "MadBomber":
                    currentPerk = mb;
                    break;
                }
                currentPerkName = nextPerkName;
            }
        }
Exemple #21
0
            public Skill10(Perk perk) : base(perk)
            {
                uniquePerkSkillName = "Dud Versus Head";
                handler            += (turret, cash) =>
                {
                    if (turret is RocketLauncher)
                    {
                        if (turret.ContainsBuff("ExplosiveEffect") is ExplosiveEffect ee)
                        {
                            ee.bEnable = false;
                        }
                        switch (turret.currentLevel)
                        {
                        case 1: turret.DamageFactor += factor1; break;

                        case 2: turret.DamageFactor += factor2; break;

                        case 3: turret.DamageFactor += factor3; break;
                        }
                    }
                };
            }
Exemple #22
0
 public PerkSkill(Perk perk)
 {
     this.perk = perk;
 }
Exemple #23
0
 public Skill7(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Crazy Boy";
 }
Exemple #24
0
 public Skill6(Perk perk) : base(perk)
 {
 }
Exemple #25
0
 public Skill9(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Final Core";
 }