- Unified code for SC_EXTREMITYFIST
* It stops natural SP recovery for 300s in pre-re
* It stops natural SP recovery and recovery from items for 3s and shows icon in renewal
- Removed SC_EXTREMITYFIST2 as it's no longer needed
- Fixed an issue that caused a natural SP regen tick to happen right after using Guillotine Fist
- Fixes#8377
*Removed potentially dangerous map_additemfloor calls
*Added weight/inventory checks for marry atcommand
*Fixed overweight message for box items
*Fixed inventory space check for box items to match official requirement (the total number of the items the box will give you *r min 10, plus 1)
*Fixed inventory space message for box items
*Fixed pet egg creation not deleting the pet data when failed to add it to the inventory
*Fixed pet egg creation dropping the egg on the floor when failed to add it to the inventory
*Fixed pet equipment dropping on the floor when failed to retrieve the item
*Added a battle configuration to prevent removing the pet equipment (and disappear into nothingness) when failed to retrieve the item
*Added missing skill_drop_items_full checks on several skills (official behavior makes the items disappear)
---------
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Standardized initial packet length of dynamic packets to sizeof
Standardized normal casts of packet_buffer to reinterpret_cast
Standardized packet length incrementations to static_cast with decltype
Removed unused function clif_setdisguise
Fixed an issue with string length in clif_scriptmenu
Removed struct keywords
Resolved a few warnings
- 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
* Fixes#8146.
* Minor cleanups to ensure the Howling Mine status is active before accessing.
Thanks to @LadyNanuia!
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
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>
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- Fixed the damage type of various NPC skills
- NPC_*BREATH skills and NPC_VAMPIRE_GIFT will now no longer be influenced by ATKpercent
- Fixed NPC_CRITICALSLASH not working in pre-re
- NPC_KEEPING now lasts 30s
- NPC_BARRIER now lasts 15s
- NPC_DEFENDER now lasts 15s, reduces damage by 87.5% and halves movement speed
- Fixes#3538
- ATKpercent, Spirit Spheres and other mastery bonuses, now all affect the exactly same skills with some exceptions for refine and Star Crumbs, see battle_skill_stacks_masteries_vvs
- EDP and elemental bonus damage now apply to the exact same list of skills, see battle_skill_stacks_edp_element (pre-re)
- Star Crumbs and Spirit Spheres no longer multiply the damage by number of hits twice
- Star Crumbs, Spirit Spheres and similar mastery bonuses that apply even on MISS are now applied after the attribute table but before EDP and elemental bonus damage (pre-re)
- Attribute table can now make damage go negative which is weighted against any of the above mastery bonuses and elemental bonus damage before being capped to 0
- EDP and elemental bonus damage no longer apply to the left hand; removed "basedamage2" as it is no longer needed
- Left-hand damage is now always capped to 0 instead of 1
- Fixed Guillotine Fist ignoring size modifiers
- Fixed inaccuracies in Guillotine Fist's damage due to rounding issues
- Fixed bonus damage from Magnum Break when using Guillotine Fist
- Sand Attack is no longer influenced by EDP
- Rapid Smiting now has a fixed 20% hit bonus (it hits at least to 25%)
- Rapid Smiting no longer deals damage on MISS
- Clashing Spiral damage is no longer influenced by ATKpercent and any mastery except Star Crumbs
- Further code improvements / compiler warning fix
- Fixes#8211
- Fixes#8218
- Fixes#7750
- Fixes#1823
Cleaned up code.
Fixed invalid allocations from the old code.
Changed to struct.
Use correct packet id.
Fixed invalid RENEWAL check instead of PACKETVER.
Thanks to @aleos89
- Fixed Frenzy HP drain interval being 15 instead 10 seconds in renewal (follow-up to 1a004f0)
- The buffs granted when a Super Novice levels up now all last 120 seconds (fixes#8189)
- Assassin Soul Link now doubles stun chance outside GVG/BG (fixes#8195)
- Added missing EDP 25% poison damage bonus (it was already fixed in renewal but applies to pre-re too), that works identical to the 20% fire damage bonus from Magnum Break; both buffs overwrite each other
- The damage on which EDP/Magnum Break is based on now considers defense reduction, passive mastery, refine and true sight
- The EDP/Magnum Break damage bonus now considers spirit sphere damage, but the spirit sphere part is non-elemental; both are added together before they get rounded down
- The EDP/Magnum Break damage bonus can now become negative through attribute table and is dispelled on logout
- The EDP/Magnum Break damage bonus no longer applies when damage is already 0 or lower beforehand
- EDP is now applied after defense, refine and mastery
- Refine bonus now is applied before mastery and between both the damage is capped to 1
- Envenom's fixed damage bonus is now a mastery bonus (was already fixed in renewal but applies to pre-re too) and thus increased by EDP
- Fixed damage interaction between MO_FINGEROFFENSIVE (Throw Spirit Sphere) with Magnum Break, refine and spirit spheres
- Fixed Magnum Break costing HP; it requires HP but does not consume it
- Fixed Sonic Blow's damage formula (300%+50%*skill_lv) and how the bonus from Sonic Acceleration works (+10% to ratio)
- Poison/DPoison now reduce hard DEF vs. monsters by 25%, but the DEF reduction no longer stacks
- Fixed DPoison's duration (60s base duration on all levels)
- Fixed Enchant Deadly Poison duration in Renewal
- Fixed chance of DPoison to be inflicted (3% level 1+2, 4% level 3+4, 5% level 5)
- Fixed negative resistances not increasing the chance of a status change to occur (it's only capped to 0 in renewal)
* Summon Elemental Ardor
- Reduces skill cooldown from 900 seconds to 60 seconds.
- Passive mode : Flame Technique, increases damage bonus of Fire Bolt from 100% to 400%.
* Summon Elemental Diluvio
- Reduces skill cooldown from 900 seconds to 60 seconds.
- Passive mode : Cold Force, increases damage bonus of Cold Bolt from 100% to 400%.
* Summon Elemental Procella
- Reduces skill cooldown from 900 seconds to 60 seconds.
- Passive mode : Grace Breeze, increases damage bonus of Lightning Bolt from 100% to 400%.
* Summon Elemental Terremotus
- Reduces skill cooldown from 900 seconds to 60 seconds.
- Passive mode : Earth Care, increases damage bonus of Earth Spike from 80% to 800%.
* Summon Elemental Serpens
- Reduces skill cooldown from 900 seconds to 60 seconds.
- Passive mode : Deep Poisoning, increases damage bonus of Killing Cloud from 50% to 1500%.
* Conflagration
- Increases global cooldown from 0.5 seconds to 0.7 seconds.
- Increases base damage from 3750%/5750%(spirit)Matk to 6200%/7200%(spirit)Matk based on level 5.
- Reduces the chance of inflicting [blaze] on each hit from 60% to 3%.
* Diamond Storm
- Increases base damage from 8150%/14400%(spirit)Matk to 12500%/20800%(spirit)Matk based on level 5.
- Reduces the chance of inflicting [quench] on each hit from 90% to 5%.
* Lightning Land
- Increases global cooldown from 0.5 seconds to 0.7 seconds.
- Increases base damage from 3750%/5750%(spirit)Matk to 6200%/7200%(spirit)Matk based on level 5.
- Reduces the chance of inflicting [torrent] on each hit from 60% to 3%.
* Terra Drive
- Increases base damage from 8150%/14400%(spirit)Matk to 12500%/20800%(spirit)Matk based on level 5.
- Reduces the chance of inflicting [concretion] on each hit from 90% to 5%.
* Venom Swamp
- Increases global cooldown from 0.5 seconds to 0.7 seconds.
- Increases base damage from 3750%/5750%(spirit)Matk to 6200%/7200%(spirit)Matk based on level 5.
- Reduces the chance of inflicting [severe poison] on each hit from 60% to 3%.
* Elemental Buster
- Reduces AP consumption from 30 to 15.
- Reduces skill cooldown from 5 seconds to 2 seconds.
- Increases base damage from 22500%/24000%(dragon and formless)Matk to 27050%/28550%(dragon and formless)Matk based on level 10.
* The Vigilante at Night
- Increases SP consumption from 65 to 88 based on level 5.
- Reduces area of effect of gatling gun from 13 x 13 cells to 11 x 11 cells based on level 5.
* Only One Bullet
- Increases cooldown from 0.3 seconds to 0.35 seconds.
- Increases base damage from 7550%/8300%Atk to 16200%/18200%Atk based on level 5.
* Spiral Shooting
- Increases base damage from 8500%/9700%Atk to 9700%/15400%Atk per hit based on level 5.
* Magazine for One
- Increases base damage from 1950%/2400%Atk to 2750%/4300%Atk per hit based on level 5.
* Wild Fire
- Increases base damage from 13250%/12500%Atk to 17500%/16500%Atk based on level 5.
* Basic Grenade
- Increases base damage from 5750%Atk to 12000%Atk based on level 5.
* Hasty Fire in the Hole
- Increases base damage from 6750%Atk to 9000%Atk per hit based on level 5.
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
* Gale Storm
- Reduces skill cooldown from 1.2 seconds to 0.7 seconds.
- Increases base damage from 10000%Atk to 13500%Atk based on level 5.
* Crescive Bolt
- Increases base damage from 9400%Atk to 13500%Atk based on level 10.
- Increases damage bonus on standing still from 10% per stack (up to 30% on 3 stacks) to 20% per stack (up to 60% on 3 stacks).
- Changes sound effect.
* Calamity Gale
- Reduces AP consumption from 200 to 125.
- Reduces skill cooldown from 180 seconds to 60 seconds.
* Added missing clif_skill_nodamage for WH_GALESTORM
Thanks to @Haydrich !
* Savage Impact
- Increases base damage from 900%/1100%(Shadow Exceed)Atk to 1050%/1250%(Shadow Exceed)Atk per hit based on level 10.
* Shadow Stab
- Unifies number of hit from 2/3(Cloaking Exceed) hits to 3 hits regardless of Cloaking Exceed buff.
- Increases base damage from 1750%/2000%(Cloaking Exceed)Atk to 2750%/3250%(Cloaking Exceed)Atk per hit based on level 5.
* Eternal Slash
- Attack count no longer be removed by Dispell or Clearance.
- Increases base damage from 1325%/1825%(Shadow Exceed)Atk to 1500%/2100%(Shadow Exceed)Atk per hit based on level 5.
* Moved IG_GRAND_JUDGEMENT with other splash skills in skill_castend_damage_id
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Fixed#8080
Thanks to @Jaikayray
* Abyss Dagger
- Increases cooldown from 0.3 seconds to 0.4 seconds.
- Increases SP consumption from 64 to 76 based on level 5.
- Increases base damage from 2600%Atk to 4600%Atk based on level 5.
* Frenzy Shot
- Increases cooldown from 0.2 seconds to 0.35 seconds.
- Increases SP consumption from 55 to 65 based on level 10.
- Increases number of hit from 1 hit to 2 hits.
- Increases base damage from 4000%Atk to 6150%Atk based on level 10.
- Increases factor weight of CON in skill formula from 5 to 15.
* Deft Stab
- Removes a chance to trigger the skill one more time.
- Increases SP consumption from 62 to 72 based on level 10.
- Increases cooldown from 0.3 seconds to 0.7 seconds.
- Reduces base damage from 5850%Atk to 3750%Atk based on level 10.
- Changes damage logic from 5 split hits to 5 cumulative hits.
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
* Rhythm Shooting
- Increases cooldown from 0.15 seconds to 0.35 seconds.
- Increases base damage from 800%/1400%Atk to 3700%/4550%Atk per hit based on level 5.
- Increases factor weight of CON in skill formula from 3 to 5 (7 on targets marked with sound brand).
Additionally
- The effect from Rhythm Shooting does not remove SC_SOUNDBLEND anymore (written in the skill description)
* Metallic Fury
- Reworks skill to dealing damage to surrounding enemies around the target (9 x 9 cells based on level 5).
- Increases cooldown from 0.3 seconds to 0.4 seconds.
- Increases global cool time from 0.3 seconds to 0.5 seconds.
- No longer remove sound brand debuff from target. (doesn't mention it changelog but it works)
- Increases base damage from 11000%Matk to 13000%/18000%(targets marked with sound brand)Matk based on level 5.
- Increases factor weight of SPL in skill formula (on targets marked with sound brand) from 1.5x of Stage Manner skill level to 2x of Stage Manner skill level.
* Cross Rain
- Reduces cooldown from 4.5 seconds to 2.4 seconds.
- Reduces skill duration from 4.5 seconds to 2.4 seconds based on level 10.
- Increases factor weight of Spear & Sword Mastery skill level in skill formula from 50/100 (Holy Shield) to 100/150 (Holy Shield) based on level 10.
- Increases factor weight of SPL in skill formula from 5 to 7.
- Reduces AP recovery rate from 7 to 4.
* Shield Shooting
- Reworks skill to dealing damage to surrounding enemies within 7 x 7 cells around the target.
- Reduces cast range from 11 cells to 9 cells.
- Increases factor weight of Shield Mastery skill level in skill formula from 75 to 250 based on level 5.
- Increases base damage from 11900%Atk to 14900%Atk based on level 5.
- Increases factor weight of POW in skill formula from 5 to 7.
- Increases factor weight of shield refine rate in skill formula from 4 to 25.
* Rain of Crystal
- Reduces area of effect from 19 x 19 cells to 13 x 13 cells based on level 5.
- Increases SP consumption from 100 to 125 based on level 5.
* Crimson Arrow
- Reduces SP consumption from 94 to 90 based on level 5.
- Increases base damage of linear damage from 1500%Matk to 1750%Matk based on level 5.
- Increases base damage of explosion damage from 3000%Matk to 3500%Matk based on level 5.
* Storm Cannon
- Reduces SP consumption from 94 to 88 based on level 5.
- Increases base damage from 4750%/6250%Matk to 6000%/7500%Matk based on level 5.
* Rock Down
- Reduces SP consumption from 94 to 88 based on level 5.
- Increases base damage from 4750%/6250%Matk to 6000%/7500%Matk based on level 5.
* Frozen Slash
- Increases SP consumption from 96 to 115 based on level 5.
- Increases base damage from 4750%/6650%Matk to 4900%/6800%Matk based on level 5.
* Destructive Hurricane
- Increases cooldown from 2 seconds to 2.5 seconds.
- Increases base damage from 14250%Matk to 14850%Matk based on level 5.
- Reduces damage bonus from Climax level 3 from 200% to 150%.
- Changes damage modifier from Climax level 5 from 50% increasing to 20% reducing.
- Increases SP consumption from 132 to 186 based on level 5.
* Crystal Impact
- Reduces area of effect from 15 x 15 cells to 13 x 13 cells based on level 5.
- Increases SP consumption from 132 to 186 based on level 5.
- Reduces area of effect bonus from Climax level 5 from entire screen to 15 x 15 cells.
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
* Savage Impact
- Reduces cooldown from 1 second to 0.7 seconds.
- Increases area of effect from 5 x 5 cells to 7 x 7 cells based on level 10.
- Applies AP recovery rate by 2.
* Shadow Stab
- The skill will deal damage for 2 hits.
- While under Cloaking Exceed buff, increases number of hit to 3 hits with higher damage per hit.
- Increases factor weight of POW in skill formula while under Cloaking Exceed buff from 5 to 7.
- Increases base damage from 1500%Atk to 1750%/2000%Atk per hit based on level 5.
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>