瀏覽代碼

Implemented Renewal ASPD formula(bugreport:5644)
- all suggestions/contributions/comments regarding RE ASPD ATM will be entertained in [tid:63256]
Fixed bugreport:6176 where WM_LULLABY_DEEPSLEEP doesn't target all party and guild members.
Temporarily disable the official walk path until the right algorithm is formulated.

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

rud0lp20 13 年之前
父節點
當前提交
425f381859
共有 13 個文件被更改,包括 504 次插入314 次删除
  1. 5 2
      conf/battle/player.conf
  2. 0 0
      db/pre-re/job_db1.txt
  3. 1 1
      db/re/item_db.txt
  4. 271 0
      db/re/job_db1.txt
  5. 0 230
      db/re/job_db_extra.txt
  6. 3 1
      src/map/battle.c
  7. 1 0
      src/map/battle.h
  8. 10 0
      src/map/config/renewal.h
  9. 4 0
      src/map/pc.c
  10. 2 2
      src/map/skill.c
  11. 200 75
      src/map/status.c
  12. 3 0
      src/map/status.h
  13. 4 3
      src/map/unit.c

+ 5 - 2
conf/battle/player.conf

@@ -61,8 +61,11 @@ natural_heal_skill_interval: 10000
 // The maximum weight for a character to carry when the character stops healing naturally. (in %)
 // The maximum weight for a character to carry when the character stops healing naturally. (in %)
 natural_heal_weight_rate: 50
 natural_heal_weight_rate: 50
 
 
-// Maximum atk speed. (Default 193, Highest allowed 199)
-max_aspd: 193
+// Maximum atk speed. (Default 190, Highest allowed 199)
+max_aspd: 190
+
+// Same as max_aspd, but for 3rd classes. (Default 193, Highest allowed 199)
+max_third_aspd: 193
 
 
 // Maximum walk speed rate (200 would be capped to twice the normal speed)
 // Maximum walk speed rate (200 would be capped to twice the normal speed)
 max_walk_speed: 300
 max_walk_speed: 300

+ 0 - 0
db/job_db1.txt → db/pre-re/job_db1.txt


+ 1 - 1
db/re/item_db.txt

@@ -177,7 +177,7 @@
 675,Silver_Coin,Silver Coin,3,5000,,40,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 675,Silver_Coin,Silver Coin,3,5000,,40,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 676,Silver_Coin_Moneybag,Bag of Silver Coins,3,50000,,400,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 676,Silver_Coin_Moneybag,Bag of Silver Coins,3,50000,,400,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 677,White_Gold_Coin,Platinum Coin,3,2000,,40,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 677,White_Gold_Coin,Platinum Coin,3,2000,,40,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-678,Poison_Bottle,Poison Bottle,2,5000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(Class == Job_Assassin_Cross || Class == Job_Guillotine_Cross || Class == Job_Guillotine_Cross_T) { sc_start SC_DPoison,60000,0; sc_start SC_ASPDPOTION3,60000,0; } else percentheal -100,-100; },{},{}
+678,Poison_Bottle,Poison Bottle,2,5000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(Class == Job_Assassin_Cross || Class == Job_Guillotine_Cross || Class == Job_Guillotine_Cross_T) { sc_start SC_DPoison,60000,0; sc_start SC_ASPDPOTION3,60000,9; } else percentheal -100,-100; },{},{}
 679,Gold_Pill,Pilule,2,5000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0; },{},{}
 679,Gold_Pill,Pilule,2,5000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0; },{},{}
 680,Magical_Carnation,Magic Carnation,0,0,,1000,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,20; },{},{}
 680,Magical_Carnation,Magic Carnation,0,0,,1000,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,20; },{},{}
 681,Memory_Of_Wedding,Sweet Memory of Marriage,2,50000,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if (getpartnerid()) sc_start SC_WEDDING,600000,0; },{},{}
 681,Memory_Of_Wedding,Sweet Memory of Marriage,2,50000,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if (getpartnerid()) sc_start SC_WEDDING,600000,0; },{},{}

+ 271 - 0
db/re/job_db1.txt

