diff options
author | xantara <xantara@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-07 05:40:31 +0000 |
---|---|---|
committer | xantara <xantara@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-07 05:40:31 +0000 |
commit | d5fd6f0996dabcb3b064c76081dccbf252aa3fe2 (patch) | |
tree | ad0fdec99b1f791c4d5143b03497de7e523a3572 /src | |
parent | 9774eafce41dab69a7a31335007a90a1765dd4e5 (diff) | |
download | hercules-d5fd6f0996dabcb3b064c76081dccbf252aa3fe2.tar.gz hercules-d5fd6f0996dabcb3b064c76081dccbf252aa3fe2.tar.bz2 hercules-d5fd6f0996dabcb3b064c76081dccbf252aa3fe2.tar.xz hercules-d5fd6f0996dabcb3b064c76081dccbf252aa3fe2.zip |
Fixed a few Ranger-related skills (bugreport:5272)
- Added check to not allow attacks when mounted on a Warg
- Added check to only allow a certain amount of skills when mounted on a Warg
- Updated Warg Bite's chance rate of immobilization and duration
- Updated Arrowstorm and Aimed Bolt's skill ratio damage
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15663 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 6 | ||||
-rw-r--r-- | src/map/skill.c | 24 | ||||
-rw-r--r-- | src/map/unit.c | 4 |
3 files changed, 27 insertions, 7 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index e777b4507..b2ae812a4 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1995,11 +1995,11 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo **/ case RA_ARROWSTORM: skillratio += 100 + 50 * skill_lv; - if( status_get_lv(src) > 100 ) skillratio += skillratio * (status_get_lv(src) - 100) / 200; // Base level bonus. + if( status_get_lv(src) > 100 ) skillratio += skillratio * (status_get_lv(src) / 100); // Base level bonus. break; case RA_AIMEDBOLT: - skillratio += 400 + 50 * skill_lv; - if( status_get_lv(src) > 100 ) skillratio += skillratio * (status_get_lv(src) - 100) / 200; // Base level bonus. + skillratio += 500 + 50 * skill_lv; + if( status_get_lv(src) > 100 ) skillratio += skillratio * (status_get_lv(src) / 100); // Base level bonus. if( tsc && (tsc->data[SC_BITE] || tsc->data[SC_ANKLE] || tsc->data[SC_ELECTRICSHOCKER]) ) wd.div_ = tstatus->size + 2 + rnd()%2; break; diff --git a/src/map/skill.c b/src/map/skill.c index 13413fb0e..b06a6f84c 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1142,8 +1142,12 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int * Ranger **/ case RA_WUGBITE: - sc_start(bl, SC_BITE, 70, skilllv, skill_get_time(skillid, skilllv) + (sd ? pc_checkskill(sd,RA_TOOTHOFWUG) * 1000 : 0)); // Need official chance. - break; + { + int chance = (50+10*skilllv)-(sstatus->agi/4) + (sd ? pc_checkskill(sd,RA_TOOTHOFWUG)*2 : 0); + if(chance < 50) chance = 50; + sc_start(bl, SC_BITE, chance, skilllv, (skilllv + (sd ? pc_checkskill(sd,RA_TOOTHOFWUG)/2 : 0)) * 1000); + break; + } case RA_SENSITIVEKEEN: if( rnd()%100 < 8 * skilllv ) skill_castend_damage_id(src, bl, RA_WUGBITE, sd ? pc_checkskill(sd, RA_WUGBITE):skilllv, tick, SD_ANIMATION); @@ -10984,6 +10988,22 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh //Can only update state when weapon/arrow info is checked. sd->state.arrow_atk = require.ammo?1:0; + // Check the skills that can be used while mounted on a warg + if( pc_isridingwug(sd) ) + { + switch( skill ) + { + case HT_SKIDTRAP: case HT_LANDMINE: case HT_ANKLESNARE: case HT_SHOCKWAVE: + case HT_SANDMAN: case HT_FLASHER: case HT_FREEZINGTRAP: case HT_BLASTMINE: + case HT_CLAYMORETRAP: case HT_SPRINGTRAP: case RA_DETONATOR: case RA_CLUSTERBOMB: + case RA_WUGDASH: case RA_WUGRIDER: + break; + default: + clif_skill_fail(sd,skill,USESKILL_FAIL_LEVEL,0); + return 0; + } + } + // perform skill-specific checks (and actions) switch( skill ) { diff --git a/src/map/unit.c b/src/map/unit.c index 56deae9c7..61046c4e0 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1496,8 +1496,8 @@ int unit_attack(struct block_list *src,int target_id,int continuous) npc_click(sd,(TBL_NPC*)target); // submitted by leinsirk10 [Celest] return 0; } - if( pc_is90overweight(sd) ) - { // overweight - stop attacking + if( pc_is90overweight(sd) || pc_isridingwug(sd) ) + { // overweight or mounted on warg - stop attacking unit_stop_attack(src); return 0; } |