示例#1
0
        public override void ModifyHitNPC(Projectile projectile, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
        {
            if (!DoesSummonDamage(projectile))
            {
                return;
            }
            Player player = Main.player[projectile.owner];
            MinionSpawningItemPlayer modPlayer    = player.GetModPlayer <MinionSpawningItemPlayer>();
            SquireModPlayer          squirePlayer = player.GetModPlayer <SquireModPlayer>();
            // require multiple minion types for any bonus
            float damageMult = 1;

            if (modPlayer.minionVarietyBonusCount > 1)
            {
                damageMult += modPlayer.minionVarietyBonusCount * modPlayer.minionVarietyDamageBonus;
            }
            if (squirePlayer.GetSquire() != default)
            {
                damageMult -= ServerConfig.Instance.MinionDamageSquireNerf / 100f;
            }
            damage = (int)(damage * damageMult);
        }
 internal abstract bool IsEquipped(MinionSpawningItemPlayer player);
 internal virtual void ModifyPlayerWeaponDamage(MinionSpawningItemPlayer necromancerAccessoryPlayer, Item item, ref float add, ref float mult, ref float flat)
 {
     // no op
 }