summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-25 16:41:04 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-25 16:41:04 +0000
commit59b53e53d28961eb88e8f4c8e5764c3465f7ab64 (patch)
tree087ed8720b857f329197638cb34802723954037f
parent685eebb38664db365324b0ab8375b08df4e74c3c (diff)
downloadhercules-59b53e53d28961eb88e8f4c8e5764c3465f7ab64.tar.gz
hercules-59b53e53d28961eb88e8f4c8e5764c3465f7ab64.tar.bz2
hercules-59b53e53d28961eb88e8f4c8e5764c3465f7ab64.tar.xz
hercules-59b53e53d28961eb88e8f4c8e5764c3465f7ab64.zip
Follow up r15269, fixed a few typos and a test entry that wasn't meant to be submitted.
- Added new item bonus 'bonus bMatk,<value>'; git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15270 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--db/const.txt1
-rw-r--r--db/item_db_re.txt2
-rw-r--r--src/map/map.h2
-rw-r--r--src/map/pc.c6
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/status.c8
6 files changed, 17 insertions, 4 deletions
diff --git a/db/const.txt b/db/const.txt
index a2f83be10..50232d074 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -459,6 +459,7 @@ bMagicSPGainValue 2043
bMagicHPGainValue 2044
bAddClassDropItem 2045
bWeaponMatk 2046
+bMatk 2047
EQI_HEAD_TOP 1
EQI_ARMOR 2
diff --git a/db/item_db_re.txt b/db/item_db_re.txt
index c22720c70..86340e2d1 100644
--- a/db/item_db_re.txt
+++ b/db/item_db_re.txt
@@ -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,{ bonus bWeaponMatk,15; },{},{}
+13010,Asura,Asura,4,3000,,600,50:50,,1,2,0x02000000,7,2,2,1,12,1,1,{},{},{}
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; },{},{}
diff --git a/src/map/map.h b/src/map/map.h
index 6e5ed5712..09b47baf1 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -382,7 +382,7 @@ enum _sp {
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_WEAPON_MATK //2046
+ SP_WEAPON_MATK, SP_BASE_MATK //2046-2047
};
enum _look {
diff --git a/src/map/pc.c b/src/map/pc.c
index e6aa488bc..1d215d6af 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -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->sp_weapon_matk += val;
+ sd->add_heal_rate += val;
break;
case SP_ADD_HEAL2_RATE:
if(sd->state.lr_flag != 2)
@@ -2360,6 +2360,10 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
if(sd->state.lr_flag != 2)
sd->sp_weapon_matk += val;
break;
+ case SP_BASE_MATK:
+ if(sd->state.lr_flag != 2)
+ sd->sp_base_matk += val;
+ break;
default:
ShowWarning("pc_bonus: unknown type %d %d !\n",type,val);
break;
diff --git a/src/map/pc.h b/src/map/pc.h
index 9ed195426..06c0f808c 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -307,7 +307,7 @@ struct map_session_data {
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_weapon_matk;
+ short sp_weapon_matk,sp_base_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;
diff --git a/src/map/status.c b/src/map/status.c
index 23ddf4826..54a971dff 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2164,6 +2164,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
+ sizeof(sd->sp_vanish_rate)
+ sizeof(sd->sp_vanish_per)
+ sizeof(sd->sp_weapon_matk)
+ + sizeof(sd->sp_base_matk)
+ sizeof(sd->unbreakable)
+ sizeof(sd->unbreakable_equip)
+ sizeof(sd->unstripable_equip)
@@ -2529,6 +2530,13 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
//Equipment modifiers for misc settings
if(sd->matk_rate < 0)
sd->matk_rate = 0;
+#if REMODE
+ /**
+ * in RE matk_min is used as character's base matk
+ * sp_base_matk is 'bonus bMatk,<boost>'
+ **/
+ status->matk_min += sd->sp_base_matk;
+#endif
if(sd->matk_rate != 100){
status->matk_max = status->matk_max * sd->matk_rate/100;
status->matk_min = status->matk_min * sd->matk_rate/100;