Added new bonus for RE cards 'bonus bWeaponMatk,<value>;'

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15269 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
shennetsind 2011-12-25 16:24:25 +00:00
parent a4ce4c598d
commit 9c516793ff
6 changed files with 20 additions and 4 deletions

View File

@ -458,6 +458,7 @@ bSPVanishRate 2042
bMagicSPGainValue 2043
bMagicHPGainValue 2044
bAddClassDropItem 2045
bWeaponMatk 2046
EQI_HEAD_TOP 1
EQI_ARMOR 2

View File

@ -15,7 +15,7 @@
// Matk updates. Work in progress.
// Daggers
13010,Asura,Asura,4,3000,,600,50:50,,1,2,0x02000000,7,2,2,1,12,1,1,{},{},{}
13010,Asura,Asura,4,3000,,600,50:50,,1,2,0x02000000,7,2,2,1,12,1,1,{ bonus bWeaponMatk,15; },{},{}
13011,Asura_,Asura,4,3000,,600,50:50,,1,3,0x02000000,7,2,2,1,12,1,1,{},{},{}
1231,Bazerald,Bazerald,4,20,,500,70:105,,1,0,0x028F5EEE,7,2,2,4,36,1,1,{ bonus bAtkEle,Ele_Fire; bonus bInt,5; },{},{}

View File

@ -381,7 +381,8 @@ enum _sp {
SP_SP_GAIN_RACE, SP_SUBRACE2, SP_UNBREAKABLE_SHOES, // 2031-2033
SP_UNSTRIPABLE_WEAPON,SP_UNSTRIPABLE_ARMOR,SP_UNSTRIPABLE_HELM,SP_UNSTRIPABLE_SHIELD, // 2034-2037
SP_INTRAVISION, SP_ADD_MONSTER_DROP_ITEMGROUP, SP_SP_LOSS_RATE, // 2038-2040
SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE, SP_ADD_CLASS_DROP_ITEM //2041-2045
SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE, SP_ADD_CLASS_DROP_ITEM, //2041-2045
SP_WEAPON_MATK //2046
};
enum _look {

View File

@ -2346,7 +2346,7 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
break;
case SP_ADD_HEAL_RATE:
if(sd->state.lr_flag != 2)
sd->add_heal_rate += val;
sd->sp_weapon_matk += val;
break;
case SP_ADD_HEAL2_RATE:
if(sd->state.lr_flag != 2)
@ -2356,6 +2356,10 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
if(sd->state.lr_flag != 2)
sd->itemhealrate2 += val;
break;
case SP_WEAPON_MATK:
if(sd->state.lr_flag != 2)
sd->sp_weapon_matk += val;
break;
default:
ShowWarning("pc_bonus: unknown type %d %d !\n",type,val);
break;

View File

@ -306,7 +306,8 @@ struct map_session_data {
short add_heal_rate, add_heal2_rate;
short sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value;
short sp_vanish_rate;
short sp_vanish_per;
short sp_vanish_per;
short sp_weapon_matk;
unsigned short unbreakable; // chance to prevent ANY equipment breaking [celest]
unsigned short unbreakable_equip; //100% break resistance on certain equipment
unsigned short unstripable_equip;

View File

@ -2163,6 +2163,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
+ sizeof(sd->magic_sp_gain_value)
+ sizeof(sd->sp_vanish_rate)
+ sizeof(sd->sp_vanish_per)
+ sizeof(sd->sp_weapon_matk)
+ sizeof(sd->unbreakable)
+ sizeof(sd->unbreakable_equip)
+ sizeof(sd->unstripable_equip)
@ -2279,6 +2280,14 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
memset(sd->param_bonus, 0, sizeof(sd->param_bonus));
status->def += (refinedef+50)/100;
#if REMODE
/**
* in RE matk_max is used as the weapon's matk.
* sp_weapon_matk is 'bonus bWeaponMatk,<boost>'
**/
status->matk_max += sd->sp_weapon_matk;
#endif
//Parse Cards
for(i=0;i<EQI_MAX-1;i++) {