summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-05-07 18:46:21 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-05-07 18:46:21 +0000
commit392e49a6097460851f10501cfe34a9ee86010468 (patch)
tree3d649616dfe3cb1066f0d4b269536c75716f6178 /src/map/battle.c
parent7e744fbd4fbf444adc163a52696fe3e67f4b699c (diff)
downloadhercules-392e49a6097460851f10501cfe34a9ee86010468.tar.gz
hercules-392e49a6097460851f10501cfe34a9ee86010468.tar.bz2
hercules-392e49a6097460851f10501cfe34a9ee86010468.tar.xz
hercules-392e49a6097460851f10501cfe34a9ee86010468.zip
- Added function battle_attr_ratio to handle just getting the attribute table data. Fixes Sense messing up with elemental based statuses.
- Added Throw tomahawk to the list of items that do not trigger the equipment breaking code. - Moved a bit around the SC_ start of dancing skills to fix Moonlight petals pushing back the casters. - Modified status_damage to handle SC_KAZIEL. The return value of *_dead functions can pass 8 to specify that kaziel should not be triggered (ie: pvp/gvg) - Infinite Endure won't be passed on to devoted characters. - Infinite Endure is no longer saved on logout. - Added check to avoid gms opening vending shops if they don't have the required level. - Moved around the Steel Body S. Novice code, simplified it so it triggers before most of the penalties (death is cancelled). - Fixed the flee penalty not applying when you walk into a gvg map. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12688 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index d0d955719..cdf7cca46 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -207,6 +207,19 @@ int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src,
return 0;
}
+
+int battle_attr_ratio(int atk_elem,int def_type, int def_lv)
+{
+
+ if (atk_elem < 0 || atk_elem >= ELE_MAX)
+ return 100;
+
+ if (def_type < 0 || def_type > ELE_MAX || def_lv < 1 || def_lv > 4)
+ return 100;
+
+ return attr_fix_table[def_lv-1][atk_elem][def_type];
+}
+
/*==========================================
* Does attribute fix modifiers.
* Added passing of the chars so that the status changes can affect it. [Skotlex]
@@ -2047,8 +2060,8 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if (breakrate)
skill_break_equip(src, EQP_WEAPON, breakrate, BCT_SELF);
}
- //Cart Termination won't trigger breaking data. Why? No idea, go ask Gravity.
- if (battle_config.equip_skill_break_rate && skill_num != WS_CARTTERMINATION)
+ //Cart Termination/Tomahawk won't trigger breaking data. Why? No idea, go ask Gravity.
+ if (battle_config.equip_skill_break_rate && skill_num != WS_CARTTERMINATION && skill_num != ITM_TOMAHAWK)
{ // Target equipment breaking
int breakrate[2] = {0,0}; // weapon = 0, armor = 1
if (sd) { // Break rate from equipment