예제 #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);
 }