Fixes#8041
Added support for int64, so the range of the random numbers that can be generated is much wider now.
Changed the logic to be more restrictive:
(1) The range version is intended for positive numbers only.
(2) If minimum and maximum are equal and no random value can be calculated.
Triggering the more restrictive behavior will trigger the script source (file) to be reported in the map-server.
Co-authored-by: Atemo <Atemo@users.noreply.github.com>
Faster and with no module bias
Removed rnd_init, rnd_uint32 and rnd_uniform
From now on we will only use rnd_value(min, max) for values in range [min, max] and rnd_chance(chance, base) for chances
Fixes#7881Fixes#7883Fixes#7884Fixes#7885
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
* Fixes#7771.
* Adds a missing check to avoid warping players who are actively jailed out early after relogging.
Thanks to @fab10Carvalho and @Lemongrass3110!
Deals normal long ranged physical damage to the target.
Can only be used when riding dragon.
Deals additional damage depends on user's MaxHP and MaxSP.
Affected by Hit/Flee calculation.
Ignores physical defense.
Damage property depends on weapon property.
Affected by attack modifiers (such as race modifier).
Recovers 2 AP.
When using while under Dragonic Aura buff, increases influence of MaxHP and MaxSP in skill damage.
Fixed casting time : 0.5 seconds (based on level 10).
Variable Casting time : 2 seconds (based on level 10).
Cooldown: 0.5 seconds (based on level 10).
Global cool time : 0.15 seconds (based on level 10).
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Credit to @datawulf
* Implemented BO_EXPLOSIVE_POWDER
- Deals melee physical damage to all targets around the user.
- Doesn't need any catalyst.
- When using while under Research Report buff, increases damage and number of hit.
- Recovers 2 AP.
- Fixed casting time : - (based on level 5).
- Variable Casting time : - (based on level 5).
- Cooldown: 0.7 seconds (based on level 5).
- Global cool time : 0.25 seconds (based on level 5).
* Implemented BO_MAYHEMIC_THORNS
- Deals long ranged physical damage to the target and surrounding enemies around the target with the range up to 9x9 cells.
- Doesn't need any catalyst.
- Has a chance to trigger critical, the critical chance is the user's cri.
- When using while under Research Report buff, increases damage and number of hit.
- Recovers 2 AP.
- Fixed casting time : 0.5 seconds (based on level 10).
- Variable Casting time : 1 second (based on level 10).
- Cooldown: 0.7 seconds (based on level 10).
- Global cool time : 0.15 seconds (based on level 10).
* Skills updated to 2nd rebalance
Credit to @datawulf
* Implemented MT_MIGHTY_SMASH
- Deals melee physical damage to all targets around the user.
- When using while under Axe Stomp buff, increases damage and number of hit.
- Fixed casting time : - (based on level 10).
- Variable Casting time : - (based on level 10).
- Cooldown: 0.3 seconds (based on level 10).
- Global cool time : - (based on level 10).
* Updated Mighty Smash to last rebalance
- Increases cooldown from 0.3 seconds to 0.5 seconds.
- Adds global cool time by 0.25 seconds.
- Increases SP consumption from 78 to 95 based on level 10.
- Reduces base damage from 3100%/3150%Atk to 1825%/1850%Atk per hit based on level 10.
- Increases number of hit from 3/5 hits to 5/7 hits.
- While under Axe Stomp buff, increases factor weight of POW in skill formula from 7 to 10.
* Implemented MT_TRIPLE_LASER
- Deals long ranged physical damage to the target.
- Can only be used when using Madogear.
- Has a chance to trigger critical, the critical chance is the user's cri.
- Damage property depends on weapon property.
- Doesn't consume magic gear fuel or cannonball.
- Fixed casting time : 0.5 seconds (based on level 5).
- Variable Casting time : 1 seconds (based on level 5).
- Cooldown: 0.25 seconds (based on level 5).
- Global cool time : - (based on level 5).
* Updated Triple Laser to last rebalance
- Increases cooldown from 0.25 seconds to 0.35 seconds.
- Adds global cool time by 0.25 seconds.
- Increases base damage from 3300%Atk to 5050%Atk per hit based on level 5.
- Increases factor weight of POW in skill formula from 10 to 12.
* Implemented MT_SPARK_BLASTER
- Deals long ranged physical damage to the target and surrounding enemies around the target with the range up to 9x9 cells.
- Can only be used when using Madogear.
- Affected by Hit/Flee calculation.
- Ignores physical defense.
- Doesn't consume magic gear fuel or cannonball.
- Damage property depends on weapon property.
- Recovers 2 AP.
- Fixed casting time : 0.5 seconds (based on level 10).
- Variable Casting time : 1.5 seconds (based on level 10).
- Cooldown: 0.7 seconds (based on level 10).
- Global cool time : 0.25 seconds (based on level 10).
* Updated Spark Blaster to last rebalance
- Reduces cooldown from 0.7 seconds to 0.5 seconds.
- Increases base damage from 7750%Atk to 9250%Atk based on level 10.
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Credits to @datawulf
* Follow up to 65200eb.
* Removes a lot of else cases when parsing monster data.
* Fixes an issue where the damagetaken value of monsters would be reset after issuing a mob_spawn().
Thanks to @Lemongrass3110, @mplaten, and @vstumpf!
* Fixes#7904 and fixes#7916.
* Resolves NPC_RUN and NPC_RANDOMMOVE monsters not always reaching their intended escape distance.
* Resolves Marine Sphere calling the run skill too early resulting in the distance escaped not always being the same.
* Resolves Wink of Charm not forcing the target to fail skill use on the caster.
* Renames the monster alchemist state to can_escape to fit multiple uses.
Thanks to @Leemonn and @Lemongrass3110!
* Fixes#7191.
* Adds a buy and sell safety check from the Market Shop type.
* Also includes an item validation check when loading items from SQL for Market Shops.
Thanks to @mazvi!
* Do not exit the process while receiving crash signal so that the system will make core dump correctly.
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
* Sound Blend
- Reduces SP consumption from 128 to 80 based on level 5.
* Metallic Fury
- Reduces cooldown from 0.5 seconds to 0.3 seconds.
- Reduces SP consumption from 168 to 94 based on level 5.
- Reduces AP recovery rate from 3 to 2 based on level 5.
- Increases damage from 4500%/4950~6750%(area damage according to number of branded target)Matk to 11000%/12500~18500%(area damage according to number of branded target)Matk based on level 5.
* Rhythm Shooting
- Adds 0.15 seconds cooldown.
- Removes 0.15 seconds delay after skill.
- Reduces SP consumption from 90 to 52 based on level 5.
- Increases damage from 600%/780%(branded target)Atk to 800%/1400%(branded target)Atk based on level 5.
- Increases factor weight of CON in skill formula from 2 to 3.
* Rose Blossom
- Reduces variable casting time from 2 seconds to 1 second.
- Increases cooldown from 0.5 seconds to 0.7 seconds.
- Reduces SP consumption from 125 to 94 based on level 5.
- Increases damage from 3750%/1750%(area damage)Atk to 11200%/15250%(area damage)Atk based on level 5.
- Increases factor weight of CON in skill formula from 3/2(area damage) to 3/3(area damage).
Checked against https://github.com/rathena/rathena/pull/7024
Credit to @datawulf for Metallic Fury update
* Overslash
- Reduces cooldown from 1 second to 0.7 seconds.
- Reduces SP consumption from 68 to 65 based on level 5.
- Increases AP recovery rate from 2 to 3.
- Increases damage from 1800%Atk to 2200%Atk per hit based on level 10 (Spear & Sword Mastery level 10).
Already implemented
- Increases factor weight of POW in skill formula from 2 to 5.
* Shield Shooting
- Reduces cooldown from 1 second to 0.7 seconds.
- Increases AP recovery rate from 2 to 3.
- Increases damage from 6440%Atk to 14440%Atk based on level 5 (Shield Mastery level 10, shield refine rate is 10 and shield weight is 150).
Already implemented
- Increases factor weight of POW in skill formula from 3 to 5.
Notes
- Factor weight of shield refine rate is taken from next rebalance: "Increases factor weight of shield refine rate in skill formula from 4 to 25."
- Factor weight of the shield weight is deduced from the skill base damage: 11900%Atk on level 5.
* Cross Rain
- Reduces cooldown from 5 seconds to 4.5 seconds.
- Reduces delay after skill from 0.5 seconds to 0.15 seconds.
- Increases SP consumption from 68 to 78 based on level 10.
- Increases AP recovery rate from 5 to 7.
- Increases damage from 2000%/3500%(Holy Shield)Matk to 3700%/5500%(Holy Shield)Matk per hit based on level 10 (Spear & Sword Mastery level 10).
* Grand Judgement
- Reduces cooldown from 60 seconds to 5 seconds.
- Removes 0.5 seconds delay after skill.
- Increases SP consumption from 68 to 78 based on level 10.
- Reduces AP consumption from 150 to 15.
- Reduces duration of Grand Judgement buff from 300 seconds to 150 seconds.
- Increases damage from 7500%/11000%(plant and insect race)Atk to 15250%/16850%(plant and insect race)Atk based on level 10.
* Judgement Cross
- Reduces cooldown from 60 seconds to 5 seconds.
- Removes 0.5 seconds delay after skill.
- Reduces SP consumption from 150 to 105 based on level 10.
- Reduces AP consumption from 150 to 10.
- Increases damage from 7500%/11000%(plant and insect race)Matk to 19500%/21000%(plant and insect race)Matk based on level 10.