-
Notifications
You must be signed in to change notification settings - Fork 758
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
base: stable
Are you sure you want to change the base?
Conversation
@@ -4906,8 +4907,10 @@ static int clif_damage(struct block_list *src, struct block_list *dst, int sdela | |||
unit->set_dir(src, unit->getdir(src)); | |||
} | |||
|
|||
// In case this assignment is bypassed by BDT_MULTICRIT | |||
type = clif_calc_delay(type, div, damage + damage2, ddelay); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is designed to call clif_calc_delay
twice if type is not BDT_MULTICRIT? or this is error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's design to call twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to it depend on certain PACKETVER
, when startup and load the configuration, it should auto disable this feature if user has turned this on with a not compatible packet version.
find static void battle_adjust_conf(void)
then add something like this:
#if PACKETVER < 20161207
if( battle_config.feature_enable_multi_crit ) {
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
|
||
// Enable Multi-Critical damage | ||
// Requires: 2016-12-07 RagexeRE or later | ||
enable_multi_critical: true |
There was a problem hiding this comment.
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
@@ -4470,7 +4468,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl | |||
|
|||
case TF_DOUBLE: //For NPC used skill. | |||
case GS_CHAINACTION: | |||
wd.type = BDT_MULTIHIT; | |||
wd.type = BDT_CRIT | BDT_MULTICRIT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BDT_* is not a bitmask, is this intended? also this will break pre-re compatibility please add it under #ifdef.
|| ( sc && sc->data[SC_KAGEMUSYA] && sd->weapontype1 != W_FIST ) // Need confirmation | ||
if (sd->bonus.double_rate > 0 | ||
|| (skill_lv = pc->checkskill(sd, TF_DOUBLE)) > 0 | ||
|| (sc != NULL && sc->data[SC_KAGEMUSYA] != NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of this changes should be put under #ifdef RENEWAL
) { | ||
//Success chance is not added, the higher one is used [Skotlex] | ||
if( rnd()%100 < ( 5*skill_lv > sd->bonus.double_rate ? 5*skill_lv : sc && sc->data[SC_KAGEMUSYA]?sc->data[SC_KAGEMUSYA]->val1*3:sd->bonus.double_rate ) ) | ||
{ | ||
wd.div_ = skill->get_num(TF_DOUBLE,skill_lv?skill_lv:1); | ||
wd.type = BDT_MULTIHIT; | ||
wd.type = BDT_CRIT | BDT_MULTICRIT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of this changes should be put under #ifdef RENEWAL
} | ||
} | ||
else if( sd->weapontype1 == W_REVOLVER && (skill_lv = pc->checkskill(sd,GS_CHAINACTION)) > 0 && rnd()%100 < 5*skill_lv ) | ||
{ | ||
wd.div_ = skill->get_num(GS_CHAINACTION,skill_lv); | ||
wd.type = BDT_MULTIHIT; | ||
wd.type = BDT_CRIT | BDT_MULTICRIT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of this changes should be put under #ifdef RENEWAL
@@ -4646,17 +4644,13 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl | |||
if ( wd.div_ > 1 ) { | |||
wd.div_ = min(wd.div_, sd->status.inventory[i].amount); | |||
sc->data[SC_FEARBREEZE]->val4 = wd.div_ - 1; | |||
wd.type = BDT_MULTIHIT; | |||
wd.type = BDT_CRIT | BDT_MULTICRIT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of this changes should be put under #ifdef RENEWAL
skill_id == KN_AUTOCOUNTER || | ||
skill_id == SN_SHARPSHOOTING || skill_id == MA_SHARPSHOOTING || | ||
skill_id == NJ_KIRIKAGE)) | ||
if (sstatus->cri != 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of this changes should be put under #ifdef RENEWAL
case SN_SHARPSHOOTING: | ||
case MA_SHARPSHOOTING: | ||
case NJ_KIRIKAGE: | ||
dmg.dmotion = clif->damage(src, bl, dmg.amotion, dmg.dmotion, damage, dmg.div_, dmg.type, dmg.damage2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of this changes should be put under #ifdef RENEWAL
can i request for a rebase for this? |
Pull Request Prelude
Changes Proposed
Official behavior: http://ro.gnjoy.com/news/notice/View.asp?BBSMode=10001&seq=6726&curpage=1
This PR original make by @ghost, but he is deleted his account, so this PR has been closed before, I just reopen it
Credits:
@secretdataz
@ghost
Issues addressed:
#1558