Exemple #1
0
        public Actor()
        {
            SetAttributesToDefault();

            this.HPBaseMax = new RPGCalc().GetBaseHP(this);
            this.MPBaseMax = new RPGCalc().GetBaseMP(this);

            Name = "Joseph";

            BaseSpeed    = RPGCalc.DEFAULT_SPEED;
            CurrentSpeed = BaseSpeed;

            m_baseAttack  = RPGCalc.DEFAULT_BASE_ATTACK;
            m_baseDefense = RPGCalc.DEFAULT_BASE_DEFENSE;
            m_baseDamage  = RPGCalc.DEFAULT_BASE_DAMAGE;

            LOSRange = RPGCalc.DEFAULT_LOS_RANGE;

            inventory = new Inventory(this);

            m_SpellBook = new RPGSpellBook();
            m_QuickBook = new RPGSpellBook(3);

            lastAttack = System.DateTime.Now;
            lastDamage = new DateTime();

            this.ImpedesWalking = true;

            Relation = RelationToPC.Neutral;

            RPGCalc calc = new RPGCalc();

            m_Lvl        = 1;
            m_ExpForKill = calc.GetExpForKill(this);

            AI = new ArtificialIntelligence(this);
            //AIActive = false; // enemies don't respond.
            AIActive = true;

            States = new ActionStates(this);

            // use all we have so far to calc complex numbers (HP/MP/Att/Def, etc);
            this.HPBaseMax = calc.GetBaseHP(this);
            this.MPBaseMax = calc.GetBaseMP(this);
            this.ResetStats();
        }