Beispiel #1
0
    internal override void Init(AInteractable a_unit)
    {
        base.Init(a_unit);

        if (_unit.UnitConf != null && _unit.UnitConf.attributes != null)
        {
            strength           = new IntModified();
            strength.BaseValue = _unit.UnitConf.attributes.strength;

            agility           = new IntModified();
            agility.BaseValue = _unit.UnitConf.attributes.agility;

            intelligence           = new IntModified();
            intelligence.BaseValue = _unit.UnitConf.attributes.intelligence;

            perception           = new IntModified();
            perception.BaseValue = _unit.UnitConf.attributes.perception;

            spirit           = new IntModified();
            spirit.BaseValue = _unit.UnitConf.attributes.spirit;

            charisma           = new IntModified();
            charisma.BaseValue = _unit.UnitConf.attributes.charisma;
        }
        else
        {
            Debug.LogWarning("Unit Conf Issue in UnitAttributes.");
        }
    }
Beispiel #2
0
    internal IntModified Compute()
    {
        IntModified modified = new IntModified();

        modified.BaseValue        = baseValue.Value;
        modified.reducStackMethod = reductionStackMethod;
        modified.bonusIsFlatFirst = bonusIsFlatFirst;
        modified.malusIsFlatFirst = malusIsFlatFirst;

        return(modified);
    }
Beispiel #3
0
    internal Armor()
    {
        armor = new IntModified();
        armor.bonusIsFlatFirst = FFEngine.Game.Constants.ARMOR_MODIFIED_CONF.bonus;
        armor.malusIsFlatFirst = FFEngine.Game.Constants.ARMOR_MODIFIED_CONF.malus;
        armor.reducStackMethod = FFEngine.Game.Constants.ARMOR_MODIFIED_CONF.stack;

        flat = new IntModified();
        flat.bonusIsFlatFirst = FFEngine.Game.Constants.ARMOR_MODIFIED_CONF.bonus;
        flat.malusIsFlatFirst = FFEngine.Game.Constants.ARMOR_MODIFIED_CONF.malus;
        flat.reducStackMethod = FFEngine.Game.Constants.ARMOR_MODIFIED_CONF.stack;
    }
Beispiel #4
0
    internal BonusDamage()
    {
        percent = new FloatModified();
        flat    = new IntModified();
        if (Application.isPlaying)
        {
            percent.bonusIsFlatFirst = FFEngine.Game.Constants.DAMAGE_MODIFIED_CONF.bonus;
            percent.malusIsFlatFirst = FFEngine.Game.Constants.DAMAGE_MODIFIED_CONF.malus;
            percent.reducStackMethod = FFEngine.Game.Constants.DAMAGE_MODIFIED_CONF.stack;

            flat.bonusIsFlatFirst = FFEngine.Game.Constants.DAMAGE_MODIFIED_CONF.bonus;
            flat.malusIsFlatFirst = FFEngine.Game.Constants.DAMAGE_MODIFIED_CONF.malus;
            flat.reducStackMethod = FFEngine.Game.Constants.DAMAGE_MODIFIED_CONF.stack;
        }
    }
    internal IntModifiedModifier Compute()
    {
        IntModifiedModifier mod = new IntModifiedModifier();

        FloatModified newModF = new FloatModified();

        newModF.BaseValue = percent.Value;
        mod.percent       = newModF;

        IntModified newMod = new IntModified();

        newMod.BaseValue = flat.Value;
        mod.flat         = newMod;

        return(mod);
    }