Browse Source

- Added NK value 3: No damage + area of effect skill (NK_SPLASH_NO_DAMAGE)
- Removed the double-cast specific code and made it use skill_addtimerskill instead.
- Modified party_foreachsamemap so that it returns to addition of the return value of the functions invoked. Type has been changed for "range", when 0, it scans all party members in the map.
- Updated most skill/battle code to use map_foreachinrange rather than map_foreachinarea.
- map_foreachinrange does not performs an exact range check anymore. However the relevant code is commented and anyone can enable it.
- Updated most skills to use skill_get_splash instead of hardcoded ranges.
- Added function skill_get_casttype which returns the type of function that should be invoked for that skill: skill_castend_pos, skill_castend_nodamage_id or skill_castend_damage_id.
- self skills are sent to skill_castend_nodamage_id regardless of nk (nk should signal if the skill causes damage above everything, it is used on autospell/effects).
- Due to the previous change, self skills where the target and src are different, and don't have an nk of no damage, they are sent to castend_damage_id (assumed target auto-selected skills)
- Applied the relevant updates to db/skill_db.txt, db/skill_unit_db also got updated, as trap ranges should all be 1, the splash damage range is defined now in skill_db
- Cleaned up the implementation of the code related to Gangster's paradise and TK_HP/SPtime


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5313 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 19 years ago
parent
commit
994d991fc9
15 changed files with 426 additions and 517 deletions
  1. 15 0
      Changelog-Trunk.txt
  2. 5 0
      db/Changelog.txt
  3. 70 69
      db/skill_db.txt
  4. 2 2
      db/skill_unit_db.txt
  5. 19 35
      src/map/battle.c
  6. 7 5
      src/map/map.c
  7. 1 1
      src/map/map.h
  8. 32 50
      src/map/mob.c
  9. 12 13
      src/map/party.c
  10. 1 1
      src/map/party.h
  11. 2 3
      src/map/pc.c
  12. 13 21
      src/map/pet.c
  13. 227 306
      src/map/skill.c
  14. 10 5
      src/map/skill.h
  15. 10 6
      src/map/status.c

+ 15 - 0
Changelog-Trunk.txt

@@ -5,6 +5,21 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EV
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 
 
 2006/02/17
 2006/02/17
+	* Massive update on the way splash/area (non-ground) skills work. [Skotlex]
+	- the new column 'splash' in skill_db is now used to determine the area of
+	  effect of all related skills (eg: splash range of fireball, area of effect
+	  of angelus, the splash damage area of mines, etc)
+	- nk definition update. &1 is no damage skills, &2 is for splash skills. A
+	  skill can be tagged 3 to indicate it is both. This is used to indicate the
+	  type of handling the skill should use, but it also helps as all splash
+	  skills get an extra check to prevent them from hitting 'unhittable'
+	  characters (ie: hidden) while all skills not tagged as non-damage can
+	  trigger auto-spells.
+	- All self skills are automatically executed as no-damage skills and get
+	  re-routed as damage skills when the source and target do not coincide (this
+	  handles all combo skills)
+	- Some skills may have screwed up (I fixed/moved all which I could find
+	  needed updating). As usual, report any issues.
 	* Added an upgrade_svn file that should fix the party table by making the
 	* Added an upgrade_svn file that should fix the party table by making the
 	  party_id auto-incremental. Apply this or new parties will always fail!
 	  party_id auto-incremental. Apply this or new parties will always fail!
 	  [Skotlex]
 	  [Skotlex]

+ 5 - 0
db/Changelog.txt

@@ -29,6 +29,11 @@
 
 
 =========================
 =========================
 
 
+20/17
+	- Updated skill_unit_db to use range 1 for all mines. The actual splash
+	range is now taken from skill_db. [Skotlex]
+	- Updated some skills who's NK should now be 3. Updated some splash ranges.
+	  [Skotlex]
 20/16
 20/16
 	* Added a new column in the skill_db to specify the
 	* Added a new column in the skill_db to specify the
 	  splash-range/area-of-effect of skills. [Skotlex]
 	  splash-range/area-of-effect of skills. [Skotlex]

+ 70 - 69
db/skill_db.txt

@@ -4,15 +4,16 @@
 // 03 hit (8- repeated hitting, 6- single-hit)
 // 03 hit (8- repeated hitting, 6- single-hit)
 // 04 inf (0- passive, 1- enemy, 2- place, 4- self, 16- friend, 32- trap)
 // 04 inf (0- passive, 1- enemy, 2- place, 4- self, 16- friend, 32- trap)
 // 05 pl attributes (0- nothing, 1- water, 2- earth, 3- fire, 4- wind, 5- poison, 6- saint, 7- darkness, 8- sense, 9- immortality)
 // 05 pl attributes (0- nothing, 1- water, 2- earth, 3- fire, 4- wind, 5- poison, 6- saint, 7- darkness, 8- sense, 9- immortality)
-// 06 nk (0- normal skill, 1-no damage skill, 2-splash damage skill)
+// 06 nk (0- normal skill, 1-no damage skill, 2-splash damage skill, 3-no damage area skill)
 // 07 splash/effect range (-1 for screen-wide)
 // 07 splash/effect range (-1 for screen-wide)
 // 08 MaxLv
 // 08 MaxLv
 // 09 Hit frequency (number of hits skill does)
 // 09 Hit frequency (number of hits skill does)
 // 10 castcancelled (it is cancelled at 1. Are not cancelled with 0)
 // 10 castcancelled (it is cancelled at 1. Are not cancelled with 0)
 // 11 defense-reduction rate during cast.
 // 11 defense-reduction rate during cast.
-// 12 inf2 (skill information 2) (1- quest skill,  2- npc skill, 4- wedding skill, 8- spirit skill,
-//    16- guild skill, 32- song/dance, 64- ensemble skill, 128- trap (can be targetted),
-//    256- skill that damages/targets yourself, 512- skill that cannot be casted on self,
+// 12 inf2 (skill information 2) (1- quest skill,  2- npc skill, 4- wedding skill
+//    8- spirit skill, 16- guild skill, 32- song/dance, 64- ensemble skill
+//    128- trap (can be targetted), 256- skill that damages/targets yourself
+//    512- skill that cannot be casted on self
 //    1024- usable only on party-members, 2048- usable only on guild-mates)
 //    1024- usable only on party-members, 2048- usable only on guild-mates)
 // 13 maxcount: max amount of skill instances to place on the ground when
 // 13 maxcount: max amount of skill instances to place on the ground when
 //    player_land_skill_limit/monster_land_skill_limit is enabled.
 //    player_land_skill_limit/monster_land_skill_limit is enabled.
@@ -27,21 +28,21 @@
 7,0,6,4,3,2,2,10,1,no,0,0,0,weapon,2	//SM_MAGNUM#Magnum Break#
 7,0,6,4,3,2,2,10,1,no,0,0,0,weapon,2	//SM_MAGNUM#Magnum Break#
 8,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//SM_ENDURE#Endure#
 8,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//SM_ENDURE#Endure#
 9,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//MG_SRECOVERY#Increase SP Recovery#
 9,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//MG_SRECOVERY#Increase SP Recovery#
-10,3,6,4,3,1,0,1,1,yes,0,0,0,magic,0	//MG_SIGHT#Sight#
+10,0,6,4,3,3,3,1,1,yes,0,0,0,magic,0	//MG_SIGHT#Sight#
 11,9,6,1,8,0,1,10,1,yes,0,0,0,magic,0	//MG_NAPALMBEAT#Napalm Beat#
 11,9,6,1,8,0,1,10,1,yes,0,0,0,magic,0	//MG_NAPALMBEAT#Napalm Beat#
-12,9,8,2,8,0,0,10,1,yes,0,0,0,magic,0	//MG_SAFETYWALL#Safety Wall#
+12,9,8,2,8,1,0,10,1,yes,0,0,0,magic,0	//MG_SAFETYWALL#Safety Wall#
 13,9,8,1,8,0,0,10,1:1:2:2:3:3:4:4:5:5,yes,0,0,0,magic,0	//MG_SOULSTRIKE#Soul Strike#
 13,9,8,1,8,0,0,10,1:1:2:2:3:3:4:4:5:5,yes,0,0,0,magic,0	//MG_SOULSTRIKE#Soul Strike#
 14,9,8,1,1,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0	//MG_COLDBOLT#Cold Bolt#
 14,9,8,1,1,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0	//MG_COLDBOLT#Cold Bolt#
 15,9,6,1,1,0,0,10,1,yes,0,0,0,magic,0	//MG_FROSTDIVER#Frost Diver#
 15,9,6,1,1,0,0,10,1,yes,0,0,0,magic,0	//MG_FROSTDIVER#Frost Diver#
 16,2,6,1,2,1,0,10,1,yes,0,0,0,magic,0	//MG_STONECURSE#Stone Curse#
 16,2,6,1,2,1,0,10,1,yes,0,0,0,magic,0	//MG_STONECURSE#Stone Curse#
-17,9,6,1,3,0,2,10,1,yes,0,0,0,magic,0	//MG_FIREBALL#Fire Ball#
+17,9,6,1,3,2,2,10,1,yes,0,0,0,magic,0	//MG_FIREBALL#Fire Ball#
 18,9,6,2,3,0,0,10,1,yes,0,0,3,magic,2	//MG_FIREWALL#Fire Wall#
 18,9,6,2,3,0,0,10,1,yes,0,0,3,magic,2	//MG_FIREWALL#Fire Wall#
 19,9,8,1,3,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0	//MG_FIREBOLT#Fire Bolt#
 19,9,8,1,3,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0	//MG_FIREBOLT#Fire Bolt#
 20,9,8,1,4,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0	//MG_LIGHTNINGBOLT#Lightning Bolt#
 20,9,8,1,4,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0	//MG_LIGHTNINGBOLT#Lightning Bolt#
 21,9,8,2,4,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0	//MG_THUNDERSTORM#Thunderstorm#
 21,9,8,2,4,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0	//MG_THUNDERSTORM#Thunderstorm#
 22,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//AL_DP#Divine protection#
 22,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//AL_DP#Divine protection#
 23,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//AL_DEMONBANE#Divine Protection#
 23,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//AL_DEMONBANE#Divine Protection#
-24,0,6,4,6,1,2,1,1,yes,0,0,0,magic,0	//AL_RUWACH#Ruwach#
+24,0,6,4,6,3,2,1,1,yes,0,0,0,magic,0	//AL_RUWACH#Ruwach#
 25,9,6,2,0,1,0,1,1,yes,0,0,0,magic,0	//AL_PNEUMA#Pneuma#
 25,9,6,2,0,1,0,1,1,yes,0,0,0,magic,0	//AL_PNEUMA#Pneuma#
 26,0,6,4,0,1,0,2,1,yes,0,0,0,magic,0	//AL_TELEPORT#Teleport#
 26,0,6,4,0,1,0,2,1,yes,0,0,0,magic,0	//AL_TELEPORT#Teleport#
 27,9,6,2,0,1,0,4,1,yes,0,0,3,magic,0	//AL_WARP#Warp Portal#
 27,9,6,2,0,1,0,4,1,yes,0,0,3,magic,0	//AL_WARP#Warp Portal#
@@ -49,8 +50,8 @@
 29,9,6,16,0,1,0,10,1,yes,0,0,0,magic,0	//AL_INCAGI#Increase AGI#
 29,9,6,16,0,1,0,10,1,yes,0,0,0,magic,0	//AL_INCAGI#Increase AGI#
 30,9,6,1,0,1,0,10,1,yes,0,0,0,magic,0		//AL_DECAGI#Decrease AGI#
 30,9,6,1,0,1,0,10,1,yes,0,0,0,magic,0		//AL_DECAGI#Decrease AGI#
 31,0,6,4,0,1,0,1,1,yes,0,0,0,magic,0	//AL_HOLYWATER#Aqua Benedicta#
 31,0,6,4,0,1,0,1,1,yes,0,0,0,magic,0	//AL_HOLYWATER#Aqua Benedicta#
-32,0,6,4,0,1,15,10,1,yes,0,0,0,magic,0	//AL_CRUCIS#Signum Crusis#
-33,0,6,4,0,1,-1,10,1,yes,0,0,0,magic,0	//AL_ANGELUS#Angelus#
+32,0,6,4,0,3,15,10,1,yes,0,0,0,magic,0	//AL_CRUCIS#Signum Crusis#
+33,0,6,4,0,3,-1,10,1,yes,0,0,0,magic,0	//AL_ANGELUS#Angelus#
 34,9,6,16,0,1,0,10,1,yes,0,0,0,magic,0	//AL_BLESSING#Blessing#
 34,9,6,16,0,1,0,10,1,yes,0,0,0,magic,0	//AL_BLESSING#Blessing#
 35,9,6,16,0,1,0,1,1,yes,0,0,0,magic,0	//AL_CURE#Cure#
 35,9,6,16,0,1,0,1,1,yes,0,0,0,magic,0	//AL_CURE#Cure#
 36,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//MC_INCCARRY#Enlarge Weight Limit#
 36,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//MC_INCCARRY#Enlarge Weight Limit#
@@ -62,7 +63,7 @@
 42,-1,6,1,-1,0,0,10,1,no,0,0,0,weapon,0	//MC_MAMMONITE#Mammonite#
 42,-1,6,1,-1,0,0,10,1,no,0,0,0,weapon,0	//MC_MAMMONITE#Mammonite#
 43,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//AC_OWL#Owl's Eye#
 43,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//AC_OWL#Owl's Eye#
 44,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//AC_VULTURE#Vulture's Eye#
 44,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//AC_VULTURE#Vulture's Eye#
-45,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//AC_CONCENTRATION#Improve Concentration#
+45,0,6,4,0,3,1,10,1,no,0,0,0,weapon,0	//AC_CONCENTRATION#Improve Concentration#
 46,-9,8,1,-1,0,0,10,2,no,0,0,0,weapon,0	//AC_DOUBLE#Double Strafe#
 46,-9,8,1,-1,0,0,10,2,no,0,0,0,weapon,0	//AC_DOUBLE#Double Strafe#
 47,-9,6,2,-1,2,2,10,1,no,0,0,0,weapon,2	//AC_SHOWER#Arrow Shower#
 47,-9,6,2,-1,2,2,10,1,no,0,0,0,weapon,2	//AC_SHOWER#Arrow Shower#
 48,-1,8,0,-1,0,0,10,2,no,0,0,0,weapon,0	//TF_DOUBLE#Double Attack#
 48,-1,8,0,-1,0,0,10,2,no,0,0,0,weapon,0	//TF_DOUBLE#Double Attack#
