Пример #1
0
        private void UpdateNpcRequirements()
        {
            foreach (var npc in allQuestNpcs.Values)
            {
                var talkarray = npcdata.GetTalkArray(npc.ObjectId);
                var routine   = npcdata.GetRoutine(npc.ObjectId);

                UpdateNpcRequirements(npc, talkarray, routine);
            }
        }
Пример #2
0
        private void SetNpcHint(ObjectId npc, int textId, string text, Dictionary <int, string> dialogs)
        {
            npcData.GetTalkArray(npc)[(int)TalkArrayPos.dialogue_1] = 0;
            npcData.GetTalkArray(npc)[(int)TalkArrayPos.dialogue_2] = (byte)textId;
            npcData.GetTalkArray(npc)[(int)TalkArrayPos.dialogue_3] = 0;
            npcData.SetRoutine(npc, newTalkRoutines.Talk_norm);
            if (text != null)
            {
                dialogs.Add(textId, text);
            }

            foreach (var npcinstance in rom.FindNpc(npc))
            {
                rom.SetNpc(npcinstance.Item1, npcinstance.Item2.Index, npc, npcinstance.Item2.Coord.x, npcinstance.Item2.Coord.y, npcinstance.Item2.InRoom, true);
            }
        }
Пример #3
0
        public void HurrayDwarfFate(Fate fate, NPCdata npcdata, MT19337 rng)
        {
            if (fate == Fate.Spare)
            {
                // Protect Hurray Dwarf from NPC guillotine
                npcdata.SetRoutine(ObjectId.DwarfcaveDwarfHurray, newTalkRoutines.Talk_norm);
            }
            else
            {
                // Whether NPC guillotine is on or not, kill Hurray Dwarf
                npcdata.SetRoutine(ObjectId.DwarfcaveDwarfHurray, newTalkRoutines.Talk_kill);

                // Change the dialogue
                var dialogueStrings = new List <string>
                {
                    "No! I'm gonna disappear.\nYou'll never see\nme again. Please,\nI don't want to die.",
                    "If you strike me down,\nI shall become more\npowerful than you can\npossibly imagine.",
                    "Freeeeedom!!",
                    "I've seen things you\npeople wouldn't believe.\nAll those moments will\nbe lost in time..\nlike tears in rain..\nTime to die.",
                    "Become vengeance, David.\nBecome wrath.",
                    "My only regret..\nis that I have boneitis.",
                    "No, not the bees!\nNOT THE BEES!\nAAAAAAAAGH!\nTHEY'RE IN MY EYES!\nMY EYES! AAAAAAAAAAGH!",
                    "This is blasphemy!\nThis is madness!",
                    "Not like this..\nnot like this..",
                    "Suicide squad, attack!\n\n\n\nThat showed 'em, huh?",
                    "Well, what are you\nwaiting for?\nDo it. DO IT!!",
                    "The path you walk on has\nno end. Each step you\ntake is paved with the\ncorpses of your enemies.\nTheir souls will haunt\nyou forever. Hear me!\nMy spirit will be\nwatching you!",
                    "K-Kefka..!\nY-you're insane.."
                };

                //Put new dialogue to E6 since another Dwarf also says hurray
                InsertDialogs(0xE6, dialogueStrings.PickRandom(rng));
                npcdata.GetTalkArray(ObjectId.DwarfcaveDwarfHurray)[(int)TalkArrayPos.dialogue_1] = 0xE6;
                npcdata.GetTalkArray(ObjectId.DwarfcaveDwarfHurray)[(int)TalkArrayPos.dialogue_2] = 0xE6;
                npcdata.GetTalkArray(ObjectId.DwarfcaveDwarfHurray)[(int)TalkArrayPos.dialogue_3] = 0xE6;
            }
        }
Пример #4
0
        private void ProcessQuestNpc(ref NPC npc)
        {
            var routine   = npcdata.GetRoutine(npc.ObjectId);
            var talkArray = npcdata.GetTalkArray(npc.ObjectId);

            var poi = new SCPointOfInterest
            {
                Coords      = new SCCoords(npc.Coord.x, npc.Coord.y),
                Type        = SCPointOfInterestType.QuestNpc,
                Npc         = npc,
                TalkRoutine = routine,
                TalkArray   = talkArray
            };

            PointsOfInterest.Add(poi);

            //if (blocked) Tiles[poi.Coords.X, poi.Coords.Y].Tile |= SCBitFlags.Blocked;
        }