示例#1
0
 public void addAttributes(Attributes _attributes)
 {
     this.strength += _attributes.stamina;
     this.agility += _attributes.agility;
     this.intelligence += _attributes.intelligence;
     this.stamina += _attributes.stamina;
 }
示例#2
0
文件: Cloths.cs 项目: MRCulpo/RPGCore
        public void removeCloths(Clothes _cloths)
        {
            this.armor -= _cloths.armor;
            this.attributes -= _cloths.attributes;

            //this.armor.removeArmor(_cloths.armor);
            //this.attributes.removeAttributes(_cloths.attributes);
        }
示例#3
0
文件: Weapon.cs 项目: MRCulpo/RPGCore
 public void addWeapon(Weapon _weapon)
 {
     this.element = _weapon.element;
     this.typeWeapon = _weapon.typeWeapon;
     this.damage += _weapon.damage;
     this.attributes += _weapon.attributes;
     //this.damage.addDamage(_weapon.damage);
     //this.attributes.addAttributes(_weapon.attributes);
 }
示例#4
0
 public Attributes( Attributes _attributes )
 {
     this.strength = _attributes.stamina;
     this.agility = _attributes.agility;
     this.intelligence = _attributes.intelligence;
     this.stamina = _attributes.stamina;
     this._Normalized = 1;
     this._NormalizedOther = 2;
 }
示例#5
0
 public Attributes(Attributes _attributes, int _normalized, int _normalizedOther)
 {
     this.strength = _attributes.stamina;
     this.agility = _attributes.agility;
     this.intelligence = _attributes.intelligence;
     this.stamina = _attributes.stamina;
     this._Normalized = _normalized;
     this._NormalizedOther = _normalizedOther;
 }
示例#6
0
文件: Cloths.cs 项目: MRCulpo/RPGCore
        public void addCloth(Clothes _cloths)
        {
            this.armor += _cloths.armor;
            this.attributes += _cloths.attributes;
            this.typeCloths = _cloths.typeCloths;

            //this.armor.addArmor(_cloths.armor);
            //this.attributes.addAttributes(_cloths.attributes);
            
        }
示例#7
0
        public static Attributes operator + (Attributes _attributes1, Attributes _attributes2)
        {
            Attributes _attributes = new Attributes();

            _attributes.strength = _attributes1.strength + _attributes2.strength;
            _attributes.intelligence = _attributes1.intelligence + _attributes2.intelligence;
            _attributes.agility = _attributes1.agility + _attributes2.agility;
            _attributes.stamina = _attributes1.stamina + _attributes2.stamina;

            return _attributes;
        }
示例#8
0
文件: Cloths.cs 项目: MRCulpo/RPGCore
        public Clothes(Clothes _cloths)
        {
            this.id = _cloths.id;
            this.amount = _cloths.amount;
            this.image = _cloths.image;
            this.name = _cloths.name;
            this.typeItem = _cloths.typeItem;

            this.armor = new Armor(_cloths.armor);
            this.attributes = new Attributes(_cloths.attributes);
            this.typeCloths = _cloths.typeCloths;
        }
示例#9
0
        public void removeAttributes(Attributes _attributes)
        {
            this.strength -= _attributes.stamina;
            this.agility -= _attributes.agility;
            this.intelligence -= _attributes.intelligence;
            this.stamina -= _attributes.stamina;

            if (this.strength <= 0) this.strength = 0;
            if (this.agility <= 0) this.agility = 0;
            if (this.intelligence <= 0) this.intelligence = 0;
            if (this.stamina <= 0) this.stamina = 0;
        }
示例#10
0
文件: Weapon.cs 项目: MRCulpo/RPGCore
        public void removeWeapon(Weapon _weapon)
        {
            this.element = _Element.Null;
            this.typeWeapon = _Weapon.Null;

            this.damage -= _weapon.damage;
            this.attributes -= _weapon.attributes;

            /*
            this.damage.removeDamage(_weapon.damage);
            this.attributes.removeAttributes(_weapon.attributes);*/
        }