@@ -0,0 +1,271 @@
+// Job-specific Values Database
+//
+// Structure of Database:
+// JobID,Weight,HPFactor,HPMultiplicator,SPFactor,Unarmed,Dagger,1HSword,2HSword,1HSpear,2HSpear,1HAxe,2HAxe,1HMace,2HMace(unused),Rod,Bow,Knuckle,Instrument,Whip,Book,Katar,Revolver,Rifle,Gatling Gun,Shotgun,Grenade Launcher,Fuuma Shuriken,2HStaff,Shield
+//
+// Novice
+0,	20000,0    ,500  ,100  ,440  ,590  ,610  ,2000 ,2000 ,2000 ,540  ,2000 ,540  ,540  ,690  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,690  ,540  
+// Swordman
+1,	28000,70   ,500  ,200  ,440  ,510  ,510  ,580  ,610  ,690  ,590  ,640  ,540  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Magician
+2,	22000,30   ,500  ,600  ,540  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,640  
+// Archer
+3,	26000,50   ,500  ,200  ,440  ,590  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530  
+// Acolyte
+4,	24000,40   ,500  ,500  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  ,490  ,640  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,640  ,510  
+// Merchant
+5,	28000,40   ,500  ,300  ,440  ,560  ,560  ,2000 ,2000 ,2000 ,520  ,590  ,540  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Thief
+6,	24000,50   ,500  ,200  ,440  ,520  ,540  ,2000 ,2000 ,2000 ,640  ,2000 ,2000 ,2000 ,2000 ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500  
+// Knight
+7,	28000,150  ,500  ,300  ,440  ,530  ,490  ,560  ,590  ,690  ,540  ,590  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Priest
+8,	26000,75   ,500  ,800  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,470  ,470  ,640  ,2000 ,640  ,2000 ,2000 ,480  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,640  ,490  
+// Wizard
+9,	24000,55   ,500  ,900  ,540  ,580  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,570  ,620  
+// Blacksmith
+10,	30000,90   ,500  ,400  ,440  ,540  ,540  ,2000 ,2000 ,2000 ,500  ,570  ,520  ,520  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Hunter
+11,	27000,85   ,500  ,400  ,440  ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530  
+// Assassin
+12,	24000,110  ,500  ,400  ,440  ,460  ,540  ,2000 ,2000 ,2000 ,550  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,460  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500  
+// Knight (Peco)
+13,	28000,150  ,500  ,300  ,440  ,530  ,490  ,560  ,590  ,690  ,540  ,590  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Crusader
+14,	28000,110  ,700  ,470  ,440  ,520  ,470  ,590  ,570  ,560  ,540  ,590  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Monk
+15,	26000,90   ,650  ,470  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,470  ,470  ,640  ,2000 ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,620  ,490  
+// Sage
+16,	24000,75   ,500  ,700  ,490  ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,2000 ,2000 ,2000 ,2000 ,470  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,590  
+// Rogue
+17,	24000,85   ,500  ,500  ,440  ,490  ,540  ,2000 ,2000 ,2000 ,2030 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Alchemist
+18,	30000,90   ,500  ,400  ,440  ,540  ,490  ,2000 ,2000 ,2000 ,490  ,560  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,480  
+// Bard
+19,	27000,75   ,300  ,600  ,440  ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520  ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,510  
+// Dancer
+20,	27000,75   ,300  ,600  ,400  ,530  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,480  ,2000 ,2000 ,450  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,470  
+// Crusader (Peco)
+21,	28000,110  ,700  ,470  ,440  ,520  ,470  ,590  ,570  ,560  ,540  ,590  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Wedding
+22,	20000,0    ,500  ,100  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 
+// Super Novice
+23,	20000,0    ,500  ,100  ,440  ,590  ,610  ,2000 ,2000 ,2000 ,540  ,2000 ,540  ,540  ,690  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,690  ,540  
+// Gunslinger
+24,	28000,88   ,0    ,450  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  ,590  ,440  ,940  ,1040 ,2000 ,2000 ,600  
+// Ninja
+25,	26000,80   ,0    ,515  ,440  ,470  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,2000 ,500  
+// Novice High
+4001,	20000,0    ,500  ,100  ,440  ,590  ,610  ,2000 ,2000 ,2000 ,540  ,2000 ,540  ,540  ,690  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,690  ,540  
+// Swordman High
+4002,	28000,70   ,500  ,200  ,440  ,510  ,510  ,580  ,610  ,690  ,590  ,640  ,540  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Magician High
+4003,	22000,30   ,500  ,600  ,540  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,640  
+// Archer High
+4004,	26000,50   ,500  ,200  ,440  ,590  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530  
+// Acolyte High
+4005,	24000,40   ,500  ,500  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  ,490  ,640  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,640  ,510  
+// Merchant High
+4006,	28000,40   ,500  ,300  ,440  ,560  ,560  ,2000 ,2000 ,2000 ,520  ,590  ,540  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Thief High
+4007,	24000,50   ,500  ,200  ,440  ,520  ,540  ,2000 ,2000 ,2000 ,640  ,2000 ,2000 ,2000 ,2000 ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500  
+// Lord Knight
+4008,	28000,150  ,500  ,300  ,440  ,530  ,490  ,560  ,590  ,690  ,540  ,590  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// High Priest
+4009,	26000,75   ,500  ,800  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,470  ,470  ,640  ,2000 ,2000 ,2000 ,2000 ,480  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,640  ,490  
+// High Wizard
+4010,	24000,55   ,500  ,900  ,540  ,580  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,570  ,620  
+// Whitesmith
+4011,	30000,90   ,500  ,400  ,440  ,540  ,540  ,2000 ,2000 ,2000 ,500  ,570  ,520  ,520  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Sniper
+4012,	27000,85   ,500  ,400  ,440  ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530  
+// Assassin Cross
+4013,	24000,110  ,500  ,400  ,440  ,460  ,540  ,2000 ,2000 ,2000 ,550  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,460  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500  
+// Lord Knight (Peco)
+4014,	28000,150  ,500  ,300  ,440  ,530  ,490  ,560  ,590  ,690  ,540  ,590  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Paladin
+4015,	28000,110  ,700  ,470  ,440  ,520  ,470  ,590  ,570  ,560  ,540  ,590  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Champion
+4016,	26000,90   ,650  ,470  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,470  ,470  ,640  ,2000 ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,620  ,490  
+// Professor
+4017,	24000,75   ,500  ,700  ,490  ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,2000 ,2000 ,2000 ,2000 ,470  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,590  
+// Stalker
+4018,	24000,85   ,500  ,500  ,440  ,490  ,540  ,2000 ,2000 ,2000 ,2030 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Creator
+4019,	30000,90   ,500  ,400  ,440  ,540  ,490  ,490  ,2000 ,2000 ,490  ,560  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,480  
+// Clown
+4020,	27000,75   ,300  ,600  ,440  ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520  ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,510  
+// Gypsy
+4021,	27000,75   ,300  ,600  ,440  ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520  ,2000 ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,510  
+// Paladin (Peco)
+4022,	28000,110  ,700  ,470  ,440  ,520  ,470  ,590  ,570  ,560  ,540  ,590  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Baby Novice
+4023,	20000,0    ,500  ,100  ,440  ,590  ,610  ,2000 ,2000 ,2000 ,540  ,2000 ,540  ,540  ,690  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,690  ,540  
+// Baby Swordman
+4024,	28000,70   ,500  ,200  ,440  ,510  ,510  ,580  ,610  ,690  ,590  ,640  ,540  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Baby Magician
+4025,	22000,30   ,500  ,600  ,540  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,640  
+// Baby Archer
+4026,	26000,50   ,500  ,200  ,440  ,590  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530  
+// Baby Acolyte
+4027,	24000,40   ,500  ,500  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  ,490  ,640  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,640  ,510  
+// Baby Merchant
+4028,	28000,40   ,500  ,300  ,440  ,560  ,560  ,2000 ,2000 ,2000 ,520  ,590  ,540  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Baby Thief
+4029,	24000,50   ,500  ,200  ,440  ,520  ,540  ,2000 ,2000 ,2000 ,640  ,2000 ,2000 ,2000 ,2000 ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500  
+// Baby Knight
+4030,	28000,150  ,500  ,300  ,440  ,530  ,490  ,560  ,590  ,690  ,540  ,590  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Baby Priest
+4031,	26000,75   ,500  ,800  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,470  ,470  ,640  ,2000 ,640  ,2000 ,2000 ,480  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,640  ,490  
+// Baby Wizard
+4032,	24000,55   ,500  ,900  ,540  ,580  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,570  ,620  
+// Baby Blacksmith
+4033,	30000,90   ,500  ,400  ,440  ,540  ,540  ,2000 ,2000 ,2000 ,500  ,570  ,520  ,520  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Baby Hunter
+4034,	27000,85   ,500  ,400  ,440  ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530  
+// Baby Assassin
+4035,	24000,110  ,500  ,400  ,440  ,460  ,540  ,2000 ,2000 ,2000 ,550  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,460  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500  
+// Baby Knight (Peco)
+4036,	28000,150  ,500  ,300  ,440  ,530  ,490  ,560  ,590  ,690  ,540  ,590  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Baby Crusader
+4037,	28000,110  ,700  ,470  ,440  ,520  ,470  ,590  ,570  ,560  ,540  ,590  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Baby Monk
+4038,	26000,90   ,650  ,470  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,470  ,470  ,640  ,2000 ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,620  ,490  
+// Baby Sage
+4039,	24000,75   ,500  ,700  ,490  ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,2000 ,2000 ,2000 ,2000 ,470  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,590  
+// Baby Rogue
+4040,	24000,85   ,500  ,500  ,440  ,490  ,540  ,2000 ,2000 ,2000 ,2030 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Baby Alchemist
+4041,	30000,90   ,500  ,400  ,440  ,540  ,490  ,2000 ,2000 ,2000 ,490  ,560  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,480  
+// Baby Bard
+4042,	27000,75   ,300  ,600  ,440  ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520  ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,510  
+// Baby Dancer
+4043,	27000,75   ,300  ,600  ,400  ,530  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,480  ,2000 ,2000 ,450  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,470  
+// Baby Crusader (Peco)
+4044,	28000,110  ,700  ,470  ,440  ,520  ,470  ,590  ,570  ,560  ,540  ,590  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  
+// Baby Super Novice
+4045,	20000,0    ,500  ,100  ,440  ,590  ,610  ,2000 ,2000 ,2000 ,540  ,2000 ,540  ,540  ,690  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,690  ,540  
+// Taekwon
+4046,	28000,70   ,500  ,200  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500  
+// Star Knight
+4047,	28000,90   ,650  ,470  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500  
+// Star Knight (flying)
+4048,	28000,90   ,650  ,470  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500  
+// Soul Linker
+4049,	24000,75   ,500  ,900  ,540  ,440  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,570  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,570  ,620 
+// Gangsi (Bongun/Munak)
+4050,	24000,40   ,500  ,500  ,400  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600  ,600  ,600  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600  ,500
+// Death Knight
+4051,	28000,150  ,500  ,300  ,400  ,500  ,500  ,550  ,600  ,600  ,700  ,700  ,650  ,700  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500
+// Dark Collector
+4052,	24000,75   ,500  ,700  ,450  ,525  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,625  ,2000 ,2000 ,2000 ,2000 ,550  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 625, 0
+// Rune Knight (Regular)
+4054,	28000,150  ,500  ,300  ,440  ,540  ,560  ,590  ,620  ,560  ,620  ,640  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Warlock (Regular)
+4055,	24000,55   ,500  ,900  ,490  ,560  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,540
+// Ranger (Regular)
+4056,	27000,85   ,500  ,400  ,440  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520
+// Arch Bishop (Regular)
+4057,	26000,75   ,500  ,800  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,440  ,2000 ,640  ,2000 ,540  ,2000 ,2000 ,480  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,540
+// Mechanic (Regular)
+4058,	30000,90   ,500  ,400  ,440  ,640  ,690  ,2000 ,2000 ,2000 ,490  ,520  ,520  ,520  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500
+// Guillotine Cross (Regular)
+4059,	24000,110  ,500  ,400  ,440  ,460  ,690  ,2000 ,2000 ,2000 ,840  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,460  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530
+// Rune Knight (Trans)
+4060,	28000,150  ,500  ,300  ,440  ,540  ,560  ,590  ,620  ,560  ,620  ,640  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Warlock (Trans)
+4061,	24000,55   ,500  ,900  ,490  ,560  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,540
+// Ranger (Trans)
+4062,	27000,85   ,500  ,400  ,440  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520
+// Arch Bishop (Trans)
+4063,	26000,75   ,500  ,800  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,440  ,2000 ,640  ,2000 ,540  ,2000 ,2000 ,480  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,540
+// Mechanic (Trans)
+4064,	30000,90   ,500  ,400  ,440  ,640  ,690  ,2000 ,2000 ,2000 ,490  ,520  ,520  ,520  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500
+// Guillotine Cross (Trans)
+4065,	24000,110  ,500  ,400  ,440  ,460  ,690  ,2000 ,2000 ,2000 ,840  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,460  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530
+// Royal Guard (Regular)
+4066,	28000,110  ,700  ,470  ,440  ,510  ,490  ,530  ,540  ,540  ,520  ,560  ,480  ,480  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Sorcerer (Regular)
+4067,	24000,75   ,500  ,700  ,440  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  ,490
+// Minstrel (Regular)
+4068,	27000,75   ,300  ,600  ,440  ,560  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,510 
+// Wanderer (Regular)
+4069,	27000,75   ,300  ,600  ,440  ,560  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,510
+// Sura (Regular)
+4070,	26000,90   ,650  ,470  ,420  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,470  ,470  ,520  ,2000 ,430  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,470
+// Genetic (Regular)
+4071,	30000,90   ,500  ,400  ,440  ,540  ,480  ,2000 ,2000 ,2000 ,550  ,550  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,480
+// Shadow Chaser (Regular)
+4072,	24000,85   ,500  ,500  ,440  ,470  ,510  ,2000 ,2000 ,2000 ,2030 ,2000 ,2000 ,2000 ,2000 ,510  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Royal Guard (Trans)
+4073,	28000,110  ,700  ,470  ,440  ,510  ,490  ,530  ,540  ,540  ,520  ,560  ,480  ,480  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Sorcerer (Trans)
+4074,	24000,75   ,500  ,700  ,440  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  ,490
+// Minstrel (Trans)
+4075,	27000,75   ,300  ,600  ,440  ,560  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,510 
+// Wanderer (Trans)
+4076,	27000,75   ,300  ,600  ,440  ,560  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,510
+// Sura (Trans)
+4077,	26000,90   ,650  ,470  ,420  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,470  ,470  ,520  ,2000 ,430  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,470
+// Genetic (Trans)
+4078,	30000,90   ,500  ,400  ,440  ,540  ,480  ,2000 ,2000 ,2000 ,550  ,550  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,480
+// Shadow Chaser (Trans)
+4079,	24000,85   ,500  ,500  ,440  ,470  ,510  ,2000 ,2000 ,2000 ,2030 ,2000 ,2000 ,2000 ,2000 ,510  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Rune Knight (Dragon) (Regular)
+4080,	28000,150  ,500  ,300  ,440  ,540  ,560  ,590  ,620  ,560  ,620  ,640  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Rune Knight (Dragon) (Trans)
+4081,	28000,150  ,500  ,300  ,440  ,540  ,560  ,590  ,620  ,560  ,620  ,640  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Royal Guard (Gryphon) (Regular)
+4082,	28000,110  ,700  ,470  ,440  ,510  ,490  ,530  ,540  ,540  ,520  ,560  ,480  ,480  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Royal Guard (Gryphon) (Trans)
+4083,	28000,110  ,700  ,470  ,440  ,510  ,490  ,530  ,540  ,540  ,520  ,560  ,480  ,480  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Ranger (Waug) (Regular)
+4084,	27000,85   ,500  ,400  ,440  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520
+// Ranger (Waug) (Trans)
+4085,	27000,85   ,500  ,400  ,440  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520
+// Mechanic (Mado) (Regular)
+4086,	30000,90   ,500  ,400  ,440  ,640  ,690  ,2000 ,2000 ,2000 ,490  ,520  ,520  ,520  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500
+// Mechanic (Mado) (Trans)
+4087,	30000,90   ,500  ,400  ,440  ,640  ,690  ,2000 ,2000 ,2000 ,490  ,520  ,520  ,520  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500
+// Baby Rune Knight
+4096,	28000,150  ,500  ,300  ,440  ,540  ,560  ,590  ,620  ,560  ,620  ,640  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Baby Warlock
+4097,	24000,55   ,500  ,900  ,490  ,560  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,540
+// Baby Ranger
+4098,	27000,85   ,500  ,400  ,440  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520
+// Baby Arch Bishop
+4099,	26000,75   ,500  ,800  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,440  ,2000 ,640  ,2000 ,540  ,2000 ,2000 ,480  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,590  ,540
+// Baby Mechanic
+4100,	30000,90   ,500  ,400  ,440  ,640  ,690  ,2000 ,2000 ,2000 ,490  ,520  ,520  ,520  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500
+// Baby Guillotine Cross
+4101,	24000,110  ,500  ,400  ,440  ,460  ,690  ,2000 ,2000 ,2000 ,840  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,460  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530
+// Baby Royal Guard
+4102,	28000,110  ,700  ,470  ,440  ,510  ,490  ,530  ,540  ,540  ,520  ,560  ,480  ,480  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Baby Sorcerer
+4103,	24000,75   ,500  ,700  ,440  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490  ,490
+// Baby Minstrel
+4104,	27000,75   ,300  ,600  ,440  ,560  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,510 
+// Baby Wanderer
+4105,	27000,75   ,300  ,600  ,440  ,560  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,2000 ,2000 ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,510
+// Baby Sura
+4106,	26000,90   ,650  ,470  ,420  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,470  ,470  ,520  ,2000 ,430  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,540  ,470
+// Baby Genetic
+4107,	30000,90   ,500  ,400  ,440  ,540  ,480  ,2000 ,2000 ,2000 ,550  ,550  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,480
+// Baby Shadow Chaser
+4108,	24000,85   ,500  ,500  ,440  ,470  ,510  ,2000 ,2000 ,2000 ,2030 ,2000 ,2000 ,2000 ,2000 ,510  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Baby Rune Knight (Dragon)
+4109,	28000,150  ,500  ,300  ,440  ,540  ,560  ,590  ,620  ,560  ,620  ,640  ,490  ,490  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Baby Royal Guard (Gryphon)
+4110,	28000,110  ,700  ,470  ,440  ,510  ,490  ,530  ,540  ,540  ,520  ,560  ,480  ,480  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
+// Baby Ranger (Waug)
+4111,	27000,85   ,500  ,400  ,440  ,540  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520
+// Baby Mechanic (Mado)
+4112,	30000,90   ,500  ,400  ,440  ,640  ,690  ,2000 ,2000 ,2000 ,490  ,520  ,520  ,520  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500
+// Super Novice (Expanded)
+4190,	20000,0    ,500  ,100  ,500  ,650  ,700  ,2000 ,2000 ,2000 ,800  ,2000 ,700  ,700  ,650  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 650 ,540
+// Super Baby (Expanded)
+4191,	20000,0    ,500  ,100  ,500  ,650  ,700  ,2000 ,2000 ,2000 ,800  ,2000 ,700  ,700  ,650  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 650 ,540
+// Kagerou
+4211,	26000,80   ,  0  ,515  ,400  ,500  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 750 ,2000 ,500
+// Oboro
+4212,	26000,80   ,  0  ,515  ,400  ,500  ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 750 ,2000 ,500

