diff options
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index e9e17708c..40f3d2482 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3220,6 +3220,14 @@ int battle_range_type(struct block_list *src, struct block_list *target, uint16 return BF_SHORT; return BF_LONG; } + + if (skill_id == SR_GATEOFHELL) { + if (skill_lv < 5) + return BF_SHORT; + else + return BF_LONG; + } + //based on used skill's range if (skill->get_range2(src, skill_id, skill_lv) < 5) return BF_SHORT; @@ -4441,8 +4449,11 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list if( !sd ) hitrate = cap_value(hitrate, 5, 95); #endif - if(rnd()%100 >= hitrate) + if(rnd()%100 >= hitrate){ wd.dmg_lv = ATK_FLEE; + if (skill_id == SR_GATEOFHELL) + flag.hit = 1;/* will hit with the special */ + } else flag.hit = 1; } //End hit/miss calculation @@ -4645,6 +4656,12 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list } #endif switch(skill_id){ + case SR_GATEOFHELL: + if (wd.dmg_lv != ATK_FLEE) + ATK_RATE(battle->calc_skillratio(BF_WEAPON, src, target, skill_id, skill_lv, skillratio, wflag)); + else + wd.dmg_lv = ATK_DEF; + break; #ifdef RENEWAL case NJ_TATAMIGAESHI: ATK_RATE(200); |