summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-14 19:48:16 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-14 19:48:16 +0000
commit5a6f4e191743aca6fe6f4bbb3e371df4fe9a7100 (patch)
treec12c5c2af8d5344166acfff7b2e7926f0c959362 /src/map/skill.c
parentb1ef0da5a7fdd3d48f758c3e8ec621a2d52650ab (diff)
downloadhercules-5a6f4e191743aca6fe6f4bbb3e371df4fe9a7100.tar.gz
hercules-5a6f4e191743aca6fe6f4bbb3e371df4fe9a7100.tar.bz2
hercules-5a6f4e191743aca6fe6f4bbb3e371df4fe9a7100.tar.xz
hercules-5a6f4e191743aca6fe6f4bbb3e371df4fe9a7100.zip
- Sacrifice no longer shows damage to self.
- When Asura fails, the skill display will still come off. - Cleaned up AM_CALLHOMUN so that the required item is specified on skill_require_db - Cleaned up function merc_call_homun and added function merc_hom_vaporize to handle the respective cases. - Cleaned up a bit unit_remove_map/unit_free on regards to homun. it will display the /sob emotion when the homun dies due to low intimacy. Moved removal of timers and all that to unit_free - Cleaned up function merc_hom_dead - Simplified lots of code around by using the new merc functions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8279 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c42
1 files changed, 15 insertions, 27 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 7b87845bc..cdd6a90ce 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5487,37 +5487,15 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break;
case AM_CALLHOMUN: //[orn]
- if (sd)
- {
- if (sd->status.hom_id == 0 || sd->homunculus.vaporize == 1) {
- if (sd->status.hom_id == 0) {
- i = pc_search_inventory(sd,7142);
- if(i < 0) {
- clif_skill_fail(sd,skillid,0,0);
- break ;
- }
- pc_delitem(sd,i,1,0);
- }
- if (merc_call_homunculus(sd))
- break;
- }
+ if (sd && !merc_call_homunculus(sd))
clif_skill_fail(sd,skillid,0,0);
- }
break;
case AM_REST: //[orn]
- {
- if (sd)
- {
- if (sd->hd && !sd->homunculus.vaporize && ( sd->hd->battle_status.hp >= (sd->hd->battle_status.max_hp * 80 / 100 ) ) ) {
- sd->homunculus.vaporize = 1;
- clif_hominfo(sd, sd->hd, 0);
- merc_hom_delete(sd->hd, 0) ;
- } else
- clif_skill_fail(sd,skillid,0,0);
- }
+ if (sd && !merc_hom_vaporize(sd,1))
+ clif_skill_fail(sd,skillid,0,0);
break;
- }
+
case AM_RESURRECTHOMUN: //[orn]
{
if (sd)
@@ -5821,8 +5799,10 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
else if(dy < 0) dy--;
if (unit_movepos(src, src->x+dx, src->y+dy, 1, 1))
+ { //Display movement + animation.
clif_slide(src,src->x,src->y);
-
+ clif_skill_damage(src,target,tick,sd->battle_status.amotion,0,0,1,ud->skillid, ud->skilllv, 5);
+ }
clif_skill_fail(sd,ud->skillid,0,0);
}
}
@@ -8320,6 +8300,14 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
}
zeny = 0; //Zeny is reduced on skill_attack.
break;
+ case AM_CALLHOMUN: //Can't summon if a hom is already out (vaporized also counts).
+ if (sd->status.hom_id || sd->homunculus.vaporize) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ if (sd->status.hom_id) //Don't delete items when hom is already out.
+ delitem_flag = 0;
+ break;
}
if(!(type&2)){