@@ -78,7 +79,7 @@
 58,-4,6,1,-1,2,0,10,1,no,0,0,0,weapon,6	//KN_SPEARSTAB#Spear Stab#
 58,-4,6,1,-1,2,0,10,1,no,0,0,0,weapon,6	//KN_SPEARSTAB#Spear Stab#
 59,3:5:7:9:11,6,1,-1,0,0,5,1,no,0,0,0,weapon,0	//KN_SPEARBOOMERANG#Spear Boomerang#
 59,3:5:7:9:11,6,1,-1,0,0,5,1,no,0,0,0,weapon,0	//KN_SPEARBOOMERANG#Spear Boomerang#
 60,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//KN_TWOHANDQUICKEN#Twohand Quicken#
 60,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//KN_TWOHANDQUICKEN#Twohand Quicken#
-61,0,6,4,-1,1,0,5,1,no,0,0,0,weapon,0	//KN_AUTOCOUNTER#Counter Attack#
+61,0,6,4,-1,0,0,5,1,no,0,0,0,weapon,0	//KN_AUTOCOUNTER#Counter Attack#
 62,-2,6,1,-1,2,1,10,1,no,33,0,0,weapon,1:1:2:2:3:3:4:4:5:5 //KN_BOWLINGBASH#Bowling Bash#
 62,-2,6,1,-1,2,1,10,1,no,33,0,0,weapon,1:1:2:2:3:3:4:4:5:5 //KN_BOWLINGBASH#Bowling Bash#
 63,0,0,0,0,0,0,1,0,no,0,0,0,weapon,0	//KN_RIDING#Peco Peco Riding#
 63,0,0,0,0,0,0,1,0,no,0,0,0,weapon,0	//KN_RIDING#Peco Peco Riding#
 64,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0	//KN_CAVALIERMASTERY#Cavalier Mastery#
 64,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0	//KN_CAVALIERMASTERY#Cavalier Mastery#
@@ -86,26 +87,26 @@
 66,9,6,16,0,1,0,5,1,yes,0,0,0,magic,0	//PR_IMPOSITIO#Impositio Manus#	
 66,9,6,16,0,1,0,5,1,yes,0,0,0,magic,0	//PR_IMPOSITIO#Impositio Manus#	
 67,9,6,16,0,1,0,3,1,yes,0,512,0,magic,0	//PR_SUFFRAGIUM#Suffragium#
 67,9,6,16,0,1,0,3,1,yes,0,512,0,magic,0	//PR_SUFFRAGIUM#Suffragium#
 68,9,6,16,6,1,0,5,1,yes,0,0,0,magic,0	//PR_ASPERSIO#Aspersio#
 68,9,6,16,6,1,0,5,1,yes,0,0,0,magic,0	//PR_ASPERSIO#Aspersio#
-69,9,6,2,0,1,1,5,1,yes,0,64,0,magic,0	//PR_BENEDICTIO#B.S Sacramenti#
+69,9,6,2,0,3,1,5,1,yes,0,64,0,magic,0	//PR_BENEDICTIO#B.S Sacramenti#
 70,9,6,2,6,1,0,10,1,yes,0,0,0,magic,2	//PR_SANCTUARY#Sanctuary#
 70,9,6,2,6,1,0,10,1,yes,0,0,0,magic,2	//PR_SANCTUARY#Sanctuary#
 71,9,6,16,0,1,0,4,1,yes,0,0,0,magic,0	//PR_SLOWPOISON#Slow Poison#
 71,9,6,16,0,1,0,4,1,yes,0,0,0,magic,0	//PR_SLOWPOISON#Slow Poison#
 72,9,6,16,0,1,0,1,1,yes,0,0,0,magic,0	//PR_STRECOVERY#Status Recovery#
 72,9,6,16,0,1,0,1,1,yes,0,0,0,magic,0	//PR_STRECOVERY#Status Recovery#
 73,9,6,16,0,1,0,10,1,yes,0,0,0,magic,0	//PR_KYRIE#Kyrie Eleison#
 73,9,6,16,0,1,0,10,1,yes,0,0,0,magic,0	//PR_KYRIE#Kyrie Eleison#
-74,0,6,4,0,1,-1,5,1,yes,0,0,0,magic,0	//PR_MAGNIFICAT#Magnificat#
-75,0,6,4,0,1,-1,5,1,yes,0,0,0,magic,0	//PR_GLORIA#Gloria#
+74,0,6,4,0,3,-1,5,1,yes,0,0,0,magic,0	//PR_MAGNIFICAT#Magnificat#
+75,0,6,4,0,3,-1,5,1,yes,0,0,0,magic,0	//PR_GLORIA#Gloria#
 76,5,6,1,0,1,0,10,0,yes,0,0,0,magic,0	//PR_LEXDIVINA#Lex Divina#
 76,5,6,1,0,1,0,10,0,yes,0,0,0,magic,0	//PR_LEXDIVINA#Lex Divina#
 77,5,6,1,6,0,0,10,1,yes,0,0,0,magic,0	//PR_TURNUNDEAD#Turn Undead#
 77,5,6,1,6,0,0,10,1,yes,0,0,0,magic,0	//PR_TURNUNDEAD#Turn Undead#
 78,9,6,1,0,1,0,1,0,yes,0,0,0,magic,0	//PR_LEXAETERNA#Lex Aeterna#
 78,9,6,1,0,1,0,1,0,yes,0,0,0,magic,0	//PR_LEXAETERNA#Lex Aeterna#
 79,9,8,2,6,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0	//PR_MAGNUS#Magnus Exorcismus#
 79,9,8,2,6,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0	//PR_MAGNUS#Magnus Exorcismus#
-80,9,8,2,3,0,1,10,3:4:5:6:7:8:9:10:11:12,yes,0,128,5,magic,0	//WZ_FIREPILLAR#Fire Pillar#
-81,0,6,4,3,0,0,10,1,yes,0,0,0,magic,5	//WZ_SIGHTRASHER#Sightrasher#
+80,9,8,2,3,0,1:1:1:1:1:2:2:2:2:2,10,3:4:5:6:7:8:9:10:11:12,yes,0,128,5,magic,0	//WZ_FIREPILLAR#Fire Pillar#
+81,0,6,4,3,0,3,10,1,yes,0,0,0,magic,5	//WZ_SIGHTRASHER#Sightrasher#
 //82,9,6,2,3,0,0,10,1,yes,0,0,0,magic,0	//WZ_FIREIVY#Fire Ivy#
 //82,9,6,2,3,0,0,10,1,yes,0,0,0,magic,0	//WZ_FIREIVY#Fire Ivy#
-83,9,8,2,3,0,7,10,1:1:2:2:3:3:4:4:5:5,yes,0,0,0,magic,0	//WZ_METEOR#Meteor Storm#
+83,9,8,2,3,0,7:7:7:7:7:7:7:7:7:7:14,10,1:1:2:2:3:3:4:4:5:5,yes,0,0,0,magic,0	//WZ_METEOR#Meteor Storm#
 84,9,8,1,4,0,0,10,3:4:5:6:7:8:9:10:11:12,yes,0,0,0,magic,2:3:3:4:4:5:5:6:6:7	//WZ_JUPITEL#Jupiter Thunder#
 84,9,8,1,4,0,0,10,3:4:5:6:7:8:9:10:11:12,yes,0,0,0,magic,2:3:3:4:4:5:5:6:6:7	//WZ_JUPITEL#Jupiter Thunder#
 85,9,8,2,4,0,0,10,10,yes,0,0,0,magic,0	//WZ_VERMILION#Lord of Vermilion#
 85,9,8,2,4,0,0,10,10,yes,0,0,0,magic,0	//WZ_VERMILION#Lord of Vermilion#
 86,9,8,1,1,0,0,5,1,yes,0,0,0,magic,0	//WZ_WATERBALL#Water Ball#
 86,9,8,1,1,0,0,5,1,yes,0,0,0,magic,0	//WZ_WATERBALL#Water Ball#
 87,9,6,2,1,0,0,10,1,yes,0,0,0,magic,0	//WZ_ICEWALL#Ice Wall#
 87,9,6,2,1,0,0,10,1,yes,0,0,0,magic,0	//WZ_ICEWALL#Ice Wall#
-88,9,6,4,1,0,5,10,1,yes,0,0,0,magic,0	//WZ_FROSTNOVA#Frost Nova#
+88,9,6,4,1,2,5,10,1,yes,0,0,0,magic,0	//WZ_FROSTNOVA#Frost Nova#
 89,9,6,2,1,0,0,10,1,yes,0,0,0,magic,2	//WZ_STORMGUST#Storm Gust#
 89,9,6,2,1,0,0,10,1,yes,0,0,0,magic,2	//WZ_STORMGUST#Storm Gust#
 90,9,8,1,2,0,0,5,1:2:3:4:5,yes,0,0,0,magic,0	//WZ_EARTHSPIKE#Earth Spike#
 90,9,8,1,2,0,0,5,1:2:3:4:5,yes,0,0,0,magic,0	//WZ_EARTHSPIKE#Earth Spike#
 91,9,8,2,2,0,0,5,1:2:3:4:5,yes,0,0,0,magic,0	//WZ_HEAVENDRIVE#Heaven's Drive#
 91,9,8,2,2,0,0,5,1:2:3:4:5,yes,0,0,0,magic,0	//WZ_HEAVENDRIVE#Heaven's Drive#
@@ -127,36 +128,36 @@
 107,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//BS_WEAPONRESEARCH#Weaponry Research#
 107,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//BS_WEAPONRESEARCH#Weaponry Research#
 108,2,6,16,0,1,0,1,1,yes,0,0,0,weapon,0	//BS_REPAIRWEAPON#Weapon Repair#
 108,2,6,16,0,1,0,1,1,yes,0,0,0,weapon,0	//BS_REPAIRWEAPON#Weapon Repair#
 109,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0	//BS_SKINTEMPER#Skin Tempering#
 109,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0	//BS_SKINTEMPER#Skin Tempering#
-110,1,6,2,0,1,2,5,1,no,0,0,0,weapon,0	//BS_HAMMERFALL#Hammer Fall#
-111,0,6,4,0,1,-1,5,1,no,0,0,0,weapon,0	//BS_ADRENALINE#Adrenaline Rush#
-112,0,6,4,0,1,-1,5,1,no,0,0,0,weapon,0	//BS_WEAPONPERFECT#Weapon Perfection#
-113,0,6,4,0,1,-1,5,1,no,0,0,0,weapon,0	//BS_OVERTHRUST#Power-Thrust#
+110,1,6,2,0,3,2:2:2:2:2:14,5,1,no,0,0,0,weapon,0	//BS_HAMMERFALL#Hammer Fall#
+111,0,6,4,0,3,-1,5,1,no,0,0,0,weapon,0	//BS_ADRENALINE#Adrenaline Rush#
+112,0,6,4,0,3,-1,5,1,no,0,0,0,weapon,0	//BS_WEAPONPERFECT#Weapon Perfection#
+113,0,6,4,0,3,-1,5,1,no,0,0,0,weapon,0	//BS_OVERTHRUST#Power-Thrust#
 114,0,6,4,0,1,0,5,1,no,0,0,0,weapon,0	//BS_MAXIMIZE#Maximize Power#
 114,0,6,4,0,1,0,5,1,no,0,0,0,weapon,0	//BS_MAXIMIZE#Maximize Power#
 115,3,6,2,0,1,0,5,1,no,0,128,0,misc,6:7:8:9:10	//HT_SKIDTRAP#Skid Trap#
 115,3,6,2,0,1,0,5,1,no,0,128,0,misc,6:7:8:9:10	//HT_SKIDTRAP#Skid Trap#
-116,3,6,2,2,1,0,5,1,no,0,128,0,misc,0	//HT_LANDMINE#Land Mine#
+116,3,6,2,2,0,0,5,1,no,0,128,0,misc,0	//HT_LANDMINE#Land Mine#
 117,3,6,2,0,1,0,5,1,no,0,128,0,misc,0	//HT_ANKLESNARE#Ankle Snare#
 117,3,6,2,0,1,0,5,1,no,0,128,0,misc,0	//HT_ANKLESNARE#Ankle Snare#
-118,3,6,2,0,1,1,5,1,no,0,128,0,misc,0	//HT_SHOCKWAVE#Shockwave Trap#
-119,3,6,2,0,1,2,5,1,no,0,128,0,misc,0	//HT_SANDMAN#Sandman#
-120,3,6,2,0,1,1,5,1,no,0,128,0,misc,0	//HT_FLASHER#Flasher#
-121,3,6,2,1,1,1,5,1,no,0,128,0,misc,0	//HT_FREEZINGTRAP#Freezing Trap#
-122,3,6,2,3,1,1,5,1,no,0,128,0,misc,0	//HT_BLASTMINE#Blast Mine#
-123,3,6,2,2,1,2,5,1,no,0,128,0,misc,0	//HT_CLAYMORETRAP#Claymore Trap#
+118,3,6,2,0,2,1,5,1,no,0,128,0,misc,0	//HT_SHOCKWAVE#Shockwave Trap#
+119,3,6,2,0,3,2,5,1,no,0,128,0,misc,0	//HT_SANDMAN#Sandman#
+120,3,6,2,0,3,1,5,1,no,0,128,0,misc,0	//HT_FLASHER#Flasher#
+121,3,6,2,1,2,1,5,1,no,0,128,0,misc,0	//HT_FREEZINGTRAP#Freezing Trap#
+122,3,6,2,3,2,1,5,1,no,0,128,0,misc,0	//HT_BLASTMINE#Blast Mine#
+123,3,6,2,2,2,2,5,1,no,0,128,0,misc,0	//HT_CLAYMORETRAP#Claymore Trap#
 124,2,6,32,0,1,0,1,1,no,0,0,0,misc,0	//HT_REMOVETRAP#Remove Trap#
 124,2,6,32,0,1,0,1,1,no,0,0,0,misc,0	//HT_REMOVETRAP#Remove Trap#
 125,3,6,2,0,1,0,1,1,no,0,0,0,misc,0	//HT_TALKIEBOX#Talkie Box#
 125,3,6,2,0,1,0,1,1,no,0,0,0,misc,0	//HT_TALKIEBOX#Talkie Box#
 126,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//HT_BEASTBANE#Beast Bane#
 126,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//HT_BEASTBANE#Beast Bane#
 127,0,0,0,0,0,0,1,0,no,0,0,0,misc,0	//HT_FALCON#Falconry Mastery#
 127,0,0,0,0,0,0,1,0,no,0,0,0,misc,0	//HT_FALCON#Falconry Mastery#
 128,0,0,0,0,0,0,10,0,no,0,0,0,misc,0	//HT_STEELCROW#Steel Crow#
 128,0,0,0,0,0,0,10,0,no,0,0,0,misc,0	//HT_STEELCROW#Steel Crow#
 129,5,8,1,0,2,1,5,1:2:3:4:5,yes,0,0,0,misc,0	//HT_BLITZBEAT#Blitz Beat#
 129,5,8,1,0,2,1,5,1:2:3:4:5,yes,0,0,0,misc,0	//HT_BLITZBEAT#Blitz Beat#
