diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-03-05 15:39:46 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-03-05 15:39:46 +0000 |
commit | 53c1056d5f11c8ecd8caedae24765e922017fede (patch) | |
tree | e9aadb1420a3f5b3070f5c56e202380075698bd1 /src/map/battle.c | |
parent | 2aa019b4313ff70b17ad7be44867646984728f6e (diff) | |
download | hercules-53c1056d5f11c8ecd8caedae24765e922017fede.tar.gz hercules-53c1056d5f11c8ecd8caedae24765e922017fede.tar.bz2 hercules-53c1056d5f11c8ecd8caedae24765e922017fede.tar.xz hercules-53c1056d5f11c8ecd8caedae24765e922017fede.zip |
- Implemented Firepillar's 'target cannot move for 0.2 sec x hit' property.
- Corrected Earthquake so it behaves as explained in the development topics.
- Corrected a missing opt_flag = 0 when using SC_INCATKRATE on mobs.
- Added a missing line to actually unequip unallowed compounded cards when changing maps.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12299 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index c8e822a63..fc88611dd 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2189,12 +2189,6 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list break; default: { - if (skill_num == NPC_EARTHQUAKE) { - if (sstatus->rhw.atk2 > sstatus->rhw.atk) - MATK_ADD(sstatus->rhw.atk + rand()%(1+sstatus->rhw.atk2-sstatus->rhw.atk)) - else - MATK_ADD(sstatus->rhw.atk); - } else if (sstatus->matk_max > sstatus->matk_min) { MATK_ADD(sstatus->matk_min+rand()%(1+sstatus->matk_max-sstatus->matk_min)); } else { @@ -2287,7 +2281,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list skillratio += 100*skill_lv; break; case NPC_EARTHQUAKE: - skillratio += 400 + 500*skill_lv; + skillratio += 100 +100*skill_lv +100*(skill_lv/2); break; } @@ -2326,8 +2320,6 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list //mdef2-= mdef2* i/100; } } - if (skill_num == NPC_EARTHQUAKE) - mdef>>=1; //Halves MDEF (stupid overpowered skill) if(battle_config.magic_defense_type) ad.damage = ad.damage - mdef*battle_config.magic_defense_type - mdef2; else @@ -2346,6 +2338,11 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list ad.damage = 0; } } + + if (skill_num == NPC_EARTHQUAKE) + { //Adds atk2 to the damage, should be influenced by number of hits and skill-ratio, but not mdef reductions. [Skotlex] + ad.damage+= sstatus->rhw.atk2*skillratio/100; + } if(ad.damage<1) ad.damage=1; |