diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-29 12:20:43 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-29 12:20:43 +0000 |
commit | 963beba0da94d8b4e3d4175599c570a0b1d77ad2 (patch) | |
tree | 0cd50931653f23d097fb3eef69151948bfcade07 /src/map/battle.c | |
parent | d4f105021aa5678c771b2a6b72ab50baa61799ce (diff) | |
download | hercules-963beba0da94d8b4e3d4175599c570a0b1d77ad2.tar.gz hercules-963beba0da94d8b4e3d4175599c570a0b1d77ad2.tar.bz2 hercules-963beba0da94d8b4e3d4175599c570a0b1d77ad2.tar.xz hercules-963beba0da94d8b4e3d4175599c570a0b1d77ad2.zip |
- Integrated the SG related info of hate_mob and feel_map into a single structure (sg_info).
- Modified skill_blown and skill_attack so that reflected spells do not cause knockback.
- SG Blessing skills now grant the extra experience to everyone when the SG killed the mob.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11840 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 266207358..13a5dfd0b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1760,19 +1760,13 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo if (flag.lh) wd.damage2 = battle_addmastery(sd,target,wd.damage2,1); - if((skill=pc_checkskill(sd,SG_STAR_ANGER)) >0 && (t_class == sd->hate_mob[2] || - (sc && sc->data[SC_MIRACLE]))) + if (sc && sc->data[SC_MIRACLE]) i = 2; //Star anger + else + ARR_FIND(0, 3, i, t_class == sd->hate_mob[i] && (skill=pc_checkskill(sd,sg_info[i].anger_id))); + if (i < 3) { - skillratio = sd->status.base_level + sstatus->str + sstatus->dex + sstatus->luk; - if (skill<4) - skillratio /= 12-3*skill; - ATK_ADDRATE(skillratio); - } else - if( - ((skill=pc_checkskill(sd,SG_SUN_ANGER)) >0 && t_class == sd->hate_mob[0]) || - ((skill=pc_checkskill(sd,SG_MOON_ANGER)) >0 && t_class == sd->hate_mob[1]) - ) { - skillratio = sd->status.base_level + sstatus->dex+ sstatus->luk; + skillratio = sd->status.base_level + sstatus->dex + sstatus->luk; + if (i == 2) skillratio += sstatus->str; //Star Anger if (skill<4) skillratio /= 12-3*skill; ATK_ADDRATE(skillratio); |