-130,3:5:7:9,6,2,0,1,3,4,1,no,0,0,0,misc,0	//HT_DETECTING#Detect#
+130,3:5:7:9,6,2,0,3,3,4,1,no,0,0,0,misc,0	//HT_DETECTING#Detect#
 131,4:5:6:7:8,6,32,0,1,0,5,1,no,0,0,0,misc,0	//HT_SPRINGTRAP#Spring Trap#
 131,4:5:6:7:8,6,32,0,1,0,5,1,no,0,0,0,misc,0	//HT_SPRINGTRAP#Spring Trap#
 132,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0	//AS_RIGHT#Righthand Mastery#
 132,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0	//AS_RIGHT#Righthand Mastery#
 133,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0	//AS_LEFT#Lefthand Mastery#
 133,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0	//AS_LEFT#Lefthand Mastery#
 134,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//AS_KATAR#Katar Mastery#
 134,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//AS_KATAR#Katar Mastery#
 135,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//AS_CLOAKING#Cloaking#
 135,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//AS_CLOAKING#Cloaking#
 136,-1,8,1,-1,0,0,10,8,no,0,0,0,weapon,0	//AS_SONICBLOW#Sonic Blow#
 136,-1,8,1,-1,0,0,10,8,no,0,0,0,weapon,0	//AS_SONICBLOW#Sonic Blow#
-137,3:4:5:6:7,6,1,-1,0,1,5,1,no,0,0,0,weapon,0	//AS_GRIMTOOTH#Grimtooth#
+137,3:4:5:6:7,6,1,-1,2,1,5,1,no,0,0,0,weapon,0	//AS_GRIMTOOTH#Grimtooth#
 138,1,6,16,5,1,0,10,1,no,0,1024,0,weapon,0	//AS_ENCHANTPOISON#Enchant Poison#
 138,1,6,16,5,1,0,10,1,no,0,1024,0,weapon,0	//AS_ENCHANTPOISON#Enchant Poison#
-139,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//AS_POISONREACT#Poison React#
+139,0,6,4,0,0,0,10,1,no,0,0,0,weapon,0	//AS_POISONREACT#Poison React#
 140,2,6,2,5,1,0,10,1,no,0,0,0,weapon,0	//AS_VENOMDUST#Venom Dust#
 140,2,6,2,5,1,0,10,1,no,0,0,0,weapon,0	//AS_VENOMDUST#Venom Dust#
 141,1,6,1,-1,1,2,10,1,yes,0,0,0,weapon,0	//AS_SPLASHER#Venom Splasher#
 141,1,6,1,-1,1,2,10,1,yes,0,0,0,weapon,0	//AS_SPLASHER#Venom Splasher#
 142,0,6,4,0,1,0,1,1,no,0,1,0,none,0	//NV_FIRSTAID#First Aid#
 142,0,6,4,0,1,0,1,1,no,0,1,0,none,0	//NV_FIRSTAID#First Aid#
@@ -190,8 +191,8 @@
 170,-1,6,1,-1,0,0,10,1,no,0,2,0,weapon,0	//NPC_CRITICALSLASH#Defense disregard attack#
 170,-1,6,1,-1,0,0,10,1,no,0,2,0,weapon,0	//NPC_CRITICALSLASH#Defense disregard attack#
 171,-1,8,1,-1,0,0,10,2:3:4:5:6:7:8:9:10:11,no,0,2,0,weapon,0	//NPC_COMBOATTACK#Multi-stage Attack#
 171,-1,8,1,-1,0,0,10,2:3:4:5:6:7:8:9:10:11,no,0,2,0,weapon,0	//NPC_COMBOATTACK#Multi-stage Attack#
 172,-1,6,1,-1,0,0,10,1,no,0,2,0,weapon,0	//NPC_GUIDEATTACK#On-target Impact Attack#
 172,-1,6,1,-1,0,0,10,1,no,0,2,0,weapon,0	//NPC_GUIDEATTACK#On-target Impact Attack#
-173,1,6,4,3,0,0,10,1,no,0,2,0,misc,3	//NPC_SELFDESTRUCTION#Suicide bombing#
-174,-1,6,1,-1,0,3,10,1,no,0,2,0,weapon,0	//NPC_SPLASHATTACK#Range attack#
+173,1,6,4,3,2,5,10,1,no,0,2,0,misc,3	//NPC_SELFDESTRUCTION#Suicide bombing#
+174,-1,6,1,-1,2,3,10,1,no,0,2,0,weapon,0	//NPC_SPLASHATTACK#Range attack#
 175,0,0,4,0,1,0,10,1,no,0,2,0,misc,0	//NPC_SUICIDE#Suicide#
 175,0,0,4,0,1,0,10,1,no,0,2,0,misc,0	//NPC_SUICIDE#Suicide#
 176,-1,6,1,-1,0,0,10,1,no,0,2,0,weapon,0	//NPC_POISON#Poison Attack#
 176,-1,6,1,-1,0,0,10,1,no,0,2,0,weapon,0	//NPC_POISON#Poison Attack#
 177,7,6,1,-1,0,0,10,1,no,0,2,0,weapon,0	//NPC_BLINDATTACK#Darkness Attack#
 177,7,6,1,-1,0,0,10,1,no,0,2,0,weapon,0	//NPC_BLINDATTACK#Darkness Attack#
@@ -231,7 +232,7 @@
 211,1,6,1,0,1,0,10,1,no,0,0,0,weapon,0	//RG_STEALCOIN#Mug#
 211,1,6,1,0,1,0,10,1,no,0,0,0,weapon,0	//RG_STEALCOIN#Mug#
 212,-1,6,1,-1,0,0,10,1,no,0,0,0,weapon,0	//RG_BACKSTAP#Back Stab#
 212,-1,6,1,-1,0,0,10,1,no,0,0,0,weapon,0	//RG_BACKSTAP#Back Stab#
 213,0,0,0,0,0,0,5,0,no,0,0,0,none,0	//RG_TUNNELDRIVE#Stalk#
 213,0,0,0,0,0,0,5,0,no,0,0,0,none,0	//RG_TUNNELDRIVE#Stalk#
-214,0,6,4,-1,1,1,5,1,no,0,0,0,weapon,0	//RG_RAID#Sightless Raid#
+214,0,6,4,-1,2,1,5,1,no,0,0,0,weapon,0	//RG_RAID#Sightless Raid#
 215,1,6,1,0,1,0,5,1,no,0,0,0,weapon,0	//RG_STRIPWEAPON#Divest Weapon#
 215,1,6,1,0,1,0,5,1,no,0,0,0,weapon,0	//RG_STRIPWEAPON#Divest Weapon#
 216,1,6,1,0,1,0,5,1,no,0,0,0,weapon,0	//RG_STRIPSHIELD#Divest Shield#
 216,1,6,1,0,1,0,5,1,no,0,0,0,weapon,0	//RG_STRIPSHIELD#Divest Shield#
 217,1,6,1,0,1,0,5,1,no,0,0,0,weapon,0	//RG_STRIPARMOR#Divest Armor#
 217,1,6,1,0,1,0,5,1,no,0,0,0,weapon,0	//RG_STRIPARMOR#Divest Armor#
@@ -239,8 +240,8 @@
 219,-1,6,1,-1,0,0,5,1,no,0,0,0,weapon,0	//RG_INTIMIDATE#Snatch#
 219,-1,6,1,-1,0,0,5,1,no,0,0,0,weapon,0	//RG_INTIMIDATE#Snatch#
 220,1,6,2,0,1,0,1,1,no,0,0,0,none,0	//RG_GRAFFITI#Scribble#
 220,1,6,2,0,1,0,1,1,no,0,0,0,none,0	//RG_GRAFFITI#Scribble#
 221,0,6,2,0,1,0,5,1,no,0,0,0,none,0	//RG_FLAGGRAFFITI#Piece#
 221,0,6,2,0,1,0,5,1,no,0,0,0,none,0	//RG_FLAGGRAFFITI#Piece#
-222,1,6,2,0,1,0,1,1,no,0,0,0,none,0	//RG_CLEANER#Remover#
-223,0,0,0,0,0,0,1,0,no,0,0,0,none,0	//RG_GANGSTER#Slyness#
+222,1,6,2,0,3,5,1,1,no,0,0,0,none,0	//RG_CLEANER#Remover#
+223,0,0,0,0,0,1,1,0,no,0,0,0,none,0	//RG_GANGSTER#Slyness#
 224,0,0,0,0,0,0,5,0,no,0,0,0,none,0	//RG_COMPULSION#Haggle#
 224,0,0,0,0,0,0,5,0,no,0,0,0,none,0	//RG_COMPULSION#Haggle#
 225,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//RG_PLAGIARISM#Intimidate#
 225,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//RG_PLAGIARISM#Intimidate#
 226,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//AM_AXEMASTERY#Axe Mastery#
 226,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//AM_AXEMASTERY#Axe Mastery#
@@ -267,9 +268,9 @@
 247,9,6,4,0,1,0,5,0,no,0,0,0,none,0	//AM_RESURRECTHOMUN#Ressurect Homunculus#
 247,9,6,4,0,1,0,5,0,no,0,0,0,none,0	//AM_RESURRECTHOMUN#Ressurect Homunculus#
 248,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//CR_TRUST#Faith#
 248,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//CR_TRUST#Faith#
 249,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//CR_AUTOGUARD#Guard#
 249,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//CR_AUTOGUARD#Guard#
-250,3,6,1,0,2,0,5,1,no,0,0,0,weapon,5:6:7:8:9	//CR_SHIELDCHARGE#Smite#
+250,3,6,1,0,0,0,5,1,no,0,0,0,weapon,5:6:7:8:9	//CR_SHIELDCHARGE#Smite#
 251,3:5:7:9:11,6,1,0,0,0,5,1,no,0,0,0,weapon,0	//CR_SHIELDBOOMERANG#Shield Boomerang#
 251,3:5:7:9:11,6,1,0,0,0,5,1,no,0,0,0,weapon,0	//CR_SHIELDBOOMERANG#Shield Boomerang#
-252,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//CR_REFLECTSHIELD#Shield Reflect#
+252,0,6,4,0,0,0,10,1,no,0,0,0,weapon,0	//CR_REFLECTSHIELD#Shield Reflect#
 253,-2,8,1,6,0,0,10,2,no,0,0,0,weapon,0	//CR_HOLYCROSS#Holy Cross#
 253,-2,8,1,6,0,0,10,2,no,0,0,0,weapon,0	//CR_HOLYCROSS#Holy Cross#
 254,9,5,4,6,0,0,10,1,no,33,256,0,magic,0	//CR_GRANDCROSS#Grand Cross#
 254,9,5,4,6,0,0,10,1,no,33,256,0,magic,0	//CR_GRANDCROSS#Grand Cross#
 255,7:8:9:10:11,6,16,0,1,0,5,1,yes,0,3584,0,none,0	//CR_DEVOTION#Sacrifice#
 255,7:8:9:10:11,6,16,0,1,0,5,1,yes,0,3584,0,none,0	//CR_DEVOTION#Sacrifice#
@@ -335,7 +336,7 @@
 315,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//BA_MUSICALLESSON#Music Lesson#
 315,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//BA_MUSICALLESSON#Music Lesson#
 316,9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0	//BA_MUSICALSTRIKE#Melody Strike#
 316,9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0	//BA_MUSICALSTRIKE#Melody Strike#
 317,0,8,4,0,1,0,5,1,no,0,0,0,misc,0	//BA_DISSONANCE#Unchained Serenade#
 317,0,8,4,0,1,0,5,1,no,0,0,0,misc,0	//BA_DISSONANCE#Unchained Serenade#
-318,0,6,4,0,1,-1,5,1,no,0,0,0,misc,0	//BA_FROSTJOKE#Unbarring Octave#
+318,0,6,4,0,3,-1,5,1,no,0,0,0,misc,0	//BA_FROSTJOKE#Unbarring Octave#
 319,0,6,4,0,1,0,10,1,no,0,32,0,misc,0	//BA_WHISTLE#Perfect Tablature#
 319,0,6,4,0,1,0,10,1,no,0,32,0,misc,0	//BA_WHISTLE#Perfect Tablature#
 320,0,6,4,0,1,0,10,1,no,0,32,0,misc,0	//BA_ASSASSINCROSS#Impressive Riff#
 320,0,6,4,0,1,0,10,1,no,0,32,0,misc,0	//BA_ASSASSINCROSS#Impressive Riff#
 321,0,6,4,0,1,0,10,1,no,0,32,0,misc,0	//BA_POEMBRAGI#Magic Strings#
 321,0,6,4,0,1,0,10,1,no,0,32,0,misc,0	//BA_POEMBRAGI#Magic Strings#
@@ -343,7 +344,7 @@
 323,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//DC_DANCINGLESSON#Dance Lessons#
 323,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0	//DC_DANCINGLESSON#Dance Lessons#
 324,9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0	//DC_THROWARROW#Slinging Arrow#
 324,9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0	//DC_THROWARROW#Slinging Arrow#
 325,0,8,4,0,1,0,5,1,no,0,32,0,misc,0	//DC_UGLYDANCE#Hip Shaker#
 325,0,8,4,0,1,0,5,1,no,0,32,0,misc,0	//DC_UGLYDANCE#Hip Shaker#