+ 0 - 230
db/re/job_db_extra.txt

@@ -1,230 +0,0 @@
-// Job-specific values database,
-// Used for Renewal-exclusive values, such as the shield ASPD penalty
-// Job ID, Shield ASPD Penalty (value / 10)
-
-//Novice
-0,100
-//Swordman
-1,50
-//Mage
-2,50
-//Archer
-3,50
-//Acolyte
-4,50
-//Merchant
-5,50
-//Thief
-6,60
-//Knight
-7,50
-//Priest
-8,50
-//Wizard
-9,50
-//Blacksmith
-10,50
-//Hunter
-11,90
-//Assassin
-12,60
-//Knight2
-13,50
-//Crusader
-14,50
-//Monk
-15,50
-//Sage
-16,50
-//Rogue
-17,50
-//Alchem
-18,50
-//Alchemist
-18,50
-//Bard
-19,70
-//Dancer
-20,70
-//Crusader2
-21,50
-//Wedding
-22,50
-//SuperNovice
-23,50
-//Gunslinger
-24,60
-//Ninja
-25,60
-//Xmas
-26,50
-//Summer
-27,50
-//NoviceHigh
-4001,100
-//SwordmanHigh
-4002,50
-//MageHigh
-4003,50
-//ArcherHigh
-4004,50
-//AcolyteHigh
-4005,50
-//MerchantHigh
-4006,50
-//ThiefHigh
-4007,60
-//LordKnight
-4008,50
-//HighPriest
-4009,50
-//HighWizard
-4010,50
-//Whitesmith
-4011,50
-//Sniper
-4012,90
-//AssassinCross
-4013,60
-//LordKnight2
-4014,50
-//Paladin
-4015,50
-//Champion
-4016,50
-//Professor
-4017,50
-//Stalker
-4018,50
-//Creator
-4019,50
-//Clown
-4020,70
-//Gypsy
-4021,70
-//Paladin2
-4022,50
-//Baby
-4023,100
-//BabySwordman
-4024,50
-//BabyMage
-4025,50
-//BabyArcher
-4026,50
-//BabyAcolyte
-4027,50
-//BabyMerchant
-4028,50
-//BabyThief
-4029,60
-//BabyKnight
-4030,50
-//BabyPriest
-4031,50
-//BabyWizard
-4032,50
-//BabyBlacksmith
-4033,50
-//BabyHunter
-4034,90
-//BabyAssassin
-4035,60
-//BabyKnight2
-4036,50
-//BabyCrusader
-4037,50
-//BabyMonk
-4038,50
-//BabySage
-4039,50
-//BabyRogue
-4040,50
-//BabyAlchem
-4041,50
-//BabyAlchemist
-4041,50
-//BabyBard
-4042,70
-//BabyDancer
-4043,70
-//BabyCrusader2
-4044,50
-//SuperBaby
-4045,50
-//Taekwon
-4046,50
-//StarGladiator
-4047,50
-//StarGladiator2
-4048,50
-//SoulLinker
-4049,80
-//RuneKnight
-4054,50
-//Warlock
-4055,50
-//Ranger
-4056,80
-//ArchBishop
-4057,100
-//Mechanic
-4058,60
-//GuillotineCross
-4059,90
-//RuneKnightT
-4060,50
-//WarlockT
-4061,50
-//RangerT
-4062,80
-//ArchBishopT
-4063,100
-//MechanicT
-4064,60
-//GuillotineCrossT
-4065,90
-//RoyalGuard
-4066,50
-//Sorcerer
-4067,50
-//Minstrel
-4068,70
-//Wanderer
-4069,70
-//Sura
-4070,50
-//Genetic
-4071,50
-//ShadowChaser
-4072,40
-//RoyalGuardT
-4073,50
-//SorcererT
-4074,50
-//MinstrelT
-4075,50
-//WandererT
-4076,50
-//SuraT
-4077,50
-//GeneticT
-4078,50
-//ShadowChaserT
-4079,40
-//RuneKnight2
-4080,50
-//RuneKnightT2
-4081,50
-//RoyalGuard2
-4082,50
-//RoyalGuardT2
-4083,50
-//Ranger2
-4084,50
-//RangerT2
-4085,50
-//Mechanic2
-4086,50
-//MechanicT2
-4087,50

