public BattleEnemyToolAI()
 {
     InitializeComponent();
     AllyConditionInput.ItemsSource = new List <string> {
         "None", "No allies", "One ally", "All allies"
     };
     FoeConditionInput.ItemsSource = new List <string> {
         "None", "No foes", "One foe", "All foes"
     };
     UserConditionInput.ItemsSource = new List <string> {
         "None", "Cannot meet", "Must meet"
     };
     ElementData = new ComboBoxInputData("List_ID", "Name", "TypesLists", "List_Type = 'Elements'", "List_ID", ComboBoxInputData.ADD_NULL_INPUT);
     StateData   = new ComboBoxInputData("State_ID", "Name", "BaseObject JOIN State", "BaseObjectID = BaseObject_ID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     ActiveState1Input.ItemsSource   = StateData.OptionsListNames;
     ActiveState2Input.ItemsSource   = StateData.OptionsListNames;
     InactiveState1Input.ItemsSource = StateData.OptionsListNames;
     InactiveState2Input.ItemsSource = StateData.OptionsListNames;
     ElementRateInput.ItemsSource    = ElementData.OptionsListNames;
     State1Input.ItemsSource         = StateData.OptionsListNames;
     State2Input.ItemsSource         = StateData.OptionsListNames;
     Stat1Input.ItemsSource          = StatsOptions;
     Stat2Input.ItemsSource          = StatsOptions;
     Gate1Input.ItemsSource          = GateOptions;
     Gate2Input.ItemsSource          = GateOptions;
     Gate3Input.ItemsSource          = GateOptions;
     Gate4Input.ItemsSource          = GateOptions;
     Gate5Input.ItemsSource          = GateOptions;
     Value1Input.ItemsSource         = ValueOptions;
     Value2Input.ItemsSource         = ValueOptions;
     Value3Input.ItemsSource         = ValueOptions;
     Value4Input.ItemsSource         = StatValueOptions;
     Value5Input.ItemsSource         = StatValueOptions;
     ToolElementInput.ItemsSource    = ElementData.OptionsListNames;
 }
示例#2
0
 protected override void SetupTableData()
 {
     DisabledToolType1Data = new ComboBoxInputData("List_ID", "Name", "TypesLists", "List_Type = 'Tool Types'", "List_ID", ComboBoxInputData.ADD_NULL_INPUT);
     DisabledToolType2Data = new ComboBoxInputData("List_ID", "Name", "TypesLists", "List_Type = 'Tool Types'", "List_ID", ComboBoxInputData.ADD_NULL_INPUT);
     DisabledToolType1Input.ItemsSource = DisabledToolType1Data.OptionsListNames;
     DisabledToolType2Input.ItemsSource = DisabledToolType2Data.OptionsListNames;
     TurnSequenceInput.ItemsSource      = TurnSequenceOptions;
 }
 protected override void OnInitializeNew()
 {
     Title.Text         = TableTitle;
     Table              = TableList;
     Scroller.Height    = ScrollerHeight;
     TargetTypeListData = new ComboBoxInputData("List_ID", "Name", TargetDBTable, "List_Type = '" + ListType + "'", "List_ID");
     AttributeName      = "";
     StringList         = "";
 }
        protected override void OnInitializeNew()
        {
            Title.Text      = TableTitle;
            Table           = TableList;
            Scroller.Height = ScrollerHeight;
            string tables = "BaseObject JOIN Tool JOIN " + TargetToolTable;

            string where  = "BaseObject_ID = BaseObjectID AND Tool_ID = ToolID";
            CBInputs      = new ComboBoxInputData("Tool_ID", "Name", tables, where, "Tool_ID");
            AttributeName = "";
        }
        /// <summary>
        /// Same functions as DualInputTypesList above
        /// </summary>


        protected override void OnInitializeNew()
        {
            Title.Text      = TableTitle;
            Table           = TableList;
            Scroller.Height = ScrollerHeight;
            string tables  = "BaseObject JOIN " + TargetDBTable;
            string dupCond = HostDBTable == TargetDBTable ? "AND " + HostDBTable + "_ID <> " + HostId : "";

            string where    = "BaseObject_ID = BaseObjectID " + dupCond;
            TargetTableData = new ComboBoxInputData(TargetDBTable + "_ID", "Name", tables, where, "Name");
            AttributeName   = "";
        }
 protected override void SetupTableData()
 {
     StateActive1Data                = new ComboBoxInputData("State_ID", "Name", "BaseObject JOIN State", "BaseObject_ID = BaseObjectID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     StateActive2Data                = new ComboBoxInputData("State_ID", "Name", "BaseObject JOIN State", "BaseObject_ID = BaseObjectID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     StateInactive1Data              = new ComboBoxInputData("State_ID", "Name", "BaseObject JOIN State", "BaseObject_ID = BaseObjectID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     StateInactive2Data              = new ComboBoxInputData("State_ID", "Name", "BaseObject JOIN State", "BaseObject_ID = BaseObjectID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     StateActive1Input.ItemsSource   = StateActive1Data.OptionsListNames;
     StateActive2Input.ItemsSource   = StateActive2Data.OptionsListNames;
     StateInactive1Input.ItemsSource = StateInactive1Data.OptionsListNames;
     StateInactive2Input.ItemsSource = StateInactive2Data.OptionsListNames;
     AllyConditionInput.ItemsSource  = AllyConditionOptions;
     FoeConditionInput.ItemsSource   = FoeConditionOptions;
     UserConditionInput.ItemsSource  = UserConditionOptions;
 }
示例#7
0
        private void CBChangedClass(object sender, EventArgs e)
        {
            int classId = BattlerClassData.OptionsListIds[Class.SelectedIndex];

            string where = "BaseObject_ID = Weapon.BaseObjectID AND (UsableWeaponType1 = WeaponType OR UsableWeaponType2 = WeaponType) AND BattlerClass_ID = " + classId;
            WeaponData   = new ComboBoxInputData("Weapon_ID", "Name", "BaseObject JOIN Weapon JOIN BattlerClass", where, "Name", ComboBoxInputData.ADD_NULL_INPUT);
            string[]   weapons = WeaponData.OptionsListNames.ToArray();
            ComboBox[] Weapons = new ComboBox[] { Weapon1, Weapon2, Weapon3 };
            foreach (ComboBox w in Weapons)
            {
                w.Items.Clear();
                w.Items.AddRange(weapons);
                w.SelectedIndex = 0;
            }
        }
示例#8
0
 protected override void SetupTableData()
 {
     EnemyClassData = new ComboBoxInputData("BattlerClass_ID", "Name", "BaseObject JOIN BattlerClass", "BaseObjectID = BaseObject_ID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     StateRates.Setup("Enemy", "State", "State Rates", new List <string> {
         "State", "%"
     });
     ElementRates.Setup("Enemy", "TypesLists", "Elements", "Element Rates", new List <string> {
         "Element", "%"
     });
     WidthInput.ItemsSource      = SizeOptions;
     HeightInput.ItemsSource     = SizeOptions;
     BossTypeInput.ItemsSource   = BossTypeOptions;
     EnemyClassInput.ItemsSource = EnemyClassData.OptionsListNames;
     StateRates.AttributeName    = "Vulnerability";
     ElementRates.AttributeName  = "ElementRates";
 }
 protected override void SetupTableData()
 {
     TypeData                         = new ComboBoxInputData("List_ID", "Name", "TypesLists", "List_Type = 'Tool Types'", "List_ID", ComboBoxInputData.ADD_NULL_INPUT);
     FormulaData                      = new ComboBoxInputData("List_ID", "Name", "TypesLists", "List_Type = 'Tool Formulas'", "List_ID", ComboBoxInputData.ADD_NULL_INPUT);
     ElementData                      = new ComboBoxInputData("List_ID", "Name", "TypesLists", "List_Type = 'Elements'", "List_ID", ComboBoxInputData.ADD_NULL_INPUT);
     ClassExclusive1Data              = new ComboBoxInputData("BattlerClass_ID", "Name", "BaseObject JOIN BattlerClass", "BaseObjectID = BaseObject_ID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     ClassExclusive2Data              = new ComboBoxInputData("BattlerClass_ID", "Name", "BaseObject JOIN BattlerClass", "BaseObjectID = BaseObject_ID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     TypeInput.ItemsSource            = TypeData.OptionsListNames;
     FormulaInput.ItemsSource         = FormulaData.OptionsListNames;
     HPModInput.ItemsSource           = HPSPModOptions;
     SPModInput.ItemsSource           = HPSPModOptions;
     ClassExclusive1Input.ItemsSource = ClassExclusive1Data.OptionsListNames;
     ClassExclusive2Input.ItemsSource = ClassExclusive2Data.OptionsListNames;
     ElementInput.ItemsSource         = ElementData.OptionsListNames;
     ScopeInput.ItemsSource           = ScopeOptions;
 }
示例#10
0
        /// <summary>
        /// Individual party operations
        /// </summary>

        private void SetupData()
        {
            Players         = new BattlePlayer[] { BattlePlayer1, BattlePlayer2, BattlePlayer3, BattlePlayer4, BattlePlayer5 };
            EnvironmentData = new ComboBoxInputData("Environment_ID", "Name", "BaseObject JOIN Environment", "BaseObject_ID = BaseObjectID", "Name");
            EnvironmentInput.Items.AddRange(EnvironmentData.OptionsListNames.ToArray());
            Relations = new ComboBox[] { Relation1, Relation2, Relation3, Relation4, Relation5, Relation6 };
            for (int i = 0; i < Players.Length; i++)
            {
                Players[i].SetupData();
            }
            for (int i = 0; i < Relations.Length; i++)
            {
                Relations[i].Items.AddRange(RelationsOptions);
            }
            BattleData = new ComboBoxInputData("Battle_ID", "Name", "BaseObject JOIN Battle", "BaseObject_ID = BaseObjectID", "Name");
            BattleInput.Items.AddRange(BattleData.OptionsListNames.ToArray());
        }
示例#11
0
 public void SetupData()
 {
     PlayerData       = new ComboBoxInputData("Player_ID", "Name", "BaseObject JOIN Player", "BaseObjectID = BaseObject_ID", "Player_ID");
     ItemData         = new ComboBoxInputData("Item_ID", "Name", "BaseObject JOIN Item", "BaseObjectID = BaseObject_ID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     PassiveSkillData = new ComboBoxInputData("PassiveSkill_ID", "Name", "BaseObject JOIN PassiveSkill", "BaseObjectID = BaseObject_ID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     Player.Items.AddRange(PlayerData.OptionsListNames.ToArray());
     ZFormation.Items.AddRange(ZFormationOptions);
     XFormation.Items.AddRange(XFormationOptions);
     string[] items         = ItemData.OptionsListNames.ToArray();
     string[] passiveSkills = PassiveSkillData.OptionsListNames.ToArray();
     Item1.Items.AddRange(items);
     Item2.Items.AddRange(items);
     Item3.Items.AddRange(items);
     Item4.Items.AddRange(items);
     PassiveSkill1.Items.AddRange(passiveSkills);
     PassiveSkill2.Items.AddRange(passiveSkills);
     Player.SelectedIndexChanged += new EventHandler(CBChangedPlayer);
     Class.SelectedIndexChanged  += new EventHandler(CBChangedClass);
 }
示例#12
0
 protected override void SetupTableData()
 {
     Skills.Setup("BattlerClass", "Skill", "Skill Set", new List <string> {
         "Skill", "Level"
     });
     UpgradedClass1Data                 = new ComboBoxInputData("BattlerClass_ID", "Name", "BaseObject JOIN BattlerClass", "BaseObjectID = BaseObject_ID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     UpgradedClass2Data                 = new ComboBoxInputData("BattlerClass_ID", "Name", "BaseObject JOIN BattlerClass", "BaseObjectID = BaseObject_ID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     UsableWeaponType1Data              = new ComboBoxInputData("List_ID", "Name", "TypesLists", "List_Type = 'Weapon Types'", "List_ID", ComboBoxInputData.ADD_NULL_INPUT);
     UsableWeaponType2Data              = new ComboBoxInputData("List_ID", "Name", "TypesLists", "List_Type = 'Weapon Types'", "List_ID", ComboBoxInputData.ADD_NULL_INPUT);
     PassiveSkill1Data                  = new ComboBoxInputData("PassiveSkill_ID", "Name", "BaseObject JOIN PassiveSkill", "BaseObject_ID = BaseObjectID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     PassiveSkill2Data                  = new ComboBoxInputData("PassiveSkill_ID", "Name", "BaseObject JOIN PassiveSkill", "BaseObject_ID = BaseObjectID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     Skills.AttributeName               = "LevelRequired";
     UpgradedClass1Input.ItemsSource    = UpgradedClass1Data.OptionsListNames;
     UpgradedClass2Input.ItemsSource    = UpgradedClass2Data.OptionsListNames;
     UsableWeaponType1Input.ItemsSource = UsableWeaponType1Data.OptionsListNames;
     UsableWeaponType2Input.ItemsSource = UsableWeaponType2Data.OptionsListNames;
     PassiveSkill1Input.ItemsSource     = PassiveSkill1Data.OptionsListNames;
     PassiveSkill2Input.ItemsSource     = PassiveSkill2Data.OptionsListNames;
 }
示例#13
0
 protected override void SetupTableData()
 {
     EnemyData = new ComboBoxInputData("Enemy_ID", "Name", "BaseObject JOIN Enemy", "BaseObjectID = BaseObject_ID", "Name");
     EnemyInput.SelectionChanged   += new SelectionChangedEventHandler(CBChangedEnemy);
     EnemyInput.ItemsSource         = EnemyData.OptionsListNames;
     GridPositionZInput.ItemsSource = GridPositionZOptions;
     GridPositionXInput.ItemsSource = GridPositionXOptions;
     EnemySkills.Setup(ClassTemplateId, "Skill", "Skills", new List <string> {
         "Name", ""
     });
     EnemyWeapons.Setup(ClassTemplateId, "Weapon", "Weapons", new List <string> {
         "Name", ""
     });
     EnemyItems.Setup(ClassTemplateId, "Item", "Items", new List <string> {
         "Name", ""
     });
     PassiveSkillData = new ComboBoxInputData("PassiveSkill_ID", "Name", "BaseObject JOIN PassiveSkill", "BaseObjectID = BaseObject_ID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     PassiveSkill1Input.ItemsSource = PassiveSkillData.OptionsListNames;
     PassiveSkill2Input.ItemsSource = PassiveSkillData.OptionsListNames;
 }
示例#14
0
        private void CBChangedPlayer(object sender, EventArgs e)
        {
            int playerId = PlayerData.OptionsListIds[Player.SelectedIndex];

            using (var conn = Database.AccessDB.Connect())
            {
                conn.Open();
                using (var reader = SQLDB.Read(conn, "SELECT Image FROM Player JOIN BaseObject WHERE BaseObject_ID = BaseObjectID AND Player_ID = " + playerId + ";"))
                {
                    reader.Read();
                    try { PlayerImage.Image = Conversion.BytesToImage(reader, 0); }
                    catch (Exception) { PlayerImage.Image = null; }
                }
                conn.Close();
            }
            string where     = "BaseObject_ID = BaseObjectID AND BattlerClass_ID = BattlerClassID AND PlayerID = " + playerId;
            BattlerClassData = new ComboBoxInputData("BattlerClassID", "Name", "Player_To_BattlerClass JOIN BaseObject JOIN BattlerClass", where, "BattlerClass_ID");
            Class.Items.Clear();
            Class.Items.AddRange(BattlerClassData.OptionsListNames.ToArray());
            Class.SelectedIndex = 0;
        }
示例#15
0
 protected override void SetupTableData()
 {
     WeaponTypeData = new ComboBoxInputData("List_ID", "Name", "TypesLists", "List_Type = 'Weapon Types'", "List_ID");
     WeaponTypeInput.ItemsSource = WeaponTypeData.OptionsListNames;
 }
示例#16
0
 protected override void SetupTableData()
 {
     TurnsIntoData = new ComboBoxInputData("Item_ID", "Name", "BaseObject JOIN Item", "BaseObjectID = BaseObject_ID", "Name", ComboBoxInputData.ADD_NULL_INPUT);
     TurnsIntoInput.ItemsSource = TurnsIntoData.OptionsListNames;
 }