예제 #1
0
void Character::updateDerivedAttributes(unsigned int attr)
{
    /*
     * `attr' has changed, perform updates accordingly.
     */
    flagAttribute(attr);

    switch(attr)
    {
    case ATTR_STR:
        updateDerivedAttributes(ATTR_INV_CAPACITY);
        break;
    case ATTR_AGI:
        updateDerivedAttributes(ATTR_DODGE);
        updateDerivedAttributes(ATTR_MOVE_SPEED_TPS);
        break;
    case ATTR_VIT:
        updateDerivedAttributes(ATTR_MAX_HP);
        updateDerivedAttributes(ATTR_HP_REGEN);
        updateDerivedAttributes(ATTR_DEFENSE);
        break;
    case ATTR_INT:
        // TODO
        break;
    case ATTR_DEX:
        updateDerivedAttributes(ATTR_ACCURACY);
        break;
    case ATTR_WIL:
        // TODO
        break;
    default:
        Being::updateDerivedAttributes(attr);
    }
}
예제 #2
0
void Character::updateDerivedAttributes(unsigned attr)
{
    /*
     * `attr' has changed, perform updates accordingly.
     */
    flagAttribute(attr);


    Being::updateDerivedAttributes(attr);
}