diff options
author | kenpachi2k11 <kenpachi2k11@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-21 22:15:28 +0000 |
---|---|---|
committer | kenpachi2k11 <kenpachi2k11@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-21 22:15:28 +0000 |
commit | 653ba172167466374794140277e34969ae544eaf (patch) | |
tree | f3ed3c317454c35609fdaca79245fc1243a5c778 | |
parent | ee6ca5d682f79c8946fa778802cd709f1110f7fb (diff) | |
download | hercules-653ba172167466374794140277e34969ae544eaf.tar.gz hercules-653ba172167466374794140277e34969ae544eaf.tar.bz2 hercules-653ba172167466374794140277e34969ae544eaf.tar.xz hercules-653ba172167466374794140277e34969ae544eaf.zip |
Renamed bUseSPrateSkill to bSkillUseSPrate.
Added bSkillUseSP.
Added documentation for bSkillUseSPrate(bUseSPrateSkill), bSkillUseSP, bSkillCooldown, bSkillFixedCast, bSkillVariableCast, bSkillFixedCast and bVariableCastrate. (bugreport:6193)
Fixed Enriched White PotionZs (#12428) and Enrich Celermine Juices (#12437) bonus script. (bugreport:5790)
Fixed Mental Sticks (#1654) bonus script. (bugreport:6071)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16466 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | db/const.txt | 3 | ||||
-rw-r--r-- | db/pre-re/item_db.txt | 4 | ||||
-rw-r--r-- | db/re/item_db.txt | 6 | ||||
-rw-r--r-- | doc/item_bonus.txt | 10 | ||||
-rw-r--r-- | sql-files/item_db.sql | 5 | ||||
-rw-r--r-- | sql-files/item_db_re.sql | 2 | ||||
-rw-r--r-- | src/map/map.h | 5 | ||||
-rw-r--r-- | src/map/pc.c | 31 | ||||
-rw-r--r-- | src/map/pc.h | 2 | ||||
-rw-r--r-- | src/map/script.c | 3 | ||||
-rw-r--r-- | src/map/skill.c | 11 | ||||
-rw-r--r-- | src/map/status.c | 3 |
12 files changed, 57 insertions, 28 deletions
diff --git a/db/const.txt b/db/const.txt index b7598b705..b1f16d275 100644 --- a/db/const.txt +++ b/db/const.txt @@ -580,12 +580,13 @@ bWeaponMatk 2046 bMatk 2047 bSPGainRaceAttack 2048 bHPGainRaceAttack 2049 -bUseSPrateSkill 2050 +bSkillUseSPrate 2050 bSkillCooldown 2051 bSkillFixedCast 2052 bSkillVariableCast 2053 bFixedCastrate 2054 bVariableCastrate 2055 +bSkillUseSP 2056 EQI_HEAD_TOP 1 EQI_ARMOR 2 diff --git a/db/pre-re/item_db.txt b/db/pre-re/item_db.txt index ef32ced41..892e54648 100644 --- a/db/pre-re/item_db.txt +++ b/db/pre-re/item_db.txt @@ -4970,7 +4970,7 @@ 12425,SP_Increase_Potion_(Small),SP Increase Potion (Small),0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCMSPRATE,500000,2; percentheal 0,2; },{},{} 12426,SP_Increase_Potion_(Medium),SP Increase Potion (Medium),0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCMSPRATE,500000,4; percentheal 0,4; },{},{} 12427,SP_Increase_Potion_(Large),SP Increase Potion (Large),0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCMSPRATE,500000,8; percentheal 0,8; },{},{} -12428,Concentrated_White_Potion_Z,Concentrated White Potion Z,0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_EXTRACT_WHITE_POTION_Z,500000,0; itemheal 1000,0; },{},{} +12428,Concentrated_White_Potion_Z,Concentrated White Potion Z,0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_EXTRACT_WHITE_POTION_Z,500000,0; heal 1000,0; },{},{} 12429,Savage_Full_Roast,Savage Full Roast,2,,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_SAVAGE_STEAK, 300000, 20; },{},{} 12430,Cocktail_Warg_Blood,Cocktail Warg Blood,2,,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_COCKTAIL_WARG_BLOOD, 300000, 20; },{},{} 12431,Minor_Stew,Minor Stew,2,,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MINOR_BBQ, 300000, 20; },{},{} @@ -4979,7 +4979,7 @@ 12434,Petite_Tail_Noodles,Petite Tail Noodles,2,,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_PUTTI_TAILS_NOODLES, 300000, 20; },{},{} 12435,Black_Mass,Black Mass,2,,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_STOMACHACHE, 60000, rand(5,10); },{},{} 12436,Vitata_500,Vitata 500,0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_VITATA_500,500000,0; itemheal 0,200; },{},{} -12437,Concentrated_Ceromain_Soup,Concentrated Ceromain Soup,2,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(1500,1600),0; },{},{} +12437,Concentrated_Ceromain_Soup,Concentrated Ceromain Soup,2,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_EXTRACT_SALAMINE_JUICE,500000; },{},{} 12438,F_Giant_Fly_Wing,F Giant Fly Wing,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12439,F_Battle_Manual,F Battle Manual,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12440,F_Insurance,F Insurance,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 01b8ea35e..f75de2649 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -941,7 +941,7 @@ 1651,P_Staff2,Eden Staff II,4,0,,0,60:150,,1,0,0x00818314,7,2,2,2,40,0,10,{ bonus bInt,3; },{},{} 1652,Tourist_Staff,Tourist Staff,4,0,,500,35:0,,1,0,0x00818315,7,2,2,1,1,0,10,{ bonus bInt,2; bonus bAgi,1; },{},{} 1653,Staff_Of_Healing_C,Staff of Healing,4,20,,0,10:100,,1,0,0x00008110,7,2,2,3,1,0,10,{ bonus bAtkEle,Ele_Holy; },{},{} -1654,Mental_Stick,Mental Stick,4,20,,500,40:170,,1,1,0x00818315,7,2,2,3,102,1,10,{ if (getrefine() > 5) { /* bonus bSkillAtk,"SO_PSYCHIC_WAVE",(getrefine()-5)*2; */ bonus bMaxHPRate,-(getrefine()-5)*2; } /* bonus2 bSkillVariableCast,"SO_PSYCHIC_WAVE",-3000; bonus2 bUseSPAmount,"SO_PSYCHIC_WAVE",-60; */ },{},{ itemheal 0,-100; } +1654,Mental_Stick,Mental Stick,4,20,,500,40:170,,1,1,0x00818315,7,2,2,3,102,1,10,{ if(getrefine()>5) { bonus bSkillAtk,"SO_PSYCHIC_WAVE",(getrefine()-5)*2; bonus bMaxHPRate,-(getrefine()-5)*2; } bonus2 bSkillVariableCast,"SO_PSYCHIC_WAVE",-3000; bonus2 bSkillUseSP,"SO_PSYCHIC_WAVE",-60; },{},{ itemheal 0,-100; } //1655, //1656, 1657,Mercy_Staff1,Mercy Staff I,4,20,,500,30:160,,1,2,0x00000100,7,2,2,3,100,1,10,{ bonus bInt,2; bonus bAtkEle,Ele_Holy; bonus bHealPower,10; if(isequipped(2471,2569,15029)){ bonus bHealPower,25; }; },{},{} @@ -5471,7 +5471,7 @@ 12425,SP_Increase_Potion_(Small),SP Increase Potion (Small),0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCMSPRATE,500000,2; percentheal 0,2; },{},{} 12426,SP_Increase_Potion_(Medium),SP Increase Potion (Medium),0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCMSPRATE,500000,4; percentheal 0,4; },{},{} 12427,SP_Increase_Potion_(Large),SP Increase Potion (Large),0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCMSPRATE,500000,8; percentheal 0,8; },{},{} -12428,Concentrated_White_Potion_Z,Concentrated White Potion Z,0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_EXTRACT_WHITE_POTION_Z,500000,0; itemheal 1000,0; },{},{} +12428,Concentrated_White_Potion_Z,Concentrated White Potion Z,0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_EXTRACT_WHITE_POTION_Z,500000,0; heal 1000,0; },{},{} 12429,Savage_Full_Roast,Savage Full Roast,2,,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_SAVAGE_STEAK, 300000, 20; },{},{} 12430,Cocktail_Warg_Blood,Cocktail Warg Blood,2,,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_COCKTAIL_WARG_BLOOD, 300000, 20; },{},{} 12431,Minor_Stew,Minor Stew,2,,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MINOR_BBQ, 300000, 20; },{},{} @@ -5480,7 +5480,7 @@ 12434,Petite_Tail_Noodles,Petite Tail Noodles,2,,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_PUTTI_TAILS_NOODLES, 300000, 20; },{},{} 12435,Black_Mass,Black Mass,2,,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_STOMACHACHE, 60000, rand(5,10); },{},{} 12436,Vitata_500,Vitata 500,0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_VITATA_500,500000,0; itemheal 0,200; },{},{} -12437,Concentrated_Ceromain_Soup,Concentrated Ceromain Soup,2,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(1500,1600),0; },{},{} +12437,Concentrated_Ceromain_Soup,Concentrated Ceromain Soup,2,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_EXTRACT_SALAMINE_JUICE,500000; },{},{} 12438,F_Giant_Fly_Wing,F Giant Fly Wing,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12439,F_Battle_Manual,F Battle Manual,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12440,F_Insurance,F Insurance,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt index cf2145053..16039f07d 100644 --- a/doc/item_bonus.txt +++ b/doc/item_bonus.txt @@ -424,4 +424,12 @@ bonus bMagicHPGainValue,n; Heals +n HP when killing an enemy with magic attack. bonus3 bAddClassDropItem,s,x,n; Adds an n/100% chance of dropping item s when killing monster class x. bonus2 bHPGainRaceAttack,x,n; Heals n HP when attacking x Race on every hit -bonus2 bSPGainRaceAttack,x,n; Heals n SP when attacking x Race on every hit
\ No newline at end of file +bonus2 bSPGainRaceAttack,x,n; Heals n SP when attacking x Race on every hit + +bonus2 bSkillUseSPrate,s,x; Reduces SP consumption of skill s by x%. (supports skill names.) +bonus2 bSkillUseSP,s,x; Reduces SP consumption of skill s by x. (supports skill names.) +bonus2 bSkillCooldown,s,x; Increases cooldown of skill s by x milliseconds. (supports skill names.) +bonus2 bSkillFixedCast,s,x; Increases fixed cast time of skill s by x milliseconds. (supports skill names.) +bonus2 bSkillVariableCast,s,x; Increases variable cast time of skill s by x milliseconds. (supports skill names.) [Not yet implemented!] +bonus2 bSkillFixedCast,x; Increases fixed cast time of skills x%. (supports skill names.) +bonus2 bVariableCastrate,x; Increases variable cast time of skills x%. (supports skill names.) [Not yet implemented!]
\ No newline at end of file diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql index d9d9b5efd..e8f211fe3 100644 --- a/sql-files/item_db.sql +++ b/sql-files/item_db.sql @@ -965,7 +965,6 @@ REPLACE INTO `item_db` VALUES (1650,'P_Staff1','Eden Staff I',4,0,NULL,0,60,NULL REPLACE INTO `item_db` VALUES (1651,'P_Staff2','Eden Staff II',4,0,NULL,0,60,NULL,1,0,0x00818314,7,2,2,2,40,0,10,'/* bonus bWeaponMatk,150; */ bonus bInt,3;',NULL,NULL); REPLACE INTO `item_db` VALUES (1652,'Tourist_Staff','Tourist Staff',4,0,NULL,500,35,NULL,1,0,0x00818315,7,2,2,1,1,0,10,'bonus bInt,2; bonus bAgi,1;',NULL,NULL); REPLACE INTO `item_db` VALUES (1653,'Staff_Of_Healing_C','Staff of Healing',4,20,NULL,0,10,NULL,1,0,0x00008110,7,2,2,3,1,0,10,'/* bonus bWeaponMatk,100; */ bonus bAtkEle,Ele_Holy;',NULL,NULL); -REPLACE INTO `item_db` VALUES (1654,'Mental_Stick','Mental Stick',4,20,NULL,500,40,NULL,1,1,0x00818315,7,2,2,3,102,1,10,'/* bonus bWeaponMatk,170; */ if (getrefine() > 5) { /* bonus bSkillAtk,\"SO_PSYCHIC_WAVE\",(getrefine()-5)*2; */ bonus bMaxHPRate,-(getrefine()-5)*2; } /* bonus2 bVariableCastTime,\"SO_PSYCHIC_WAVE\",-3000; bonus2 bUseSPAmount,\"SO_PSYCHIC_WAVE\",-60; */',NULL,'itemheal 0,-100;'); # 1655, # 1656, REPLACE INTO `item_db` VALUES (1657,'Mercy_Staff1','Mercy Staff I',4,20,NULL,500,30,NULL,1,2,0x00000100,7,2,2,3,100,1,10,'/* bonus bWeaponMatk,160; */ bonus bInt,2; bonus bAtkEle,Ele_Holy; bonus bHealPower,10; if(isequipped(2471,2569,15029)){ bonus bHealPower,25; };',NULL,NULL); @@ -5495,7 +5494,7 @@ REPLACE INTO `item_db` VALUES (12424,'HP_Increase_Potion_(Large)','HP Increase P REPLACE INTO `item_db` VALUES (12425,'SP_Increase_Potion_(Small)','SP Increase Potion (Small)',0,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_INCMSPRATE,500000,2; percentheal 0,2;',NULL,NULL); REPLACE INTO `item_db` VALUES (12426,'SP_Increase_Potion_(Medium)','SP Increase Potion (Medium)',0,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_INCMSPRATE,500000,4; percentheal 0,4;',NULL,NULL); REPLACE INTO `item_db` VALUES (12427,'SP_Increase_Potion_(Large)','SP Increase Potion (Large)',0,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_INCMSPRATE,500000,8; percentheal 0,8;',NULL,NULL); -REPLACE INTO `item_db` VALUES (12428,'Concentrated_White_Potion_Z','Concentrated White Potion Z',0,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_EXTRACT_WHITE_POTION_Z,500000,0; itemheal 1000,0;',NULL,NULL); +REPLACE INTO `item_db` VALUES (12428,'Concentrated_White_Potion_Z','Concentrated White Potion Z',0,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_EXTRACT_WHITE_POTION_Z,500000,0; heal 1000,0;',NULL,NULL); REPLACE INTO `item_db` VALUES (12429,'Savage_Full_Roast','Savage Full Roast',2,NULL,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_SAVAGE_STEAK, 300000, 20;',NULL,NULL); REPLACE INTO `item_db` VALUES (12430,'Cocktail_Warg_Blood','Cocktail Warg Blood',2,NULL,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_COCKTAIL_WARG_BLOOD, 300000, 20;',NULL,NULL); REPLACE INTO `item_db` VALUES (12431,'Minor_Stew','Minor Stew',2,NULL,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_MINOR_BBQ, 300000, 20;',NULL,NULL); @@ -5504,7 +5503,7 @@ REPLACE INTO `item_db` VALUES (12433,'Drosera_Herb_Salad','Drosera Herb Salad',2 REPLACE INTO `item_db` VALUES (12434,'Petite_Tail_Noodles','Petite Tail Noodles',2,NULL,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_PUTTI_TAILS_NOODLES, 300000, 20;',NULL,NULL); REPLACE INTO `item_db` VALUES (12435,'Black_Mass','Black Mass',2,NULL,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_STOMACHACHE, 60000, rand(5,10);',NULL,NULL); REPLACE INTO `item_db` VALUES (12436,'Vitata_500','Vitata 500',0,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_VITATA_500,500000,0; itemheal 0,200;',NULL,NULL); -REPLACE INTO `item_db` VALUES (12437,'Concentrated_Ceromain_Soup','Concentrated Ceromain Soup',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(1500,1600),0;',NULL,NULL); +REPLACE INTO `item_db` VALUES (12437,'Concentrated_Ceromain_Soup','Concentrated Ceromain Soup',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_EXTRACT_SALAMINE_JUICE,500000;',NULL,NULL); REPLACE INTO `item_db` VALUES (12438,'F_Giant_Fly_Wing','F Giant Fly Wing',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db` VALUES (12439,'F_Battle_Manual','F Battle Manual',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db` VALUES (12440,'F_Insurance','F Insurance',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 839901528..99929c978 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -103,7 +103,7 @@ REPLACE INTO `item_db_re` VALUES (1650,'P_Staff1','Eden Staff I',4,0,NULL,0,'60: REPLACE INTO `item_db_re` VALUES (1651,'P_Staff2','Eden Staff II',4,0,NULL,0,'60:150',NULL,1,0,0x00818314,7,2,2,2,40,0,10,'bonus bInt,3;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (1652,'Tourist_Staff','Tourist Staff',4,0,NULL,500,'35:0',NULL,1,0,0x00818315,7,2,2,1,1,0,10,'bonus bInt,2; bonus bAgi,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (1653,'Staff_Of_Healing_C','Staff of Healing',4,20,NULL,0,'10:100',NULL,1,0,0x00008110,7,2,2,3,1,0,10,'bonus bAtkEle,Ele_Holy;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (1654,'Mental_Stick','Mental Stick',4,20,NULL,500,'40:170',NULL,1,1,0x00818315,7,2,2,3,102,1,10,'if (getrefine() > 5) { /* bonus bSkillAtk,\"SO_PSYCHIC_WAVE\",(getrefine()-5)*2; */ bonus bMaxHPRate,-(getrefine()-5)*2; } /* bonus2 bVariableCastTime,\"SO_PSYCHIC_WAVE\",-3000; bonus2 bUseSPAmount,\"SO_PSYCHIC_WAVE\",-60; */',NULL,'itemheal 0,-100;'); +REPLACE INTO `item_db_re` VALUES (1654,'Mental_Stick','Mental Stick',4,20,NULL,500,'40:170',NULL,1,1,0x00818315,7,2,2,3,102,1,10,'if(getrefine()>5) { bonus bSkillAtk,"SO_PSYCHIC_WAVE",(getrefine()-5)*2; bonus bMaxHPRate,-(getrefine()-5)*2; } bonus2 bSkillVariableCast,"SO_PSYCHIC_WAVE",-3000; bonus2 bSkillUseSP,"SO_PSYCHIC_WAVE",-60;',NULL,'itemheal 0,-100;'); # 1655, # 1656, REPLACE INTO `item_db_re` VALUES (1657,'Mercy_Staff1','Mercy Staff I',4,20,NULL,500,'30:160',NULL,1,2,0x00000100,7,2,2,3,100,1,10,'bonus bInt,2; bonus bAtkEle,Ele_Holy; bonus bHealPower,10; if(isequipped(2471,2569,15029)){ bonus bHealPower,25; };',NULL,NULL); diff --git a/src/map/map.h b/src/map/map.h index bb7a99432..6b8ffbe5b 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -392,8 +392,9 @@ enum _sp { SP_UNSTRIPABLE_WEAPON,SP_UNSTRIPABLE_ARMOR,SP_UNSTRIPABLE_HELM,SP_UNSTRIPABLE_SHIELD, // 2034-2037 SP_INTRAVISION, SP_ADD_MONSTER_DROP_ITEMGROUP, SP_SP_LOSS_RATE, // 2038-2040 SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE, SP_ADD_CLASS_DROP_ITEM, //2041-2045 - SP_WEAPON_MATK, SP_BASE_MATK, SP_SP_GAIN_RACE_ATTACK, SP_HP_GAIN_RACE_ATTACK, SP_SP_RATE_SKILL, //2046-2050 - SP_SKILL_COOLDOWN,SP_SKILL_FIXEDCAST, SP_SKILL_VARIABLECAST, SP_FIXCASTRATE, SP_VARCASTRATE //2051-2055 + SP_WEAPON_MATK, SP_BASE_MATK, SP_SP_GAIN_RACE_ATTACK, SP_HP_GAIN_RACE_ATTACK, SP_SKILL_USE_SP_RATE, //2046-2050 + SP_SKILL_COOLDOWN,SP_SKILL_FIXEDCAST, SP_SKILL_VARIABLECAST, SP_FIXCASTRATE, SP_VARCASTRATE, //2051-2055 + SP_SKILL_USE_SP //2056 }; enum _look { diff --git a/src/map/pc.c b/src/map/pc.c index 138bc0828..459f6ef99 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3064,19 +3064,19 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) if(sd->state.lr_flag != 2) sd->hp_gain_race_attack[type2] = cap_value(sd->hp_gain_race_attack[type2] + val, 0, INT16_MAX); break; - case SP_SP_RATE_SKILL: //bonus2 bUseSPrateSkill,n,x; + case SP_SKILL_USE_SP_RATE: //bonus2 bSkillUseSPrate,n,x; if(sd->state.lr_flag == 2) break; - ARR_FIND(0, ARRAYLENGTH(sd->sprateskill), i, sd->sprateskill[i].id == 0 || sd->sprateskill[i].id == type2); - if (i == ARRAYLENGTH(sd->sprateskill)) { - ShowDebug("run_script: bonus2 bUseSPrateSkill reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->sprateskill), type2, val); + ARR_FIND(0, ARRAYLENGTH(sd->skillusesprate), i, sd->skillusesprate[i].id == 0 || sd->skillusesprate[i].id == type2); + if (i == ARRAYLENGTH(sd->skillusesprate)) { + ShowDebug("run_script: bonus2 bSkillUseSPrate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillusesprate), type2, val); break; } - if (sd->sprateskill[i].id == type2) - sd->sprateskill[i].val += val; + if (sd->skillusesprate[i].id == type2) + sd->skillusesprate[i].val += val; else { - sd->sprateskill[i].id = type2; - sd->sprateskill[i].val = val; + sd->skillusesprate[i].id = type2; + sd->skillusesprate[i].val = val; } break; case SP_SKILL_COOLDOWN: @@ -3127,6 +3127,21 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) sd->skillvarcast[i].val = val; } break; + case SP_SKILL_USE_SP: //bonus2 bSkillUseSP,n,x; + if(sd->state.lr_flag == 2) + break; + ARR_FIND(0, ARRAYLENGTH(sd->skillusesp), i, sd->skillusesp[i].id == 0 || sd->skillusesp[i].id == type2); + if (i == ARRAYLENGTH(sd->skillusesp)) { + ShowDebug("run_script: bonus2 bSkillUseSP reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillusesp), type2, val); + break; + } + if (sd->skillusesp[i].id == type2) + sd->skillusesp[i].val += val; + else { + sd->skillusesp[i].id = type2; + sd->skillusesp[i].val = val; + } + break; default: ShowWarning("pc_bonus2: unknown type %d %d %d!\n",type,type2,val); break; diff --git a/src/map/pc.h b/src/map/pc.h index 2cf4947a1..6f2275fa7 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -259,7 +259,7 @@ struct map_session_data { struct { //skillatk raises bonus dmg% of skills, skillheal increases heal%, skillblown increases bonus blewcount for some skills. unsigned short id; short val; - } skillatk[MAX_PC_BONUS], sprateskill[MAX_PC_BONUS], skillheal[5], skillheal2[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS], skillcooldown[MAX_PC_BONUS], skillfixcast[MAX_PC_BONUS], skillvarcast[MAX_PC_BONUS]; + } skillatk[MAX_PC_BONUS], skillusesprate[MAX_PC_BONUS], skillusesp[MAX_PC_BONUS], skillheal[5], skillheal2[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS], skillcooldown[MAX_PC_BONUS], skillfixcast[MAX_PC_BONUS], skillvarcast[MAX_PC_BONUS]; struct { short value; int rate; diff --git a/src/map/script.c b/src/map/script.c index 68baecc23..0329f4928 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -7354,10 +7354,11 @@ BUILDIN_FUNC(bonus) case SP_ADD_SKILL_BLOW: case SP_CASTRATE: case SP_ADDEFF_ONSKILL: - case SP_SP_RATE_SKILL: + case SP_SKILL_USE_SP_RATE: case SP_SKILL_COOLDOWN: case SP_SKILL_FIXEDCAST: case SP_SKILL_VARIABLECAST: + case SP_SKILL_USE_SP: // these bonuses support skill names val1 = ( script_isstring(st,3) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) ); break; diff --git a/src/map/skill.c b/src/map/skill.c index 3c99dc74a..006018d47 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -12794,10 +12794,13 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, short req.sp += (status->max_sp * (-sp_rate))/100; if( sd->dsprate != 100 ) req.sp = req.sp * sd->dsprate / 100; - - ARR_FIND(0, ARRAYLENGTH(sd->sprateskill), i, sd->sprateskill[i].id == skill); - if( i < ARRAYLENGTH(sd->sprateskill) ) - sp_skill_rate_bonus += sd->sprateskill[i].val; + + ARR_FIND(0, ARRAYLENGTH(sd->skillusesprate), i, sd->skillusesprate[i].id == skill); + if( i < ARRAYLENGTH(sd->skillusesprate) ) + sp_skill_rate_bonus += sd->skillusesprate[i].val; + ARR_FIND(0, ARRAYLENGTH(sd->skillusesp), i, sd->skillusesp[i].id == skill); + if( i < ARRAYLENGTH(sd->skillusesp) ) + req.sp -= sd->skillusesp[i].val; req.sp = cap_value(req.sp * sp_skill_rate_bonus / 100, 0, SHRT_MAX); diff --git a/src/map/status.c b/src/map/status.c index b349e6ab2..1b12c2ae4 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2358,7 +2358,8 @@ int status_calc_pc_(struct map_session_data* sd, bool first) + sizeof(sd->addeff2) + sizeof(sd->addeff3) + sizeof(sd->skillatk) - + sizeof(sd->sprateskill) + + sizeof(sd->skillusesprate) + + sizeof(sd->skillusesp) + sizeof(sd->skillheal) + sizeof(sd->skillheal2) + sizeof(sd->hp_loss) |