-326,0,6,4,0,1,-1,5,1,no,0,0,0,misc,0	//DC_SCREAM#Dazzler#
+326,0,6,4,0,3,-1,5,1,no,0,0,0,misc,0	//DC_SCREAM#Dazzler#
 327,0,6,4,0,1,0,10,1,no,0,32,0,misc,0	//DC_HUMMING#Focus Ballet#
 327,0,6,4,0,1,0,10,1,no,0,32,0,misc,0	//DC_HUMMING#Focus Ballet#
 328,0,6,4,0,1,0,10,1,no,0,32,0,misc,0	//DC_DONTFORGETME#Slow Grace#
 328,0,6,4,0,1,0,10,1,no,0,32,0,misc,0	//DC_DONTFORGETME#Slow Grace#
 329,0,6,4,0,1,0,10,1,no,0,32,0,misc,0	//DC_FORTUNEKISS#Lady Luck#
 329,0,6,4,0,1,0,10,1,no,0,32,0,misc,0	//DC_FORTUNEKISS#Lady Luck#
@@ -378,7 +379,7 @@
 358,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//LK_TENSIONRELAX#Relax#
 358,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//LK_TENSIONRELAX#Relax#
 359,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//LK_BERSERK#Frenzy#
 359,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//LK_BERSERK#Frenzy#
 //360,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//LK_FURY#Fury#
 //360,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//LK_FURY#Fury#
-361,9,6,16,0,1,1,5,1,yes,0,0,0,magic,0	//HP_ASSUMPTIO#Assumptio#
+361,9,6,16,0,3,1,5,1,yes,0,0,0,magic,0	//HP_ASSUMPTIO#Assumptio#
 362,4,6,4,0,1,0,5,1,yes,0,0,0,magic,2	//HP_BASILICA#Basilica#
 362,4,6,4,0,1,0,5,1,yes,0,0,0,magic,2	//HP_BASILICA#Basilica#
 363,0,0,0,0,0,0,10,0,no,0,0,0,magic,0	//HP_MEDITATIO#Meditatio#
 363,0,0,0,0,0,0,10,0,no,0,0,0,magic,0	//HP_MEDITATIO#Meditatio#
 364,0,0,0,0,0,0,10,1,no,0,0,0,magic,0	//HW_SOULDRAIN#Soul Drain#
 364,0,0,0,0,0,0,10,1,no,0,0,0,magic,0	//HW_SOULDRAIN#Soul Drain#
@@ -400,19 +401,19 @@
 380,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//SN_SIGHT#Falcon Eyes#
 380,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//SN_SIGHT#Falcon Eyes#
 381,5,8,1,0,0,0,5,1,yes,0,0,0,misc,0	//SN_FALCONASSAULT#Falcon Assault#
 381,5,8,1,0,0,0,5,1,yes,0,0,0,misc,0	//SN_FALCONASSAULT#Falcon Assault#
 382,4,8,1,-1,0,2,5,1,yes,0,0,0,weapon,0	//SN_SHARPSHOOTING#Focused Arrow Strike#
 382,4,8,1,-1,0,2,5,1,yes,0,0,0,weapon,0	//SN_SHARPSHOOTING#Focused Arrow Strike#
-383,0,6,4,0,1,-1,10,1,yes,0,0,0,weapon,0	//SN_WINDWALK#Wind Walker#
+383,0,6,4,0,3,-1,10,1,yes,0,0,0,weapon,0	//SN_WINDWALK#Wind Walker#
 384,0,0,4,0,1,0,10,1,yes,0,0,0,weapon,0	//WS_MELTDOWN#Shattering Strike#
 384,0,0,4,0,1,0,10,1,yes,0,0,0,weapon,0	//WS_MELTDOWN#Shattering Strike#
 //385,0,0,4,0,1,0,1,1,yes,0,0,0,none,0	//WS_CREATECOIN#Create Coins#
 //385,0,0,4,0,1,0,1,1,yes,0,0,0,none,0	//WS_CREATECOIN#Create Coins#
 //386,0,0,4,0,1,0,1,1,yes,0,0,0,none,0	//WS_CREATENUGGET#Create Nuggets#
 //386,0,0,4,0,1,0,1,1,yes,0,0,0,none,0	//WS_CREATENUGGET#Create Nuggets#
 387,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//WS_CARTBOOST#Cart Boost#
 387,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//WS_CARTBOOST#Cart Boost#
 //388,9,6,2,0,1,0,5,1,no,0,0,0,none,0	//WS_SYSTEMCREATE#Auto Attack System#
 //388,9,6,2,0,1,0,5,1,no,0,0,0,none,0	//WS_SYSTEMCREATE#Auto Attack System#
 389,0,6,4,0,1,0,5,1,no,0,0,0,none,0	//ST_CHASEWALK#Stealth#
 389,0,6,4,0,1,0,5,1,no,0,0,0,none,0	//ST_CHASEWALK#Stealth#
-390,0,0,4,0,1,0,5,1,yes,0,0,0,weapon,0	//ST_REJECTSWORD#Counter Instinct#
+390,0,0,4,0,0,0,5,1,yes,0,0,0,weapon,0	//ST_REJECTSWORD#Counter Instinct#
 //391,0,0,4,0,1,0,1,1,yes,0,0,0,magic,0	//ST_STEALBACKPACK#Steal Backpack#
 //391,0,0,4,0,1,0,1,1,yes,0,0,0,magic,0	//ST_STEALBACKPACK#Steal Backpack#
 392,0,0,4,0,1,0,1,1,yes,0,0,0,none,0	//CR_ALCHEMY#Alchemy#
 392,0,0,4,0,1,0,1,1,yes,0,0,0,none,0	//CR_ALCHEMY#Alchemy#
 393,0,0,4,0,1,0,1,1,yes,0,0,0,none,0	//CR_SYNTHESISPOTION#Potion Synthesis#
 393,0,0,4,0,1,0,1,1,yes,0,0,0,none,0	//CR_SYNTHESISPOTION#Potion Synthesis#
 394,9,8,1,-1,0,0,10,9,yes,0,0,0,weapon,0	//CG_ARROWVULCAN#Vulcan Arrow#
 394,9,8,1,-1,0,0,10,9,yes,0,0,0,weapon,0	//CG_ARROWVULCAN#Vulcan Arrow#
-395,3,0,4,0,1,0,1,1,yes,0,0,0,misc,0	//CG_MOONLIT#Sheltering Bliss#
+395,0,0,4,0,1,3,1,1,yes,0,0,0,misc,0	//CG_MOONLIT#Sheltering Bliss#
 396,-1,6,16,0,1,0,1,1,yes,0,1536,0,none,0	//CG_MARIONETTE#Marionette Control#
 396,-1,6,16,0,1,0,1,1,yes,0,1536,0,none,0	//CG_MARIONETTE#Marionette Control#
 397,5,8,1,-1,0,0,5,5,no,0,0,0,weapon,0	//LK_SPIRALPIERCE#Spiral Pierce#
 397,5,8,1,-1,0,0,5,5,no,0,0,0,weapon,0	//LK_SPIRALPIERCE#Spiral Pierce#
 398,4,6,1,-1,0,0,5,1,no,0,0,0,weapon,0	//LK_HEADCRUSH#Traumatic Blow#
 398,4,6,1,-1,0,0,5,1,no,0,0,0,weapon,0	//LK_HEADCRUSH#Traumatic Blow#
@@ -423,31 +424,31 @@
 403,0,0,4,0,1,0,1,1,yes,0,0,0,magic,0	//PF_MEMORIZE#Foresight#
 403,0,0,4,0,1,0,1,1,yes,0,0,0,magic,0	//PF_MEMORIZE#Foresight#
 404,3,6,2,2,1,0,5,1,yes,0,256,2,magic,0	//PF_FOGWALL#Blinding Mist#
 404,3,6,2,2,1,0,5,1,yes,0,256,2,magic,0	//PF_FOGWALL#Blinding Mist#
 405,3,6,2,0,1,0,1,1,no,0,128,3,magic,0	//PF_SPIDERWEB#Fiber Lock#
 405,3,6,2,0,1,0,1,1,no,0,128,3,magic,0	//PF_SPIDERWEB#Fiber Lock#
-406,0,6,4,-1,1,2,10,1,no,33,0,0,weapon,0	//ASC_METEORASSAULT#Meteor Assault#
+406,0,6,4,-1,2,2,10,1,no,33,0,0,weapon,0	//ASC_METEORASSAULT#Meteor Assault#
 407,0,6,4,0,1,0,1,0,no,0,0,0,none,0	//ASC_CDP#Create Deadly Poison#
 407,0,6,4,0,1,0,1,0,no,0,0,0,none,0	//ASC_CDP#Create Deadly Poison#
 408,9,6,4,0,1,0,1,1,yes,0,4,0,none,0	//WE_BABY#Baby#
 408,9,6,4,0,1,0,1,1,yes,0,4,0,none,0	//WE_BABY#Baby#
 409,9,6,4,0,1,0,1,1,yes,0,4,0,none,0	//WE_CALLPARENT#Call Parent#
 409,9,6,4,0,1,0,1,1,yes,0,4,0,none,0	//WE_CALLPARENT#Call Parent#
 410,9,6,4,0,1,0,1,1,yes,0,4,0,none,0	//WE_CALLBABY#Call Baby#
 410,9,6,4,0,1,0,1,1,yes,0,4,0,none,0	//WE_CALLBABY#Call Baby#
 411,0,6,4,0,1,0,10,1,yes,0,0,0,misc,0	//TK_RUN#Running#
 411,0,6,4,0,1,0,10,1,yes,0,0,0,misc,0	//TK_RUN#Running#
 412,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//TK_READYSTORM#Prepare Whirlwind#
 412,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//TK_READYSTORM#Prepare Whirlwind#
-413,0,6,4,-1,0,2,7,1,no,0,0,0,weapon,0	//TK_STORMKICK#Whirlwind Kick#
+413,0,6,4,-1,2,2,7,1,no,0,0,0,weapon,0	//TK_STORMKICK#Whirlwind Kick#
 414,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//TK_READYDOWN#Prepare Axe Kick#
 414,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//TK_READYDOWN#Prepare Axe Kick#
 415,-2,6,4,-1,0,0,7,1,no,0,0,0,weapon,0	//TK_DOWNKICK#Axe Kick#
 415,-2,6,4,-1,0,0,7,1,no,0,0,0,weapon,0	//TK_DOWNKICK#Axe Kick#
 416,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//TK_READYTURN#Prepare Round Kick#
 416,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//TK_READYTURN#Prepare Round Kick#
-417,-2,6,4,-1,2,0,7,1,no,0,0,0,weapon,2	//TK_TURNKICK#Round Kick#
+417,-2,6,4,-1,2,1,7,1,no,0,0,0,weapon,2	//TK_TURNKICK#Round Kick#
 418,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//TK_READYCOUNTER#Prepare Counter Kick#
 418,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//TK_READYCOUNTER#Prepare Counter Kick#
 419,-2,6,4,-1,0,0,7,1,no,0,0,0,weapon,0	//TK_COUNTER#Counter Kick#
 419,-2,6,4,-1,0,0,7,1,no,0,0,0,weapon,0	//TK_COUNTER#Counter Kick#
 420,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//TK_DODGE#Break Fall#
 420,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//TK_DODGE#Break Fall#
 421,10,6,4,-1,0,0,7,1,no,0,0,0,weapon,0	//TK_JUMPKICK#Flying Side Kick#
 421,10,6,4,-1,0,0,7,1,no,0,0,0,weapon,0	//TK_JUMPKICK#Flying Side Kick#
-422,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//TK_HPTIME#Peaceful Rest#
-423,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//TK_SPTIME#Enjoyable Rest#
+422,0,0,0,0,0,1,10,0,no,0,0,0,none,0	//TK_HPTIME#Peaceful Rest#
+423,0,0,0,0,0,1,10,0,no,0,0,0,none,0	//TK_SPTIME#Enjoyable Rest#
 424,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0	//TK_POWER#Fighting Chant#
 424,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0	//TK_POWER#Fighting Chant#
 425,0,6,4,2:4:1:3:8:7:6,1,0,7,1,no,0,0,0,weapon,0	//TK_SEVENWIND#Mild Wind#
 425,0,6,4,2:4:1:3:8:7:6,1,0,7,1,no,0,0,0,weapon,0	//TK_SEVENWIND#Mild Wind#
 426,0,6,4,0,1,0,5,1,no,0,0,0,weapon,0	//TK_HIGHJUMP#Taekwon Jump#
 426,0,6,4,0,1,0,5,1,no,0,0,0,weapon,0	//TK_HIGHJUMP#Taekwon Jump#
 427,0,6,4,0,1,0,3,1,yes,0,0,0,magic,0	//SG_FEEL#Feeling the Sun, Moon and Stars#
 427,0,6,4,0,1,0,3,1,yes,0,0,0,magic,0	//SG_FEEL#Feeling the Sun, Moon and Stars#
-428,1,6,4,-1,1,1,3,1,yes,0,0,0,weapon,2	//SG_SUN_WARM#Warmth of the Sun#
-429,1,6,4,-1,1,1,3,1,yes,0,0,0,weapon,2	//SG_MOON_WARM#Warmth of the Moon#
-430,1,6,4,-1,1,1,3,1,yes,0,0,0,weapon,2	//SG_STAR_WARM#Warmth of the Star#
+428,1,6,4,-1,2,1,3,1,yes,0,0,0,weapon,2	//SG_SUN_WARM#Warmth of the Sun#
+429,1,6,4,-1,2,1,3,1,yes,0,0,0,weapon,2	//SG_MOON_WARM#Warmth of the Moon#
+430,1,6,4,-1,2,1,3,1,yes,0,0,0,weapon,2	//SG_STAR_WARM#Warmth of the Star#
 431,0,0,4,0,1,0,4,1,yes,0,0,0,magic,0	//SG_SUN_COMFORT#Comfort of the Sun#
 431,0,0,4,0,1,0,4,1,yes,0,0,0,magic,0	//SG_SUN_COMFORT#Comfort of the Sun#
 432,0,0,4,0,1,0,4,1,yes,0,0,0,magic,0	//SG_MOON_COMFORT#Comfort of the Moon#
 432,0,0,4,0,1,0,4,1,yes,0,0,0,magic,0	//SG_MOON_COMFORT#Comfort of the Moon#
 433,0,0,4,0,1,0,4,1,yes,0,0,0,magic,0	//SG_STAR_COMFORT#Comfort of the Star#
 433,0,0,4,0,1,0,4,1,yes,0,0,0,magic,0	//SG_STAR_COMFORT#Comfort of the Star#
