305 Commits

Author SHA1 Message Date
Vincent Stumpf
e235c9cab4
Change common and config includes to use <> (#7596) 2023-02-12 12:46:06 -08:00
Vincent Stumpf
6938722f02
Replace the bitshift optimizations for multiplication (#7590)
* These were originally bitshifts because it was 'faster', but now with modern compilers and hardware, the only thing it does now is confuse developers who have to read the code
2023-02-08 16:00:11 -08:00
Lemongrass3110
f261307bbe
Added script command mesitemlink (#7565)
Adds a new script command for itemlink generation for usage inside NPC dialogs (mes "").
A few cleanups related to the normal itemlink feature.

Thanks to @Atemo and @aleos89 for their help!

Co-authored-by: Atemo <Atemo@users.noreply.github.com>
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
2023-02-07 10:47:36 +01:00
Atemo
39559c125b
Implemented missing skills (#7552)
* Implemented NPC_BLEEDING2
  Copy from NPC_BLEEDING for now except
  * element always Neutral
  * differents rates

* Implemented NPC_HELLJUDGEMENT2
  Copy from NPC_HELLJUDGEMENT except
  * element neutral
  * skills inflicts a random status effect

* Implemented NPC_WIDEFREEZE2
  Copy from NPC_WIDEFREEZE

* Implemented NPC_ICEBREATH2
  Copy from NPC_ICEBREATH except
  * Chance 100% instead of 70%
  * Splash area 4 instead of 3

* Implemented NPC_WIDEBLEEDING2
  Copy from NPC_WIDEBLEEDING

* Implemented NPC_WIDECONFUSE2
  Copy from NPC_WIDECONFUSE

* Implemented NPC_WIDESILENCE2
  Copy from NPC_WIDESILENCE

* Implemented NPC_WIDESTUN2
  Copy from NPC_WIDESTUN

* Implemented NPC_WIDESILENCE2
  Copy from NPC_WIDESILENCE

* Implemented NPC_WIDESLEEP2
  Copy from NPC_WIDESLEEP

* Implemented NPC_WIDECURSE2
  Copy from NPC_WIDECURSE

* Implemented NPC_WIDESTONE2
  Copy from NPC_WIDESTONE

Thanks to @OptimusM, @Lemongrass3110, @aleos89 !
2023-01-24 15:06:38 +01:00
Balfear
817b86d5e1
Roulette: Bonus item reward (#7427)
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
2022-12-19 00:14:38 +01:00
Lemongrass3110
d1e184e46c
Initial version of cashmall (#7450)
Introduces the cashmall
Added Cachua_Coupon exchange NPC
Enabled Devil Enchant Master and moved to Cash Mall
Moved Mergician
Added Basta, Mighty Hammer and Brock
Moved Shadow Blacksmith
Added Cash Hair Stylist
Added a feature switch for Stylist UI
Updated Hair Stylist

Thanks to @aleos89, @Atemo and @eppc0330!

Co-authored-by: aleos <aleos89@users.noreply.github.com>
Co-authored-by: Atemo <Atemo@users.noreply.github.com>
2022-12-18 00:39:50 +01:00
Lemongrass3110
ae686056a0
Added CodeQL analysis (#7208)
Adds CodeQL analysis because LGTM was disabled and removed.
2022-12-16 22:34:59 +01:00
Singe Horizontal
8eac71f57f
Cleaned struct tokens for map_session_data and status_change (#7490)
Fixes #7492
2022-12-16 19:16:29 +01:00
Aleos
da375a04c1
Adds battle config mob_respawn_time (#7312)
* Adjusts the minimum respawn time of a monster to be 1 second as it is officially.
* Adds a battle config to allow for easy adjustment.
* Monsters that don't define a delay1 for permanent spawn scripts are defaulted to 5 seconds.
Thanks to @mrjnumber1, @vstumpf, @Lemongrass3110, and @Atemo!
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2022-12-14 14:17:41 -05:00
Vincent Stumpf
1f4c068c39
Refactor status change entries (#7356)
* Make map_session_data a class, call constructor/destructor on alloc/free

* add getSCE

* add create, delete, clear SCE

* Use getSCE, make data access private

* add a cache for last-fetched status
2022-12-13 23:47:53 -08:00
Aleos
ee2dcf816e
New macro detection features (#7359)
* Adds battle config macro_detection_punishment to ban or jail characters.
* Adds battle config macro_detection_punishment_time to adjust the duration of ban/jail for players who fail the captcha challenges.
* Adds script command macro_detector which invokes the captcha challenge.
* General cleanups to the jail functions to remove duplicate code.
* General cleanups to the macro punishment calls to remove duplicate code.
* Ending SC_JAILED will now properly remove the jail status rather than trying to reset the timer to 1 second resolving any possibility of players getting stuck.
Thanks to @Lemongrass3110!
2022-12-13 15:44:42 -05:00
SapitoSucio
55d3c1578c
Itemlink command and integration (#7291)
Co-authored-by: Akkarinage <mike.langford@industrial-illusions.net>
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
Co-authored-by: Atemo <Atemo@users.noreply.github.com>
Co-authored-by: cydh<cydh@users.noreply.github.com>
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Co-authored-by: secretdataz<secretdataz@users.noreply.github.com>
2022-11-11 18:04:41 +01:00
Lemongrass3110
a763ad0629
Implemented dynamic NPCs (#7402)
This is required for features like #6640
Added COLOR_LIGHT_YELLOW
Cleaned up color definitions, its useless to store them as string first.
Dynamic NPCs will stay when you switch map and come back in time.
Dynamic NPCs will be removed instantly when you log out.
You can only create one dynamic NPC at a time.

Thanks to @Atemo!
2022-11-07 00:41:10 +01:00
eppc0330
2896ae21b0
Fix NPC_MAXPAIN skill mechanism (#5820)
* Max Pain will deal reflect damage to all characters on screen.
* Caster of Max Pain will get damaged.
* Max Pain will reflect both weapon and magic damage.
* Max Pain damages as special physical melee attack. PR_KYRIE, MG_SAFETYWALL, etc. can block the damage.
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
Co-authored-by: Daegaladh <Daegaladh@users.noreply.github.com>
2022-10-31 13:54:53 -04:00
Atemo
53d5fc609a
Updated damagetaken (#7372)
Save damagetaken in mob_data for mob controller
2022-10-22 12:57:46 +02:00
Aleos
d7bf5ebb58
Adds support for macro detection (#7315)
* Adds the official client macro detection system.
* Includes the ability to load imagery at server boot.
* See doc/captcha_db.txt for more information!
Thanks to @Asheraf and @Lemongrass3110!
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2022-10-14 10:54:19 -04:00
Vincent Stumpf
47c9a36215
Refactor generator to support future features (#7214)
Co-authored-by: Akkarinage <mike.langford@industrial-illusions.net>
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
2022-09-25 00:37:21 -07:00
Aleos
701d2c88c6
Fixes Skill Damage Database reflecting damage (#7258)
* Fixes #7248.
* Resolves an issue where skills defined in the Skill Damage Database would always reflect at least 1 damage even when no reflective gear or skills are active.
Thanks to @dev1-juan!
2022-09-22 12:38:14 -04:00
munkrej
4800b5bf72
adds missing mob skill conditions MSC_GROUNDATTACKED and MSC_DAMAGEDGT (#7138) 2022-09-22 15:30:17 +02:00
Aleos
05923b3ded
Adds a battle config for Guild Skill saving (#7262)
* Fixes #7256.
* Adds battle config guild_skill_relog_type to allow the ability to save Guild Skill cooldowns on relog or reset them.
* Adjusts the check to account for any new Guild Skills.
Thanks to @Xypr0 and @Lemongrass3110!
2022-09-12 16:57:46 -04:00
Kanin Temsrisuk
421e49e1c4
Check for invalid Reject Sword cases (#7174)
* If the target is dead, break out of the remaining checks and calculations.
Thanks to @Lemongrass3110!
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
2022-09-12 12:36:49 -04:00
Aleos
4a43856271
Adjusts Enchanting Shadow behavior (#7124)
* Fixes #7104.
* Implements Shadow Scar as a timer on units.
* Implements the official packet for Shadow Scar counter.
* Enchanting Shadow can now be triggered by skills as well as melee.
* Removes the hit count limit.
* Adjusts the damage rate of Shadow Wounds to increase by 3%.
* Adjusts the duration of Shadow Scar from 30 seconds to 15.
Thanks to @eppc0330 and @Lemongrass3110!
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2022-09-06 17:05:19 -04:00
Vincent Stumpf
c751ca6b74
Client Navigation Generator (#6023)
Creates navigation files for the client.
2022-08-26 21:31:45 -07:00
Lemongrass3110
b1b371f4b8
Cleaned up status_change_end (#7211)
* Removed leftover old debug info that made it necessary to the hide the real function behind a define.
* Introduced a C++ default argument for timer id, as the timer id is only needed a single time, when the status expires naturally.
* Replaced all currently existing calls that had INVALID_TIMER as argument and made use of the new default argument.
2022-08-26 22:23:40 -04:00
Aleos
e90fa9e8f7
Allow PK damage modifiers to affect flat damage (#7126) 2022-08-17 19:19:40 -04:00
Aleos
9759909f82
Add checks to ignore renewal DEF (#7150)
* Fixes #7143.
* Resolves an issue where Dragon Breath, Dragon Breath - Water, Cart Cannon, and Arms Cannon were not properly reducing damage based on the target's defense.
Thanks to @LadyNanuia, @Lemongrass3110, @attackjom!
2022-08-16 15:32:07 -04:00
Vincent Stumpf
0ac52d0bb4
Initial support for web service for newer clients (#5731)
Co-authored-by: Jittapan Pluemsumran <secret@rathena.org>
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2022-08-16 15:10:18 +02:00
Aleos
77b4b3ccea
Fixes a couple mob skill conditions (#7151)
* Fixes #7141.
* Follow up to 36b9b94.
* Fixes an issue with mob skill conditions closedattacked and longrangeattacked not triggering for skills with no aMotion.
Thanks to @datawulf!
2022-08-12 15:13:26 -04:00
Aleos
e3c2db65c4
Updates the behavior of Overheat (#7157)
* Overheat is now triggered via damage received, not damage dealt.
* Corrects an issue where the HP damage would not trigger because the Overheat status would end too early.
* Damage will no longer cause a flinch.
* General cleanups.
2022-08-06 21:55:20 -04:00
Joam
e3cb3fa01f
Renewal Physical damage cleanup (#6997)
Corrected bAtkRate item bonus behavior to be the same as official.
Correction order of calculation of physical attack
Enchant Deadly Poison now grants 25% poison pseudo elemental bonus. also Magnum break also grants 20% fire pseudo elemental damage.
Advanced Katar Mastery bonus formula is corrected.
Critical attacks now always use max attack value like Maximize Power-buffed attacks.
Correction item-script of many items/combo from bAddClass,Class_All to bAtkRate according to official sources.

Co-authored-by: Daegaladh <4557962+Daegaladh@users.noreply.github.com>
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
Co-authored-by: Jittapan Pluemsumran <nightsheep@outlook.com>
2022-07-21 16:29:42 +07:00
eppc0330
caa5cdd678
Fix displayed attack when missed (#7093)
Fix miss when a unit dodges attack from player
2022-07-17 06:58:46 +07:00
Aleos
394dab1237
Cleans up Thief's Double Attack item bonuses (#7070)
* Items that grant TF_DOUBLE now no longer require bDoubleRate.
* Adds pc_checkskill_flag() to return a skill's flag value.
Thanks to @eppc0330 and @secretdataz!
2022-06-28 12:01:57 -04:00
Aleos
563a7012ff
Weapon Blocking can now trigger on ATK_MISS (#7042)
* Fixes #6886.
* Weapon Blocking is able to trigger on missed attacks.
* Weapon Blocking can still be triggered even if the target has Kyrie, Safety Wall, or other damage nullification statuses.
Thanks to @Atemo!
2022-06-22 09:33:07 -04:00
Aleos
a05112b4a2
Allow Skill Damage Adjustments account for reflect (#6999)
* Fixes #4455 and fixes #6274.
* Reflected damage will now take into account if a skill has a modified damage ratio from skill_damage_db.
* Includes the GvG, Battlegrounds, and PK damage config adjustments as well.
Thanks to @cydh and @imaqtdan!
2022-06-17 14:00:45 -04:00
eppc0330
2992879ee3
Fix SC_POISONINGWEAPON and SC_PYREXIA damage bonus (#7004)
* Poisoning Weapon will now only increase the caster's short weapon damage.
* Pyrexia will now only increase the caster's critical damage and normal attack damage.
Thanks to @eppc0330!
2022-06-15 15:37:29 -04:00
Aleos
038c1778e1
Player skills no longer proc equip break on mobs (#7005)
* Fixes #5906.
* Player skills and items that have the ability to break a target's equipment will no longer "break" a non-player's equipment.
* WS_MELTDOWN (Shattering Strike) is able to bypass the non-player check as it does affect all target types.
* Adds a battle config to toggle the behavior.
Thanks to @Tydus1, @Xelliekins, @Atemo, @Daegaladh, and @Lemongrass3110!
2022-06-06 10:42:42 -04:00
Aleos
4aba94ca01
Updates Poisonous Smoke behavior (#6263)
* Fixes #6199.
* Adjusts the interval to every 2 seconds.
* Adjusts the success rate to 50%.
* Fixes the Poison Weapon effect not applying the 'enemy' status to those inside of Poisonous Smoke.
* Venom Bleed should only be active for 15 seconds, not 5 minutes like the rest of the poisons.
* Pyrexia will now cancel skill cast on each damage input.
Thanks to @Everade!
2022-06-01 14:27:23 -04:00
Aleos
c01c673313
Corrects Finger Offensive and Tiger Cannon (#6996)
* Fixes #6524.
* Finger Offensive will now have 5 hits across all levels.
* Fixes the HP bonus damage formula of Tiger Cannon.
Thanks to @Akaineko-astasi!
2022-06-01 11:33:03 -04:00
Aleos
5cee1cb3b1
Corrects every attack returning at least 1 damage (#6967)
* Follow up to 33a99b5.
* Resolves an issue where normal attacks which have no reflect damage were being capped to at least 1.
Thanks to @XanKriegor1!
2022-05-19 21:27:53 -04:00
Aleos
33a99b5993
Fixes reflected damage from overflowing (#6717)
* Fixes #6693.
* Reflected damage should never be negative.
* Reflect Damage no longer has a 'reflect counter'.
* Reflect Damage is removed on log out.
* Reflect Damage Reduction should only reduce in normal cases (outside of WoE/BG).
* Adjusts the variable names to better match their use.
* General cleanups to speed up certain scenarios.
Thanks to @kaninhot004 and @Lemongrass3110's review!
2022-05-19 12:24:34 -04:00
Playtester
e9ead1fcb7
Fixed skill ranges of NPC and HOM skills (#6917)
- Fixes #6884
- Updated skill ranges of NPC and Homunculus skills to their official values
- Implemented the official skill selection mechanic where when a mob picks a skill but can't cast it due to range, it will not check for any skills below
- Added a configuration to reset this to the previous behavior
2022-05-04 19:04:22 +02:00
Playtester
5181c70626
Improved chasing behavior (#6903)
- Fixes #6899
- Monsters will now always walk to the end of their chase path before checking for their target again (you can still change this by changing monster_chase_refresh in monster.conf)
- A monster's chase range is now exactly as defined in mob_db.yml except when it was just attacked
- A just-attacked monster's chase range is now only enhanced until it reaches its original target cell
- Ranged monsters will now always stop when their target is in attack range, even if they still have attack delay
- Fixed a small math error when calculating chase path
- When a monster loses its target, it will now always spread to an empty cell when it was chasing something and reaches the end of its chase path, but will no longer spread when it was already attacking the target that disappeared (it will still spread if you set the custom mob_ai setting for this)
- Fixed monsters not starting to chase a target while they are randomly walking

Thanks to @aleos89 for support.
2022-04-29 21:34:39 +02:00
Aleos
1aaa32bd1a
Minor Adjustment to Expanded Class skills (#6829)
* Kihop now applies physical damage bonus directly no longer depending on the number of party members. Physical damage bonus: (10 + (15 x skill level))%.
* Catnip Meteor:
- Reduces fixed casting time from 3 seconds to 1.5 seconds.
- Reduces variable casting time from 4 seconds to 2 seconds.
- From base level 100, deals additional damage depending on the user's base level and INT.
- Adjusts splash to 7x7 for all levels.
* Lunatic Carrot Beat now deals additional damage (from base level 100) depending on user's base level and STR.
2022-04-17 14:57:38 -04:00
Playtester
da93c190c5
Correct Implementation of NPC_CHANGEUNDEAD (#6837)
- Fixes #6832
- NPC_CHANGEUNDEAD is now a single target attack skill
- 100% physical, undead property damage
- When it deals damage, 10%*skill_lv chance to cause SC_CHANGEUNDEAD for 60 seconds
- Skill range is 2
- All NPC status skills now have 120% hit rate
2022-04-15 09:00:53 +02:00
Lemongrass3110
6e58ab7d40
Disabled random options for stolen items (#6836)
Added a battle config to enable/disable random options for stolen items.

Fixes #6833
2022-04-14 15:21:49 +02:00
Aleos
47cb6dc637
Minor corrections to Break Through (#5917)
* Fixes the attack bonus not properly applying to masteries.
* Fixes the healing bonus not increasing per skill level learned.
2022-04-02 08:19:28 -04:00
Playtester
5eb0a2ea32
Fixed small rounding issue with Divine Protection (#6781)
* Fixes #6779
* The reduction will now be calculated as float and then rounded
2022-04-01 22:40:21 +02:00
Lemongrass3110
db540124ad
Fixed some LGTM warnings (#6767)
Co-authored-by: aleos <aleos89@users.noreply.github.com>
2022-03-31 22:20:17 +02:00
Playtester
0ef5fa905c
Fixed Pre-Re SoftDEF Formula (#6766)
* Fixed Pre-Re SoftDEF Formula
* Fixes #6648

Note: This does not fix the order of processing which is also wrong, but at least the damage is official now in 1vs1 combat when if no item bonuses or status changes are involved that directly impact DEF.
2022-03-31 18:09:53 +02:00
Aleos
51335efec2
Fixes monster_ai battle config (#6757)
* Fixes #6751.
* Expands the cap of the monster_ai config to support new settings.
Thanks to @xZee0523!
2022-03-29 09:44:04 -04:00