+ 3 - 1
src/map/battle.c

@@ -5160,7 +5160,8 @@ static const struct _battle_data {
 	{ "natural_heal_skill_interval",        &battle_config.natural_heal_skill_interval,     10000,  NATURAL_HEAL_INTERVAL, INT_MAX, },
 	{ "natural_heal_skill_interval",        &battle_config.natural_heal_skill_interval,     10000,  NATURAL_HEAL_INTERVAL, INT_MAX, },
 	{ "natural_heal_weight_rate",           &battle_config.natural_heal_weight_rate,        50,     50,     101             },
 	{ "natural_heal_weight_rate",           &battle_config.natural_heal_weight_rate,        50,     50,     101             },
 	{ "arrow_decrement",                    &battle_config.arrow_decrement,                 1,      0,      2,              },
 	{ "arrow_decrement",                    &battle_config.arrow_decrement,                 1,      0,      2,              },
-	{ "max_aspd",                           &battle_config.max_aspd,                        199,    100,    199,            },
+	{ "max_aspd",                           &battle_config.max_aspd,                        190,    100,    199,            },
+	{ "max_third_aspd",                     &battle_config.max_third_aspd,                  193,    100,    199,            },
 	{ "max_walk_speed",                     &battle_config.max_walk_speed,                  300,    100,    100*DEFAULT_WALK_SPEED, },
 	{ "max_walk_speed",                     &battle_config.max_walk_speed,                  300,    100,    100*DEFAULT_WALK_SPEED, },
 	{ "max_lv",                             &battle_config.max_lv,                          99,     0,      MAX_LEVEL,		},
 	{ "max_lv",                             &battle_config.max_lv,                          99,     0,      MAX_LEVEL,		},
 	{ "aura_lv",                            &battle_config.aura_lv,                         99,     0,      INT_MAX,        },
 	{ "aura_lv",                            &battle_config.aura_lv,                         99,     0,      INT_MAX,        },
@@ -5453,6 +5454,7 @@ void battle_adjust_conf()
 {
 {
 	battle_config.monster_max_aspd = 2000 - battle_config.monster_max_aspd*10;
 	battle_config.monster_max_aspd = 2000 - battle_config.monster_max_aspd*10;
 	battle_config.max_aspd = 2000 - battle_config.max_aspd*10;
 	battle_config.max_aspd = 2000 - battle_config.max_aspd*10;
+	battle_config.max_third_aspd = 2000 - battle_config.max_third_aspd*10;
 	battle_config.max_walk_speed = 100*DEFAULT_WALK_SPEED/battle_config.max_walk_speed;
 	battle_config.max_walk_speed = 100*DEFAULT_WALK_SPEED/battle_config.max_walk_speed;
 	battle_config.max_cart_weight *= 10;
 	battle_config.max_cart_weight *= 10;
 	
 	

+ 1 - 0
src/map/battle.h

@@ -469,6 +469,7 @@ extern struct Battle_Config
 	int max_third_parameter;
 	int max_third_parameter;
 	int max_baby_third_parameter;
 	int max_baby_third_parameter;
 	int atcommand_max_stat_bypass;
 	int atcommand_max_stat_bypass;
+	int max_third_aspd;
 
 
 	int mvp_tomb_enabled;
 	int mvp_tomb_enabled;
 	
 	

+ 10 - 0
src/map/config/renewal.h

@@ -65,4 +65,14 @@
 ///  - weapon and status ATK are increased
 ///  - weapon and status ATK are increased
 #define RENEWAL_EDP
 #define RENEWAL_EDP
 
 
+/// renewal ASPD [malufett]
+/// (disable by commenting the line)
+/// 
+/// leave this line to enable renewal ASPD
+/// - shield penalty is applied
+/// - agi has a greater factor to your ASPD increase
+/// - there is a change in how skill/items give ASPD
+/// - some skills/items ASPD bonus won't stack
+#define RENEWAL_ASPD
+
 #endif // _CONFIG_RENEWAL_H_
 #endif // _CONFIG_RENEWAL_H_

+ 4 - 0
src/map/pc.c

@@ -2214,7 +2214,11 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
 		break;
 		break;
 	case SP_ASPD_RATE:	//Stackable increase - Made it linear as per rodatazone
 	case SP_ASPD_RATE:	//Stackable increase - Made it linear as per rodatazone
 		if(sd->state.lr_flag != 2)
 		if(sd->state.lr_flag != 2)
+#ifndef RENEWAL_ASPD
 			status->aspd_rate -= 10*val;
 			status->aspd_rate -= 10*val;
+#else
+			status->aspd_rate2 += val;
+#endif
 		break;
 		break;
 	case SP_HP_RECOV_RATE:
 	case SP_HP_RECOV_RATE:
 		if(sd->state.lr_flag != 2)
 		if(sd->state.lr_flag != 2)

+ 2 - 2
src/map/skill.c

@@ -4352,7 +4352,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
 		break;
 		break;
 
 
 	case WM_LULLABY_DEEPSLEEP:
 	case WM_LULLABY_DEEPSLEEP:
-		if( rnd()%100 < 88 + 2 * skilllv )
+		if( bl != src && rnd()%100 < 88 + 2 * skilllv )
 			sc_start(bl,status_skill2sc(skillid),100,skilllv,skill_get_time(skillid,skilllv));
 			sc_start(bl,status_skill2sc(skillid),100,skilllv,skill_get_time(skillid,skilllv));
 		break;
 		break;
 
 
@@ -9556,7 +9556,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk
 	case WM_LULLABY_DEEPSLEEP:
 	case WM_LULLABY_DEEPSLEEP:
 		i = skill_get_splash(skillid,skilllv);
 		i = skill_get_splash(skillid,skilllv);
 		map_foreachinarea(skill_area_sub,src->m,x-i,y-i,x+i,y+i,BL_CHAR,
 		map_foreachinarea(skill_area_sub,src->m,x-i,y-i,x+i,y+i,BL_CHAR,
-			src,skillid,skilllv,tick,flag|BCT_ENEMY|1,skill_castend_damage_id);
+			src,skillid,skilllv,tick,flag|(skillid==WM_LULLABY_DEEPSLEEP?BCT_ALL:BCT_ENEMY)|1,skill_castend_damage_id);
 		break;
 		break;
 	/**
 	/**
 	 * Guilotine Cross
 	 * Guilotine Cross

+ 200 - 75
src/map/status.c

@@ -37,7 +37,7 @@
 #include <stdlib.h>
 #include <stdlib.h>
 #include <memory.h>
 #include <memory.h>
 #include <string.h>
 #include <string.h>
-
+#include <math.h>
 
 
 //Regen related flags.
 //Regen related flags.
 enum e_regen
 enum e_regen
@@ -53,7 +53,11 @@ static int hp_coefficient[CLASS_COUNT];
 static int hp_coefficient2[CLASS_COUNT];
 static int hp_coefficient2[CLASS_COUNT];
 static int hp_sigma_val[CLASS_COUNT][MAX_LEVEL+1];
 static int hp_sigma_val[CLASS_COUNT][MAX_LEVEL+1];
 static int sp_coefficient[CLASS_COUNT];
 static int sp_coefficient[CLASS_COUNT];
+#ifdef RENEWAL_ASPD
+static int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1];
+#else
 static int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE];	//[blackhole89]
 static int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE];	//[blackhole89]
+#endif
 
 
 // bonus values and upgrade chances for refining equipment
 // bonus values and upgrade chances for refining equipment
 static struct {
 static struct {
@@ -64,13 +68,7 @@ static struct {
 
 
 static int atkmods[3][MAX_WEAPON_TYPE];	// •�ŠíATKƒTƒCƒY�C�³(size_fix.txt)
 static int atkmods[3][MAX_WEAPON_TYPE];	// •�ŠíATKƒTƒCƒY�C�³(size_fix.txt)
 static char job_bonus[CLASS_COUNT][MAX_LEVEL];
 static char job_bonus[CLASS_COUNT][MAX_LEVEL];
-#ifdef RENEWAL
-enum {
-	SHIELD_ASPD,
-	RE_JOB_DB_MAX,
-} RE_JOB_DB;
-static int re_job_db[CLASS_COUNT][RE_JOB_DB_MAX];//[RRInd]
-#endif
+
 static struct eri *sc_data_ers; //For sc_data entries
 static struct eri *sc_data_ers; //For sc_data entries
 static struct status_data dummy_status;
 static struct status_data dummy_status;
 
 
@@ -1753,7 +1751,29 @@ int status_check_visibility(struct block_list *src, struct block_list *target)
 int status_base_amotion_pc(struct map_session_data* sd, struct status_data* status)
 int status_base_amotion_pc(struct map_session_data* sd, struct status_data* status)
 {
 {
 	int amotion;
 	int amotion;
-	
+#ifdef RENEWAL_ASPD
+	short mod = -1;
+
+	switch( sd->weapontype2 ){ // adjustment for dual weilding
+		case W_DAGGER:	mod = 0;	break; // 0, 1, 1
+		case W_1HSWORD:		
+		case W_1HAXE:	mod = 1;
+			if( (sd->class_&MAPID_THIRDMASK) == MAPID_GUILLOTINE_CROSS ) // 0, 2, 3
+				mod = sd->weapontype2 / W_1HSWORD + W_1HSWORD / sd->weapontype2 ;		
+	}
+
+	amotion = ( sd->status.weapon < MAX_WEAPON_TYPE && mod < 0 )
+			? (aspd_base[pc_class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
+			: ((aspd_base[pc_class2idx(sd->status.class_)][sd->weapontype2] // dual-wield
+			+ aspd_base[pc_class2idx(sd->status.class_)][sd->weapontype2]) * 6 / 10 + 10 * mod
+			- aspd_base[pc_class2idx(sd->status.class_)][sd->weapontype2]
+			+ aspd_base[pc_class2idx(sd->status.class_)][sd->weapontype1]);		 
+
+	if ( sd->status.shield )
+			amotion += ( 2000 - aspd_base[pc_class2idx(sd->status.class_)][W_FIST] ) +
+					( aspd_base[pc_class2idx(sd->status.class_)][MAX_WEAPON_TYPE] - 2000 );
+
+#else
 	// base weapon delay
 	// base weapon delay
 	amotion = (sd->status.weapon < MAX_WEAPON_TYPE)
 	amotion = (sd->status.weapon < MAX_WEAPON_TYPE)
 	 ? (aspd_base[pc_class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
 	 ? (aspd_base[pc_class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
@@ -1761,31 +1781,10 @@ int status_base_amotion_pc(struct map_session_data* sd, struct status_data* stat
 	
 	
 	// percentual delay reduction from stats
 	// percentual delay reduction from stats
 	amotion -= amotion * (4*status->agi + status->dex)/1000;
 	amotion -= amotion * (4*status->agi + status->dex)/1000;
-	
+#endif
 	// raw delay adjustment from bAspd bonus
 	// raw delay adjustment from bAspd bonus
 	amotion += sd->bonus.aspd_add;
 	amotion += sd->bonus.aspd_add;
 
 
-#ifdef RENEWAL
-	if( sd->status.shield ) {// bearing a shield decreases your ASPD by a fixed value depending on your class
-		amotion += re_job_db[pc_class2idx(sd->status.class_)][SHIELD_ASPD];
-	}
-
-	if( sd->sc.count ) {// renewal absolute ASPD modifiers
-		int i;
-		if ( sd->sc.data[i=SC_ASPDPOTION3] ||
-			 sd->sc.data[i=SC_ASPDPOTION2] ||
-			 sd->sc.data[i=SC_ASPDPOTION1] ||
-			 sd->sc.data[i=SC_ASPDPOTION0] )
-			amotion -= sd->sc.data[i]->val1*10;
-		if( sd->sc.data[SC_BERSERK] )//berserk doesn't stack with the quickens.
-			amotion -= 150;
-		else if( sd->sc.data[SC_SPEARQUICKEN] || sd->sc.data[SC_TWOHANDQUICKEN] )
-			amotion -= 70;
-		if( sd->sc.data[SC_ADRENALINE] )/* +7 for self, +6 for others */
-			amotion -= sd->sc.data[SC_ADRENALINE]->val2 ? 70 : 60;
-	}
-#endif
-
  	return amotion;
  	return amotion;
 }
 }
 
 
