Пример #1
0
 public override void AI()
 {
     if (npc.frame.Y == 48 * 2 || npc.frame.Y == 48)
     {
         Lighting.AddLight(npc.Center, AAColor.Lantern.R / 255, AAColor.Lantern.G / 255, AAColor.Lantern.B / 255);
     }
     if (npc.wet)
     {
         npc.noGravity = true;
         BaseAI.AIFish(npc, ref npc.ai, true, false, true, 4f, 3f);
         BaseAI.Look(npc, 1);
         if (!Collision.WetCollision(npc.position + npc.velocity, npc.width, npc.height))
         {
             npc.velocity.Y -= 3f;
         }
     }
     else
     {
         if (npc.velocity.Y == 0f)
         {
             npc.velocity.Y = Main.rand.Next(-50, -20) * 0.1f;
             npc.velocity.X = Main.rand.Next(-20, 20) * 0.1f;
             npc.netUpdate  = true;
         }
         npc.velocity.Y = npc.velocity.Y + 0.3f;
         if (npc.velocity.Y > 10f)
         {
             npc.velocity.Y = 10f;
         }
         npc.ai[0]     = 1f;
         npc.noGravity = false;
     }
 }
Пример #2
0
        public override void AI()
        {
            if (phase < 1)
            {
                int snailThing = 0;
                BaseAI.AISnail(npc, ref npc.ai, ref snailThing);
            }
            else
            {
                npc.HitSound  = SoundID.NPCHit1;
                npc.defense   = 0;
                npc.noGravity = true;
                BaseAI.AIFish(npc, ref npc.ai, true, true, false, 7, 4);
            }

            if (npc.life <= npc.lifeMax * 0.67f)
            {
                if (phase < 1)
                {
                    BaseAI.DropItem(npc, mod.ItemType("RuinumOre"), Main.rand.Next(10, 21), 250, 1f);
                }
                phase = 2;
            }
        }