From 172e5f3cdf18b9da1b73ab64aa79301ba33450f1 Mon Sep 17 00:00:00 2001 From: Vicious Date: Thu, 9 Mar 2006 00:56:11 +0000 Subject: more skill fix. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5524 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 25 ++++++++++++++++++++ src/map/skill.c | 72 +++++++++++++++++++++++++++++++++++++++++++------------- src/map/skill.h | 3 +++ 3 files changed, 84 insertions(+), 16 deletions(-) (limited to 'src/map') diff --git a/src/map/battle.c b/src/map/battle.c index 57eef7d46..fbd3b5f21 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -911,6 +911,16 @@ int battle_addmastery(struct map_session_data *sd,struct block_list *target,int } break; } + case 0x11: // Place holder for guns + break; + case 0x12: // place holder for shrikens + { + if((skill = pc_checkskill(sd,NJ_TOBIDOUGU)) > 0) { + //Advanced Katar Research by zanetheinsane + damage += (skill * 3); + } + break; + } } return (damage); } @@ -2234,12 +2244,21 @@ static struct Damage battle_calc_weapon_attack( { //Check for double attack. if(( (skill_lv = 5*pc_checkskill(sd,TF_DOUBLE)) > 0 && sd->weapontype1 == 0x01) || sd->double_rate > 0) //Success chance is not added, the higher one is used? [Skotlex] + { if (rand()%100 < (skill_lv>sd->double_rate?skill_lv:sd->double_rate)) { wd.damage *=2; wd.div_=skill_get_num(TF_DOUBLE,skill_lv?skill_lv:1); wd.type = 0x08; } + } else if (( (skill_lv = 5*pc_checkskill(sd,GS_CHAINACTION)) > 0 && sd->weapontype1 == 0x01) || + sd->double_rate > 0) // Copied double attack + if (rand()%100 < (skill_lv>sd->double_rate?skill_lv:sd->double_rate)) + { + wd.damage *=2; + wd.div_=skill_get_num(GS_CHAINACTION,skill_lv?skill_lv:1); + wd.type = 0x08; + } } if(!flag.rh || wd.damage<1) @@ -2909,6 +2928,12 @@ struct Damage battle_calc_misc_attack( if (tsd) damage/=2; aflag = (aflag&~BF_RANGEMASK)|BF_LONG; break; + case NJ_ZENYNAGE: + damage=1000*skill_lv; + if(skill_lv == 0) damage -= 1; + if(map_flag_vs(bl->m) || is_boss(bl)) + damage=damage/2; //temp value + break; } if(damagefix){ diff --git a/src/map/skill.c b/src/map/skill.c index 5cb6b56eb..f14251c89 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1246,7 +1246,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int sc_start(bl,SC_COMA,0.1,skilllv,skill_get_time(skillid,skilllv)); break; case GS_CRACKER: - sc_start(bl,SC_STUN,10*skilllv,skilllv,skill_get_time(skillid,skilllv)); //Temp stun rate + sc_start(bl,SC_STUN,(100 - 10*distance_bl(&sd->bl, bl)),skilllv,skill_get_time(skillid,skilllv)); //Temp stun rate break; case GS_PIERCINGSHOT: sc_start(bl,SC_BLEEDING,(skilllv*3),skilllv,skill_get_time(skillid,skilllv)); @@ -1891,6 +1891,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds case KN_AUTOCOUNTER: //Skills that need be passed as a normal attack for the client to display correctly. case SN_SHARPSHOOTING: case TF_DOUBLE: + case GS_CHAINACTION: clif_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,dmg.type,dmg.damage2); break; default: @@ -3093,21 +3094,34 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s break; //Until they're at right position - gs_damage- [Vicious] - case GS_BULLSEYE: + case GS_TRIPLEACTION: case GS_CRACKER: case GS_TRACKING: case GS_PIERCINGSHOT: case GS_RAPIDSHOWER: case GS_DUST: + case GS_FULLBUSTER: case GS_SPREADATTACK: case NJ_SYURIKEN: case NJ_KUNAI: case NJ_HUUMA: skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); break; + case GS_BULLSEYE: + //race check + skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); + break; case NJ_ZENYNAGE: skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag); break; + case NJ_KASUMIKIRI: + skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); + sc_start(bl,SC_HIDING,100,skilllv,skill_get_time(skillid,skilllv)); + break; + case NJ_KIRIKAGE: + status_change_end(src, SC_HIDING, -1); // ƒnƒCƒfƒBƒ“ƒO‰ð?œ + skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); + break; case NJ_KOUENKA: case NJ_BAKUENRYU: case NJ_HYOUSENSOU: @@ -3118,6 +3132,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s break; //Not implemented yet [Vicious] case GS_FLING: + //case GS_TRIPLEACTION: //case GS_BULLSEYE: case GS_MAGICALBULLET: //case GS_CRACKER: @@ -3127,6 +3142,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s //case GS_RAPIDSHOWER: case GS_DESPERADO: //case GS_DUST: + //case GS_FULLBUSTER: //case GS_SPREADATTACK: case GS_GROUNDDRIFT: @@ -3135,9 +3151,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s //case NJ_HUUMA: //case NJ_ZENYNAGE: case NJ_TATAMIGAESHI: - case NJ_KIRIKAGE: - skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); - break; + //case NJ_KASUMIKIRI: + //case NJ_KIRIKAGE: //case NJ_KOUENKA: case NJ_KAENSIN: //case NJ_BAKUENRYU: @@ -3255,6 +3270,11 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case NPC_GRANDDARKNESS: //These two are actually ground placed. return skill_castend_pos2(src,src->x,src->y,skillid,skilllv,tick,0); + //Until they're at right position - gs_ground- [Vicious] + case NJ_KAENSIN: + case NJ_HYOUSYOURAKU: + case NJ_RAIGEKISAI: + return skill_castend_pos2(src,src->x,src->y,skillid,skilllv,tick,0); } tsc = status_get_sc(bl); @@ -5665,7 +5685,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case GS_GLITTERING: if(sd) { clif_skill_nodamage(src,bl,skillid,skilllv,1); - if(rand()%100 < 50+10*skilllv ) + if(rand()%100 < (50+10*skilllv) ) pc_addspiritball(sd,skill_get_time(skillid,skilllv),skilllv); } break; @@ -6227,6 +6247,13 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil } } break; + + //Until they're at right position - gs_unit- [Vicious] + case NJ_KAENSIN: + case NJ_HYOUSYOURAKU: + case NJ_RAIGEKISAI: + skill_unitsetting(src,skillid,skilllv,x,y,0); + break; } if (sc && sc->data[SC_MAGICPOWER].timer != -1) @@ -8135,7 +8162,7 @@ int skill_check_condition(struct map_session_data *sd,int type) return 0; } break; - + //Until they're at right position - gs_skillcheck- [Vicious] case GS_GLITTERING: if(sd->spiritball >= 10) { @@ -8153,12 +8180,20 @@ int skill_check_condition(struct map_session_data *sd,int type) } if (skill != GS_MAGICALBULLET) arrow_flag = 1; + if(sd->equip_index[10] < 0) { + clif_arrow_fail(sd,0); + return 0; + } break; case GS_BULLSEYE: if(sd->spiritball < 5) { clif_skill_fail(sd,skill,0,0); return 0; } + if(sd->equip_index[10] < 0) { + clif_arrow_fail(sd,0); + return 0; + } break; case GS_MADNESSCANCEL: if(sd->spiritball < 4) { @@ -8179,12 +8214,25 @@ int skill_check_condition(struct map_session_data *sd,int type) case GS_RAPIDSHOWER: case GS_DESPERADO: case GS_DUST: + case GS_FULLBUSTER: case GS_SPREADATTACK: case GS_GROUNDDRIFT: case NJ_SYURIKEN: case NJ_KUNAI: case NJ_HUUMA: arrow_flag = 1; + if(sd->equip_index[10] < 0) { + clif_arrow_fail(sd,0); + return 0; + } + break; + case NJ_KAENSIN: + case NJ_BAKUENRYU: + case NJ_SUITON: + case NJ_HYOUSYOURAKU: + case NJ_RAIGEKISAI: + case NJ_KAMAITACHI: + //delitem_flag = 0; <- don't need? break; //Not implemented yet [Vicious] @@ -8193,15 +8241,7 @@ int skill_check_condition(struct map_session_data *sd,int type) case NJ_KIRIKAGE: case NJ_UTSUSEMI: case NJ_BUNSINJYUTSU: - case NJ_KOUENKA: - case NJ_KAENSIN: - case NJ_BAKUENRYU: - case NJ_HYOUSENSOU: - case NJ_SUITON: - case NJ_HYOUSYOURAKU: - case NJ_HUUJIN: - case NJ_RAIGEKISAI: - case NJ_KAMAITACHI: + case NJ_NEN: case NJ_ISSEN: break; diff --git a/src/map/skill.h b/src/map/skill.h index 1613a47c2..bd40a8382 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -926,6 +926,9 @@ enum { UNT_SPIDERWEB, UNT_GRAVITATION, UNT_HERMODE, + + UNT_KAENSIN, + }; #endif -- cgit v1.2.3-70-g09d2