@@ -2855,9 +2854,10 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
 
 
 	// Basic ASPD value
 	// Basic ASPD value
 	i = status_base_amotion_pc(sd,status);
 	i = status_base_amotion_pc(sd,status);
-	status->amotion = cap_value(i,battle_config.max_aspd,2000);
+	status->amotion = cap_value(i,((sd->class_&JOBL_THIRD) ? battle_config.max_third_aspd : battle_config.max_aspd),2000);
 
 
 	// Relative modifiers from passive skills
 	// Relative modifiers from passive skills
+#ifndef RENEWAL_ASPD
 	if((skill=pc_checkskill(sd,SA_ADVANCEDBOOK))>0 && sd->status.weapon == W_BOOK)
 	if((skill=pc_checkskill(sd,SA_ADVANCEDBOOK))>0 && sd->status.weapon == W_BOOK)
 		status->aspd_rate -= 5*skill;
 		status->aspd_rate -= 5*skill;
 	if((skill = pc_checkskill(sd,SG_DEVIL)) > 0 && !pc_nextjobexp(sd))
 	if((skill = pc_checkskill(sd,SG_DEVIL)) > 0 && !pc_nextjobexp(sd))
@@ -2869,6 +2869,19 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
 		status->aspd_rate += 500-100*pc_checkskill(sd,KN_CAVALIERMASTERY);
 		status->aspd_rate += 500-100*pc_checkskill(sd,KN_CAVALIERMASTERY);
 	else if(pc_isridingdragon(sd))
 	else if(pc_isridingdragon(sd))
 		status->aspd_rate += 250-50*pc_checkskill(sd,RK_DRAGONTRAINING);
 		status->aspd_rate += 250-50*pc_checkskill(sd,RK_DRAGONTRAINING);
