/**
* Does attribute fix modifiers.
* Added passing of the chars so that the status changes can affect it. [Skotlex]
* Note: Passing src/target == NULL is perfectly valid, it skips SC_ checks.
* @param src
* @param target
* @param damage
* @param atk_elem
* @param def_type
* @param def_lv
* @return damage
*/
int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 damage,int atk_elem,int def_type, int def_lv)
if (sc->data[SC_SPIRIT] && (sc->data[SC_SPIRIT]->val2 == SL_MONK && def_type == ELE_GHOST))
ratio = 75;
#ifdef RENEWAL
//In renewal, reductions are always rounded down so damage can never reach 0 unless ratio is 0
damage = damage - (int64)((damage * (100 - ratio)) / 100);
#else
damage = (int64)((damage*ratio)/100);
#endif
//Damage can be negative, see battle_config.attr_recover
return damage;
}
Question
Bringer
i try to make MOD for Monk Spirit
/** * Does attribute fix modifiers. * Added passing of the chars so that the status changes can affect it. [Skotlex] * Note: Passing src/target == NULL is perfectly valid, it skips SC_ checks. * @param src * @param target * @param damage * @param atk_elem * @param def_type * @param def_lv * @return damage */ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 damage,int atk_elem,int def_type, int def_lv)
if (sc->data[SC_SPIRIT] && (sc->data[SC_SPIRIT]->val2 == SL_MONK && def_type == ELE_GHOST)) ratio = 75; #ifdef RENEWAL //In renewal, reductions are always rounded down so damage can never reach 0 unless ratio is 0 damage = damage - (int64)((damage * (100 - ratio)) / 100); #else damage = (int64)((damage*ratio)/100); #endif //Damage can be negative, see battle_config.attr_recover return damage; }
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.