Пример #1
0
    public void Equip(Weapon w)
    {
        if (unitData.UnitWeapon != null)
        {
            Unequip(unitData.UnitWeapon);
        }

        unitData.UnitWeapon = w;

        statsReference.AddModifier(new ModApplication(w.hp_mod_type, StatTypes.MHP, w.hp_mod));
        statsReference.AddModifier(new ModApplication(w.mp_mod_type, StatTypes.MMP, w.mp_mod));
        statsReference.AddModifier(new ModApplication(w.atk_mod_type, StatTypes.ATK, w.atk_mod));
        statsReference.AddModifier(new ModApplication(w.def_mod_type, StatTypes.DEF, w.def_mod));
        statsReference.AddModifier(new ModApplication(w.spr_mod_type, StatTypes.SPR, w.spr_mod));
        statsReference.AddModifier(new ModApplication(w.spd_mod_type, StatTypes.SPD, w.spd_mod));
        statsReference.AddModifier(new ModApplication(w.mov_mod_type, StatTypes.MOV, w.mov_mod));
        statsReference.AddModifier(new ModApplication(w.jmp_mod_type, StatTypes.JMP, w.jmp_mod));
    }