+#else // needs more info
+	if((skill=pc_checkskill(sd,SA_ADVANCEDBOOK))>0 && sd->status.weapon == W_BOOK)
+		status->aspd_rate += 5*skill;
+	if((skill = pc_checkskill(sd,SG_DEVIL)) > 0 && !pc_nextjobexp(sd))
+		status->aspd_rate += 30*skill;
+	if((skill=pc_checkskill(sd,GS_SINGLEACTION))>0 &&
+		(sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE))
+		status->aspd_rate += ((skill+1)/2) * 10;
+	if(pc_isriding(sd))
+		status->aspd_rate -= 500-100*pc_checkskill(sd,KN_CAVALIERMASTERY);
+	else if(pc_isridingdragon(sd))
+		status->aspd_rate -= 250-50*pc_checkskill(sd,RK_DRAGONTRAINING);
+#endif
 	status->adelay = 2*status->amotion;
 	status->adelay = 2*status->amotion;
 
 
 
 
@@ -3187,6 +3200,7 @@ static signed short status_calc_mdef2(struct block_list *,struct status_change *
 static unsigned short status_calc_speed(struct block_list *,struct status_change *,int);
 static unsigned short status_calc_speed(struct block_list *,struct status_change *,int);
 static short status_calc_aspd_rate(struct block_list *,struct status_change *,int);
 static short status_calc_aspd_rate(struct block_list *,struct status_change *,int);
 static unsigned short status_calc_dmotion(struct block_list *bl, struct status_change *sc, int dmotion);
 static unsigned short status_calc_dmotion(struct block_list *bl, struct status_change *sc, int dmotion);
+static short status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag);
 static unsigned int status_calc_maxhp(struct block_list *,struct status_change *,unsigned int);
 static unsigned int status_calc_maxhp(struct block_list *,struct status_change *,unsigned int);
 static unsigned int status_calc_maxsp(struct block_list *,struct status_change *,unsigned int);
 static unsigned int status_calc_maxsp(struct block_list *,struct status_change *,unsigned int);
 static unsigned char status_calc_element(struct block_list *bl, struct status_change *sc, int element);
 static unsigned char status_calc_element(struct block_list *bl, struct status_change *sc, int element);
@@ -3721,12 +3735,23 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
 		if( bl->type&BL_PC )
 		if( bl->type&BL_PC )
 		{
 		{
 			amotion = status_base_amotion_pc(sd,status);
 			amotion = status_base_amotion_pc(sd,status);
+#ifndef RENEWAL_ASPD
 			status->aspd_rate = status_calc_aspd_rate(bl, sc, b_status->aspd_rate);
 			status->aspd_rate = status_calc_aspd_rate(bl, sc, b_status->aspd_rate);
-			
+
 			if(status->aspd_rate != 1000)
 			if(status->aspd_rate != 1000)
 				amotion = amotion*status->aspd_rate/1000;
 				amotion = amotion*status->aspd_rate/1000;
+#else
+			// aspd = baseaspd + floor(sqrt((agi^2/2) + (dex^2/5))/4 + (potskillbonus*agi/200))
+			amotion -= (int)(sqrt( (pow(status->agi, 2) / 2) + (pow(status->dex, 2) / 5) ) / 4 + (status_calc_aspd(bl, sc, 1) * status->agi / 200)) * 10;
 			
 			
-			status->amotion = cap_value(amotion,battle_config.max_aspd,2000);
+			if( (status_calc_aspd(bl, sc, 2) + status->aspd_rate2) != 0 ) // RE ASPD percertage modifier
+				amotion -= ( amotion - ((sd->class_&JOBL_THIRD) ? battle_config.max_third_aspd : battle_config.max_aspd) ) 
+							* (status_calc_aspd(bl, sc, 2) + status->aspd_rate2) / 100;
+
+			if(status->aspd_rate != 1000) // absolute percentage modifier
+				amotion = ( 200 - (200-amotion/10) * status->aspd_rate / 1000 ) * 10;
+#endif			
+			status->amotion = cap_value(amotion,((sd->class_&JOBL_THIRD) ? battle_config.max_third_aspd : battle_config.max_aspd),2000);
 			
 			
 			status->adelay = 2*status->amotion;
 			status->adelay = 2*status->amotion;
 		}
 		}
@@ -4968,13 +4993,137 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
 	return (short)cap_value(speed,10,USHRT_MAX);
 	return (short)cap_value(speed,10,USHRT_MAX);
 }
 }
 
 
