Exemplo n.º 1
0
 public Mine(int id)
 {
     _id = id;
     _playerId = 0;
     _player = null;
     _name = "";
 }
Exemplo n.º 2
0
 public Mine()
 {
     _id = 0;
     _playerId = 0;
     _player = null;
     _name = "";
 }
Exemplo n.º 3
0
        public bool CanBuild(Player player)
        {
            if (player._wood < this._wood) return false;
            if (player._ore < this._ore) return false;
            if (player._gem < this._gem) return false;
            if (player._sulfur < this._sulfur) return false;
            if (player._crystal < this._crystal) return false;
            if (player._mercury < this._mercury) return false;
            if (player._gold < this._gold) return false;

            return true;
        }
Exemplo n.º 4
0
 public Town()
 {
     _id = 0;
     _playerId = 0;
     _armyName = "";
     _player = null;
     _buildingKIds = new Hashtable();
     _armyAvKIds = new Hashtable();
     _armyInCastleKSlots = new Hashtable();
     _armyInCastleLabels = new Hashtable();
     _heroInCastle = null;
     _heroVisit = null;
     _isBuilt = false;
 }
Exemplo n.º 5
0
        private void Init(int id)
        {
            _id = id;
            _name = "";
            _playerId = 0;
            _sex = SexEnum.Male;
            _level = 1;
            _experience = 0;

            _basicAttack = 0;
            _basicDefense = 0;
            _basicPower = 0;
            _basicKnowledge = 0;

            _attack = 0;
            _defense = 0;
            _power = 0;
            _knowledge = 0;
            _speed = 0;
            _health = 0;

            _maxSpellPoint = 0;
            _spellPointLeft = 0;

            _movementPoint = 0;
            _movementPointLeft = 0;

            _skills = new Hashtable();

            _spells = new Hashtable();
            _spellDmgKEles = new Hashtable();

            _artifacts = new Hashtable();
            _artifactKEquips = new Hashtable();
            _artifactKEquips.Add(Heroes.Core.Heros.EquipPartEnum.LeftHand, new Heroes.Core.Heros.Artifact[1]);
            _artifactKEquips.Add(Heroes.Core.Heros.EquipPartEnum.RightHand, new Heroes.Core.Heros.Artifact[1]);
            _artifactKEquips.Add(Heroes.Core.Heros.EquipPartEnum.Head, new Heroes.Core.Heros.Artifact[1]);
            _artifactKEquips.Add(Heroes.Core.Heros.EquipPartEnum.Torso, new Heroes.Core.Heros.Artifact[1]);
            _artifactKEquips.Add(Heroes.Core.Heros.EquipPartEnum.Ring, new Heroes.Core.Heros.Artifact[2]);
            _artifactKEquips.Add(Heroes.Core.Heros.EquipPartEnum.Neck, new Heroes.Core.Heros.Artifact[1]);
            _artifactKEquips.Add(Heroes.Core.Heros.EquipPartEnum.Shoulder, new Heroes.Core.Heros.Artifact[1]);
            _artifactKEquips.Add(Heroes.Core.Heros.EquipPartEnum.Feet, new Heroes.Core.Heros.Artifact[1]);
            _artifactKEquips.Add(Heroes.Core.Heros.EquipPartEnum.Misc, new Heroes.Core.Heros.Artifact[6]);
            _artifactUnequips = new ArrayList();

            _armyKSlots = new Hashtable();
            _player = null;
        }
Exemplo n.º 6
0
        public void CopyAllFrom(Hero hero)
        {
            CopyFrom(hero);

            this._player = new Player();
            this._player.CopyFrom(hero._player);

            foreach (Army army in hero._armyKSlots.Values)
            {
                this._armyKSlots.Add(army._slotNo, army);
            }

            foreach (Spell spell in hero._spells.Values)
            {
                Spell spell2 = new Spell();
                spell2.CopyFrom(spell);
                this._spells.Add(spell2._id, spell2);
            }

            foreach (Skill skill in hero._skills.Values)
            {
                Skill skill2 = new Skill();
                skill2.CopyFrom(skill);
                this._skills.Add(skill2._id, skill2);
            }
        }
Exemplo n.º 7
0
 public void DeductResources(Player player)
 {
     player._wood -= this._woodTotal;
     player._ore -= this._oreTotal;
     player._gem -= this._gemTotal;
     player._sulfur -= this._sulfurTotal;
     player._crystal -= this._crystalTotal;
     player._mercury -= this._mercuryTotal;
     player._gold -= this._goldTotal;
 }
Exemplo n.º 8
0
        public bool CanBuy(Player player)
        {
            if (player._wood < this._woodTotal) return false;
            if (player._ore < this._oreTotal) return false;
            if (player._gem < this._gemTotal) return false;
            if (player._sulfur < this._sulfurTotal) return false;
            if (player._crystal < this._crystalTotal) return false;
            if (player._mercury < this._mercuryTotal) return false;
            if (player._gold < this._goldTotal) return false;

            return true;
        }
Exemplo n.º 9
0
 public void DeductResources(Player player)
 {
     player._wood -= this._wood;
     player._ore -= this._ore;
     player._gem -= this._gem;
     player._sulfur -= this._sulfur;
     player._crystal -= this._crystal;
     player._mercury -= this._mercury;
     player._gold -= this._gold;
 }
Exemplo n.º 10
0
        public void CopyFrom(Player player)
        {
            this._id = player._id;
            this._name = player._name;
            this._isComputer = player._isComputer;

            this._wood = player._wood;
            this._mercury = player._mercury;
            this._ore = player._ore;
            this._sulfur = player._sulfur;
            this._crystal = player._crystal;
            this._gem = player._gem;
            this._gold = player._gold;
        }