Renamed RRMODE to REMODE
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15111 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
8b930a877c
commit
7c435a9e68
@ -2092,7 +2092,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
|
|||||||
if (!flag.idef || !flag.idef2)
|
if (!flag.idef || !flag.idef2)
|
||||||
{ //Defense reduction
|
{ //Defense reduction
|
||||||
short vit_def;
|
short vit_def;
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
short def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
|
short def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
|
||||||
#else
|
#else
|
||||||
signed char def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
|
signed char def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
|
||||||
@ -2704,7 +2704,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
#if RRMODE //Renewal MATK Appliance according to doddler (?title=Renewal_Changes#Upgrade_MATK)
|
#if REMODE //Renewal MATK Appliance according to doddler (?title=Renewal_Changes#Upgrade_MATK)
|
||||||
/**
|
/**
|
||||||
* min: (weaponMATK+upgradeMATK) * 2 + 1.5 * statusMATK
|
* min: (weaponMATK+upgradeMATK) * 2 + 1.5 * statusMATK
|
||||||
* max: [weaponMATK+upgradeMATK+(wMatk*wLvl)/10] * 2 + 1.5 * statusMATK
|
* max: [weaponMATK+upgradeMATK+(wMatk*wLvl)/10] * 2 + 1.5 * statusMATK
|
||||||
@ -3025,7 +3025,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!flag.imdef){
|
if(!flag.imdef){
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
short mdef = tstatus->mdef;
|
short mdef = tstatus->mdef;
|
||||||
#else
|
#else
|
||||||
char mdef = tstatus->mdef;
|
char mdef = tstatus->mdef;
|
||||||
@ -3041,7 +3041,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
|
|||||||
//mdef2-= mdef2* i/100;
|
//mdef2-= mdef2* i/100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
/**
|
/**
|
||||||
* RE MDEF Reduction (from doddler:?title=Renewal_Changes#MDEF)
|
* RE MDEF Reduction (from doddler:?title=Renewal_Changes#MDEF)
|
||||||
* Damage from magic = Magic Attack * 111.5/(111.5+eMDEF)
|
* Damage from magic = Magic Attack * 111.5/(111.5+eMDEF)
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* -> Note some features may be enabled/disabled at this file despite this setting being ON
|
* -> Note some features may be enabled/disabled at this file despite this setting being ON
|
||||||
* 0 : renewal support disabled, use original formulas
|
* 0 : renewal support disabled, use original formulas
|
||||||
**/
|
**/
|
||||||
#define RRMODE 1
|
#define REMODE 1
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renewal Cast Time
|
* Renewal Cast Time
|
||||||
|
@ -801,7 +801,7 @@ static bool itemdb_parse_dbrow(char** str, const char* source, int line, int scr
|
|||||||
id->value_buy, id->value_sell, nameid, id->jname);
|
id->value_buy, id->value_sell, nameid, id->jname);
|
||||||
|
|
||||||
id->weight = atoi(str[6]);
|
id->weight = atoi(str[6]);
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
itemdb_rr_split_atoi(str[7],&id->atk,&id->matk);
|
itemdb_rr_split_atoi(str[7],&id->atk,&id->matk);
|
||||||
#else
|
#else
|
||||||
id->atk = atoi(str[7]);
|
id->atk = atoi(str[7]);
|
||||||
@ -870,7 +870,7 @@ static int itemdb_readdb(void)
|
|||||||
/**
|
/**
|
||||||
* ro-resources inheritance: item_db -> item_db_re -> item_db2 (user customs)
|
* ro-resources inheritance: item_db -> item_db_re -> item_db2 (user customs)
|
||||||
**/
|
**/
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
const char* filename[] = { "item_db.txt","item_db_re.txt","item_db2.txt" };
|
const char* filename[] = { "item_db.txt","item_db_re.txt","item_db2.txt" };
|
||||||
#else
|
#else
|
||||||
const char* filename[] = { "item_db.txt","item_db2.txt" };
|
const char* filename[] = { "item_db.txt","item_db2.txt" };
|
||||||
@ -986,7 +986,7 @@ static int itemdb_readdb(void)
|
|||||||
*======================================*/
|
*======================================*/
|
||||||
static int itemdb_read_sqldb(void)
|
static int itemdb_read_sqldb(void)
|
||||||
{
|
{
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
const char* item_db_name[] = { item_db_db, item_db_re_db, item_db2_db };
|
const char* item_db_name[] = { item_db_db, item_db_re_db, item_db2_db };
|
||||||
#else
|
#else
|
||||||
const char* item_db_name[] = { item_db_db, item_db2_db };
|
const char* item_db_name[] = { item_db_db, item_db2_db };
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#define _ITEMDB_H_
|
#define _ITEMDB_H_
|
||||||
|
|
||||||
#include "../common/mmo.h" // ITEM_NAME_LENGTH
|
#include "../common/mmo.h" // ITEM_NAME_LENGTH
|
||||||
#include "map.h" //RRMODE
|
#include "map.h" //REMODE
|
||||||
|
|
||||||
#define MAX_RANDITEM 11000
|
#define MAX_RANDITEM 11000
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ struct item_data {
|
|||||||
int equip;
|
int equip;
|
||||||
int weight;
|
int weight;
|
||||||
int atk;
|
int atk;
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
int matk;//[RRInd] -- used in RE for matk
|
int matk;//[RRInd] -- used in RE for matk
|
||||||
#endif
|
#endif
|
||||||
int def;
|
int def;
|
||||||
|
@ -2164,7 +2164,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
|||||||
if(base_exp || job_exp)
|
if(base_exp || job_exp)
|
||||||
{
|
{
|
||||||
if( md->dmglog[i].flag != MDLF_PET || battle_config.pet_attack_exp_to_master ) {
|
if( md->dmglog[i].flag != MDLF_PET || battle_config.pet_attack_exp_to_master ) {
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
party_renewal_exp_mod(&base_exp,&job_exp,tmpsd[i]->status.base_level,md->level);
|
party_renewal_exp_mod(&base_exp,&job_exp,tmpsd[i]->status.base_level,md->level);
|
||||||
#endif
|
#endif
|
||||||
pc_gainexp(tmpsd[i], &md->bl, base_exp, job_exp, false);
|
pc_gainexp(tmpsd[i], &md->bl, base_exp, job_exp, false);
|
||||||
@ -2189,7 +2189,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
|||||||
struct item_drop_list *dlist = ers_alloc(item_drop_list_ers, struct item_drop_list);
|
struct item_drop_list *dlist = ers_alloc(item_drop_list_ers, struct item_drop_list);
|
||||||
struct item_drop *ditem;
|
struct item_drop *ditem;
|
||||||
int drop_rate;
|
int drop_rate;
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
int drop_modifier = mvp_sd ? party_renewal_drop_mod(mvp_sd->status.base_level - md->level) :
|
int drop_modifier = mvp_sd ? party_renewal_drop_mod(mvp_sd->status.base_level - md->level) :
|
||||||
second_sd ? party_renewal_drop_mod(second_sd->status.base_level - md->level) :
|
second_sd ? party_renewal_drop_mod(second_sd->status.base_level - md->level) :
|
||||||
third_sd ? party_renewal_drop_mod(third_sd->status.base_level - md->level) : 100;
|
third_sd ? party_renewal_drop_mod(third_sd->status.base_level - md->level) : 100;
|
||||||
@ -2235,7 +2235,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
|||||||
// Increase drop rate if user has SC_ITEMBOOST
|
// Increase drop rate if user has SC_ITEMBOOST
|
||||||
if (sd && sd->sc.data[SC_ITEMBOOST]) // now rig the drop rate to never be over 90% unless it is originally >90%.
|
if (sd && sd->sc.data[SC_ITEMBOOST]) // now rig the drop rate to never be over 90% unless it is originally >90%.
|
||||||
drop_rate = max(drop_rate,cap_value((int)(0.5+drop_rate*(sd->sc.data[SC_ITEMBOOST]->val1)/100.),0,9000));
|
drop_rate = max(drop_rate,cap_value((int)(0.5+drop_rate*(sd->sc.data[SC_ITEMBOOST]->val1)/100.),0,9000));
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
if( drop_modifier != 100 )
|
if( drop_modifier != 100 )
|
||||||
drop_rate = drop_rate * drop_modifier / 100;
|
drop_rate = drop_rate * drop_modifier / 100;
|
||||||
#endif
|
#endif
|
||||||
|
@ -917,7 +917,7 @@ int party_send_xy_clear(struct party_data *p)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
/**
|
/**
|
||||||
* Renewal Drop Earning Modifier
|
* Renewal Drop Earning Modifier
|
||||||
**/
|
**/
|
||||||
@ -972,7 +972,7 @@ int party_exp_share(struct party_data* p, struct block_list* src, unsigned int b
|
|||||||
{
|
{
|
||||||
struct map_session_data* sd[MAX_PARTY];
|
struct map_session_data* sd[MAX_PARTY];
|
||||||
unsigned int i, c;
|
unsigned int i, c;
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
int src_lvl = status_get_lv(src);
|
int src_lvl = status_get_lv(src);
|
||||||
#endif
|
#endif
|
||||||
nullpo_ret(p);
|
nullpo_ret(p);
|
||||||
@ -1002,7 +1002,7 @@ int party_exp_share(struct party_data* p, struct block_list* src, unsigned int b
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < c; i++) {
|
for (i = 0; i < c; i++) {
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
party_renewal_exp_mod(&base_exp,&job_exp,sd[i]->status.base_level,src_lvl);
|
party_renewal_exp_mod(&base_exp,&job_exp,sd[i]->status.base_level,src_lvl);
|
||||||
#endif
|
#endif
|
||||||
pc_gainexp(sd[i], src, base_exp, job_exp, false);
|
pc_gainexp(sd[i], src, base_exp, job_exp, false);
|
||||||
|
@ -92,7 +92,7 @@ void party_booking_update(struct map_session_data *sd, short* job);
|
|||||||
void party_booking_search(struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount);
|
void party_booking_search(struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount);
|
||||||
bool party_booking_delete(struct map_session_data *sd);
|
bool party_booking_delete(struct map_session_data *sd);
|
||||||
|
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
void party_renewal_exp_mod(unsigned int *base_exp, unsigned int *job_exp, int lvl, int moblvl);
|
void party_renewal_exp_mod(unsigned int *base_exp, unsigned int *job_exp, int lvl, int moblvl);
|
||||||
int party_renewal_drop_mod(int diff);
|
int party_renewal_drop_mod(int diff);
|
||||||
#endif
|
#endif
|
||||||
|
@ -5228,7 +5228,7 @@ int pc_need_status_point(struct map_session_data* sd, int type, int val)
|
|||||||
swap(low, high);
|
swap(low, high);
|
||||||
|
|
||||||
for ( ; low < high; low++ )
|
for ( ; low < high; low++ )
|
||||||
#if RRMODE //Renewal Stat Cost Formula
|
#if REMODE //Renewal Stat Cost Formula
|
||||||
sp += (low < 100) ? (2 + (low - 1) / 10) : (16 + 4 * ((low - 100) / 5));
|
sp += (low < 100) ? (2 + (low - 1) / 10) : (16 + 4 * ((low - 100) / 5));
|
||||||
#else
|
#else
|
||||||
sp += ( 1 + (low + 9) / 10 );
|
sp += ( 1 + (low + 9) / 10 );
|
||||||
@ -8250,7 +8250,7 @@ int pc_readdb(void)
|
|||||||
// ƒXƒLƒ‹ƒcƒŠ?
|
// ƒXƒLƒ‹ƒcƒŠ?
|
||||||
memset(statp,0,sizeof(statp));
|
memset(statp,0,sizeof(statp));
|
||||||
i=1;
|
i=1;
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
sprintf(line, "%s/statpoint_renewal.txt", db_path);
|
sprintf(line, "%s/statpoint_renewal.txt", db_path);
|
||||||
#else
|
#else
|
||||||
sprintf(line, "%s/statpoint.txt", db_path);
|
sprintf(line, "%s/statpoint.txt", db_path);
|
||||||
@ -8273,7 +8273,7 @@ int pc_readdb(void)
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","statpoint_renewal.txt");
|
ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","statpoint_renewal.txt");
|
||||||
#else
|
#else
|
||||||
ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","statpoint.txt");
|
ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","statpoint.txt");
|
||||||
|
@ -352,7 +352,7 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, int skill
|
|||||||
default:
|
default:
|
||||||
if (skill_lv >= battle_config.max_heal_lv)
|
if (skill_lv >= battle_config.max_heal_lv)
|
||||||
return battle_config.max_heal;
|
return battle_config.max_heal;
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
/**
|
/**
|
||||||
* Renewal Heal Formula (from Doddler)
|
* Renewal Heal Formula (from Doddler)
|
||||||
* TODO: whats that( 1+ %Modifier / 100 ) ? currently using 'x1' (100/100) until found out
|
* TODO: whats that( 1+ %Modifier / 100 ) ? currently using 'x1' (100/100) until found out
|
||||||
|
@ -56,7 +56,7 @@ static int refinebonus[MAX_REFINE_BONUS][3]; //
|
|||||||
int percentrefinery[5][MAX_REFINE+1]; // 精錬成功率(refine_db.txt)
|
int percentrefinery[5][MAX_REFINE+1]; // 精錬成功率(refine_db.txt)
|
||||||
static int atkmods[3][MAX_WEAPON_TYPE]; // 武器ATKサイズ修正(size_fix.txt)
|
static int atkmods[3][MAX_WEAPON_TYPE]; // 武器ATKサイズ修正(size_fix.txt)
|
||||||
static char job_bonus[CLASS_COUNT][MAX_LEVEL];
|
static char job_bonus[CLASS_COUNT][MAX_LEVEL];
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
enum {
|
enum {
|
||||||
SHIELD_ASPD,
|
SHIELD_ASPD,
|
||||||
RE_JOB_DB_MAX,
|
RE_JOB_DB_MAX,
|
||||||
@ -1537,7 +1537,7 @@ int status_base_amotion_pc(struct map_session_data* sd, struct status_data* stat
|
|||||||
|
|
||||||
// raw delay adjustment from bAspd bonus
|
// raw delay adjustment from bAspd bonus
|
||||||
amotion+= sd->aspd_add;
|
amotion+= sd->aspd_add;
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
/**
|
/**
|
||||||
* Bearing a shield decreases your ASPD by a fixed value depending on your class
|
* Bearing a shield decreases your ASPD by a fixed value depending on your class
|
||||||
**/
|
**/
|
||||||
@ -1597,20 +1597,20 @@ static unsigned short status_base_atk(const struct block_list *bl, const struct
|
|||||||
|
|
||||||
static inline unsigned short status_base_matk_max(const struct status_data* status)
|
static inline unsigned short status_base_matk_max(const struct status_data* status)
|
||||||
{
|
{
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
return status->matk_max;//In RE maximum MATK signs weapon matk, which we store in this var
|
return status->matk_max;//In RE maximum MATK signs weapon matk, which we store in this var
|
||||||
#else //Original Max MATK Formula
|
#else //Original Max MATK Formula
|
||||||
return status->int_+(status->int_/5)*(status->int_/5);
|
return status->int_+(status->int_/5)*(status->int_/5);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
static inline unsigned short status_base_matk_min(const struct status_data* status, int lvl)
|
static inline unsigned short status_base_matk_min(const struct status_data* status, int lvl)
|
||||||
#else
|
#else
|
||||||
static inline unsigned short status_base_matk_min(const struct status_data* status)
|
static inline unsigned short status_base_matk_min(const struct status_data* status)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if RRMODE //Renewal MATK Formula
|
#if REMODE //Renewal MATK Formula
|
||||||
return status->int_+(status->int_/2)+(status->dex/5)+(status->luk/3)+(lvl/4);
|
return status->int_+(status->int_/2)+(status->dex/5)+(status->luk/3)+(lvl/4);
|
||||||
#else //Original Min MATK Formula
|
#else //Original Min MATK Formula
|
||||||
return status->int_+(status->int_/7)*(status->int_/7);
|
return status->int_+(status->int_/7)*(status->int_/7);
|
||||||
@ -1627,14 +1627,14 @@ void status_calc_misc(struct block_list *bl, struct status_data *status, int lev
|
|||||||
status->hit = status->flee =
|
status->hit = status->flee =
|
||||||
status->def2 = status->mdef2 =
|
status->def2 = status->mdef2 =
|
||||||
status->cri = status->flee2 = 0;
|
status->cri = status->flee2 = 0;
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
status->matk_min = status_base_matk_min(status, level);
|
status->matk_min = status_base_matk_min(status, level);
|
||||||
#else
|
#else
|
||||||
status->matk_min = status_base_matk_min(status);
|
status->matk_min = status_base_matk_min(status);
|
||||||
#endif
|
#endif
|
||||||
status->matk_max = status_base_matk_max(status);
|
status->matk_max = status_base_matk_max(status);
|
||||||
|
|
||||||
#if RRMODE //Renewal Formulas
|
#if REMODE //Renewal Formulas
|
||||||
status->hit += level + status->dex;//base level + ( every 1 dex = +1 hit )
|
status->hit += level + status->dex;//base level + ( every 1 dex = +1 hit )
|
||||||
status->hit += status->luk / 3;//every 3 luk = +1 hit
|
status->hit += status->luk / 3;//every 3 luk = +1 hit
|
||||||
status->flee += level + status->agi;//base level + ( every 1 agi = +1 flee )
|
status->flee += level + status->agi;//base level + ( every 1 agi = +1 flee )
|
||||||
@ -1668,7 +1668,7 @@ void status_calc_misc(struct block_list *bl, struct status_data *status, int lev
|
|||||||
status->batk = cap_value(temp, 0, USHRT_MAX);
|
status->batk = cap_value(temp, 0, USHRT_MAX);
|
||||||
} else
|
} else
|
||||||
status->batk = status_base_atk(bl, status);
|
status->batk = status_base_atk(bl, status);
|
||||||
#if RRMODE //Renewal ATK Bonus Formula (after atk is calculated)
|
#if REMODE //Renewal ATK Bonus Formula (after atk is calculated)
|
||||||
status->batk += status->luk / 3;//every 3 luk = +1ATK
|
status->batk += status->luk / 3;//every 3 luk = +1ATK
|
||||||
status->batk += level / 4;//every 4 levels = +1 ATK
|
status->batk += level / 4;//every 4 levels = +1 ATK
|
||||||
#endif
|
#endif
|
||||||
@ -1982,7 +1982,7 @@ static unsigned int status_base_pc_maxsp(struct map_session_data* sd, struct sta
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
/**
|
/**
|
||||||
* Renewal Absolute Bonus to be applied after all bonuses were applied (so % bonuses on say, skills, don't affect them)
|
* Renewal Absolute Bonus to be applied after all bonuses were applied (so % bonuses on say, skills, don't affect them)
|
||||||
**/
|
**/
|
||||||
@ -2230,7 +2230,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
|
|||||||
}
|
}
|
||||||
wa->atk += sd->inventory_data[index]->atk;
|
wa->atk += sd->inventory_data[index]->atk;
|
||||||
wa->atk2 = (r=sd->status.inventory[index].refine)*refinebonus[wlv][0];
|
wa->atk2 = (r=sd->status.inventory[index].refine)*refinebonus[wlv][0];
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
/**
|
/**
|
||||||
* in RE matk_max is used as the weapon's matk.
|
* in RE matk_max is used as the weapon's matk.
|
||||||
* += is used so that two-wield weapons (in the case of, say, sinx) bonus stack.
|
* += is used so that two-wield weapons (in the case of, say, sinx) bonus stack.
|
||||||
@ -2608,13 +2608,13 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
|
|||||||
sd->def_rate = 0;
|
sd->def_rate = 0;
|
||||||
if(sd->def_rate != 100) {
|
if(sd->def_rate != 100) {
|
||||||
i = status->def * sd->def_rate/100;
|
i = status->def * sd->def_rate/100;
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
status->def = cap_value(i, SHRT_MIN, SHRT_MAX);
|
status->def = cap_value(i, SHRT_MIN, SHRT_MAX);
|
||||||
#else
|
#else
|
||||||
status->def = cap_value(i, CHAR_MIN, CHAR_MAX);
|
status->def = cap_value(i, CHAR_MIN, CHAR_MAX);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#if RRMODE == 0
|
#if REMODE == 0
|
||||||
/**
|
/**
|
||||||
* The following setting does not affect Renewal Mode
|
* The following setting does not affect Renewal Mode
|
||||||
**/
|
**/
|
||||||
@ -2631,13 +2631,13 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
|
|||||||
sd->mdef_rate = 0;
|
sd->mdef_rate = 0;
|
||||||
if(sd->mdef_rate != 100) {
|
if(sd->mdef_rate != 100) {
|
||||||
i = status->mdef * sd->mdef_rate/100;
|
i = status->mdef * sd->mdef_rate/100;
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
status->mdef = cap_value(i, SHRT_MIN, SHRT_MAX);
|
status->mdef = cap_value(i, SHRT_MIN, SHRT_MAX);
|
||||||
#else
|
#else
|
||||||
status->mdef = cap_value(i, CHAR_MIN, CHAR_MAX);
|
status->mdef = cap_value(i, CHAR_MIN, CHAR_MAX);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#if RRMODE == 0
|
#if REMODE == 0
|
||||||
/**
|
/**
|
||||||
* The following setting does not affect Renewal Mode
|
* The following setting does not affect Renewal Mode
|
||||||
**/
|
**/
|
||||||
@ -2879,7 +2879,7 @@ int status_calc_homunculus_(struct homun_data *hd, bool first)
|
|||||||
status->adelay = status->amotion; //It seems adelay = amotion for Homunculus.
|
status->adelay = status->amotion; //It seems adelay = amotion for Homunculus.
|
||||||
|
|
||||||
status_calc_misc(&hd->bl, status, hom->level);
|
status_calc_misc(&hd->bl, status, hom->level);
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
/**
|
/**
|
||||||
* In RE Mode matk_max is used as source of weaponMATK, but homuns don't have it -- so we swap the values here.
|
* In RE Mode matk_max is used as source of weaponMATK, but homuns don't have it -- so we swap the values here.
|
||||||
**/
|
**/
|
||||||
@ -2902,13 +2902,13 @@ static signed short status_calc_hit(struct block_list *,struct status_change *,i
|
|||||||
static signed short status_calc_critical(struct block_list *,struct status_change *,int);
|
static signed short status_calc_critical(struct block_list *,struct status_change *,int);
|
||||||
static signed short status_calc_flee(struct block_list *,struct status_change *,int);
|
static signed short status_calc_flee(struct block_list *,struct status_change *,int);
|
||||||
static signed short status_calc_flee2(struct block_list *,struct status_change *,int);
|
static signed short status_calc_flee2(struct block_list *,struct status_change *,int);
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
static short status_calc_def(struct block_list *bl, struct status_change *sc, int);
|
static short status_calc_def(struct block_list *bl, struct status_change *sc, int);
|
||||||
#else
|
#else
|
||||||
static signed char status_calc_def(struct block_list *,struct status_change *,int);
|
static signed char status_calc_def(struct block_list *,struct status_change *,int);
|
||||||
#endif
|
#endif
|
||||||
static signed short status_calc_def2(struct block_list *,struct status_change *,int);
|
static signed short status_calc_def2(struct block_list *,struct status_change *,int);
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
static short status_calc_mdef(struct block_list *bl, struct status_change *sc, int);
|
static short status_calc_mdef(struct block_list *bl, struct status_change *sc, int);
|
||||||
#else
|
#else
|
||||||
static signed char status_calc_mdef(struct block_list *,struct status_change *,int);
|
static signed char status_calc_mdef(struct block_list *,struct status_change *,int);
|
||||||
@ -3345,7 +3345,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
|
|||||||
|
|
||||||
if(flag&SCB_MATK) {
|
if(flag&SCB_MATK) {
|
||||||
//New matk
|
//New matk
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
status->matk_min = status_base_matk_min(status,status_get_lv(bl));
|
status->matk_min = status_base_matk_min(status,status_get_lv(bl));
|
||||||
#else
|
#else
|
||||||
status->matk_min = status_base_matk_min(status);
|
status->matk_min = status_base_matk_min(status);
|
||||||
@ -3355,14 +3355,14 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
|
|||||||
if( bl->type&BL_PC && sd->matk_rate != 100 )
|
if( bl->type&BL_PC && sd->matk_rate != 100 )
|
||||||
{
|
{
|
||||||
//Bonuses from previous matk
|
//Bonuses from previous matk
|
||||||
#if RRMODE == 0 //Only changed in non-re [RRInd]
|
#if REMODE == 0 //Only changed in non-re [RRInd]
|
||||||
status->matk_max = status->matk_max * sd->matk_rate/100;
|
status->matk_max = status->matk_max * sd->matk_rate/100;
|
||||||
#endif
|
#endif
|
||||||
status->matk_min = status->matk_min * sd->matk_rate/100;
|
status->matk_min = status->matk_min * sd->matk_rate/100;
|
||||||
}
|
}
|
||||||
|
|
||||||
status->matk_min = status_calc_matk(bl, sc, status->matk_min);
|
status->matk_min = status_calc_matk(bl, sc, status->matk_min);
|
||||||
#if RRMODE == 0 //Only changed in non-re [RRInd]
|
#if REMODE == 0 //Only changed in non-re [RRInd]
|
||||||
status->matk_max = status_calc_matk(bl, sc, status->matk_max);
|
status->matk_max = status_calc_matk(bl, sc, status->matk_max);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3445,7 +3445,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
|
|||||||
status->dmotion = status_calc_dmotion(bl, sc, b_status->dmotion);
|
status->dmotion = status_calc_dmotion(bl, sc, b_status->dmotion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
status_renewal_postcalc(status,flag);
|
status_renewal_postcalc(status,flag);
|
||||||
#endif
|
#endif
|
||||||
if(flag&(SCB_VIT|SCB_MAXHP|SCB_INT|SCB_MAXSP) && bl->type&BL_REGEN)
|
if(flag&(SCB_VIT|SCB_MAXHP|SCB_INT|SCB_MAXSP) && bl->type&BL_REGEN)
|
||||||
@ -4065,14 +4065,14 @@ static signed short status_calc_flee2(struct block_list *bl, struct status_chang
|
|||||||
|
|
||||||
return (short)cap_value(flee2,10,SHRT_MAX);
|
return (short)cap_value(flee2,10,SHRT_MAX);
|
||||||
}
|
}
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
static short status_calc_def(struct block_list *bl, struct status_change *sc, int def)
|
static short status_calc_def(struct block_list *bl, struct status_change *sc, int def)
|
||||||
#else
|
#else
|
||||||
static signed char status_calc_def(struct block_list *bl, struct status_change *sc, int def)
|
static signed char status_calc_def(struct block_list *bl, struct status_change *sc, int def)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if(!sc || !sc->count)
|
if(!sc || !sc->count)
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
return (short)cap_value(def,SHRT_MIN,SHRT_MAX);
|
return (short)cap_value(def,SHRT_MIN,SHRT_MAX);
|
||||||
#else
|
#else
|
||||||
return (signed char)cap_value(def,CHAR_MIN,CHAR_MAX);
|
return (signed char)cap_value(def,CHAR_MIN,CHAR_MAX);
|
||||||
@ -4131,7 +4131,7 @@ static signed short status_calc_flee2(struct block_list *bl, struct status_chang
|
|||||||
def -= def * sc->data[SC_ROCK_CRUSHER]->val2 / 100;
|
def -= def * sc->data[SC_ROCK_CRUSHER]->val2 / 100;
|
||||||
if( sc->data[SC_POWER_OF_GAIA] )
|
if( sc->data[SC_POWER_OF_GAIA] )
|
||||||
def += def * sc->data[SC_POWER_OF_GAIA]->val2 / 100;
|
def += def * sc->data[SC_POWER_OF_GAIA]->val2 / 100;
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
return (short)cap_value(def,SHRT_MIN,SHRT_MAX);
|
return (short)cap_value(def,SHRT_MIN,SHRT_MAX);
|
||||||
#else
|
#else
|
||||||
return (signed char)cap_value(def,CHAR_MIN,CHAR_MAX);
|
return (signed char)cap_value(def,CHAR_MIN,CHAR_MAX);
|
||||||
@ -4184,14 +4184,14 @@ static signed short status_calc_def2(struct block_list *bl, struct status_change
|
|||||||
return (short)cap_value(def2,1,SHRT_MAX);
|
return (short)cap_value(def2,1,SHRT_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
static short status_calc_mdef(struct block_list *bl, struct status_change *sc, int mdef)
|
static short status_calc_mdef(struct block_list *bl, struct status_change *sc, int mdef)
|
||||||
#else
|
#else
|
||||||
static signed char status_calc_mdef(struct block_list *bl, struct status_change *sc, int mdef)
|
static signed char status_calc_mdef(struct block_list *bl, struct status_change *sc, int mdef)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if(!sc || !sc->count)
|
if(!sc || !sc->count)
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
return (short)cap_value(mdef,SHRT_MIN,SHRT_MAX);
|
return (short)cap_value(mdef,SHRT_MIN,SHRT_MAX);
|
||||||
#else
|
#else
|
||||||
return (signed char)cap_value(mdef,CHAR_MIN,CHAR_MAX);
|
return (signed char)cap_value(mdef,CHAR_MIN,CHAR_MAX);
|
||||||
@ -4226,7 +4226,7 @@ static signed short status_calc_def2(struct block_list *bl, struct status_change
|
|||||||
if(sc->data[SC_WATER_BARRIER])
|
if(sc->data[SC_WATER_BARRIER])
|
||||||
mdef += sc->data[SC_WATER_BARRIER]->val2;
|
mdef += sc->data[SC_WATER_BARRIER]->val2;
|
||||||
|
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
return (short)cap_value(mdef,SHRT_MIN,SHRT_MAX);
|
return (short)cap_value(mdef,SHRT_MIN,SHRT_MAX);
|
||||||
#else
|
#else
|
||||||
return (signed char)cap_value(mdef,CHAR_MIN,CHAR_MAX);
|
return (signed char)cap_value(mdef,CHAR_MIN,CHAR_MAX);
|
||||||
@ -4414,7 +4414,7 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
|
|||||||
/// Note that the scale of aspd_rate is 1000 = 100%.
|
/// Note that the scale of aspd_rate is 1000 = 100%.
|
||||||
static short status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int aspd_rate)
|
static short status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int aspd_rate)
|
||||||
{
|
{
|
||||||
#if RRMODE == 0
|
#if REMODE == 0
|
||||||
/**
|
/**
|
||||||
* this variable is not used unless in non-RE
|
* this variable is not used unless in non-RE
|
||||||
**/
|
**/
|
||||||
@ -4488,7 +4488,7 @@ static short status_calc_aspd_rate(struct block_list *bl, struct status_change *
|
|||||||
else if(sc->data[SC_MADNESSCANCEL])
|
else if(sc->data[SC_MADNESSCANCEL])
|
||||||
aspd_rate -= 200;
|
aspd_rate -= 200;
|
||||||
}
|
}
|
||||||
#if RRMODE == 0
|
#if REMODE == 0
|
||||||
/**
|
/**
|
||||||
* in RE they give a fixed boost -- we do so along SERVICE4U in status_base_amotion_pc
|
* in RE they give a fixed boost -- we do so along SERVICE4U in status_base_amotion_pc
|
||||||
**/
|
**/
|
||||||
@ -4786,7 +4786,7 @@ struct status_data *status_get_base_status(struct block_list *bl)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
short status_get_def(struct block_list *bl)
|
short status_get_def(struct block_list *bl)
|
||||||
#else
|
#else
|
||||||
signed char status_get_def(struct block_list *bl)
|
signed char status_get_def(struct block_list *bl)
|
||||||
@ -4798,7 +4798,7 @@ struct status_data *status_get_base_status(struct block_list *bl)
|
|||||||
ud = unit_bl2ud(bl);
|
ud = unit_bl2ud(bl);
|
||||||
if (ud && ud->skilltimer != INVALID_TIMER)
|
if (ud && ud->skilltimer != INVALID_TIMER)
|
||||||
def -= def * skill_get_castdef(ud->skillid)/100;
|
def -= def * skill_get_castdef(ud->skillid)/100;
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
return cap_value(def, SHRT_MIN, SHRT_MAX);
|
return cap_value(def, SHRT_MIN, SHRT_MAX);
|
||||||
#else
|
#else
|
||||||
return cap_value(def, CHAR_MIN, CHAR_MAX);
|
return cap_value(def, CHAR_MIN, CHAR_MAX);
|
||||||
@ -6076,7 +6076,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
|
|||||||
case SC_EXPLOSIONSPIRITS:
|
case SC_EXPLOSIONSPIRITS:
|
||||||
val2 = 75 + 25*val1; //Cri bonus
|
val2 = 75 + 25*val1; //Cri bonus
|
||||||
break;
|
break;
|
||||||
#if RRMODE == 0
|
#if REMODE == 0
|
||||||
/**
|
/**
|
||||||
* Only in non-RE it's var is changed
|
* Only in non-RE it's var is changed
|
||||||
**/
|
**/
|
||||||
@ -9410,7 +9410,7 @@ static int status_natural_heal_timer(int tid, unsigned int tick, int id, intptr_
|
|||||||
* size_fix.txt - size adjustment table for weapons
|
* size_fix.txt - size adjustment table for weapons
|
||||||
* refine_db.txt - refining data table
|
* refine_db.txt - refining data table
|
||||||
*------------------------------------------*/
|
*------------------------------------------*/
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
static bool status_readdb_job_re(char* fields[], int columns, int current) {
|
static bool status_readdb_job_re(char* fields[], int columns, int current) {
|
||||||
int idx, class_;
|
int idx, class_;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
@ -9514,7 +9514,7 @@ int status_readdb(void)
|
|||||||
memset(hp_coefficient2, 0, sizeof(hp_coefficient2));
|
memset(hp_coefficient2, 0, sizeof(hp_coefficient2));
|
||||||
memset(sp_coefficient, 0, sizeof(sp_coefficient));
|
memset(sp_coefficient, 0, sizeof(sp_coefficient));
|
||||||
memset(aspd_base, 0, sizeof(aspd_base));
|
memset(aspd_base, 0, sizeof(aspd_base));
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
memset(re_job_db, 0, sizeof(re_job_db));
|
memset(re_job_db, 0, sizeof(re_job_db));
|
||||||
#endif
|
#endif
|
||||||
// job_db2.txt
|
// job_db2.txt
|
||||||
@ -9543,7 +9543,7 @@ int status_readdb(void)
|
|||||||
sv_readdb(db_path, "size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(atkmods), &status_readdb_sizefix);
|
sv_readdb(db_path, "size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(atkmods), &status_readdb_sizefix);
|
||||||
sv_readdb(db_path, "refine_db.txt", ',', 3+MAX_REFINE+1, 3+MAX_REFINE+1, ARRAYLENGTH(percentrefinery), &status_readdb_refine);
|
sv_readdb(db_path, "refine_db.txt", ',', 3+MAX_REFINE+1, 3+MAX_REFINE+1, ARRAYLENGTH(percentrefinery), &status_readdb_refine);
|
||||||
|
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
sv_readdb(db_path, "re_job_db.txt", ',', 1+RE_JOB_DB_MAX, 1+RE_JOB_DB_MAX, -1, &status_readdb_job_re);
|
sv_readdb(db_path, "re_job_db.txt", ',', 1+RE_JOB_DB_MAX, 1+RE_JOB_DB_MAX, -1, &status_readdb_job_re);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1362,7 +1362,7 @@ struct status_data {
|
|||||||
short
|
short
|
||||||
hit, flee, cri, flee2,
|
hit, flee, cri, flee2,
|
||||||
def2, mdef2,
|
def2, mdef2,
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
/**
|
/**
|
||||||
* In RE def and mdef can go over 127 (signed char) limit, so in RE mode we use short
|
* In RE def and mdef can go over 127 (signed char) limit, so in RE mode we use short
|
||||||
**/
|
**/
|
||||||
@ -1371,14 +1371,14 @@ struct status_data {
|
|||||||
aspd_rate;
|
aspd_rate;
|
||||||
unsigned char
|
unsigned char
|
||||||
def_ele, ele_lv,
|
def_ele, ele_lv,
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
/**
|
/**
|
||||||
* in RE weapon level is used in several areas, keeping it here saves performance
|
* in RE weapon level is used in several areas, keeping it here saves performance
|
||||||
**/
|
**/
|
||||||
wlv,
|
wlv,
|
||||||
#endif
|
#endif
|
||||||
size, race;
|
size, race;
|
||||||
#if RRMODE == 0
|
#if REMODE == 0
|
||||||
/**
|
/**
|
||||||
* In NON-RE def and mdef are not required to be short, so we keep it signed char (ancient-default)
|
* In NON-RE def and mdef are not required to be short, so we keep it signed char (ancient-default)
|
||||||
**/
|
**/
|
||||||
@ -1494,7 +1494,7 @@ int status_get_lv(struct block_list *bl);
|
|||||||
#define status_get_luk(bl) status_get_status_data(bl)->luk
|
#define status_get_luk(bl) status_get_status_data(bl)->luk
|
||||||
#define status_get_hit(bl) status_get_status_data(bl)->hit
|
#define status_get_hit(bl) status_get_status_data(bl)->hit
|
||||||
#define status_get_flee(bl) status_get_status_data(bl)->flee
|
#define status_get_flee(bl) status_get_status_data(bl)->flee
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
short status_get_def(struct block_list *bl);
|
short status_get_def(struct block_list *bl);
|
||||||
#else
|
#else
|
||||||
signed char status_get_def(struct block_list *bl);
|
signed char status_get_def(struct block_list *bl);
|
||||||
@ -1524,7 +1524,7 @@ unsigned char status_calc_attack_element(struct block_list *bl, struct status_ch
|
|||||||
#define status_get_race(bl) status_get_status_data(bl)->race
|
#define status_get_race(bl) status_get_status_data(bl)->race
|
||||||
#define status_get_size(bl) status_get_status_data(bl)->size
|
#define status_get_size(bl) status_get_status_data(bl)->size
|
||||||
#define status_get_mode(bl) status_get_status_data(bl)->mode
|
#define status_get_mode(bl) status_get_status_data(bl)->mode
|
||||||
#if RRMODE
|
#if REMODE
|
||||||
/**
|
/**
|
||||||
* in RE weapon level is used in several areas, keeping it here saves performance
|
* in RE weapon level is used in several areas, keeping it here saves performance
|
||||||
**/
|
**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user