Skip to content

Commit

Permalink
high level draft of skill ratio rework
Browse files Browse the repository at this point in the history
  • Loading branch information
guilherme-gm committed Dec 3, 2023
1 parent 2762a8a commit 265fe57
Show file tree
Hide file tree
Showing 5 changed files with 238 additions and 44 deletions.
34 changes: 34 additions & 0 deletions db/pre-re/skill_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ skill_db: (
AllowReproduce: true
BlockedByStasis: true
AllowPlagiarism: true
CustomSkillRatio: true
}
AttackType: "Magic"
Element: "Ele_Ghost"
Expand Down Expand Up @@ -864,6 +865,18 @@ skill_db: (
BlockedByStasis: true
AllowPlagiarism: true
}
SkillRatio: {
Lv1: 80
Lv2: 90
Lv3: 100
Lv4: 110
Lv5: 120
Lv6: 130
Lv7: 140
Lv8: 150
Lv9: 160
Lv10: 170
}
AttackType: "Magic"
Element: "Ele_Fire"
DamageType: {
Expand Down Expand Up @@ -16700,7 +16713,10 @@ skill_db: (
SkillInfo: {
AllowReproduce: true
AllowPlagiarism: true
CustomSkillRatio: true
}
SkillRatio: 90
SkillData1: 20 // Fire Charm bonus
AttackType: "Magic"
Element: "Ele_Fire"
NumberOfHits: {
Expand Down Expand Up @@ -16753,6 +16769,11 @@ skill_db: (
SkillType: {
Self: true
}
SkillInfo:{
CustomSkillRatio: true
}
SkillRatio: 50
SkillData1: 10 // Fire Charm bonus
AttackType: "Magic"
Element: "Ele_Fire"
InterruptCast: true
Expand Down Expand Up @@ -16800,7 +16821,14 @@ skill_db: (
SkillInfo: {
AllowReproduce: true
AllowPlagiarism: true
CustomSkillRatio: true
}
SkillRatio: {
Lv1: 100
Lv2: 150
// ...
}
SkillData1: 15 // Fire Charm bonus
AttackType: "Magic"
Element: "Ele_Fire"
DamageType: {
Expand Down Expand Up @@ -20994,6 +21022,12 @@ skill_db: (
DamageType: {
SplashArea: true
}
SkillRatio: {
BaseLevelModifier: 100
Lv1: 300
Lv2: 400
// ...
}
SplashRange: 13
NumberOfHits: {
Lv1: -3
Expand Down
61 changes: 59 additions & 2 deletions db/re/skill_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,18 @@ skill_db: (
SplashArea: true
SplitDamage: true
}
SkillRatio: {
Lv1: 80
Lv2: 90
Lv3: 100
Lv4: 110
Lv5: 120
Lv6: 130
Lv7: 140
Lv8: 150
Lv9: 160
Lv10: 170
}
SplashRange: 1
InterruptCast: true
CastTime: 400
Expand Down Expand Up @@ -679,6 +691,18 @@ skill_db: (
Lv9: 5
Lv10: 5
}
SkillRatio: {
Lv1: 5
Lv2: 10
Lv3: 15
Lv4: 20
Lv5: 25
Lv6: 30
Lv7: 35
Lv8: 40
Lv9: 45
Lv10: 50
}
InterruptCast: true
CastTime: 400
AfterCastActDelay: {
Expand Down Expand Up @@ -901,6 +925,18 @@ skill_db: (
DamageType: {
SplashArea: true
}
SkillRatio: {
Lv1: 160
Lv2: 180
Lv3: 200
Lv4: 220
Lv5: 240
Lv6: 260
Lv7: 280
Lv8: 300
Lv9: 320
Lv10: 340
}
SplashRange: 2
InterruptCast: true
CastTime: {
Expand Down Expand Up @@ -958,6 +994,7 @@ skill_db: (
BlockedByStasis: true
AllowPlagiarism: true
}
SkillRatio: 50
AttackType: "Magic"
Element: "Ele_Fire"
InterruptCast: true
Expand Down Expand Up @@ -5674,7 +5711,9 @@ skill_db: (
Quest: true
AllowReproduce: true
BlockedByStasis: true
CustomSkillRatio: true
}
SkillRatio: 125
AttackType: "Magic"
Element: "Ele_Holy"
InterruptCast: true
Expand Down Expand Up @@ -26247,6 +26286,17 @@ skill_db: (
DamageType: {
SplashArea: true
}
SkillInfo: {
CustomSkillRatio: true
}
SkillRatio: {
BaseLevelModifier: 100
Lv1: 600
Lv2: 900
Lv3: 1200
Lv4: 1500
Lv5: 1800
}
SplashRange: 5
NumberOfHits: -7
InterruptCast: true
Expand All @@ -26264,6 +26314,13 @@ skill_db: (
}
AfterCastActDelay: 2000
SkillData1: 10000
SkillData2: { // MATK base ratio
Lv1: 300
Lv2: 600
Lv3: 900
Lv4: 1200
Lv5: 1500
}
CoolDown: 5000
FixedCastTime: 500
Requirements: {
Expand Down Expand Up @@ -32865,7 +32922,7 @@ skill_db: (
Lv9: 15
Lv10: 16
}

SkillType: {
Enemy: true
}
Expand Down Expand Up @@ -33489,7 +33546,7 @@ skill_db: (
MaxLevel: 10
Hit: "BDT_MULTIHIT"
SkillType: {
Self: true
Self: true
}
SkillInfo: {
Chorus: true
Expand Down
83 changes: 42 additions & 41 deletions src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1628,23 +1628,23 @@ static int battle_calc_skillratio(int attack_type, struct block_list *src, struc
switch(attack_type){
case BF_MAGIC:
switch(skill_id){
case MG_NAPALMBEAT:
skillratio += skill_lv * 10 - 30;
break;
case MG_FIREBALL:
#ifdef RENEWAL
skillratio += 20 * skill_lv;
#else
skillratio += skill_lv * 10 - 30;
#endif
break;
case MG_SOULSTRIKE:
if (battle->check_undead(tst->race,tst->def_ele))
skillratio += 5*skill_lv;
break;
case MG_FIREWALL:
skillratio -= 50;
break;
// case MG_NAPALMBEAT:
// skillratio += skill_lv * 10 - 30;
// break;
// case MG_FIREBALL:
// #ifdef RENEWAL
// skillratio += 20 * skill_lv;
// #else
// skillratio += skill_lv * 10 - 30;
// #endif
// break;
// case MG_SOULSTRIKE:
// if (battle->check_undead(tst->race,tst->def_ele))
// skillratio += 5*skill_lv;
// break;
// case MG_FIREWALL:
// skillratio -= 50;
// break;
case MG_THUNDERSTORM:
/**
* in Renewal Thunder Storm boost is 100% (in pre-re, 80%)
Expand All @@ -1656,11 +1656,11 @@ static int battle_calc_skillratio(int attack_type, struct block_list *src, struc
case MG_FROSTDIVER:
skillratio += 10 * skill_lv;
break;
case AL_HOLYLIGHT:
skillratio += 25;
if (sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_PRIEST)
skillratio *= 5; //Does 5x damage include bonuses from other skills?
break;
// case AL_HOLYLIGHT:
// skillratio += 25;
// if (sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_PRIEST)
// skillratio *= 5; //Does 5x damage include bonuses from other skills?
// break;
case AL_RUWACH:
skillratio += 45;
break;
Expand Down Expand Up @@ -1694,21 +1694,21 @@ static int battle_calc_skillratio(int attack_type, struct block_list *src, struc
case SL_SMA:
skillratio += -60 + status->get_lv(src); //Base damage is 40% + lv%
break;
case NJ_KOUENKA:
skillratio -= 10;
if (sd && sd->charm_type == CHARM_TYPE_FIRE && sd->charm_count > 0)
skillratio += 20 * sd->charm_count;
break;
case NJ_KAENSIN:
skillratio -= 50;
if (sd && sd->charm_type == CHARM_TYPE_FIRE && sd->charm_count > 0)
skillratio += 10 * sd->charm_count;
break;
case NJ_BAKUENRYU:
skillratio += 50 * (skill_lv - 1);
if (sd && sd->charm_type == CHARM_TYPE_FIRE && sd->charm_count > 0)
skillratio += 15 * sd->charm_count;
break;
// case NJ_KOUENKA:
// skillratio -= 10;
// if (sd && sd->charm_type == CHARM_TYPE_FIRE && sd->charm_count > 0)
// skillratio += 20 * sd->charm_count;
// break;
// case NJ_KAENSIN:
// skillratio -= 50;
// if (sd && sd->charm_type == CHARM_TYPE_FIRE && sd->charm_count > 0)
// skillratio += 10 * sd->charm_count;
// break;
// case NJ_BAKUENRYU:
// skillratio += 50 * (skill_lv - 1);
// if (sd && sd->charm_type == CHARM_TYPE_FIRE && sd->charm_count > 0)
// skillratio += 15 * sd->charm_count;
// break;
#ifdef RENEWAL
case NJ_HYOUSENSOU:
skillratio -= 30;
Expand Down Expand Up @@ -1802,14 +1802,15 @@ static int battle_calc_skillratio(int attack_type, struct block_list *src, struc
/**
* Warlock
**/
// This could become a generic "int boosted" that uses a SkillData, or a specific function
case WL_SOULEXPANSION: // MATK [{( Skill Level + 4 ) x 100 ) + ( Caster's INT )} x ( Caster's Base Level / 100 )] %
skillratio = 100 * (skill_lv + 4) + st->int_;
RE_LVL_DMOD(100);
break;
case WL_FROSTMISTY: // MATK [{( Skill Level x 100 ) + 200 } x ( Caster's Base Level / 100 )] %
skillratio += 100 + 100 * skill_lv;
RE_LVL_DMOD(100);
break;
// case WL_FROSTMISTY: // MATK [{( Skill Level x 100 ) + 200 } x ( Caster's Base Level / 100 )] %
// skillratio += 100 + 100 * skill_lv;
// RE_LVL_DMOD(100);
// break;
case WL_JACKFROST:
if( tsc && tsc->data[SC_FROSTMISTY] ){
skillratio += 900 + 300 * skill_lv;
Expand Down
Loading

0 comments on commit 265fe57

Please sign in to comment.