summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-13 17:07:31 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-13 17:07:31 +0000
commitf2a6b8d9161fa8da800a60b4917d54ff95eb9bc0 (patch)
tree17ba1be447010679d3ba1247960a006f187aebdd /src
parent09d7d16f522b2a4aa7020698544e2153094005a2 (diff)
downloadhercules-f2a6b8d9161fa8da800a60b4917d54ff95eb9bc0.tar.gz
hercules-f2a6b8d9161fa8da800a60b4917d54ff95eb9bc0.tar.bz2
hercules-f2a6b8d9161fa8da800a60b4917d54ff95eb9bc0.tar.xz
hercules-f2a6b8d9161fa8da800a60b4917d54ff95eb9bc0.zip
Fixed bugreport:6220 updated SR_SKYNETBLOW behavior to official and damage formula and other Sura skills(SR_TIGERCANNON,SR_FALLENEMPIRE,SR_GATEOFHELL,SR_WINDMILL,SR_RIDEINLIGHTING,SR_LIGHTNINGWALK) and more to come...:D
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16424 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c62
-rw-r--r--src/map/skill.c15
-rw-r--r--src/map/status.c6
-rw-r--r--src/map/unit.c14
4 files changed, 57 insertions, 40 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index f65be5e55..eab699c94 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2296,23 +2296,32 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
break;
case SR_DRAGONCOMBO:
skillratio += 40 * skill_lv;
+ RE_LVL_DMOD(100);
break;
case SR_SKYNETBLOW:
- skillratio += 80 * skill_lv - 100 + ( sstatus->agi * 4 );
+ //ATK [{(Skill Level x 80) + (Caster’s AGI)} x Caster’s Base Level / 100] %
+ skillratio = 80 * skill_lv + sstatus->agi;
+ if( sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == SR_DRAGONCOMBO )//ATK [{(Skill Level x 100) + (Caster’s AGI) + 150} x Caster’s Base Level / 100] %
+ skillratio = 100 * skill_lv + sstatus->agi + 150;
+ RE_LVL_DMOD(100);
break;
case SR_EARTHSHAKER:
skillratio += 50 * skill_lv - 50;// Need to code a check to make the ratio 3x when hitting a hidden player. [Rytech]
break;
- case SR_FALLENEMPIRE:
- skillratio += 150 * skill_lv; // Need official on how much enemy players weight affects damage. [Rytech]
- //if( tsd && tsd->weight )
- // skillratio = (100 + 150 * skill_lv) * tsd->weight / 10000;
- //else
- // skillratio = (100 + 150 * skill_lv) * 600 / 100;
- break;
- case SR_TIGERCANNON:
- skillratio = 2000 + ( sstatus->hp * ( 10 + 2 * skill_lv ) / 100 );
- break;
+ case SR_FALLENEMPIRE:// ATK [(Skill Level x 150 + 100) x Caster’s Base Level / 150] %
+ skillratio += 150 *skill_lv;
+ RE_LVL_DMOD(100);
+ break;
+ case SR_TIGERCANNON:// ATK [((Caster’s consumed HP + SP) / 4) x Caster’s Base Level / 100] %
+ {
+ int hp = sstatus->max_hp * (10 + 2 * skill_lv) / 100,
+ sp = sstatus->max_sp * (6 + skill_lv) / 100;
+ skillratio = (hp+sp) / 4;
+ if( sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE ) // ATK [((Caster’s consumed HP + SP) / 2) x Caster’s Base Level / 100] %
+ skillratio = (hp+sp) / 2;
+ RE_LVL_DMOD(100);
+ }
+ break;
case SR_RAMPAGEBLASTER:
if( sc && sc->data[SC_EXPLOSIONSPIRITS] )
skillratio += 40 * skill_lv * (sd?sd->spiritball_old:5) - 100;
@@ -2325,8 +2334,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
else
skillratio += 400 + (100 * skill_lv);
break;
- case SR_WINDMILL:
- skillratio += 150;
+ case SR_WINDMILL: // ATK [(Caster’s Base Level + Caster’s DEX) x Caster’s Base Level / 100] %
+ skillratio = status_get_lv(src) + sstatus->dex;
+ RE_LVL_DMOD(100);
break;
case SR_GATEOFHELL:
if( sc && sc->data[SC_COMBO]
@@ -2342,8 +2352,11 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
case SR_HOWLINGOFLION:
skillratio += 300 * skill_lv - 100;
break;
- case SR_RIDEINLIGHTNING:
- skillratio += 200 * skill_lv -100;
+ case SR_RIDEINLIGHTNING: // ATK [{(Skill Level x 200) + Additional Damage} x Caster’s Base Level / 100] %
+ if( (sstatus->rhw.ele) == ELE_WIND || (sstatus->lhw.ele) == ELE_WIND )
+ skillratio += skill_lv * 50;
+ skillratio += -100 + 200 * skill_lv;
+ RE_LVL_DMOD(100);
break;
case WM_REVERBERATION_MELEE:
// ATK [{(Skill Level x 100) + 300} x Caster’s Base Level / 100]
@@ -2486,10 +2499,19 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
ATK_ADD ( (sstatus->max_sp * (1 + skill_lv * 2 / 10)) + 40 * status_get_lv(src) );
}
break;
- case SR_TIGERCANNON:
+ case SR_TIGERCANNON: // (Tiger Cannon skill level x 240) + (Target’s Base Level x 40)
+ ATK_ADD( skill_lv * 240 + status_get_lv(target) * 40 );
if( sc && sc->data[SC_COMBO]
- && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE )
- ATK_ADDRATE(10);// +10% custom value.
+ && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE ) // (Tiger Cannon skill level x 500) + (Target’s Base Level x 40)
+ ATK_ADD( skill_lv * 500 + status_get_lv(target) * 40 );
+ break;
+ case SR_FALLENEMPIRE:// [(Target’s Size value + Skill Level - 1) x Caster’s STR] + [(Target’s current weight x Caster’s DEX / 120)]
+ ATK_ADD( ((tstatus->size+1)*2 + skill_lv - 1) * sstatus->str);
+ if( tsd && tsd->weight ){
+ ATK_ADD( (tsd->weight/10) * sstatus->dex / 120 );
+ }else{
+ ATK_ADD( status_get_lv(target) * 50 ); //mobs
+ }
break;
}
}
@@ -2549,10 +2571,6 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if( tsc && (tsc->data[SC_HIDING] || tsc->data[SC_CLOAKING] || tsc->data[SC_CHASEWALK] || tsc->data[SC_CLOAKINGEXCEED]) )
ATK_ADDRATE(150+150*skill_lv);
break;
- case SR_RIDEINLIGHTNING:
- if( (sstatus->rhw.ele) == ELE_WIND || (sstatus->lhw.ele) == ELE_WIND )
- ATK_ADDRATE(skill_lv*5);
- break;
}
if( sd )
diff --git a/src/map/skill.c b/src/map/skill.c
index fd58618ec..db7871ae9 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1243,14 +1243,11 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
sc_start(bl, SC_EARTHDRIVE, 100, skilllv, skill_get_time(skillid, skilllv));
break;
case SR_DRAGONCOMBO:
- sc_start(bl, SC_STUN, 1 + 1 * skilllv, skilllv, skill_get_time(skillid, skilllv));
+ sc_start(bl, SC_STUN, 1 + skilllv, skilllv, skill_get_time(skillid, skilllv));
break;
case SR_FALLENEMPIRE:
sc_start(bl, SC_STOP, 100, skilllv, skill_get_time(skillid, skilllv));
break;
- case SR_TIGERCANNON:
- status_percent_damage(src, bl, 0, 5+1*skilllv, false); // The hell is this? [Rytech]
- break;
case SR_WINDMILL:
if( dstsd )
skill_addtimerskill(src,tick+status_get_amotion(src),bl->id,0,0,skillid,skilllv,BF_WEAPON,0);
@@ -2649,6 +2646,9 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
case WM_METALICSOUND:
status_zap(bl, 0, damage*100/(100*(110-pc_checkskill(sd,WM_LESSON)*10)));
break;
+ case SR_TIGERCANNON:
+ status_zap(bl, 0, damage/10); // 10% of damage dealt
+ break;
}
if( sd )
skill_onskillusage(sd, bl, skillid, tick);
@@ -5445,7 +5445,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
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 )
+ if( !i && skillid == NC_AXETORNADO || skillid == SR_SKYNETBLOW )
clif_skill_damage(src,src,tick, status_get_amotion(src), 0, -30000, 1, skillid, skilllv, 6);
break;
@@ -12519,7 +12519,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh
}
if( require.spiritball > 0 && sd->spiritball < require.spiritball) {
- clif_skill_fail(sd,skill,USESKILL_FAIL_LEVEL,0);
+ clif_skill_fail(sd,skill,USESKILL_FAIL_SPIRITS,require.spiritball);
return 0;
}
@@ -13039,6 +13039,7 @@ int skill_castfix_sc (struct block_list *bl, int time, int skill_id, int skill_l
}
}
#endif
+ if( time < 0 ) return 0; // due to fixed castime so use -1 to nullify the casting. [malufett]
if (sc && sc->count) {
if (sc->data[SC_SLOWCAST])
time += time * sc->data[SC_SLOWCAST]->val2 / 100;
@@ -15874,7 +15875,7 @@ int skill_elementalanalysis(struct map_session_data* sd, int n, int skill_lv, un
tmp_item.nameid = product;
tmp_item.amount = add_amount;
tmp_item.identify = 1;
-
+
if( tmp_item.amount ) {
if( (flag = pc_additem(sd,&tmp_item,tmp_item.amount,LOG_TYPE_CONSUME)) ) {
clif_additem(sd,0,0,flag);
diff --git a/src/map/status.c b/src/map/status.c
index cb8acd3e1..0ce76f844 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -7441,8 +7441,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
struct unit_data *ud = unit_bl2ud(bl);
if (ud && !val3) {
tick += 300 * battle_config.combo_delay_rate/100;
- if(val1 == SR_FALLENEMPIRE)//TODO: better option for this bonus. [malufett]
- tick += 1000;
ud->attackabletime = gettick()+tick;
unit_set_walkdelay(bl, gettick(), tick, 1);
}
@@ -8083,8 +8081,8 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val2 = 94 + val1;
val_flag |= 1|2;
break;
- case SC_LIGHTNINGWALK:
- val1 = 88 + 2 * val1;
+ case SC_LIGHTNINGWALK: // [(Job Level / 2) + (40 + 5 * Skill Level)] %
+ val1 = (sd?sd->status.job_level:2)/2 + 40 + 5 * val1;
val_flag |= 1;
break;
case SC_RAISINGDRAGON:
diff --git a/src/map/unit.c b/src/map/unit.c
index 2d99940f0..d51c41638 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1201,14 +1201,14 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
(sc->data[SC_COMBO]->val1 == MO_COMBOFINISH ||
sc->data[SC_COMBO]->val1 == CH_TIGERFIST ||
sc->data[SC_COMBO]->val1 == CH_CHAINCRUSH))
- casttime = 0;
+ casttime = -1;
temp = 1;
break;
case SR_GATEOFHELL:
case SR_TIGERCANNON:
if (sc && sc->data[SC_COMBO] &&
sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE)
- casttime = 0;
+ casttime = -1;
temp = 1;
break;
case SA_SPELLBREAKER:
@@ -1216,15 +1216,15 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
break;
case ST_CHASEWALK:
if (sc && sc->data[SC_CHASEWALK])
- casttime = 0;
+ casttime = -1;
break;
case TK_RUN:
if (sc && sc->data[SC_RUN])
- casttime = 0;
+ casttime = -1;
break;
case HP_BASILICA:
if( sc && sc->data[SC_BASILICA] )
- casttime = 0; // No Casting time on basilica cancel
+ casttime = -1; // No Casting time on basilica cancel
break;
case KN_CHARGEATK:
{
@@ -1239,11 +1239,11 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
break;
case RA_WUGDASH:
if (sc && sc->data[SC_WUGDASH])
- casttime = 0;
+ casttime = -1;
}
// moved here to prevent Suffragium from ending if skill fails
- if (!(skill_get_castnodex(skill_num, skill_lv)&2))
+ if (!(skill_get_castnodex(skill_num, skill_lv)&2))
casttime = skill_castfix_sc(src, casttime, skill_num, skill_lv);
if( casttime > 0 || temp )