summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--db/skill_db.txt2
-rw-r--r--src/map/mercenary.c4
-rw-r--r--src/map/skill.c10
4 files changed, 13 insertions, 4 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index ef627586a..c3fd8ebf3 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/21
+ * Fixed AM_RESURRECTION, thanks to RockmanEXE for %HP values [Toms]
* Fixed HAMI_CASTLE, HAMI_DEFENCE & HLIF_AVOID [Toms]
* Adjusted Glittering's success rate to 20+10*lv% [Skotlex]
* Corrected isequipped() so that cards will not be tagged as "used up"
diff --git a/db/skill_db.txt b/db/skill_db.txt
index 306d28d43..0580e1b8c 100644
--- a/db/skill_db.txt
+++ b/db/skill_db.txt
@@ -270,7 +270,7 @@
244,0,0,4,0,1,0,1,0,no,0,0,0,none,0 //AM_REST#Peaceful Rest#
//245,0,0,0,0,0,0,10,0,no,0,0,0,none,0 //AM_DRILLMASTER#Drillmaster#
//246,9,0,0,0,0,0,10,0,no,0,0,0,none,0 //AM_HEALHOMUN#Heal Homunculus#
-247,9,6,4,0,1,0,5,0,no,0,0,0,none,0 //AM_RESURRECTHOMUN#Ressurect Homunculus#
+247,9,6,4,0,1,1,5,0,no,0,0,0,none,0 //AM_RESURRECTHOMUN#Ressurect Homunculus#
248,0,0,0,0,0,0,10,0,no,0,0,0,none,0 //CR_TRUST#Faith#
249,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0 //CR_AUTOGUARD#Guard#
250,3,6,1,0,0,0,5,1,no,0,0,0,weapon,5:6:7:8:9 //CR_SHIELDCHARGE#Smite#
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 6b508429f..53bc562b7 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -820,7 +820,9 @@ int merc_revive_homunculus(struct map_session_data *sd, unsigned char per, short
map_addblock(&sd->hd->bl);
clif_spawn(&sd->hd->bl);
}
- return status_revive(&hd->bl, per, 0);
+ status_revive(&hd->bl, per, 0);
+ sd->homunculus.hp = hd->battle_status.hp;
+ return 1;
}
void merc_homun_revive(struct homun_data *hd, unsigned int hp, unsigned int sp)
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;