Пример #1
0
 public void spreadOilFire(Vector2 startPosition, int damage, Player player)
 {
     if (Main.myPlayer == player.whoAmI)
     {
         OrchidModPlayer modPlayer = player.GetModPlayer <OrchidModPlayer>();
         float           distance  = 1000f;
         for (int k = 0; k < Main.maxNPCs; k++)
         {
             if (Main.npc[k].active && !Main.npc[k].dontTakeDamage && !Main.npc[k].friendly)
             {
                 Vector2 newMove    = Main.npc[k].Center - startPosition;
                 float   distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y);
                 if (distanceTo < distance)
                 {
                     OrchidModAlchemistNPC modTarget = Main.npc[k].GetGlobalNPC <OrchidModAlchemistNPC>();
                     if (modTarget.alchemistWater > 0)
                     {
                         bool crit = (Main.rand.Next(101) <= modPlayer.alchemistCrit + 4);
                         player.ApplyDamageToNPC(Main.npc[k], Main.DamageVar(damage), 5f, player.direction, crit);
                         modTarget.alchemistWater = 0;
                         modTarget.alchemistFire  = 60 * 10;
                     }
                 }
             }
         }
     }
 }
Пример #2
0
        public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
        {
            Player             player    = Main.player[projectile.owner];
            OrchidModPlayer    modPlayer = player.GetModPlayer <OrchidModPlayer>();
            OrchidModGlobalNPC modTarget = target.GetGlobalNPC <OrchidModGlobalNPC>();

            modTarget.alchemistHit = true;
            OrchidModAlchemistNPC modTargetAlch = target.GetGlobalNPC <OrchidModAlchemistNPC>();

            SafeOnHitNPC(target, modTargetAlch, damage, knockback, crit, player, modPlayer);
        }
Пример #3
0
 public virtual void OnHitNPCThird(NPC target, int damage, float knockback, bool crit, Player player, OrchidModPlayer modPlayer, OrchidModAlchemistNPC modTarget, OrchidModGlobalNPC modTargetGlobal, AlchemistProj alchProj, Projectile projectile, OrchidModGlobalItem globalItem)
 {
 }
Пример #4
0
 public virtual void SafeOnHitNPC(NPC target, OrchidModAlchemistNPC modTarget, int damage, float knockback, bool crit, Player player, OrchidModPlayer modPlayer)
 {
 }