Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Multi Critical Damage #2673

Open
wants to merge 5 commits into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions conf/map/battle/feature.conf
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,5 @@ features: {
replace_refine_npcs: false

// Enable Multi-Critical damage
// true: enable (Default)
// false: disable
enable_multi_critical: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please set this to false otherwise the CI that checks different client types would fail

}
13 changes: 9 additions & 4 deletions src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -4711,10 +4711,8 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
if (flag.cri) {
wd.type = BDT_CRIT;
#ifdef RENEWAL
#if PACKETVER >= 20161207
if (battle_config.feature_enable_multi_crit == 1 && (wd.type & BDT_MULTIHIT) != 0)
wd.type = BDT_MULTICRIT;
#endif
if (battle_config.feature_enable_multi_crit == 1 && (wd.type & BDT_MULTIHIT) != 0)
wd.type = BDT_MULTICRIT;
#endif
#ifndef RENEWAL
flag.idef = flag.idef2 =
Expand Down Expand Up @@ -7587,6 +7585,13 @@ static void battle_adjust_conf(void)
}
#endif

#if PACKETVER < 20161207
if( battle_config.feature_enable_multi_crit ) {
jenkijo marked this conversation as resolved.
Show resolved Hide resolved
ShowWarning("conf/map/battle/feature.conf feature_enable_multi_crit is enabled but it requires PACKETVER 2016-12-07 or newer, disabling...\n");
battle_config.feature_enable_multi_crit = 0;
}
#endif

#ifndef CELL_NOSTACK
if (battle_config.custom_cell_stack_limit != 1)
ShowWarning("Battle setting 'custom_cell_stack_limit' takes no effect as this server was compiled without Cell Stack Limit support.\n");
Expand Down