public NonPlayer GetNPC(String characterID)
        {
            NonPlayer npc = null;

            if (MySqlConnection.State.Equals("Closed"))
            {
                InitDriver();
            }

            SqlQuery        = "SELECT * FROM non_player_character WHERE character_id = '" + characterID + "'";
            MySqlCommand    = new MySqlCommand(SqlQuery, MySqlConnection);
            MySqlDataReader = MySqlCommand.ExecuteReader();
            if (MySqlDataReader.Read())
            {
                String    name      = MySqlDataReader.GetString(1);
                String    sex       = MySqlDataReader.GetString(2);
                String    type      = MySqlDataReader.GetString(3);
                Archetype archetype = Archetype.GetArchetype(MySqlDataReader.GetString(4));
                int       gold      = MySqlDataReader.GetInt32(5);
                int       level     = MySqlDataReader.GetInt32(6);
                Item      item      = null;
                if (!MySqlDataReader.IsDBNull(7))
                {
                    item = _itemDriver.GetItem(MySqlDataReader.GetString(7));
                }
                MoveSet  moveSet  = _moveSetDriver.GetMoveSet(characterID);
                BaseStat baseStat = _baseStatDriver.GetBaseStat(characterID);

                npc = new NonPlayer(name, sex, gold, level, archetype, moveSet, type, baseStat, new BattleStatus(), item, characterID);
            }
            return(npc);
        }
        public BaseStat GetBaseStat(String characterID)
        {
            BaseStat baseStat = null;

            if (MySqlConnection.State.Equals("Closed"))
            {
                InitDriver();
            }

            SqlQuery        = "SELECT * FROM base_stat WHERE character_id = '" + characterID + "'";
            MySqlCommand    = new MySqlCommand(SqlQuery, MySqlConnection);
            MySqlDataReader = MySqlCommand.ExecuteReader();

            if (MySqlDataReader.Read())
            {
                int hp  = MySqlDataReader.GetInt32(1);
                int atk = MySqlDataReader.GetInt32(2);
                int def = MySqlDataReader.GetInt32(3);
                int eva = MySqlDataReader.GetInt32(4);
                int spd = MySqlDataReader.GetInt32(5);

                baseStat = new BaseStat(atk, def, eva, spd, hp);
            }

            return(baseStat);
        }
Ejemplo n.º 3
0
 public EnergyManipulator()
 {
     ArchetypeID       = ArchetypeID.ENERGY_MANIPULATOR;
     MainArchetypeName = "MYSTIC";
     ArchetypeName     = "ENERGY MANIPULATOR";
     CharacterBaseStat = new BaseStat(6, 6, 2, 3, 8);
     LevelUpBoost1     = new BaseStat(7, 3, 5, 6, 4);
     LevelUpBoost2     = new BaseStat(6, 4, 5, 7, 3);
     LevelUpBoost3     = new BaseStat(5, 5, 5, 5, 5);
     LevelUpBoost4     = new BaseStat(4, 6, 5, 3, 7);
     LevelUpBoost5     = new BaseStat(4, 6, 5, 4, 6);
 }
Ejemplo n.º 4
0
 public WeaponSpecialist()
 {
     ArchetypeID       = ArchetypeID.WEAPON_SPECIALIST;
     MainArchetypeName = "SPECIALST";
     ArchetypeName     = "WEAPON SPECIALIST";
     CharacterBaseStat = new BaseStat(6, 4, 5, 4, 6);
     LevelUpBoost1     = new BaseStat(6, 6, 1, 6, 6);
     LevelUpBoost2     = new BaseStat(5, 5, 3, 5, 7);
     LevelUpBoost3     = new BaseStat(5, 5, 5, 5, 5);
     LevelUpBoost4     = new BaseStat(5, 4, 6, 3, 7);
     LevelUpBoost5     = new BaseStat(3, 3, 7, 6, 6);
 }
