summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/item_db.txt8
-rw-r--r--db/size_fix.txt8
-rw-r--r--db/skill_cast_db.txt28
-rw-r--r--db/skill_db.txt22
-rw-r--r--db/skill_require_db.txt32
-rw-r--r--src/map/battle.c74
-rw-r--r--src/map/skill.c123
-rw-r--r--src/map/status.c79
8 files changed, 250 insertions, 124 deletions
diff --git a/db/item_db.txt b/db/item_db.txt
index 2008a3a51..0fe15200c 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -2666,8 +2666,8 @@
13258,Kunai_of_Fierce_Heat,Kunai of Fierce Heat,10,10,,20,30,,,,0x02000000,7,2,32768,,1,,7,{ bonus bAtkEle,Ele_Fire; },{},{}
13259,Kunai_of_Deadly_Poison,Kunai of Deadly Poison,10,10,,20,30,,,,0x02000000,7,2,32768,,1,,7,{ bonus2 bAddEff,Eff_Poison,50; },{},{}
// Ninja Fuuma Shurikens
-13300,Fuuma_Shuriken_Beneki,Fuuma Shuriken Beneki,4,90000,,3000,150,,1,0,0x02000000,7,2,2,4,65,1,22,{ bonus bAtkEle,Ele_Wind; bonus bAgi,-1; bonus bDex,-2; },{},{}
-13301,Fuuma_Shuriken_Daisharin,Fuuma Shuriken Daisharin,4,40000,,2500,50,,1,3,0x02000000,7,2,2,4,42,1,22,{ bonus2 bAddEff,Eff_Bleeding,500; },{},{}
-13302,Fuuma_Shuriken_Daisharin_,Fuuma Shuriken Daisharin,4,40000,,2500,50,,1,4,0x02000000,7,2,2,4,42,1,22,{ bonus2 bAddEff,Eff_Bleeding,500; },{},{}
-13303,Fuuma_Shuriken_Rekka,Fuuma Shuriken Rekka,4,78000,,1500,185,,1,0,0x02000000,7,2,2,4,55,1,22,{ bonus bDex,-2; bonus bAtkEle,3; bonus4 bAutoSpell,19,5,20,1; },{},{}
+13300,Fuuma_Shuriken_Beneki,Fuuma Shuriken Beneki,4,90000,,3000,150,,1,0,0x02000000,7,2,34,4,65,1,22,{ bonus bAtkEle,Ele_Wind; bonus bAgi,-1; bonus bDex,-2; },{},{}
+13301,Fuuma_Shuriken_Daisharin,Fuuma Shuriken Daisharin,4,40000,,2500,50,,1,3,0x02000000,7,2,34,4,42,1,22,{ bonus2 bAddEff,Eff_Bleeding,500; },{},{}
+13302,Fuuma_Shuriken_Daisharin_,Fuuma Shuriken Daisharin,4,40000,,2500,50,,1,4,0x02000000,7,2,34,4,42,1,22,{ bonus2 bAddEff,Eff_Bleeding,500; },{},{}
+13303,Fuuma_Shuriken_Rekka,Fuuma Shuriken Rekka,4,78000,,1500,185,,1,0,0x02000000,7,2,34,4,55,1,22,{ bonus bDex,-2; bonus bAtkEle,Ele_Fire; bonus4 bAutoSpell,17,5,20,1; },{},{}
13400,Cutlus_,Cutlus,4,,10,900,150,,1,1,0x000654E2,7,2,2,4,40,1,2,{ skill 5,5; bonus bStr,2; bonus bDef,1; },{},{}
diff --git a/db/size_fix.txt b/db/size_fix.txt
index 829bbc636..3d33666fa 100644
--- a/db/size_fix.txt
+++ b/db/size_fix.txt
@@ -1,7 +1,7 @@
// Database for size fix for weapon damage.
//Columns: Weapon type, Rows: Target size.
-//Bare Fist,Knife,1H Sword, 2H Sword,1H Spear, 2H Spears, 1H Axe, 2H Axe, Mace, ?, Staff, Bow, Knuckle, Musical Instrument, Whip, Book, Katar, Revolver, Rifle, Shotgun, Gatling Gun, Grenade Launcher
-100,100, 75, 75, 75, 75, 50, 50, 75,100,100,100,100, 75, 75,100, 75,100,100,100,100,100, // Size: Small
-100, 75,100, 75, 75, 75, 75, 75,100,100,100,100, 75,100,100,100,100,100,100,100,100,100, // Size: Medium
-100, 50, 75,100,100,100,100,100,100,100,100, 75, 50, 75, 50, 50, 75,100,100,100,100,100, // Size: Large
+//Bare Fist,Knife,1H Sword, 2H Sword,1H Spear, 2H Spears, 1H Axe, 2H Axe, Mace, ?, Staff, Bow, Knuckle, Musical Instrument, Whip, Book, Katar, Revolver, Rifle, Shotgun, Gatling Gun, Grenade Launcher, Fuuma Shuriken
+100,100, 75, 75, 75, 75, 50, 50, 75,100,100,100,100, 75, 75,100, 75,100,100,100,100,100,100, // Size: Small
+100, 75,100, 75, 75, 75, 75, 75,100,100,100,100, 75,100,100,100,100,100,100,100,100,100,100, // Size: Medium
+100, 50, 75,100,100,100,100,100,100,100,100, 75, 50, 75, 50, 50, 75,100,100,100,100,100,100, // Size: Large
diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt
index 02ebc4f7c..31fc89f06 100644
--- a/db/skill_cast_db.txt
+++ b/db/skill_cast_db.txt
@@ -881,16 +881,12 @@
//===== Ninja ==============================
-//-- NJ_SYURIKEN
-523,0,0,0,0,0
-//-- NJ_KUNAI
-524,0,0,0,0,0
-//-- NJ_HUUMA
-525,0,0,0,0,0
+//-- NJ_HUUMA // Unknown delay. temp value (taken from jA)
+525,1000,0,0,0,0
//-- NJ_ZENYNAGE
526,0,5000,0,0,0
//-- NJ_TATAMIGAESHI
-527,0,3000,3000,3000,3000
+527,0,0,0,3000,3000
//-- NJ_KASUMIKIRI
528,0,0,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0
//-- NJ_SHADOWJUMP
@@ -905,25 +901,25 @@
//-- NJ_KOUENKA
534,700:1400:2100:2800:3500:4200:4900:5600:6300:7000,0,0,0,0
//-- NJ_KAENSIN
-535,0,0,0,20000,0
+535,6000:5500:5000:4500:4000:3500:3000:2500:2000:1500,0,0,20000,0,
//-- NJ_BAKUENRYU
-536,0,0,0,0,0
+536,3000,2000,0,0,0
//-- NJ_HYOUSENSOU
537,700:1400:2100:2800:3500:4200:4900:5600:6300:7000,0,0,0,0
//-- NJ_SUITON
-538,3300:3200:3100:3000:2900:2800:2700:2600:2500:2400,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0
+538,3300:3200:3100:3000:2900:2800:2700:2600:2500:2400,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000
//-- NJ_HYOUSYOURAKU
-539,0,0,0,0,10000
+539,3700:3400:3100:2800:2500,0,0,0,0 // cast and delay unknown, I put the same as Raigekisai (same type of attack)
//-- NJ_HUUJIN
540,700:1400:2100:2800:3500:4200:4900:5600:6300:7000,0,0,0,0
//-- NJ_RAIGEKISAI
-541,0,0,0,0,0
+541,3700:3400:3100:2800:2500,0,0,0,0 // not sure of cast but very litely to be correct (English Translation Project)
//-- NJ_KAMAITACHI
-542,0,0,0,0,0
+542,3000,2000,0,0,0 // cast and delay unknown. temp values (I put the same as bakuenryu)
//-- NJ_NEN
-543,0,0,0,0,0
-//-- NJ_ISSEN
-544,0,0,0,0,0
+543,5000:4000:3000:2000:1000,0,0,30000:45000:60000:75000:90000,30000:45000:60000:75000:90000
+//-- NJ_ISSEN // cast and delay unknown. temp values (same as Extremity Fist)
+544,4000:3500:3000:2500:2000:3000:2500:2000:1500:1000,0,0,0,0
//==========================================
diff --git a/db/skill_db.txt b/db/skill_db.txt
index 9504f76cb..58e67e409 100644
--- a/db/skill_db.txt
+++ b/db/skill_db.txt
@@ -546,7 +546,7 @@
522,0,0,0,0,0,0,10,1,no,0,0,0,weapon,0 //NJ_TOBIDOUGU#NJ_TOBIDOUGU#
523,9,6,1,-1,0,0,10,1,no,0,0,0,weapon,0 //NJ_SYURIKEN#NJ_SYURIKEN#
524,9,8,1,-1,0,0,5,3,no,0,0,0,weapon,0 //NJ_KUNAI#NJ_KUNAI#
-525,9,8,1,-1,2,2,5,-1:-2:-3:-4:-5,no,0,0,0,weapon,0 //NJ_HUUMA#NJ_HUUMA#
+525,9,8,1,-1,0,1,5,-1:-2:-3:-4:-5,yes,0,0,0,weapon,0 //NJ_HUUMA#NJ_HUUMA#
526,9,6,1,0,0,0,10,1,no,0,0,0,misc,0 //NJ_ZENYNAGE#NJ_ZENYNAGE#
527,0,6,4,3,0,0,5,1,no,0,0,0,weapon,3 //NJ_TATAMIGAESHI#NJ_TATAMIGAESHI#
528,1,6,1,-1,0,0,10,1,no,0,0,0,weapon,0 //NJ_KASUMIKIRI#NJ_KASUMIKIRI#
@@ -555,17 +555,17 @@
531,0,6,4,0,1,0,5,1,no,0,0,0,none,0 //NJ_UTSUSEMI#NJ_UTSUSEMI#
532,0,6,4,0,1,0,10,1,no,0,0,0,none,0 //NJ_BUNSINJYUTSU#NJ_BUNSINJYUTSU#
533,0,0,0,0,0,0,10,0,no,0,0,0,none,0 //NJ_NINPOU#NJ_NINPOU#
-534,9,8,1,3,0,0,10,1:2:3:4:5:6:7:8:9:10,no,0,0,0,magic,0 //NJ_KOUENKA#NJ_KOUENKA#
-535,0,8,4,3,0,0,10,1,no,0,0,0,magic,0 //NJ_KAENSIN#NJ_KAENSIN#
-536,9,8,1,3,2,2,5,3,no,0,0,0,magic,0 //NJ_BAKUENRYU#NJ_BAKUENRYU#
-537,9,8,1,1,0,0,10,1:2:3:4:5:6:7:7:7:7,no,0,0,0,magic,0 //NJ_HYOUSENSOU#NJ_HYOUSENSOU#
-538,9,6,2,0,1,0,10,1,no,0,0,0,magic,0 //NJ_SUITON#NJ_SUITON#
-539,0,6,4,1,0,0,5,1,no,0,0,0,magic,0 //NJ_HYOUSYOURAKU#NJ_HYOUSYOURAKU#
-540,9,8,1,4,0,0,10,1:2:2:3:3:4:4:5:5:6,no,0,0,0,magic,0 //NJ_HUUJIN#NJ_HUUJIN#
-541,0,6,4,0,1,0,5,1,no,0,0,0,magic,0 //NJ_RAIGEKISAI#NJ_RAIGEKISAI#
-542,9,8,1,-1,0,0,5,1,no,0,0,0,magic,0 //NJ_KAMAITACHI#NJ_KAMAITACHI#
+534,9,8,1,3,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 //NJ_KOUENKA#NJ_KOUENKA#
+535,0,8,4,3,0,0,10,1,yes,0,0,0,magic,0 //NJ_KAENSIN#NJ_KAENSIN#
+536,9,8,1,3,2,1,5,-3,yes,0,0,0,magic,0 //NJ_BAKUENRYU#NJ_BAKUENRYU#
+537,9,8,1,1,0,0,10,3:4:5:6:7:8:9:10:11:12,yes,0,0,0,magic,0 //NJ_HYOUSENSOU#NJ_HYOUSENSOU#
+538,9,6,2,0,1,0,10,1,yes,0,0,0,magic,0 //NJ_SUITON#NJ_SUITON#
+539,0,6,4,1,1,0,5,1,yes,0,0,0,magic,0 //NJ_HYOUSYOURAKU#NJ_HYOUSYOURAKU#
+540,9,8,1,4,0,0,10,1:2:2:3:3:4:4:5:5:6,yes,0,0,0,magic,0 //NJ_HUUJIN#NJ_HUUJIN#
+541,9,6,4,4,1,0,5,1,yes,0,0,0,magic,0 //NJ_RAIGEKISAI#NJ_RAIGEKISAI#
+542,5:6:7:8:9,8,1,4,0,2,5,1,yes,0,0,0,magic,0 //NJ_KAMAITACHI#NJ_KAMAITACHI#
543,0,6,4,0,1,0,5,1,no,0,0,0,none,0 //NJ_NEN#NJ_NEN#
-544,2,6,4,0,0,0,10,1,no,0,0,0,weapon,0 //NJ_ISSEN#NJ_ISSEN#
+544,-2,6,1,0,0,0,10,1,yes,0,0,0,weapon,0 //NJ_ISSEN#NJ_ISSEN#
1001,9,6,1,-1,0,0,1,1,no,0,1,0,weapon,0 //KN_CHARGEATK#Charge Attack#
1002,0,6,4,0,1,0,1,0,no,0,1,0,weapon,2 //CR_SHRINK#Shrink#
diff --git a/db/skill_require_db.txt b/db/skill_require_db.txt
index bee3bd80d..225aa9b06 100644
--- a/db/skill_require_db.txt
+++ b/db/skill_require_db.txt
@@ -413,28 +413,28 @@
519,0,0,20:25:30:35:40:45:50:55:60:65,0,0,0,19,4,1:2:3:4:5:6:7:8:9:10,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GS_FULLBUSTER
520,0,0,15:20:25:30:35:40:45:50:55:60,0,0,0,19,4,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GS_SPREADATTACK
521,0,0,4:8:12:16:20:24:28:32:36:40,0,0,0,21,5,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GS_GROUNDDRIFT
-523,0,0,10,0,0,0,0,6,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_SYURIKEN
-524,0,0,10,0,0,0,0,7,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_KUNAI
-525,0,0,20:25:30:35:40,0,0,0,0,6,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_HUUMA
-526,0,0,50,0,0,1000:2000:3000:4000:5000,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_ZENYNAGE
+523,0,0,2,0,0,0,99,6,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_SYURIKEN
+524,0,0,30:25:20:15:10,0,0,0,99,7,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_KUNAI
+525,0,0,20:25:30:35:40,0,0,0,22,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_HUUMA
+526,0,0,50,0,0,500:1000:1500:2000:2500:3000:3500:4000:4500:5000,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_ZENYNAGE
527,0,0,40,0,0,0,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_TATAMIGAESHI
528,0,0,10:12:14:16:18:20:22:24:26:28,0,0,0,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_KASUMIKIRI
529,0,0,40,0,0,0,0,0,0,hiding,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_SHADOWJUMP
530,0,0,14:16:18:20:22,0,0,0,0,0,0,hiding,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_KIRIKAGE
531,0,0,12:15:18:21:24,0,0,0,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_UTSUSEMI
532,0,0,30:32:34:36:38:40:42:44:46:48,0,0,0,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_BUNSINJYUTSU
-533,0,0,10,0,0,0,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_NINPOU
-534,0,0,18:20:22:24:26:28:30:32:34:36,0,0,0,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_KOUENKA
-535,0,0,40,0,0,0,0,0,0,none,0,7521,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_KAENSIN
-536,0,0,20:25:30:35:40,0,0,0,0,0,0,none,0,7521,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_BAKUENRYU
-537,0,0,15:18:21:24:27:30:33:36:39:42,0,0,0,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_HYOUSENSOU
-538,0,0,15:18:21:24:27:30:33:36:39:42,0,0,0,0,0,0,none,0,7522,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_SUITON
-539,0,0,40:45:50:55:60,0,0,0,0,0,0,none,0,7522,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_HYOUSYOURAKU
-540,0,0,12:14:16:18:20:22:24:26:28:30,0,0,0,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_HUUJIN
-541,0,0,16:20:24:28:32,0,0,0,0,0,0,none,0,7523,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_RAIGEKISAI
-542,0,0,24:28:32:36:40,0,0,0,0,0,0,none,0,7523,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_KAMAITACHI
-543,0,0,20:30:40:50:60,0,0,0,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_NEN
-544,0,0,55:60:65:70:75:80:85:90:95:100,0,0,0,0,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_ISSEN
+533,0,0,10,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_NINPOU
+534,0,0,18:20:22:24:26:28:30:32:34:36,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_KOUENKA
+535,0,0,25,0,0,0,99,0,0,none,0,7521,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_KAENSIN
+536,0,0,20:25:30:35:40,0,0,0,99,0,0,none,0,7521,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_BAKUENRYU
+537,0,0,15:18:21:24:27:30:33:36:39:42,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_HYOUSENSOU
+538,0,0,15:18:21:24:27:30:33:36:39:42,0,0,0,99,0,0,none,0,7522,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_SUITON
+539,0,0,40:45:50:55:60,0,0,0,99,0,0,none,0,7522,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_HYOUSYOURAKU
+540,0,0,12:14:16:18:20:22:24:26:28:30,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_HUUJIN
+541,0,0,16:20:24:28:32,0,0,0,99,0,0,none,0,7523,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_RAIGEKISAI
+542,0,0,24:28:32:36:40,0,0,0,99,0,0,none,0,7523,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_KAMAITACHI
+543,80,0,20:30:40:50:60,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_NEN
+544,0,0,55:60:65:70:75:80:85:90:95:100,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NJ_ISSEN
1001,0,0,40,0,0,0,99,0,0,move_enable,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KN_CHARGEATK#ƒ`ƒƒ?[ƒWƒAƒ^ƒbƒN#
1002,0,0,15,0,0,0,99,0,0,shield,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_SHRINK#ƒVƒ…ƒŠƒ“ƒN#
diff --git a/src/map/battle.c b/src/map/battle.c
index 17779241f..ad5f25d0a 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -325,8 +325,8 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
return 0;
}
- //Now damage increasing effects
- if(sc->data[SC_AETERNA].timer!=-1 && skill_num != PA_PRESSURE && skill_num != PF_SOULBURN){
+ //Now damage increasing effects // not sure for Throw Zeny
+ if(sc->data[SC_AETERNA].timer!=-1 && skill_num != PA_PRESSURE && skill_num != PF_SOULBURN && skill_num != NJ_ZENYNAGE){
damage<<=1;
status_change_end( bl,SC_AETERNA,-1 );
}
@@ -615,12 +615,12 @@ int battle_addmastery(struct map_session_data *sd,struct block_list *target,int
if((skill = pc_checkskill(sd,AS_KATAR)) > 0)
damage += (skill * 3);
break;
+ case W_HUUMA: // Added Tobidougu bonus if wearing a Fuuma Shuriken
+ if((skill = pc_checkskill(sd,NJ_TOBIDOUGU)) >0)
+ damage += (skill * 3);
+ break;
}
-/*//need to add this on shuriken skills.
- if((skill = pc_checkskill(sd,NJ_TOBIDOUGU)) > 0) {
- damage += (skill * 3);
- }
-*/
+
return damage;
}
/*==========================================
@@ -633,6 +633,7 @@ int battle_addmastery(struct map_session_data *sd,struct block_list *target,int
* &2: Arrow attack
* &4: Skill is Magic Crasher
* &8: Skip target size adjustment (Extremity Fist?)
+ *&16: Arrow attack but BOW, REVOLVER, RIFLE, SHOTGUN, GATLING or GRENADE type weapon not equipped (i.e. shuriken, kunai and venom knives not affected by DEX)
*/
static int battle_calc_base_damage(struct status_data *status, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag)
{
@@ -666,7 +667,7 @@ static int battle_calc_base_damage(struct status_data *status, struct weapon_atk
if (atkmin > atkmax)
atkmin = atkmax;
- if(flag&2)
+ if(flag&2 && !(flag&16))
{ //Bows
atkmin = atkmin*atkmax/100;
if (atkmin > atkmax)
@@ -1025,6 +1026,7 @@ static struct Damage battle_calc_weapon_attack(
case NPC_MENTALBREAKER:
case GS_GROUNDDRIFT:
case NJ_TATAMIGAESHI:
+ case NJ_ISSEN:
case HVAN_EXPLOSION: //[orn]
flag.hit = 1;
break;
@@ -1186,10 +1188,19 @@ static struct Damage battle_calc_weapon_attack(
default:
{
i = (flag.cri?1:0)|(flag.arrow?2:0)|(skill_num == HW_MAGICCRASHER?4:0)|(skill_num == MO_EXTREMITYFIST?8:0);
+ if ( flag.arrow && sd->status.weapon != W_BOW && sd->status.weapon != W_REVOLVER && sd->status.weapon != W_SHOTGUN
+ && sd->status.weapon != W_GATLING && sd->status.weapon != W_GRENADE ) i |= 16; // for ex. shuriken must not be influenced by DEX
wd.damage = battle_calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, sd, i);
if (sstatus->lhw)
wd.damage2 = battle_calc_base_damage(sstatus, sstatus->lhw, sc, tstatus->size, sd, i);
+ // Added split damage for Huuma
+ if (skill_num == NJ_HUUMA) // Divide ATK in case of multiple targets skill
+ if(wflag>0)
+ wd.damage/= wflag;
+ else if(battle_config.error_log)
+ ShowError("0 enemies targeted by Throw Huuma, divide per 0 avoided!\n");
+
//Add any bonuses that modify the base baseatk+watk (pre-skills)
if(sd)
{
@@ -1698,6 +1709,26 @@ static struct Damage battle_calc_weapon_attack(
if (flag.rh && wd.damage < 1) wd.damage = 1;
if (flag.lh && wd.damage2 < 1) wd.damage2 = 1;
+ // Added Tobidougu bonus on throwing weapon ninja skills if not wearing a Fuuma shuriken (bonus already added in battle_addmastery)
+ switch(skill_num)
+ {
+ case NJ_SYURIKEN:
+ if((skill = pc_checkskill(sd,NJ_TOBIDOUGU)) > 0 && sd->status.weapon != W_HUUMA) { wd.damage+=skill*3+skill_lv*4; }
+ else {wd.damage+=skill_lv*4; }
+ break;
+ case NJ_KUNAI:
+ if((skill = pc_checkskill(sd,NJ_TOBIDOUGU)) > 0 && sd->status.weapon != W_HUUMA) { wd.damage+=skill*3; }
+ break;
+ default:
+ break;
+ }
+
+ if ( skill_num == NJ_ISSEN )
+ {
+ wd.damage=sstatus->str*80+skill_lv*sstatus->hp*8/100;
+ status_zap(src, sstatus->hp-1, 0);
+ }
+
if (sd && flag.weapon && skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST
&& skill_num != CR_GRANDCROSS)
{ //Add mastery damage
@@ -2050,6 +2081,7 @@ struct Damage battle_calc_magic_attack(
struct map_session_data *sd, *tsd;
struct Damage ad;
+ struct status_change *sc;
struct status_data *sstatus = status_get_status_data(src);
struct status_data *tstatus = status_get_status_data(target);
struct {
@@ -2166,6 +2198,8 @@ struct Damage battle_calc_magic_attack(
//Adds an absolute value to damage. 100 = +100 damage
#define MATK_ADD( a ) { ad.damage+= a; }
+ sc= status_get_sc(src);
+
switch (skill_num)
{ //Calc base damage according to skill
case AL_HEAL:
@@ -2281,16 +2315,20 @@ struct Damage battle_calc_magic_attack(
skillratio -= 10;
break;
case NJ_BAKUENRYU:
- skillratio += 50*(skill_lv-1);
+ skillratio += 50 + 150*skill_lv;
break;
+ case NJ_HYOUSENSOU:
+ skillratio -= 30;
+ if ( sc->data[SC_SUITON].timer != -1 ) skillratio += skillratio*sc->data[SC_SUITON].val1*2/100;
+ break;
case NJ_HYOUSYOURAKU:
- skillratio += 50*skill_lv;
+ skillratio += 100 + 50*skill_lv;
break;
case NJ_RAIGEKISAI:
skillratio += 60 + 40*skill_lv;
break;
case NJ_KAMAITACHI:
- skillratio += 100*skill_lv;
+ skillratio += 100 + 100*skill_lv;
break;
}
@@ -2471,6 +2509,7 @@ struct Damage battle_calc_misc_attack(
switch(skill_num){
case PA_PRESSURE:
case GS_FLING:
+ case NJ_ZENYNAGE: // Throw zeny not affected by cards, elements, race..
flag.elefix = flag.cardfix = 0;
case HT_BLITZBEAT:
case TF_THROWSTONE:
@@ -2557,10 +2596,9 @@ struct Damage battle_calc_misc_attack(
case NJ_ZENYNAGE:
md.damage = skill_get_zeny(skill_num ,skill_lv);
if (!md.damage) md.damage = 2;
- md.damage = md.damage/2 + rand()%md.damage;
- if (sd) pc_payzeny(sd, md.damage);
- if(map_flag_vs(target->m) || is_boss(target))
- md.damage>>=1; //temp value
+ md.damage = md.damage + rand()%md.damage;
+ if(is_boss(target)) // deleted || map_flag_vs(target->m) , seemed to reduce damage in PVP mode
+ md.damage=md.damage*60/100;
break;
case GS_FLING:
md.damage = sd?sd->status.job_level:status_get_lv(src);
@@ -2639,16 +2677,18 @@ struct Damage battle_calc_misc_attack(
if(md.damage < 0)
md.damage = 0;
- else if(md.damage && tstatus->mode&MD_PLANT && skill_num != PA_PRESSURE) //Pressure can vaporize plants.
+ else if(md.damage && tstatus->mode&MD_PLANT && skill_num != PA_PRESSURE && skill_num != NJ_ZENYNAGE) //Pressure can vaporize plants. // damage=1 on plant with Throw zeny ?
md.damage = 1;
md.damage=battle_attr_fix(src, target, md.damage, s_ele, tstatus->def_ele, tstatus->ele_lv);
- if (skill_num != PA_PRESSURE) //Pressure ignores all these things...
+ if (skill_num != PA_PRESSURE && skill_num != NJ_ZENYNAGE) //Pressure ignores all these things... and Throw Money ?
md.damage=battle_calc_damage(src,target,md.damage,md.div_,skill_num,skill_lv,md.flag);
if (map_flag_gvg(target->m))
md.damage=battle_calc_gvg_damage(src,target,md.damage,md.div_,skill_num,skill_lv,md.flag);
+ if ( sd && md.damage && skill_num == NJ_ZENYNAGE ) pc_payzeny(sd, md.damage); // conso zenys at the end of the calculation I think
+
return md;
}
/*==========================================
diff --git a/src/map/skill.c b/src/map/skill.c
index 9463e242d..3ea17ef1c 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2824,7 +2824,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case MC_CARTREVOLUTION:
case NPC_SPLASHATTACK:
case AC_SHOWER: //Targetted skill implementation.
- case NJ_BAKUENRYU:
if(flag&1){
if(bl->id!=skill_area_temp[1]){
skill_attack(skill_get_type(skillid),src,src,bl,skillid,skilllv,tick,
@@ -2994,6 +2993,9 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
if (skilllv>1) {
int range = skilllv/2;
int cnt;
+ // if caster is ONLY on a NJ_SUITON cell, range will be increased by 1 (consuming suiton cells but also deluge cells if there are ones)
+ if ( !map_getcell(src->m,src->x,src->y,CELL_CHKWATER) && !map_find_skill_unit_oncell(src,src->x,src->y,SA_DELUGE,NULL) ) range = skilllv/2+1;
+
if (sd)
cnt = skill_count_water(src,range);
else {
@@ -3152,7 +3154,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case GS_FULLBUSTER:
case NJ_SYURIKEN:
case NJ_KUNAI:
- case NJ_HUUMA:
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
break;
case GS_BULLSEYE:
@@ -3174,6 +3175,41 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
skill_castend_damage_id);
}
break;
+ case NJ_HUUMA:
+ if (flag & 1) {
+ if (bl->id != skill_area_temp[1])
+ skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, skill_area_temp[0]);
+ } else {
+ skill_area_temp[0] = 0;
+ skill_area_temp[1] = bl->id;
+ map_foreachinrange(skill_area_sub, bl,
+ skill_get_splash(skillid, skilllv), BL_CHAR,
+ src, skillid, skilllv, tick, flag|BCT_ENEMY,
+ skill_area_sub_count);
+ skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, skill_area_temp[0]);
+ map_foreachinrange(skill_area_sub, bl,
+ skill_get_splash(skillid, skilllv), BL_CHAR,
+ src, skillid, skilllv, tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ }
+ break;
+ case NJ_BAKUENRYU:
+ if (flag & 1) {
+ skill_attack(BF_MAGIC, src, src, bl, skillid, skilllv, tick, skill_area_temp[0]);
+ } else {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ skill_area_temp[0] = 0;
+ skill_area_temp[1] = bl->id;
+ if (flag & 0xf00000)
+ map_foreachinrange(skill_area_sub, bl,
+ skill_get_splash(skillid, skilllv), BL_CHAR,
+ src, skillid, skilllv, tick, BCT_ENEMY, skill_area_sub_count);
+ map_foreachinrange(skill_area_sub, bl,
+ skill_get_splash(skillid, skilllv), BL_CHAR,
+ src, skillid, skilllv, tick, BCT_ENEMY|1,
+ skill_castend_damage_id);
+ }
+ break;
case NJ_KASUMIKIRI:
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
sc_start(src,SC_HIDING,100,skilllv,skill_get_time(skillid,skilllv));
@@ -3194,18 +3230,13 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
BF_WEAPON,src,src,skillid,skilllv,tick,flag,BCT_ENEMY); // varargs
break;
//Not implemented yet [Vicious]
-
- //case NJ_SYURIKEN:
- //case NJ_KUNAI:
- //case NJ_HUUMA:
//case NJ_KASUMIKIRI:
//case NJ_KIRIKAGE:
- //case NJ_KOUENKA:
- //case NJ_HYOUSENSOU:
- //case NJ_HUUJIN:
- //case NJ_KAMAITACHI:
case NJ_ISSEN:
- skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+
+ if (sc && sc->data[SC_NEN].timer != -1)
+ status_change_end(src,SC_NEN,-1);
break;
case 0:
@@ -3683,6 +3714,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
sd && sd != dstsd)
clif_displaymessage(sd->fd,"You broke target's weapon");
}
+ clif_skill_nodamage(src,bl,skillid,skilllv,i);
break;
case PR_ASPERSIO: /* γ‚’γ‚Ήγƒšγƒ«γ‚·γ‚ͺ */
@@ -6095,6 +6127,7 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
case DC_SERVICEFORYOU:
case GS_DESPERADO:
case NJ_SUITON:
+ case NJ_BAKUENRYU:
case NJ_KAENSIN:
case NJ_HYOUSYOURAKU:
case NJ_RAIGEKISAI:
@@ -6566,6 +6599,37 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
&& (src->type&battle_config.vs_traps_bctall))
target = BCT_ALL;
break;
+ case NJ_SUITON:
+ val1 = skilllv*2;
+
+ {
+ // don't call skill_clear_group(src,1), it deletes also kaensin... and I think it doesn't have to
+ // so this is a copy paste of skill_clear_group() function, which only deletes suiton (shoud maybe create a new function)
+ struct unit_data *ud = unit_bl2ud(src);
+ struct skill_unit_group *group[MAX_SKILLUNITGROUP];
+ int i, count=0, tflag=1;
+
+ nullpo_retr(0, src);
+ if (!ud) break;
+
+ for (i=0;i<MAX_SKILLUNITGROUP && ud->skillunit[i];i++)
+ {
+ switch (ud->skillunit[i]->skill_id) {
+ case NJ_SUITON:
+ if (tflag&1)
+ group[count++]= ud->skillunit[i];
+ break;
+ default:
+ if (tflag&2 && skill_get_inf2(ud->skillunit[i]->skill_id)&INF2_TRAP)
+ group[count++]= ud->skillunit[i];
+ break;
+ }
+
+ }
+ for (i=0;i<count;i++)
+ skill_delunitgroup(src, group[i]);
+ }
+ break;
case HT_SHOCKWAVE: /* γ‚·γƒ§γƒƒγ‚―γ‚¦γ‚§γƒΌγƒ–γƒˆγƒ©γƒƒγƒ— */
val1=skilllv*15+10;
case HT_SANDMAN: /* γ‚΅γƒ³γƒ‰γƒžγƒ³ */
@@ -6705,8 +6769,35 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
if (sd) val1 = sd->status.child;
break;
case NJ_KAENSIN:
- val2 = (skilllv+1)/2 + 4;
- skill_clear_group(src,1);
+ {
+ // don't call skill_clear_group(src,1), it deletes also suiton... and I think it doesn't have to
+ // so this is a copy paste of skill_clear_group() function, which only deletes kaesin (shoud maybe create a new function)
+ struct unit_data *ud = unit_bl2ud(src);
+ struct skill_unit_group *group[MAX_SKILLUNITGROUP];
+ int i, count=0, tflag=1;
+
+ val2 = (skilllv+1)/2 + 4;
+
+ nullpo_retr(0, src);
+ if (!ud) break;
+
+ for (i=0;i<MAX_SKILLUNITGROUP && ud->skillunit[i];i++)
+ {
+ switch (ud->skillunit[i]->skill_id) {
+ case NJ_KAENSIN:
+ if (tflag&1)
+ group[count++]= ud->skillunit[i];
+ break;
+ default:
+ if (tflag&2 && skill_get_inf2(ud->skillunit[i]->skill_id)&INF2_TRAP)
+ group[count++]= ud->skillunit[i];
+ break;
+ }
+
+ }
+ for (i=0;i<count;i++)
+ skill_delunitgroup(src, group[i]);
+ }
break;
case GS_GROUNDDRIFT:
@@ -7411,6 +7502,7 @@ static int skill_unit_onleft (int skill_id, struct block_list *bl, unsigned int
switch (skill_id)
{
case WZ_QUAGMIRE:
+ case NJ_SUITON:
if (bl->type==BL_MOB)
break;
if (sc && sc->data[type].timer != -1)
@@ -8296,8 +8388,9 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
break;
case NJ_ISSEN:
- if (sc && sc->data[SC_NEN].timer!=-1)
- return 0;
+ if (!sc || sc->data[SC_NEN].timer==-1) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0; }
break;
case NJ_ZENYNAGE:
diff --git a/src/map/status.c b/src/map/status.c
index 06e652950..ebb9d151e 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -358,6 +358,8 @@ void initChangeTables(void) {
add_sc(SA_ELEMENTFIRE, SC_ELEMENTALCHANGE);
add_sc(SA_ELEMENTGROUND, SC_ELEMENTALCHANGE);
add_sc(SA_ELEMENTWIND, SC_ELEMENTALCHANGE);
+ add_sc(NJ_HYOUSYOURAKU, SC_FREEZE);
+ set_sc(NJ_NEN, SC_NEN, SI_NEN, SCB_STR|SCB_INT);
//Until they're at right position - gs_set_sc- [Vicious] / some of these don't seem to have a status icon adequate [blackhole89]
set_sc(GS_MADNESSCANCEL, SC_MADNESSCANCEL, SI_MADNESSCANCEL, SCB_BATK|SCB_ASPD);
@@ -369,9 +371,7 @@ void initChangeTables(void) {
//Uncomment and update when you plan on implementing.
// set_sc(NJ_UTSUSEMI, SC_UTSUSEMI, SI_MAEMI);
-// set_sc(NJ_KAENSIN, SC_KAENSIN, SI_BLANK);
- set_sc(NJ_SUITON, SC_SUITON, SI_BLANK, SCB_AGI);
- set_sc(NJ_NEN, SC_NEN, SI_NEN, SCB_STR|SCB_INT);
+ set_sc(NJ_SUITON, SC_SUITON, SI_BLANK, SCB_AGI|SCB_SPEED);
set_sc(HLIF_AVOID, SC_AVOID, SI_BLANK, SCB_SPEED);
set_sc(HLIF_CHANGE, SC_CHANGE, SI_BLANK, SCB_INT);
set_sc(HAMI_BLOODLUST, SC_BLOODLUST, SI_BLANK, SCB_BATK|SCB_WATK);
@@ -2969,7 +2969,7 @@ static unsigned short status_calc_agi(struct block_list *bl, struct status_chang
agi -= 2 + sc->data[SC_DECREASEAGI].val1;
if(sc->data[SC_QUAGMIRE].timer!=-1)
agi -= sc->data[SC_QUAGMIRE].val2;
- if(sc->data[SC_SUITON].timer!=-1)
+ if(sc->data[SC_SUITON].timer!=-1 && sc->data[SC_SUITON].val4)
agi -= sc->data[SC_SUITON].val2;
if(sc->data[SC_MARIONETTE].timer!=-1)
agi -= (sc->data[SC_MARIONETTE].val3>>8)&0xFF;
@@ -3311,7 +3311,7 @@ static signed char status_calc_def(struct block_list *bl, struct status_change *
if(sc->data[SC_KEEPING].timer!=-1)
return 100;
if(sc->data[SC_SKA].timer != -1)
- return sc->data[SC_SKA].val3;
+ return rand()%100; //Reports indicate SKA actually randomizes defense.
if (sc->data[SC_DEFENCE].timer != -1) //[orn]
def += sc->data[SC_DEFENCE].val2 ;
if(sc->data[SC_STEELBODY].timer!=-1)
@@ -3453,6 +3453,8 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
speed = speed * 100/75;
if(sc->data[SC_QUAGMIRE].timer!=-1)
speed = speed * 100/50;
+ if(sc->data[SC_SUITON].timer!=-1 && sc->data[SC_SUITON].val4)
+ speed = speed * 100/50;
if(sc->data[SC_DONTFORGETME].timer!=-1)
speed = speed * 100/sc->data[SC_DONTFORGETME].val3;
if(sc->data[SC_DEFENDER].timer!=-1)
@@ -4126,6 +4128,7 @@ int status_get_sc_def(struct block_list *bl, int type)
case SC_HALLUCINATION:
case SC_STONE:
case SC_QUAGMIRE:
+ case SC_SUITON:
return 10000;
}
@@ -4462,6 +4465,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_ROKISWEIL:
case SC_COMA:
case SC_GRAVITATION:
+ case SC_SUITON:
return 0;
}
}
@@ -4760,26 +4764,29 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
val2 = 0;
break;
case SC_SUITON:
- if (status_get_class(bl) != JOB_NINJA) {
- //Is there some kind of formula behind this?
- switch ((val1+1)/3) {
- case 3:
- val2 = 8;
- break;
- case 2:
- val2 = 5;
- break;
- case 1:
- val2 = 3;
- break;
- case 0:
- val2 = 0;
- break;
- default:
- val2 = 3*((val1+1)/3);
- break;
- }
- } else val2 = 0;
+ if (status_get_class(bl) != JOB_NINJA) {
+ if ( bl->type == BL_PC && !map[sd->bl.m].flag.pvp && !map_flag_gvg(sd->bl.m) ) val4=0;
+ else val4=1;
+
+ switch ((val1+1)/3) {
+ case 3:
+ val2 = 8;
+ break;
+ case 2:
+ val2 = 5;
+ break;
+ case 1:
+ val2 = 3;
+ break;
+ case 0:
+ val2 = 0;
+ break;
+ default:
+ val2 = 3*((val1+1)/3);
+ break;
+
+ }
+ } else val2 = 0;
break;
case SC_ONEHAND:
case SC_TWOHANDQUICKEN:
@@ -5379,11 +5386,6 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
val2 = 20*val1; //matk increase.
val3 = 12*val1; //mdef2 reduction.
break;
- case SC_SKA:
- val2 = tick/1000;
- val3 = rand()%100; //Def changes randomly every second...
- tick = 1000;
- break;
case SC_JAILED:
tick = val1>0?1000:250;
break;
@@ -5476,6 +5478,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_MAXOVERTHRUST:
case SC_OVERTHRUST:
case SC_SWOO: //Why does it shares the same opt as Overthrust? Perhaps we'll never know...
+ case SC_NEN:
sc->opt3 |= 2;
opt_flag = 0;
break;
@@ -5986,6 +5989,7 @@ int status_change_end( struct block_list* bl , int type,int tid )
case SC_OVERTHRUST:
case SC_MAXOVERTHRUST:
case SC_SWOO:
+ case SC_NEN:
sc->opt3 &= ~2;
opt_flag = 0;
break;
@@ -6074,8 +6078,10 @@ int kaahi_heal_timer(int tid, unsigned int tick, int id, int data)
hp = status->max_hp - status->hp;
if (hp > sc->data[data].val2)
hp = sc->data[data].val2;
- if (hp)
- status_heal(bl, hp, 0, 2);
+ if (hp) {
+ status_heal(bl, hp, 0, 0);
+ clif_skill_nodamage(NULL,bl,AL_HEAL,hp,1);
+ }
sc->data[data].val4=-1;
return 1;
}
@@ -6145,15 +6151,6 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
return 0;
break;
- case SC_SKA:
- if((--sc->data[type].val2)>0){
- sc->data[type].val3 = rand()%100; //Random defense.
- sc->data[type].timer=add_timer(
- 1000+tick, status_change_timer,
- bl->id, data);
- return 0;
- }
-
case SC_HIDING:
if((--sc->data[type].val2)>0){