Пример #1
0
        public TrapProfileForm(Trap trap)
        {
            InitializeComponent();

            Array types = Enum.GetValues(typeof(TrapType));

            foreach (TrapType type in types)
            {
                TypeBox.Items.Add(type);
            }

            Application.Idle += new EventHandler(Application_Idle);

            fTrap = trap.Copy();

            NameBox.Text         = fTrap.Name;
            TypeBox.SelectedItem = fTrap.Type;
            LevelBox.Value       = fTrap.Level;
            RoleBtn.Text         = fTrap.Role.ToString();

            if (fTrap.Initiative == int.MinValue)
            {
                HasInitBox.Checked = false;
                InitBox.Value      = 0;
            }
            else
            {
                HasInitBox.Checked = true;
                InitBox.Value      = fTrap.Initiative;
            }
        }
Пример #2
0
        public TrapDetailsForm(Trap trap)
        {
            InitializeComponent();

            fTrap = trap.Copy();

            Browser.DocumentText = HTML.Trap(fTrap, null, true, false, false, Session.Preferences.TextSize);
        }
Пример #3
0
        public TrapBuilderForm(Trap trap)
        {
            InitializeComponent();

            Application.Idle += new EventHandler(Application_Idle);

            fTrap = trap.Copy();

            update_statblock();
        }
Пример #4
0
        private static bool add_trap(Encounter enc)
        {
            if (EncounterBuilder.fTraps.Count == 0)
            {
                return(false);
            }
            int  num  = Session.Random.Next() % EncounterBuilder.fTraps.Count;
            Trap item = EncounterBuilder.fTraps[num];

            enc.Traps.Add(item.Copy());
            return(true);
        }
Пример #5
0
        static bool add_trap(Encounter enc)
        {
            if (fTraps.Count != 0)
            {
                int  index = Session.Random.Next() % fTraps.Count;
                Trap trap  = fTraps[index];
                enc.Traps.Add(trap.Copy());

                return(true);
            }

            return(false);
        }
Пример #6
0
 public TrapDetailsForm(Trap trap)
 {
     this.InitializeComponent();
     this.fTrap = trap.Copy();
     this.Browser.DocumentText = HTML.Trap(this.fTrap, null, true, false, false, DisplaySize.Small);
 }