Пример #1
0
        public override void UpdateInventory(Player player)
        {
            KnifeSupportDamagePlayer d = player.GetModPlayer <KnifeSupportDamagePlayer>();

            if (NPC.downedBoss1)
            {
                d.knifeSupportDamageMult = 1.1f;
            }
            if (NPC.downedBoss2)
            {
                d.knifeSupportDamageMult = 1.3f;
            }
            if (NPC.downedQueenBee)
            {
                d.knifeSupportDamageMult = 1.4f;
            }
            if (NPC.downedBoss3)
            {
                d.knifeSupportDamageMult = 1.5f;
            }
            if (Main.hardMode)
            {
                d.knifeSupportDamageMult = 2f;
            }
            if (NPC.downedMechBoss1)
            {
                d.knifeSupportDamageMult = 2.3f;
            }
            if (NPC.downedMechBoss2)
            {
                d.knifeSupportDamageMult = 2.6f;
            }
            if (NPC.downedMechBoss3)
            {
                d.knifeSupportDamageMult = 2.9f;
            }
            if (NPC.downedPlantBoss)
            {
                d.knifeSupportDamageMult = 3.2f;
            }
            if (NPC.downedGolemBoss)
            {
                d.knifeSupportDamageMult = 3.3f;
            }
            if (NPC.downedFishron)
            {
                d.knifeSupportDamageMult = 3.5f;
            }
            if (NPC.downedAncientCultist)
            {
                d.knifeSupportDamageMult = 3.6f;
            }
            if (NPC.downedTowers)
            {
                d.knifeSupportDamageMult = 3.7f;
            }
            if (NPC.downedMoonlord)
            {
                d.knifeSupportDamageMult = 4.0f;
            }
        }
 public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
 {
     add  += (KnifeSupportDamagePlayer.KnifeDamagePlayer(player).knifeSupportDamageAdd *KnifeDamagePlayer.ModPlayer(player).knifeDamageAdd);
     mult *= (KnifeSupportDamagePlayer.KnifeDamagePlayer(player).knifeSupportDamageMult *(KnifeDamagePlayer.ModPlayer(player).knifeDamageMult));
 }