示例#1
0
        public override void AI()
        {
            npc.spriteDirection = -npc.direction;

            Player player = Main.LocalPlayer;

            float xDist = npc.position.X - player.position.X;
            float yDist = npc.position.Y - player.position.Y;

            int DungeonDirection = 1;

            if (Main.dungeonX < Main.spawnTileX)
            {
                DungeonDirection = -1;
            }

            if ((yDist <= 120) && (xDist <= 120))
            {
                orthogod = true;
            }
            if (orthogod)
            {
                if (!soundplayed)
                {
                    Vector2 orthopos = new Vector2(player.position.X + 500 * DungeonDirection, player.position.Y);
                    npc.position = orthopos;
                    Main.PlaySound(SoundID.NPCDeath13, (int)npc.position.X, (int)npc.position.Y);
                    soundplayed   = true;
                    npc.direction = 1;
                    for (int x = 0; x < 60; x++)
                    {
                        Dust dust;
                        dust = Main.dust[Terraria.Dust.NewDust(npc.Center, 63, 63, 57, 0f, 0f, 0, new Color(8, 255, 0), 0.9210526f)];
                    }
                }
                orthocount++;

                if (orthocount == 120)
                {
                    npc.velocity.X = 20 * DungeonDirection;
                    npc.direction  = -1 * DungeonDirection;
                }

                if (orthocount == 210)
                {
                    soundplayed = false;
                    orthocount  = 0;
                    orthogod    = false;
                    npc.active  = false;
                    for (int x = 0; x < 60; x++)
                    {
                        Dust dust;
                        dust = Main.dust[Terraria.Dust.NewDust(npc.Center, 63, 63, 57, 0f, 0f, 0, new Color(8, 255, 0), 0.9210526f)];
                    }
                    CalValEXWorld.orthofound = true;
                    CalValEXWorld.UpdateWorldBool();
                }
            }
        }
示例#2
0
        public override string GetChat()
        {
            CalValEXWorld.rescuedjelly = true;
            CalValEXWorld.UpdateWorldBool();
            npc.Transform(ModContent.NPCType <JellyPriestNPC>());
            switch (Main.rand.Next(2))
            {
            case 0:
                return("Being free from those vines is great and all, but I need a place to settle for my sculpting.");

            default:
                return("Greetings, land creature! I rise from this old sea in hopes of traveling and finding a certain deity from the old times, from when the sea was a beautiful reign for many. Do you have any hint about where I could find them?");
            }
        }