Ejemplo n.º 5
0
 public MixedMartialArtist()
 {
     ArchetypeID       = ArchetypeID.MIXED_MARTIAL_ARTIST;
     MainArchetypeName = "BRAWLER";
     ArchetypeName     = "MIXED MARTIAL ARTIST";
     CharacterBaseStat = new BaseStat(6, 5, 3, 7, 4);
     LevelUpBoost1     = new BaseStat(3, 7, 5, 4, 6);
     LevelUpBoost2     = new BaseStat(4, 6, 5, 3, 7);
     LevelUpBoost3     = new BaseStat(5, 5, 5, 5, 5);
     LevelUpBoost4     = new BaseStat(6, 4, 5, 7, 3);
     LevelUpBoost5     = new BaseStat(6, 4, 5, 6, 4);
 }
Ejemplo n.º 6
0
 public RegularSwordsman()
 {
     ArchetypeID       = ArchetypeID.REGULAR_SWORDSMAN;
     MainArchetypeName = "SWORDSMAN";
     ArchetypeName     = "REGULAR SOWRDSMAN";
     CharacterBaseStat = new BaseStat(8, 3, 3, 6, 5);
     LevelUpBoost1     = new BaseStat(3, 7, 5, 4, 6);
     LevelUpBoost2     = new BaseStat(4, 6, 5, 3, 7);
     LevelUpBoost3     = new BaseStat(5, 5, 5, 5, 5);
     LevelUpBoost4     = new BaseStat(6, 4, 5, 3, 7);
     LevelUpBoost5     = new BaseStat(7, 3, 5, 6, 4);
 }
Ejemplo n.º 7
0
 public Knight()
 {
     ArchetypeID       = ArchetypeID.KNIGHT;
     MainArchetypeName = "DEFENDER";
     ArchetypeName     = "KNIGHT";
     CharacterBaseStat = new BaseStat(4, 8, 3, 4, 6);
     LevelUpBoost1     = new BaseStat(7, 3, 5, 6, 4);
     LevelUpBoost2     = new BaseStat(6, 4, 5, 7, 3);
     LevelUpBoost3     = new BaseStat(5, 5, 5, 5, 5);
     LevelUpBoost4     = new BaseStat(4, 6, 5, 7, 3);
     LevelUpBoost5     = new BaseStat(3, 7, 5, 4, 6);
 }
Ejemplo n.º 8
0
 public Berserker()
 {
     ArchetypeID       = ArchetypeID.BERSERKER;
     MainArchetypeName = "BRAWLER";
     ArchetypeName     = "BERSERKER";
     CharacterBaseStat = new BaseStat(7, 5, 2, 8, 3);
     LevelUpBoost1     = new BaseStat(4, 6, 5, 3, 7);
     LevelUpBoost2     = new BaseStat(3, 7, 5, 4, 6);
     LevelUpBoost3     = new BaseStat(5, 5, 5, 5, 5);
     LevelUpBoost4     = new BaseStat(7, 3, 5, 6, 4);
     LevelUpBoost5     = new BaseStat(6, 4, 5, 7, 3);
 }
 public CombatSpecialist()
 {
     ArchetypeID       = ArchetypeID.COMBAT_SPECIALIST;
     MainArchetypeName = "SPECIALST";
     ArchetypeName     = "COMBAT SPECIALIST";
     CharacterBaseStat = new BaseStat(4, 6, 5, 6, 4);
     LevelUpBoost1     = new BaseStat(6, 6, 1, 6, 6);
     LevelUpBoost2     = new BaseStat(5, 5, 3, 6, 6);
     LevelUpBoost3     = new BaseStat(5, 5, 5, 5, 5);
     LevelUpBoost4     = new BaseStat(5, 5, 7, 4, 4);
     LevelUpBoost5     = new BaseStat(6, 6, 7, 3, 3);
 }
