18299 Commits

Author SHA1 Message Date
Lemongrass3110
580511c0bb Fixed a warning
Fixes #8325

Thanks to @Beginerxx
2024-05-13 07:44:36 +02:00
Playtester
f85ca81066
Fixed Magic vs. Plant Damage (#8323)
- Fixed magic damage on plants always being 0
- Follow-up to 2963e52
2024-05-11 08:52:39 +02:00
Playtester
04117614cb
Attacking While Casting Crash Fix (#8322)
- Fixed a server crash that occurs when a unit did a normal attack while casting a spell (e.g. Free Cast)
- Follow-up to ffe40de
- Fixes #8319
2024-05-10 18:19:19 +02:00
Lemongrass3110
04386a8ebc Follow up to d445497 2024-05-10 00:12:10 +02:00
Jittapan Pluemsumran
d445497870
Converted a bunch of packets to structs (#8295)
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2024-05-09 23:06:32 +02:00
jasonch
1af1943f85
Added missing columns for yaml2sql (#8318)
Fixes #8317
2024-05-09 22:00:17 +02:00
Playtester
13bc3e2bb7
Monster Powerskill Levels, Silver Sniper, Magic Decoy (#8316)
- Fixed some monsters using the normal player level 10 version of a skill instead of the special NPC powerskill version (e.g. Heal for 9999 HP)
  * See doc/mob_skill_db_powerskill.txt for more information
- Fixed Silver Sniper and Magic Decoy using Heal 10
- Fixed Magic Decoy doing normal attacks
- Fixes #8306
2024-05-08 15:08:09 +02:00
Playtester
ffe40def4a
NPC_RUN, Monster Skill Interval (#8302)
- Monsters will now properly run away when using NPC_RUN (fixes #7941)
- Introduced a new function unit_get_walkpath_time that returns the time the unit needs to walk its current walkpath
  * This is now used for NPC_RUN and random walking
- Fixed an issue with mismatching timer warnings when a monster casts NPC_RUN multiple times in row

- Monsters will now always attempt to use non-berserk-state skills once per second (fixes #1700)
  * This completely replaces the "ugly" solution to use a walk_count for idle, walk and chase skills
  * This interval is now a lot more accurate and no longer influenced by external factors such as canact delay
  * This interval is now also used for lazy monsters rather than MIN_MOBTHINKTIME*10 so that MIN_MOBTHINKTIME can be reduced without having to worry about skills being cast more often
  * Angry skills no longer replace the normal attack and now follow the once per second rule; they will always first be attempted at the end of the walk delay after a normal attack
- The special follow-up attack skill monsters use when you move out of their attack range, now is only used when they are in Angry state
  * Also fixed a bug that this was checked every 100ms until the monster used a skill, instead of just once per second

- Monsters now can use chase skills even before they start moving (assuming one second has already passed since last skill check)
- Removed "hack" to make monsters cast chase skills when trapped in icewall
  * This was solved by implementing checking for chase skills before starting to move

- Monsters will now receive an aMotion walk delay after having used a skill
- A monster that could not walk randomly because of walk delay will now walk immediately once the walk delay expires
- Using angry or berserk skills will now set a monster's attack delay
2024-05-08 09:02:48 +02:00
Atemo
bcb34695a5
Updated item DB and mapcache up to may 2 2024 (#8314) 2024-05-07 17:08:29 +02:00
Banana
fd9b475446
Added a command to reload cash shop db (#3257)
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2024-05-07 10:08:55 +02:00
Aleos
8546f9f089
Resolves a potential crash from Howling Mine (#8147)
* Fixes #8146.
* Minor cleanups to ensure the Howling Mine status is active before accessing.
Thanks to @LadyNanuia!
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2024-05-06 19:15:37 -04:00
idk-whoami
ffbbb94080
Corrected script for some item #27 (#8235) 2024-05-06 23:17:25 +02:00
eppc0330
c8cbc2e3a1
Fixed SHC_SHADOW_STAB damage bonus (#8288)
Fixed SHC_SHADOW_STAB damage bonus not being applied during cloaking exceed status.

Remove cloaking bonus: Bonus should be granted on only cloaking exceed status, not cloaking

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2024-05-06 21:22:54 +02:00
Lemongrass3110
a44d9540fb
Fixed clif_wis_message (#8308)
Fixes #8307

Thanks to @mrpond
2024-05-06 02:04:51 +02:00
Singe Horizontal
fd36fc04b2
Fixes clif_viewequip_ack packet length (#8304) 2024-05-05 15:13:06 +02:00
Lemongrass3110
b48948822a
Replaced NULL with nullptr (#8298) 2024-05-03 19:38:13 +02:00
idk-whoami
30928a04e1
Script correction of NPC ammo_boxes (#8275) 2024-05-03 17:50:01 +02:00
Lemongrass3110
3ada0c11be
Converted some banking packets to struct (#8297) 2024-05-03 13:35:20 +02:00
Kanin Temsrisuk
90b2b9cbbf
Fix auto spell list on renewal (#8299)
Follow up to 9440869
2024-05-03 10:12:31 +02:00
Daegaladh
7ddd035442
Fixed clif type conversion warnings (#8294)
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2024-05-03 09:26:02 +02:00
Lemongrass3110
38ca0998fd
Cleaned up 2 size_t warnings in char.cpp (#8296) 2024-05-03 08:17:13 +02:00
Daegaladh
29a3c5263b
Small optimization on change sex (#8281) 2024-05-03 00:46:40 +02:00
Lemongrass3110
827517f8cf
Cleaned up a few TODOs from #7963 (#8254) 2024-05-02 22:44:31 +02:00
idk-whoami
6d2ef66bbb
Script correction of Lux Anima Runestone IDs 22540 (#8258) 2024-05-02 21:35:49 +02:00
Lemongrass3110
7ebf47e31c
Added GCC 12 and 13 to CI (#8293)
Follow up to d949740
2024-05-02 20:37:04 +02:00
Atemo
2ebdd50e08
Fixed warning about favorite item (#8290) 2024-05-02 15:35:00 +02:00
Jittapan Pluemsumran
d949740cd9
Moved battle_fix_damage definition to battle.cpp (#8292)
Fixes #8291
2024-05-02 13:56:20 +02:00
Playtester
16e9d52204
Database Cache Fix, Pre-Re Monster Cleanup (#8289)
- Fixed a problem that caused the DB cache to always be missing the last entry
- Removed renewal monsters from pre-re/mob_db.yml
2024-05-01 20:12:31 +02:00
Playtester
cad5cab976
Coma Rework, Exp Calc Type, Fiber Lock Range (#8287)
- Coma item bonus is no longer an additional effect / status change, but instead replaces the attack damage with setting HP/SP to 1
  * That means Coma attacks will never kill someone, even if the original attack would be lethal
  * When doing a Coma attack, the attack displays the original damage and this is also what counts towards the mob damage log
- Coma is checked for every single event that applies damage, including reflect damage, and for Provoke / Self Provoke
  * Some Renewal-only effects couldn't be tested and were left unchanged (e.g. damage from White Imprison)
- Coma now sets SP to 1 instead of 0
- bComaRace, bWeaponComaRace and bWeaponComaEle won't work on bosses, GVG and battlefield objects
- bComaClass and bWeaponComaClass no longer work on GVG and battlefield objects, but can work on bosses if you specify Class_Boss or Class_All
- Edge is now defined to only work on normal monster
- The default exp_calc_type 0 no longer counts the first attacker twice and instead works like on official servers
- Added a new exp_calc_type 2 that counts the first attacker twice as previously
- The damage logged will now include overkill damage on exp_calc_type 0 and 2, but not count Coma damage (it will count the damage you would have originally dealt instead)
- Fiber Lock now has a range of 9 instead of 7
- Fixes #8279
2024-05-01 08:58:51 +02:00
Playtester
9e959f7fd6
Renewal Offhand Damage, Left-hand Weapon Only Attack (#8285)
- Fixed renewal offhand damage being double as high as it should be
- You will now deal unarmed main hand damage if you equip a weapon only in your left hand
- Your offhand damage will now be the same regardless of whether you have a weapon in the main hand or not
- Fixes #8284
2024-04-27 15:55:41 +02:00
Playtester
0e434aa73b
Grand Cross Damage and Trigger Rework (#8283)
- Grand Cross on target is now considered a full magic attack and no longer triggers drain and similar effects that only work with physical attacks
  * This problem as was introduced in d8a02e9 to fix Coma not working on Grand Cross, but the reason that Coma works on Grand Cross is because it can also trigger on Magic skills (this is already working)
- Grand Cross damage on self is still considered as "physical damage received" for reactive cards (e.g. Alarm Card), but no longer as "magical damage received" (e.g. Platinum Shield does not trigger)
- Grand Cross no longer channels through the whole "weapon attack" code and just calls the necessary parts directly (it only considers ATK, DEF/VIT_DEF and refine)
- Damage parts of Grand Cross can now go below 1 and reduce the other part (e.g. -5 physical damage and 15 magical damage now results in 10 damage instead of 16)
- Implemented the official renewal damage formula for Grand Cross:
   [((ATK+MATK)/2)*RATIO - DEF - VIT_DEF - MDEF - MDEF2]
- Fixed the order of damage processing for Grand Cross for fully accurate damage (there were a lot of rounding issues before)
- The attribute table is no longer applied twice on self damage (still applied twice on target)
- Cards that increase magic damage now work with Grand Cross (e.g. Skeggiold Card)
- Changed Grand Cross range to 9 as that's the official range (you never know when it matters)
- Fixes #1140
2024-04-27 10:22:50 +02:00
Playtester
2963e52fc6
Pre-Re Monster Stats, CSV2YAML Converter, Damage Inaccuracy Fix (#8278)
- Fixed several pre-re monster stats being 1 instead of 0
  * Issue was introduced in 05a17d8 as safety measure to prevent division by 0, but it results in wrong damage numbers
  * Players can get 0 on stats as well, so it's better to put such safety measures at the point where the division takes place
- Minimum stat for monsters is now 0 instead of 1
- Monsters that have 0 Luk after this change can no longer be cursed
- Improved csv2yaml converter to no longer lose the information whether a stat is 0 or 1
- Fixed an issue with converting Race2 in the csv2yaml converter
- Removed arbitrary "+1 MATK" bonus that was probably added due to people not figuring out why the damage was off by 1
- Fixed small damage inaccuracy issue in PVP
- Fixes #8277
2024-04-24 21:04:34 +02:00
Playtester
7c44390606
Fixed Monsters Randomly Targeting on Attack (#8274)
- Fixed immobile monsters targeting random bystanders with their spells even though they already have a target
- Fixed some Malaya Port enemies targeting randomly
- Fixes #8273
2024-04-24 11:46:45 +02:00
Kanin Temsrisuk
45b588c654
Corrected Cylinder Boots [1] item script (#8268) 2024-04-22 22:55:40 +02:00
idk-whoami
5124ddf575
Modes correction of Temple Of Demon God monsters (#8259)
Thanks to @Atemo
2024-04-22 22:54:41 +02:00
Chaos92
0f0bd685d9
Fix typo for macro_register (#8270) 2024-04-22 13:26:31 -04:00
Playtester
f15cb72f94
Monster AI Improvements, Clashing Spiral, Skid Trap, Throw Stone (#8269)
- Added config setting mob_unlock_time that defines how long a monster can be trapped (immobile) before it unlocks its target 
  * Default is 2000ms, which makes Clashing Spiral no longer cause monsters to drop their target, but Ankle Snare still will even at minimum duration 
- Monsters will now promptly use idle skills while trapped (there was a delay before)
- Increased the time the AI is still active when there are no players left on the map from 0ms to 5000ms
  * This fixes an issue that monsters never unlocked their target if it was the last player to leave the map
- Clashing Spiral now has a range of 4 instead of 5
- Skid Trap no longer has a stop effect in pre-re, but it will make monsters unlock their target and become idle
- Skid Trap still stops targets for 3 seconds in renewal, but will no longer activate on bosses
- Throw Stone now deals 30 damage when used by monsters
- Fixes #7846
2024-04-22 08:39:11 +02:00
Playtester
75f518859f
Removed Basedamage Variable from Renewal (#8264)
- As this variable is unused and is very hard to calculate in renewal's structure, it was removed completely from renewal to make the renewal code cleaner
- In pre-re it still works exactly the same as before (used for the EDP and Magnum Break bonus - renewal uses weaponATK for this instead)
- Follow-up to b5e3e5e
2024-04-21 00:08:03 +02:00
munkrej
b5e3e5e69b
Fixed wrong double damage calculation for skills in renewal mode (#8260)
Note by Playtester: In renewal the "battle_calc_skill_base_damage" function adds to the ATK values rather than resetting them, so calling it twice will cause the values to be doubled, so we can't easily use this system for renewal. Will do a follow-up cleanup later.
2024-04-20 15:50:27 +02:00
Playtester
3cbdcf999f
Ankle Snare Status Rework (#8263)
- SC_ANKLE no longer has a natural resistance and minimum duration
- Glacier Fist, Clashing Spiral and Tarot Card of Fate now grant SC_ANKLE instead of SC_STOP (cannot teleport while under SC_ANKLE effect)
- Grand Cross now gives SC_ANKLE to self during the spell duration
- Ankle Snare now has a minimum duration of 3000+30*baselevel milliseconds
- Ankle Snare will no longer activate on bosses in renewal
- Fixed Ankle Snare stopping bosses in pre-renewal even if you didn't enable the config setting for it
- Glacier Fist now has a minimum duration of 1500+15*baselevel milliseconds rather than it being the maximum duration
- You can now define Glacier Fist's effective base duration in the YML file without worrying about it being halved in the source code (it is still getting reduced by Agi)
- Fixed some integer overflow issues
- Fixes #8253
2024-04-20 15:41:24 +02:00
Playtester
cd7341930e
Fixed Capping of Values (#8257)
- Values that are added together will now be correctly capped to their max value
- Status resistance can no longer exceed 100% (made negative success rates become positive)
2024-04-18 17:55:41 +02:00
Playtester
25b98c87db
NPC_INVINCIBLE and Spell Breaker (#8255)
- NPC_INVINCIBLE now grants SC_INVINCIBLE for 300s instead of unlimited
- NPC_INVINCIBLEOFF and MER_INVINCIBLEOFF2 now just end SC_INVINCIBLE instead of having their own status change
- SC_INVINCIBLE now works like plant mode instead of just setting incoming damage to 1
- SC_INVINCIBLE now increases ATKpercent by 100 instead of increasing all damage by 75%
- SC_INVINCIBLE no longer blocks skills
- SC_INVINCIBLE now increases movement speed by 50% instead of 75%
- SC_INVINCIBLE now increases ASPD strongly
- Quagmire can no longer prevent ASPD increase (it still ends various status changes and prevents them)
- If you counter Spell Breaker with Magic Rod you now receive 20% of the caster's MaxSP
- Spell Breaker will now only deal HP damage on level 5
- Spell Breaker now can deal damage to bosses to 10% in pre-re (cannot be reduced by SC_INVINCIBLE unless you enable the "invincible_nodamage" setting)
- Spell Breaker will no longer deal damage if it would be lethal
- Added missing animation of Spell Breaker's damage
- Fixes #8228
2024-04-17 16:28:04 +02:00
Atemo
5df7de2b15
Added missing sd check for clif_skill_fail (#7963)
Fixes #8239 

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2024-04-15 22:38:46 +02:00
Playtester
089c3056cf
Updated/Simplified Damage Bonus Stacking (#8252)
- Freezing Trap, Sand Attack, Gunslinger Mine, Flip Tatami and Excruciating Palm no longer are affected by +% dmg cards
- The skills that ignore +% dmg cards are now exactly those skills that also ignore EDP and the EDP/Magnum Break elemental damage bonus
- Non-players are now always affected by ATKpercent
- Simplified the code accordingly
- Fixes #8250
2024-04-14 19:12:40 +02:00
Lemongrass3110
d05e11aecd
Added .git-blame-ignore-revs file (#8245) 2024-04-14 19:09:36 +02:00
Playtester
310fcd6fa1
Throw skills (Shuriken, Kunai, Coins, Venom Knife) (#8249)
- Throw skills no longer consider arrow attack unless you have a ranged weapon equipped
- Throw Shuriken is no longer modified by +% damage cards
- Throw Shuriken/Kunai no longer ignore flee
- Throw Shuriken's damage bonus is now flee-ignoring and includes skill level(x4), dagger mastery(x3) and arrow attack
- Throw Kunai's damage bonus is now three times arrow attack per hit
- Throw Shuriken/Kunai's final damage is now applied as forced neutral damage
- Fixed range of Throw Coins (9 -> 7)
- Other code improvements
- Fixes #8206
2024-04-14 07:55:31 +02:00
Playtester
81894eeba6
Venom Splasher, Venom Knife (#8248)
- Venom Splasher now ignores +% damage cards, but no longer ignores weapon element
- Venom Splasher now uses the correct durations and cooldowns in pre-re (was already correct in renewal)
- Venom Splasher and Venom Knife now correctly use default poison duration
- Venom Splasher and Venom Knife now have a poison chance of 100%
- Fixes #8221
2024-04-12 21:56:39 +02:00
Playtester
9eff7be9cd
ATKpercent for monsters (#8246)
- Most NPC skills are now influenced by ATKpercent again
- LK_SPIRALPIERCE is now only not influenced by ATKpercent when used by players
- Introduced a new enum for bonus check flags
- Follow-up to 03f07ab
- Fixes #3538
2024-04-11 18:35:14 +02:00
Playtester
82c37ce32d
NPC_POWERUP, NPC_AGIUP (vs. Quagmire) and Dispel (#8243)
- NPC_POWERUP and NPC_AGIUP now grant their own unique status changes
- Duration of NPC_POWERUP is now 5s*level
- Duration of NPC_AGIUP is now 10s*level and max level is back to 10
- Quagmire, Slow Grace and Adoramus now work even when the target used NPC_AGIUP
- NPC_AGIUP will remove Decrease Agi on start but will not prevent it
- NPC_AGIUP can be dispelled, but NPC_POWERUP cannot
- Dispel will now make a monster unlock its target
- Removed custom code to display the NPC_POWERUP effect, it's now correctly linked to EFST_POWERUP
- Removed the ifdef around EXTREMITYFIST2, so we no longer constantly change its ID
- Fixes #8242 
- Fixes #904 
- Fixes #7346
2024-04-10 18:34:49 +02:00
Atemo
c70bc39751
Implemented SC_PERIOD_RECEIVEITEM_2ND and SC_PERIOD_PLUSEXP_2ND (#8197) 2024-04-10 14:01:12 +02:00