diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-20 20:01:07 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-20 20:01:07 +0000 |
commit | d0f2d77ed059c68c4b6e6ad599c7e6960fdd269e (patch) | |
tree | fa6392e2bede434754e68a5d93295ad4bc7c239a /src/map/status.c | |
parent | 065abbacf70dbc690e76beecc88bdf3faf95d891 (diff) | |
download | hercules-d0f2d77ed059c68c4b6e6ad599c7e6960fdd269e.tar.gz hercules-d0f2d77ed059c68c4b6e6ad599c7e6960fdd269e.tar.bz2 hercules-d0f2d77ed059c68c4b6e6ad599c7e6960fdd269e.tar.xz hercules-d0f2d77ed059c68c4b6e6ad599c7e6960fdd269e.zip |
- @useskill will now cause your homun to use the skill instead of you if the skill is a Homun skill and you have an active homunculus.
- Some cleanups...
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8383 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/map/status.c b/src/map/status.c index 446ed2213..aea2a91dd 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2220,8 +2220,10 @@ int status_calc_homunculus(struct homun_data *hd, int first) status->rhw.range = 1 + status->size; //[orn] status->mode = MD_CANMOVE|MD_CANATTACK|MD_ASSIST|MD_AGGRESSIVE|MD_CASTSENSOR; //[orn] status->speed = DEFAULT_WALK_SPEED; - status->def = cap_value(hom->level/10 + status->vit/5, 0, SCHAR_MAX); - status->mdef = cap_value(hom->level/10 + status->int_/5, 0, SCHAR_MAX); + skill = hom->level/10 + status->vit/5; + status->def = cap_value(skill, 0, 99); + skill = hom->level/10 + status->int_/5; + status->mdef = cap_value(skill, 0, 99); status->hp = 1; status->sp = 1; @@ -2243,10 +2245,7 @@ int status_calc_homunculus(struct homun_data *hd, int first) status->max_hp += skill * 2 * status->max_hp / 100; if((skill = merc_hom_checkskill(hd->master,HLIF_BRAIN)) > 0) - { - int p = 1 +skill/2 -skill/4 +skill/5; - status->max_sp += p * status->max_sp / 100 ; - } + status->max_sp += (1 +skill/2 -skill/4 +skill/5) * status->max_sp / 100 ; if (first) { hd->battle_status.hp = hom->hp ; |