private void lstEvents_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (lstEvents.SelectedIndex > -1)
            {
                DataTypes.Event EditEvent = new DataTypes.Event();
                EditEvent = Room.Events[lstEvents.SelectedIndex];
                frmEventEditor NewForm = new frmEventEditor(EditEvent, FloorCount);

                NewForm.ShowDialog();

                EditEvent = NewForm.Event;
                Room.Events[lstEvents.SelectedIndex] = EditEvent;
            }
            GetAllEvents();
        }
        private void cmdAddEvent_Click(object sender, EventArgs e)
        {
            DataTypes.Event NewEvent = new DataTypes.Event();
            frmEventEditor  NewForm  = new frmEventEditor(NewEvent, FloorCount);

            NewForm.ShowDialog();

            NewEvent = NewForm.Event;
            if (NewEvent.Action != null)
            {
                if (Room.Events == null)
                {
                    Room.Events = new List <DataTypes.Event>();
                }
                Room.Events.Add(NewEvent);
            }
            GetAllEvents();
        }
Beispiel #3
0
        public frmEventEditor(DataTypes.Event thisEvent, int FloorCount)
        {
            InitializeComponent();
            ChangeMade = false;

            Description desc = new Description();

            //Trigers
            desc.ShortDesc = "killallenemies";
            desc.LongDesc  = "Player kills all enemies in the room";
            Triggers.Add(desc);
            desc.ShortDesc = "killenemy";
            desc.LongDesc  = "Players kills 1 enemy in a room";
            Triggers.Add(desc);
            desc.ShortDesc = "moveinto";
            desc.LongDesc  = "Player moves into the current room";
            Triggers.Add(desc);
            desc.ShortDesc = "itempickup";
            desc.LongDesc  = "Player picks up an item";
            Triggers.Add(desc);
            desc.ShortDesc = "allitempickup";
            desc.LongDesc  = "Player picked up all items in the room";
            Triggers.Add(desc);
            desc.ShortDesc = "payoff";
            desc.LongDesc  = "Player pays off an enemy";
            Triggers.Add(desc);
            desc.ShortDesc = "iteminteraction";
            desc.LongDesc  = "Player uses an interaction item correctly";
            Triggers.Add(desc);
            desc.ShortDesc = "donate";
            desc.LongDesc  = "Player donates the correct thing to an NPC";
            Triggers.Add(desc);
            desc.ShortDesc = "sleeps";
            desc.LongDesc  = "Player goes to sleep";
            Triggers.Add(desc);


            //Actions
            desc.ShortDesc = "unlockroom";
            desc.LongDesc  = "Unlock a locked room at ";
            Actions.Add(desc);
            desc.ShortDesc = "lockroom";
            desc.LongDesc  = "Lock a room at ";
            Actions.Add(desc);
            desc.ShortDesc = "unlockbuilding";
            desc.LongDesc  = "Unlock a locked building located in room ";
            Actions.Add(desc);
            desc.ShortDesc = "lockbuilding";
            desc.LongDesc  = "Lock a building located in room ";
            Actions.Add(desc);
            desc.ShortDesc = "LockIn";
            desc.LongDesc  = "Lock/Unlock current room or building";
            Actions.Add(desc);
            desc.ShortDesc = "kill all enemies";
            desc.LongDesc  = "Kill all enemies in the room";
            Actions.Add(desc);
            desc.ShortDesc = "remove all npcs";
            desc.LongDesc  = "Remove all npcs in the room";
            Actions.Add(desc);
            desc.ShortDesc = "remove all items";
            desc.LongDesc  = "Remove all items in the room";
            Actions.Add(desc);
            desc.ShortDesc = "change description";
            desc.LongDesc  = "Change the room description to its alternative";
            Actions.Add(desc);
            desc.ShortDesc = "change location";
            desc.LongDesc  = "Move player to these coodinates ";
            Actions.Add(desc);
            desc.ShortDesc = "change objective";
            desc.LongDesc  = "Change the players objective to";
            Actions.Add(desc);
            desc.ShortDesc = "custom description";
            desc.LongDesc  = "Set a custom description of a room";
            Actions.Add(desc);
            desc.ShortDesc = "output text";
            desc.LongDesc  = "Output this message";
            Actions.Add(desc);
            desc.ShortDesc = "spawnItems";
            desc.LongDesc  = "Spawn the following Items";
            Actions.Add(desc);
            desc.ShortDesc = "spawnNPC";
            desc.LongDesc  = "Spawn the following NPCs";
            Actions.Add(desc);
            desc.ShortDesc = "spawnEnemy";
            desc.LongDesc  = "Spawn the following enemies";
            Actions.Add(desc);
            desc.ShortDesc = "giveXP";
            desc.LongDesc  = "Award the player XP";
            Actions.Add(desc);
            desc.ShortDesc = "EndCredits";
            desc.LongDesc  = "Run the End Credits and end the Game";
            Actions.Add(desc);
            desc.ShortDesc = string.Empty;
            desc.LongDesc  = "Unknown";
            Actions.Add(desc);


            foreach (Description thisDesc in Triggers)
            {
                cmbTrigger.Items.Add(thisDesc.LongDesc);
            }
            cmbTrigger.Items.Add("Unknown");

            foreach (Description thisDesc in Actions)
            {
                cmbAction.Items.Add(thisDesc.LongDesc);
            }

            Event           = thisEvent;
            Event.Triggered = false;
            PopulateEvent(FloorCount);
        }
        private void lstEvents_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (lstEvents.SelectedIndex > -1)
            {
                DataTypes.Event EditEvent = new DataTypes.Event();
                EditEvent = Room.Events[lstEvents.SelectedIndex];
                frmEventEditor NewForm = new frmEventEditor(EditEvent, FloorCount);

                NewForm.ShowDialog();

                EditEvent = NewForm.Event;
                Room.Events[lstEvents.SelectedIndex] = EditEvent;
            }
            GetAllEvents();
        }
        private void cmdAddEvent_Click(object sender, EventArgs e)
        {
            DataTypes.Event NewEvent = new DataTypes.Event();
            frmEventEditor NewForm = new frmEventEditor(NewEvent, FloorCount);

            NewForm.ShowDialog();

            NewEvent = NewForm.Event;
            if (NewEvent.Action != null)
            {
                if (Room.Events == null) Room.Events = new List<DataTypes.Event>();
                Room.Events.Add(NewEvent);
            }
            GetAllEvents();
        }