@@ -476,7 +477,7 @@
 456,9,6,16,0,1,0,5,1,yes,0,0,0,magic,0	//SL_ROGUE#Spirit of the Rogue#
 456,9,6,16,0,1,0,5,1,yes,0,0,0,magic,0	//SL_ROGUE#Spirit of the Rogue#
 457,9,6,16,0,1,0,5,1,yes,0,0,0,magic,0	//SL_ASSASIN#Spirit of the Assasin#
 457,9,6,16,0,1,0,5,1,yes,0,0,0,magic,0	//SL_ASSASIN#Spirit of the Assasin#
 458,9,6,16,0,1,0,5,1,yes,0,0,0,magic,0	//SL_BLACKSMITH#Spirit of the Blacksmith#
 458,9,6,16,0,1,0,5,1,yes,0,0,0,magic,0	//SL_BLACKSMITH#Spirit of the Blacksmith#
-459,0,6,4,0,1,-1,1,1,no,0,8,0,weapon,0 //BS_ADRENALINE2#Full Adrenaline Rush#
+459,0,6,4,0,3,-1,1,1,no,0,8,0,weapon,0 //BS_ADRENALINE2#Full Adrenaline Rush#
 460,9,6,16,0,1,0,5,1,yes,0,0,0,magic,0	//SL_HUNTER#Spirit of the Hunter#
 460,9,6,16,0,1,0,5,1,yes,0,0,0,magic,0	//SL_HUNTER#Spirit of the Hunter#
 461,9,6,16,0,1,0,5,1,yes,0,512,0,magic,0	//SL_SOULLINKER#Spirit of the Soul Linker#
 461,9,6,16,0,1,0,5,1,yes,0,512,0,magic,0	//SL_SOULLINKER#Spirit of the Soul Linker#
 462,9,6,16,0,1,0,7,1,no,0,0,0,magic,0 //SL_KAIZEL#Kaizel#
 462,9,6,16,0,1,0,7,1,no,0,0,0,magic,0 //SL_KAIZEL#Kaizel#
@@ -495,7 +496,7 @@
 475,0,0,4,0,1,0,1,1,yes,0,0,0,none,0	//ST_PRESERVE#Preserve#
 475,0,0,4,0,1,0,1,1,yes,0,0,0,none,0	//ST_PRESERVE#Preserve#
 476,1,6,1,0,1,0,5,1,yes,0,0,0,weapon,0	//ST_FULLSTRIP#Divest All#
 476,1,6,1,0,1,0,5,1,yes,0,0,0,weapon,0	//ST_FULLSTRIP#Divest All#
 477,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//WS_WEAPONREFINE#Upgrade Weapon#
 477,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//WS_WEAPONREFINE#Upgrade Weapon#
-478,3,6,2,0,1,3,10,1,no,0,0,0,none,0	//CR_SLIMPITCHER#Aid Condensed Potion#
+478,3,6,2,0,3,3,10,1,no,0,0,0,none,0	//CR_SLIMPITCHER#Aid Condensed Potion#
 479,1,6,16,0,1,0,5,1,yes,0,0,0,weapon,0	//CR_FULLPROTECTION#Full Protection#
 479,1,6,16,0,1,0,5,1,yes,0,0,0,weapon,0	//CR_FULLPROTECTION#Full Protection#
 480,4,8,1,0,0,0,5,5,no,0,0,0,weapon,0	//PA_SHIELDCHAIN#Shield Chain#
 480,4,8,1,0,0,0,5,5,no,0,0,0,weapon,0	//PA_SHIELDCHAIN#Shield Chain#
 481,0,0,0,0,0,0,5,0,no,0,0,0,none,0	//HP_MANARECHARGE#Mana Recharge#
 481,0,0,0,0,0,0,5,0,no,0,0,0,none,0	//HP_MANARECHARGE#Mana Recharge#
@@ -505,7 +506,7 @@
 485,-2,6,1,-1,0,0,10,1,no,0,0,0,weapon,0	//WS_CARTTERMINATION#Cart Termination#
 485,-2,6,1,-1,0,0,10,1,no,0,0,0,weapon,0	//WS_CARTTERMINATION#Cart Termination#
 486,0,6,4,0,1,0,5,1,no,0,0,0,weapon,0	//WS_OVERTHRUSTMAX#Maximum Power Thrust#
 486,0,6,4,0,1,0,5,1,no,0,0,0,weapon,0	//WS_OVERTHRUSTMAX#Maximum Power Thrust#
 487,0,6,4,0,1,0,5,1,no,0,0,0,none,0	//CG_LONGINGFREEDOM#Longing for Freedom#
 487,0,6,4,0,1,0,5,1,no,0,0,0,none,0	//CG_LONGINGFREEDOM#Longing for Freedom#
-488,0,6,4,0,1,0,5,1,no,0,0,0,misc,0	//CG_HERMODE#Wand of Hermod#
+488,0,6,4,0,1,3,5,1,no,0,0,0,misc,0	//CG_HERMODE#Wand of Hermod#
 489,9,6,1,0,1,0,5,1,no,0,0,0,misc,0	//CG_TAROTCARD#Tarot Card of Fate#
 489,9,6,1,0,1,0,5,1,no,0,0,0,misc,0	//CG_TAROTCARD#Tarot Card of Fate#
 490,9,8,1,0,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,misc,0	//CR_ACIDDEMONSTRATION#Acid Demonstration#
 490,9,8,1,0,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,misc,0	//CR_ACIDDEMONSTRATION#Acid Demonstration#
 491,1,6,2,0,1,0,2,1,no,0,0,0,none,0	//CR_CULTIVATION#Cultivation#
 491,1,6,2,0,1,0,2,1,no,0,0,0,none,0	//CR_CULTIVATION#Cultivation#
@@ -523,17 +524,17 @@
 1003,0,0,0,0,0,0,1,0,no,0,1,0,weapon,0	//AS_SONICACCEL#Sonic Acceleration#
 1003,0,0,0,0,0,0,1,0,no,0,1,0,weapon,0	//AS_SONICACCEL#Sonic Acceleration#
 1004,9,8,1,0,0,0,1,1,no,0,1,0,weapon,0	//AS_VENOMKNIFE#Throw Venom Knive#
 1004,9,8,1,0,0,0,1,1,no,0,1,0,weapon,0	//AS_VENOMKNIFE#Throw Venom Knive#
 1005,1,6,1,0,1,0,1,1,no,0,1,0,weapon,0	//RG_CLOSECONFINE#Close Confine#
 1005,1,6,1,0,1,0,1,1,no,0,1,0,weapon,0	//RG_CLOSECONFINE#Close Confine#
-1006,0,6,4,3,1,2,1,1,yes,0,1,0,magic,3	//WZ_SIGHTBLASTER#Sight Blaster#
+1006,0,6,4,3,0,2,1,1,yes,0,1,0,magic,3	//WZ_SIGHTBLASTER#Sight Blaster#
 1007,0,6,4,0,1,0,10,0,no,0,1,0,none,0	//SA_CREATECON#Create Converter#
 1007,0,6,4,0,1,0,10,0,no,0,1,0,none,0	//SA_CREATECON#Create Converter#
 1008,9,6,1,1,1,0,1,1,yes,0,1,0,magic,0	//SA_ELEMENTWATER#Elemental Change Water#
 1008,9,6,1,1,1,0,1,1,yes,0,1,0,magic,0	//SA_ELEMENTWATER#Elemental Change Water#
 1009,-9,6,1,0,0,0,1,1,no,0,1,0,weapon,3	//HT_PHANTASMIC#Phantasmic Arrow#
 1009,-9,6,1,0,0,0,1,1,no,0,1,0,weapon,3	//HT_PHANTASMIC#Phantasmic Arrow#
 1010,9,6,1,0,1,0,1,0,no,0,1,0,misc,0	//BA_PANGVOICE#Pang Voice#
 1010,9,6,1,0,1,0,1,0,no,0,1,0,misc,0	//BA_PANGVOICE#Pang Voice#
 1011,9,6,1,0,1,0,1,0,no,0,1,0,misc,0	//DC_WINKCHARM#Wink of Charm#
 1011,9,6,1,0,1,0,1,0,no,0,1,0,misc,0	//DC_WINKCHARM#Wink of Charm#
 1012,0,0,0,0,0,0,1,0,no,0,1,0,weapon,0	//BS_UNFAIRLYTRICK#Unfair Trick#
 1012,0,0,0,0,0,0,1,0,no,0,1,0,weapon,0	//BS_UNFAIRLYTRICK#Unfair Trick#
-1013,0,6,4,0,1,2,1,0,no,0,1,0,weapon,0	//BS_GREED#Greed#
-1014,14,6,4,6,1,-1,10,1,yes,0,1,0,magic,0	//PR_REDEMPTIO#Redemptio#
+1013,0,6,4,0,3,2,1,0,no,0,1,0,weapon,0	//BS_GREED#Greed#
+1014,14,6,4,6,3,-1,10,1,yes,0,1,0,magic,0	//PR_REDEMPTIO#Redemptio#
 1015,9,6,16,0,1,0,1,1,no,0,1025,0,weapon,0	//MO_KITRANSLATION#Ki Translation#
 1015,9,6,16,0,1,0,1,1,no,0,1025,0,weapon,0	//MO_KITRANSLATION#Ki Translation#
-1016,0,6,1,0,0,1,1,1,no,0,1,0,weapon,5	//MO_BALKYOUNG#Ki Explosion#
+1016,0,6,1,0,2,1,1,1,no,0,1,0,weapon,5	//MO_BALKYOUNG#Ki Explosion#
 1017,9,6,1,2,1,0,1,1,yes,0,1,0,magic,0	//SA_ELEMENTGROUND#Elemental Change Earth#
 1017,9,6,1,2,1,0,1,1,yes,0,1,0,magic,0	//SA_ELEMENTGROUND#Elemental Change Earth#
 1018,9,6,1,3,1,0,1,1,yes,0,1,0,magic,0	//SA_ELEMENTFIRE#Elemental Change Fire#
 1018,9,6,1,3,1,0,1,1,yes,0,1,0,magic,0	//SA_ELEMENTFIRE#Elemental Change Fire#
 1019,9,6,1,4,1,0,1,1,yes,0,1,0,magic,0	//SA_ELEMENTWIND#Elemental Change Wind#
 1019,9,6,1,4,1,0,1,1,yes,0,1,0,magic,0	//SA_ELEMENTWIND#Elemental Change Wind#
@@ -545,12 +546,12 @@
 10003,0,0,0,0,0,0,1,0,no,0,16,0,none,0	//GD_GUARDUP#Guardian Training#
 10003,0,0,0,0,0,0,1,0,no,0,16,0,none,0	//GD_GUARDUP#Guardian Training#
 10004,0,0,0,0,0,0,10,0,no,0,16,0,none,0	//GD_EXTENSION#Guild Extension#
 10004,0,0,0,0,0,0,10,0,no,0,16,0,none,0	//GD_EXTENSION#Guild Extension#
 10005,0,0,0,0,0,0,1,0,no,0,16,0,none,0	//GD_GLORYGUILD#Guild's Glory#
 10005,0,0,0,0,0,0,1,0,no,0,16,0,none,0	//GD_GLORYGUILD#Guild's Glory#
-10006,0,0,0,0,0,0,1,0,no,0,16,0,none,0	//GD_LEADERSHIP#Great Leadership#
-10007,0,0,0,0,0,0,1,0,no,0,16,0,none,0	//GD_GLORYWOUNDS#Wounds of Glory#
-10008,0,0,0,0,0,0,1,0,no,0,16,0,none,0	//GD_SOULCOLD#Cold Soul#
-10009,0,0,0,0,0,0,1,0,no,0,16,0,none,0	//GD_HAWKEYES#Sharp Eyes#
-10010,0,0,4,0,1,0,1,0,yes,0,16,0,none,0	//GD_BATTLEORDER#Battle Orders#
-10011,0,0,4,0,1,0,3,0,yes,0,16,0,none,0	//GD_REGENERATION#Regeneration#
-10012,0,0,4,0,1,0,1,0,yes,0,16,0,none,0	//GD_RESTORE#Restore#
-10013,0,0,4,0,1,0,1,0,yes,0,16,0,none,0	//GD_EMERGENCYCALL#Rally Guild#
+10006,0,0,0,0,0,2,1,0,no,0,16,0,none,0	//GD_LEADERSHIP#Great Leadership#
+10007,0,0,0,0,0,2,1,0,no,0,16,0,none,0	//GD_GLORYWOUNDS#Wounds of Glory#
+10008,0,0,0,0,0,2,1,0,no,0,16,0,none,0	//GD_SOULCOLD#Cold Soul#
+10009,0,0,0,0,0,2,1,0,no,0,16,0,none,0	//GD_HAWKEYES#Sharp Eyes#
+10010,0,0,4,0,3,15,1,0,yes,0,16,0,none,0	//GD_BATTLEORDER#Battle Orders#
+10011,0,0,4,0,3,15,3,0,yes,0,16,0,none,0	//GD_REGENERATION#Regeneration#
+10012,0,0,4,0,3,15,1,0,yes,0,16,0,none,0	//GD_RESTORE#Restore#
+10013,0,0,4,0,3,0,1,0,yes,0,16,0,none,0	//GD_EMERGENCYCALL#Rally Guild#
 10014,0,0,0,0,0,0,1,0,no,0,16,0,none,0	//GD_DEVELOPMENT#Extend Guild#
 10014,0,0,0,0,0,0,1,0,no,0,16,0,none,0	//GD_DEVELOPMENT#Extend Guild#

+ 2 - 2
db/skill_unit_db.txt

