Esempio n. 1
0
        public override void ModifyHitNPCWithProj(Projectile projectile, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
        {
            OrchidModGlobalProjectile modProjectile = projectile.GetGlobalProjectile <OrchidModGlobalProjectile>();

            if (modProjectile.alchemistProjectile)
            {
                if (Main.rand.Next(101) <= this.alchemistCrit + modProjectile.baseCritChance)
                {
                    crit = true;
                }
                else
                {
                    crit = false;
                }
            }

            if (modProjectile.gamblerProjectile)
            {
                if (Main.rand.Next(101) <= this.gamblerCrit + modProjectile.baseCritChance)
                {
                    crit = true;
                }
                else
                {
                    crit = false;
                }

                OrchidModGamblerHelper.ModifyHitNPCWithProjGambler(projectile, target, ref damage, ref knockback, ref crit, ref hitDirection, player, this, mod);
            }

            if (modProjectile.shamanProjectile)
            {
                if (Main.rand.Next(101) <= this.shamanCrit + modProjectile.baseCritChance)
                {
                    crit = true;
                }
                else
                {
                    crit = false;
                }

                OrchidModShamanHelper.ModifyHitNPCWithProjShaman(projectile, target, ref damage, ref knockback, ref crit, ref hitDirection, player, this, mod);
            }
        }