Ejemplo n.º 10
0
 public NatureManipulator()
 {
     ArchetypeID       = ArchetypeID.NATURE_MANIPULATOR;
     MainArchetypeName = "MYSTIC";
     ArchetypeName     = "NATURE MANIPULATOR";
     CharacterBaseStat = new BaseStat(6, 5, 2, 2, 10);
     LevelUpBoost1     = new BaseStat(6, 4, 5, 7, 3);
     LevelUpBoost2     = new BaseStat(7, 3, 5, 6, 4);
     LevelUpBoost3     = new BaseStat(5, 5, 5, 5, 5);
     LevelUpBoost4     = new BaseStat(3, 7, 5, 4, 6);
     LevelUpBoost5     = new BaseStat(4, 6, 5, 3, 7);
 }
Ejemplo n.º 11
0
 public HeavyShielder()
 {
     ArchetypeID       = ArchetypeID.HEAVY_SHIELDER;
     MainArchetypeName = "DEFENDER";
     ArchetypeName     = "HEAVY SHIELDER";
     CharacterBaseStat = new BaseStat(4, 9, 3, 4, 5);
     LevelUpBoost1     = new BaseStat(8, 2, 5, 6, 4);
     LevelUpBoost2     = new BaseStat(6, 4, 5, 8, 2);
     LevelUpBoost3     = new BaseStat(5, 5, 5, 5, 5);
     LevelUpBoost4     = new BaseStat(4, 6, 5, 2, 8);
     LevelUpBoost5     = new BaseStat(2, 8, 5, 4, 6);
 }
Ejemplo n.º 12
0
 public DualSwordsman()
 {
     ArchetypeID       = ArchetypeID.DUAL_SWORDSMAN;
     MainArchetypeName = "SWORDSMAN";
     ArchetypeName     = "DUAL SWORDSMAN";
     CharacterBaseStat = new BaseStat(10, 3, 3, 5, 4);
     LevelUpBoost1     = new BaseStat(2, 8, 5, 4, 6);
     LevelUpBoost2     = new BaseStat(4, 6, 5, 2, 8);
     LevelUpBoost3     = new BaseStat(5, 5, 5, 5, 5);
     LevelUpBoost4     = new BaseStat(6, 4, 5, 8, 2);
     LevelUpBoost5     = new BaseStat(8, 2, 5, 6, 4);
 }
Ejemplo n.º 13
0
 public NonPlayer(String name, String sex, int gold, int level, Archetype archetype, MoveSet moveSet, String type, BaseStat baseStat, BattleStatus battleStatus, Item item, String id)
 {
     CharacterName         = name;
     CharacterSex          = sex;
     CharacterGold         = gold;
     CharacterLevel        = level;
     CharacterArchetype    = archetype;
     CharacterMoveSet      = moveSet;
     CharacterBaseStat     = baseStat;
     CharacterBattleStatus = battleStatus;
     CharacterItem         = item;
     SetCharacterType(type);
     CharacterID = id;
 }
Ejemplo n.º 14
0
        private void AddBaseStats(BaseStat baseStat)
        {
            Player player = Player.GetInstance();

            player.CharacterBaseStat.FullAtk += baseStat.Atk;
            player.CharacterBaseStat.FullDef += baseStat.Def;
            player.CharacterBaseStat.FullEva += baseStat.Eva;
            player.CharacterBaseStat.FullSpd += baseStat.Spd;
            player.CharacterBaseStat.FullHp  += baseStat.Hp;
            player.CharacterBaseStat.Atk     += baseStat.Atk;
            player.CharacterBaseStat.Def     += baseStat.Def;
            player.CharacterBaseStat.Eva     += baseStat.Eva;
            player.CharacterBaseStat.Spd     += baseStat.Spd;
            player.CharacterBaseStat.Hp      += baseStat.Hp;
        }
Ejemplo n.º 15
0
 private Player()
 {
     CharacterName         = "Player1";
     CharacterSex          = "MALEFE";
     CharacterGold         = 500;
     CharacterLevel        = 1;
     CharacterCurrentXP    = 0;
     CharacterLimitXP      = 1;
     CharacterMoveSet      = new MoveSet();
     CharacterBaseStat     = new BaseStat();
     CharacterBattleStatus = new BattleStatus();
     PlayerBag             = new Bag();
     CharacterItem         = null;
     CharacterType         = "PLAYER";
     CharacterID           = "PLAYER_1";
 }