Skip to content

Commit f91cbd5

Browse files
Merge pull request #2570 from Asheraf/scconfnoboss
Dehardcode status effect boss resistance
2 parents 608603a + 3489894 commit f91cbd5

File tree

3 files changed

+73
-49
lines changed

3 files changed

+73
-49
lines changed

db/sc_config.conf

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,14 @@ SC_TYPE: {
4242
Debuff: (bool) SC considered as debuff and be removed by Gospel and etc.
4343
NoMadoReset: (bool) SC cannot be reset when MADO Gear is taken off.
4444
NoAllReset: (bool) SC cannot be reset by 'sc_end SC_ALL' and status change clear.
45+
NoBoss: (bool) SC cannot be applied to boss monsters.
4546
}
4647
}
4748
**************************************************************************/
4849
SC_PROVOKE: {
4950
Flags: {
5051
Debuff: true
52+
NoBoss: true
5153
}
5254
}
5355
SC_ENDURE: {
@@ -105,6 +107,7 @@ SC_BLESSING: {
105107
Flags: {
106108
Buff: true
107109
NoMadoReset: true
110+
NoBoss: true
108111
}
109112
}
110113
SC_INC_AGI: {
@@ -117,6 +120,7 @@ SC_DEC_AGI: {
117120
Flags: {
118121
NoSave: true
119122
Debuff: true
123+
NoBoss: true
120124
}
121125
}
122126
SC_SLOWPOISON: {
@@ -575,6 +579,7 @@ SC_FOGWALL: {
575579
NoSave: true
576580
NoClearanceReset: true
577581
Buff: true
582+
NoBoss: true
578583
}
579584
}
580585
SC_SPIDERWEB: {
@@ -714,6 +719,7 @@ SC_GRAVITATION: {
714719
NoSave: true
715720
NoClearanceReset: true
716721
Buff: true
722+
NoBoss: true
717723
}
718724
}
719725
SC_OVERTHRUSTMAX: {
@@ -784,6 +790,7 @@ SC_NJ_SUITON: {
784790
NoDispelReset: true
785791
NoClearanceReset: true
786792
Debuff: true
793+
NoBoss: true
787794
}
788795
}
789796
SC_FOOD_STR: {
@@ -1404,48 +1411,56 @@ SC_TOXIN: {
14041411
Flags: {
14051412
NoDispelReset: true
14061413
Buff: true
1414+
NoBoss: true
14071415
}
14081416
}
14091417
SC_PARALYSE: {
14101418
Flags: {
14111419
NoDispelReset: true
14121420
Buff: true
1421+
NoBoss: true
14131422
}
14141423
}
14151424
SC_VENOMBLEED: {
14161425
Flags: {
14171426
NoDispelReset: true
14181427
Buff: true
1428+
NoBoss: true
14191429
}
14201430
}
14211431
SC_MAGICMUSHROOM: {
14221432
Flags: {
14231433
NoDispelReset: true
14241434
Buff: true
1435+
NoBoss: true
14251436
}
14261437
}
14271438
SC_DEATHHURT: {
14281439
Flags: {
14291440
NoDispelReset: true
14301441
Buff: true
1442+
NoBoss: true
14311443
}
14321444
}
14331445
SC_PYREXIA: {
14341446
Flags: {
14351447
NoDispelReset: true
14361448
Buff: true
1449+
NoBoss: true
14371450
}
14381451
}
14391452
SC_OBLIVIONCURSE: {
14401453
Flags: {
14411454
NoDispelReset: true
14421455
Buff: true
1456+
NoBoss: true
14431457
}
14441458
}
14451459
SC_LEECHESEND: {
14461460
Flags: {
14471461
NoDispelReset: true
14481462
Buff: true
1463+
NoBoss: true
14491464
}
14501465
}
14511466
SC_DUPLELIGHT: {
@@ -1468,12 +1483,14 @@ SC_ELECTRICSHOCKER: {
14681483
NoDispelReset: true
14691484
NoClearanceReset: true
14701485
Buff: true
1486+
NoBoss: true
14711487
}
14721488
}
14731489
SC_MARSHOFABYSS: {
14741490
Flags: {
14751491
NoDispelReset: true
14761492
Buff: true
1493+
NoBoss: true
14771494
}
14781495
}
14791496
SC_RECOGNIZEDSPELL: {
@@ -1496,6 +1513,7 @@ SC_WUGBITE: {
14961513
NoDispelReset: true
14971514
NoClearanceReset: true
14981515
Buff: true
1516+
NoBoss: true
14991517
}
15001518
}
15011519
SC_CAMOUFLAGE: {
@@ -1622,6 +1640,7 @@ SC_MAGNETICFIELD: {
16221640
NoDispelReset: true
16231641
NoClearanceReset: true
16241642
Buff: true
1643+
NoBoss: true
16251644
}
16261645
}
16271646
SC_NEUTRALBARRIER: {
@@ -1782,6 +1801,7 @@ SC_EXEEDBREAK: {
17821801
SC_ADORAMUS: {
17831802
Flags: {
17841803
Buff: true
1804+
NoBoss: true
17851805
}
17861806
}
17871807
SC_PRESTIGE: {
@@ -1834,11 +1854,13 @@ SC_INSPIRATION: {
18341854
SC__ENERVATION: {
18351855
Flags: {
18361856
Buff: true
1857+
NoBoss: true
18371858
}
18381859
}
18391860
SC__GROOMY: {
18401861
Flags: {
18411862
Buff: true
1863+
NoBoss: true
18421864
}
18431865
}
18441866
SC_RAISINGDRAGON: {
@@ -1852,11 +1874,13 @@ SC_RAISINGDRAGON: {
18521874
SC__IGNORANCE: {
18531875
Flags: {
18541876
Buff: true
1877+
NoBoss: true
18551878
}
18561879
}
18571880
SC__LAZINESS: {
18581881
Flags: {
18591882
Buff: true
1883+
NoBoss: true
18601884
}
18611885
}
18621886
SC_LIGHTNINGWALK: {
@@ -1875,6 +1899,7 @@ SC_ACARAJE: {
18751899
SC__UNLUCKY: {
18761900
Flags: {
18771901
Buff: true
1902+
NoBoss: true
18781903
}
18791904
}
18801905
SC_CURSEDCIRCLE_ATKER: {
@@ -1896,6 +1921,7 @@ SC_CURSEDCIRCLE_TARGET: {
18961921
SC__WEAKNESS: {
18971922
Flags: {
18981923
Buff: true
1924+
NoBoss: true
18991925
}
19001926
}
19011927
SC_CRESCENTELBOW: {
@@ -1954,6 +1980,7 @@ SC_SPELLFIST: {
19541980
SC_NETHERWORLD: {
19551981
Flags: {
19561982
Buff: true
1983+
NoBoss: true
19571984
}
19581985
}
19591986
SC_SIREN: {
@@ -1966,6 +1993,7 @@ SC_DEEP_SLEEP: {
19661993
Flags: {
19671994
NoSave: true
19681995
Debuff: true
1996+
NoBoss: true
19691997
}
19701998
}
19711999
SC_SIRCLEOFNATURE: {
@@ -2081,6 +2109,7 @@ SC_FROSTMISTY: {
20812109
Visible: true
20822110
Flags: {
20832111
Debuff: true
2112+
NoBoss: true
20842113
}
20852114
}
20862115
SC_STOMACHACHE: {
@@ -2136,6 +2165,7 @@ SC_MORA_BUFF: {
21362165
SC_NEEDLE_OF_PARALYZE: {
21372166
Flags: {
21382167
NoDeathReset: true
2168+
NoBoss: true
21392169
}
21402170
}
21412171
SC_PAIN_KILLER: {
@@ -2604,6 +2634,7 @@ SC_PUSH_CART: {
26042634
SC_COLD: {
26052635
Visible: true
26062636
Flags: {
2637+
NoBoss: true
26072638
}
26082639
}
26092640
SC_BLOOD_SUCKER: {
@@ -2777,6 +2808,7 @@ SC_SPRITEMABLE: {
27772808
SC_BITESCAR: {
27782809
Flags: {
27792810
NoDispelReset: true
2811+
NoBoss: true
27802812
}
27812813
}
27822814
SC_CLAN_INFO: {
@@ -2809,3 +2841,38 @@ SC_DAILYSENDMAILCNT: {
28092841
NoAllReset: true
28102842
}
28112843
}
2844+
SC_COMA: {
2845+
Flags: {
2846+
NoBoss: true
2847+
}
2848+
}
2849+
SC_RICHMANKIM: {
2850+
Flags: {
2851+
NoBoss: true
2852+
}
2853+
}
2854+
SC_ROKISWEIL: {
2855+
Flags: {
2856+
NoBoss: true
2857+
}
2858+
}
2859+
SC_BURNING: {
2860+
Flags: {
2861+
NoBoss: true
2862+
}
2863+
}
2864+
SC_VACUUM_EXTREME: {
2865+
Flags: {
2866+
NoBoss: true
2867+
}
2868+
}
2869+
SC_FRESHSHRIMP: {
2870+
Flags: {
2871+
NoBoss: true
2872+
}
2873+
}
2874+
SC_SV_ROOTTWIST: {
2875+
Flags: {
2876+
NoBoss: true
2877+
}
2878+
}

src/map/status.c

Lines changed: 4 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -10581,55 +10581,10 @@ static bool status_is_boss_resist_sc(enum sc_type type)
1058110581
{
1058210582
if (type >= SC_COMMON_MIN && type <= SC_COMMON_MAX)
1058310583
return true;
10584-
switch (type) {
10585-
case SC_BLESSING:
10586-
case SC_DEC_AGI:
10587-
case SC_PROVOKE:
10588-
case SC_COMA:
10589-
case SC_GRAVITATION:
10590-
case SC_NJ_SUITON:
10591-
case SC_RICHMANKIM:
10592-
case SC_ROKISWEIL:
10593-
case SC_FOGWALL:
10594-
case SC_FROSTMISTY:
10595-
case SC_BURNING:
10596-
case SC_MARSHOFABYSS:
10597-
case SC_ADORAMUS:
10598-
case SC_NEEDLE_OF_PARALYZE:
10599-
case SC_DEEP_SLEEP:
10600-
case SC_COLD:
10601-
10602-
// Exploit prevention - kRO Fix
10603-
case SC_PYREXIA:
10604-
case SC_DEATHHURT:
10605-
case SC_TOXIN:
10606-
case SC_PARALYSE:
10607-
case SC_VENOMBLEED:
10608-
case SC_MAGICMUSHROOM:
10609-
case SC_OBLIVIONCURSE:
10610-
case SC_LEECHESEND:
10611-
10612-
// Ranger Effects
10613-
case SC_WUGBITE:
10614-
case SC_ELECTRICSHOCKER:
10615-
case SC_MAGNETICFIELD:
1061610584

10617-
// Masquerades
10618-
case SC__ENERVATION:
10619-
case SC__GROOMY:
10620-
case SC__LAZINESS:
10621-
case SC__UNLUCKY:
10622-
case SC__WEAKNESS:
10623-
case SC__IGNORANCE:
10585+
if (status->get_sc_type(type) & SC_NO_BOSS)
10586+
return true;
1062410587

10625-
// Other Effects
10626-
case SC_VACUUM_EXTREME:
10627-
case SC_NETHERWORLD:
10628-
case SC_FRESHSHRIMP:
10629-
case SC_SV_ROOTTWIST:
10630-
case SC_BITESCAR:
10631-
return true;
10632-
}
1063310588
return false;
1063410589
}
1063510590

@@ -13498,7 +13453,8 @@ static bool status_read_scdb_libconfig_sub_flag(struct config_setting_t *it, int
1349813453
{ "Buff", SC_BUFF },
1349913454
{ "Debuff", SC_DEBUFF },
1350013455
{ "NoMadoReset", SC_MADO_NO_RESET },
13501-
{ "NoAllReset", SC_NO_CLEAR }
13456+
{ "NoAllReset", SC_NO_CLEAR },
13457+
{ "NoBoss", SC_NO_BOSS },
1350213458
};
1350313459

1350413460
ARR_FIND(0, ARRAYLENGTH(flags), j, strcmpi(flag, flags[j].name) == 0);

src/map/status.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ typedef enum sc_conf_type {
6161
SC_DEBUFF = 0x020,
6262
SC_MADO_NO_RESET = 0x040,
6363
SC_NO_CLEAR = 0x080,
64-
SC_VISIBLE = 0x100
64+
SC_VISIBLE = 0x100,
65+
SC_NO_BOSS = 0x200
6566
} sc_conf_type;
6667

6768
/**

0 commit comments

Comments
 (0)