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