summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/const.txt6
-rw-r--r--db/item_db.txt80
-rw-r--r--db/item_trade.txt64
-rw-r--r--src/map/battle.c132
-rw-r--r--src/map/map.h4
-rw-r--r--src/map/pc.c81
-rw-r--r--src/map/pc.h7
-rw-r--r--src/map/script.c19
-rw-r--r--src/map/skill.c123
-rw-r--r--src/map/status.c34
-rw-r--r--src/map/status.h4
11 files changed, 380 insertions, 174 deletions
diff --git a/db/const.txt b/db/const.txt
index 1d3d18cb5..560a2caf1 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -381,6 +381,7 @@ bHPDrainRateRace 1084
bSPDrainRateRace 1085
bIgnoreMdefRate 1086
bIgnoreDefRate 1087
+bSkillHeal2 1088
bRestartFullRecover 2000
bNoCastCancel 2001
@@ -472,6 +473,7 @@ RC_Angel 8
RC_Dragon 9
RC_Boss 10
RC_NonBoss 11
+RC_NonDemiHuman 12
BF_WEAPON 0x0001
BF_MAGIC 0x0002
@@ -802,6 +804,10 @@ SC_DEF_RATE 275
SC_SPREGEN 276
SC_WALKSPEED 277
SC_REBIRTH 284
+SC_SKILLCASTRATE 285
+SC_DEFRATIOATK 286
+SC_HPDRAIN 287
+SC_SKILLATKBONUS 288
e_gasp 0
e_what 1
diff --git a/db/item_db.txt b/db/item_db.txt
index 49b12d45d..1e686ef45 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -668,7 +668,7 @@
1377,Hurricane_Fury,Hurricane's Fury,4,20,,3500,332,,1,1,0x000444A2,7,2,34,4,80,1,7,{ bonus2 bSubSize,1,10+getrefine(); bonus bAspdRate,getrefine(); bonus3 bAutoSpell,"NPC_PULSESTRIKE",5,20; },{},{}
1378,Great_Axe_C,Refined Great Axe,4,1,,0,215,,1,0,0x000444A2,7,2,34,4,1,0,7,{ bonus bStr,5; bonus bHit,20; bonus2 bAddSkillBlow,"MC_MAMMONITE",5; bonus2 bAddEff,Eff_Stun,1500; },{},{}
1379,Elite_Soldier's_Battle_Axe,Elite Soldier's Battle Axe,4,,,0,200,,1,0,0x000444A2,7,2,34,3,80,1,7,{ bonus bStr,3; bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; },{},{}
-1380,Elite_Soldier's_Battle_Axe_,Elite Soldier's Battle Axe,4,,,0,200,,1,0,0x000444A2,7,2,34,3,80,1,7,{ bonus bStr,3; bonus2 bAddRace,RC_DemiHuman,55; bonus bUnbreakableWeapon,0; },{},{}
+1380,Elite_Soldier's_Battle_Axe_,Elite Soldier's Battle Axe,4,,,0,200,,1,0,0x000444A2,7,2,34,3,80,1,7,{ bonus bStr,3; bonus2 bAddRace,RC_DemiHuman,55; bonusautoscript "{ sc_start SC_STRIPARMOR,3000,0; }",50,BF_WEAPON,1; bonus bUnbreakableWeapon,0; },{},{}
1381,Novice_Battle_Axe,Novice Battle Axe,4,1,,0,100,,1,0,0x000444A3,7,2,34,1,1,0,7,{},{},{}
// 1-Handed Spears
1401,Javelin,Javelin,4,150,,700,28,,3,3,0x00004082,7,2,2,1,4,1,4,{},{},{}
@@ -777,7 +777,7 @@
1540,Grand_Cross_,Grand Cross,4,20,,1500,140,,1,1,0x00008110,7,2,2,4,40,1,8,{ bonus bAtkEle,Ele_Holy; skill "PR_TURNUNDEAD",3; bonus3 bAutoSpell,"PR_TURNUNDEAD",3,100; bonus2 bSPDrainValueRace,RC_Undead,1; bonus2 bSPGainRace,RC_Undead,3; },{},{}
1541,Nemesis,Nemesis,4,20,,900,120,,1,3,0x00008110,7,2,2,4,60,1,8,{ bonus3 bAutoSpell,"AL_CRUCIS",1+getrefine(),100; bonusautoscript "{ sc_start SC_INCBASEATK,20000,50; }",10; },{},{}
1542,Millitant_Morning_Star,Millitant Morning Star,4,0,,0,105,,1,0,0x0004C5B3,7,2,2,3,80,1,8,{ bonus bStr,1; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; },{},{}
-1543,Millitant_Morning_Star_,Millitant Morning Star,4,0,,0,105,,1,0,0x0004C5B3,7,2,2,3,80,1,8,{ bonus bStr,1; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,75; bonus bUnbreakableWeapon,0; },{},{}
+1543,Millitant_Morning_Star_,Millitant Morning Star,4,0,,0,105,,1,0,0x0004C5B3,7,2,2,3,80,1,8,{ bonus bStr,1; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,75; bonus bUnbreakableWeapon,0; bonusautoscript "{ sc_start SC_STUN,6000,0; }",50,BF_WEAPON,1; },{},{}
//1544#Luna_Kaleet#
1545,Novice_Mace,Novice Mace,4,1,,0,57,,1,0,0x0004C5B3,7,2,2,1,2,0,8,{},{},{}
// Books
@@ -937,8 +937,8 @@
1820,Electric_Fist,Electric Fist,4,20,,650,80,,1,3,0x00008100,7,2,2,3,75,1,12,{ bonus3 bAutoSpell,"SA_LIGHTNINGLOADER",5,10; },{},{}
1821,Seismic_Fist,Seismic Fist,4,20,,650,80,,1,3,0x00008100,7,2,2,3,75,1,12,{ bonus3 bAutoSpell,"SA_SEISMICWEAPON",5,10; },{},{}
1822,Combo_Battle_Glove,Barrage Fist,4,20,,500,30,,1,4,0x00008100,7,2,2,3,60,1,12,{ bonus2 bSkillAtk,"MO_TRIPLEATTACK",15; bonus2 bSkillAtk,"MO_CHAINCOMBO",15; bonus2 bSkillAtk,"MO_COMBOFINISH",20; },{},{}
-1823,Champion's_Battle_Fist,Champion's Battle Fist,4,0,,0,30,,1,0,0x00008100,7,2,2,3,80,1,12,{ bonus bStr,2; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; },{},{}
-1824,Champion's_Battle_Fist_,Champion's Battle Fist,4,0,,0,30,,1,0,0x00008100,7,2,2,3,80,1,12,{ bonus bStr,2; bonus bInt,1; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bCastrate,271,-25; bonus bUnbreakableWeapon,0; },{},{}
+1823,Champion's_Battle_Fist,Champion's Battle Fist,4,0,,0,30,,1,0,0x00008100,7,2,2,3,80,1,12,{ bonus bStr,2; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus4 bAutoSpell,"CH_SOULCOLLECT",1,50,0; bonus bUnbreakableWeapon,0; },{},{}
+1824,Champion's_Battle_Fist_,Champion's Battle Fist,4,0,,0,30,,1,0,0x00008100,7,2,2,3,80,1,12,{ bonus bStr,2; bonus bInt,1; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bCastrate,271,-25; bonusautoscript "{ sc_start4 SC_SKILLCASTRATE,6000,271,-100,0,0; }",50,BF_WEAPON; bonus bUnbreakableWeapon,0; },{},{}
//1825#Soul_Of_Hels_Leon#
// Instruments
1901,Violin,Violin,4,4000,,700,50,,1,3,0x00080000,7,1,2,1,2,1,13,{},{},{}
@@ -1220,13 +1220,13 @@
2373,Holy_Robe_,Holy Robe,5,20,,1700,,7,,1,0x00008110,7,2,16,,60,1,0,{ bonus bMdef,5; bonus2 bSubRace,RC_Demon,15; bonus2 bSubEle,Ele_Dark,10; },{},{}
2374,Lucifer_Robe,Diabolus Robe,5,20,,300,,6,,1,0x00098B1C,2,2,16,,0,1,0,{ bonus bMaxSP,150; bonus bMdef,5; bonus2 bSkillAtk,"AL_HEAL",6; bonus2 bSkillheal,"AL_HEAL",6; bonus bDelayRate,-10; if (isequipped(2729)) { bonus bAtkRate,3; bonus bMatkRate,3; } },{},{}
2375,Lucifer_Armor,Diabolus Armor,5,20,,600,,7,,1,0x000654E2,2,2,16,0,0,1,0,{ bonus bStr,2; bonus bDex,1; bonus bMaxHP,150; bonus2 bResEff,Eff_Stun,500; bonus2 bResEff,Eff_Stone,500; if (isequipped(2729)) { bonus bAtkRate,3; bonus bMatkRate,3; } },{},{}
-2376,General's_Plate_Mail,General's Plate Mail,5,0,,0,,7,,1,0x006444A2,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2538) && isequipped(2435)) { bonus2 bSubRace,RC_DemiHuman,6; bonus bVit,3; bonus bMaxHPRate,12; bonus2 bAddItemHealRate,IG_Recovery,10; bonusautoscript "{ sc_start4 SC_HPREGEN,10000,600,1,0,0; }",10,BF_WEAPON; bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; }; },{},{}
-2377,Elite_Engineer's_Armor,Elite Engineer's Armor,5,0,,0,,7,,1,0x00040420,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2538) && isequipped(2435)) { bonus2 bSubRace,RC_DemiHuman,6; bonus bStr,3; bonus bMaxHPRate,12; bonus2 bSkillAtk,"MC_MAMMONITE",20; bonus2 bSkillHeal,"AM_POTIONPITCHER",10; bonus bUnbreakableArmor,0; bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; }; },{},{}
-2378,Assassin's_Robe,Assassin's Robe,5,0,,0,,7,,1,0x00021040,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2538) && isequipped(2435)) { bonus2 bSubRace,RC_DemiHuman,6; bonus bAgi,3; bonus bCritical,3; bonus bMaxHPRate,12; bonusautoscript "{ sc_start4 SC_HPREGEN,10000,300,1,0,0; }",10,BF_WEAPON; bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; }; },{},{}
-2379,Wolong's_Battle_Robe,Wolong's Battle Robe,5,0,,0,,3,,1,0x00010204,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2539) && isequipped(2436)) { bonus2 bSubRace,RC_DemiHuman,6; bonus bInt,3; bonus bMaxHPRate,12; bonus2 bResEff,Eff_Stun,2000; bonus2 bAddEffWhenHit,Eff_Stone,100; bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; }; },{},{}
-2380,Robe_of_Order,Robe of Order,5,0,,0,,3,,1,0x00008110,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2539) && isequipped(2436)) { bonus2 bSubRace,RC_DemiHuman,6; bonus bInt,3; bonus bMaxHPRate,12; bonus2 bcastRate,156,-50; bonus2 bSkillAtk,"AL_HEAL",6; bonus2 bSkillHeal,"AL_HEAL",6; bonus2 bSkillAtk,"PR_SANCTUARY",6; bonus2 bSkillHeal,"PR_SANCTUARY",6; bonus2 bAddEffWhenHit,Eff_Stone,100; bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; }; },{},{}
-2381,Elite_Marksman_Suit,Elite Marksman Suit,5,0,,0,,3,,1,0x00180808,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2539) && isequipped(2436)) { bonus2 bSubRace,RC_DemiHuman,6; bonus bDex,3; bonus bMaxHPRate,12; bonus bLongAtkDef,10; bonus bDelayRate,-25; bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; }; },{},{}
-2382,Elite_Shooter's_Suit,Elite Shooter's Suit,5,0,,0,,3,,1,0x01000000,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2540) && isequipped(2437)) { bonus2 bSubRace,RC_DemiHuman,6; bonus bDex,3; bonus bMaxHPRate,12; bonus bLongAtkDef,10; bonus bDelayRate,-25; bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; }; },{},{}
+2376,General's_Plate_Mail,General's Plate Mail,5,0,,0,,7,,1,0x006444A2,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2538) && isequipped(2435)) { bonus2 bSubRace,RC_NonDemiHuman,-300; bonus bVit,3; bonus bMaxHPRate,12; bonus2 bSkillHeal2,"AL_HEAL",10; bonus2 bAddItemHealRate,IG_Recovery,10; bonusautoscript2 "{ sc_start4 SC_HPREGEN,10000,600,1,0,0; }",50,BF_WEAPON; }; },{},{}
+2377,Elite_Engineer's_Armor,Elite Engineer's Armor,5,0,,0,,7,,1,0x00040420,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2538) && isequipped(2435)) { bonus2 bSubRace,RC_NonDemiHuman,-300; bonus bStr,3; bonus bMaxHPRate,12; bonus2 bSkillAtk,"MC_MAMMONITE",20; bonus2 bSkillHeal,"AM_POTIONPITCHER",10; bonus2 bSkillHeal2,"AM_POTIONPITCHER",10; bonus2 bSkillHeal2,"AL_HEAL",10; bonus bUnbreakableArmor,0; }; },{},{}
+2378,Assassin's_Robe,Assassin's Robe,5,0,,0,,7,,1,0x00021040,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2538) && isequipped(2435)) { bonus2 bSubRace,RC_NonDemiHuman,-300; bonus bAgi,3; bonus bMaxHPRate,12; bonus bCriticalRate,5; bonus bAspdRate,5; bonusautoscript "{ sc_start4 SC_HPREGEN,10000,300,1,0,0; }",50,BF_WEAPON; }; },{},{}
+2379,Wolong's_Battle_Robe,Wolong's Battle Robe,5,0,,0,,3,,1,0x00010204,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2539) && isequipped(2436)) { bonus2 bSubRace,RC_NonDemiHuman,-300; bonus bInt,3; bonus bMaxHPRate,12; bonus2 bResEff,Eff_Stun,2000; bonusautoscript2 "{ sc_start4 SC_ELEMENTALCHANGE,10000,1,Ele_Ghost,1,0; }",50,BF_WEAPON; }; },{},{}
+2380,Robe_of_Order,Robe of Order,5,0,,0,,3,,1,0x00008110,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2539) && isequipped(2436)) { bonus2 bSubRace,RC_NonDemiHuman,-300; bonus bInt,3; bonus bMaxHPRate,12; bonus2 bcastRate,156,-50; bonus2 bSkillAtk,"AL_HEAL",6; bonus2 bSkillHeal,"AL_HEAL",6; bonus2 bSkillAtk,"PR_SANCTUARY",6; bonus2 bSkillHeal,"PR_SANCTUARY",6; bonusautoscript2 "{ sc_start4 SC_ELEMENTALCHANGE,10000,1,Ele_Ghost,1,0; }",50,BF_WEAPON; }; },{},{}
+2381,Elite_Marksman_Suit,Elite Marksman Suit,5,0,,0,,3,,1,0x00180808,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2539) && isequipped(2436)) { bonus2 bSubRace,RC_NonDemiHuman,-300; bonus bDex,3; bonus bMaxHPRate,12; bonus bLongAtkDef,10; bonus bDelayRate,-25; }; },{},{}
+2382,Elite_Shooter's_Suit,Elite Shooter's Suit,5,0,,0,,3,,1,0x01000000,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2540) && isequipped(2437)) { bonus2 bSubRace,RC_NonDemiHuman,-300; bonus bDex,3; bonus bMaxHPRate,12; bonus bLongAtkDef,10; bonus bDelayRate,-25; }; },{},{}
2383,Brynhild,Brynhildr,5,0,,400,,,,0,0xFFFFFFFF,7,2,16,,94,0,0,{ bonus bMdef,10; bonus bMaxHP,20*BaseLevel; bonus bMaxSP,5*BaseLevel; bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus bMatkRate,10; bonus bUnbreakableArmor,0; bonus bNoKnockback,0; },{},{}
2384,Spiritual_Tunic,Spiritual Tunic,5,20,,0,,10,,0,0xFFFFFFFF,7,2,16,,0,0,0,{ bonus2 bSubEle,Ele_Neutral,20; bonus2 bSubEle,Ele_Water,20; bonus bMaxHP,800; bonus2 bResEff,Eff_Freeze,10000; },{},{}
2385,Recuperative_Armor,Recuperative Armor,5,20,,0,,12,,0,0xFFFFFFFF,7,2,16,,0,0,0,{ bonus bNoRegen,1; bonus bNoRegen,2; bonus bHPGainValue,60; bonus bSPGainValue,6; },{},{ heal 0,-100; }
@@ -1427,7 +1427,7 @@
2692,Glove_C,Refined Glove,5,1,,0,,0,,0,0xFFFFFFFE,7,2,136,,1,0,0,{ bonus bDex,4; },{},{}
2693,Brooch_C,Refined Brooch,5,1,,0,,0,,0,0xFFFFFFFE,7,2,136,,1,0,0,{ bonus bAgi,4; },{},{}
2694,Rosary_C,Refined Rosary,5,1,,0,,0,,0,0xFFFFFFFE,7,2,136,,1,0,0,{ bonus bMdef,5; bonus bLuk,4; },{},{}
-2695,Safety_Ring_C,Refined Safety Ring,5,1,,0,,3,,0,0xFFFFFFFE,7,2,136,,1,0,0,{ bonus bMdef,4; },{},{}
+2695,Safety_Ring_C,Refined Safety Ring,5,1,,0,,5,,0,0xFFFFFFFE,7,2,136,,1,0,0,{ bonus bMdef,5; },{},{}
2696,Vesper_Core01_C,Refined Vesper Core 01,5,1,,0,,1,,0,0x00CFDF80,2,2,136,,1,0,0,{ bonus bMdef,3; bonus bInt,2; bonus bMaxSPrate,5; },{},{}
2697,Vesper_Core02_C,Refined Vesper Core 02,5,1,,0,,1,,0,0x00CFDF80,2,2,136,,1,0,0,{ bonus bMdef,3; bonus bStr,3; bonus bBaseAtk,10; },{},{}
2698,Vesper_Core03_C,Refined Vesper Core 03,5,1,,0,,1,,0,0x00CFDF80,2,2,136,,1,0,0,{ bonus bMdef,3; bonus bAgi,3; bonus bFlee,5; },{},{}
@@ -1450,13 +1450,13 @@
2716,Librarian_Gloves,Librarian Gloves,5,20,,100,,0,,1,0x00812200,7,2,136,,0,0,0,{ bonus bMaxSP,20; if (getiteminfo(getequipid(EQI_HAND_R),11) == 15 && isequipped(2717)) { bonus bInt,5; bonus bMaxHP,700; bonus bAspdRate,5; } },{},{}
2717,Pocket_Watch,Pocket Watch,5,20,,200,,0,,0,0x00010204,7,2,136,,80,0,0,{},{},{}
2718,Lunatic_Brooch,Lunatic Brooch,5,20,,200,,0,,1,0x00080808,7,2,136,,65,0,0,{},{},{}
-2719,Iron_Wrist,Iron Wrist,5,20,,700,,1,,0,0x000444A2,2,2,136,,50,0,0,{ bonus2 bSkillAtk,"SM_BASH",6; bonus2 bSkillAtk,"MC_MAMMONITE",6; },{},{}
-2720,Medal_Swordman,Medalion,5,0,,0,,1,,0,0x00004082,7,2,136,,70,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bHit,10; bonus bMaxHP,500; bonus bMaxSP,50; bonus2 bAddEff,Eff_Stun,100; },{},{}
-2721,Medal_Thief,Medalion,5,0,,0,,1,,0,0x00021040,7,2,136,,70,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bFlee,10; bonus bMaxHP,300; bonus bMaxSP,80; bonus2 bAddEff,Eff_Poison,100; },{},{}
-2722,Medal_Acolyte,Medalion,5,0,,0,,1,,0,0x00008110,7,2,136,,70,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bMdef,6; bonus bMaxHP,600; bonus2 bAddEff,Eff_Silence,100; },{},{}
-2723,Medal_Mage,Medalion,5,0,,0,,1,,0,0x00010204,7,2,136,,70,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bMdef,6; bonus bMaxHP,600; bonus2 bAddEff,Eff_Stone,100; },{},{}
-2724,Medal_Archer,Medalion,5,0,,0,,1,,0,0x00080808,7,2,136,,70,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bCritical,10; bonus bMaxHP,300; bonus bMaxSP,80; bonus2 bAddEff,Eff_Blind,100; },{},{}
-2725,Medal_Merchant,Medalion,5,0,,0,,1,,0,0x00040420,7,2,136,,70,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bAspd,10; bonus bMaxHP,500; bonus bMaxSP,50; bonus2 bAddEff,Eff_Curse,100; },{},{}
+2719,Iron_Wrist,Iron Wrist,5,20,,700,,1,,0,0x000444A2,7,2,136,,50,0,0,{ bonus2 bSkillAtk,"SM_BASH",6; bonus2 bSkillAtk,"MC_MAMMONITE",6; },{},{}
+2720,Medal_Swordman,Medalion,5,0,,0,,1,,0,0x00004082,7,2,136,,70,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bHit,10; bonus bMaxHP,500; bonus bMaxSP,50; bonus2 bAddEff,Eff_Stun,1000; },{},{}
+2721,Medal_Thief,Medalion,5,0,,0,,1,,0,0x00021040,7,2,136,,70,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bFlee,10; bonus bMaxHP,300; bonus bMaxSP,80; bonus2 bAddEff,Eff_Poison,1000; },{},{}
+2722,Medal_Acolyte,Medalion,5,0,,0,,1,,0,0x00008110,7,2,136,,70,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bMdef,6; bonus bMaxHP,600; bonus2 bAddEff,Eff_Silence,1000; },{},{}
+2723,Medal_Mage,Medalion,5,0,,0,,1,,0,0x00010204,7,2,136,,70,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bMdef,6; bonus bMaxHP,600; bonus2 bAddEffWhenHit,Eff_Stone,1000; },{},{}
+2724,Medal_Archer,Medalion,5,0,,0,,1,,0,0x00080808,7,2,136,,70,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bCritical,10; bonus bMaxHP,300; bonus bMaxSP,80; bonus2 bAddEff,Eff_Blind,1000; },{},{}
+2725,Medal_Merchant,Medalion,5,0,,0,,1,,0,0x00040420,7,2,136,,70,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bAspd,10; bonus bMaxHP,500; bonus bMaxSP,50; bonus2 bAddEff,Eff_Curse,1000; },{},{}
2726,Icarus_Wing,Feather of Icarus,5,20,,100,,0,,0,0x00000800,2,2,136,,70,0,0,{ bonus bMaxSP,50; bonus bDex,3; },{},{}
2727,Bowman_Scarf,Renown Archer's Scarf,5,,,200,,0,,0,0x00000800,2,2,136,,0,0,0,{ bonus bMaxSP,50; bonus bDex,3; if (isequipped(2726)) bonus bUseSPrate,-25; },{},{}
2728,Morroc_Skin1,Cursed Hand,5,0,,50,,0,,1,0xFFFFFFFE,2,2,136,,80,0,0,{ bonus3 bAutoSpell,"NPC_CRITICALWOUND",1,30; bonus bHit,10; bonus bHPrecovRate,20; },{},{}
@@ -1464,7 +1464,7 @@
2730,Morroc_Seal,Continental Guard Seal,5,0,,50,,0,,1,0xFFFFFFFE,2,2,136,,80,0,0,{ bonus bMaxHP,50; bonus bAspdRate,3; },{},{}
2731,Morroc_Charm_Stone,Rune Charm Stone,5,0,,50,,0,,1,0xFFFFFFFE,2,2,136,,80,0,0,{ bonus bMaxSP,50; bonus bCastRate,-1; },{},{}
2732,Morroc_Ring,Death Medalion,5,0,,50,,0,,1,0xFFFFFFFE,2,2,136,,80,0,0,{ bonus bCritical,5; },{},{}
-2733,Officer's_Medalion,Officer's Medalion,5,0,,0,,1,,0,0xFFFFFFFF,7,2,136,,80,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bCritical,10; bonus bMaxHP,300; bonus bMaxSP,80; },{},{}
+2733,Officer's_Medalion,Officer's Medalion,5,0,,0,,1,,0,0xFFFFFFFF,7,2,136,,80,0,0,{ bonus bAtkRate,5; bonus bMatkRate,5; bonus bCritical,10; bonus bMaxHP,300; bonus bMaxSP,80; bonus2 bAddEffWhenHit,Eff_Blind,1000; },{},{}
2734,Patrol_Mission,Patrol Mission,5,0,,0,,1,,0,0xFFFFFFFF,7,2,136,,80,0,0,{},{},{}
2735,Patrol_Mission_,Patrol Mission,5,0,,0,,1,,0,0xFFFFFFFF,7,2,136,,80,0,0,{},{},{}
//2736,...,...,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,75,0,0,{ bonus bDex,3; bonus bLuk,3; bonus bMdef,2; },{},{}
@@ -1483,16 +1483,16 @@
2749,Linen_Glove,Linen Glove,5,0,,120,,1,,1,0xFDF80,2,2,136,,90,0,0,{ bonus bMdef,2; bonus bAgi,2; bonus bDex,1; if(isequipped(2390)){ bonus bFlee2,5; } },{},{}
//2750#...#
2751,Academy_of_Badge,Academy of Badge,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ if(BaseLevel < 80) { bonus bMaxHP,400; bonus bMaxSP,200; } },{},{}
-2753,Beholder_Ring,Beholder Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Formless,1; },{},{}
-2754,Hallow_Ring,Hallow Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_undead,1; },{},{}
-2755,Clamorous_Ring,Clamourous Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Brute,1; },{},{}
-2756,Chemical_Ring,Chemical Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Plant,1; },{},{}
-2757,Insecticide_Ring,Insecticide Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Insect,1; },{},{}
-2758,Fisher_Ring,Fisher Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Fish,1; },{},{}
-2759,Decussate_Ring,Decussate Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Demon,1; },{},{}
-2760,Bloody_Ring,Bloody Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_DemiHuman,1; },{},{}
-2761,Satanic_Ring,Satanic Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Angel,1; },{},{}
-2762,Dragoon_Ring,Dragoon Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Dragon,1; },{},{}
+2753,Beholder_Ring,Beholder Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Formless,15; },{},{}
+2754,Hallow_Ring,Hallow Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_undead,15; },{},{}
+2755,Clamorous_Ring,Clamourous Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Brute,15; },{},{}
+2756,Chemical_Ring,Chemical Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Plant,15; },{},{}
+2757,Insecticide_Ring,Insecticide Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Insect,15; },{},{}
+2758,Fisher_Ring,Fisher Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Fish,15; },{},{}
+2759,Decussate_Ring,Decussate Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Demon,15; },{},{}
+2760,Bloody_Ring,Bloody Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_DemiHuman,15; },{},{}
+2761,Satanic_Ring,Satanic Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Angel,15; },{},{}
+2762,Dragoon_Ring,Dragoon Ring,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bExpAddRace,RC_Dragon,15; },{},{}
//2763#Skull_Ring#
2765,Novice_Figure,Novice Figure,5,0,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus bMaxHP,70; if(Class == Job_Novice) bonus bMaxHP,30; },{},{}
2766,Swordsman_Figure,Swordsman Figure,5,0,,0,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus bVit,1; if(Class == Job_Swordman) bonus bDef,2; },{},{}
@@ -3112,7 +3112,7 @@
7770,Sweet_Rice,Sweet Rice,3,0,,10,,,,,,,,,,,,,{},{},{}
7771,Lotus_Leaf,Lotus Leaf,3,0,,10,,,,,,,,,,,,,{},{},{}
7772,String,String,3,0,,10,,,,,,,,,,,,,{},{},{}
-7773,War_Badge,War Badge,3,0,,0,,,,,,,,,,,,,{},{},{}
+7773,Heroism_Badge,Heroism Badge,3,,1,0,,,,,,,,,,,,,{},{},{}
7774,Chung_E_Ticket,Green Maiden Ticket,3,0,,10,,,,,,,,,,,,,{},{},{}
7775,Spring_Rabbit_Ticket,Spring Rabbit Ticket,3,0,,10,,,,,,,,,,,,,{},{},{}
7776,Max_Weight_Up_Scroll,Gym Pass,3,0,,10,,,,,,,,,,,,,{},{},{}
@@ -3166,6 +3166,8 @@
7824,Spirit_Liquor,Spirit Liquor,3,20,,10,,,,,,,,,,,,,{},{},{}
7825,Heroic_Stone,Heroic Stone,3,20,,10,,,,,,,,,,,,,{},{},{}
7826,Continental_Guard_Paper,Continental Guard Paper,3,0,,0,,,,,,,,,,,,,{},{},{}
+7828,Bravery_Badge,Bravery Badge,3,,1,0,,,,,,,,,,,,,{},{},{}
+7829,Valor_Badge,Valor Badge,3,,1,0,,,,,,,,,,,,,{},{},{}
7830,Goddess_Tear,Goddess Tear,3,1,,500,,,,,,,,,,,,,{},{},{}
7831,Valkyrie's_Token,Valkyrie's Token,3,1,,500,,,,,,,,,,,,,{},{},{}
7832,Brynhild_Armor_Piece,Brynhildr Armor Fragment,3,1,,500,,,,,,,,,,,,,{},{},{}
@@ -3815,7 +3817,7 @@
13034,Twilight_Desert,Desert Twilight,4,20,,600,130,,1,2,0x00001000,2,2,2,3,70,1,1,{ if (isequipped(13035)) { bonus bMaxSP,20; bonus bMaxHPRate,5; bonus bHit,10; bonus2 bAddSize,2,30; bonusautoscript "{ specialeffect2 EF_POTION_BERSERK; sc_start SC_INCASPDRATE,7000,100; }",1; } },{},{}
13035,Sandstorm,Desert Winds,4,20,,600,50,,1,4,0x00001000,2,2,2,2,70,1,1,{},{},{}
13036,Assassin_Dagger,Assassin Dagger,4,0,,0,120,,1,0,0x029E7CEB,7,2,2,3,80,1,1,{ bonus bStr,1; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if (Class == Job_Ninja || Class == Job_Rogue || Class == Job_Stalker) bonus bMatkRate,15; },{},{}
-13037,Assassin_Dagger_,Assassin Dagger,4,0,,0,120,,1,0,0x029E7CEB,7,2,2,3,80,1,1,{ bonus bStr,1; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,75; bonus bUnbreakableWeapon,0; if (Class == Job_Ninja || Class == Job_Rogue || Class == Job_Stalker) bonus bMatkRate,15; },{},{}
+13037,Assassin_Dagger_,Assassin Dagger,4,0,,0,120,,1,0,0x029E7CEB,7,2,2,3,80,1,1,{ bonus bStr,1; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,75; bonus bUnbreakableWeapon,0; bonusautoscript "{ sc_start SC_DEFRATIOATK,6000,2; }",50; if (Class == Job_Ninja || Class == Job_Rogue || Class == Job_Stalker) bonus bMatkRate,15; },{},{}
//13038#Trackers_Dagger#
//13039#Ivory_Knife#
13040,Novice_Cutter,Novice Cutter,4,1,,0,50,,1,0,0xFE9F7EEF,7,2,2,1,1,0,1,{},{},{}
@@ -3829,7 +3831,7 @@
13105,The_Garrison_,Garrison,4,48000,,500,70,,7,2,0x01000000,7,2,34,2,55,1,17,{ bonus bHit,-10; },{},{}
13106,Gold_Lux,Gold Lux,4,100000,,500,20,,7,0,0x01000000,7,2,34,3,12,1,17,{ bonus bHit,-10; if(getskilllv("GS_GLITTERING")>0) bonus3 bAutoSpell,"GS_GLITTERING",getskilllv("GS_GLITTERING"),100; },{},{}
13107,Wasteland_Outlaw,Western Outlaw,4,20,,580,68,,7,2,0x01000000,7,2,34,3,70,1,17,{ bonus bHit,readparam(bAgi)/10; bonus bAspdRate,readparam(bAgi)/14; },{},{}
-13108,Soldier_Handgun,Soldier Handgun,4,0,,0,70,,7,0,0x01000000,7,2,34,3,80,1,17,{ bonus bDex,2; bonus bHit,-10; bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; },{},{}
+13108,Soldier_Handgun,Soldier Handgun,4,0,,0,70,,7,0,0x01000000,7,2,34,3,80,1,17,{ bonus bDex,2; bonus bHit,-10; bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonusautoscript "{ sc_start SC_INCASPDRATE,3000,100; }",50; bonus bUnbreakableWeapon,0; },{},{}
13150,Branch,Branch,4,3000,,500,50,,9,3,0x01000000,7,2,34,1,1,1,18,{},{},{}
13151,The_Cyclone,Cyclone,4,17500,,700,120,,9,1,0x01000000,7,2,34,2,24,1,18,{ bonus bHit,10; bonus bCritical,10; },{},{}
13152,The_Cyclone_,Cyclone,4,17500,,700,120,,9,2,0x01000000,7,2,34,2,24,1,18,{ bonus bHit,10; bonus bCritical,10; },{},{}
@@ -3852,9 +3854,9 @@
13169,Thunder_P_,Thunder-P,4,76000,,700,80,,9,2,0x01000000,7,2,34,3,70,1,20,{ bonus bSplashRange,1; bonus bHit,-5; bonus bAspdRate,20; },{},{}
13170,Lever_Action_Rifle,Lever Action Rifle,4,20,,770,138,,9,2,0x01000000,7,2,34,3,70,1,18,{ bonus bHit,20; bonus bCritical,50; bonus bAspdRate,-5; },{},{}
13171,Soldier_Rifle,Soldier Rifle,4,0,,0,80,,9,0,0x01000000,7,2,34,3,80,1,18,{ bonus bDex,2; bonus bHit,10; bonus bCritical,10; bonus2 bAddRace,RC_DemiHuman,75; bonus2 bCastRate,512,-25; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; },{},{}
-13172,Soldier_Gatling_Gun,Soldier Gatling Gun,4,0,,0,80,,9,0,0x01000000,7,2,34,3,80,1,19,{ bonus bDex,2; bonus2 bAddRace,RC_DemiHuman,35; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; },{},{}
-13173,Soldier_Shotgun,Soldier Shotgun,4,0,,0,100,,9,0,0x01000000,7,2,34,3,80,1,20,{ bonus bDex,2; bonus bSplashRange,1; bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; },{},{}
-13174,Soldier_Grenade_Launcher,Soldier Frenade Launcher,4,0,,0,300,,9,0,0x01000000,7,2,34,3,80,1,21,{ bonus bDex,2; bonus2 bAddRace,RC_DemiHuman,35; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; },{},{}
+13172,Soldier_Gatling_Gun,Soldier Gatling Gun,4,0,,0,80,,9,0,0x01000000,7,2,34,3,80,1,19,{ bonus bDex,2; bonus2 bAddRace,RC_DemiHuman,35; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonusautoscript "{ sc_start SC_INCBASEATK,6000,80; sc_start4 SC_HPDRAIN,6000,120,1,0,0; }",50; bonus bUnbreakableWeapon,0; },{},{}
+13173,Soldier_Shotgun,Soldier Shotgun,4,0,,0,100,,9,0,0x01000000,7,2,34,3,80,1,20,{ bonus bDex,2; bonus bSplashRange,1; bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonusautoscript "{ sc_start SC_INCBASEATK,6000,80; sc_start4 SC_HPDRAIN,6000,100,1,0,0; }",50; bonus bUnbreakableWeapon,0; },{},{}
+13174,Soldier_Grenade_Launcher,Soldier Frenade Launcher,4,0,,0,300,,9,0,0x01000000,7,2,34,3,80,1,21,{ bonus bDex,2; bonus2 bAddRace,RC_DemiHuman,35; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonusautoscript "{ sc_start SC_INCBASEATK,6000,80; sc_start4 SC_HPDRAIN,6000,120,1,0,0; }",50; bonus bUnbreakableWeapon,0; },{},{}
// Bullets
13200,Bullet,Bullet,10,1,,2,10,,,,0x01000000,7,2,32768,,1,,3,{},{},{}
13201,Silver_Bullet,Silver Bullet,10,15,,2,15,,,,0x01000000,7,2,32768,,1,,3,{ bonus bAtkEle,Ele_Holy; },{},{}
@@ -3882,7 +3884,7 @@
13303,Huuma_Blaze,Fuuma Shuriken Rekka,4,78000,,2300,185,,1,0,0x02000000,7,2,34,4,55,1,22,{ bonus bDex,-2; bonus bAtkEle,Ele_Fire; bonus3 bAutoSpell,"MG_FIREBALL",5,30; },{},{}
13304,Huuma_Calm_Mind,Spirit of Kamaitachi,4,20,,1550,112,,1,2,0x02000000,7,2,34,3,70,1,22,{ bonus2 bSkillAtk,"NJ_HUUMA",30; bonus bNoCastCancel,0; },{},{}
13305,Battleground_Shuriken,Huuma Battleground Shuriken,4,0,,0,55,,1,0,0x02000000,7,2,34,3,80,1,22,{ bonus bStr,2; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,95; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; },{},{}
-13306,Battleground_Shuriken_,Huuma Battleground Shuriken,4,0,,0,55,,1,0,0x02000000,7,2,34,3,80,1,22,{ bonus bStr,2; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,95; bonus bUnbreakableWeapon,0; },{},{}
+13306,Battleground_Shuriken_,Huuma Battleground Shuriken,4,0,,0,55,,1,0,0x02000000,7,2,34,3,80,1,22,{ bonus bStr,2; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,95; bonusautoscript "{ sc_start4 SC_SKILLATKBONUS,10000,525,544,0,10; }",50; bonus bUnbreakableWeapon,0; },{},{}
13400,Cutlas_,Cutlus,4,20,,900,150,,1,1,0x000654E2,7,2,2,4,40,1,2,{ skill "SM_BASH",5; bonus bStr,2; bonus bDef,1; },{},{}
13401,Excalibur_C,Refined Excalibur,4,,,0,199,,1,0,0x000654E2,7,2,2,4,1,0,2,{ bonus bInt,10; bonus bLuk,10; bonus bAtkEle,Ele_Holy; },{},{}
13402,Cutlas_C,Refined Cutlus,4,,,0,185,,1,0,0x000654E2,7,2,2,4,1,0,2,{ skill "SM_BASH",5; bonus bStr,2; bonus bDef,1; },{},{}
@@ -4668,6 +4670,8 @@
//14294,Mercenary_Contract_Box5,Mercenary Contract Box 5ea,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6050,5; },{},{}
//14295,Mercenary_Contract_Box10,Mercenary Contract Box 10ea,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6050,10; },{},{}
//
+14314,Phreeoni_Scroll_Box,Phreeoni Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14597,10; },{},{}
+14315,Ghostring_Scroll_Box,Ghostring Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14598,10; },{},{}
14500,Insurance_,Life Insurance,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_LIFEINSURANCE,3600000,0; },{},{}
//
14508,Zeny_Pet_Egg_Scroll,Zeny Pet Egg Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
@@ -4760,3 +4764,5 @@
14594,Quagmire_scroll,Quagmire scroll,11,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "WZ_QUAGMIRE",5; },{},{}
//14595,...,...,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
14596,Pierre_Treasure_Box,Pierre's Treasure Box,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+14597,Phreeoni_Scroll,Phreeoni Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCHIT,60000,100; },{},{}
+14598,Ghostring_Scroll,Ghostring Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_ELEMENTALCHANGE,60000,1,Ele_Ghost,1,0; },{},{}
diff --git a/db/item_trade.txt b/db/item_trade.txt
index f480c954a..17e7db1ad 100644
--- a/db/item_trade.txt
+++ b/db/item_trade.txt
@@ -13,6 +13,70 @@
//1161,67,50 //Balmung: No drop, No trade, No Guild Store (1+2+64 =67),
//only GMs of GM-level 50 and up can override the setting.
+// BattleGround Badges
+7828,123,100
+7829,123,100
+7773,123,100
+
+// BattleGround Rewards
+13037,123,100
+1482,123,100
+13410,123,100
+1183,123,100
+13036,123,100
+1425,123,100
+13411,123,100
+1184,123,100
+1380,123,100
+1543,123,100
+1279,123,100
+1574,123,100
+1739,123,100
+1824,123,100
+1632,123,100
+1634,123,100
+1924,123,100
+1978,123,100
+13306,123,100
+13171,123,100
+13173,123,100
+13174,123,100
+1379,123,100
+1542,123,100
+1280,123,100
+1575,123,100
+1738,123,100
+1823,123,100
+1633,123,100
+1635,123,100
+1923,123,100
+1977,123,100
+13305,123,100
+13108,123,100
+13172,123,100
+2376,123,100
+2377,123,100
+2378,123,100
+2379,123,100
+2380,123,100
+2381,123,100
+2382,123,100
+2435,123,100
+2436,123,100
+2437,123,100
+2538,123,100
+2539,123,100
+2540,123,100
+2720,123,100
+2721,123,100
+2722,123,100
+2723,123,100
+2724,123,100
+2725,123,100
+12271,123,100
+12272,123,100
+12273,123,100
+
// Wedding Related items
2634,127,100 // Bridegroom_Ring
2635,127,100 // Bride_Ring
diff --git a/src/map/battle.c b/src/map/battle.c
index 01f4c9b67..381dcd67e 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1658,26 +1658,24 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
break;
}
- if(sd)
+ if( sd )
{
if (skill_num && (i = pc_skillatk_bonus(sd, skill_num)))
ATK_ADDRATE(i);
- if(skill_num != PA_SACRIFICE && skill_num != MO_INVESTIGATE &&
- skill_num != CR_GRANDCROSS && skill_num != NPC_GRANDDARKNESS &&
- skill_num != PA_SHIELDCHAIN
- && !flag.cri)
- { //Elemental/Racial adjustments
- if(sd->right_weapon.def_ratio_atk_ele & (1<<tstatus->def_ele) ||
+ if( skill_num != PA_SACRIFICE && skill_num != MO_INVESTIGATE && skill_num != CR_GRANDCROSS && skill_num != NPC_GRANDDARKNESS && skill_num != PA_SHIELDCHAIN && !flag.cri )
+ { //Elemental/Racial adjustments
+ if( sd->right_weapon.def_ratio_atk_ele & (1<<tstatus->def_ele) ||
sd->right_weapon.def_ratio_atk_race & (1<<tstatus->race) ||
sd->right_weapon.def_ratio_atk_race & (1<<(is_boss(target)?RC_BOSS:RC_NONBOSS))
)
flag.pdef = 1;
- if(sd->left_weapon.def_ratio_atk_ele & (1<<tstatus->def_ele) ||
+ if( sd->left_weapon.def_ratio_atk_ele & (1<<tstatus->def_ele) ||
sd->left_weapon.def_ratio_atk_race & (1<<tstatus->race) ||
sd->left_weapon.def_ratio_atk_race & (1<<(is_boss(target)?RC_BOSS:RC_NONBOSS))
- ) { //Pass effect onto right hand if configured so. [Skotlex]
+ )
+ { //Pass effect onto right hand if configured so. [Skotlex]
if (battle_config.left_cardfix_to_right && flag.rh)
flag.pdef = 1;
else
@@ -1707,6 +1705,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
}
}
+ if( sc && sc->count && sc->data[SC_DEFRATIOATK] && skill_num != PA_SACRIFICE && skill_num != CR_GRANDCROSS && skill_num != NPC_GRANDDARKNESS && skill_num != PA_SHIELDCHAIN && !flag.cri )
+ flag.pdef = flag.pdef2 = sc->data[SC_DEFRATIOATK]->val1; // Occult Impact Effect
+
if (!flag.idef || !flag.idef2)
{ //Defense reduction
short vit_def;
@@ -1875,7 +1876,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
}
//Card Fix, sd side
- if ((wd.damage || wd.damage2) && !(nk&NK_NO_CARDFIX_ATK))
+ if( (wd.damage || wd.damage2) && !(nk&NK_NO_CARDFIX_ATK) )
{
int cardfix = 1000, cardfix_ = 1000;
int t_race2 = status_get_race2(target);
@@ -1887,8 +1888,12 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
cardfix=cardfix*(100+sd->right_weapon.addsize[tstatus->size]+sd->arrow_addsize[tstatus->size])/100;
cardfix=cardfix*(100+sd->right_weapon.addrace2[t_race2])/100;
cardfix=cardfix*(100+sd->right_weapon.addrace[is_boss(target)?RC_BOSS:RC_NONBOSS]+sd->arrow_addrace[is_boss(target)?RC_BOSS:RC_NONBOSS])/100;
- } else { //Melee attack
- if(!battle_config.left_cardfix_to_right)
+ if( tstatus->race != RC_DEMIHUMAN )
+ cardfix=cardfix*(100+sd->right_weapon.addrace[RC_NONDEMIHUMAN]+sd->arrow_addrace[RC_NONDEMIHUMAN])/100;
+ }
+ else
+ { // Melee attack
+ if( !battle_config.left_cardfix_to_right )
{
cardfix=cardfix*(100+sd->right_weapon.addrace[tstatus->race])/100;
if (!(nk&NK_NO_ELEFIX))
@@ -1896,8 +1901,10 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
cardfix=cardfix*(100+sd->right_weapon.addsize[tstatus->size])/100;
cardfix=cardfix*(100+sd->right_weapon.addrace2[t_race2])/100;
cardfix=cardfix*(100+sd->right_weapon.addrace[is_boss(target)?RC_BOSS:RC_NONBOSS])/100;
+ if( tstatus->race != RC_DEMIHUMAN )
+ cardfix=cardfix*(100+sd->right_weapon.addrace[RC_NONDEMIHUMAN])/100;
- if (flag.lh)
+ if( flag.lh )
{
cardfix_=cardfix_*(100+sd->left_weapon.addrace[tstatus->race])/100;
if (!(nk&NK_NO_ELEFIX))
@@ -1905,51 +1912,60 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
cardfix_=cardfix_*(100+sd->left_weapon.addsize[tstatus->size])/100;
cardfix_=cardfix_*(100+sd->left_weapon.addrace2[t_race2])/100;
cardfix_=cardfix_*(100+sd->left_weapon.addrace[is_boss(target)?RC_BOSS:RC_NONBOSS])/100;
+ if( tstatus->race != RC_DEMIHUMAN )
+ cardfix=cardfix*(100+sd->left_weapon.addrace[RC_NONDEMIHUMAN])/100;
}
- } else {
+ }
+ else
+ {
cardfix=cardfix*(100+sd->right_weapon.addrace[tstatus->race]+sd->left_weapon.addrace[tstatus->race])/100;
cardfix=cardfix*(100+sd->right_weapon.addele[tstatus->def_ele]+sd->left_weapon.addele[tstatus->def_ele])/100;
cardfix=cardfix*(100+sd->right_weapon.addsize[tstatus->size]+sd->left_weapon.addsize[tstatus->size])/100;
cardfix=cardfix*(100+sd->right_weapon.addrace2[t_race2]+sd->left_weapon.addrace2[t_race2])/100;
cardfix=cardfix*(100+sd->right_weapon.addrace[is_boss(target)?RC_BOSS:RC_NONBOSS]+sd->left_weapon.addrace[is_boss(target)?RC_BOSS:RC_NONBOSS])/100;
+ if( tstatus->race != RC_DEMIHUMAN )
+ cardfix=cardfix*(100+sd->right_weapon.addrace[RC_NONDEMIHUMAN]+sd->left_weapon.addrace[RC_NONDEMIHUMAN])/100;
}
}
- for(i=0;i<ARRAYLENGTH(sd->right_weapon.add_dmg) && sd->right_weapon.add_dmg[i].rate;i++) {
- if(sd->right_weapon.add_dmg[i].class_ == t_class) {
+ for( i = 0; i < ARRAYLENGTH(sd->right_weapon.add_dmg) && sd->right_weapon.add_dmg[i].rate; i++ )
+ {
+ if( sd->right_weapon.add_dmg[i].class_ == t_class )
+ {
cardfix=cardfix*(100+sd->right_weapon.add_dmg[i].rate)/100;
break;
}
}
- if (flag.lh)
+ if( flag.lh )
{
- for(i=0;i<ARRAYLENGTH(sd->left_weapon.add_dmg) && sd->left_weapon.add_dmg[i].rate;i++) {
- if(sd->left_weapon.add_dmg[i].class_ == t_class) {
+ for( i = 0; i < ARRAYLENGTH(sd->left_weapon.add_dmg) && sd->left_weapon.add_dmg[i].rate; i++ )
+ {
+ if( sd->left_weapon.add_dmg[i].class_ == t_class )
+ {
cardfix_=cardfix_*(100+sd->left_weapon.add_dmg[i].rate)/100;
break;
}
}
}
- if(wd.flag&BF_LONG)
+ if( wd.flag&BF_LONG )
cardfix=cardfix*(100+sd->long_attack_atk_rate)/100;
- if (cardfix != 1000 || cardfix_ != 1000)
+ if( cardfix != 1000 || cardfix_ != 1000 )
ATK_RATE2(cardfix/10, cardfix_/10); //What happens if you use right-to-left and there's no right weapon, only left?
}
- if (skill_num == CR_SHIELDBOOMERANG || skill_num == PA_SHIELDCHAIN) { //Refine bonus applies after cards and elements.
+ if( skill_num == CR_SHIELDBOOMERANG || skill_num == PA_SHIELDCHAIN )
+ { //Refine bonus applies after cards and elements.
short index= sd->equip_index[EQI_HAND_L];
- if (index >= 0 &&
- sd->inventory_data[index] &&
- sd->inventory_data[index]->type == IT_ARMOR)
+ if( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_ARMOR )
ATK_ADD(10*sd->status.inventory[index].refine);
}
} //if (sd)
//Card Fix, tsd sid
- if (tsd && !(nk&NK_NO_CARDFIX_DEF))
+ if( tsd && !(nk&NK_NO_CARDFIX_DEF) )
{
short s_race2,s_class;
short cardfix=1000;
@@ -1957,24 +1973,29 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
s_race2 = status_get_race2(src);
s_class = status_get_class(src);
- if (!(nk&NK_NO_ELEFIX))
+ if( !(nk&NK_NO_ELEFIX) )
{
cardfix=cardfix*(100-tsd->subele[s_ele])/100;
- if (flag.lh && s_ele_ != s_ele)
+ if( flag.lh && s_ele_ != s_ele )
cardfix=cardfix*(100-tsd->subele[s_ele_])/100;
}
cardfix=cardfix*(100-tsd->subsize[sstatus->size])/100;
cardfix=cardfix*(100-tsd->subrace2[s_race2])/100;
cardfix=cardfix*(100-tsd->subrace[sstatus->race])/100;
cardfix=cardfix*(100-tsd->subrace[is_boss(src)?RC_BOSS:RC_NONBOSS])/100;
- for(i=0; i < ARRAYLENGTH(tsd->add_def) && tsd->add_def[i].rate;i++) {
- if(tsd->add_def[i].class_ == s_class) {
+ if( sstatus->race != RC_DEMIHUMAN )
+ cardfix=cardfix*(100-tsd->subrace[RC_NONDEMIHUMAN])/100;
+
+ for( i = 0; i < ARRAYLENGTH(tsd->add_def) && tsd->add_def[i].rate;i++ )
+ {
+ if( tsd->add_def[i].class_ == s_class )
+ {
cardfix=cardfix*(100-tsd->add_def[i].rate)/100;
break;
}
}
- if(wd.flag&BF_SHORT)
+ if( wd.flag&BF_SHORT )
cardfix=cardfix*(100-tsd->near_attack_def_rate)/100;
else // BF_LONG (there's no other choice)
cardfix=cardfix*(100-tsd->long_attack_def_rate)/100;
@@ -1982,17 +2003,17 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if( tsd->sc.data[SC_DEF_RATE] )
cardfix=cardfix*(100-tsd->sc.data[SC_DEF_RATE]->val1)/100;
- if (cardfix != 1000)
+ if( cardfix != 1000 )
ATK_RATE(cardfix/10);
}
- if(flag.infdef)
+ if( flag.infdef )
{ //Plants receive 1 damage when hit
- if (flag.rh && (flag.hit || wd.damage>0))
+ if( flag.rh && (flag.hit || wd.damage>0) )
wd.damage = 1;
- if (flag.lh && (flag.hit || wd.damage2>0))
+ if( flag.lh && (flag.hit || wd.damage2>0) )
wd.damage2 = 1;
- if (!(battle_config.skill_min_damage&1))
+ if( !(battle_config.skill_min_damage&1) )
//Do not return if you are supposed to deal greater damage to plants than 1. [Skotlex]
return wd;
}
@@ -2430,9 +2451,9 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
MATK_RATE(cardfix/10);
}
- if (tsd && !(nk&NK_NO_CARDFIX_DEF))
- { //Target cards.
- short s_race2=status_get_race2(src);
+ if( tsd && !(nk&NK_NO_CARDFIX_DEF) )
+ { // Target cards.
+ short s_race2 = status_get_race2(src);
short s_class= status_get_class(src);
int cardfix=1000;
@@ -2442,6 +2463,9 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
cardfix=cardfix*(100-tsd->subrace2[s_race2])/100;
cardfix=cardfix*(100-tsd->subrace[sstatus->race])/100;
cardfix=cardfix*(100-tsd->subrace[is_boss(src)?RC_BOSS:RC_NONBOSS])/100;
+ if( sstatus->race != RC_DEMIHUMAN )
+ cardfix=cardfix*(100-tsd->subrace[RC_NONDEMIHUMAN])/100;
+
for(i=0; i < ARRAYLENGTH(tsd->add_mdef) && tsd->add_mdef[i].rate;i++) {
if(tsd->add_mdef[i].class_ == s_class) {
cardfix=cardfix*(100-tsd->add_mdef[i].rate)/100;
@@ -2662,7 +2686,8 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
}
}
- if(md.damage && tsd && !(nk&NK_NO_CARDFIX_DEF)){
+ if( md.damage && tsd && !(nk&NK_NO_CARDFIX_DEF) )
+ {
int cardfix = 10000;
int race2 = status_get_race2(src);
if (!(nk&NK_NO_ELEFIX))
@@ -2671,6 +2696,9 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
cardfix=cardfix*(100-tsd->subrace2[race2])/100;
cardfix=cardfix*(100-tsd->subrace[sstatus->race])/100;
cardfix=cardfix*(100-tsd->subrace[is_boss(src)?RC_BOSS:RC_NONBOSS])/100;
+ if( sstatus->race != RC_DEMIHUMAN )
+ cardfix=cardfix*(100-tsd->subrace[RC_NONDEMIHUMAN])/100;
+
cardfix=cardfix*(100-tsd->misc_def_rate)/100;
if(md.flag&BF_SHORT)
cardfix=cardfix*(100-tsd->near_attack_def_rate)/100;
@@ -3104,7 +3132,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
s_bl = src;
switch( target->type )
- { //Checks on actual target
+ { // Checks on actual target
case BL_PC:
if (((TBL_PC*)target)->invincible_timer != -1 || pc_isinvisible((TBL_PC*)target))
return -1; //Cannot be targeted yet.
@@ -3267,24 +3295,26 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
break;
}
- if ((flag&BCT_ALL) == BCT_ALL) { //All actually stands for all attackable chars
- if (target->type&BL_CHAR)
+ if( (flag&BCT_ALL) == BCT_ALL )
+ { //All actually stands for all attackable chars
+ if( target->type&BL_CHAR )
return 1;
else
return -1;
- } else
- if (flag == BCT_NOONE) //Why would someone use this? no clue.
+ }
+ else if( flag == BCT_NOONE ) //Why would someone use this? no clue.
return -1;
- if (t_bl == s_bl)
- { //No need for further testing.
+ if( t_bl == s_bl )
+ { //No need for further testing.
state |= BCT_SELF|BCT_PARTY|BCT_GUILD;
- if (state&BCT_ENEMY && strip_enemy)
+ if( state&BCT_ENEMY && strip_enemy )
state&=~BCT_ENEMY;
return (flag&state)?1:-1;
}
- if (map_flag_vs(m)) { //Check rivalry settings.
+ if( map_flag_vs(m) )
+ { //Check rivalry settings.
if (flag&(BCT_PARTY|BCT_ENEMY)) {
int s_party = status_get_party_id(s_bl);
if (
@@ -3331,10 +3361,10 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
}
}
- if (!state) //If not an enemy, nor a guild, nor party, nor yourself, it's neutral.
+ if( !state ) //If not an enemy, nor a guild, nor party, nor yourself, it's neutral.
state = BCT_NEUTRAL;
//Alliance state takes precedence over enemy one.
- else if (state&BCT_ENEMY && strip_enemy && state&(BCT_SELF|BCT_PARTY|BCT_GUILD))
+ else if( state&BCT_ENEMY && strip_enemy && state&(BCT_SELF|BCT_PARTY|BCT_GUILD) )
state&=~BCT_ENEMY;
return (flag&state)?1:-1;
diff --git a/src/map/map.h b/src/map/map.h
index 1504c773f..a401214c8 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -199,6 +199,7 @@ enum {
RC_DRAGON,
RC_BOSS,
RC_NONBOSS,
+ RC_NONDEMIHUMAN,
RC_MAX
};
@@ -305,7 +306,8 @@ enum _sp {
SP_HP_DRAIN_VALUE,SP_SP_DRAIN_VALUE, // 1079-1080
SP_WEAPON_ATK,SP_WEAPON_ATK_RATE, // 1081-1082
SP_DELAYRATE,SP_HP_DRAIN_RATE_RACE,SP_SP_DRAIN_RATE_RACE, // 1083-1085
- SP_IGNORE_MDEF_RATE, SP_IGNORE_DEF_RATE, //1086-1087
+ SP_IGNORE_MDEF_RATE,SP_IGNORE_DEF_RATE,SP_SKILL_HEAL2, //1086-1088
+
SP_RESTART_FULL_RECOVER=2000,SP_NO_CASTCANCEL,SP_NO_SIZEFIX,SP_NO_MAGIC_DAMAGE,SP_NO_WEAPON_DAMAGE,SP_NO_GEMSTONE, // 2000-2005
SP_NO_CASTCANCEL2,SP_NO_MISC_DAMAGE,SP_UNBREAKABLE_WEAPON,SP_UNBREAKABLE_ARMOR, SP_UNBREAKABLE_HELM, // 2006-2010
diff --git a/src/map/pc.c b/src/map/pc.c
index 08b511fc7..f094eafce 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1395,22 +1395,30 @@ int pc_disguise(struct map_session_data *sd, int class_)
return 1;
}
-int pc_autoscript_add(struct s_autoscript *scripts, int max, short rate, short flag, struct script_code *script)
+int pc_autoscript_add(struct s_autoscript *scripts, int max, short rate, short flag, short target, struct script_code *script)
{
int i;
ARR_FIND(0, max, i, scripts[i].script == NULL);
- if (i == max) {
+ if( i == max )
+ {
ShowWarning("pc_autoscript_bonus: Reached max (%d) number of autoscripts per character!\n", max);
return 0;
}
+
scripts[i].script = script;
scripts[i].rate = rate;
+ scripts[i].target = target; // 0 = Script on Self 1 = Script on Target
//Auto-update flag value.
- if (!(flag&BF_RANGEMASK)) flag|=BF_SHORT|BF_LONG; //No range defined? Use both.
- if (!(flag&BF_WEAPONMASK)) flag|=BF_WEAPON; //No attack type defined? Use weapon.
- if (!(flag&BF_SKILLMASK)) {
- if (flag&(BF_MAGIC|BF_MISC)) flag|=BF_SKILL; //These two would never trigger without BF_SKILL
- if (flag&BF_WEAPON) flag|=BF_NORMAL;
+ if( !(flag&BF_RANGEMASK) )
+ flag|=BF_SHORT|BF_LONG; //No range defined? Use both.
+ if( !(flag&BF_WEAPONMASK) )
+ flag|=BF_WEAPON; //No attack type defined? Use weapon.
+ if( !(flag&BF_SKILLMASK) )
+ {
+ if( flag&(BF_MAGIC|BF_MISC) )
+ flag|=BF_SKILL; //These two would never trigger without BF_SKILL
+ if( flag&BF_WEAPON )
+ flag|=BF_NORMAL|BF_SKILL;
}
scripts[i].flag = flag;
return 1;
@@ -2408,7 +2416,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
break;
ARR_FIND(0, ARRAYLENGTH(sd->skillheal), i, sd->skillheal[i].id == 0 || sd->skillheal[i].id == type2);
if (i == ARRAYLENGTH(sd->skillheal))
- { //Better mention this so the array length can be updated. [Skotlex]
+ { // Better mention this so the array length can be updated. [Skotlex]
ShowDebug("run_script: bonus2 bSkillHeal reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillheal), type2, val);
break;
}
@@ -2419,6 +2427,22 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
sd->skillheal[i].val = val;
}
break;
+ case SP_SKILL_HEAL2:
+ if(sd->state.lr_flag == 2)
+ break;
+ ARR_FIND(0, ARRAYLENGTH(sd->skillheal2), i, sd->skillheal2[i].id == 0 || sd->skillheal2[i].id == type2);
+ if (i == ARRAYLENGTH(sd->skillheal2))
+ { // Better mention this so the array length can be updated. [Skotlex]
+ ShowDebug("run_script: bonus2 bSkillHeal2 reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillheal2), type2, val);
+ break;
+ }
+ if (sd->skillheal2[i].id == type2)
+ sd->skillheal2[i].val += val;
+ else {
+ sd->skillheal2[i].id = type2;
+ sd->skillheal2[i].val = val;
+ }
+ break;
case SP_ADD_SKILL_BLOW:
if(sd->state.lr_flag == 2)
break;
@@ -5081,24 +5105,41 @@ int pc_resethate(struct map_session_data* sd)
int pc_skillatk_bonus(struct map_session_data *sd, int skill_num)
{
- int i;
- for (i = 0; i < ARRAYLENGTH(sd->skillatk) && sd->skillatk[i].id; i++)
+ int i, bonus = 0;
+ ARR_FIND(0, ARRAYLENGTH(sd->skillatk), i, sd->skillatk[i].id && sd->skillatk[i].id == skill_num);
+ if( i < ARRAYLENGTH(sd->skillatk) && sd->skillatk[i].id )
+ bonus = sd->skillatk[i].val;
+ if( sd->sc.data[SC_SKILLATKBONUS] )
{
- if (sd->skillatk[i].id == skill_num)
- return sd->skillatk[i].val;
+ if( sd->sc.data[SC_SKILLATKBONUS]->val1 && sd->sc.data[SC_SKILLATKBONUS]->val1 == skill_num )
+ bonus += sd->sc.data[SC_SKILLATKBONUS]->val4;
+ if( sd->sc.data[SC_SKILLATKBONUS]->val2 && sd->sc.data[SC_SKILLATKBONUS]->val2 == skill_num )
+ bonus += sd->sc.data[SC_SKILLATKBONUS]->val4;
+ if( sd->sc.data[SC_SKILLATKBONUS]->val3 && sd->sc.data[SC_SKILLATKBONUS]->val3 == skill_num )
+ bonus += sd->sc.data[SC_SKILLATKBONUS]->val4;
}
- return 0;
+
+ return bonus;
}
int pc_skillheal_bonus(struct map_session_data *sd, int skill_num)
{
- int i;
- for (i = 0; i < ARRAYLENGTH(sd->skillheal) && sd->skillheal[i].id; i++)
- {
- if (sd->skillheal[i].id == skill_num)
- return sd->skillheal[i].val;
- }
- return 0;
+ int i, bonus = 0;
+
+ ARR_FIND(0, ARRAYLENGTH(sd->skillheal), i, sd->skillheal[i].id == skill_num);
+ if( i < ARRAYLENGTH(sd->skillheal) ) bonus += sd->skillheal[i].val;
+
+ return bonus;
+}
+
+int pc_skillheal2_bonus(struct map_session_data *sd, int skill_num)
+{
+ int i, bonus = 0;
+
+ ARR_FIND(0, ARRAYLENGTH(sd->skillheal2), i, sd->skillheal2[i].id == skill_num);
+ if( i < ARRAYLENGTH(sd->skillheal2) ) bonus += sd->skillheal2[i].val;
+
+ return bonus;
}
void pc_respawn(struct map_session_data* sd, uint8 clrtype)
diff --git a/src/map/pc.h b/src/map/pc.h
index 87ecd3279..a22f0c5ad 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -62,7 +62,7 @@ struct s_add_drop {
};
struct s_autoscript {
- unsigned short rate, flag;
+ unsigned short rate, flag, target;
struct script_code *script;
};
@@ -212,7 +212,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], skillheal[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS];
+ } skillatk[MAX_PC_BONUS], skillheal[5], skillheal2[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS];
struct {
short value;
int rate;
@@ -555,7 +555,7 @@ bool pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd,
int pc_updateweightstatus(struct map_session_data *sd);
-int pc_autoscript_add(struct s_autoscript *scripts, int max, short rate, short flag, struct script_code *script);
+int pc_autoscript_add(struct s_autoscript *scripts, int max, short rate, short flag, short target, struct script_code *script);
void pc_autoscript_clear(struct s_autoscript *scripts, int max);
int pc_bonus(struct map_session_data*,int,int);
@@ -602,6 +602,7 @@ int pc_useitem(struct map_session_data*,int);
int pc_skillatk_bonus(struct map_session_data *sd, int skill_num);
int pc_skillheal_bonus(struct map_session_data *sd, int skill_num);
+int pc_skillheal2_bonus(struct map_session_data *sd, int skill_num);
void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp);
int pc_dead(struct map_session_data *sd,struct block_list *src);
diff --git a/src/map/script.c b/src/map/script.c
index 4dadb2775..5ce0c3409 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -6487,6 +6487,7 @@ BUILDIN_FUNC(bonus)
case SP_AUTOSPELL_WHENHIT:
case SP_SKILL_ATK:
case SP_SKILL_HEAL:
+ case SP_SKILL_HEAL2:
case SP_ADD_SKILL_BLOW:
case SP_CASTRATE:
// these bonuses support skill names
@@ -6535,7 +6536,7 @@ BUILDIN_FUNC(bonus)
/// Bonus script that has a chance of being executed on attack.
BUILDIN_FUNC(bonusautoscript)
{
- int rate, flag = 0;
+ int rate, flag = 0, target = 0;
const char *str;
struct script_code *script;
TBL_PC* sd;
@@ -6548,10 +6549,12 @@ BUILDIN_FUNC(bonusautoscript)
rate = script_getnum(st,3);
if( script_hasdata(st,4) )
flag = script_getnum(st,4);
+ if( script_hasdata(st,5) )
+ target = script_getnum(st,5);
script = parse_script(str, "autoscript bonus", 0, 0);
- if (!script)
+ if( !script )
return 1;
- if (!pc_autoscript_add(sd->autoscript, ARRAYLENGTH(sd->autoscript), rate, flag, script))
+ if( !pc_autoscript_add(sd->autoscript, ARRAYLENGTH(sd->autoscript), rate, flag, target, script) )
{
script_free_code(script);
return 1;
@@ -6561,7 +6564,7 @@ BUILDIN_FUNC(bonusautoscript)
/// Bonus script that has a chance of being executed when attacked.
BUILDIN_FUNC(bonusautoscript2)
{
- int rate, flag = 0;
+ int rate, flag = 0, target = 0;
const char *str;
struct script_code *script;
TBL_PC* sd;
@@ -6574,10 +6577,12 @@ BUILDIN_FUNC(bonusautoscript2)
rate = script_getnum(st,3);
if( script_hasdata(st,4) )
flag = script_getnum(st,4);
+ if( script_hasdata(st,5) )
+ target = script_getnum(st,5);
script = parse_script(str, "autoscript2 bonus", 0, 0);
if (!script)
return 1;
- if (!pc_autoscript_add(sd->autoscript2, ARRAYLENGTH(sd->autoscript2), rate, flag, script))
+ if (!pc_autoscript_add(sd->autoscript2, ARRAYLENGTH(sd->autoscript2), rate, flag, target, script))
{
script_free_code(script);
return 1;
@@ -13376,8 +13381,8 @@ struct script_function buildin_func[] = {
BUILDIN_DEF2(bonus,"bonus3","ivii"),
BUILDIN_DEF2(bonus,"bonus4","iviii"),
BUILDIN_DEF2(bonus,"bonus5","iviiii"),
- BUILDIN_DEF(bonusautoscript,"si?"),
- BUILDIN_DEF(bonusautoscript2,"si?"),
+ BUILDIN_DEF(bonusautoscript,"si??"),
+ BUILDIN_DEF(bonusautoscript2,"si??"),
BUILDIN_DEF(skill,"vi?"),
BUILDIN_DEF(addtoskill,"vi?"), // [Valaris]
BUILDIN_DEF(guildskill,"vi"),
diff --git a/src/map/skill.c b/src/map/skill.c
index 32f05a51a..579d27616 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -936,17 +936,18 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
}
//Auto-script when attacking
- if(sd && src != bl && sd->autoscript[0].script) {
+ if( sd && src != bl && sd->autoscript[0].script )
+ {
int i;
- for (i = 0; i < ARRAYLENGTH(sd->autoscript) && sd->autoscript[i].script; i++) {
-
+ for( i = 0; i < ARRAYLENGTH(sd->autoscript) && sd->autoscript[i].script; i++ )
+ {
if(!(sd->autoscript[i].flag&attack_type&BF_WEAPONMASK &&
sd->autoscript[i].flag&attack_type&BF_RANGEMASK &&
sd->autoscript[i].flag&attack_type&BF_SKILLMASK))
continue; // one or more trigger conditions were not fulfilled
- if (rand()%1000 > sd->autoscript[i].rate)
+ if( rand()%1000 > sd->autoscript[i].rate )
continue;
- run_script(sd->autoscript[i].script,0,sd->bl.id,0);
+ run_script(sd->autoscript[i].script,0,sd->autoscript[i].target?bl->id:src->id,0);
break; //Have only one script execute at a time.
}
}
@@ -1123,19 +1124,18 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
}
}
//Auto-script when attacked
- if(dstsd && !status_isdead(bl) && src != bl && dstsd->autoscript2[0].script &&
- !(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE))
+ if( dstsd && !status_isdead(bl) && src != bl && dstsd->autoscript2[0].script && !(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE) )
{
int i;
- for (i = 0; i < ARRAYLENGTH(dstsd->autoscript2) && dstsd->autoscript2[i].script; i++) {
-
+ for( i = 0; i < ARRAYLENGTH(dstsd->autoscript2) && dstsd->autoscript2[i].script; i++ )
+ {
if(!(dstsd->autoscript2[i].flag&attack_type&BF_WEAPONMASK &&
dstsd->autoscript2[i].flag&attack_type&BF_RANGEMASK &&
dstsd->autoscript2[i].flag&attack_type&BF_SKILLMASK))
continue; // one or more trigger conditions were not fulfilled
- if (rand()%1000 > dstsd->autoscript2[i].rate)
+ if( rand()%1000 > dstsd->autoscript2[i].rate )
continue;
- run_script(dstsd->autoscript2[i].script,0,dstsd->bl.id,0);
+ run_script(dstsd->autoscript2[i].script,0,dstsd->autoscript2[i].target?src->id:bl->id,0);
break; //Have only one script execute at a time.
}
}
@@ -2978,20 +2978,23 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
int heal = skill_calc_heal(src, bl, skilllv);
int heal_get_jobexp;
- if (status_isimmune(bl) || (dstmd && dstmd->class_ == MOBID_EMPERIUM))
+ if( status_isimmune(bl) || (dstmd && dstmd->class_ == MOBID_EMPERIUM) )
heal=0;
- if (sd) {
- if ((i = pc_skillheal_bonus(sd, skillid)))
+ if( sd )
+ {
+ if( (i = pc_skillheal_bonus(sd, skillid)) )
heal += heal * i / 100;
- if (sd && dstsd && sd->status.partner_id == dstsd->status.char_id &&
- (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.sex == 0)
+ if( sd && dstsd && sd->status.partner_id == dstsd->status.char_id && (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.sex == 0 )
heal = heal*2;
}
- if (tsc && tsc->count)
+ if( dstsd && (i = pc_skillheal2_bonus(dstsd, skillid)) )
+ heal += heal * i / 100;
+
+ if( tsc && tsc->count )
{
- if (tsc->data[SC_KAITE] && !(sstatus->mode&MD_BOSS)
- ) { //Bounce back heal
+ if( tsc->data[SC_KAITE] && !(sstatus->mode&MD_BOSS) )
+ { //Bounce back heal
if (--tsc->data[SC_KAITE]->val2 <= 0)
status_change_end(bl, SC_KAITE, -1);
if (src == bl)
@@ -4231,25 +4234,30 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case AM_POTIONPITCHER:
{
int i,x,hp = 0,sp = 0,bonus=100;
- if(sd) {
+ if( sd )
+ {
x = skilllv%11 - 1;
i = pc_search_inventory(sd,skill_db[skillid].itemid[x]);
- if(i < 0 || skill_db[skillid].itemid[x] <= 0) {
+ if( i < 0 || skill_db[skillid].itemid[x] <= 0 )
+ {
clif_skill_fail(sd,skillid,0,0);
map_freeblock_unlock();
return 1;
}
- if(sd->inventory_data[i] == NULL || sd->status.inventory[i].amount < skill_db[skillid].amount[x]) {
+ if( sd->inventory_data[i] == NULL || sd->status.inventory[i].amount < skill_db[skillid].amount[x] )
+ {
clif_skill_fail(sd,skillid,0,0);
map_freeblock_unlock();
return 1;
}
- if(skillid == AM_BERSERKPITCHER) { //Does not override use-level, and cannot be used on bows.
- if (dstsd && (dstsd->status.base_level<(unsigned int)sd->inventory_data[i]->elv || dstsd->weapontype1 == W_BOW)) {
+ if( skillid == AM_BERSERKPITCHER )
+ { //Does not override use-level, and cannot be used on bows.
+ if( dstsd && (dstsd->status.base_level<(unsigned int)sd->inventory_data[i]->elv || dstsd->weapontype1 == W_BOW) )
+ {
clif_skill_fail(sd,skillid,0,0);
map_freeblock_unlock();
return 1;
- }
+ }
}
potion_flag = 1;
potion_hp = potion_sp = potion_per_hp = potion_per_sp = 0;
@@ -4257,27 +4265,32 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
run_script(sd->inventory_data[i]->script,0,sd->bl.id,0);
pc_delitem(sd,i,skill_db[skillid].amount[x],0);
potion_flag = potion_target = 0;
- if (sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_ALCHEMIST)
+ if( sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_ALCHEMIST )
bonus += sd->status.base_level;
- if(potion_per_hp > 0 || potion_per_sp > 0) {
+ if( potion_per_hp > 0 || potion_per_sp > 0 )
+ {
hp = tstatus->max_hp * potion_per_hp / 100;
hp = hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
- if(dstsd) {
+ if( dstsd )
+ {
sp = dstsd->status.max_sp * potion_per_sp / 100;
sp = sp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
}
}
- else {
- if(potion_hp > 0) {
+ else
+ {
+ if( potion_hp > 0 )
+ {
hp = potion_hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
hp = hp * (100 + (tstatus->vit<<1)) / 100;
- if(dstsd)
+ if( dstsd )
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
}
- if(potion_sp > 0) {
+ if( potion_sp > 0 )
+ {
sp = potion_sp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
sp = sp * (100 + (tstatus->int_<<1)) / 100;
- if(dstsd)
+ if( dstsd )
sp = sp * (100 + pc_checkskill(dstsd,MG_SRECOVERY)*10) / 100;
}
}
@@ -4288,27 +4301,33 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
sp += sp * sd->itemgrouphealrate[IG_POTION] / 100;
}
- if ((i = pc_skillheal_bonus(sd, skillid)))
+ if( (i = pc_skillheal_bonus(sd, skillid)) )
{
hp += hp * i / 100;
sp += sp * i / 100;
}
}
- else {
+ else
+ {
hp = (1 + rand()%400) * (100 + skilllv*10) / 100;
hp = hp * (100 + (tstatus->vit<<1)) / 100;
- if(dstsd)
+ if( dstsd )
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
}
- if (tsc && tsc->data[SC_CRITICALWOUND])
+ if( dstsd && (i = pc_skillheal2_bonus(dstsd, skillid)) )
+ {
+ hp += hp * i / 100;
+ sp += sp * i / 100;
+ }
+ if( tsc && tsc->data[SC_CRITICALWOUND] )
{
hp -= hp * tsc->data[SC_CRITICALWOUND]->val2 / 100;
sp -= sp * tsc->data[SC_CRITICALWOUND]->val2 / 100;
}
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(hp > 0 || (skillid == AM_POTIONPITCHER && sp <= 0))
+ if( hp > 0 || (skillid == AM_POTIONPITCHER && sp <= 0) )
clif_skill_nodamage(NULL,bl,AL_HEAL,hp,1);
- if(sp > 0)
+ if( sp > 0 )
clif_skill_nodamage(NULL,bl,MG_SRECOVERY,sp,1);
status_heal(bl,hp,sp,0);
}
@@ -5295,6 +5314,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
i = skill_calc_heal( src, bl, 1+rand()%skilllv);
if (sd && (rnd = pc_skillheal_bonus(sd, skillid)) > 0)
i += i * rnd / 100;
+ if (dstsd && (rnd = pc_skillheal2_bonus(dstsd, skillid)) > 0)
+ i += i * rnd / 100;
//Eh? why double skill packet?
clif_skill_nodamage(src,bl,AL_HEAL,i,1);
clif_skill_nodamage(src,bl,skillid,i,1);
@@ -6981,6 +7002,9 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
if( tsc->data[SC_CRITICALWOUND] )
heal -= heal * tsc->data[SC_CRITICALWOUND]->val2 / 100;
}
+ if( tsd )
+ heal += heal * pc_skillheal2_bonus(tsd, sg->skill_id) / 100;
+
if( bl->type == BL_MER )
heal /= 2;
if( status_isimmune(bl) )
@@ -8445,35 +8469,42 @@ int skill_check_condition(struct map_session_data* sd, short skill, short lv, in
*------------------------------------------*/
int skill_castfix (struct block_list *bl, int skill_id, int skill_lv)
{
- int time = skill_get_cast(skill_id, skill_lv);
+ int time = skill_get_cast(skill_id, skill_lv);
struct map_session_data *sd;
+ struct status_change *sc;
nullpo_retr(0, bl);
sd = BL_CAST(BL_PC, bl);
+ sc = status_get_sc(bl);
// calculate base cast time (reduced by dex)
- if (!(skill_get_castnodex(skill_id, skill_lv)&1)) {
+ if( !(skill_get_castnodex(skill_id, skill_lv)&1) )
+ {
int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
- if (scale > 0) // not instant cast
+ if( scale > 0 ) // not instant cast
time = time * scale / battle_config.castrate_dex_scale;
else return 0; // instant cast
}
// calculate cast time reduced by item/card bonuses
- if (!(skill_get_castnodex(skill_id, skill_lv)&4) && sd)
+ if( !(skill_get_castnodex(skill_id, skill_lv)&4) && sd )
{
int i;
- if (sd->castrate != 100)
+ if( sd->castrate != 100 )
time = time * sd->castrate / 100;
- for(i = 0; i < ARRAYLENGTH(sd->skillcast) && sd->skillcast[i].id; i++)
+ for( i = 0; i < ARRAYLENGTH(sd->skillcast) && sd->skillcast[i].id; i++ )
{
- if (sd->skillcast[i].id == skill_id)
+ if( sd->skillcast[i].id == skill_id )
{
time+= time * sd->skillcast[i].val / 100;
break;
}
}
}
+
+ if( sc && sc->count && sc->data[SC_SKILLCASTRATE] && sc->data[SC_SKILLCASTRATE]->val1 == skill_id )
+ time += time * sc->data[SC_SKILLCASTRATE]->val2 / 100;
+
// config cast time multiplier
if (battle_config.cast_rate != 100)
time = time * battle_config.cast_rate / 100;
diff --git a/src/map/status.c b/src/map/status.c
index fcfc0fb7f..67f4a7c85 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1754,6 +1754,7 @@ int status_calc_pc(struct map_session_data* sd,int first)
+ sizeof(sd->addeff2)
+ sizeof(sd->skillatk)
+ sizeof(sd->skillheal)
+ + sizeof(sd->skillheal2)
+ sizeof(sd->hp_loss)
+ sizeof(sd->sp_loss)
+ sizeof(sd->hp_regen)
@@ -5102,6 +5103,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
return 0;
break;
case SC_HPREGEN:
+ case SC_HPDRAIN:
case SC_SPREGEN:
case SC_BOSSMAPINFO:
case SC_STUN:
@@ -5432,6 +5434,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
tick = 10000;
break;
case SC_HPREGEN:
+ case SC_HPDRAIN:
case SC_SPREGEN:
if( val1 == 0 ) return 0;
// val1 = heal percent/amout
@@ -7094,6 +7097,17 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr data)
}
break;
+ case SC_KNOWLEDGE:
+ if (!sd) break;
+ if(bl->m == sd->feel_map[0].m ||
+ bl->m == sd->feel_map[1].m ||
+ bl->m == sd->feel_map[2].m)
+ { //Timeout will be handled by pc_setpos
+ sce->timer = INVALID_TIMER;
+ return 0;
+ }
+ break;
+
case SC_BLEEDING:
if (--(sce->val4) >= 0) {
int flag;
@@ -7107,14 +7121,16 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr data)
}
break;
- case SC_KNOWLEDGE:
- if (!sd) break;
- if(bl->m == sd->feel_map[0].m ||
- bl->m == sd->feel_map[1].m ||
- bl->m == sd->feel_map[2].m)
- { //Timeout will be handled by pc_setpos
- sce->timer = INVALID_TIMER;
- return 0;
+ case SC_HPDRAIN:
+ if( --(sce->val4) >= 0 )
+ {
+ int flag, hp = (sce->val1 < 0) ? (int)(status->max_hp * -1 * sce->val1 / 100.) : sce->val1;
+ map_freeblock_lock();
+ status_fix_damage(NULL, bl, hp, 0);
+ flag = !sc->data[type];
+ map_freeblock_unlock();
+ if( flag ) return 0;
+ sc_timer_next((sce->val2 * 1000) + tick, status_change_timer, bl->id, data);
}
break;
@@ -7130,7 +7146,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr data)
sp = (sce->val1 < 0) ? (int)(sd->status.max_sp * -1 * sce->val1 / 100.) : sce->val1 ;
status_heal(bl, hp, sp, 2);
- sc_timer_next((sce->val2 * 1000) + tick, status_change_timer, bl->id, data );
+ sc_timer_next((sce->val2 * 1000) + tick, status_change_timer, bl->id, data);
return 0;
}
break;
diff --git a/src/map/status.h b/src/map/status.h
index b4b6dde61..d3301bd37 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -305,6 +305,10 @@ typedef enum sc_type {
SC_MERC_QUICKEN,
SC_REBIRTH,
+ SC_SKILLCASTRATE, //285
+ SC_DEFRATIOATK,
+ SC_HPDRAIN,
+ SC_SKILLATKBONUS,
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;