From 96c768f9b78de65d69887df3600b3173e413e32a Mon Sep 17 00:00:00 2001 From: aleos89 Date: Fri, 28 Feb 2014 15:18:45 -0500 Subject: [PATCH] Bug Fixes * Fixed Severe Rainstorm damage formula. (bugreport:8581) * Caster can no longer switch equips for the duration of Severe Rainstorm. (bugreport:8581) * Cleaned up Demonic Fire and Fire Expansion combos. (bugreport:8620) * Fixed Dragon Breath - Fire/Water damage formula and not being reduced by DEF or Flee. (bugreport:8620) * Fixed the movement speed formula for Camouflage. (bugreport:8619) * Fixed Overbrand Brandish area damage. (bugreport:8627) * Fixed cast time for Magical Amplification. * Fixed Moonlit Serenade MATK increase. (bugreport:8697) * Fixed Phantom Thrust not casting. (bugreport:8652) * Fixed Gentle Touch - Cure healing formula. (bugreport:8699) * Fixed Wall of Thorns not dealing damage to players who touch it. (bugreport:8673) * Fixed Flash Combo spirit sphere requirement. (bugreport:8286) * Fixed Feint Bomb damage formula. (bugreport:8593) * Fixed Circling Nature HP recovery and SP consumption being reversed. (bugreport:8670) * Fixed Judex area of effect to be 3x3. (bugreport:8672) * Fixed Abracadabra skill "Summon Monster" not displaying the monster's name. (bugreport:8671) * Fixed Sight Blaster duration. (bugreport:8656) * Fixed Ignition Break area of effect damage. (bugreport:8653) * Fixed Poem of Netherworld not immobilizing enemies. (bugreport:8607) * Fixed Rampage Blaster damage formula. (bugreport:8646) * Adjusted Tiger Cannon damage formula and allow to bypass target's flee. (bugreport:8625) * Fixed Self Destruction not working on self. (bugreport:8633) * Fixed Repair not healing or consuming item requirements. (bugreport:8633) * Fixed Silver Sniper and Magic Decoy AI types not being counted towards the land skill limit. (bugreport:8407) * Fixed Silver Sniper bonus ATK formula. * Fixed Magic Decoy maximum HP formula. * Fixed Lion Howling damage formula. (bugreport:8654) * Fixed Rapid Throw (Muchanage) damage formula. (bugreport:7861) * Stasis no longer allows casting of Chorus skills. * Fixed Chorus skills not checking for additional partners. (bugreport:6052) * Body Paint no longer removes Chase Walk or Invisibility. (bugreport:6801) * Recognized Spell is no longer cleared by Dispell or Abundance. (bugreport:6718) * Epiclesis now removes Cloaking Exceed and will heal while in the Frenzy state. (bugreport:6679) * Renovatio now heals while in the Frenzy state. (bugreport:6679) * Fixed Firing Trap not having the fire element. (bugreport:8707) * Fixed Icebound Trap not having the water element. (bugreport:8707) * Fixed Axe Tornado not doing less damage for targets outside of the 5x5 area of effect. * Updated the list of effects that Inspiration makes the caster immune to. (bugreport:5735) * Cleaned up the effects of Vacuum Extreme to work as it should in GvG maps. (bugreport:6031) * Corrected durations for Millennium Shield, Crush Strike, Refresh, and Weapon Crush. --- db/pre-re/skill_cast_db.txt | 2 +- db/pre-re/skill_db.txt | 13 +- db/pre-re/skill_require_db.txt | 6 +- db/pre-re/skill_unit_db.txt | 2 +- db/re/skill_cast_db.txt | 18 +-- db/re/skill_db.txt | 13 +- db/re/skill_require_db.txt | 12 +- db/re/skill_unit_db.txt | 2 +- src/map/atcommand.c | 10 +- src/map/battle.c | 72 +++++---- src/map/clif.c | 18 ++- src/map/itemdb.h | 3 + src/map/pc.c | 16 +- src/map/pc.h | 1 - src/map/skill.c | 281 +++++++++++++++------------------ src/map/status.c | 77 ++++----- src/map/unit.c | 28 ++-- 17 files changed, 273 insertions(+), 301 deletions(-) diff --git a/db/pre-re/skill_cast_db.txt b/db/pre-re/skill_cast_db.txt index 6064f3c8ed..432f8cd3e9 100644 --- a/db/pre-re/skill_cast_db.txt +++ b/db/pre-re/skill_cast_db.txt @@ -1521,7 +1521,7 @@ //-- SO_WARMER 2452,2200:2400:2600:2800:3000,1000,0,40000:45000:50000:55000:60000,30000,35000:40000:45000:50000:55000 //-- SO_VACUUM_EXTREME -2453,1000:1500:2000:2500:3000,1000,0,4000:6000:8000:10000:12000,0,5000 +2453,1000:1500:2000:2500:3000,1000,0,4000:6000:8000:10000:12000,1000,5000 //-- SO_VARETYR_SPEAR 2454,2200:2400:2600:2800:3000,1000,0,0,2200:2400:2600:2800:3000,2000 //-- SO_ARULLO diff --git a/db/pre-re/skill_db.txt b/db/pre-re/skill_db.txt index d4788d4c82..f5e7750299 100644 --- a/db/pre-re/skill_db.txt +++ b/db/pre-re/skill_db.txt @@ -886,7 +886,7 @@ 2005,1,6,2,4,0x2,2,5,1,no,0,0,0,weapon,3,0x0, RK_WINDCUTTER,Wind Cutter 2006,0,6,4,-1,0x2,5,5,1,no,0,0,0,weapon,0,0x0, RK_IGNITIONBREAK,Ignition Break 2007,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0,0x0, RK_DRAGONTRAINING,Dragon Training -2008,9,6,2,3,0x2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,misc,0,0x0, RK_DRAGONBREATH,Dragon Breath +2008,9,6,2,3,0x2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,weapon,0,0x0, RK_DRAGONBREATH,Dragon Breath 2009,0,6,4,0,0x3,3:4:5:6:7,5,1,no,0,0,0,none,0,0x0, RK_DRAGONHOWLING,Dragon Howling 2010,0,0,0,0,0,0,10,0,no,0,0,0,none,0,0x0, RK_RUNEMASTERY,Rune Mastery 2011,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0,0x0, RK_MILLENNIUMSHIELD,Millenium Shield @@ -958,7 +958,7 @@ //**** // AB Arch Bishop -2038,11,8,1,6,0x2,3,5,-3,yes,0,0,0,magic,0,0x0, AB_JUDEX,Judex +2038,11,8,1,6,0x2,1,5,-3,yes,0,0,0,magic,0,0x0, AB_JUDEX,Judex 2039,0,6,4,0,0x1,0,1,1,yes,0,0,0,magic,0,0x0, AB_ANCILLA,Ancilla 2040,11,8,1,6,0,0,10,-10,yes,0,0,0,magic,0,0x0, AB_ADORAMUS,Adoramus 2041,0,6,4,6,0x3,3:7:15,3,1,yes,0,0,0,magic,0,0x0, AB_CLEMENTIA,Crementia @@ -1003,8 +1003,8 @@ 2250,3,6,2,1,0x43,2,1,1,no,0,0x80,1,misc,0,0x0, RA_COBALTTRAP,Cobalt Trap 2251,3,6,2,2,0x43,2,1,1,no,0,0x80,1,misc,0,0x0, RA_MAIZETRAP,Maize Trap 2252,3,6,2,4,0x43,2,1,1,no,0,0x80,1,misc,0,0x0, RA_VERDURETRAP,Verdure Trap -2253,3,6,2,0,0x42,2,5,1,no,0,0x80,2,misc,0,0x2800, RA_FIRINGTRAP,Firing Trap -2254,3,6,2,0,0x42,2,5,1,no,0,0x80,2,misc,0,0x2800, RA_ICEBOUNDTRAP,Icebound Trap +2253,3,6,2,3,0x42,2,5,1,no,0,0x80,2,misc,0,0x2800, RA_FIRINGTRAP,Firing Trap +2254,3,6,2,1,0x42,2,5,1,no,0,0x80,2,misc,0,0x2800, RA_ICEBOUNDTRAP,Icebound Trap //**** // NC Mechanic @@ -1074,7 +1074,7 @@ 2314,1,6,1,-1,0,0,1,1,no,0,0,0,weapon,0,0x0, LG_RAGEBURST,Rage Burst 2315,0,6,4,0:6:0,0x2,0,3,1,yes,0,0,0,none,2:0:0,0x0, LG_SHIELDSPELL,Shield Spell 2316,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0,0x0, LG_EXEEDBREAK,Exceed Break -2317,1,6,2,-1,0x2,5,5,1,yes,0,0,0,none,3:4:5:6:7,0x0, LG_OVERBRAND,Over Brand +2317,1,6,2,-1,0x2,0,5,1,yes,0,0,0,none,0,0x0, LG_OVERBRAND,Over Brand 2318,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0,0x0, LG_PRESTIGE,Prestige 2319,0,6,4,0,0x3,3,5,1,no,0,0,0,weapon,0,0x0, LG_BANDING,Banding //CHECK Splash isnt needed right? Banding has its own UNIT ID. 2320,0,6,4,-1,0x2,3,5,1,yes,0,0,0,weapon,0,0x1000, LG_MOONSLASHER,Moon Slasher @@ -1083,6 +1083,7 @@ 2323,0,8,4,2,0x2,1:1:2:2:3,5,-5,yes,0,0,0,weapon,0,0x0, LG_EARTHDRIVE,Earth Drive 2324,3,8,1,-1,0,0,5,3,yes,0,0,0,weapon,0,0x0, LG_HESPERUSLIT,Hesperus Lit 2325,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0,0x0, LG_INSPIRATION,Inspiration +2519,1,6,1,-1,0x2,0,5,1,yes,0,0,0,weapon,3:4:5:6:7,0x0, LG_OVERBRAND_BRANDISH,Overbrand Brandish //**** // SR Sura @@ -1090,7 +1091,7 @@ 2327,0,8,4,-1,0x2,2,5,-3,no,0,0,0,weapon,3,0x0, SR_SKYNETBLOW,Sky Net Blow 2328,0,6,4,-1,0x2,1:2:3:4:5,5,1,no,0,0,0,weapon,0,0x0, SR_EARTHSHAKER,Earth Shaker 2329,-2,8,4,-1,0,0,5,-2,no,0,0x200,0,weapon,0,0x0, SR_FALLENEMPIRE,Fallen Empire -2330,-2,6,1,-1,0x2,1:1:1:1:1:2:2:2:2:2,10,1,yes,0,0,0,weapon,0,0x0, SR_TIGERCANNON,Tiger Cannon +2330,-2,6,1,-1,0x42,1:1:1:1:1:2:2:2:2:2,10,1,yes,0,0,0,weapon,0,0x0, SR_TIGERCANNON,Tiger Cannon 2331,1:2:3:3:4:4:5:5:6:7,6,1,0,0,0,10,0,no,0,0,0,none,0,0x0, SR_HELLGATE,Hell Gate 2332,0,6,4,-1,0x2,3,5,1,no,0,0,0,weapon,0,0x0, SR_RAMPAGEBLASTER,Rampage Blaster 2333,0,6,4,0,0x1,0,5,1,no,0,0,0,none,0,0x0, SR_CRESCENTELBOW,Crescent Elbow //CHECK Check the autospell ID. diff --git a/db/pre-re/skill_require_db.txt b/db/pre-re/skill_require_db.txt index 4c99b5df03..2ee9548823 100644 --- a/db/pre-re/skill_require_db.txt +++ b/db/pre-re/skill_require_db.txt @@ -691,11 +691,11 @@ 2267,0,0,1,0,0,0,99,0,0,mado,0,0,6146,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2802 //NC_SELFDESTRUCTION#Self Destruction# 2268,0,0,100,0,0,0,99,0,0,mado,0,0,6360,1,6363,1,6362,1,6361,1,6146,2,0,0,0,0,0,0,0,0,0,0,2803 //NC_SHAPESHIFT#Shape Shift# -2269,0,0,20,0,0,0,99,0,0,mado,0,0,6146,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2804 //NC_EMERGENCYCOOL#Emergency Cool# +2269,0,0,20,0,0,0,99,0,0,mado,0,0,6146,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2804 //NC_EMERGENCYCOOL#Emergency Cool# 2270,0,0,45,0,0,0,99,0,0,mado,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NC_INFRAREDSCAN#Infrared Scan# 2271,0,0,30,0,0,0,99,0,0,mado,0,0,6146,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NC_ANALYZE#Analyze# -2272,0,0,90,0,0,0,99,0,0,mado,0,0,2805,0,6146,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2805 //NC_MAGNETICFIELD#Magnetic Field# -2273,0,0,90,0,0,0,99,0,0,mado,0,0,2806,0,6146,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2806 //NC_NEUTRALBARRIER#Neutral Barrier# +2272,0,0,90,0,0,0,99,0,0,mado,0,0,6146,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2805 //NC_MAGNETICFIELD#Magnetic Field# +2273,0,0,90,0,0,0,99,0,0,mado,0,0,6146,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2806 //NC_NEUTRALBARRIER#Neutral Barrier# 2274,0,0,100:150:200,0,0,0,99,0,0,mado,0,0,6146,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2808 //NC_STEALTHFIELD#Stealth Field# 2275,0,0,25:30:35:40:45,0,0,0,99,0,0,mado,0,0,6146,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2807 //NC_REPAIR#Repair# diff --git a/db/pre-re/skill_unit_db.txt b/db/pre-re/skill_unit_db.txt index 0e454e47e8..96f8e30ecc 100644 --- a/db/pre-re/skill_unit_db.txt +++ b/db/pre-re/skill_unit_db.txt @@ -149,7 +149,7 @@ 2468,0xf4, , 0, 1,1000,all, 0x010 //SO_EARTH_INSIGNIA 2479,0xe5, , 0, 1,1000,enemy, 0x006 //GN_THORNS_TRAP -2482,0xe6,0x7f, -1, 1, 100,all, 0x000 //GN_WALLOFTHORN +2482,0xe6,0x7f, -1, 2, -1,all, 0x000 //GN_WALLOFTHORN 2484,0x86, , 0, 1, 100,enemy, 0x080 //GN_CRAZYWEED_ATK 2485,0xe7, , 0, 2,2000,enemy, 0x098 //GN_DEMONIC_FIRE 2487,0xe8, , 0, 2, 500,enemy, 0x000 //GN_FIRE_EXPANSION_SMOKE_POWDER diff --git a/db/re/skill_cast_db.txt b/db/re/skill_cast_db.txt index 05c1d98de6..7abe097ca8 100644 --- a/db/re/skill_cast_db.txt +++ b/db/re/skill_cast_db.txt @@ -69,7 +69,7 @@ //-- AL_INCAGI 29,1000,1000,0,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0,0,0 //-- AL_DECAGI -30,750,1000,0,40000:50000:60000:70000:80000:90000:100000:110000:120000:130000:130000,0,0,250 +30,750,1000,0,40000:50000:60000:70000:80000:90000:100000:110000:120000:130000,0,0,250 //-- AL_HOLYWATER 31,1000,500,0,0,0,0,0 //-- AL_CRUCIS @@ -553,7 +553,7 @@ //-- HW_MAGICCRASHER 365,300,300,0,0,0,0,0 //-- HW_MAGICPOWER -366,0,0,0,30000,0,0,0 +366,0,0,0,30000,0,0,700 //========================================== @@ -1087,11 +1087,11 @@ //-- RK_DRAGONHOWLING 2009,0,0,0,15000,0,10000,-1 //-- RK_MILLENNIUMSHIELD -2011,0,1000,0,180000,1000,60000,-1 +2011,0,1000,0,180000,60000,0,-1 //-- RK_CRUSHSTRIKE -2012,0,0,0,30000,0,30000,1000 +2012,0,0,0,30000,30000,0,1000 //-- RK_REFRESH -2013,0,0,0,60000,0,120000,1000 +2013,0,0,0,60000,120000,0,1000 //-- RK_GIANTGROWTH 2014,0,0,0,180000,0,0,1000 //-- RK_STONEHARDSKIN @@ -1105,7 +1105,7 @@ //-- RK_ABUNDANCE 2019,0,0,0,180000,0,0,-1 //-- RK_DRAGONBREATH_WATER -5004,0:0:0:1000:1000:1000:1500:1500:2000:2000,2000,0,40000,0,0,500 +5004,0:0:0:1000:1000:1000:1500:1500:2000:2000,2000,0,10000,0,0,500 //-- RK_LUXANIMA 5005,0,0,0,60000,0,0,-1 //========================================== @@ -1126,7 +1126,7 @@ //-- GC_COUNTERSLASH 2029,0,2000,0,0,0,0,-1 //-- GC_WEAPONCRUSH -2030,0,1000,0,75000:90000:105000:120000:135000,0,0,-1 +2030,0,1000,0,60000,0,0,-1 //-- GC_VENOMPRESSURE 2031,0,1000,0,0,0,0,-1 //-- GC_POISONSMOKE @@ -1527,7 +1527,7 @@ //-- SO_SPELLFIST 2445,0,1000,0,20000:25000:30000:35000:40000,0,0,0 //-- SO_EARTHGRAVE -2446,2200:2400:2600:2800:3000,1000,0,500,8000:11000:14000:17000:20000,5000,1800:1600:1400:1200:800 +2446,2200:2400:2600:2800:3000,1000,0,500,8000:11000:14000:17000:20000,5000,1800:1600:1400:1200:1000 //-- SO_DIAMONDDUST 2447,5000:5500:6000:6500:7000,1000,0,500,12000:14000:16000:18000:20000,5000,800:600:400:200:-1 //-- SO_POISON_BUSTER @@ -1541,7 +1541,7 @@ //-- SO_WARMER 2452,2200:2400:2600:2800:3000,1000,0,40000:45000:50000:55000:60000,30000,35000:40000:45000:50000:55000,1800:1600:1400:1200:1000 //-- SO_VACUUM_EXTREME -2453,1000:1500:2000:2500:3000,1000,0,4000:6000:8000:10000:12000,0,5000,0 +2453,1000:1500:2000:2500:3000,1000,0,4000:6000:8000:10000:12000,1000,5000,-1 //-- SO_VARETYR_SPEAR 2454,2200:2400:2600:2800:3000,1000,0,0,2200:2400:2600:2800:3000,2000,1800:1600:1400:1200:1000 //-- SO_ARULLO diff --git a/db/re/skill_db.txt b/db/re/skill_db.txt index c7a5a70bf2..97239be010 100644 --- a/db/re/skill_db.txt +++ b/db/re/skill_db.txt @@ -886,7 +886,7 @@ 2005,1,6,2,4,0x2,2,5,1,no,0,0,0,weapon,3,0x0, RK_WINDCUTTER,Wind Cutter 2006,0,6,4,-1,0x2,5,5,1,no,0,0,0,weapon,0,0x0, RK_IGNITIONBREAK,Ignition Break 2007,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0,0x0, RK_DRAGONTRAINING,Dragon Training -2008,9,6,2,3,0x2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,misc,0,0x0, RK_DRAGONBREATH,Dragon Breath +2008,9,6,2,3,0x2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,weapon,0,0x0, RK_DRAGONBREATH,Dragon Breath 2009,0,6,4,0,0x3,3:4:5:6:7,5,1,no,0,0,0,none,0,0x0, RK_DRAGONHOWLING,Dragon Howling 2010,0,0,0,0,0,0,10,0,no,0,0,0,none,0,0x0, RK_RUNEMASTERY,Rune Mastery 2011,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0,0x0, RK_MILLENNIUMSHIELD,Millenium Shield @@ -958,7 +958,7 @@ //**** // AB Arch Bishop -2038,11,8,1,6,0x2,3,5,-3,yes,0,0,0,magic,0,0x0, AB_JUDEX,Judex +2038,11,8,1,6,0x2,1,5,-3,yes,0,0,0,magic,0,0x0, AB_JUDEX,Judex 2039,0,6,4,0,0x1,0,1,1,yes,0,0,0,magic,0,0x0, AB_ANCILLA,Ancilla 2040,11,8,1,6,0,0,10,-10,yes,0,0,0,magic,0,0x0, AB_ADORAMUS,Adoramus 2041,0,6,4,6,0x3,3:7:15,3,1,yes,0,0,0,magic,0,0x0, AB_CLEMENTIA,Crementia @@ -1003,8 +1003,8 @@ 2250,3,6,2,1,0x43,2,1,1,no,0,0x80,1,misc,0,0x0, RA_COBALTTRAP,Cobalt Trap 2251,3,6,2,2,0x43,2,1,1,no,0,0x80,1,misc,0,0x0, RA_MAIZETRAP,Maize Trap 2252,3,6,2,4,0x43,2,1,1,no,0,0x80,1,misc,0,0x0, RA_VERDURETRAP,Verdure Trap -2253,3,6,2,0,0x42,2,5,1,no,0,0x80,2,misc,0,0x2800, RA_FIRINGTRAP,Firing Trap -2254,3,6,2,0,0x42,2,5,1,no,0,0x80,2,misc,0,0x2800, RA_ICEBOUNDTRAP,Icebound Trap +2253,3,6,2,3,0x42,2,5,1,no,0,0x80,2,misc,0,0x2800, RA_FIRINGTRAP,Firing Trap +2254,3,6,2,1,0x42,2,5,1,no,0,0x80,2,misc,0,0x2800, RA_ICEBOUNDTRAP,Icebound Trap //**** // NC Mechanic @@ -1074,7 +1074,7 @@ 2314,1,6,1,-1,0,0,1,1,no,0,0,0,weapon,0,0x0, LG_RAGEBURST,Rage Burst 2315,0,6,4,0:6:0,0x2,0,3,1,yes,0,0,0,none,2:0:0,0x0, LG_SHIELDSPELL,Shield Spell 2316,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0,0x0, LG_EXEEDBREAK,Exceed Break -2317,1,6,2,-1,0x2,5,5,1,yes,0,0,0,none,3:4:5:6:7,0x0, LG_OVERBRAND,Over Brand +2317,1,6,2,-1,0x2,0,5,1,yes,0,0,0,none,0,0x0, LG_OVERBRAND,Over Brand 2318,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0,0x0, LG_PRESTIGE,Prestige 2319,0,6,4,0,0x3,3,5,1,no,0,0,0,weapon,0,0x0, LG_BANDING,Banding //CHECK Splash isnt needed right? Banding has its own UNIT ID. 2320,0,6,4,-1,0x2,3,5,1,yes,0,0,0,weapon,0,0x1000, LG_MOONSLASHER,Moon Slasher @@ -1083,6 +1083,7 @@ 2323,0,8,4,2,0x2,1:1:2:2:3,5,-5,yes,0,0,0,weapon,0,0x0, LG_EARTHDRIVE,Earth Drive 2324,3,8,1,-1,0,0,5,3,yes,0,0,0,weapon,0,0x0, LG_HESPERUSLIT,Hesperus Lit 2325,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0,0x0, LG_INSPIRATION,Inspiration +2519,1,6,1,-1,0x2,0,5,1,yes,0,0,0,weapon,3:4:5:6:7,0x0, LG_OVERBRAND_BRANDISH,Overbrand Brandish //**** // SR Sura @@ -1090,7 +1091,7 @@ 2327,0,8,4,-1,0x2,2,5,-3,no,0,0,0,weapon,3,0x0, SR_SKYNETBLOW,Sky Net Blow 2328,0,6,4,-1,0x2,1:2:3:4:5,5,1,no,0,0,0,weapon,0,0x0, SR_EARTHSHAKER,Earth Shaker 2329,-2,8,4,-1,0,0,5,-2,no,0,0x200,0,weapon,0,0x0, SR_FALLENEMPIRE,Fallen Empire -2330,-2,6,1,-1,0x2,1:1:1:1:1:2:2:2:2:2,10,1,yes,0,0,0,weapon,0,0x0, SR_TIGERCANNON,Tiger Cannon +2330,-2,6,1,-1,0x42,1:1:1:1:1:2:2:2:2:2,10,1,yes,0,0,0,weapon,0,0x0, SR_TIGERCANNON,Tiger Cannon 2331,1:2:3:3:4:4:5:5:6:7,6,1,0,0,0,10,0,no,0,0,0,none,0,0x0, SR_HELLGATE,Hell Gate 2332,0,6,4,-1,0x2,3,5,1,no,0,0,0,weapon,0,0x0, SR_RAMPAGEBLASTER,Rampage Blaster 2333,0,6,4,0,0x1,0,5,1,no,0,0,0,none,0,0x0, SR_CRESCENTELBOW,Crescent Elbow //CHECK Check the autospell ID. diff --git a/db/re/skill_require_db.txt b/db/re/skill_require_db.txt index 1e867979a6..c97dba115e 100644 --- a/db/re/skill_require_db.txt +++ b/db/re/skill_require_db.txt @@ -691,11 +691,11 @@ 2267,0,0,1,0,0,0,99,0,0,mado,0,0,6146,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2802 //NC_SELFDESTRUCTION#Self Destruction# 2268,0,0,100,0,0,0,99,0,0,mado,0,0,6360,1,6363,1,6362,1,6361,1,6146,2,0,0,0,0,0,0,0,0,0,0,2803 //NC_SHAPESHIFT#Shape Shift# -2269,0,0,20,0,0,0,99,0,0,mado,0,0,6146,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2804 //NC_EMERGENCYCOOL#Emergency Cool# +2269,0,0,20,0,0,0,99,0,0,mado,0,0,6146,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2804 //NC_EMERGENCYCOOL#Emergency Cool# 2270,0,0,45,0,0,0,99,0,0,mado,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NC_INFRAREDSCAN#Infrared Scan# 2271,0,0,30,0,0,0,99,0,0,mado,0,0,6146,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NC_ANALYZE#Analyze# -2272,0,0,90,0,0,0,99,0,0,mado,0,0,2805,0,6146,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2805 //NC_MAGNETICFIELD#Magnetic Field# -2273,0,0,90,0,0,0,99,0,0,mado,0,0,2806,0,6146,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2806 //NC_NEUTRALBARRIER#Neutral Barrier# +2272,0,0,90,0,0,0,99,0,0,mado,0,0,6146,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2805 //NC_MAGNETICFIELD#Magnetic Field# +2273,0,0,90,0,0,0,99,0,0,mado,0,0,6146,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2806 //NC_NEUTRALBARRIER#Neutral Barrier# 2274,0,0,100:150:200,0,0,0,99,0,0,mado,0,0,6146,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2808 //NC_STEALTHFIELD#Stealth Field# 2275,0,0,25:30:35:40:45,0,0,0,99,0,0,mado,0,0,6146,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2807 //NC_REPAIR#Repair# @@ -963,13 +963,13 @@ 5005,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RK_LUXANIMA#Lux Anima# 5006,0,0,60:70:80:90:100,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NC_MAGMA_ERUPTION#Magma Eruption# 5007,0,0,200:230:260:290:320,0,0,0,13:14,0,0,none,0,0,6144,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WM_FRIGG_SONG#Frigg's Song# -5008,0,0,120:120:120:120:120,0,0,0,99,0,0,elementalspirit,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SO_ELEMENTAL_SHIELD#Elemental Shield# -5009,0,0,75:65:55:45:35,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_FLASHCOMBO#Flash Combo# +5008,0,0,120,0,0,0,99,0,0,elementalspirit,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SO_ELEMENTAL_SHIELD#Elemental Shield# +5009,0,0,75:65:55:45:35,0,0,0,99,0,0,none,5:5:4:4:3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_FLASHCOMBO#Flash Combo# 5010,0,0,30:26:22:18:14,0,0,0,99,0,0,none,0,0,7940,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SC_ESCAPE#Emergency Escape# 5011,0,0,30:60:90:120:150,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AB_OFFERTORIUM#Offertorium# 5012,0,0,100:150:200:250:300,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WL_TELEKINESIS_INTENSE#Intense Telekinesis# 5013,0,0,200:180:160:140:120,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LG_KINGS_GRACE#King's Grace# -5014,0,0,1:1:1:1:1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ALL_FULL_THROTTLE#Full Throttle# +5014,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ALL_FULL_THROTTLE#Full Throttle# 5015,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_FLASHCOMBO_ATK_STEP1#Flash Combo Attack Step 1#//All 4 steps are using temp req SP values for now. 5016,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_FLASHCOMBO_ATK_STEP2#Flash Combo Attack Step 2# 5017,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SR_FLASHCOMBO_ATK_STEP3#Flash Combo Attack Step 3# diff --git a/db/re/skill_unit_db.txt b/db/re/skill_unit_db.txt index b82c8e3239..f1d3a92199 100644 --- a/db/re/skill_unit_db.txt +++ b/db/re/skill_unit_db.txt @@ -151,7 +151,7 @@ 2468,0xf4, , 0, 1,1000,all, 0x010 //SO_EARTH_INSIGNIA 2479,0xe5, , 0, 1,1000,enemy, 0x006 //GN_THORNS_TRAP -2482,0xe6,0x7f, -1, 1, 100,all, 0x000 //GN_WALLOFTHORN +2482,0xe6,0x7f, -1, 2, -1,all, 0x000 //GN_WALLOFTHORN 2484,0x86, , 0, 1, 100,enemy, 0x080 //GN_CRAZYWEED_ATK 2485,0xe7, , 0, 2,2000,enemy, 0x098 //GN_DEMONIC_FIRE 2487,0xe8, , 0, 2, 500,enemy, 0x000 //GN_FIRE_EXPANSION_SMOKE_POWDER diff --git a/src/map/atcommand.c b/src/map/atcommand.c index fb724399eb..34bdbf9f6c 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -6006,7 +6006,7 @@ ACMD_FUNC(autoloottype) { uint8 i = 0, action = 3; // 1=add, 2=remove, 3=help+list (default), 4=reset enum item_types type = -1; - int ITEM_NONE = 0, ITEM_MAX = 1533; + int ITEM_MAX = 1533; nullpo_retr(-1, sd); @@ -6058,7 +6058,6 @@ ACMD_FUNC(autoloottype) clif_displaymessage(fd, msg_txt(sd,1482)); // Your autoloottype list has all item types. You can remove some items with @autoloottype -. return -1; } - sd->state.autolootingtype = 1; // Autoloot Activated sd->state.autoloottype |= (1<state.autoloottype &= ~(1<state.autoloottype == ITEM_NONE) - sd->state.autolootingtype = 0; break; case 3: clif_displaymessage(fd, msg_txt(sd,1486)); // To add an item type to the list, use "@aloottype +". To remove an item type, use "@aloottype -". clif_displaymessage(fd, msg_txt(sd,1487)); // Type List: healing = 0, usable = 2, etc = 3, armor = 4, weapon = 5, card = 6, petegg = 7, petarmor = 8, ammo = 10 clif_displaymessage(fd, msg_txt(sd,1488)); // "@aloottype reset" will clear your autoloottype list. - if (sd->state.autoloottype == ITEM_NONE) + if (sd->state.autoloottype == 0) clif_displaymessage(fd, msg_txt(sd,1489)); // Your autoloottype list is empty. else { clif_displaymessage(fd, msg_txt(sd,1490)); // Item types on your autoloottype list: @@ -6092,8 +6089,7 @@ ACMD_FUNC(autoloottype) } break; case 4: - sd->state.autoloottype = ITEM_NONE; - sd->state.autolootingtype = 0; + sd->state.autoloottype = 0; clif_displaymessage(fd, msg_txt(sd,1491)); // Your autoloottype list has been reset. break; } diff --git a/src/map/battle.c b/src/map/battle.c index 302d4e6ad8..f29281f419 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3205,22 +3205,21 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s skillratio = (skill_lv + 2) * 50; RE_LVL_DMOD(100); break; - case RK_IGNITIONBREAK: - { + case RK_IGNITIONBREAK: { // 3x3 cell Damage = ATK [{(Skill Level x 300) x (1 + [(Caster's Base Level - 100) / 100])}] % // 7x7 cell Damage = ATK [{(Skill Level x 250) x (1 + [(Caster's Base Level - 100) / 100])}] % // 11x11 cell Damage = ATK [{(Skill Level x 200) x (1 + [(Caster's Base Level - 100) / 100])}] % - int dmg = 300; // Base maximum damage at less than 3 cells. i = distance_bl(src,target); - if( i > 7 ) - dmg -= 100; // Greater than 7 cells. (200 damage) - else if( i > 3 ) - dmg -= 50; // Greater than 3 cells, less than 7. (250 damage) - dmg = (dmg * skill_lv) * (100 + (status_get_lv(src) - 100) / 12) / 100; + if( i < 2 ) + skillratio = 300 * skill_lv; + else if( i < 4 ) + skillratio = 250 * skill_lv; + else + skillratio = 200 * skill_lv; + skillratio = skillratio * status_get_lv(src) / 100; // Elemental check, 1.5x damage if your element is fire. if( sstatus->rhw.ele == ELE_FIRE ) - dmg += dmg/2; - skillratio = dmg; + skillratio += 100 * skill_lv; } break; case RK_CRUSHSTRIKE: @@ -3343,6 +3342,8 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s case NC_AXETORNADO: skillratio += 100 + 100 * skill_lv + status_get_vit(src); RE_LVL_DMOD(100); + if ( distance_bl(src, target) > 2 ) // Will deal 75% damage outside of 5x5 area. + skillratio = skillratio * 75 / 100; break; case SC_FATALMENACE: skillratio += 100 * skill_lv; @@ -3352,7 +3353,7 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s RE_LVL_DMOD(120); break; case SC_FEINTBOMB: - skillratio = (skill_lv + 1) * (status_get_dex(src) / 2) * (sd?(sd->status.job_level / 10):5); + skillratio = (skill_lv + 1) * (status_get_dex(src) / 2) * ((sd) ? sd->status.job_level : 1) / 10; RE_LVL_DMOD(120); break; case LG_CANNONSPEAR: @@ -3408,11 +3409,11 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s RE_LVL_DMOD(100); break; case LG_OVERBRAND_BRANDISH: - skillratio = 100 * skill_lv + (status_get_str(src) + status_get_dex(src)); + skillratio = 100 * skill_lv + status_get_str(src) + status_get_dex(src); RE_LVL_DMOD(100); break; case LG_OVERBRAND_PLUSATK: // Only Piercing and Swing damage get RE_LVL_DMOD bonus damage - skillratio = (100 * skill_lv) + rnd()%90 + 10; + skillratio = 100 * skill_lv + rnd()%90 + 10; break; case LG_RAYOFGENESIS: skillratio = 300 + 300 * skill_lv; @@ -3471,15 +3472,16 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s { int hp = (int64)status_get_max_hp(src) * (10 + 2 * skill_lv) / 100, sp = (int64)status_get_max_sp(src) * (5 + 1 * skill_lv) / 100; - skillratio = ((int64)hp+sp) / 4; if( sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE ) // ATK [((Caster consumed HP + SP) / 2) x Caster Base Level / 100] % skillratio = ((int64)hp+sp) / 2; + else + skillratio = ((int64)hp+sp) / 4; RE_LVL_DMOD(100); } break; case SR_RAMPAGEBLASTER: if( sc && sc->data[SC_EXPLOSIONSPIRITS] ) { - skillratio = (20 * ((sd) ? sd->spiritball_old : 5) + 20 * sc->data[SC_EXPLOSIONSPIRITS]->val1) * skill_lv; + skillratio = 20 * skill_lv + ((sd) ? sd->spiritball_old : 5) + 20 * sc->data[SC_EXPLOSIONSPIRITS]->val1; RE_LVL_DMOD(120); } else { skillratio = 20 * ((sd) ? sd->spiritball_old : 5) * skill_lv; @@ -3514,7 +3516,7 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s RE_LVL_DMOD(100); break; case SR_HOWLINGOFLION: - skillratio += 200 * skill_lv; + skillratio = 300 * skill_lv; RE_LVL_DMOD(150); break; case SR_RIDEINLIGHTNING: // ATK [{(Skill Level x 200) + Additional Damage} x Caster Base Level / 100] % @@ -3530,7 +3532,7 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s break; case WM_SEVERE_RAINSTORM_MELEE: //ATK [{(Caster DEX + AGI) x (Skill Level / 5)} x Caster Base Level / 100] % - skillratio = (status_get_dex(src) + status_get_agi(src)) * (skill_lv / 5); + skillratio = (status_get_dex(src) + status_get_agi(src)) * skill_lv / 5; RE_LVL_DMOD(100); break; case WM_GREAT_ECHO: @@ -3785,25 +3787,23 @@ static int battle_calc_skill_constant_addition(struct Damage wd, struct block_li break; case SR_GATEOFHELL: atk = (status_get_max_hp(src) - status_get_hp(src)); - if(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE) { - atk += ( ((int64)status_get_max_sp(src) * (1 + skill_lv * 2 / 10)) + 40 * status_get_lv(src) ); - } else { - atk += ( ((int64)status_get_sp(src) * (1 + skill_lv * 2 / 10)) + 10 * status_get_lv(src) ); - } + if(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE) + atk += ( ((int64)status_get_max_sp(src) * (1 + skill_lv * 2 / 10)) + 40 * status_get_lv(src) ); + else + atk += ( ((int64)status_get_sp(src) * (1 + skill_lv * 2 / 10)) + 10 * status_get_lv(src) ); break; case SR_TIGERCANNON: // (Tiger Cannon skill level x 240) + (Target Base Level x 40) - atk = ( skill_lv * 240 + status_get_lv(target) * 40 ); - if( sc && sc->data[SC_COMBO] - && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE ) // (Tiger Cannon skill level x 500) + (Target Base Level x 40) - atk = ( skill_lv * 500 + status_get_lv(target) * 40 ); + if( sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE ) // (Tiger Cannon skill level x 500) + (Target Base Level x 40) + atk = ( skill_lv * 500 + status_get_lv(target) * 40 ); + else + atk = ( skill_lv * 240 + status_get_lv(target) * 40 ); break; case SR_FALLENEMPIRE:// [(Target Size value + Skill Level - 1) x Caster STR] + [(Target current weight x Caster DEX / 120)] atk = ( ((tstatus->size+1)*2 + skill_lv - 1) * status_get_str(src)); - if( tsd && tsd->weight ){ + if( tsd && tsd->weight ) atk += ( (tsd->weight/10) * status_get_dex(src) / 120 ); - }else{ + else atk += ( status_get_lv(target) * 50 ); //mobs - } break; case KO_SETSUDAN: if( tsc && tsc->data[SC_SPIRIT] ){ @@ -5621,12 +5621,14 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * case NJ_ZENYNAGE: case KO_MUCHANAGE: md.damage = skill_get_zeny(skill_id ,skill_lv); - if (!md.damage) md.damage = 2; - md.damage = rand()%md.damage + md.damage / (skill_id==NJ_ZENYNAGE?1:2) ; + if (!md.damage) md.damage = (skill_id == NJ_ZENYNAGE ? 2 : 10); + md.damage = rand()%md.damage + md.damage; if (is_boss(target)) - md.damage=md.damage / (skill_id==NJ_ZENYNAGE?3:2); - else if (tsd) // need confirmation for KO_MUCHANAGE - md.damage=md.damage/2; + md.damage = md.damage / (skill_id == NJ_ZENYNAGE ? 3 : 2); + else if (tsd) + md.damage = md.damage / 2; + if (skill_id == KO_MUCHANAGE && pc_checkskill(sd, NJ_TOBIDOUGU) < 1 ) + md.damage = md.damage / 2; break; #ifdef RENEWAL case NJ_ISSEN: @@ -5702,7 +5704,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * case RK_DRAGONBREATH: md.damage = ((status_get_hp(src) / 50) + (status_get_max_sp(src) / 4)) * skill_lv; RE_LVL_MDMOD(150); - if (sd) md.damage = (int64)md.damage * (100 + 5 * (pc_checkskill(sd,RK_DRAGONTRAINING) - 1)) / 100; + if (sd) md.damage = (int64)md.damage * (95 + 5 * pc_checkskill(sd,RK_DRAGONTRAINING)) / 100; md.flag |= BF_LONG|BF_WEAPON; break; case RA_CLUSTERBOMB: diff --git a/src/map/clif.c b/src/map/clif.c index 7b6f149574..fd920d9bc2 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2554,11 +2554,11 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items #if PACKETVER < 20071002 const int se = 20; //entry size equip const int sidxe = 4; //start itemlist idx - const int cmde = 0xa6; + const int cmde = 0x2d1; #elif PACKETVER < 20100629 const int se = 26; const int sidxe = 4; - const int cmde = 0xa6; + const int cmde = 0x2d1; #elif PACKETVER < 20120925 const int se = 28; const int sidxe = 4; @@ -13122,13 +13122,15 @@ void clif_account_name(struct map_session_data* sd, int account_id, const char* /// 01df .L void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd) { - char command[30]; - int account_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + if (sd->bl.type&BL_PC) { // Only show for players + char command[30]; + int account_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); - //tmp get all display - safesnprintf(command,sizeof(command),"%caccinfo %d", atcommand_symbol, account_id); - is_atcommand(fd, sd, command, 1); - //clif_account_name(sd, account_id, ""); //! TODO request to login-serv + //tmp get all display + safesnprintf(command,sizeof(command),"%caccinfo %d", atcommand_symbol, account_id); + is_atcommand(fd, sd, command, 1); + //clif_account_name(sd, account_id, ""); //! TODO request to login-serv + } } diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 395983ef19..59e9c2cf0e 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -182,6 +182,9 @@ enum mechanic_item_list { ITEMID_INDIGO_PTS, ITEMID_YELLOW_WISH_PTS, ITEMID_LIME_GREEN_PTS, + ITEMID_REPAIR_A = 12392, + ITEMID_REPAIR_B, + ITEMID_REPAIR_C, }; ///Genetic diff --git a/src/map/pc.c b/src/map/pc.c index c27a740910..a2e280916b 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4070,7 +4070,7 @@ char pc_additem(struct map_session_data *sd,struct item *item,int amount,e_log_p sd->status.inventory[i].expire_time == 0 && memcmp(&sd->status.inventory[i].card, &item->card, sizeof(item->card)) == 0 ) { if( amount > MAX_AMOUNT - sd->status.inventory[i].amount || ( id->stack.inventory && amount > id->stack.amount - sd->status.inventory[i].amount ) ) - return 5; + return ADDITEM_OVERAMOUNT; sd->status.inventory[i].amount += amount; clif_additem(sd,i,amount,0); break; @@ -4085,9 +4085,11 @@ char pc_additem(struct map_session_data *sd,struct item *item,int amount,e_log_p return ADDITEM_OVERITEM; memcpy(&sd->status.inventory[i], item, sizeof(sd->status.inventory[0])); - // clear equips field first, just in case + // clear equip and favorite fields first, just in case if( item->equip ) sd->status.inventory[i].equip = 0; + if( item->favorite ) + sd->status.inventory[i].favorite = 0; sd->status.inventory[i].amount = amount; sd->inventory_data[i] = id; @@ -9606,17 +9608,17 @@ void pc_overheat(struct map_session_data *sd, int val) { bool pc_isautolooting(struct map_session_data *sd, int nameid) { uint8 i = 0; - bool j = false; - if (!sd->state.autolooting && !sd->state.autolootingtype) + if (sd->state.autoloottype && sd->state.autoloottype&(1<state.autolooting) return false; if (sd->state.autolooting) ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == nameid); - if (sd->state.autolootingtype && sd->state.autoloottype&(1<m, bl->x+dir_x, bl->y+dir_y, CELL_CHKNOPASS) != 0 ) - skill_addtimerskill(src, tick + status_get_amotion(src), bl->id, 0, 0, LG_OVERBRAND_PLUSATK, skill_lv, BF_WEAPON, flag ); - } else - skill_addtimerskill(src, tick + status_get_amotion(src), bl->id, 0, 0, LG_OVERBRAND_PLUSATK, skill_lv, BF_WEAPON, flag ); + case LG_OVERBRAND_BRANDISH: + if( skill_blown(dsrc,bl,dmg.blewcount,dir,0) < dmg.blewcount ) + skill_addtimerskill(src, tick + status_get_amotion(src), bl->id, 0, 0, LG_OVERBRAND_PLUSATK, skill_lv, BF_WEAPON, flag|SD_ANIMATION); break; case SR_KNUCKLEARROW: if( skill_blown(dsrc,bl,dmg.blewcount,dir,0) && !(flag&4) ) { @@ -3187,6 +3185,8 @@ static int skill_check_unit_range_sub (struct block_list *bl, va_list ap) case RA_ICEBOUNDTRAP: case SC_DIMENSIONDOOR: case SC_BLOODYLUST: + case GN_THORNS_TRAP: + case GN_HELLS_PLANT: case RL_B_TRAP: //Non stackable on themselves and traps (including venom dust which does not has the trap inf2 set) if (skill_id != g_skill_id && !(skill_get_inf2(g_skill_id)&INF2_TRAP) && g_skill_id != AS_VENOMDUST && g_skill_id != MH_POISON_MIST) @@ -3606,8 +3606,6 @@ static int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) } } break; - case LG_OVERBRAND_BRANDISH: - case LG_OVERBRAND_PLUSATK: case SR_KNUCKLEARROW: skill_attack(BF_WEAPON, src, src, target, skl->skill_id, skl->skill_lv, tick, skl->flag|SD_LEVEL); break; @@ -3677,7 +3675,17 @@ static int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) case WL_EARTHSTRAIN: skill_unitsetting(src,skl->skill_id,skl->skill_lv,skl->x,skl->y,(skl->type<<16)|skl->flag); break; - + case LG_OVERBRAND_BRANDISH: { + short x2 = src->x, y2 = src->y, x = x2, y = y2; + switch(skl->type) { + case 0: case 1: case 7: x2 += 4; x -= 4; y2 += 4; break; + case 3: case 4: case 5: x2 += 4; x -= 4; y -= 4; break; + case 2: y2 += 4; y -= 4; x -= 4; break; + case 6: y2 += 4; y -= 4; x2 += 4; break; + } + map_foreachinarea(skill_area_sub, src->m, x, y, x2, y2, BL_CHAR, src, skl->skill_id, skl->skill_lv, tick, skl->flag|BCT_ENEMY|SD_ANIMATION|1, skill_castend_damage_id); + } + break; } } } while (0); @@ -3947,6 +3955,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint case LG_RAGEBURST: case LG_RAYOFGENESIS: case LG_HESPERUSLIT: + case LG_OVERBRAND: + case LG_OVERBRAND_BRANDISH: case SR_FALLENEMPIRE: case SR_CRESCENTELBOW_AUTOSPELL: case SR_GATEOFHELL: @@ -4635,6 +4645,14 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint skill_castend_damage_id(src,bl,KN_SPEARBOOMERANG,skill_req,tick,0); } break; + case RK_PHANTOMTHRUST: + unit_setdir(src,map_calc_dir(src, bl->x, bl->y)); + clif_skill_nodamage(src,bl,skill_id,skill_lv,1); + + skill_blown(src,bl,distance_bl(src,bl)-1,unit_getdir(src),0); + if( battle_check_target(src,bl,BCT_ENEMY) > 0 ) + skill_attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); + break; case RK_CRUSHSTRIKE: if( sd ) { if( pc_checkskill(sd,RK_RUNEMASTERY) >= ( skill_id == RK_CRUSHSTRIKE ? 7 : 3 ) ) @@ -4966,13 +4984,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint skill_attack((flag&1)?BF_WEAPON:BF_MAGIC,src,src,bl,skill_id,skill_lv,tick,flag); break; - case LG_OVERBRAND: - skill_attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag|SD_LEVEL); - break; - - case LG_OVERBRAND_BRANDISH: - skill_addtimerskill(src, tick + status_get_amotion(src)*8/10, bl->id, 0, 0, skill_id, skill_lv, BF_WEAPON, flag|SD_LEVEL); - break; case SR_DRAGONCOMBO: skill_attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); break; @@ -5589,7 +5600,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui break; case SA_SUMMONMONSTER: clif_skill_nodamage(src,bl,skill_id,skill_lv,1); - if (sd) mob_once_spawn(sd, src->m, src->x, src->y," --ja--", -1, 1, "", SZ_SMALL, AI_NONE); + if (sd) mob_once_spawn(sd, src->m, src->x, src->y,"--ja--", -1, 1, "", SZ_SMALL, AI_NONE); break; case SA_LEVELUP: clif_skill_nodamage(src,bl,skill_id,skill_lv,1); @@ -7042,7 +7053,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case SC_REBOUND: case SC_TELEKINESIS_INTENSE: case SC_HEAT_BARREL: case SC_HEAT_BARREL_AFTER: case SC_P_ALTER: case SC_E_CHAIN: case SC_C_MARKER: case SC_B_TRAP: - case SC_H_MINE: + case SC_H_MINE: case SC_RECOGNIZEDSPELL: case SC_MTF_ASPD: case SC_MTF_RANGEATK: case SC_MTF_MATK: case SC_MTF_MLEATKED: case SC_MTF_CRIDAMAGE: case SC_GN_CARTBOOST: #ifdef RENEWAL @@ -8285,14 +8296,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui } break; - case RK_PHANTOMTHRUST: - unit_setdir(src,map_calc_dir(src, bl->x, bl->y)); - clif_skill_nodamage(src,bl,skill_id,skill_lv,1); - - skill_blown(src,bl,distance_bl(src,bl)-1,unit_getdir(src),0); - if( battle_check_target(src,bl,BCT_ENEMY)>0 ) - skill_attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); - break; /** * Guilotine Cross **/ @@ -8542,7 +8545,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case SC_FULL_THROTTLE: case SC_REBOUND: case SC_TELEKINESIS_INTENSE: case SC_HEAT_BARREL: case SC_HEAT_BARREL_AFTER: case SC_P_ALTER: case SC_E_CHAIN: case SC_C_MARKER: case SC_B_TRAP: - case SC_H_MINE: + case SC_H_MINE: case SC_RECOGNIZEDSPELL: case SC_MTF_ASPD: case SC_MTF_RANGEATK: case SC_MTF_MATK: case SC_MTF_MLEATKED: case SC_MTF_CRIDAMAGE: case SC_GN_CARTBOOST: #ifdef RENEWAL @@ -8839,18 +8842,21 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui break; case NC_REPAIR: - if( sd ) - { - int heal = (skill_lv == 5 ? 23 : skill_lv == 4 ? 17 : skill_lv == 3 ? 13:skill_lv == 2 ? 7 : 4) / 100; - if( dstsd && pc_ismadogear(dstsd) ) { - heal *= dstsd->status.max_hp; - status_heal(bl,heal,0,2); - } else { - heal *= sd->status.max_hp; - status_heal(src,heal,0,2); + if( sd ) { + int heal, hp = 0; + if( !dstsd || !pc_ismadogear(dstsd) ) { + clif_skill_fail(sd, skill_id, USESKILL_FAIL_TOTARGET, 0); + break; } - - clif_skill_damage(src, src, tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6); + switch(skill_lv) { + case 1: hp = 4; break; + case 2: hp = 7; break; + case 3: hp = 13; break; + case 4: hp = 17; break; + case 5: default: hp = 23; break; + } + heal = dstsd->status.max_hp * hp / 100; + status_heal(bl,heal,0,2); clif_skill_nodamage(src, bl, skill_id, skill_lv, heal); } break; @@ -8889,15 +8895,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case SC_BODYPAINT: if( flag&1 ) { - if( tsc && (tsc->data[SC_HIDING] || tsc->data[SC_CLOAKING] || - tsc->data[SC_CHASEWALK] || tsc->data[SC_CLOAKINGEXCEED] || - tsc->data[SC__INVISIBILITY]) ) { + if( tsc && (tsc->data[SC_HIDING] || tsc->data[SC_CLOAKING] || tsc->data[SC_CLOAKINGEXCEED]) ) { status_change_end(bl, SC_HIDING, INVALID_TIMER); status_change_end(bl, SC_CLOAKING, INVALID_TIMER); - status_change_end(bl, SC_CHASEWALK, INVALID_TIMER); status_change_end(bl, SC_CLOAKINGEXCEED, INVALID_TIMER); - status_change_end(bl, SC__INVISIBILITY, INVALID_TIMER); - sc_start(src,bl,type,100,skill_lv,skill_get_time(skill_id,skill_lv)); sc_start(src,bl,SC_BLIND,53 + 2 * skill_lv,skill_lv,skill_get_time(skill_id,skill_lv)); } @@ -9149,7 +9150,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui break; } - heal = (120 * skill_lv) + (status_get_max_hp(bl) * (skill_lv / 100)); + heal = (120 * skill_lv) + (status_get_max_hp(bl) * skill_lv / 100); status_heal(bl, heal, 0, 0); if( (tsc && tsc->opt1) && (rnd()%100 < ((skill_lv * 5) + (status_get_dex(src) + status_get_lv(src)) / 4) - (1 + (rnd() % 10))) ) { @@ -10154,6 +10155,10 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) if( !map_flag_vs(src->m) && battle_check_target(src,target,BCT_PARTY) <= 0 ) break; // You can use Clearance on party members in normal maps too. [pakpil] } + else if( sd && (inf2&INF2_CHORUS_SKILL) && skill_check_pc_partner(sd, ud->skill_id, &ud->skill_lv, 1, 0) < 1 ) { + clif_skill_fail(sd, ud->skill_id, USESKILL_FAIL_NEED_HELPER, 0); + break; + } if(inf&BCT_ENEMY && (sc = status_get_sc(target)) && sc->data[SC_FOGWALL] && @@ -10678,13 +10683,14 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui case SC_MAELSTROM: case SC_BLOODYLUST: case WM_REVERBERATION: - case WM_SEVERE_RAINSTORM: case WM_POEMOFNETHERWORLD: case SO_PSYCHIC_WAVE: case SO_VACUUM_EXTREME: case GN_WALLOFTHORN: case GN_THORNS_TRAP: case GN_DEMONIC_FIRE: + case GN_FIRE_EXPANSION_SMOKE_POWDER: + case GN_FIRE_EXPANSION_TEAR_GAS: case GN_HELLS_PLANT: case SO_EARTHGRAVE: case SO_DIAMONDDUST: @@ -11060,14 +11066,13 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui struct mob_data *md; md = mob_once_spawn_sub(src, src->m, x, y, status_get_name(src), class_, "", SZ_SMALL, AI_NONE); - if( md ) - { + if( md ) { md->master_id = src->id; md->special_state.ai = AI_FAW; if( md->deletetimer != INVALID_TIMER ) delete_timer(md->deletetimer, mob_timer_delete); md->deletetimer = add_timer (gettick() + skill_get_time(skill_id, skill_lv), mob_timer_delete, md->bl.id, 0); - mob_spawn( md ); + mob_spawn(md); } } break; @@ -11089,8 +11094,18 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui skill_addtimerskill(src,tick,src->id,0,0,skill_id,skill_lv,0,0); break; - case LG_OVERBRAND: - skill_overbrand(src, skill_id, skill_lv, x, y, tick, flag); + case LG_OVERBRAND: { + uint8 dir = map_calc_dir(src, x, y); + uint8 x2 = x = src->x, y2 = y = src->y; + switch(dir) { + case 0: case 1: case 7: x2++; x--; y2 += 7; break; + case 3: case 4: case 5: x2++; x--; y -= 7; break; + case 2: y2++; y--; x -= 7; break; + case 6: y2++; y--; x2 += 7; break; + } + map_foreachinarea(skill_area_sub, src->m, x, y, x2, y2, BL_CHAR, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_ANIMATION|1, skill_castend_damage_id); + skill_addtimerskill(src, gettick() + status_get_amotion(src), 0, 0, 0, LG_OVERBRAND_BRANDISH, skill_lv, dir, flag); + } break; case LG_BANDING: @@ -11122,6 +11137,14 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui flag|=1; // Should counsume 1 item per skill usage. map_foreachinrange(skill_area_sub, src, skill_get_splash(skill_id,skill_lv),splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY, skill_castend_damage_id); break; + + case WM_SEVERE_RAINSTORM: + flag |= 1; + if (sd) + sd->canequip_tick = tick + skill_get_time(skill_id, skill_lv); // Can't switch equips for the duration of the skill. + skill_unitsetting(src,skill_id,skill_lv,x,y,0); + break; + case GN_CRAZYWEED: { int area = skill_get_splash(GN_CRAZYWEED_ATK, skill_lv); for( i = 0; i < 3 + (skill_lv/2); i++ ) { @@ -11149,12 +11172,16 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui ud->skillunit[i]->unit_id = UNT_FIRE_EXPANSION_TEAR_GAS; clif_changetraplook(&ud->skillunit[i]->unit->bl, UNT_FIRE_EXPANSION_TEAR_GAS); break; - case 5: + case 5: { + int acid_lv = 5; // Cast at Acid Demonstration at level 5 unless the user has a higher level learned. + if( sd && pc_checkskill(sd, CR_ACIDDEMONSTRATION) > 5 ) + acid_lv = pc_checkskill(sd, CR_ACIDDEMONSTRATION); map_foreachinarea(skill_area_sub, src->m, ud->skillunit[i]->unit->bl.x - 3, ud->skillunit[i]->unit->bl.y - 3, ud->skillunit[i]->unit->bl.x + 3, ud->skillunit[i]->unit->bl.y + 3, BL_CHAR, - src, CR_ACIDDEMONSTRATION, ((sd) ? pc_checkskill(sd, CR_ACIDDEMONSTRATION) : skill_get_max(CR_ACIDDEMONSTRATION)), tick, flag|BCT_ENEMY|1|SD_LEVEL, skill_castend_damage_id); + src, CR_ACIDDEMONSTRATION, acid_lv, tick, flag|BCT_ENEMY|1|SD_LEVEL, skill_castend_damage_id); skill_delunit(ud->skillunit[i]->unit); + } break; default: ud->skillunit[i]->unit->val2 = skill_lv; @@ -11568,6 +11595,8 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, uint16 skill case WZ_QUAGMIRE: //The target changes to "all" if used in a gvg map. [Skotlex] case AM_DEMONSTRATION: case GN_HELLS_PLANT: + if( skill_id == GN_HELLS_PLANT && map_getcell(src->m, x, y, CELL_CHKLANDPROTECTOR) ) + return NULL; if (map_flag_vs(src->m) && battle_config.vs_traps_bctall && (src->type&battle_config.vs_traps_bctall)) target = BCT_ALL; @@ -11791,9 +11820,6 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, uint16 skill case SO_WARMER: skill_clear_group(src, 8); break; - case SO_VACUUM_EXTREME: - range++; - break; case GN_WALLOFTHORN: if( flag&1 ) limit = 3000; @@ -12005,6 +12031,9 @@ static int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, un if (sc && sc->option&OPTION_HIDE && sg->skill_id != WZ_HEAVENDRIVE && sg->skill_id != WL_EARTHSTRAIN) return 0; //Hidden characters are immune to AoE skills except to these. [Skotlex] + if (sc && sc->data[SC_VACUUM_EXTREME] && map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR)) + status_change_end(bl, SC_VACUUM_EXTREME, INVALID_TIMER); + if (sc && sc->data[SC_HOVERING] && skill_get_inf3(sg->skill_id)&INF3_NO_EFF_HOVERING) return 0; // Under Hovering characters are immune to trap and ground target skills. @@ -12673,14 +12702,15 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns } hp = tstatus->max_hp * hp / 100; sp = tstatus->max_sp * sp / 100; - status_heal(bl, hp, sp, 2); + status_heal(bl, hp, sp, 3); sc_start(ss, bl, type, 100, sg->skill_lv, (sg->interval * 3) + 100); } // Reveal hidden players every 5 seconds. if( sg->val2 % 5 == 0 ) { - // TODO: check if other hidden status can be removed. + // Doesn't remove Invisibility or Chase Walk. status_change_end(bl,SC_HIDING,INVALID_TIMER); status_change_end(bl,SC_CLOAKING,INVALID_TIMER); + status_change_end(bl,SC_CLOAKINGEXCEED,INVALID_TIMER); } } /* Enable this if kRO fix the current skill. Currently no damage on undead and demon monster. [Jobbie] @@ -12714,12 +12744,9 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns skill_attack(BF_WEAPON,ss,&src->bl,bl,WM_SEVERE_RAINSTORM_MELEE,sg->skill_lv,tick,0); break; case UNT_NETHERWORLD: - if( !(status_get_mode(bl)&MD_BOSS) && ss != bl && battle_check_target(&src->bl, bl, BCT_NOPARTY) > 0 ) { - if( !(tsc && tsc->data[type]) ){ + if( !(status_get_mode(bl)&MD_BOSS) ) { + if( !(tsc && tsc->data[type]) ) sc_start(ss, bl, type, 100, sg->skill_lv, skill_get_time2(sg->skill_id,sg->skill_lv)); - sg->limit = DIFF_TICK(tick,sg->tick); - sg->unit_id = UNT_USED_TRAPS; - } } break; case UNT_THORNS_TRAP: @@ -12751,7 +12778,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns skill_attack(skill_get_type(sg->skill_id), ss, &src->bl, bl, sg->skill_id, sg->skill_lv + 10 * sg->val2, tick, 0); break; case 3: - skill_attack(skill_get_type(CR_ACIDDEMONSTRATION), ss, &src->bl, bl, CR_ACIDDEMONSTRATION, ((sd) ? pc_checkskill(sd, CR_ACIDDEMONSTRATION) : skill_get_max(CR_ACIDDEMONSTRATION)), tick, 0); + skill_attack(skill_get_type(CR_ACIDDEMONSTRATION), ss, &src->bl, bl, CR_ACIDDEMONSTRATION, ((sd) ? pc_checkskill(sd, CR_ACIDDEMONSTRATION) : sg->skill_lv), tick, 0); break; } } @@ -12768,8 +12795,8 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns case UNT_HELLS_PLANT: if( battle_check_target(&src->bl,bl,BCT_ENEMY) > 0 ) skill_attack(skill_get_type(GN_HELLS_PLANT_ATK), ss, &src->bl, bl, GN_HELLS_PLANT_ATK, sg->skill_lv, tick, 0); - if( ss != bl) //The caster is the only one who can step on the Plants, without destroying them - skill_delunit(sg->unit); // deleting it directly to avoid extra hits + if( ss != bl) // The caster is the only one who can step on the Plants without destroying them + sg->limit = DIFF_TICK(tick, sg->tick) + 100; break; case UNT_CLOUD_KILL: @@ -12818,34 +12845,11 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns break; case UNT_VACUUM_EXTREME: - { - int sec = sg->limit - DIFF_TICK(tick, sg->tick); - int range = skill_get_unit_range(sg->skill_id, sg->skill_lv); - - if( tsc && tsc->data[SC_HALLUCINATIONWALK] ) // Don't affect the target if Hallucination Walk is active - break; - - if( tsc && !tsc->data[type] && - distance_xy(src->bl.x, src->bl.y, bl->x, bl->y) <= range) // Don't consider outer boundaries - sc_start(ss, bl, type, 100, sg->skill_lv, sec); - - if( unit_is_walking(bl) && // Wait until the target has stopped walking - ( tsc && tsc->data[type] && tsc->data[type]->val4 >= tsc->data[type]->val3-range )) - break; - - if( tsc && ( !tsc->data[type] || (tsc->data[type] && tsc->data[type]->val4 < 1 ) ) ) - break; - - if( unit_is_walking(bl) && - distance_xy(src->bl.x, src->bl.y, bl->x, bl->y) > range ) // Going outside of boundary? Then force target to stop - unit_stop_walking(bl,1); - - if( !unit_is_walking(bl) && - distance_xy(src->bl.x, src->bl.y, bl->x, bl->y) <= range && // Only snap if the target is inside the range or - src->bl.x != bl->x && src->bl.y != bl->y) { // at a diagonal position parallel to Vacuum Extreme's center - unit_movepos(bl, src->bl.x, src->bl.y, 0, 0); - clif_fixpos(bl); - } + if ( tsc && tsc->data[SC_HALLUCINATIONWALK] ) + return 0; + else { + sg->limit -= 100 * tstatus->str/20; + sc_start(ss, bl, SC_VACUUM_EXTREME, 100, sg->skill_lv, sg->limit); } break; @@ -13372,7 +13376,7 @@ static int skill_check_condition_mob_master_sub (struct block_list *bl, va_list skill=va_arg(ap,int); c=va_arg(ap,int *); - ai = (unsigned)(skill == AM_SPHEREMINE?2:skill == KO_ZANZOU?4:skill == MH_SUMMON_LEGION?5:3); + ai = (unsigned)(skill == AM_SPHEREMINE?AI_SPHERE:skill == KO_ZANZOU?AI_ZANZOU:skill == MH_SUMMON_LEGION?AI_LEGION:skill == NC_SILVERSNIPER?AI_FAW:skill == NC_MAGICDECOY?AI_FAW:AI_FLORA); if( md->master_id != src_id || md->special_state.ai != ai) return 0; //Non alchemist summoned mobs have nothing to do here. @@ -14736,6 +14740,22 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16 req.amount[skill_lv-1] = skill_db[idx].require.amount[skill_lv-1]; break; } + if (skill_id == NC_REPAIR) { + switch(skill_lv) { + case 1: + case 2: + req.itemid[1] = ITEMID_REPAIR_A; + break; + case 3: + case 4: + req.itemid[1] = ITEMID_REPAIR_B; + break; + case 5: + req.itemid[1] = ITEMID_REPAIR_C; + break; + } + req.amount[1] = 1; + } // Check for cost reductions due to skills & SCs switch(skill_id) { @@ -15137,45 +15157,6 @@ int skill_delayfix (struct block_list *bl, uint16 skill_id, uint16 skill_lv) /*========================================= * *-----------------------------------------*/ -void skill_overbrand(struct block_list* src, uint16 skill_id, uint16 skill_lv, uint16 x, uint16 y, unsigned int tick, int flag) -{ - struct s_skill_unit_layout *layout; - int i, ux[53], uy[53]; //Number of cells we are attacking - short dir = map_calc_dir(src,x,y); - layout = skill_get_unit_layout(skill_id,skill_lv,src,x,y); - if(dir > 0 && dir < 4) { //Need to invert the cell locations for directions - for(i = 0; i < 53; i++) { - ux[i] = layout->dy[i]; - uy[i] = layout->dx[i] * -1; - } - } else if(dir == 4) { - for(i = 0; i < 53; i++) { - ux[i] = layout->dx[i]; - uy[i] = layout->dy[i]; - } - } else if(dir > 4) { - for(i = 0; i < 53; i++) { - ux[i] = layout->dy[i] * -1; - uy[i] = layout->dx[i]; - } - } else { - for(i = 0; i < 53; i++) { - ux[i] = layout->dx[i]; - uy[i] = layout->dy[i] * -1; - } - } - for( i = 0; i < 53; i++ ) { - if(i < 12) { //Close range hits twice - map_foreachincell(skill_area_sub, src->m, x+ux[i], y+uy[i], splash_target(src), src, LG_OVERBRAND_BRANDISH, skill_lv, tick, flag|BCT_ENEMY,skill_castend_damage_id); - map_foreachincell(skill_area_sub, src->m, x+ux[i], y+uy[i], splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY,skill_castend_damage_id); - } else if(i > 11 && i < 45) //Far sides do knockback damage - map_foreachincell(skill_area_sub, src->m, x+ux[i], y+uy[i], splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY,skill_castend_damage_id); - else //Far middle does piercing damage - map_foreachincell(skill_area_sub, src->m, x+ux[i], y+uy[i], splash_target(src), src, LG_OVERBRAND_BRANDISH, skill_lv, tick, flag|BCT_ENEMY,skill_castend_damage_id); - } - -} - struct square { int val1[5]; int val2[5]; @@ -15775,6 +15756,10 @@ int skill_clear_group (struct block_list *bl, int flag) if (flag&1) group[count++]= ud->skillunit[i]; break; + case SO_CLOUD_KILL: + if( flag&4 ) + group[count++]= ud->skillunit[i]; + break; case SO_WARMER: if( flag&8 ) group[count++]= ud->skillunit[i]; @@ -15808,6 +15793,7 @@ struct skill_unit_group *skill_locate_element_field(struct block_list *bl) case SA_VIOLENTGALE: case SA_LANDPROTECTOR: case NJ_SUITON: + case SO_CLOUD_KILL: case SO_WARMER: return ud->skillunit[i]; } @@ -16122,7 +16108,7 @@ int skill_maelstrom_suction(struct block_list *bl, va_list ap) int skill_enchant_elemental_end (struct block_list *bl, int type) { struct status_change *sc; - const enum sc_type scs[] = { SC_ENCPOISON, SC_ASPERSIO, SC_FIREWEAPON, SC_WATERWEAPON, SC_WINDWEAPON, SC_EARTHWEAPON, SC_SHADOWWEAPON, SC_GHOSTWEAPON, SC_ENCHANTARMS, SC_EXEEDBREAK }; + const enum sc_type scs[] = { SC_ENCPOISON, SC_ASPERSIO, SC_FIREWEAPON, SC_WATERWEAPON, SC_WINDWEAPON, SC_EARTHWEAPON, SC_SHADOWWEAPON, SC_GHOSTWEAPON, SC_ENCHANTARMS }; int i; nullpo_ret(bl); nullpo_ret(sc= status_get_sc(bl)); @@ -17904,6 +17890,7 @@ int skill_magicdecoy(struct map_session_data *sd, int nameid) { x = sd->sc.comet_x; y = sd->sc.comet_y; sd->sc.comet_x = sd->sc.comet_y = 0; + sd->menuskill_val = 0; // Item picked decides the mob class switch(nameid) { @@ -18548,18 +18535,6 @@ void skill_init_unit_layout (void) { memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy)); } break; - case LG_OVERBRAND: { - static const int dx[] = {-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1, - -5,-5,-5,-5,-4,-4,-4,-4,-3,-3,-3,-3,-2,-2,-2,-2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, - -1,-1,-1, 0, 0, 0, 1, 1, 1}; - static const int dy[] = { 0,-1,-2,-3, 0,-1,-2,-3, 0,-1,-2,-3, - 0,-1,-2,-3, 0,-1,-2,-3, 0,-1,-2,-3, 0,-1,-2,-3, 0,-1,-2,-3, 0,-1,-2,-3, 0,-1,-2,-3, 0,-1,-2,-3, - -4,-5,-6,-4,-5,-6,-4,-5,-6}; - skill_unit_layout[pos].count = 53; - memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx)); - memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy)); - } - break; default: ShowError("unknown unit layout at skill %d\n",i); break; @@ -18676,7 +18651,7 @@ int skill_block_check(struct block_list *bl, sc_type type , uint16 skill_id) { switch(type){ case SC_STASIS: inf = skill_get_inf2(skill_id); - if( inf == INF2_SONG_DANCE || /*skill_get_inf2(skill_id) == INF2_CHORUS_SKILL ||*/ inf == INF2_SPIRIT_SKILL ) + if( inf == INF2_SONG_DANCE || skill_get_inf2(skill_id) == INF2_CHORUS_SKILL || inf == INF2_SPIRIT_SKILL ) return 1; // Can't do it. if( inf3&INF3_STATIS_BL) return 1; diff --git a/src/map/status.c b/src/map/status.c index 5933167687..abc66772da 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2373,7 +2373,7 @@ int status_calc_mob_(struct mob_data* md, bool first) if(!mstatus) break; status->max_hp = (1000 * ud->skill_lv) + (mstatus->hp / 3) + (status_get_lv(mbl) * 12); - status->batk = (((ud->skill_lv > 3)?300:100) + (200 * ud->skill_lv)); + status->batk = 200 * ud->skill_lv; break; } case NC_MAGICDECOY: @@ -2381,7 +2381,7 @@ int status_calc_mob_(struct mob_data* md, bool first) struct status_data *mstatus = status_get_status_data(mbl); if(!mstatus) break; - status->max_hp = (1000 * ((TBL_PC*)mbl)->menuskill_val) + (mstatus->hp * 4) + (status_get_lv(mbl) * 12); + status->max_hp = (1000 * ((TBL_PC*)mbl)->menuskill_val) + (mstatus->sp * 4) + (status_get_lv(mbl) * 12); status->matk_min = status->matk_max = 250 + 50*((TBL_PC*)mbl)->menuskill_val; break; } @@ -5260,7 +5260,7 @@ static unsigned short status_calc_matk(struct block_list *bl, struct status_chan if (sc->data[SC_INCMATKRATE]) matk += matk * sc->data[SC_INCMATKRATE]->val1/100; if (sc->data[SC_MOONLITSERENADE]) - matk += matk * sc->data[SC_MOONLITSERENADE]->val3; + matk += matk * sc->data[SC_MOONLITSERENADE]->val3/100; if (sc->data[SC_ZANGETSU]) matk += matk * sc->data[SC_ZANGETSU]->val2 / 100; if (sc->data[SC_MTF_MATK]) @@ -5812,8 +5812,8 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha val = max( val, 50 ); if( sc->data[SC_MARSHOFABYSS] ) val = max( val, sc->data[SC_MARSHOFABYSS]->val3 ); - if( sc->data[SC_CAMOUFLAGE] ) - val = max( val, sc->data[SC_CAMOUFLAGE]->val1 < 3 ? 0 : 25 * sc->data[SC_CAMOUFLAGE]->val1 ); + if( sc->data[SC_CAMOUFLAGE] && (sc->data[SC_CAMOUFLAGE]->val3&1) == 0 ) + val = max( val, sc->data[SC_CAMOUFLAGE]->val1 < 3 ? 0 : 25 * (5 - sc->data[SC_CAMOUFLAGE]->val1) ); if( sc->data[SC_STEALTHFIELD_MASTER] ) val = max( val, 30 ); if( sc->data[SC_BANDING_DEFENCE] ) @@ -7100,6 +7100,9 @@ int status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_typ case SC_CRYSTALIZE: tick_def2 = status->vit*100; break; + case SC_VACUUM_EXTREME: + tick_def2 = status->str*50; + break; case SC_MANDRAGORA: sc_def = (status->vit + status->luk)*20; break; @@ -7277,15 +7280,6 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty switch( type ) { case SC_DEEPSLEEP: case SC_BURNING: - case SC_STUN: - case SC_SLEEP: - case SC_CURSE: - case SC_STONE: - case SC_POISON: - case SC_BLIND: - case SC_SILENCE: - case SC_BLEEDING: - case SC_FREEZE: case SC_FREEZING: case SC_CRYSTALIZE: case SC_TOXIN: @@ -7304,22 +7298,27 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty if( type >= SC_COMMON_MIN && type <= SC_COMMON_MAX ) return 0; // Immune to status ailements switch( type ) { - case SC_DEEPSLEEP: - case SC_SATURDAYNIGHTFEVER: - case SC_PYREXIA: - case SC_DEATHHURT: - case SC_MAGICMUSHROOM: - case SC_VENOMBLEED: + case SC_BURNING: + case SC_FREEZING: + case SC_CRYSTALIZE: + case SC_FEAR: case SC_TOXIN: + case SC_PARALYSE: + case SC_VENOMBLEED: + case SC_MAGICMUSHROOM: + case SC_DEATHHURT: + case SC_PYREXIA: case SC_OBLIVIONCURSE: case SC_LEECHESEND: + case SC_DEEPSLEEP: + case SC_SATURDAYNIGHTFEVER: + case SC__BODYPAINT: case SC__ENERVATION: case SC__GROOMY: + case SC__IGNORANCE: case SC__LAZINESS: case SC__UNLUCKY: case SC__WEAKNESS: - case SC__BODYPAINT: - case SC__IGNORANCE: return 0; } } @@ -7341,6 +7340,10 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty || (type==SC_ANGRIFFS_MODUS && sc->data[SC_GOLDENE_FERSE]) ) return 0; + case SC_VACUUM_EXTREME: + if(sc->data[SC_HALLUCINATIONWALK] || sc->data[SC_HOVERING]) + return 0; + break; case SC_STONE: if(sc->data[SC_POWER_OF_GAIA]) return 0; @@ -8398,10 +8401,9 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty else val4 |= battle_config.monster_cloak_check_type&7; break; - case SC_SIGHTBLASTER: - tick = -1; // Duration sent to the client should be infinite case SC_SIGHT: /* splash status */ case SC_RUWACH: + case SC_SIGHTBLASTER: val3 = skill_get_splash(val2, val1); // Val2 should bring the skill-id. val2 = tick/250; tick_time = 10; // [GodLesZ] tick time @@ -9145,8 +9147,8 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty tick_time = 2000; // [GodLesZ] tick time break; case SC_SIRCLEOFNATURE: - val2 = 4 + val1; // SP consume - val3 = 40 * val1; // HP recovery + val2 = 40 + val1; // HP recovery + val3 = 4 * val1; // SP consume val4 = tick / 1000; tick_time = 1000; // [GodLesZ] tick time break; @@ -9221,12 +9223,10 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty break; case SC_EXEEDBREAK: val1 *= 100; // 100 * skill_lv - if( sd && sd->inventory_data[sd->equip_index[EQI_HAND_R]] ) { // Chars. + if( sd && sd->inventory_data[sd->equip_index[EQI_HAND_R]] ) { val1 += (sd->inventory_data[sd->equip_index[EQI_HAND_R]]->weight/10 * sd->inventory_data[sd->equip_index[EQI_HAND_R]]->wlv * status_get_lv(bl) / 100); val1 += 10 * sd->status.job_level; } - else // Mobs - val1 += 500; break; case SC_PRESTIGE: val2 = (status->int_ + status->luk) * (val1 / 20) * (status_get_lv(bl) / 200) + val1; // Chance to evade magic damage. @@ -9726,6 +9726,10 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty if (battle_config.sc_castcancel&bl->type) unit_skillcastcancel(bl, 0); break; + case SC_VACUUM_EXTREME: + if (!map_flag_gvg(bl->m)) + unit_stop_walking(bl, 1); + break; } // Set option as needed. @@ -10588,9 +10592,6 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const } } break; - case SC_VACUUM_EXTREME: - if(sc && sce->val2 && sc->cant.move > 0) sc->cant.move--; - break; case SC_KYOUGAKU: clif_status_load(bl, SI_KYOUGAKU, 0); // Avoid client crash clif_status_load(bl, SI_ACTIVE_MONSTER_TRANSFORM, 0); @@ -11324,7 +11325,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) int heal = status->max_hp * 3 / 100; if( sc && sc->data[SC_AKAITSUKI] && heal ) heal = ~heal + 1; - status_heal(bl, heal, 0, 2); + status_heal(bl, heal, 0, 3); sc_timer_next(5000 + tick, status_change_timer, bl->id, data); return 0; } @@ -11423,16 +11424,6 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) return 0; } break; - case SC_VACUUM_EXTREME: - if( --(sce->val4) >= 0 ) { - if( !unit_is_walking(bl) && !sce->val2 ) { - sc->cant.move++; - sce->val2 = 1; - } - sc_timer_next(100 + tick, status_change_timer, bl->id, data); - return 0; - } - break; case SC_BLOODSUCKER: if( --(sce->val4) >= 0 ) { struct block_list *src = map_id2bl(sce->val2); diff --git a/src/map/unit.c b/src/map/unit.c index c4a2b478d7..9828134e92 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -141,10 +141,10 @@ TBL_PC* unit_get_master(struct block_list *bl) { if(bl) switch(bl->type) { - case BL_HOM : return (((TBL_HOM *)bl)->master); - case BL_ELEM : return (((TBL_ELEM *)bl)->master); - case BL_PET : return (((TBL_PET *)bl)->master); - case BL_MER : return (((TBL_MER *)bl)->master); + case BL_HOM: return (((TBL_HOM *)bl)->master); + case BL_ELEM: return (((TBL_ELEM *)bl)->master); + case BL_PET: return (((TBL_PET *)bl)->master); + case BL_MER: return (((TBL_MER *)bl)->master); } return NULL; } @@ -167,7 +167,7 @@ int* unit_get_masterteleport_timer(struct block_list *bl) } /** - * Warps a unit to its master master has gone out of site (3 second default) \n + * Warps a unit to its master if the master has gone out of sight (3 second default) * Can be any object with a master [MOB|PET|HOM|MER|ELEM] * @param tid: Timer * @param tick: tick (unused) @@ -197,23 +197,23 @@ int unit_teleport_timer(int tid, unsigned int tick, int id, intptr_t data) } /** - * Checks if a slave unit is outside their max distance from master \n - * If so, starts a timer for (default: 3 seconds) which will teleport the unit back to master + * Checks if a slave unit is outside their max distance from master + * If so, starts a timer (default: 3 seconds) which will teleport the unit back to master * @param sbl: Object with a master [MOB|PET|HOM|MER|ELEM] * @return 0 */ int unit_check_start_teleport_timer(struct block_list *sbl) { TBL_PC *msd = unit_get_master(sbl); - int max_dist=0; - switch(sbl->type){ - case BL_HOM: max_dist = AREA_SIZE; break; - case BL_ELEM: max_dist = MAX_ELEDISTANCE; break; - case BL_PET : max_dist = AREA_SIZE; break; - case BL_MER : max_dist = MAX_MER_DISTANCE; break; + int max_dist = 0; + switch(sbl->type) { + case BL_HOM: max_dist = AREA_SIZE; break; + case BL_ELEM: max_dist = MAX_ELEDISTANCE; break; + case BL_PET: max_dist = AREA_SIZE; break; + case BL_MER: max_dist = MAX_MER_DISTANCE; break; } // If there is a master and it's a valid type - if(msd && (msd->bl.type&BL_PC) && max_dist){ ///TODO the bl.type is an hotfix please dig it to remove it + if(msd && (msd->bl.type&BL_PC) && max_dist) { ///TODO the bl.type is an hotfix please dig it to remove it int *msd_tid = unit_get_masterteleport_timer(sbl); if(msd_tid == NULL) return 0; if (!check_distance_bl(&msd->bl, sbl, max_dist)) {