Beispiel #1
0
        internal void ApplyProperties()
        {
            this.ResetProperties();

            //apply properties
            difficulty.ApplyProperty(this);
            rank.ApplyProperty(this);
            foreach (MonsterProperty property in properties)
            {
                property.Recalculate(this);
                property.ApplyProperty(this);
                slotsUsed += property.SlotCost();
            }

            slotsUsed += basicAttack.SlotCost();

            basicAttack.Recalculate(this);
            foreach (AbstractAbility ability in abilities)
            {
                ability.Recalculate(this);
                slotsUsed += ability.SlotCost();
            }

            //then, calculate derived stats once the properties have been applied.
            //hpMax = 100 + (((vit * 4) + 8) * hpMod * level);
            hpMax  = 200 * tier + vit * 2 * level * hpMod;
            hpMax *= hpMultiplier;
            //mpMax = 50 + (spr * mpMod * level);
            mpMax = 200 * tier + spr * 2 * level * mpMod;

            xp = xpMod * level;
            jp = jpMod * jpBase;
        }