示例#11
0
文件: Weapon.cs 项目: MRCulpo/RPGCore
        public Weapon()
        {
            this.id = 0;
            this.amount = 0;
            this.image = "";
            this.name = "";
            this.typeItem = _Item.Null;

            this.element = _Element.Null;
            this.typeWeapon = _Weapon.Null;
            this.damage = new Damage();
            this.attributes = new Attributes();
        }
示例#12
0
文件: Cloths.cs 项目: MRCulpo/RPGCore
        public Clothes() 
        {

            this.id = 0;
            this.amount = 0;
            this.image = "";
            this.name = "";
            this.typeItem = _Item.Null;

            this.armor = new Armor();
            this.attributes = new Attributes();
            this.typeCloths = _Cloths.Null;
        }
示例#13
0
文件: Weapon.cs 项目: MRCulpo/RPGCore
        public Weapon(Weapon _weapon)
        {
            this.id = _weapon.id;
            this.amount = _weapon.amount;
            this.image = _weapon.image;
            this.name = _weapon.name;
            this.typeItem = _weapon.typeItem;

            this.element = _weapon.element;
            this.typeWeapon = _weapon.typeWeapon;
            this.damage = new Damage(_weapon.damage);
            this.attributes = new Attributes(_weapon.attributes);
        }
示例#14
0
	    public Ability()
	    {
            this.id = 0;
            this.image = "";
            this.name = "";
		    this.desc = "";
            this.cooldown = 0F;
            this.cost = 0;
		    this.damage = new Damage();
		    this.armor = new Armor();
            this.attributes = new Attributes();
            this.effects = new Effect[0];
            this.element = _Element.Null;
	    }
示例#15
0
        public Ability ( Ability _ability)
	    {
            this.id = _ability.id;
            this.image = _ability.image;
            this.name = _ability.name;
            this.desc = _ability.desc;
            this.cooldown = _ability.cooldown;
            this.cost = _ability.cost;
            this.damage = _ability.damage;
            this.armor = _ability.armor;
            this.attributes = _ability.attributes;
            this.effects = _ability.effects;
            this.element = _ability.element;
	    }
示例#16
0
        public static Attributes operator - (Attributes _attributes1, Attributes _attributes2)
        {
            Attributes _attributes = new Attributes();

            _attributes.strength = _attributes1.strength - _attributes2.strength;
            _attributes.intelligence = _attributes1.intelligence - _attributes2.intelligence;
            _attributes.agility = _attributes1.agility - _attributes2.agility;
            _attributes.stamina = _attributes1.stamina - _attributes2.stamina;

            if (_attributes.strength <= 0) _attributes.strength = 0;
            if (_attributes.agility <= 0) _attributes.agility = 0;
            if (_attributes.intelligence <= 0) _attributes.intelligence = 0;
            if (_attributes.stamina <= 0) _attributes.stamina = 0;

            return _attributes;
        }
示例#17
0
        void assingLevel(Class _class, Attributes _attributes)
        {
            this.totalExperience += this.currentExperience;

            while (this.currentExperience > this.nextExperience)
            {
                if (this.currentExperience >= this.nextExperience)
                {
                    this.nivel++;
                    this.levelPoints.assingPoints();
                    this.currentExperience -= this.nextExperience;
                    this.lastExperience = this.nextExperience;
                    this.nextExperience *= this.modify;
                    if (_class.typeClass != _Class.None) _attributes.attributePerLevel(_class);
                }
            }
        }
示例#18
0
文件: Effect.cs 项目: MRCulpo/RPGCore
 /// <summary>
 /// Método Update Do Atributo, responsavél por remover ou atribuiir efeitos dos Atributos
 /// </summary>
 /// <param name="_attributes"></param>
 /// <param name="deltaTime"></param>
 public void update(Attributes _attributes, float deltaTime)
 {
     if(!instante)
     {
         if(c_cooldownEffects >= cooldownEffects)
         {
             this.c_cooldownEffects = 0f;
             _attributes.removeEffects(effectsRemove, value);
             this.reservedValue += value;
         }
         c_cooldownEffects += deltaTime;
     }
     else
     {
         if (c_instante)
         {
             _attributes.removeEffects(effectsRemove, value);
             this.reservedValue += value;
             c_instante = false;
         }
     }
 }
