summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-26 18:08:30 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-26 18:08:30 +0000
commit94bad013f7075b5888d3f1f6a148fe6e2d3f5cb1 (patch)
treebee9ac06ae3a8e33823bf38fc84e854b2b409d2b /src
parentccdbfa796421ab45c7eaf6857f9617a4f18a82c5 (diff)
downloadhercules-94bad013f7075b5888d3f1f6a148fe6e2d3f5cb1.tar.gz
hercules-94bad013f7075b5888d3f1f6a148fe6e2d3f5cb1.tar.bz2
hercules-94bad013f7075b5888d3f1f6a148fe6e2d3f5cb1.tar.xz
hercules-94bad013f7075b5888d3f1f6a148fe6e2d3f5cb1.zip
Updated NJ_HUUMA to renewal behavior.(bugreport:6330)
Updated some wizard skills(WZ_METEOR,WZ_HEAVENDRIVE,WZ_VERMILION) to its RE damage ratio.(bugreport:6334,bugreport:6329, bugreport:6333) Fixed bugreport:6321 where skill ratio of RK_HUNDREDSPEAR is adjusted too much. Follow up r16492 where damage dealt to traps should now show/display w/o affecting other skills behavior. Fixed a glitch in UNT_DUMMYSKILL where it triggers multiple time that causes multiple damage something related with bugreport:6201. Added some Kagerou/Oboro skills and more to come :). (KO_YAMIKUMO, KO_RIGHT, KO_LEFT, KO_JYUMONJIKIRI, KO_SETSUDAN, KO_BAKURETSU, KO_HAPPOKUNAI, KO_MUCHANAGE) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16506 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c91
-rw-r--r--src/map/skill.c32
-rw-r--r--src/map/status.c3
-rw-r--r--src/map/status.h13
4 files changed, 116 insertions, 23 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 6cc0ae044..5e051f6bd 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -865,6 +865,7 @@ int battle_calc_bg_damage(struct block_list *src, struct block_list *bl, int dam
case PA_PRESSURE:
case HW_GRAVITATION:
case NJ_ZENYNAGE:
+ case KO_MUCHANAGE:
break;
default:
if( flag&BF_SKILL )
@@ -930,6 +931,7 @@ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int dama
case PA_PRESSURE:
case HW_GRAVITATION:
case NJ_ZENYNAGE:
+ case KO_MUCHANAGE:
break;
default:
/* Uncomment if you want god-mode Emperiums at 100 defense. [Kisuka]
@@ -2098,7 +2100,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
short index = sd->equip_index[EQI_HAND_R];
if( index >= 0 && sd->inventory_data[index]
&& sd->inventory_data[index]->type == IT_WEAPON )
- skillratio += max(10000 - sd->inventory_data[index]->weight, 0);
+ skillratio += max(10000 - sd->inventory_data[index]->weight, 0) / 10;
skillratio += 50 * pc_checkskill(sd,LK_SPIRALPIERCE);
} // (1 + [(Caster’s Base Level - 100) / 200])
skillratio = skillratio * (100 + (status_get_lv(src)-100) / 2) / 100;
@@ -2478,6 +2480,19 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
case EL_ROCK_CRUSHER:
skillratio += 700;
break;
+ case KO_JYUMONJIKIRI:
+ if( tsc && tsc->data[SC_JYUMONJIKIRI] )
+ wd.div_ = wd.div_ * -1;// needs more info
+ skillratio += -100 + 150 * skill_lv;
+ case KO_HUUMARANKA:
+ skillratio += -100 + 150 * skill_lv + sstatus->dex/2 + sstatus->agi/2; // needs more info
+ break;
+ case KO_SETSUDAN:
+ skillratio += 100 * (skill_lv-1);
+ break;
+ case KO_BAKURETSU:
+ skillratio = 50 * skill_lv * (sd?pc_checkskill(sd,NJ_TOBIDOUGU):10);
+ break;
case MH_STAHL_HORN:
skillratio += 500 + 100 * skill_lv;
break;
@@ -2552,6 +2567,12 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
ATK_ADD( status_get_lv(target) * 50 ); //mobs
}
break;
+ case KO_SETSUDAN:
+ if( tsc && tsc->data[SC_SPIRIT] ){
+ ATK_ADDRATE(10*tsc->data[SC_SPIRIT]->val1);// +10% custom value.
+ status_change_end(target,SC_SPIRIT,INVALID_TIMER);
+ }
+ break;
}
}
//Div fix.
@@ -3117,14 +3138,18 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
{ //Dual-wield
if (wd.damage)
{
- skill = pc_checkskill(sd,AS_RIGHT);
- wd.damage = wd.damage * (50 + (skill * 10))/100;
+ if( skill = pc_checkskill(sd,AS_RIGHT) )
+ wd.damage = wd.damage * (50 + (skill * 10))/100;
+ else if( skill = pc_checkskill(sd,KO_RIGHT) )
+ wd.damage = wd.damage * (70 + (skill * 10))/100;
if(wd.damage < 1) wd.damage = 1;
}
if (wd.damage2)
{
- skill = pc_checkskill(sd,AS_LEFT);
- wd.damage2 = wd.damage2 * (30 + (skill * 10))/100;
+ if( skill = pc_checkskill(sd,AS_LEFT) )
+ wd.damage2 = wd.damage2 * (30 + (skill * 10))/100;
+ else if( skill = pc_checkskill(sd,KO_LEFT) )
+ wd.damage2 = wd.damage2 * (50 + (skill * 10))/100;
if(wd.damage2 < 1) wd.damage2 = 1;
}
} else if(sd->status.weapon == W_KATAR && !skill_num)
@@ -3505,9 +3530,6 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
case WZ_SIGHTRASHER:
skillratio += 20*skill_lv;
break;
- case WZ_VERMILION:
- skillratio += 20*skill_lv-20;
- break;
case WZ_WATERBALL:
skillratio += 30*skill_lv;
break;
@@ -3541,11 +3563,6 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
case NJ_RAIGEKISAI:
skillratio += 60 + 40*skill_lv;
break;
- #ifdef RENEWAL
- case NJ_HUUJIN:
- skillratio += 50;
- break;
- #endif
case NJ_KAMAITACHI:
case NPC_ENERGYDRAIN:
skillratio += 100*skill_lv;
@@ -3553,6 +3570,31 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
case NPC_EARTHQUAKE:
skillratio += 100 +100*skill_lv +100*(skill_lv/2);
break;
+ #ifdef RENEWAL
+ case WZ_HEAVENDRIVE:
+ case WZ_METEOR:
+ skillratio += 25;
+ break;
+ case WZ_VERMILION:
+ {
+ int interval = 0, per = interval , ratio = per;
+ while( (per++) < skill_lv ){
+ ratio += interval;
+ if(per%3==0) interval += 20;
+ }
+ if( skill_lv > 9 )
+ ratio -= 10;
+ skillratio += ratio;
+ }
+ break;
+ case NJ_HUUJIN:
+ skillratio += 50;
+ break;
+ #else
+ case WZ_VERMILION:
+ skillratio += 20*skill_lv-20;
+ break;
+ #endif
/**
* Arch Bishop
**/
@@ -4068,13 +4110,14 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
md.damage = INT_MAX>>1;
break;
case NJ_ZENYNAGE:
- md.damage = skill_get_zeny(skill_num ,skill_lv);
- if (!md.damage) md.damage = 2;
- md.damage = md.damage + rnd()%md.damage;
- if (is_boss(target))
- md.damage=md.damage/3;
- else if (tsd)
- md.damage=md.damage/2;
+ case KO_MUCHANAGE:
+ md.damage = skill_get_zeny(skill_num ,skill_lv);
+ if (!md.damage) md.damage = 2;
+ md.damage = rand()%md.damage + md.damage / (skill_num==NJ_ZENYNAGE?1:2) ;
+ if (is_boss(target))
+ md.damage=md.damage / (skill_num==NJ_ZENYNAGE?3:2);
+ else if (tsd) // need confirmation for KO_MUCHANAGE
+ md.damage=md.damage/2;
break;
case GS_FLING:
md.damage = sd?sd->status.job_level:status_get_lv(src);
@@ -4128,6 +4171,14 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
//[{( Hell Plant Skill Level x Caster’s Base Level ) x 10 } + {( Caster’s INT x 7 ) / 2 } x { 18 + ( Caster’s Job Level / 4 )] x ( 5 / ( 10 - Summon Flora Skill Level ))
md.damage = ( skill_lv * status_get_lv(src) * 10 ) + ( sstatus->int_ * 7 / 2 ) * ( 18 + (sd?sd->status.job_level:0) / 4 ) * ( 5 / (10 - (sd?pc_checkskill(sd,AM_CANNIBALIZE):0)) );
break;
+ case KO_HAPPOKUNAI:
+ {
+ struct Damage wd = battle_calc_weapon_attack(src,target,skill_num,skill_lv,mflag);
+ short totaldef = tstatus->def2 + (short)status_get_def(target);
+ md.damage = wd.damage * 60 * (5 + skill_lv) / 100;
+ md.damage -= totaldef;
+ }
+ break;
}
if (nk&NK_SPLASHSPLIT){ // Divide ATK among targets
diff --git a/src/map/skill.c b/src/map/skill.c
index 8eab672c7..5ca31bca0 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1342,6 +1342,9 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
case MH_STAHL_HORN:
sc_start(bl,SC_STUN,(20 + 4 * skilllv),skilllv,skill_get_time2(skillid,skilllv));
break;
+ case KO_JYUMONJIKIRI: // needs more info
+ sc_start(bl,SC_JYUMONJIKIRI,25,skilllv,skill_get_time(skillid,skilllv));
+ break;
}
if (md && battle_config.summons_trigger_autospells && md->master_id && md->special_state.ai)
@@ -2334,6 +2337,8 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
break;
case WL_SOULEXPANSION:
case WL_COMET:
+ case KO_MUCHANAGE:
+ case NJ_HUUMA:
dmg.dmotion = clif_skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,skillid,skilllv,8);
break;
case WL_CHAINLIGHTNING_ATK:
@@ -2365,6 +2370,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
case EL_HURRICANE_ATK:
case EL_TYPOON_MIS:
case EL_TYPOON_MIS_ATK:
+ case KO_BAKURETSU:
dmg.dmotion = clif_skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,skillid,-1,5);
break;
case GN_SLINGITEM_RANGEMELEEATK:
@@ -2399,6 +2405,11 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
default:
if( flag&SD_ANIMATION && dmg.div_ < 2 ) //Disabling skill animation doesn't works on multi-hit.
type = 5;
+ if( bl->type == BL_SKILL ){
+ TBL_SKILL *su = (TBL_SKILL*)bl;
+ if( su->group && skill_get_inf2(su->group->skill_id)&INF2_TRAP )// show damage on trap targets
+ clif_skill_damage(src,bl,tick, dmg.amotion, dmg.dmotion, damage, dmg.div_, skillid, flag&SD_LEVEL?-1:skilllv, 5);
+ }
dmg.dmotion = clif_skill_damage(dsrc,bl,tick, dmg.amotion, dmg.dmotion, damage, dmg.div_, skillid, flag&SD_LEVEL?-1:skilllv, type);
break;
}
@@ -3417,6 +3428,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case WM_GREAT_ECHO:
case GN_SLINGITEM_RANGEMELEEATK:
case MH_STAHL_HORN:
+ case KO_JYUMONJIKIRI:
+ case KO_SETSUDAN:
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
break;
@@ -3648,6 +3661,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case GN_CART_TORNADO:
case GN_CARTCANNON:
case MH_LAVA_SLIDE:
+ case KO_HAPPOKUNAI:
+ case KO_HUUMARANKA:
if( flag&1 ) {//Recursive invocation
// skill_area_temp[0] holds number of targets in area
// skill_area_temp[1] holds the id of the original target
@@ -5457,11 +5472,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case SR_SKYNETBLOW:
case SR_RAMPAGEBLASTER:
case SR_HOWLINGOFLION:
+ case KO_HAPPOKUNAI:
skill_area_temp[1] = 0;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
i = map_foreachinrange(skill_area_sub, bl, skill_get_splash(skillid, skilllv), splash_target(src),
src, skillid, skilllv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill_castend_damage_id);
- if( !i && ( skillid == NC_AXETORNADO || skillid == SR_SKYNETBLOW ) )
+ if( !i && ( skillid == NC_AXETORNADO || skillid == SR_SKYNETBLOW || skillid == KO_HAPPOKUNAI ) )
clif_skill_damage(src,src,tick, status_get_amotion(src), 0, -30000, 1, skillid, skilllv, 6);
break;
@@ -5614,6 +5630,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break;
case TF_HIDING:
case ST_CHASEWALK:
+ case KO_YAMIKUMO:
if (tsce)
{
clif_skill_nodamage(src,bl,skillid,-1,status_change_end(bl, type, INVALID_TIMER)); //Hide skill-scream animation.
@@ -9326,6 +9343,9 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk
case NJ_HYOUSYOURAKU:
case NJ_RAIGEKISAI:
case NJ_KAMAITACHI:
+#ifdef RENEWAL
+ case NJ_HUUMA:
+#endif
case NPC_EVILLAND:
case RA_ELECTRICSHOCKER:
case RA_CLUSTERBOMB:
@@ -9356,6 +9376,9 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk
case SO_WIND_INSIGNIA:
case SO_EARTH_INSIGNIA:
case MH_POISON_MIST:
+ case KO_HUUMARANKA:
+ case KO_MUCHANAGE:
+ case KO_BAKURETSU:
flag|=1;//Set flag to 1 to prevent deleting ammo (it will be deleted on group-delete).
case GS_GROUNDDRIFT: //Ammo should be deleted right away.
skill_unitsetting(src,skillid,skilllv,x,y,0);
@@ -10934,6 +10957,8 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
default:
skill_attack(skill_get_type(sg->skill_id),ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
}
+ if( skill_get_unit_interval(sg->skill_id) >= skill_get_time(sg->skill_id,sg->skill_lv) )
+ sg->unit_id = UNT_USED_TRAPS;
break;
case UNT_FIREPILLAR_WAITING:
@@ -11894,7 +11919,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh
case BS_MAXIMIZE: case NV_TRICKDEAD: case TF_HIDING: case AS_CLOAKING: case CR_AUTOGUARD:
case ML_AUTOGUARD: case CR_DEFENDER: case ML_DEFENDER: case ST_CHASEWALK: case PA_GOSPEL:
case CR_SHRINK: case TK_RUN: case GS_GATLINGFEVER: case TK_READYCOUNTER: case TK_READYDOWN:
- case TK_READYSTORM: case TK_READYTURN: case SG_FUSION: case RA_WUGDASH:
+ case TK_READYSTORM: case TK_READYTURN: case SG_FUSION: case RA_WUGDASH: case KO_YAMIKUMO:
if( sc && sc->data[status_skill2sc(skill)] )
return 1;
}
@@ -12203,6 +12228,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh
break;
case NJ_ZENYNAGE:
+ case KO_MUCHANAGE:
if(sd->status.zeny < require.zeny) {
clif_skill_fail(sd,skill,USESKILL_FAIL_MONEY,0);
return 0;
@@ -12822,7 +12848,7 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, short
case BS_MAXIMIZE: case NV_TRICKDEAD: case TF_HIDING: case AS_CLOAKING: case CR_AUTOGUARD:
case ML_AUTOGUARD: case CR_DEFENDER: case ML_DEFENDER: case ST_CHASEWALK: case PA_GOSPEL:
case CR_SHRINK: case TK_RUN: case GS_GATLINGFEVER: case TK_READYCOUNTER: case TK_READYDOWN:
- case TK_READYSTORM: case TK_READYTURN: case SG_FUSION:
+ case TK_READYSTORM: case TK_READYTURN: case SG_FUSION: case KO_YAMIKUMO:
if( sc && sc->data[status_skill2sc(skill)] )
return req;
}
diff --git a/src/map/status.c b/src/map/status.c
index 1c9a2d830..94ffc403e 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -706,6 +706,8 @@ void initChangeTables(void) {
set_sc( EL_TIDAL_WEAPON , SC_TIDAL_WEAPON_OPTION , SI_TIDAL_WEAPON_OPTION , SCB_ALL );
set_sc( EL_ROCK_CRUSHER , SC_ROCK_CRUSHER , SI_ROCK_CRUSHER , SCB_DEF );
set_sc( EL_ROCK_CRUSHER_ATK, SC_ROCK_CRUSHER_ATK , SI_ROCK_CRUSHER_ATK , SCB_SPEED );
+ add_sc( KO_YAMIKUMO , SC_HIDING );
+ set_sc( KO_JYUMONJIKIRI , SC_JYUMONJIKIRI , SI_KO_JYUMONJIKIRI , SCB_NONE );
add_sc( MH_STAHL_HORN , SC_STUN );
set_sc( MH_ANGRIFFS_MODUS , SC_ANGRIFFS_MODUS , SI_ANGRIFFS_MODUS , SCB_BATK|SCB_WATK|SCB_DEF|SCB_FLEE );
@@ -1637,6 +1639,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
case RG_RAID:
case NJ_SHADOWJUMP:
case NJ_KIRIKAGE:
+ case KO_YAMIKUMO:
break;
default:
//Non players can use all skills while hidden.
diff --git a/src/map/status.h b/src/map/status.h
index 41010a34b..8b27af328 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -621,6 +621,19 @@ typedef enum sc_type {
SC_INCMHP,
SC_INCMSP,
SC_PARTYFLEE, // 531
+ /**
+ * Kagerou & Oboro [malufett]
+ **/
+ SC_MEIKYOUSISUI,
+ SC_JYUMONJIKIRI,
+ SC_KYOUGAKU,
+ SC_IZAYOI,
+ SC_KAGEHUMI,
+ SC_KYOMU,
+ SC_KAGEMUSYA,
+ SC_ZANGETSU,
+ SC_OBOROGENSOU,
+
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;