Beispiel #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;
         }
     };
 }
Beispiel #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;
         }
     };
 }
Beispiel #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));
         }
     };
 }
Beispiel #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);
         }
     };
 }
Beispiel #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;
         }
     };
 }
Beispiel #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;
         }
     };
 }
Beispiel #7
0
 public Skill8(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Millionare";
     handler            += (enemy) =>
     {
         enemy.EnemyKilledEvent += (e) =>
         {
             e.rewardcash = (int)(e.rewardcash * (1 + factor));
         };
     };
 }
Beispiel #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;
            }
        }
Beispiel #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;
         }
     };
 }
Beispiel #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);
         }
     };
 }
Beispiel #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;
         }
     };
 }
Beispiel #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);
         }
         ;
     };
 }
Beispiel #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;
         }
     };
 }
Beispiel #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));
         }
     };
 }
Beispiel #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
             });
         }
     };
 }
Beispiel #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
             });
         }
     };
 }
Beispiel #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;
         }
     };
 }
Beispiel #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;
            }
        }
Beispiel #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;
                        }
                    }
                };
            }
Beispiel #22
0
 public PerkSkill(Perk perk)
 {
     this.perk = perk;
 }
Beispiel #23
0
 public Skill7(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Crazy Boy";
 }
Beispiel #24
0
 public Skill6(Perk perk) : base(perk)
 {
 }
Beispiel #25
0
 public Skill9(Perk perk) : base(perk)
 {
     uniquePerkSkillName = "Final Core";
 }