Skip to content

Commit

Permalink
fix duration of Venom Bleed poison effect
Browse files Browse the repository at this point in the history
while other effects lasts for 5 minutes, Venom Bleed only lasts for 15
seconds
  • Loading branch information
guilherme-gm committed Jul 29, 2023
1 parent 6b233dc commit 7718e89
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
7 changes: 6 additions & 1 deletion db/pre-re/skill_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19736,6 +19736,7 @@ skill_db: (
NoDamage: true
}
AfterCastActDelay: 1000
// Duration of SC_POISONINGWEAPON in caster (in miliseconds)
SkillData1: {
Lv1: 60000
Lv2: 120000
Expand All @@ -19748,7 +19749,11 @@ skill_db: (
Lv9: 540000
Lv10: 600000
}
SkillData2: 300000
// Duration of inflicted poison effect (in miliseconds)
SkillData2: {
Lv1: 15_000 // Venom Bleed
Lv2: 300_000 // Everything else
}
CoolDown: 0
Requirements: {
SPCost: {
Expand Down
7 changes: 6 additions & 1 deletion db/re/skill_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20226,6 +20226,7 @@ skill_db: (
NoDamage: true
}
AfterCastActDelay: 1000
// Duration of SC_POISONINGWEAPON in caster (in miliseconds)
SkillData1: {
Lv1: 60000
Lv2: 120000
Expand All @@ -20238,7 +20239,11 @@ skill_db: (
Lv9: 540000
Lv10: 600000
}
SkillData2: 300000
// Duration of inflicted poison effect (in miliseconds)
SkillData2: {
Lv1: 15_000 // Venom Bleed
Lv2: 300_000 // Everything else
}
FixedCastTime: -1
Requirements: {
SPCost: {
Expand Down
4 changes: 3 additions & 1 deletion src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -3536,7 +3536,9 @@ static int64 battle_calc_damage(struct block_list *src, struct block_list *bl, s
}
if (s_sc->data[SC_POISONINGWEAPON] != NULL) {
if (!(flag & BF_SKILL) && (flag & BF_WEAPON) && damage > 0 && rnd() % 100 < s_sc->data[SC_POISONINGWEAPON]->val3) {
sc_start(src, bl, s_sc->data[SC_POISONINGWEAPON]->val2, 100, s_sc->data[SC_POISONINGWEAPON]->val1, skill->get_time2(GC_POISONINGWEAPON, 1), GC_POISONINGWEAPON);
sc_type poison_sc = s_sc->data[SC_POISONINGWEAPON]->val2;
int duration = skill->get_time2(GC_POISONINGWEAPON, (poison_sc == SC_VENOMBLEED ? 1 : 2));
sc_start(src, bl, poison_sc, 100, s_sc->data[SC_POISONINGWEAPON]->val1, duration, GC_POISONINGWEAPON);
}
}
if( s_sc->data[SC__DEADLYINFECT] && flag&BF_SHORT && damage > 0 && rnd()%100 < 30 + 10 * s_sc->data[SC__DEADLYINFECT]->val1 && !is_boss(src) )
Expand Down
11 changes: 7 additions & 4 deletions src/map/skill.c
Original file line number Diff line number Diff line change
Expand Up @@ -3879,9 +3879,11 @@ static int skill_attack(int attack_type, struct block_list *src, struct block_li
{
struct status_change *ssc = status->get_sc(src);
if (ssc != NULL && ssc->data[SC_POISONINGWEAPON] != NULL && rnd() % 100 < 70 + 5 * skill_lv) {
sc_start(src, bl, ssc->data[SC_POISONINGWEAPON]->val2, 100, ssc->data[SC_POISONINGWEAPON]->val1, skill->get_time2(GC_POISONINGWEAPON, 1), skill_id);
sc_type poison_sc = ssc->data[SC_POISONINGWEAPON]->val2;
int duration = skill->get_time2(GC_POISONINGWEAPON, (poison_sc == SC_VENOMBLEED ? 1 : 2));
sc_start(src, bl, poison_sc, 100, ssc->data[SC_POISONINGWEAPON]->val1, duration, skill_id);
status_change_end(src, SC_POISONINGWEAPON, INVALID_TIMER);
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
clif->skill_nodamage(src, bl, skill_id, skill_lv, 1);
}
}
break;
Expand Down Expand Up @@ -14423,9 +14425,10 @@ static int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *b
* 3rd stuff
**/
case UNT_POISONSMOKE:
if (battle->check_target(ss,bl,BCT_ENEMY) > 0 && !(tsc != NULL && tsc->data[sg->val2] != NULL)
if (battle->check_target(ss, bl, BCT_ENEMY) > 0 && !(tsc != NULL && tsc->data[sg->val2] != NULL)
&& rnd() % 100 < 50) {
sc_start(ss, bl, sg->val2, 100, sg->val1, skill->get_time2(GC_POISONINGWEAPON, 1), skill_id);
int duration = skill->get_time2(GC_POISONINGWEAPON, (sg->val2 == SC_VENOMBLEED ? 1 : 2));
sc_start(ss, bl, sg->val2, 100, sg->val1, duration, skill_id);
}
break;

Expand Down

0 comments on commit 7718e89

Please sign in to comment.