Skip to content

Commit

Permalink
Merge pull request #2570 from Asheraf/scconfnoboss
Browse files Browse the repository at this point in the history
Dehardcode status effect boss resistance
  • Loading branch information
MishimaHaruna committed Nov 17, 2019
2 parents 608603a + 3489894 commit f91cbd5
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 49 deletions.
67 changes: 67 additions & 0 deletions db/sc_config.conf
Expand Up @@ -42,12 +42,14 @@ SC_TYPE: {
Debuff: (bool) SC considered as debuff and be removed by Gospel and etc.
NoMadoReset: (bool) SC cannot be reset when MADO Gear is taken off.
NoAllReset: (bool) SC cannot be reset by 'sc_end SC_ALL' and status change clear.
NoBoss: (bool) SC cannot be applied to boss monsters.
}
}
**************************************************************************/
SC_PROVOKE: {
Flags: {
Debuff: true
NoBoss: true
}
}
SC_ENDURE: {
Expand Down Expand Up @@ -105,6 +107,7 @@ SC_BLESSING: {
Flags: {
Buff: true
NoMadoReset: true
NoBoss: true
}
}
SC_INC_AGI: {
Expand All @@ -117,6 +120,7 @@ SC_DEC_AGI: {
Flags: {
NoSave: true
Debuff: true
NoBoss: true
}
}
SC_SLOWPOISON: {
Expand Down Expand Up @@ -575,6 +579,7 @@ SC_FOGWALL: {
NoSave: true
NoClearanceReset: true
Buff: true
NoBoss: true
}
}
SC_SPIDERWEB: {
Expand Down Expand Up @@ -714,6 +719,7 @@ SC_GRAVITATION: {
NoSave: true
NoClearanceReset: true
Buff: true
NoBoss: true
}
}
SC_OVERTHRUSTMAX: {
Expand Down Expand Up @@ -784,6 +790,7 @@ SC_NJ_SUITON: {
NoDispelReset: true
NoClearanceReset: true
Debuff: true
NoBoss: true
}
}
SC_FOOD_STR: {
Expand Down Expand Up @@ -1404,48 +1411,56 @@ SC_TOXIN: {
Flags: {
NoDispelReset: true
Buff: true
NoBoss: true
}
}
SC_PARALYSE: {
Flags: {
NoDispelReset: true
Buff: true
NoBoss: true
}
}
SC_VENOMBLEED: {
Flags: {
NoDispelReset: true
Buff: true
NoBoss: true
}
}
SC_MAGICMUSHROOM: {
Flags: {
NoDispelReset: true
Buff: true
NoBoss: true
}
}
SC_DEATHHURT: {
Flags: {
NoDispelReset: true
Buff: true
NoBoss: true
}
}
SC_PYREXIA: {
Flags: {
NoDispelReset: true
Buff: true
NoBoss: true
}
}
SC_OBLIVIONCURSE: {
Flags: {
NoDispelReset: true
Buff: true
NoBoss: true
}
}
SC_LEECHESEND: {
Flags: {
NoDispelReset: true
Buff: true
NoBoss: true
}
}
SC_DUPLELIGHT: {
Expand All @@ -1468,12 +1483,14 @@ SC_ELECTRICSHOCKER: {
NoDispelReset: true
NoClearanceReset: true
Buff: true
NoBoss: true
}
}
SC_MARSHOFABYSS: {
Flags: {
NoDispelReset: true
Buff: true
NoBoss: true
}
}
SC_RECOGNIZEDSPELL: {
Expand All @@ -1496,6 +1513,7 @@ SC_WUGBITE: {
NoDispelReset: true
NoClearanceReset: true
Buff: true
NoBoss: true
}
}
SC_CAMOUFLAGE: {
Expand Down Expand Up @@ -1622,6 +1640,7 @@ SC_MAGNETICFIELD: {
NoDispelReset: true
NoClearanceReset: true
Buff: true
NoBoss: true
}
}
SC_NEUTRALBARRIER: {
Expand Down Expand Up @@ -1782,6 +1801,7 @@ SC_EXEEDBREAK: {
SC_ADORAMUS: {
Flags: {
Buff: true
NoBoss: true
}
}
SC_PRESTIGE: {
Expand Down Expand Up @@ -1834,11 +1854,13 @@ SC_INSPIRATION: {
SC__ENERVATION: {
Flags: {
Buff: true
NoBoss: true
}
}
SC__GROOMY: {
Flags: {
Buff: true
NoBoss: true
}
}
SC_RAISINGDRAGON: {
Expand All @@ -1852,11 +1874,13 @@ SC_RAISINGDRAGON: {
SC__IGNORANCE: {
Flags: {
Buff: true
NoBoss: true
}
}
SC__LAZINESS: {
Flags: {
Buff: true
NoBoss: true
}
}
SC_LIGHTNINGWALK: {
Expand All @@ -1875,6 +1899,7 @@ SC_ACARAJE: {
SC__UNLUCKY: {
Flags: {
Buff: true
NoBoss: true
}
}
SC_CURSEDCIRCLE_ATKER: {
Expand All @@ -1896,6 +1921,7 @@ SC_CURSEDCIRCLE_TARGET: {
SC__WEAKNESS: {
Flags: {
Buff: true
NoBoss: true
}
}
SC_CRESCENTELBOW: {
Expand Down Expand Up @@ -1954,6 +1980,7 @@ SC_SPELLFIST: {
SC_NETHERWORLD: {
Flags: {
Buff: true
NoBoss: true
}
}
SC_SIREN: {
Expand All @@ -1966,6 +1993,7 @@ SC_DEEP_SLEEP: {
Flags: {
NoSave: true
Debuff: true
NoBoss: true
}
}
SC_SIRCLEOFNATURE: {
Expand Down Expand Up @@ -2081,6 +2109,7 @@ SC_FROSTMISTY: {
Visible: true
Flags: {
Debuff: true
NoBoss: true
}
}
SC_STOMACHACHE: {
Expand Down Expand Up @@ -2136,6 +2165,7 @@ SC_MORA_BUFF: {
SC_NEEDLE_OF_PARALYZE: {
Flags: {
NoDeathReset: true
NoBoss: true
}
}
SC_PAIN_KILLER: {
Expand Down Expand Up @@ -2604,6 +2634,7 @@ SC_PUSH_CART: {
SC_COLD: {
Visible: true
Flags: {
NoBoss: true
}
}
SC_BLOOD_SUCKER: {
Expand Down Expand Up @@ -2777,6 +2808,7 @@ SC_SPRITEMABLE: {
SC_BITESCAR: {
Flags: {
NoDispelReset: true
NoBoss: true
}
}
SC_CLAN_INFO: {
Expand Down Expand Up @@ -2809,3 +2841,38 @@ SC_DAILYSENDMAILCNT: {
NoAllReset: true
}
}
SC_COMA: {
Flags: {
NoBoss: true
}
}
SC_RICHMANKIM: {
Flags: {
NoBoss: true
}
}
SC_ROKISWEIL: {
Flags: {
NoBoss: true
}
}
SC_BURNING: {
Flags: {
NoBoss: true
}
}
SC_VACUUM_EXTREME: {
Flags: {
NoBoss: true
}
}
SC_FRESHSHRIMP: {
Flags: {
NoBoss: true
}
}
SC_SV_ROOTTWIST: {
Flags: {
NoBoss: true
}
}
52 changes: 4 additions & 48 deletions src/map/status.c
Expand Up @@ -10581,55 +10581,10 @@ static bool status_is_boss_resist_sc(enum sc_type type)
{
if (type >= SC_COMMON_MIN && type <= SC_COMMON_MAX)
return true;
switch (type) {
case SC_BLESSING:
case SC_DEC_AGI:
case SC_PROVOKE:
case SC_COMA:
case SC_GRAVITATION:
case SC_NJ_SUITON:
case SC_RICHMANKIM:
case SC_ROKISWEIL:
case SC_FOGWALL:
case SC_FROSTMISTY:
case SC_BURNING:
case SC_MARSHOFABYSS:
case SC_ADORAMUS:
case SC_NEEDLE_OF_PARALYZE:
case SC_DEEP_SLEEP:
case SC_COLD:

// Exploit prevention - kRO Fix
case SC_PYREXIA:
case SC_DEATHHURT:
case SC_TOXIN:
case SC_PARALYSE:
case SC_VENOMBLEED:
case SC_MAGICMUSHROOM:
case SC_OBLIVIONCURSE:
case SC_LEECHESEND:

// Ranger Effects
case SC_WUGBITE:
case SC_ELECTRICSHOCKER:
case SC_MAGNETICFIELD:

// Masquerades
case SC__ENERVATION:
case SC__GROOMY:
case SC__LAZINESS:
case SC__UNLUCKY:
case SC__WEAKNESS:
case SC__IGNORANCE:
if (status->get_sc_type(type) & SC_NO_BOSS)
return true;

// Other Effects
case SC_VACUUM_EXTREME:
case SC_NETHERWORLD:
case SC_FRESHSHRIMP:
case SC_SV_ROOTTWIST:
case SC_BITESCAR:
return true;
}
return false;
}

Expand Down Expand Up @@ -13498,7 +13453,8 @@ static bool status_read_scdb_libconfig_sub_flag(struct config_setting_t *it, int
{ "Buff", SC_BUFF },
{ "Debuff", SC_DEBUFF },
{ "NoMadoReset", SC_MADO_NO_RESET },
{ "NoAllReset", SC_NO_CLEAR }
{ "NoAllReset", SC_NO_CLEAR },
{ "NoBoss", SC_NO_BOSS },
};

ARR_FIND(0, ARRAYLENGTH(flags), j, strcmpi(flag, flags[j].name) == 0);
Expand Down
3 changes: 2 additions & 1 deletion src/map/status.h
Expand Up @@ -61,7 +61,8 @@ typedef enum sc_conf_type {
SC_DEBUFF = 0x020,
SC_MADO_NO_RESET = 0x040,
SC_NO_CLEAR = 0x080,
SC_VISIBLE = 0x100
SC_VISIBLE = 0x100,
SC_NO_BOSS = 0x200
} sc_conf_type;

/**
Expand Down

0 comments on commit f91cbd5

Please sign in to comment.