@@ -40,11 +40,11 @@
 116,0x93,    ,  0, 1,1000,enemy, 0x006	//HT_LANDMINE#ランドマイン
 116,0x93,    ,  0, 1,1000,enemy, 0x006	//HT_LANDMINE#ランドマイン
 117,0x91,    ,  0, 1,1000,enemy, 0x006	//HT_ANKLESNARE#アンクルスネア
 117,0x91,    ,  0, 1,1000,enemy, 0x006	//HT_ANKLESNARE#アンクルスネア
 118,0x94,    ,  0, 1,1000,enemy, 0x006	//HT_SHOCKWAVE#ショックウェーブトラップ
 118,0x94,    ,  0, 1,1000,enemy, 0x006	//HT_SHOCKWAVE#ショックウェーブトラップ
-119,0x95,    ,  0, 2,1000,enemy, 0x006	//HT_SANDMAN#サンドマン
+119,0x95,    ,  0, 1,1000,enemy, 0x006	//HT_SANDMAN#サンドマン
 120,0x96,    ,  0, 1,1000,enemy, 0x006	//HT_FLASHER#フラッシャー
 120,0x96,    ,  0, 1,1000,enemy, 0x006	//HT_FLASHER#フラッシャー
 121,0x97,    ,  0, 1,1000,enemy, 0x006	//HT_FREEZINGTRAP#フリージングトラップ
 121,0x97,    ,  0, 1,1000,enemy, 0x006	//HT_FREEZINGTRAP#フリージングトラップ
 122,0x8f,    ,  0, 1,1000,enemy, 0x006	//HT_BLASTMINE#ブラストマイン
 122,0x8f,    ,  0, 1,1000,enemy, 0x006	//HT_BLASTMINE#ブラストマイン
-123,0x98,    ,  0, 2,1000,enemy, 0x006	//HT_CLAYMORETRAP#クレイモアトラップ
+123,0x98,    ,  0, 1,1000,enemy, 0x006	//HT_CLAYMORETRAP#クレイモアトラップ
 125,0x99,    ,  0, 1,1000,all,   0x002	//HT_TALKIEBOX#トーキーボックス
 125,0x99,    ,  0, 1,1000,all,   0x002	//HT_TALKIEBOX#トーキーボックス
 140,0x92,    , -1, 0,1000,enemy, 0x000	//AS_VENOMDUST#ベナムダスト
 140,0x92,    , -1, 0,1000,enemy, 0x000	//AS_VENOMDUST#ベナムダスト
 220,0xb0,    ,  0, 0,  -1,all,   0x002	//RG_GRAFFITI#グラフィティ
 220,0xb0,    ,  0, 0,  -1,all,   0x002	//RG_GRAFFITI#グラフィティ

+ 19 - 35
src/map/battle.c

@@ -37,14 +37,13 @@ static struct eri *delay_damage_ers; //For battle delay damage structures.
  */
  */
 static int battle_counttargeted_sub(struct block_list *bl, va_list ap)
 static int battle_counttargeted_sub(struct block_list *bl, va_list ap)
 {
 {
-	int id, *c, target_lv;
+	int id, target_lv;
 	struct block_list *src;
 	struct block_list *src;
 
 
 	nullpo_retr(0, bl);
 	nullpo_retr(0, bl);
 	nullpo_retr(0, ap);
 	nullpo_retr(0, ap);
 
 
 	id = va_arg(ap,int);
 	id = va_arg(ap,int);
-	nullpo_retr(0, c = va_arg(ap, int *));
 	src = va_arg(ap,struct block_list *);
 	src = va_arg(ap,struct block_list *);
 	target_lv = va_arg(ap,int);
 	target_lv = va_arg(ap,int);
 
 
@@ -53,18 +52,18 @@ static int battle_counttargeted_sub(struct block_list *bl, va_list ap)
 	if (bl->type == BL_PC) {
 	if (bl->type == BL_PC) {
 		struct map_session_data *sd = (struct map_session_data *)bl;
 		struct map_session_data *sd = (struct map_session_data *)bl;
 		if (sd && sd->attacktarget == id && sd->attacktimer != -1 && sd->attacktarget_lv >= target_lv)
 		if (sd && sd->attacktarget == id && sd->attacktimer != -1 && sd->attacktarget_lv >= target_lv)
-			(*c)++;
+			return 1;
 	}
 	}
 	else if (bl->type == BL_MOB) {
 	else if (bl->type == BL_MOB) {
 		struct mob_data *md = (struct mob_data *)bl;
 		struct mob_data *md = (struct mob_data *)bl;
 		if (md && md->target_id == id && md->timer != -1 && md->state.state == MS_ATTACK && md->target_lv >= target_lv)		
 		if (md && md->target_id == id && md->timer != -1 && md->state.state == MS_ATTACK && md->target_lv >= target_lv)		
-			(*c)++;
+			return 1;
 		//printf("md->target_lv:%d, target_lv:%d\n", md->target_lv, target_lv);
 		//printf("md->target_lv:%d, target_lv:%d\n", md->target_lv, target_lv);
 	}
 	}
 	else if (bl->type == BL_PET) {
 	else if (bl->type == BL_PET) {
 		struct pet_data *pd = (struct pet_data *)bl;
 		struct pet_data *pd = (struct pet_data *)bl;
 		if (pd && pd->target_id == id && pd->timer != -1 && pd->state.state == MS_ATTACK && pd->target_lv >= target_lv)
 		if (pd && pd->target_id == id && pd->timer != -1 && pd->state.state == MS_ATTACK && pd->target_lv >= target_lv)
-			(*c)++;
+			return 1;
 	}
 	}
 
 
 	return 0;
 	return 0;
@@ -76,15 +75,9 @@ static int battle_counttargeted_sub(struct block_list *bl, va_list ap)
  */
  */
 int battle_counttargeted(struct block_list *bl,struct block_list *src,int target_lv)
 int battle_counttargeted(struct block_list *bl,struct block_list *src,int target_lv)
 {
 {
-	int c = 0;
 	nullpo_retr(0, bl);
 	nullpo_retr(0, bl);
-
-	map_foreachinarea(battle_counttargeted_sub, bl->m,
-		bl->x-AREA_SIZE, bl->y-AREA_SIZE,
-		bl->x+AREA_SIZE, bl->y+AREA_SIZE, BL_CHAR,
-		bl->id, &c, src, target_lv);
-
-	return c;
+	return (map_foreachinrange(battle_counttargeted_sub, bl, AREA_SIZE, BL_CHAR,
+		bl->id, src, target_lv));
 }
 }
 
 
 /*==========================================
 /*==========================================
@@ -124,7 +117,7 @@ static int battle_gettargeted_sub(struct block_list *bl, va_list ap)
 	}
 	}
 
 
 	bl_list[(*c)++] = bl;
 	bl_list[(*c)++] = bl;
-	return 0;
+	return 1;
 }
 }
 
 
 int battle_getcurrentskill(struct block_list *bl)
 int battle_getcurrentskill(struct block_list *bl)
@@ -171,10 +164,7 @@ struct block_list* battle_gettargeted(struct block_list *target)
 	nullpo_retr(NULL, target);
 	nullpo_retr(NULL, target);
 
 
 	memset(bl_list, 0, sizeof(bl_list));
 	memset(bl_list, 0, sizeof(bl_list));
-	map_foreachinarea(battle_gettargeted_sub, target->m,
-		target->x-AREA_SIZE, target->y-AREA_SIZE,
-		target->x+AREA_SIZE, target->y+AREA_SIZE, BL_CHAR,
-		bl_list, &c, target);
+	map_foreachinrange(battle_gettargeted_sub, target, AREA_SIZE, BL_CHAR, bl_list, &c, target);
 	if (c == 0 || c > 24)
 	if (c == 0 || c > 24)
 		return NULL;
 		return NULL;
 	return bl_list[rand()%c];
 	return bl_list[rand()%c];
@@ -1554,8 +1544,7 @@ static struct Damage battle_calc_weapon_attack(
 						ATK_ADDRATE(sd->crit_atk_rate);
 						ATK_ADDRATE(sd->crit_atk_rate);
 
 
 					if(sd->status.party_id && (skill=pc_checkskill(sd,TK_POWER)) > 0){
 					if(sd->status.party_id && (skill=pc_checkskill(sd,TK_POWER)) > 0){
-						i = 0;
-						party_foreachsamemap(party_sub_count, sd, 0, &i);
+						i = party_foreachsamemap(party_sub_count, sd, 0);
 						ATK_ADDRATE(2*skill*i);
 						ATK_ADDRATE(2*skill*i);
 					}
 					}
 				}
 				}
@@ -3122,21 +3111,16 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
 		if (sd) sp = skill_get_sp(skillid,skilllv) * 2 / 3;
 		if (sd) sp = skill_get_sp(skillid,skilllv) * 2 / 3;
 
 
 		if ((sd && sd->status.sp >= sp) || !sd) {
 		if ((sd && sd->status.sp >= sp) || !sd) {
-			if (skill_get_inf(skillid) & INF_GROUND_SKILL)
-				f = skill_castend_pos2(src, target->x, target->y, skillid, skilllv, tick, flag);
-			else {
-				switch(skill_get_nk(skillid)) {
-					case NK_NO_DAMAGE:/* Žx‰‡Œn */
-						if((skillid == AL_HEAL || (skillid == ALL_RESURRECTION && !tsd)) && battle_check_undead(race,ele))
-							f = skill_castend_damage_id(src, target, skillid, skilllv, tick, flag);
-						else
-							f = skill_castend_nodamage_id(src, target, skillid, skilllv, tick, flag);
-						break;
-					case NK_SPLASH_DAMAGE:
-					default:
-						f = skill_castend_damage_id(src, target, skillid, skilllv, tick, flag);
-						break;
-				}
+			switch (skill_get_casttype(skillid)) {
+				case CAST_GROUND:
+					f = skill_castend_pos2(src, target->x, target->y, skillid, skilllv, tick, flag);
+					break;
+				case CAST_NODAMAGE:
+					f = skill_castend_nodamage_id(src, target, skillid, skilllv, tick, flag);
+					break;
+				case CAST_DAMAGE:
+					f = skill_castend_damage_id(src, target, skillid, skilllv, tick, flag);
+					break;
 			}
 			}
 			if (sd && !f) { pc_heal(sd, 0, -sp); }
 			if (sd && !f) { pc_heal(sd, 0, -sp); }
 		}
 		}

+ 7 - 5
src/map/map.c

@@ -628,18 +628,18 @@ struct skill_unit *map_find_skill_unit_oncell(struct block_list *target,int x,in
 }
 }
 
 
 /*==========================================
 /*==========================================
- * Adapted from foreachinarea to use real ranges around a character area. [Skotlex]
+ * Adapted from foreachinarea for an easier invocation. [Skotlex]
  *------------------------------------------
  *------------------------------------------
  */
  */
 
 
