Skip to content

Commit

Permalink
Merge pull request #3331 from guilherme-gm/rebalance-lk
Browse files Browse the repository at this point in the history
Lord Knight skill rebalance - 2018 patch/renewal
  • Loading branch information
MishimaHaruna authored Nov 30, 2024
2 parents 3a3482a + 9bb00b5 commit 259a7d5
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 78 deletions.
2 changes: 1 addition & 1 deletion db/re/sc_config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ SC_LKCONCENTRATION: {
}
CalcFlags: {
Hit: true
AtkPerc: true
Watk: true
DefPerc: true
}
Icon: "SI_LKCONCENTRATION"
Expand Down
52 changes: 4 additions & 48 deletions db/re/skill_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10937,18 +10937,7 @@ skill_db: (
DamageType: {
NoDamage: true
}
SkillData1: {
Lv1: 25000
Lv2: 30000
Lv3: 35000
Lv4: 40000
Lv5: 45000
Lv6: 50000
Lv7: 55000
Lv8: 60000
Lv9: 65000
Lv10: 70000
}
SkillData1: 60_000 // Duration of SC_LKCONCENTRATION (in milliseconds)
FixedCastTime: 0
Requirements: {
SPCost: {
Expand Down Expand Up @@ -12246,43 +12235,10 @@ skill_db: (
AttackType: "Weapon"
Element: "Ele_Weapon"
NumberOfHits: 5
CastTime: {
Lv1: 150
Lv2: 250
Lv3: 350
Lv4: 450
Lv5: 500
Lv6: 500
Lv7: 500
Lv8: 500
Lv9: 500
Lv10: 500
}
AfterCastActDelay: {
Lv1: 1200
Lv2: 1400
Lv3: 1600
Lv4: 1800
Lv5: 2000
Lv6: 2200
Lv7: 2400
Lv8: 2600
Lv9: 2800
Lv10: 3000
}
CastTime: 250
AfterCastActDelay: 1_000
SkillData2: 1000
FixedCastTime: {
Lv1: 150
Lv2: 250
Lv3: 350
Lv4: 450
Lv5: 500
Lv6: 500
Lv7: 500
Lv8: 500
Lv9: 500
Lv10: 500
}
FixedCastTime: 300
Requirements: {
SPCost: {
Lv1: 18
Expand Down
68 changes: 41 additions & 27 deletions src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -2117,7 +2117,7 @@ static int battle_calc_skillratio(int attack_type, struct block_list *src, struc
break;
#ifdef RENEWAL
case KN_BRANDISHSPEAR:
skillratio += 300 + 100 * skill_lv + status_get_str(src);
skillratio += 300 + 100 * skill_lv + status_get_str(src) * 5;
break;
#else
case KN_BRANDISHSPEAR:
Expand Down Expand Up @@ -2368,7 +2368,8 @@ static int battle_calc_skillratio(int attack_type, struct block_list *src, struc
#else
case LK_SPIRALPIERCE:
case ML_SPIRALPIERCE:
skillratio += 50 * skill_lv;
skillratio += -100 + 150 + 50 * skill_lv;
RE_LVL_DMOD(100);
#endif
break;
case PA_SACRIFICE:
Expand Down Expand Up @@ -3040,8 +3041,10 @@ static int battle_calc_skillratio(int attack_type, struct block_list *src, struc
skillratio += 200;
if( sc->data[SC_TRUESIGHT] )
skillratio += 2*sc->data[SC_TRUESIGHT]->val1;
#ifndef RENEWAL
if( sc->data[SC_LKCONCENTRATION] )
skillratio += sc->data[SC_LKCONCENTRATION]->val2;
#endif
if (sd != NULL && sd->weapontype == W_KATAR && (i=pc->checkskill(sd,ASC_KATAR)) > 0)
skillratio += skillratio * (10 + 2 * i) / 100;
#endif
Expand Down Expand Up @@ -5612,36 +5615,43 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
if ( sd && s_ele != sd->bonus.arrow_ele )
s_ele = sd->bonus.arrow_ele;
break;

case NJ_TATAMIGAESHI:
ATK_RATE(200);
/* Fall through */
ATK_RATE(200);
ATK_RATE(battle->calc_skillratio(BF_WEAPON, src, target, skill_id, skill_lv, skillratio, wflag));
break;

case LK_SPIRALPIERCE:
case ML_SPIRALPIERCE: // [malufett]
if( skill_id != NJ_TATAMIGAESHI ){
short index = sd?sd->equip_index[EQI_HAND_R]:0;
GET_NORMAL_ATTACK( (sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|(sc && sc->data[SC_WEAPONPERFECT]?8:0), 0);
wd.damage = wd.damage * 70 / 100;
//n_ele = true; // FIXME: This is has no effect if it's after GET_NORMAL_ATTACK (was this intended, or was it supposed to be put above?)

if (sd && index >= 0 &&
sd->inventory_data[index] &&
sd->inventory_data[index]->type == IT_WEAPON)
ATK_ADD(sd->inventory_data[index]->weight * 7 / 100);
case ML_SPIRALPIERCE: { // [malufett]
short index = sd?sd->equip_index[EQI_HAND_R]:0;
GET_NORMAL_ATTACK( (sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|(sc && sc->data[SC_WEAPONPERFECT]?8:0), 0);
wd.damage = wd.damage * 70 / 100;
//n_ele = true; // FIXME: This is has no effect if it's after GET_NORMAL_ATTACK (was this intended, or was it supposed to be put above?)

switch (tstatus->size) {
case SZ_SMALL: //Small: 115%
ATK_RATE(115);
break;
case SZ_BIG: //Large: 85%
ATK_RATE(85);
}
wd.damage = battle->calc_masteryfix(src, target, skill_id, skill_lv, wd.damage, wd.div_, 0, flag.weapon);
wd.damage = battle->calc_cardfix2(src, target, wd.damage, s_ele, nk, wd.flag);
if (sd && index >= 0 &&
sd->inventory_data[index] &&
sd->inventory_data[index]->type == IT_WEAPON)
ATK_ADD(sd->inventory_data[index]->weight * 7 / 100);

switch (tstatus->size) {
case SZ_SMALL: // Small: 130%
ATK_RATE(130);
break;

case SZ_MEDIUM: // Medium: 115%
ATK_RATE(115);
break;
}
FALLTHROUGH
wd.damage = battle->calc_masteryfix(src, target, skill_id, skill_lv, wd.damage, wd.div_, 0, flag.weapon);
wd.damage = battle->calc_cardfix2(src, target, wd.damage, s_ele, nk, wd.flag);
ATK_RATE(battle->calc_skillratio(BF_WEAPON, src, target, skill_id, skill_lv, skillratio, wflag));
}
break;

#endif
default:
ATK_RATE(battle->calc_skillratio(BF_WEAPON, src, target, skill_id, skill_lv, skillratio, wflag));
break;
}

//Constant/misc additions from skills
Expand Down Expand Up @@ -5943,9 +5953,13 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
){
int lv = sc->data[SC_AURABLADE]->val1;
#ifdef RENEWAL
lv *= ((skill_id == LK_SPIRALPIERCE || skill_id == ML_SPIRALPIERCE)?wd.div_:1); // +100 per hit in lv 5
#endif
if (skill_id == LK_SPIRALPIERCE || skill_id == ML_SPIRALPIERCE)
lv *= wd.div_; // +100 per hit in lv 5

ATK_ADD(sd->status.base_level * (lv + 3));
#else
ATK_ADD(20*lv);
#endif
}

if( !skill_id ) {
Expand Down
1 change: 0 additions & 1 deletion src/map/pc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6334,7 +6334,6 @@ static int pc_checkallowskill(struct map_session_data *sd)
SC_DANCING,
SC_GS_GATLINGFEVER,
#ifdef RENEWAL
SC_LKCONCENTRATION,
SC_EDP,
#endif
SC_FEARBREEZE,
Expand Down
15 changes: 14 additions & 1 deletion src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -4419,8 +4419,10 @@ static int status_calc_atk_percent(struct block_list *bl, struct status_change *
if (sc->data[SC_PROVOKE] != NULL)
atk_percent += sc->data[SC_PROVOKE]->val3;

#ifndef RENEWAL
if (sc->data[SC_LKCONCENTRATION] != NULL)
atk_percent += sc->data[SC_LKCONCENTRATION]->val2;
#endif

if (sc->data[SC_HAMI_BLOODLUST] != NULL)
atk_percent += sc->data[SC_HAMI_BLOODLUST]->val2;
Expand Down Expand Up @@ -4687,6 +4689,12 @@ static int status_calc_watk(struct block_list *bl, struct status_change *sc, int
watk -= sc->data[SC_WATER_BARRIER]->val3;
if(sc->data[SC_GENTLETOUCH_CHANGE] && sc->data[SC_GENTLETOUCH_CHANGE]->val2)
watk += sc->data[SC_GENTLETOUCH_CHANGE]->val2;

#ifdef RENEWAL
if (sc->data[SC_LKCONCENTRATION] != NULL)
watk += watk * sc->data[SC_LKCONCENTRATION]->val2 / 100;
#endif

return cap_value(watk, battle_config.watk_min, battle_config.watk_max);
}
#ifndef RENEWAL
Expand Down Expand Up @@ -8647,9 +8655,14 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl
total_tick += total_tick / 10;
break;
case SC_LKCONCENTRATION:
val2 = 5 * val1; // ATK% Increase
val3 = 10*val1; //Hit Increase
#ifdef RENEWAL
val2 = 5 + 2 * val1; // ATK% increase
val4 = 5 + 2 * val1; // Def% reduction
#else
val2 = 5 * val1; // ATK% Increase
val4 = 5 * val1; // Def% reduction
#endif
sc_start(src, bl, SC_ENDURE, 100, 1, total_tick, skill_id); // Endure effect
break;
case SC_ANGELUS:
Expand Down

0 comments on commit 259a7d5

Please sign in to comment.