diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-18 16:43:20 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-18 16:43:20 +0000 |
commit | aff8dade6593463301abee054981a4ea21fff273 (patch) | |
tree | caacd036116e75a315e95302871e2f23718e5c03 /src/map/battle.c | |
parent | 39292f6f6a30287d2a4ffdd035f80616a8e6e8a4 (diff) | |
download | hercules-aff8dade6593463301abee054981a4ea21fff273.tar.gz hercules-aff8dade6593463301abee054981a4ea21fff273.tar.bz2 hercules-aff8dade6593463301abee054981a4ea21fff273.tar.xz hercules-aff8dade6593463301abee054981a4ea21fff273.zip |
- Made HLIF_HEAL a self skill that auto-selects target to caster's master.
- Implemented SC_BLOODLUST and SC_CHANGE, cleaned up HLIF_CHANGE
- Applied a correction to HVAN_EXPLOSION
- Fixed Homun ASPD calculation being able to underflow and give you min speed.
- Added monster_ai&128 to make aggressive mobs ignore that behaviour of always picking Homun targets above player targets regardless of who is closer.
- Fixed homun info packet being unable to display HP/SP correctly once the values are above 32k.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8349 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index f16a58314..fbe9fcfba 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -404,6 +404,13 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i } if (!damage) return 0; + + //Probably not the most correct place, but it'll do here + //(since battle_drain is strictly for players currently) + if (sc->data[SC_BLOODLUST].timer != -1 && flag&BF_WEAPON && damage > 0 && + rand()%100 < sc->data[SC_BLOODLUST].val3) + status_heal(src, damage*sc->data[SC_BLOODLUST].val4/100, 0, 3); + } //SC effects from caster side. Currently none. /* @@ -1030,7 +1037,6 @@ static struct Damage battle_calc_weapon_attack( case GS_GROUNDDRIFT: case NJ_TATAMIGAESHI: case NJ_ISSEN: - case HVAN_EXPLOSION: //[orn] flag.hit = 1; break; case CR_SHIELDBOOMERANG: @@ -1195,6 +1201,7 @@ static struct Damage battle_calc_weapon_attack( i = (flag.cri?1:0)| (flag.arrow?2:0)| (skill_num == HW_MAGICCRASHER?4:0)| + (!skill_num && sc && sc->data[SC_CHANGE].timer!=-1?4:0)| (skill_num == MO_EXTREMITYFIST?8:0)| (sc && sc->data[SC_WEAPONPERFECTION].timer!=-1?8:0); if (flag.arrow && sd) @@ -2504,7 +2511,7 @@ struct Damage battle_calc_misc_attack( case CR_ACIDDEMONSTRATION: md.flag = (md.flag&~BF_RANGEMASK)|BF_LONG; break; - case HVAN_EXPLOSION: //[orn] + case HVAN_EXPLOSION: case NPC_SELFDESTRUCTION: case NPC_SMOKING: flag.elefix = flag.cardfix = 0; @@ -2726,8 +2733,8 @@ int battle_calc_return_damage(struct block_list *bl, int *damage, int flag) { struct map_session_data *sd=NULL; struct status_change *sc; int rdamage = 0; - - if (bl->type == BL_PC) sd = (struct map_session_data*)bl; + + BL_CAST(BL_PC, bl, sd); sc = status_get_sc(bl); if(flag&BF_WEAPON) { |