-int map_foreachinrange(int (*func)(struct block_list*,va_list),int m,struct block_list *center, int range,int type,...) {
+int map_foreachinrange(int (*func)(struct block_list*,va_list),struct block_list *center, int range,int type,...) {
 	va_list ap;
 	va_list ap;
-	int bx,by;
+	int bx,by,m;
 	int returnCount =0;	//total sum of returned values of func() [Skotlex]
 	int returnCount =0;	//total sum of returned values of func() [Skotlex]
 	struct block_list *bl=NULL;
 	struct block_list *bl=NULL;
 	int blockcount=bl_list_count,i,c;
 	int blockcount=bl_list_count,i,c;
 	int x0,x1,y0,y1;
 	int x0,x1,y0,y1;
-	
+	m = center->m;
 	if (m < 0)
 	if (m < 0)
 		return 0;
 		return 0;
 	va_start(ap,type);
 	va_start(ap,type);
@@ -661,7 +661,9 @@ int map_foreachinrange(int (*func)(struct block_list*,va_list),int m,struct bloc
 				for(i=0;i<c && bl;i++,bl=bl->next){
 				for(i=0;i<c && bl;i++,bl=bl->next){
 					if(bl && bl->type&type
 					if(bl && bl->type&type
 						&& bl->x>=x0 && bl->x<=x1 && bl->y>=y0 && bl->y<=y1
 						&& bl->x>=x0 && bl->x<=x1 && bl->y>=y0 && bl->y<=y1
-						&& check_distance_bl(center, bl, range)
+						//For speed purposes, it does not checks actual range by default.
+						//Feel free to uncomment if you want a more "exact" approach.
+//						&& check_distance_bl(center, bl, range)
 					  	&& bl_list_count<BL_LIST_MAX)
 					  	&& bl_list_count<BL_LIST_MAX)
 						bl_list[bl_list_count++]=bl;
 						bl_list[bl_list_count++]=bl;
 				}
 				}

+ 1 - 1
src/map/map.h

@@ -1226,7 +1226,7 @@ int map_delblock_sub(struct block_list *, int);
 #define map_delblock(bl) map_delblock_sub(bl,1)
 #define map_delblock(bl) map_delblock_sub(bl,1)
 int map_moveblock(struct block_list *, int, int, unsigned int);
 int map_moveblock(struct block_list *, int, int, unsigned int);
 
 
-int map_foreachinrange(int (*)(struct block_list*,va_list),int,struct block_list *,int,int,...);
+int map_foreachinrange(int (*)(struct block_list*,va_list),struct block_list *,int,int,...);
 int map_foreachinarea(int (*)(struct block_list*,va_list),int,int,int,int,int,int,...);
 int map_foreachinarea(int (*)(struct block_list*,va_list),int,int,int,int,int,int,...);
 // -- moonsoul (added map_foreachincell)
 // -- moonsoul (added map_foreachincell)
 int map_foreachincell(int (*)(struct block_list*,va_list),int,int,int,int,...);
 int map_foreachincell(int (*)(struct block_list*,va_list),int,int,int,int,...);

+ 32 - 50
src/map/mob.c

@@ -722,9 +722,7 @@ static int mob_attack(struct mob_data *md,unsigned int tick,int data)
 	if (status_get_mode(&md->bl)&MD_ASSIST && DIFF_TICK(md->last_linktime, tick) < MIN_MOBLINKTIME)
 	if (status_get_mode(&md->bl)&MD_ASSIST && DIFF_TICK(md->last_linktime, tick) < MIN_MOBLINKTIME)
 	{	// Link monsters nearby [Skotlex]
 	{	// Link monsters nearby [Skotlex]
 		md->last_linktime = tick;
 		md->last_linktime = tick;
-		map_foreachinarea(mob_linksearch, md->bl.m,
-			md->bl.x-md->db->range2, md->bl.y-md->db->range2,
-			md->bl.x+md->db->range2, md->bl.y+md->db->range2,
+		map_foreachinrange(mob_linksearch, &md->bl, md->db->range2,
 			BL_MOB, md->class_, tbl, tick);
 			BL_MOB, md->class_, tbl, tick);
 	}
 	}
 
 
@@ -1017,7 +1015,7 @@ static int mob_count_sub(struct block_list *bl,va_list ap)
 int mob_spawn (int id)
 int mob_spawn (int id)
 {
 {
 	int x, y, i = 0;
 	int x, y, i = 0;
-	unsigned int c, tick = gettick();
+	unsigned int c =0, tick = gettick();
 	struct mob_data *md;
 	struct mob_data *md;
 	struct block_list *bl;
 	struct block_list *bl;
 
 
@@ -1037,7 +1035,8 @@ int mob_spawn (int id)
 		}
 		}
 	}
 	}
 	md->bl.m = md->m;
 	md->bl.m = md->m;
-	do {
+
+	while (i < 50) {
 		if (md->x0 == 0 && md->y0 == 0) {
 		if (md->x0 == 0 && md->y0 == 0) {
 			x = rand()%(map[md->bl.m].xs-2)+1;
 			x = rand()%(map[md->bl.m].xs-2)+1;
 			y = rand()%(map[md->bl.m].ys-2)+1;
 			y = rand()%(map[md->bl.m].ys-2)+1;
@@ -1046,14 +1045,18 @@ int mob_spawn (int id)
 			y = md->y0+rand()%(md->ys+1)-md->ys/2;
 			y = md->y0+rand()%(md->ys+1)-md->ys/2;
 		}
 		}
 		i++;
 		i++;
-		if (battle_config.no_spawn_on_player && i <= battle_config.no_spawn_on_player)
-		{	//Avoid spawning on the view-range of players. [Skotlex]
-			if (map_foreachinarea(mob_count_sub, md->bl.m,
-				x-AREA_SIZE, y-AREA_SIZE, x+AREA_SIZE, y+AREA_SIZE,
-				BL_PC) > 0)
-				continue;
-		}
-	} while(map_getcell(md->bl.m,x,y,CELL_CHKNOPASS) && i < 50);
+		if (map_getcell(md->bl.m,x,y,CELL_CHKNOPASS))
+			continue;
+
+		//Avoid spawning on the view-range of players. [Skotlex]
+		if (battle_config.no_spawn_on_player &&
+			c++ < battle_config.no_spawn_on_player &&
+			map_foreachinrange(mob_count_sub, &md->bl, AREA_SIZE, BL_PC)
+		)
+			continue;
+		//Found a spot.
+		break;
+	}
 
 
 	if (i >= 50) {
 	if (i >= 50) {
 		if (md->spawndelay1 != -1 || md->spawndelay2 == -1)
 		if (md->spawndelay1 != -1 || md->spawndelay2 == -1)
@@ -1682,18 +1685,12 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
 		(mode&MD_ANGRY && md->state.skillstate == MSS_FOLLOW)
 		(mode&MD_ANGRY && md->state.skillstate == MSS_FOLLOW)
 	) {
 	) {
 		search_size = (blind_flag) ? 3 : md->db->range2;
 		search_size = (blind_flag) ? 3 : md->db->range2;
-		map_foreachinarea (mob_ai_sub_hard_activesearch, md->bl.m,
-					md->bl.x-search_size,md->bl.y-search_size,
-					md->bl.x+search_size,md->bl.y+search_size,
-					md->special_state.ai?BL_CHAR:BL_PC,
-					md, &tbl);
+		map_foreachinrange (mob_ai_sub_hard_activesearch, &md->bl,
+			search_size, md->special_state.ai?BL_CHAR:BL_PC, md, &tbl);
 	} else if (mode&MD_CHANGECHASE && (md->state.skillstate == MSS_RUSH || md->state.skillstate == MSS_FOLLOW)) {
 	} else if (mode&MD_CHANGECHASE && (md->state.skillstate == MSS_RUSH || md->state.skillstate == MSS_FOLLOW)) {
 		search_size = (blind_flag && md->db->range>3) ? 3 : md->db->range;
 		search_size = (blind_flag && md->db->range>3) ? 3 : md->db->range;
-		map_foreachinarea (mob_ai_sub_hard_changechase, md->bl.m,
-					md->bl.x-search_size,md->bl.y-search_size,
-					md->bl.x+search_size,md->bl.y+search_size,
-					md->special_state.ai?BL_CHAR:BL_PC,
-					md, &tbl);
+		map_foreachinrange (mob_ai_sub_hard_changechase, &md->bl,
+				search_size, md->special_state.ai?BL_CHAR:BL_PC, md, &tbl);
 	}
 	}
 
 
 	// Scan area for items to loot, avoid trying to loot of the mob is full and can't consume the items.
 	// Scan area for items to loot, avoid trying to loot of the mob is full and can't consume the items.
@@ -1702,10 +1699,8 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
 	{
 	{
 		i = 0;
 		i = 0;
 		search_size = (blind_flag) ? 3 : md->db->range2;
 		search_size = (blind_flag) ? 3 : md->db->range2;
-		map_foreachinarea (mob_ai_sub_hard_lootsearch, md->bl.m,
-					md->bl.x-search_size, md->bl.y-search_size,
-					md->bl.x+search_size, md->bl.y+search_size,
-					BL_ITEM, md, &i);
+		map_foreachinrange (mob_ai_sub_hard_lootsearch, &md->bl,
+			search_size, BL_ITEM, md, &i);
 	}
 	}
 
 
 	if (tbl)
 	if (tbl)
@@ -1878,10 +1873,7 @@ static int mob_ai_sub_foreachclient(struct map_session_data *sd,va_list ap)
 	nullpo_retr(0, ap);
 	nullpo_retr(0, ap);
 
 
 	tick=va_arg(ap,unsigned int);
 	tick=va_arg(ap,unsigned int);
-	map_foreachinarea(mob_ai_sub_hard,sd->bl.m,
-					  sd->bl.x-AREA_SIZE*2,sd->bl.y-AREA_SIZE*2,
-					  sd->bl.x+AREA_SIZE*2,sd->bl.y+AREA_SIZE*2,
-					  BL_MOB,tick);
+	map_foreachinrange(mob_ai_sub_hard,&sd->bl, AREA_SIZE*2, BL_MOB,tick);
 
 
 	return 0;
 	return 0;
 }
 }
