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

2-2 jobs skill rebalance - Monk (2018 patch/Renewal) #3253

Merged
merged 10 commits into from
Jun 30, 2024
4 changes: 2 additions & 2 deletions db/re/size_fix.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
// Columns: Weapon type, Rows: Target size.
// Unarmed, Knife, 1H Sword, 2H Sword, 1H Spear, 2H Spears, 1H Axe, 2H Axe, Mace, 2H Mace, Staff, Bow, Knuckle, Musical Instrument, Whip, Book, Katar, Revolver, Rifle, Shotgun, Gatling Gun, Grenade Launcher, Fuuma Shuriken, 2H Staff
100,100, 75, 75, 75, 75, 50, 50, 75, 75,100,100,100, 75, 75,100, 75,100,100,100,100,100, 75,100 // Size: Small
100, 75,100, 75, 75, 75, 75, 75,100,100,100,100, 75,100,100,100,100,100,100,100,100,100, 75,100 // Size: Medium
100, 50, 75,100,100,100,100,100,100,100,100, 75, 50, 75, 50, 50, 75,100,100,100,100,100,100,100 // Size: Large
100, 75,100, 75, 75, 75, 75, 75,100,100,100,100,100,100,100,100,100,100,100,100,100,100, 75,100 // Size: Medium
100, 50, 75,100,100,100,100,100,100,100,100, 75, 75, 75, 50, 50, 75,100,100,100,100,100,100,100 // Size: Large
101 changes: 42 additions & 59 deletions db/re/skill_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7979,8 +7979,7 @@ skill_db: (
NoDamage: true
}
InterruptCast: true
CastTime: 1000
FixedCastTime: 1000
FixedCastTime: 500
Requirements: {
SPCost: 5
}
Expand Down Expand Up @@ -8046,6 +8045,7 @@ skill_db: (
}
AttackType: "Weapon"
DamageType: {
IgnoreDefense: true
IgnoreFlee: true
}
CastTime: 500
Expand Down Expand Up @@ -8083,18 +8083,7 @@ skill_db: (
}
AttackType: "Weapon"
Element: "Ele_Weapon"
NumberOfHits: {
Lv1: 1
Lv2: 2
Lv3: 3
Lv4: 4
Lv5: 5
Lv6: 6
Lv7: 7
Lv8: 8
Lv9: 9
Lv10: 10
}
NumberOfHits: -5
CastTime: 500
AfterCastActDelay: 500
AfterCastWalkDelay: {
Expand All @@ -8109,21 +8098,22 @@ skill_db: (
Lv9: 1600
Lv10: 1800
}
CoolDown: 1_000
FixedCastTime: 500
Requirements: {
SPCost: 10
SpiritSphereCost: {
Lv1: 1
Lv2: 2
Lv3: 3
Lv4: 4
Lv5: 5
Lv6: 6
Lv7: 7
Lv8: 8
Lv9: 9
Lv10: 10
SPCost: {
Lv1: 12
Lv2: 16
Lv3: 20
Lv4: 24
Lv5: 28
Lv6: 32
Lv7: 36
Lv8: 40
Lv9: 44
Lv10: 48
}
SpiritSphereCost: 1
}
},
{
Expand Down Expand Up @@ -8186,18 +8176,11 @@ skill_db: (
Lv9: 2100
Lv10: 2300
}
SkillData2: {
Lv1: 20000
Lv2: 30000
Lv3: 40000
Lv4: 50000
Lv5: 60000
Lv6: 70000
Lv7: 80000
Lv8: 90000
Lv9: 100000
Lv10: 110000
SkillData2: { // Effect duration (in milliseconds)
Lv1: 2_000 // Boss targets
Lv2: 10_000 // Non-Boss targets
}
CoolDown: 3_000
FixedCastTime: 0
Requirements: {
SPCost: 10
Expand Down Expand Up @@ -8295,8 +8278,8 @@ skill_db: (
Lv9: 1
Lv10: 1
}
SkillData1: 10000
SkillData2: 300000
SkillData1: 3_000 // Duration of the SP Recovery block (in milliseconds) (SC_EXTREMITYFIST2)
SkillData2: 300_000
FixedCastTime: {
Lv1: 2000
Lv2: 1750
Expand Down Expand Up @@ -8362,16 +8345,16 @@ skill_db: (
}
Requirements: {
SPCost: {
Lv1: 11
Lv2: 12
Lv3: 13
Lv4: 14
Lv5: 15
Lv6: 16
Lv7: 17
Lv8: 18
Lv9: 19
Lv10: 20
Lv1: 5
Lv2: 6
Lv3: 7
Lv4: 8
Lv5: 9
Lv6: 10
Lv7: 11
Lv8: 12
Lv9: 13
Lv10: 14
}
WeaponTypes: {
NoWeapon: true
Expand Down Expand Up @@ -8424,16 +8407,16 @@ skill_db: (
}
Requirements: {
SPCost: {
Lv1: 11
Lv2: 12
Lv3: 13
Lv4: 14
Lv5: 15
Lv6: 16
Lv7: 17
Lv8: 18
Lv9: 19
Lv10: 20
Lv1: 3
Lv2: 4
Lv3: 5
Lv4: 6
Lv5: 7
Lv6: 8
Lv7: 9
Lv8: 10
Lv9: 11
Lv10: 12
}
WeaponTypes: {
NoWeapon: true
Expand Down
96 changes: 86 additions & 10 deletions src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,13 @@ static int64 battle_calc_masteryfix(struct block_list *src, struct block_list *t
nullpo_ret(src);
nullpo_ret(target);

#ifdef RENEWAL
// In renewal, Occult Impact doesn't get extra damage by any mastery, not even weapon ones
if (skill_id == MO_INVESTIGATE)
return damage;
#endif


sc = status->get_sc(src);
sd = BL_CAST(BL_PC, src);
tstatus = status->get_status_data(target);
Expand Down Expand Up @@ -2245,11 +2252,35 @@ static int battle_calc_skillratio(int attack_type, struct block_list *src, struc
skillratio += 40 * skill_lv;
#endif
break;
case MO_FINGEROFFENSIVE:
skillratio+= 50 * skill_lv;
case MO_FINGEROFFENSIVE: {
#ifndef RENEWAL
skillratio += 50 * skill_lv;
#else
int ratio = 600 + 200 * skill_lv;

// Cast and Target must be locked in BladeStop.
// In other words: A third player won't do extra damage from hitting another Monk's blade stop
if (tsc != NULL && tsc->data[SC_BLADESTOP] != NULL && sc->data[SC_BLADESTOP] != NULL)
ratio += ratio * 50 / 100;

skillratio += - 100 + ratio;
#endif
}
break;
case MO_INVESTIGATE:
case MO_INVESTIGATE: {
#ifndef RENEWAL
skillratio += 75 * skill_lv;
#else
int ratio = skill_lv * 100;

// Cast and Target must be locked in BladeStop.
// In other words: A third player won't do extra damage from hitting another Monk's blade stop
if (tsc != NULL && tsc->data[SC_BLADESTOP] != NULL && sc->data[SC_BLADESTOP] != NULL)
ratio += ratio * 50 / 100;

skillratio += - 100 + ratio;
#endif
}
break;
case MO_EXTREMITYFIST:
#ifndef RENEWAL
Expand All @@ -2266,10 +2297,21 @@ static int battle_calc_skillratio(int attack_type, struct block_list *src, struc
skillratio += 20 * skill_lv;
break;
case MO_CHAINCOMBO:
#ifndef RENEWAL
skillratio += 50 + 50 * skill_lv;
#else
if (sd != NULL && sd->weapontype == W_KNUCKLE)
skillratio += -100 + (250 + 50 * skill_lv) * 2;
else
skillratio += 150 + 50 * skill_lv;
#endif
break;
case MO_COMBOFINISH:
#ifndef RENEWAL
skillratio += 140 + 60 * skill_lv;
#else
skillratio += 350 + 150 * skill_lv + status_get_str(src) * 5;
#endif
break;
case BA_MUSICALSTRIKE:
case DC_THROWARROW:
Expand Down Expand Up @@ -4763,6 +4805,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
if(skill_id) {
wd.flag |= battle->range_type(src, target, skill_id, skill_lv);
switch(skill_id) {
#ifndef RENEWAL
case MO_FINGEROFFENSIVE:
if(sd) {
if (battle_config.finger_offensive_type)
Expand All @@ -4771,6 +4814,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
wd.div_ = sd->spiritball_old;
}
break;
#endif
case HT_PHANTASMIC:
//Since these do not consume ammo, they need to be explicitly set as arrow attacks.
flag.arrow = 1;
Expand Down Expand Up @@ -4822,6 +4866,11 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
wd.div_ = 4;
}
break;

case MO_CHAINCOMBO:
if (sd != NULL && sd->weapontype == W_KNUCKLE)
wd.div_ = -6;
break;
#endif

case KN_AUTOCOUNTER:
Expand Down Expand Up @@ -5506,13 +5555,28 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
case MO_EXTREMITYFIST: // [malufett]
{
short totaldef = status->get_total_def(target);
GET_NORMAL_ATTACK((sc && sc->data[SC_MAXIMIZEPOWER] ? 1 : 0) | 8, skill_id);
if ( wd.damage ) {
GET_NORMAL_ATTACK((sc != NULL && sc->data[SC_MAXIMIZEPOWER] != NULL ? 1 : 0) | 8, skill_id);
if (wd.damage != 0) {
ATK_ADD(250 * (skill_lv + 1) + (10 * (status_get_sp(src) + 1) * wd.damage / 100) + (8 * wd.damage));
ATK_ADD(-totaldef);

if (sd != NULL && sd->spiritball_old >= 6)
ATK_ADDRATE(100); // +100% damage = doubles the damage
}
}
break;

case MO_INVESTIGATE: {
// Based on in-game tests, RENEWAL Occult Impact has its base ATK increased by 50% of target's hard def
// In other words: (ATK + (Target_HardDef / 2)) * SkillRatio
defType hardDef = status->get_def(target);
hardDef = status->calc_def2(target, tsc, hardDef, false);

ATK_ADD(hardDef / 2);
ATK_RATE(battle->calc_skillratio(BF_WEAPON, src, target, skill_id, skill_lv, skillratio, wflag));
break;
}

case PA_SHIELDCHAIN:
GET_NORMAL_ATTACK((sc && sc->data[SC_MAXIMIZEPOWER] ? 1 : 0) | (sc && sc->data[SC_WEAPONPERFECT] ? 8 : 0), skill_id);
if ( sd ) {
Expand Down Expand Up @@ -6621,8 +6685,10 @@ static bool battle_should_bladestop_attacker(struct block_list *attacker, struct
if (tsc == NULL || tsc->data[SC_BLADESTOP_WAIT] == NULL)
return false; // Target is not in BladeStop wait mode

#ifndef RENEWAL
if (is_boss(attacker))
return false; // Boss monsters are not affected
#endif

#ifndef RENEWAL
if (attacker->type == BL_PC)
Expand Down Expand Up @@ -6705,8 +6771,14 @@ static enum damage_lv battle_weapon_attack(struct block_list *src, struct block_
}
if (tsc != NULL && battle->should_bladestop_attacker(src, target)) {
uint16 skill_lv = tsc->data[SC_BLADESTOP_WAIT]->val1;
int duration = skill->get_time2(MO_BLADESTOP,skill_lv);
status_change_end(target, SC_BLADESTOP_WAIT, INVALID_TIMER);

#ifndef RENEWAL
int duration = skill->get_time2(MO_BLADESTOP, skill_lv);
#else
int duration = skill->get_time2(MO_BLADESTOP, is_boss(src) ? 1 : 2);
#endif

if (sc_start4(target, src, SC_BLADESTOP, 100, sd ? pc->checkskill(sd, MO_BLADESTOP) : 5, 0, 0, target->id, duration, MO_BLADESTOP)) {
//Target locked.
clif->damage(src, target, sstatus->amotion, 1, 0, 1, BDT_NORMAL, 0); //Display MISS.
Expand All @@ -6717,13 +6789,17 @@ static enum damage_lv battle_weapon_attack(struct block_list *src, struct block_
}

if(sd && (skillv = pc->checkskill(sd,MO_TRIPLEATTACK)) > 0) {
int triple_rate= 30 - skillv; //Base Rate
if (sc && sc->data[SC_SKILLRATE_UP] && sc->data[SC_SKILLRATE_UP]->val1 == MO_TRIPLEATTACK) {
triple_rate += triple_rate * (sc->data[SC_SKILLRATE_UP]->val2) /100;
#ifndef RENEWAL
int triple_rate = 30 - skillv; // Base Rate
#else
int triple_rate = 30; // Base Rate
#endif
if (sc != NULL && sc->data[SC_SKILLRATE_UP] != NULL && sc->data[SC_SKILLRATE_UP]->val1 == MO_TRIPLEATTACK) {
triple_rate += triple_rate * (sc->data[SC_SKILLRATE_UP]->val2) / 100;
status_change_end(src, SC_SKILLRATE_UP, INVALID_TIMER);
}
if (rnd() % 100 < triple_rate) {
if (skill->attack(BF_WEAPON, src, src, target, MO_TRIPLEATTACK, skillv, tick, 0))
if (skill->attack(BF_WEAPON, src, src, target, MO_TRIPLEATTACK, skillv, tick, 0) != 0)
return ATK_DEF;
return ATK_MISS;
}
Expand Down
Loading
Loading