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; } }
public TrapDetailsForm(Trap trap) { InitializeComponent(); fTrap = trap.Copy(); Browser.DocumentText = HTML.Trap(fTrap, null, true, false, false, Session.Preferences.TextSize); }
public TrapBuilderForm(Trap trap) { InitializeComponent(); Application.Idle += new EventHandler(Application_Idle); fTrap = trap.Copy(); update_statblock(); }
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); }
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); }
public TrapDetailsForm(Trap trap) { this.InitializeComponent(); this.fTrap = trap.Copy(); this.Browser.DocumentText = HTML.Trap(this.fTrap, null, true, false, false, DisplaySize.Small); }