summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authortoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-21 19:33:51 +0000
committertoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-21 19:33:51 +0000
commit42d26584d4b8e0bfb3c50bdd5112a4c29003ea42 (patch)
treefcdfe63b18d82ed32fd5aad45276fe60ddcaf2ab /src/map/skill.c
parent577e58a1ef5dfc658076c0600663c22e9415f892 (diff)
downloadhercules-42d26584d4b8e0bfb3c50bdd5112a4c29003ea42.tar.gz
hercules-42d26584d4b8e0bfb3c50bdd5112a4c29003ea42.tar.bz2
hercules-42d26584d4b8e0bfb3c50bdd5112a4c29003ea42.tar.xz
hercules-42d26584d4b8e0bfb3c50bdd5112a4c29003ea42.zip
Fixed AM_RESURRECTION, thanks to RockmanEXE for %HP values
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8409 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index c00a85a9a..b5853be09 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6287,8 +6287,14 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
case AM_RESURRECTHOMUN: //[orn]
if (sd)
{
+ int p;
+ // If skilllv = 1, range = 1~4%, lv 2 : 5~25%, lv 3 : 25~45%, ...
+ if (skilllv == 1)
+ p = 1 + rand() % 4;
+ else
+ p = 5 + 20 * (skilllv - 2) + rand() % 21;
if (map_flag_gvg(src->m) || //No reviving in WoE grounds!
- !merc_revive_homunculus(sd, 10*skilllv, x, y))
+ !merc_revive_homunculus(sd, p, x, y))
{
clif_skill_fail(sd,skillid,0,0);
break;
@@ -8350,7 +8356,7 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
}
break;
case AM_RESURRECTHOMUN: // Can't resurrect homun if you don't have a dead homun
- if (!sd->status.hom_id || sd->homunculus.vaporize || !sd->hd || sd->hd->battle_status.hp)
+ if (!sd->status.hom_id || sd->homunculus.hp)
{
clif_skill_fail(sd,skill,0,0);
return 0;