...
 
Commits (5)
......@@ -16,6 +16,7 @@
// 0x20 - Skill ignores target's defense (misc type always ignores)
// 0x40 - Skill ignores target's flee (magic type always ignores)
// 0x80 - Skill ignores target's def cards
// 0x100 - Skill can critical
// 07 splash/effect range
// -1 - for screen-wide
// 0 - no splash
......@@ -158,7 +159,7 @@
58,-4,6,1,-1,0x2,0,10,1,no,0,0x40000,0,weapon,6,0x0, KN_SPEARSTAB,Spear Stab
59,3:5:7:9:11,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,0x0, KN_SPEARBOOMERANG,Spear Boomerang
60,0,6,4,0,0x1,0,10,1,no,0,0,0,weapon,0,0x0, KN_TWOHANDQUICKEN,Twohand Quicken
61,0,6,4,-1,0x20,0,5,1,no,0,0,0,weapon,0,0x0, KN_AUTOCOUNTER,Counter Attack
61,0,6,4,-1,0x120,0,5,1,no,0,0,0,weapon,0,0x0, KN_AUTOCOUNTER,Counter Attack
62,-2,6,1,-1,0x2,1,10,1,no,0,0x40000,0,weapon,1,0x0, KN_BOWLINGBASH,Bowling Bash
63,0,0,0,0,0,0,1,0,no,0,0,0,weapon,0,0x0, KN_RIDING,Peco Peco Riding
64,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0,0x0, KN_CAVALIERMASTERY,Cavalier Mastery
......@@ -556,7 +557,7 @@
// Sniper
380,0,6,4,0,0x1,0,10,1,no,0,0,0,weapon,0,0x0, SN_SIGHT,Falcon Eyes
381,9,8,1,0,0x40,0,5,1,yes,0,0,0,misc,0,0x0, SN_FALCONASSAULT,Falcon Assault
382,9,8,1,-1,0,1,5,1,yes,0,0x40000,14,weapon,0,0x0, SN_SHARPSHOOTING,Focused Arrow Strike
382,9,8,1,-1,0x100,1,5,1,yes,0,0x40000,14,weapon,0,0x0, SN_SHARPSHOOTING,Focused Arrow Strike
383,0,6,4,0,0x3,-1,10,1,yes,0,0,0,weapon,0,0x0, SN_WINDWALK,Wind Walker
//****
......@@ -739,7 +740,7 @@
508,-9,6,1,-1,0x1,0,1,1,no,0,0,0,weapon,0,0x0, GS_CRACKER,Cracker
509,0,0,0,0,0,0,10,0,no,0,0,0,none,0,0x0, GS_SINGLEACTION,Single Action
510,0,0,0,0,0,0,10,0,no,0,0,0,none,0,0x0, GS_SNAKEEYE,Snake Eye
511,-9,8,0,-1,0,0,10,2,no,0,0,0,weapon,0,0x0, GS_CHAINACTION,Chain Action
511,-9,8,0,-1,0x100,0,10,2,no,0,0,0,weapon,0,0x0, GS_CHAINACTION,Chain Action
512,-9,6,1,-1,0,0,10,1,yes,0,0,0,weapon,0,0x0, GS_TRACKING,Tracking
513,-9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,0x0, GS_DISARM,Disarm
514,-9,6,1,-1,0x20,0,5,1,no,0,0,0,weapon,0,0x100, GS_PIERCINGSHOT,Piercing Shot
......@@ -761,7 +762,7 @@
527,0,6,4,-1,0,0,5,1,no,0,0,0,weapon,3,0x0, NJ_TATAMIGAESHI,Improvised Defense
528,-1,6,1,-1,0,0,10,1,no,0,0,0,weapon,0,0x0, NJ_KASUMIKIRI,Vanishing Slash
529,7:9:11:13:15,6,2,0,0x1,0,5,1,no,0,0,0,none,0,0x4, NJ_SHADOWJUMP,Shadow Leap
530,7:9:11:13:15,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,0x204, NJ_KIRIKAGE,Shadow Slash
530,7:9:11:13:15,6,1,-1,0x100,0,5,1,no,0,0,0,weapon,0,0x204, NJ_KIRIKAGE,Shadow Slash
531,0,6,4,0,0x1,0,5,1,no,0,0,0,none,7,0x0, NJ_UTSUSEMI,Cicada Skin Sheeding
532,0,6,4,0,0x1,0,10,1,yes,0,0,0,magic,0,0x0, NJ_BUNSINJYUTSU,Mirror Image
533,0,0,0,0,0,0,10,0,no,0,0,0,none,0,0x0, NJ_NINPOU,Spirit of the Blade
......@@ -1463,7 +1464,7 @@
8212,3,6,2,1,0x42,1,5,1,no,0,0x80,0,weapon,0,0x3800, MA_FREEZINGTRAP,Freezing_Trap
8213,2,6,32,0,0x1,0,1,1,no,0,0x40000,0,misc,0,0x0, MA_REMOVETRAP,Remove_Trap
8214,-9,6,1,-1,0x2,0,1,1,no,0,0x1,0,weapon,6,0x80, MA_CHARGEARROW,Arrow_Repel
8215,9,8,1,-1,0,1,5,1,yes,0,0x40000,14,weapon,0,0x0, MA_SHARPSHOOTING,Focused_Arrow_Strike
8215,9,8,1,-1,0x100,1,5,1,yes,0,0x40000,14,weapon,0,0x0, MA_SHARPSHOOTING,Focused_Arrow_Strike
8216,-2,8,1,-1,0,0,10,3,no,0,0,0,weapon,0,0x0, ML_PIERCE,Pierce
8217,-2,6,1,-1,0x1,2,10,1,no,0,0,5,weapon,2,0x20000, ML_BRANDISH,Brandish_Spear
8218,5,8,1,-1,0x20,0,5,5,no,0,0x40000,0,weapon,0,0x20000, ML_SPIRALPIERCE,Spiral_Pierce
......
......@@ -16,6 +16,7 @@
// 0x20 - Skill ignores target's defense (misc type always ignores)
// 0x40 - Skill ignores target's flee (magic type always ignores)
// 0x80 - Skill ignores target's def cards
// 0x100 - Skill can critical
// 07 splash/effect range
// -1 - for screen-wide
// 0 - no splash
......@@ -141,7 +142,7 @@
//****
// Thief
48,-1,8,0,-1,0,0,10,2,no,0,0,0,weapon,0,0x0, TF_DOUBLE,Double Attack
48,-1,8,0,-1,0x100,0,10,2,no,0,0,0,weapon,0,0x0, TF_DOUBLE,Double Attack
49,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0,0x0, TF_MISS,Improve Dodge
50,1,6,1,0,1,0,10,1,no,0,0,0,weapon,0,0x0, TF_STEAL,Steal
51,1,6,4,0,1,0,10,1,no,0,0,0,none,0,0x84044, TF_HIDING,Hiding
......@@ -158,7 +159,7 @@
58,-4,6,1,-1,0x2,0,10,1,no,0,0x40000,0,weapon,6,0x0, KN_SPEARSTAB,Spear Stab
59,3:5:7:9:11,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,0x0, KN_SPEARBOOMERANG,Spear Boomerang
60,0,6,4,0,0x1,0,10,1,no,0,0,0,weapon,0,0x0, KN_TWOHANDQUICKEN,Twohand Quicken
61,0,6,4,-1,0,0,5,1,no,0,0,0,weapon,0,0x0, KN_AUTOCOUNTER,Counter Attack
61,0,6,4,-1,0x100,0,5,1,no,0,0,0,weapon,0,0x0, KN_AUTOCOUNTER,Counter Attack
62,-2,6,1,-1,0x2,1,10,1,no,0,0x40000,0,weapon,1,0x0, KN_BOWLINGBASH,Bowling Bash
63,0,0,0,0,0,0,1,0,no,0,0,0,weapon,0,0x0, KN_RIDING,Peco Peco Riding
64,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0,0x0, KN_CAVALIERMASTERY,Cavalier Mastery
......@@ -556,7 +557,7 @@
// Sniper
380,0,6,4,0,0x1,0,10,1,no,0,0,0,weapon,0,0x0, SN_SIGHT,Falcon Eyes
381,9,8,1,0,0xC0,0,5,1,yes,0,0,0,misc,0,0x0, SN_FALCONASSAULT,Falcon Assault
382,9,8,1,-1,0,1,5,1,yes,0,0x40000,14,weapon,0,0x0, SN_SHARPSHOOTING,Focused Arrow Strike
382,9,8,1,-1,0x100,1,5,1,yes,0,0x40000,14,weapon,0,0x0, SN_SHARPSHOOTING,Focused Arrow Strike
383,0,6,4,0,0x3,-1,10,1,yes,0,0,0,weapon,0,0x0, SN_WINDWALK,Wind Walker
//****
......@@ -739,7 +740,7 @@
508,-9,6,1,-1,0x1,0,1,1,no,0,0,0,weapon,0,0x0, GS_CRACKER,Cracker
509,0,0,0,0,0,0,10,0,no,0,0,0,none,0,0x0, GS_SINGLEACTION,Single Action
510,0,0,0,0,0,0,10,0,no,0,0,0,none,0,0x0, GS_SNAKEEYE,Snake Eye
511,-9,8,0,-1,0,0,10,2,no,0,0,0,weapon,0,0x0, GS_CHAINACTION,Chain Action
511,-9,8,0,-1,0x100,0,10,2,no,0,0,0,weapon,0,0x0, GS_CHAINACTION,Chain Action
512,-9,6,1,-1,0,0,10,1,yes,0,0,0,weapon,0,0x0, GS_TRACKING,Tracking
513,-9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,0x0, GS_DISARM,Disarm
514,-9,6,1,-1,0x20,0,5,1,no,0,0,0,weapon,0,0x100, GS_PIERCINGSHOT,Piercing Shot
......@@ -761,7 +762,7 @@
527,0,6,4,-1,0,0,5,1,no,0,0,0,weapon,4,0x0, NJ_TATAMIGAESHI,Improvised Defense
528,-1,6,1,-1,0,0,10,1,no,0,0,0,weapon,0,0x0, NJ_KASUMIKIRI,Vanishing Slash
529,7:9:11:13:15,6,2,0,0x1,0,5,1,no,0,0,0,none,0,0x4, NJ_SHADOWJUMP,Shadow Leap
530,7:9:11:13:15,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,0x204, NJ_KIRIKAGE,Shadow Slash
530,7:9:11:13:15,6,1,-1,0x100,0,5,1,no,0,0,0,weapon,0,0x204, NJ_KIRIKAGE,Shadow Slash
531,0,6,4,0,0x1,0,5,1,no,0,0,0,none,7,0x0, NJ_UTSUSEMI,Cicada Skin Sheeding
532,0,6,4,0,0x1,0,10,1,yes,0,0,0,magic,0,0x0, NJ_BUNSINJYUTSU,Mirror Image
533,0,0,0,0,0,0,10,0,no,0,0,0,none,0,0x0, NJ_NINPOU,Spirit of the Blade
......@@ -1023,7 +1024,7 @@
//****
// RA Ranger
2233,9,8,1,-1,0x2,3:3:3:3:3:4:4:4:4:5,10,-3,yes,0,0,0,weapon,0,0x80, RA_ARROWSTORM,Arrow Storm
2234,0,6,4,0,0,0,5,1,yes,0,0,0,none,0,0x0, RA_FEARBREEZE,Fear Breeze
2234,0,6,4,0,0x100,0,5,1,yes,0,0,0,none,0,0x0, RA_FEARBREEZE,Fear Breeze
2235,0,0,0,0,0,0,10,0,no,0,0,0,none,0,0x0, RA_RANGERMAIN,Ranger Main
2236,9,8,1,-1,0,0,10,1,yes,0,0,0,weapon,0,0x80, RA_AIMEDBOLT,Aimed Bolt
2237,9,6,2,0,0x3,3,1,1,no,0,0x40000,0,none,0,0x2000, RA_DETONATOR,Detonator
......@@ -1466,7 +1467,7 @@
8212,3,6,2,1,0x42,1,5,1,no,0,0x80,0,weapon,0,0x3800, MA_FREEZINGTRAP,Freezing_Trap
8213,2,6,32,0,0x1,0,1,1,no,0,0x40000,0,misc,0,0x0, MA_REMOVETRAP,Remove_Trap
8214,-9,6,1,-1,0x2,0,1,1,no,0,0x1,0,weapon,6,0x80, MA_CHARGEARROW,Arrow_Repel
8215,9,8,1,-1,0,1,5,1,yes,0,0x40000,14,weapon,0,0x0, MA_SHARPSHOOTING,Focused_Arrow_Strike
8215,9,8,1,-1,0x100,1,5,1,yes,0,0x40000,14,weapon,0,0x0, MA_SHARPSHOOTING,Focused_Arrow_Strike
8216,-2,8,1,-1,0,0,10,3,no,0,0,0,weapon,0,0x0, ML_PIERCE,Pierce
8217,-2,6,1,-1,0x1,2,10,1,no,0,0,5,weapon,2,0x20000, ML_BRANDISH,Brandish_Spear
8218,5,8,1,-1,0,0,5,5,no,0,0x40000,0,weapon,0,0x20000, ML_SPIRALPIERCE,Spiral_Pierce
......
......@@ -2379,14 +2379,12 @@ static bool is_attack_critical(struct Damage wd, struct block_list *src, struct
struct map_session_data *tsd = BL_CAST(BL_PC, target);
if (!first_call)
return (wd.type == DMG_CRITICAL);
return (wd.type == DMG_CRITICAL || wd.type == DMG_MULTI_HIT_CRITICAL);
if (skill_id == NPC_CRITICALSLASH || skill_id == LG_PINPOINTATTACK) //Always critical skills
return true;
if( !(wd.type&DMG_MULTI_HIT) && sstatus->cri && (!skill_id ||
skill_id == KN_AUTOCOUNTER || skill_id == SN_SHARPSHOOTING ||
skill_id == MA_SHARPSHOOTING || skill_id == NJ_KIRIKAGE))
if( sstatus->cri && ( !skill_id || skill_get_nk(skill_id)&NK_CRITICAL ) )
{
short cri = sstatus->cri;
......@@ -5376,8 +5374,16 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
wd = battle_calc_multi_attack(wd, src, target, skill_id, skill_lv);
// crit check is next since crits always hit on official [helvetica]
if (is_attack_critical(wd, src, target, skill_id, skill_lv, true))
if (is_attack_critical(wd, src, target, skill_id, skill_lv, true)) {
#if PACKETVER >= 20161207
if (wd.type&DMG_MULTI_HIT)
wd.type = DMG_MULTI_HIT_CRITICAL;
else
wd.type = DMG_CRITICAL;
#else
wd.type = DMG_CRITICAL;
#endif
}
// check if we're landing a hit
if(!is_attack_hitting(wd, src, target, skill_id, skill_lv, true))
......
......@@ -4756,6 +4756,7 @@ static int clif_hallucination_damage()
/// 10 = critical hit
/// 11 = lucky dodge
/// 12 = (touch skill?)
/// 13 = multi-hit critical
int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tick, int sdelay, int ddelay, int64 sdamage, int div, enum e_damage_type type, int64 sdamage2, bool spdamage)
{
unsigned char buf[34];
......@@ -4776,7 +4777,8 @@ int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tic
nullpo_ret(src);
nullpo_ret(dst);
type = clif_calc_delay(type,div,damage+damage2,ddelay);
if (type != DMG_MULTI_HIT_CRITICAL)
type = clif_calc_delay(type,div,damage+damage2,ddelay);
sc = status_get_sc(dst);
if(sc && sc->count) {
if(sc->data[SC_HALLUCINATION]) {
......@@ -4838,6 +4840,9 @@ int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tic
if(src == dst) {
unit_setdir(src, unit_getdir(src));
}
// In case this assignment is bypassed by DMG_MULTI_HIT_CRITICAL
type = clif_calc_delay(type, div, damage + damage2, ddelay);
//Return adjusted can't walk delay for further processing.
return clif_calc_walkdelay(dst, ddelay, type, damage+damage2, div);
}
......
......@@ -534,6 +534,7 @@ enum e_damage_type : uint8_t {
DMG_CRITICAL, /// critical hit
DMG_LUCY_DODGE, /// lucky dodge
DMG_TOUCH, /// (touch skill?)
DMG_MULTI_HIT_CRITICAL /// multi-hit with critical
};
int clif_setip(const char* ip);
......
......@@ -46,6 +46,7 @@ enum e_skill_nk {
NK_IGNORE_DEF = 0x20,
NK_IGNORE_FLEE = 0x40,
NK_NO_CARDFIX_DEF = 0x80,
NK_CRITICAL = 0x100,
};
/// Constants to identify the skill's inf value:
......