+// flag&1 - fixed value [malufett]
+// flag&2 - percentage value
+static short status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag)
+{
+	int i, pots = 0, skills1 = 0, skills2 = 0;
+
+	if(!sc || !sc->count)
+		return 0;
+
+	if(sc->data[i=SC_ASPDPOTION3] ||
+		sc->data[i=SC_ASPDPOTION2] ||
+		sc->data[i=SC_ASPDPOTION1] ||
+		sc->data[i=SC_ASPDPOTION0])
+		pots += sc->data[i]->val1;
+
+	if( !sc->data[SC_QUAGMIRE] ){
+		if(sc->data[SC_STAR_COMFORT])
+			skills1 = 5; // needs more info
+
+		if(sc->data[SC_TWOHANDQUICKEN] && skills1 < 7)
+			skills1 = 7;
+
+		if(sc->data[SC_ONEHAND] && skills1 < 7) skills1 = 7;
+
+		if(sc->data[SC_MERC_QUICKEN] && skills1 < 7) // needs more info
+			skills1 = 7;
+
+		if(sc->data[SC_ADRENALINE2] && skills1 < 6)
+			skills1 = 6;
+		
+		if(sc->data[SC_ADRENALINE] && skills1 < 7)
+			skills1 = 7;
+		
+		if(sc->data[SC_SPEARQUICKEN] && skills1 < 7)
+			skills1 = 7;
+
+		if(sc->data[SC_GATLINGFEVER] && skills1 < 9) // needs more info
+			skills1 = 9;
+		
+		if(sc->data[SC_FLEET] && skills1 < 5)
+			skills1 = 5;
+
+		if(sc->data[SC_ASSNCROS] &&
+			skills1 < 5+1*sc->data[SC_ASSNCROS]->val1) // needs more info
+		{
+			if (bl->type!=BL_PC)
+				skills1 = 4+1*sc->data[SC_ASSNCROS]->val1;
+			else
+			switch(((TBL_PC*)bl)->status.weapon)
+			{
+				case W_BOW:
+				case W_REVOLVER:
+				case W_RIFLE:
+				case W_GATLING:
+				case W_SHOTGUN:
+				case W_GRENADE:
+					break;
+				default:
+					skills1 = 5+1*sc->data[SC_ASSNCROS]->val1;
+			}
+		}
+	}
+
+	if(sc->data[SC_BERSERK] &&	skills1 < 15)
+		skills1 = 15;
+	else if(sc->data[SC_MADNESSCANCEL] && skills1 < 15) // needs more info
+		skills1 = 15;
+
+	if(sc->data[SC_DONTFORGETME])
+		skills2 -= sc->data[SC_DONTFORGETME]->val2; // needs more info
+	if(sc->data[SC_LONGING])
+		skills2 -= sc->data[SC_LONGING]->val2; // needs more info
+	if(sc->data[SC_STEELBODY])
+		skills2 -= 25;
+	if(sc->data[SC_SKA])
+		skills2 -= 25;
+	if(sc->data[SC_DEFENDER])
+		skills2 -= sc->data[SC_DEFENDER]->val4; // needs more info
+	if(sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_ENEMY) // needs more info
+		skills2 -= 25;
+	if(sc->data[SC_GRAVITATION])
+		skills2 -= sc->data[SC_GRAVITATION]->val2; // needs more info
+	if(sc->data[SC_JOINTBEAT]) { // needs more info
+		if( sc->data[SC_JOINTBEAT]->val2&BREAK_WRIST )
+			skills2 -= 25;
+		if( sc->data[SC_JOINTBEAT]->val2&BREAK_KNEE )
+			skills2 -= 10;
+	}
+	if( sc->data[SC_FREEZING] )
+		skills2 -= 30;
+	if( sc->data[SC_HALLUCINATIONWALK_POSTDELAY] )
+		skills2 -= 50;
+	if( sc->data[SC_FIGHTINGSPIRIT] && sc->data[SC_FIGHTINGSPIRIT]->val2 )
+		skills2 += sc->data[SC_FIGHTINGSPIRIT]->val2;
+	if( sc->data[SC_PARALYSE] )
+		skills2 -= 10;
+	if( sc->data[SC__BODYPAINT] )
+		skills2 -=  2 + 5 * sc->data[SC__BODYPAINT]->val1;
+	if( sc->data[SC__INVISIBILITY] )
+		skills2 -= sc->data[SC__INVISIBILITY]->val2 ;
+	if( sc->data[SC__GROOMY] )
+		skills2 -= sc->data[SC__GROOMY]->val2;
+	if( sc->data[SC_SWINGDANCE] )
+		skills2 += sc->data[SC_SWINGDANCE]->val2;
+	if( sc->data[SC_DANCEWITHWUG] )
+		skills2 += sc->data[SC_DANCEWITHWUG]->val3;
+	if( sc->data[SC_GLOOMYDAY] )
+		skills2 -= sc->data[SC_GLOOMYDAY]->val3;
+	if( sc->data[SC_EARTHDRIVE] )
+		skills2 -= 25;
+	if( sc->data[SC_GT_CHANGE] )
+		skills2 += (sc->data[SC_GT_CHANGE]->val2/200);
+	if( sc->data[SC_GT_REVITALIZE] )
+		skills2 += sc->data[SC_GT_REVITALIZE]->val2;
+	if( sc->data[SC_MELON_BOMB] )
+		skills2 -= sc->data[SC_MELON_BOMB]->val1;
+	if( sc->data[SC_BOOST500] )
+		skills2 += sc->data[SC_BOOST500]->val1;
+	if( sc->data[SC_EXTRACT_SALAMINE_JUICE] )
+		skills2 += sc->data[SC_EXTRACT_SALAMINE_JUICE]->val1;
+	if( sc->data[SC_INCASPDRATE] )
+		skills2 += sc->data[SC_INCASPDRATE]->val1;
+
+	return ( flag&1? (skills1 + pots) : skills2 );
+}
+
 /// Calculates an object's ASPD modifier (alters the base amotion value).
 /// Calculates an object's ASPD modifier (alters the base amotion value).
 /// Note that the scale of aspd_rate is 1000 = 100%.
 /// Note that the scale of aspd_rate is 1000 = 100%.
 static short status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int aspd_rate)
 static short status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int aspd_rate)
 {
 {
-#ifndef RENEWAL
 	int i;
 	int i;
-#endif
 
 
 	if(!sc || !sc->count)
 	if(!sc || !sc->count)
 		return cap_value(aspd_rate,0,SHRT_MAX);
 		return cap_value(aspd_rate,0,SHRT_MAX);
@@ -4983,11 +5132,11 @@ static short status_calc_aspd_rate(struct block_list *bl, struct status_change *
 		int max = 0;
 		int max = 0;
 		if(sc->data[SC_STAR_COMFORT])
 		if(sc->data[SC_STAR_COMFORT])
 			max = sc->data[SC_STAR_COMFORT]->val2;
 			max = sc->data[SC_STAR_COMFORT]->val2;
-#ifndef RENEWAL
+
 		if(sc->data[SC_TWOHANDQUICKEN] &&
 		if(sc->data[SC_TWOHANDQUICKEN] &&
 			max < sc->data[SC_TWOHANDQUICKEN]->val2)
 			max < sc->data[SC_TWOHANDQUICKEN]->val2)
 			max = sc->data[SC_TWOHANDQUICKEN]->val2;
 			max = sc->data[SC_TWOHANDQUICKEN]->val2;
-#endif
+
 		if(sc->data[SC_ONEHAND] &&
 		if(sc->data[SC_ONEHAND] &&
 			max < sc->data[SC_ONEHAND]->val2)
 			max < sc->data[SC_ONEHAND]->val2)
 			max = sc->data[SC_ONEHAND]->val2;
 			max = sc->data[SC_ONEHAND]->val2;
@@ -4999,7 +5148,7 @@ static short status_calc_aspd_rate(struct block_list *bl, struct status_change *
 		if(sc->data[SC_ADRENALINE2] &&
 		if(sc->data[SC_ADRENALINE2] &&
 			max < sc->data[SC_ADRENALINE2]->val3)
 			max < sc->data[SC_ADRENALINE2]->val3)
 			max = sc->data[SC_ADRENALINE2]->val3;
 			max = sc->data[SC_ADRENALINE2]->val3;
-#ifndef RENEWAL
+
 		if(sc->data[SC_ADRENALINE] &&
 		if(sc->data[SC_ADRENALINE] &&
 			max < sc->data[SC_ADRENALINE]->val3)
 			max < sc->data[SC_ADRENALINE]->val3)
 			max = sc->data[SC_ADRENALINE]->val3;
 			max = sc->data[SC_ADRENALINE]->val3;
@@ -5007,7 +5156,6 @@ static short status_calc_aspd_rate(struct block_list *bl, struct status_change *
 		if(sc->data[SC_SPEARQUICKEN] &&
 		if(sc->data[SC_SPEARQUICKEN] &&
 			max < sc->data[SC_SPEARQUICKEN]->val2)
 			max < sc->data[SC_SPEARQUICKEN]->val2)
 			max = sc->data[SC_SPEARQUICKEN]->val2;
 			max = sc->data[SC_SPEARQUICKEN]->val2;
-#endif
 
 
 		if(sc->data[SC_GATLINGFEVER] &&
 		if(sc->data[SC_GATLINGFEVER] &&
 			max < sc->data[SC_GATLINGFEVER]->val2)
 			max < sc->data[SC_GATLINGFEVER]->val2)
@@ -5038,23 +5186,19 @@ static short status_calc_aspd_rate(struct block_list *bl, struct status_change *
 		}
 		}
 		aspd_rate -= max;
 		aspd_rate -= max;
 
 
-	  	//These stack with the rest of bonuses.
-#ifndef RENEWAL
 		if(sc->data[SC_BERSERK])
 		if(sc->data[SC_BERSERK])
 			aspd_rate -= 300;
 			aspd_rate -= 300;
 		else
 		else
-#endif
+
 		if(sc->data[SC_MADNESSCANCEL])
 		if(sc->data[SC_MADNESSCANCEL])
 			aspd_rate -= 200;
 			aspd_rate -= 200;
 	}
 	}
 
 
-#ifndef RENEWAL // non-renewal variable ASPD improvement
 	if( sc->data[i=SC_ASPDPOTION3] ||
 	if( sc->data[i=SC_ASPDPOTION3] ||
 		sc->data[i=SC_ASPDPOTION2] ||
 		sc->data[i=SC_ASPDPOTION2] ||
 		sc->data[i=SC_ASPDPOTION1] ||
 		sc->data[i=SC_ASPDPOTION1] ||
 		sc->data[i=SC_ASPDPOTION0] )
 		sc->data[i=SC_ASPDPOTION0] )
 		aspd_rate -= sc->data[i]->val2;
 		aspd_rate -= sc->data[i]->val2;
-#endif
 
 
 	if(sc->data[SC_DONTFORGETME])
 	if(sc->data[SC_DONTFORGETME])
 		aspd_rate += 10 * sc->data[SC_DONTFORGETME]->val2;
 		aspd_rate += 10 * sc->data[SC_DONTFORGETME]->val2;
@@ -6864,11 +7008,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
 		case SC_EXPLOSIONSPIRITS:
 		case SC_EXPLOSIONSPIRITS:
 			val2 = 75 + 25*val1; //Cri bonus
 			val2 = 75 + 25*val1; //Cri bonus
 			break;
 			break;
-#ifndef RENEWAL
+
 		case SC_ASPDPOTION0:
 		case SC_ASPDPOTION0:
 		case SC_ASPDPOTION1:
 		case SC_ASPDPOTION1:
 		case SC_ASPDPOTION2:
 		case SC_ASPDPOTION2:
-#endif
 		case SC_ASPDPOTION3:
 		case SC_ASPDPOTION3:
 			val2 = 50*(2+type-SC_ASPDPOTION0);
 			val2 = 50*(2+type-SC_ASPDPOTION0);
 			break;
 			break;
@@ -10415,26 +10558,6 @@ int status_get_refine_chance(enum refine_type wlv, int refine)
  * size_fix.txt   - size adjustment table for weapons
  * size_fix.txt   - size adjustment table for weapons
  * refine_db.txt  - refining data table
  * refine_db.txt  - refining data table
  *------------------------------------------*/
  *------------------------------------------*/
-#ifdef RENEWAL
-static bool status_readdb_job_re(char* fields[], int columns, int current) {
-	int idx, class_;
-	unsigned int i;
-
-	class_ = atoi(fields[0]);
-
-	if(!pcdb_checkid(class_)) {
-		ShowWarning("status_readdb_job_re: Invalid job class %d specified.\n", class_);
-		return false;
-	}
-	idx = pc_class2idx(class_);
-
-	for(i = 0; i < RE_JOB_DB_MAX; i++) {
-		re_job_db[idx][i] = atoi(fields[i+1]);
-	}
-	return true;
-}
-#endif
-
 static bool status_readdb_job1(char* fields[], int columns, int current)
 static bool status_readdb_job1(char* fields[], int columns, int current)
 {// Job-specific values (weight, HP, SP, ASPD)
 {// Job-specific values (weight, HP, SP, ASPD)
 	int idx, class_;
 	int idx, class_;
@@ -10453,8 +10576,11 @@ static bool status_readdb_job1(char* fields[], int columns, int current)
 	hp_coefficient[idx]  = atoi(fields[2]);
 	hp_coefficient[idx]  = atoi(fields[2]);
 	hp_coefficient2[idx] = atoi(fields[3]);
 	hp_coefficient2[idx] = atoi(fields[3]);
 	sp_coefficient[idx]  = atoi(fields[4]);
 	sp_coefficient[idx]  = atoi(fields[4]);
-
+#ifdef RENEWAL_ASPD
+	for(i = 0; i <= MAX_WEAPON_TYPE; i++)
+#else
 	for(i = 0; i < MAX_WEAPON_TYPE; i++)
 	for(i = 0; i < MAX_WEAPON_TYPE; i++)
+#endif
 	{
 	{
 		aspd_base[idx][i] = atoi(fields[i+5]);
 		aspd_base[idx][i] = atoi(fields[i+5]);
 	}
 	}
@@ -10539,9 +10665,6 @@ int status_readdb(void)
 	memset(hp_coefficient2, 0, sizeof(hp_coefficient2));
 	memset(hp_coefficient2, 0, sizeof(hp_coefficient2));
 	memset(sp_coefficient, 0, sizeof(sp_coefficient));
 	memset(sp_coefficient, 0, sizeof(sp_coefficient));
 	memset(aspd_base, 0, sizeof(aspd_base));
 	memset(aspd_base, 0, sizeof(aspd_base));
-#ifdef RENEWAL
-	memset(re_job_db, 0, sizeof(re_job_db));
-#endif
 	// job_db2.txt
 	// job_db2.txt
 	memset(job_bonus,0,sizeof(job_bonus)); // Job-specific stats bonus
 	memset(job_bonus,0,sizeof(job_bonus)); // Job-specific stats bonus
 
 
@@ -10564,12 +10687,14 @@ int status_readdb(void)
 	// read databases
 	// read databases
 	//
 	//
 
 
-	sv_readdb(db_path, "job_db1.txt",   ',', 5+MAX_WEAPON_TYPE, 5+MAX_WEAPON_TYPE, -1,                            &status_readdb_job1);
+	
+#ifdef RENEWAL_ASPD
+	sv_readdb(db_path, "re/job_db1.txt",   ',',	6+MAX_WEAPON_TYPE, 6+MAX_WEAPON_TYPE,	-1,		&status_readdb_job1);
+#else
+	sv_readdb(db_path, "pre-re/job_db1.txt",   ',',	5+MAX_WEAPON_TYPE, 5+MAX_WEAPON_TYPE,	-1,		&status_readdb_job1);
+#endif
 	sv_readdb(db_path, "job_db2.txt",   ',', 1,                 1+MAX_LEVEL,       -1,                            &status_readdb_job2);
 	sv_readdb(db_path, "job_db2.txt",   ',', 1,                 1+MAX_LEVEL,       -1,                            &status_readdb_job2);
 	sv_readdb(db_path, "size_fix.txt",  ',', MAX_WEAPON_TYPE,   MAX_WEAPON_TYPE,    ARRAYLENGTH(atkmods),         &status_readdb_sizefix);
 	sv_readdb(db_path, "size_fix.txt",  ',', MAX_WEAPON_TYPE,   MAX_WEAPON_TYPE,    ARRAYLENGTH(atkmods),         &status_readdb_sizefix);
-#ifdef RENEWAL
-	sv_readdb(db_path, DBPATH"job_db_extra.txt", ',', 1+RE_JOB_DB_MAX, 1+RE_JOB_DB_MAX, -1, &status_readdb_job_re);
-#endif
 	sv_readdb(db_path, DBPATH"refine_db.txt", ',', 4+MAX_REFINE, 4+MAX_REFINE, ARRAYLENGTH(refine_info), &status_readdb_refine);
 	sv_readdb(db_path, DBPATH"refine_db.txt", ',', 4+MAX_REFINE, 4+MAX_REFINE, ARRAYLENGTH(refine_info), &status_readdb_refine);
 
 
 	return 0;
 	return 0;

+ 3 - 0
src/map/status.h

@@ -1513,6 +1513,9 @@ struct status_data {
 	short 
 	short 
 		hit, flee, cri, flee2,
 		hit, flee, cri, flee2,
 		def2, mdef2,
 		def2, mdef2,
+#ifdef RENEWAL_ASPD
+		aspd_rate2,
+#endif
 		aspd_rate;
 		aspd_rate;
 	/**
 	/**
 	 * defType is REMODE dependent and defined in src/map/config/data/const.h
 	 * defType is REMODE dependent and defined in src/map/config/data/const.h

+ 4 - 3
src/map/unit.c

@@ -322,9 +322,10 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag)
 	ud = unit_bl2ud(bl);
 	ud = unit_bl2ud(bl);
 	
 	
 	if( ud == NULL) return 0;
 	if( ud == NULL) return 0;
-#ifdef OFFICIAL_WALKPATH
-	if( !path_search_long(NULL, bl->m, bl->x, bl->y, x, y, CELL_CHKWALL) ) return 0;
-#endif
+// disabled until we find the correct algorithm. [malufett]
+//#ifdef OFFICIAL_WALKPATH
+//	if( !path_search_long(NULL, bl->m, bl->x, bl->y, x, y, CELL_CHKWALL) ) return 0;
+//#endif
 	if (flag&4 && DIFF_TICK(ud->canmove_tick, gettick()) > 0 &&
 	if (flag&4 && DIFF_TICK(ud->canmove_tick, gettick()) > 0 &&
 		DIFF_TICK(ud->canmove_tick, gettick()) < 2000)
 		DIFF_TICK(ud->canmove_tick, gettick()) < 2000)
   	{	// Delay walking command. [Skotlex]
   	{	// Delay walking command. [Skotlex]