summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-07-05 13:18:51 -0300
committerpanikon <panikon@zoho.com>2014-07-05 13:18:51 -0300
commit3d87a990181fb8e6654ba18c6821106e87c88141 (patch)
tree48303f67cdf05bab6a777e047860901425a8b0b1
parent91057aae931adf43580f4bc19d2f84b3157c819e (diff)
downloadhercules-3d87a990181fb8e6654ba18c6821106e87c88141.tar.gz
hercules-3d87a990181fb8e6654ba18c6821106e87c88141.tar.bz2
hercules-3d87a990181fb8e6654ba18c6821106e87c88141.tar.xz
hercules-3d87a990181fb8e6654ba18c6821106e87c88141.zip
Corrected HT_POWER behaviour, combo and type of skill, and fixed TK-combos walking delay (issue: 8241 http://hercules.ws/board/tracker/issue-8241-cant-move-during-certain-combos/)
-rw-r--r--db/re/skill_db.txt2
-rw-r--r--src/map/skill.c24
-rw-r--r--src/map/status.c13
-rw-r--r--src/map/unit.c10
4 files changed, 32 insertions, 17 deletions
diff --git a/db/re/skill_db.txt b/db/re/skill_db.txt
index 456fa7008..8b5b8a414 100644
--- a/db/re/skill_db.txt
+++ b/db/re/skill_db.txt
@@ -542,7 +542,7 @@
496,0,6,4,0,0x1,0,1,0,no,0,0x8,0,none,0, AM_TWILIGHT1,Twilight Alchemy 1
497,0,6,4,0,0x1,0,1,0,no,0,0x8,0,none,0, AM_TWILIGHT2,Twilight Alchemy 2
498,0,6,4,0,0x1,0,1,0,no,0,0x8,0,none,0, AM_TWILIGHT3,Twilight Alchemy 3
-499,-9,8,4,-1,0,0,1,2,no,0,0x208,0,weapon,0, HT_POWER,Beast Strafing
+499,-9,8,1,-1,0,0,1,2,no,0,0x8,0,weapon,0, HT_POWER,Beast Strafing
500,0,6,4,0,0x40,0,5,1,no,0,0,0,misc,0, GS_GLITTERING,Flip the Coin
501,9,6,1,-1,0x50,0,1,1,no,0,0,0,misc,0, GS_FLING,Fling
502,-9,8,1,-1,0,0,1,3,no,0,0,0,weapon,0, GS_TRIPLEACTION,Triple Action
diff --git a/src/map/skill.c b/src/map/skill.c
index 9676a6d9f..04aee371c 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -762,15 +762,18 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
// Chance to trigger Taekwon kicks [Dralnu]
if(sc && !sc->data[SC_COMBOATTACK]) {
if(sc->data[SC_STORMKICK_READY] &&
- sc_start(src,src,SC_COMBOATTACK, 15, TK_STORMKICK,
+ sc_start4(src,src,SC_COMBOATTACK, 15, TK_STORMKICK,
+ bl->id, 2, 0,
(2000 - 4*sstatus->agi - 2*sstatus->dex)))
; //Stance triggered
else if(sc->data[SC_DOWNKICK_READY] &&
- sc_start(src,src,SC_COMBOATTACK, 15, TK_DOWNKICK,
+ sc_start4(src,src,SC_COMBOATTACK, 15, TK_DOWNKICK,
+ bl->id, 2, 0,
(2000 - 4*sstatus->agi - 2*sstatus->dex)))
; //Stance triggered
else if(sc->data[SC_TURNKICK_READY] &&
- sc_start(src,src,SC_COMBOATTACK, 15, TK_TURNKICK,
+ sc_start4(src,src,SC_COMBOATTACK, 15, TK_TURNKICK,
+ bl->id, 2, 0,
(2000 - 4*sstatus->agi - 2*sstatus->dex)))
; //Stance triggered
else if (sc->data[SC_COUNTERKICK_READY]) { //additional chance from SG_FRIEND [Komurka]
@@ -2339,10 +2342,11 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
combo=1;
break;
case AC_DOUBLE:
- if( (tstatus->race == RC_BRUTE || tstatus->race == RC_INSECT) && pc->checkskill(sd, HT_POWER))
- {
- //TODO: This code was taken from Triple Blows, is this even how it should be? [Skotlex]
- sc_start2(NULL,src,SC_COMBOATTACK,100,HT_POWER,bl->id,2000);
+ // AC_DOUBLE can start the combo with other monster types, but the
+ // monster that's going to be hit by HT_POWER should be RC_BRUTE or RC_INSECT [Panikon]
+ if( pc->checkskill(sd, HT_POWER) )
+ {
+ sc_start4(NULL,src,SC_COMBOATTACK,100,HT_POWER,0,1,0,2000);
clif->combo_delay(src,2000);
}
break;
@@ -3509,7 +3513,6 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
case WS_CARTTERMINATION: // Cart Termination
case AS_VENOMKNIFE:
case HT_PHANTASMIC:
- case HT_POWER:
case TK_DOWNKICK:
case TK_COUNTER:
case GS_CHAINACTION:
@@ -3731,6 +3734,11 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
}
break;
+ case HT_POWER:
+ if( tstatus->race == RC_BRUTE || tstatus->race == RC_INSECT )
+ skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
+ break;
+
//Splash attack skills.
case AS_GRIMTOOTH:
case MC_CARTREVOLUTION:
diff --git a/src/map/status.c b/src/map/status.c
index fb74df36c..54a3208d2 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -8095,22 +8095,25 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
}
break;
- case SC_COMBOATTACK: {
+ case SC_COMBOATTACK:
+ {
//val1: Skill ID
//val2: When given, target (for autotargetting skills)
//val3: When set, this combo time should NOT delay attack/movement
+ //val3: If set to 2 this combo will delay ONLY attack
//val3: TK: Last used kick
//val4: TK: Combo time
struct unit_data *ud = unit->bl2ud(bl);
- if (ud && !val3) {
+ if( ud && (!val3 || val3 == 2) ) {
tick += 300 * battle_config.combo_delay_rate/100;
ud->attackabletime = timer->gettick()+tick;
- unit->set_walkdelay(bl, timer->gettick(), tick, 1);
+ if( !val3 )
+ unit->set_walkdelay(bl, timer->gettick(), tick, 1);
}
val3 = 0;
val4 = tick;
- }
- break;
+ break;
+ }
case SC_EARTHSCROLL:
val2 = 11-val1; //Chance to consume: 11-skill_lv%
break;
diff --git a/src/map/unit.c b/src/map/unit.c
index 95feb2a1d..83a98de8c 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -380,8 +380,12 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag)
unit->set_target(ud, 0);
sc = status->get_sc(bl);
- if (sc && (sc->data[SC_CONFUSION] || sc->data[SC__CHAOS])) //Randomize the target position
- map->random_dir(bl, &ud->to_x, &ud->to_y);
+ if( sc ) {
+ if( sc->data[SC_CONFUSION] || sc->data[SC__CHAOS] ) //Randomize the target position
+ map->random_dir(bl, &ud->to_x, &ud->to_y);
+ if( sc->data[SC_COMBOATTACK] )
+ status_change_end(bl, SC_COMBOATTACK, INVALID_TIMER);
+ }
if(ud->walktimer != INVALID_TIMER) {
// When you come to the center of the grid because the change of destination while you're walking right now
@@ -1103,7 +1107,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
) {
if (sc->data[SC_COMBOATTACK]->val2)
target_id = sc->data[SC_COMBOATTACK]->val2;
- else
+ else if( skill->get_inf(skill_id) != 1 ) // Only non-targetable skills should use auto target
target_id = ud->target;
if( skill->get_inf(skill_id)&INF_SELF_SKILL && skill->get_nk(skill_id)&NK_NO_DAMAGE )// exploit fix