summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-24 17:06:58 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-24 17:06:58 +0000
commit40fc1ff930002e0ca7301e0f2d575a40f784fb10 (patch)
tree4c4eb599f9e55d57548db8d496bf27e5ea538f6b /src/map/skill.c
parenta4b7e6cc4657bb705f187f536d68ef876cc5a441 (diff)
downloadhercules-40fc1ff930002e0ca7301e0f2d575a40f784fb10.tar.gz
hercules-40fc1ff930002e0ca7301e0f2d575a40f784fb10.tar.bz2
hercules-40fc1ff930002e0ca7301e0f2d575a40f784fb10.tar.xz
hercules-40fc1ff930002e0ca7301e0f2d575a40f784fb10.zip
- Changed Greed Scroll's type to 11 (all itemskill items should use this)
- Ignore %MDef bonuses now only reduce target's base MDEF, not MDEF2. - Updated the 'skills that cause no damage are blocked now if the skill element is blocked by the target' to only apply if the skill has a status change associated (fixes Resurrection/Heal being blocked). - Reverted the opt_flag2 change in status_change_start (clif_changeoption2) since it never served its purpose. - Added a warning to prevent loading mobs with IDs that belong to the clone range. - Changed MAX_MOB_DB to 3000, updated the definitions of the clone range defines so they are updated automatically with the change of MAX_MOB_DB. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11287 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 173de5c0b..50df5e138 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3417,7 +3417,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
struct status_change *tsc;
struct mob_data *md = NULL;
struct mob_data *dstmd = NULL;
- int i,type=-1;
+ int i,type;
if(skillid > 0 && skilllv <= 0) return 0; // celest
@@ -3445,16 +3445,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
return 1;
if(status_isdead(src))
return 1;
+
if(src!=bl && status_isdead(bl) && skillid != ALL_RESURRECTION && skillid != PR_REDEMPTIO)
return 1;
tstatus = status_get_status_data(bl);
sstatus = status_get_status_data(src);
- if(src!=bl && (i = skill_get_pl(skillid, skilllv)) > ELE_NEUTRAL &&
- battle_attr_fix(NULL, NULL, 100, i, tstatus->def_ele, tstatus->ele_lv) <= 0)
- return 1; //Skills with an element should be blocked if the target element absorbs it.
-
//Check for undead skills that convert a no-damage skill into a damage one. [Skotlex]
switch (skillid) {
case HLIF_HEAL: //[orn]
@@ -3483,11 +3480,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
return skill_castend_pos2(src,bl->x,bl->y,skillid,skilllv,tick,0);
}
- if (skillid > 0)
- type = SkillStatusChangeTable(skillid);
-
+ type = SkillStatusChangeTable(skillid);
tsc = status_get_sc(bl);
+ if (src!=bl && type > -1 &&
+ (i = skill_get_pl(skillid, skilllv)) > ELE_NEUTRAL &&
+ battle_attr_fix(NULL, NULL, 100, i, tstatus->def_ele, tstatus->ele_lv) <= 0)
+ return 1; //Skills that cause an status should be blocked if the target element blocks its element.
+
map_freeblock_lock();
switch(skillid)
{