@@ -3263,7 +3255,7 @@ int mobskill_castend_id( int tid, unsigned int tick, int id,int data )
 
 
 	inf = skill_get_inf(md->skillid);
 	inf = skill_get_inf(md->skillid);
 	if((inf&INF_ATTACK_SKILL ||
 	if((inf&INF_ATTACK_SKILL ||
-		(inf&INF_SELF_SKILL && md->bl.id != bl->id && skill_get_nk(md->skillid) != NK_NO_DAMAGE))
+		(inf&INF_SELF_SKILL && md->bl.id != bl->id && !(skill_get_nk(md->skillid)&NK_NO_DAMAGE)))
 		&& battle_check_target(&md->bl,bl, BCT_ENEMY)<=0 ) {
 		&& battle_check_target(&md->bl,bl, BCT_ENEMY)<=0 ) {
 		skill_failed(md);
 		skill_failed(md);
 		return 0;
 		return 0;
@@ -3286,17 +3278,11 @@ int mobskill_castend_id( int tid, unsigned int tick, int id,int data )
 		ShowInfo("MOB skill castend skill=%d, class = %d\n",md->skillid,md->class_);
 		ShowInfo("MOB skill castend skill=%d, class = %d\n",md->skillid,md->class_);
 //	mob_stop_wShowInfo(md,0);
 //	mob_stop_wShowInfo(md,0);
 
 
-	switch( skill_get_nk(md->skillid) )
-	{
-	case NK_NO_DAMAGE:// 支援系
+
+	if (skill_get_casttype(md->skillid) == CAST_NODAMAGE) 
 		skill_castend_nodamage_id(&md->bl,bl,md->skillid,md->skilllv,tick,0);
 		skill_castend_nodamage_id(&md->bl,bl,md->skillid,md->skilllv,tick,0);
-		break;
-	// 攻撃系/吹き飛ばし系
-	case NK_SPLASH_DAMAGE:
-	default:
+	else
 		skill_castend_damage_id(&md->bl,bl,md->skillid,md->skilllv,tick,0);
 		skill_castend_damage_id(&md->bl,bl,md->skillid,md->skilllv,tick,0);
-		break;
-	}
 
 
 	if (md->sc.count && md->sc.data[SC_MAGICPOWER].timer != -1 && md->skillid != HW_MAGICPOWER)
 	if (md->sc.count && md->sc.data[SC_MAGICPOWER].timer != -1 && md->skillid != HW_MAGICPOWER)
 		status_change_end(&md->bl, SC_MAGICPOWER, -1);
 		status_change_end(&md->bl, SC_MAGICPOWER, -1);
@@ -3604,7 +3590,6 @@ int mob_getfriendhpltmaxrate_sub(struct block_list *bl,va_list ap)
 struct block_list *mob_getfriendhpltmaxrate(struct mob_data *md,int rate)
 struct block_list *mob_getfriendhpltmaxrate(struct mob_data *md,int rate)
 {
 {
 	struct block_list *fr=NULL;
 	struct block_list *fr=NULL;
-	const int r=8;
 	int type = BL_MOB;
 	int type = BL_MOB;
 	
 	
 	nullpo_retr(NULL, md);
 	nullpo_retr(NULL, md);
@@ -3612,9 +3597,7 @@ struct block_list *mob_getfriendhpltmaxrate(struct mob_data *md,int rate)
 	if (md->special_state.ai) //Summoned creatures. [Skotlex]
 	if (md->special_state.ai) //Summoned creatures. [Skotlex]
 		type = BL_PC;
 		type = BL_PC;
 	
 	
-	map_foreachinarea(mob_getfriendhpltmaxrate_sub, md->bl.m,
-		md->bl.x-r ,md->bl.y-r, md->bl.x+r, md->bl.y+r,
-		type,md,rate,&fr);
+	map_foreachinrange(mob_getfriendhpltmaxrate_sub, &md->bl, 8, type,md,rate,&fr);
 	return fr;
 	return fr;
 }
 }
 /*==========================================
 /*==========================================
@@ -3669,12 +3652,10 @@ int mob_getfriendstatus_sub(struct block_list *bl,va_list ap)
 struct mob_data *mob_getfriendstatus(struct mob_data *md,int cond1,int cond2)
 struct mob_data *mob_getfriendstatus(struct mob_data *md,int cond1,int cond2)
 {
 {
 	struct mob_data *fr=NULL;
 	struct mob_data *fr=NULL;
-	const int r=8;
 
 
 	nullpo_retr(0, md);
 	nullpo_retr(0, md);
 
 
-	map_foreachinarea(mob_getfriendstatus_sub, md->bl.m,
-		md->bl.x-r ,md->bl.y-r, md->bl.x+r, md->bl.y+r,
+	map_foreachinrange(mob_getfriendstatus_sub, &md->bl, 8,
 		BL_MOB,md,cond1,cond2,&fr);
 		BL_MOB,md,cond1,cond2,&fr);
 	return fr;
 	return fr;
 }
 }
@@ -3772,7 +3753,8 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event)
 			continue; //Skill requisite failed to be fulfilled.
 			continue; //Skill requisite failed to be fulfilled.
 
 
 		//Execute skill	
 		//Execute skill	
-		if (skill_get_inf(ms[i].skill_id) & INF_GROUND_SKILL) {
+		if (skill_get_casttype(ms[i].skill_id) == CAST_GROUND)
+		{
 			// 場所指定
 			// 場所指定
 			struct block_list *bl = NULL;
 			struct block_list *bl = NULL;
 			int x = 0, y = 0;
 			int x = 0, y = 0;
@@ -4040,7 +4022,7 @@ int mob_clone_spawn(struct map_session_data *sd, char *map, int x, int y, const
 				ms[i].cond2 = 95;
 				ms[i].cond2 = 95;
 			}
 			}
 		} else if (inf&INF_SELF_SKILL) {
 		} else if (inf&INF_SELF_SKILL) {
-			if (skill_get_nk(skill_id) != NK_NO_DAMAGE) { //Offensive skill
+			if (!(skill_get_nk(skill_id)&NK_NO_DAMAGE)) { //Offensive skill
 				ms[i].target = MST_TARGET;
 				ms[i].target = MST_TARGET;
 				ms[i].state = MSS_BERSERK;
 				ms[i].state = MSS_BERSERK;
 			} else //Self skill
 			} else //Self skill

+ 12 - 13
src/map/party.c

@@ -694,16 +694,13 @@ int party_send_dot_remove(struct map_session_data *sd)
 // party_foreachsamemap(party_sub_count, sd, 0, &c);
 // party_foreachsamemap(party_sub_count, sd, 0, &c);
 int party_sub_count(struct block_list *bl, va_list ap)
 int party_sub_count(struct block_list *bl, va_list ap)
 {
 {
-	int *c = va_arg(ap, int*);
-
-	(*c)++;
 	return 1;
 	return 1;
 }
 }
 
 
 // 同じマップのパーティメンバー全体に処理をかける
 // 同じマップのパーティメンバー全体に処理をかける
 // type==0 同じマップ
 // type==0 同じマップ
 //     !=0 画面内
 //     !=0 画面内
-void party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_session_data *sd,int type,...)
+int party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_session_data *sd,int range,...)
 {
 {
 	struct party *p;
 	struct party *p;
 	va_list ap;
 	va_list ap;
@@ -711,25 +708,26 @@ void party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_ses
 	int x0,y0,x1,y1;
 	int x0,y0,x1,y1;
 	struct block_list *list[MAX_PARTY];
 	struct block_list *list[MAX_PARTY];
 	int blockcount=0;
 	int blockcount=0;
+	int total = 0; //Return value.
 	
 	
-	nullpo_retv(sd);
+	nullpo_retr(0,sd);
 	
 	
 	if((p=party_search(sd->status.party_id))==NULL)
 	if((p=party_search(sd->status.party_id))==NULL)
-		return;
+		return 0;
 
 
-	x0=sd->bl.x-AREA_SIZE;
-	y0=sd->bl.y-AREA_SIZE;
-	x1=sd->bl.x+AREA_SIZE;
-	y1=sd->bl.y+AREA_SIZE;
+	x0=sd->bl.x-range;
+	y0=sd->bl.y-range;
+	x1=sd->bl.x+range;
+	y1=sd->bl.y+range;
 
 
-	va_start(ap,type);
+	va_start(ap,range);
 	
 	
 	for(i=0;i<MAX_PARTY;i++){
 	for(i=0;i<MAX_PARTY;i++){
 		struct party_member *m=&p->member[i];
 		struct party_member *m=&p->member[i];
 		if(m->sd!=NULL){
 		if(m->sd!=NULL){
 			if(sd->bl.m!=m->sd->bl.m)
 			if(sd->bl.m!=m->sd->bl.m)
 				continue;
 				continue;
-			if(type!=0 &&
+			if(range &&
 				(m->sd->bl.x<x0 || m->sd->bl.y<y0 ||
 				(m->sd->bl.x<x0 || m->sd->bl.y<y0 ||
 				 m->sd->bl.x>x1 || m->sd->bl.y>y1 ) )
 				 m->sd->bl.x>x1 || m->sd->bl.y>y1 ) )
 				continue;
 				continue;
@@ -741,9 +739,10 @@ void party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_ses
 	
 	
 	for(i=0;i<blockcount;i++)
 	for(i=0;i<blockcount;i++)
 		if(list[i]->prev)	// 有効かどうかチェック
 		if(list[i]->prev)	// 有効かどうかチェック
-			func(list[i],ap);
+			total += func(list[i],ap);
 
 
 	map_freeblock_unlock();	// 解放を許可する
 	map_freeblock_unlock();	// 解放を許可する
 
 
 	va_end(ap);
 	va_end(ap);
+	return total;
 }
 }

+ 1 - 1
src/map/party.h

@@ -41,7 +41,7 @@ int party_send_xy_clear(struct party *p);
 int party_exp_share(struct party *p,int map,unsigned int base_exp,unsigned int job_exp,int zeny);
 int party_exp_share(struct party *p,int map,unsigned int base_exp,unsigned int job_exp,int zeny);
 int party_send_dot_remove(struct map_session_data *sd);
 int party_send_dot_remove(struct map_session_data *sd);
 int party_sub_count(struct block_list *bl, va_list ap);
 int party_sub_count(struct block_list *bl, va_list ap);
-void party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_session_data *sd,int type,...);
+int party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_session_data *sd,int type,...);
 
 
 
 
 #endif
 #endif

+ 2 - 3
src/map/pc.c

@@ -3108,7 +3108,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl)
 	flag = pc_additem(sd,&tmp_item,1);
 	flag = pc_additem(sd,&tmp_item,1);
 
 
 	if(battle_config.show_steal_in_same_party)
 	if(battle_config.show_steal_in_same_party)
-		party_foreachsamemap(pc_show_steal,sd,1,sd,tmp_item.nameid,flag?1:0);
+		party_foreachsamemap(pc_show_steal,sd,AREA_SIZE,sd,tmp_item.nameid,flag?1:0);
 	if(flag)
 	if(flag)
 		clif_additem(sd,0,0,flag);
 		clif_additem(sd,0,0,flag);
 	else
 	else
@@ -3721,8 +3721,7 @@ int pc_walktoxy (struct map_session_data *sd, int x, int y)
 		if ((skill = guild_checkskill(g, GD_SOULCOLD)) > 0) guildflag |= skill<<4;
 		if ((skill = guild_checkskill(g, GD_SOULCOLD)) > 0) guildflag |= skill<<4;
 		if ((skill = guild_checkskill(g, GD_HAWKEYES)) > 0) guildflag |= skill;
 		if ((skill = guild_checkskill(g, GD_HAWKEYES)) > 0) guildflag |= skill;
 		if (guildflag)
 		if (guildflag)
-			map_foreachinarea (skill_guildaura_sub, sd->bl.m,
-				sd->bl.x-2, sd->bl.y-2, sd->bl.x+2, sd->bl.y+2, BL_PC,
+			map_foreachinrange(skill_guildaura_sub, &sd->bl,2, BL_PC,
 				sd->bl.id, sd->status.guild_id, &guildflag);
 				sd->bl.id, sd->status.guild_id, &guildflag);
 	}
 	}
 
 

+ 13 - 21
src/map/pet.c

@@ -318,32 +318,27 @@ static int petskill_castend(struct pet_data *pd,unsigned int tick,int data)
  */
  */
 static int petskill_castend2(struct pet_data *pd, struct block_list *target, short skill_id, short skill_lv, short skill_x, short skill_y, unsigned int tick)
 static int petskill_castend2(struct pet_data *pd, struct block_list *target, short skill_id, short skill_lv, short skill_x, short skill_y, unsigned int tick)
 {	//Invoked after the casting time has passed.
 {	//Invoked after the casting time has passed.
-	short delaytime =0;
+	int delaytime =0;
 
 
 	nullpo_retr(0, pd);
 	nullpo_retr(0, pd);
 
 
 	pd->state.state=MS_IDLE;
 	pd->state.state=MS_IDLE;
 	
 	
-	if (skill_get_inf(skill_id) & INF_GROUND_SKILL)
+	if (skill_get_inf(skill_id)&INF_GROUND_SKILL)
 	{	//Area skill
 	{	//Area skill
 		skill_castend_pos2(&pd->bl, skill_x, skill_y, skill_id, skill_lv, tick,0);
 		skill_castend_pos2(&pd->bl, skill_x, skill_y, skill_id, skill_lv, tick,0);
 	} else { //Targeted Skill
 	} else { //Targeted Skill
-		if (!target || !status_check_skilluse(&pd->bl, target, skill_id, 1))
+	  	if (!target)
 			return 0; 
 			return 0; 
-		//Skills with inf = 4 (cast on self) have view range (assumed party skills)
 		if(!check_distance_bl(&pd->bl, target,
 		if(!check_distance_bl(&pd->bl, target,
-			(skill_get_inf(skill_id) & INF_SELF_SKILL?battle_config.area_size:skill_get_range2(&pd->bl, skill_id, skill_lv))))
+				skill_get_range2(&pd->bl, skill_id, skill_lv)));
 			return 0;
 			return 0;
-		switch( skill_get_nk(skill_id) )
-		{
-			case NK_NO_DAMAGE:
-				skill_castend_nodamage_id(&pd->bl,target, skill_id, skill_lv,tick, 0);
-				break;
-			case NK_SPLASH_DAMAGE:
-			default:
-				skill_castend_damage_id(&pd->bl,target,skill_id,skill_lv,tick,0);
-				break;
-		}
+		if (!status_check_skilluse(&pd->bl, target, skill_id, 1))
+			return 0;
+		if (skill_get_casttype(skill_id) == CAST_NODAMAGE)
+			skill_castend_nodamage_id(&pd->bl, target, skill_id, skill_lv, tick, 0);
+		else
+			skill_castend_damage_id(&pd->bl, target, skill_id, skill_lv, tick,0);
 	}
 	}
 
 
 	if (pd->timer != -1) //The above skill casting could had changed the state (Abracadabra?)
 	if (pd->timer != -1) //The above skill casting could had changed the state (Abracadabra?)
@@ -1460,12 +1455,9 @@ static int pet_ai_sub_hard(struct pet_data *pd,unsigned int tick)
 		return 0;
 		return 0;
 	// ƒyƒbƒg‚É‚æ‚郋�[ƒg
 	// ƒyƒbƒg‚É‚æ‚郋�[ƒg
 	if(!pd->target_id && pd->loot && pd->loot->count < pd->loot->max && DIFF_TICK(gettick(),pd->loot->timer)>0)
 	if(!pd->target_id && pd->loot && pd->loot->count < pd->loot->max && DIFF_TICK(gettick(),pd->loot->timer)>0)
-		map_foreachinarea(pet_ai_sub_hard_lootsearch,pd->bl.m,
-						  pd->bl.x-6,pd->bl.y-6, //If pet_ai_sub_hard_lootsearch limits itself to a range of 5, WHY use AREA_SIZE here? o.O [Skotlex]
-						  pd->bl.x+6,pd->bl.y+6,
-//						  pd->bl.x-AREA_SIZE*2,pd->bl.y-AREA_SIZE*2,
-//						  pd->bl.x+AREA_SIZE*2,pd->bl.y+AREA_SIZE*2,
-						  BL_ITEM,pd,&i);
+		//Use half the pet's range of sight.
+		map_foreachinrange(pet_ai_sub_hard_lootsearch,&pd->bl,
+			pd->db->range2/2, BL_ITEM,pd,&i);
 
 
 	if(sd->pet.intimate > 0) {
 	if(sd->pet.intimate > 0) {
 		dist = distance_bl(&sd->bl, &pd->bl);
 		dist = distance_bl(&sd->bl, &pd->bl);

File diff suppressed because it is too large
+ 227 - 306
src/map/skill.c


+ 10 - 5
src/map/skill.h

@@ -23,9 +23,9 @@
 
 
 //Constants to identify a skill's nk value.
 //Constants to identify a skill's nk value.
 //The NK value applies only to non INF_GROUND_SKILL skills.
 //The NK value applies only to non INF_GROUND_SKILL skills.
-#define NK_NO_DAMAGE 1
-#define NK_SPLASH_DAMAGE 2
-
+#define NK_NO_DAMAGE 0x1
+#define NK_SPLASH 0x2
+//A skill with 3 would be no damage + splash: area of effect.
 //Constants to identify a skill's inf2 value.
 //Constants to identify a skill's inf2 value.
 #define INF2_QUEST_SKILL 1
 #define INF2_QUEST_SKILL 1
 //NPC skills are those that players can't have in their skill tree.
 //NPC skills are those that players can't have in their skill tree.
@@ -130,14 +130,19 @@ struct skill_unit_group;
 
 
 int do_init_skill(void);
 int do_init_skill(void);
 
 
+
+//Returns the cast type of the skill: ground cast, castend damage, castend no damage
+enum { CAST_GROUND, CAST_DAMAGE, CAST_NODAMAGE };
+int skill_get_casttype(int id); //[Skotlex]
 // スキルデ?タベ?スへのアクセサ
 // スキルデ?タベ?スへのアクセサ
 int	skill_get_hit( int id );
 int	skill_get_hit( int id );
 int	skill_get_inf( int id );
 int	skill_get_inf( int id );
 int	skill_get_pl( int id );
 int	skill_get_pl( int id );
 int	skill_get_nk( int id );
 int	skill_get_nk( int id );
 int	skill_get_max( int id );
 int	skill_get_max( int id );
-int skill_get_range( int id , int lv );
-int skill_get_range2(struct block_list *bl, int id, int lv);
+int	skill_get_range( int id , int lv );
+int	skill_get_range2(struct block_list *bl, int id, int lv);
+int	skill_get_splash( int id , int lv );
 int	skill_get_hp( int id ,int lv );
 int	skill_get_hp( int id ,int lv );
 int	skill_get_mhp( int id ,int lv );
 int	skill_get_mhp( int id ,int lv );
 int	skill_get_sp( int id ,int lv );
 int	skill_get_sp( int id ,int lv );

+ 10 - 6
src/map/status.c

@@ -3535,6 +3535,11 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
 			if((elem == 7 || race == 6) && !(flag&1))
 			if((elem == 7 || race == 6) && !(flag&1))
 				return 0;
 				return 0;
 		break;
 		break;
+		case SC_SIGNUMCRUCIS:
+			//Only affects demons and undead.
+			if(race != 6 && !undead_flag)
+				return 0;
+			break;
 		case SC_AETERNA:
 		case SC_AETERNA:
 		  if (sc->data[SC_STONE].timer != -1 || sc->data[SC_FREEZE].timer != -1)
 		  if (sc->data[SC_STONE].timer != -1 || sc->data[SC_FREEZE].timer != -1)
 			  return 0;
 			  return 0;
@@ -5173,10 +5178,9 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
 	case SC_RUWACH:	/* ƒ‹ƒAƒt */
 	case SC_RUWACH:	/* ƒ‹ƒAƒt */
 	case SC_SIGHTBLASTER:
 	case SC_SIGHTBLASTER:
 		{
 		{
-			int range = skill_get_range2(bl,StatusSkillChangeTable[type], sc->data[type].val1);
-			map_foreachinarea( status_change_timer_sub,
-				bl->m, bl->x-range, bl->y-range, bl->x+range,bl->y+range,BL_CHAR,
-				bl,sc,type,tick);
+			map_foreachinrange( status_change_timer_sub, bl, 
+				skill_get_splash(StatusSkillChangeTable[type], sc->data[type].val1),
+				BL_CHAR, bl,sc,type,tick);
 
 
 			if( (--sc->data[type].val2)>0 ){
 			if( (--sc->data[type].val2)>0 ){
 				sc->data[type].timer=add_timer(	/* ƒ^ƒCƒ}?�Ä�Ý’è */
 				sc->data[type].timer=add_timer(	/* ƒ^ƒCƒ}?�Ä�Ý’è */
@@ -5199,8 +5203,8 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
 
 
 	case SC_WARM: //SG skills [Komurka]
 	case SC_WARM: //SG skills [Komurka]
 		if( (--sc->data[type].val2)>0){
 		if( (--sc->data[type].val2)>0){
-			map_foreachinarea( status_change_timer_sub,
-				bl->m, bl->x-sc->data[type].val4, bl->y-sc->data[type].val4, bl->x+sc->data[type].val4,bl->y+sc->data[type].val4,BL_CHAR,
+			map_foreachinrange( status_change_timer_sub, bl,
+				sc->data[type].val4,BL_CHAR,
 				bl,sc,type,tick);
 				bl,sc,type,tick);
 			sc->data[type].timer=add_timer(tick+100, status_change_timer,bl->id, data);
 			sc->data[type].timer=add_timer(tick+100, status_change_timer,bl->id, data);
 			return 0;
 			return 0;

Some files were not shown because too many files changed in this diff