示例#19
0
文件: Effect.cs 项目: MRCulpo/RPGCore
 /// <summary>
 /// Método de sobrecarga para reverter os valores dos Atributos
 /// </summary>
 /// <param name="_attributes"></param>
 public void restoreValue(Attributes _attributes)
 {
     _attributes.reverseEffects(effectsRemove, reservedValue);
 }
示例#20
0
文件: Effect.cs 项目: MRCulpo/RPGCore
        /// <summary>
        /// Método Update responsavél pelos updates de todos os ciclos dos efeitos, atribuindo seus valores a cada componente.
        /// </summary>
        /// <param name="_attributes"></param>
        /// <param name="_damage"></param>
        /// <param name="_armor"></param>
        /// <param name="_life"></param>
        /// <param name="deltaTime"></param>
        public void update(Attributes _attributes, Damage _damage, Armor _armor, Life _life, float deltaTime)
        {
            this.c_cooldown += deltaTime;

            if (this.c_cooldown < this.cooldown)
            {
                for (int i = 0; i < effects.Count; i++)
                {
                    _EffectsRemove __effect = this.effects[i].effectsRemove;

                    if( __effect == _EffectsRemove.Strength ||
                        __effect == _EffectsRemove.Agility ||
                        __effect == _EffectsRemove.Stamina ||
                        __effect == _EffectsRemove.Intelligence)
                    {
                        this.effects[i].update(_attributes, deltaTime);
                    }
                    else if (   __effect == _EffectsRemove.Dark ||
                                __effect == _EffectsRemove.Fire ||
                                __effect == _EffectsRemove.Frost ||
                                __effect == _EffectsRemove.Nature ||
                                __effect == _EffectsRemove.Armor ||
                                __effect == _EffectsRemove.Parry)
                    {
                        this.effects[i].update(_armor, deltaTime);
                    }
                    else if (   __effect == _EffectsRemove.Damage ||
                                __effect == _EffectsRemove.CriticalDamage ||
                                __effect == _EffectsRemove.ElementalDamage)
                    {
                        this.effects[i].update(_damage, deltaTime);
                    }
                    else if (__effect == _EffectsRemove.Life)
                    {
                        this.effects[i].update(_life, deltaTime);
                    }
                }
            }
            else
            {
                for (int i = 0; i < effects.Count; i++)
                {
                    _EffectsRemove __effect = this.effects[i].effectsRemove;

                    if (__effect == _EffectsRemove.Strength ||
                        __effect == _EffectsRemove.Agility ||
                        __effect == _EffectsRemove.Stamina ||
                        __effect == _EffectsRemove.Intelligence)
                    {
                        this.effects[i].restoreValue(_attributes);
                    }
                    else if (__effect == _EffectsRemove.Dark ||
                                __effect == _EffectsRemove.Fire ||
                                __effect == _EffectsRemove.Frost ||
                                __effect == _EffectsRemove.Nature ||
                                __effect == _EffectsRemove.Armor ||
                                __effect == _EffectsRemove.Parry)
                    {
                        this.effects[i].restoreValue(_armor);
                    }
                    else if (__effect == _EffectsRemove.Damage ||
                                __effect == _EffectsRemove.CriticalDamage ||
                                __effect == _EffectsRemove.ElementalDamage)
                    {
                        this.effects[i].restoreValue(_damage);
                    }
                }
            }
        }
示例#21
0
 public void addExperience(double _experience, Class _class, Attributes _attributes)
 {
     this.currentExperience += _experience;
     this.assingLevel(_class, _attributes);
 }
示例#22
0
 public void addExperience(double _experience, Class _class, Attributes _attributes)
 {
     this.currentExperience += _experience;
     this.assingLevel(_class, _attributes);
 }