summaryrefslogtreecommitdiff
path: root/src/map/battle.h
AgeCommit message (Collapse)AuthorFilesLines
2017-05-09Merge pull request #1699 from Jedzkie/11-SummerCostumeHaru1-0/+2
Implemented Official Summer 2 Costume
2017-05-04Merge pull request #1695 from Jedzkie/7-CashFoodFixHaru1-1/+0
Cash Foods Update
2017-04-29Removal of rare_drop_announce config.Jedzkie1-1/+0
2017-04-25Removal of cashfood_use_interval setting.Jedzkie1-1/+0
2017-04-24Removed hard coded values on @cashmount and setcashmount.Jedzkie1-0/+1
2017-04-20Made prevent_logout effect on log-in optionalJedzkie1-0/+2
kRO does not prevent players from logging out after connecting to its zone servers. Credits to @secretdataz of rAthena
2017-04-19Added oktoberfest_ignorepalette configurationJedzkie1-0/+1
2017-04-19Implemented Official Summer 2 CostumeJedzkie1-0/+1
Added summer2_ignorepalette configuration
2017-04-10Monster Vulture's Eye and Snake's Eye removed.Smokexyz1-0/+2
Original PR #1148 by @SamuelHercules committed on 8 Feb 2016 * Monsters no longer have Vulture's Eye level 10 and Snake's Eye level 10 learned by default * When you tank Cecil Damon from 10-14 cells away, she will no longer use her target skills * Added a configuration with which you can set the level of Vulture's Eye and Snake's Eye that monsters have learned Merged rAthena @ cccd1496f716fe02a3db20780b6e52b3c33391b4 Credit: Playtester
2017-04-08Merge pull request #1663 from Smokexyz/bow-unequip-fixHaru1-0/+2
Unequip arrows when a bow is unequipped. (RE only)
2017-04-04Unequip arrows when a bow is unequipped. (RE only)Smokexyz1-0/+2
Forces the unequipment of arrows when a bow is unequipped. Based on original PR by @Jedzkie in #1079
2017-03-14Fixed MVP exp message issue for clients 2013-12-23cRagexe and newerEmistry Haoyan1-0/+1
- Fixed MVP exp message issue clients 2013-12-23cRagexe and newer. - Gravity remove packet MVP exp message - Credit to https://github.com/rathena/rathena/commit/85749e84b91087960e868e30a7a052b0c0cdce5b
2017-01-27remove hardcoded chat area size from clif.c, add chat_area_size to battleconfgumi1-0/+1
2016-10-22Added max_summoner_parameter:Dastgir Pojee1-0/+2
Default max parameter for summoner is 120.
2016-08-19Ported battle.conf to libconfigHaru1-4/+5
Ported to modern Hercules and cleaned up from Panikon's commits: 44fea0b3cdba6901599265220228ba4359b1f96d, 9cba05bc0811e638bbaaa6cff887d0b2c9872560 Signed-off-by: Haru <haru@dotalux.com>
2016-08-13Added atcommand configEmistry1-0/+2
Based on @Lemongrass3110's commit https://github.com/rathena/rathena/commit/9157318ee9939728b8d332a5668c13d4ad0a6f8b: Added a configuration to enable the atcommands baselevel and joblevel to trigger their respective npc events. This will help you guys with testing your custom scripts that are listening to OnPCBaseLvUpEvent or OnPCJobLvUpEvent. For safety reasons we only trigger the events on level increase.
2016-07-14Fixes warp facing direction.KirieZ1-0/+3
Fixes #1240 Closes #1353 as merged
2016-07-12Extract some code from battle_calc_damage into battle_calc_pc_damage.Andrei Karas1-0/+2
2016-06-24Move ammo check into separate function in battle.cAndrei Karas1-0/+2
2016-01-05Added Support for BodyStyleDastgir1-1/+8
Closes #974 as merged
2015-12-25*Show the katar critical bonus in player status windowAnnieRuru1-0/+1
- this is unofficial behavior, so it has to be in battle config Related to #579 Closes #882 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-25Added Costume/Shadow Atk/Def refine bonus settingDastgir1-0/+3
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-12-13- Fixed #723 now it's possible to retrieve Battle Config Settings from ↵Your Name1-2/+2
plugins into scripts - Fixed Possible Crash when null parse function pointer passed to HPMi->addConf - Now it's possible to use same parse function for all config entries - Now Battle Config entries must have a return function
2015-11-18Merge pull request #837 from AnnieRuru/request_5Haruna1-0/+1
Add new config to allow player vend/chat room nearby hidden npc (#834)
2015-11-14Add option for fix hit after warp.Andrei Karas1-0/+2
Introduced new configuration option: fix_warp_hit_delay_abuse. Official way is to set this option to false.
2015-10-29Add new config to allow player vend/chat room nearby hidden npc (#834)AnnieRuru1-0/+1
credit to Emistry for the idea
2015-09-17Added Configuration in enabling/disabling monster hp bar on new clients.Frost1-0/+2
Closes #558 Signed-off-by: Haru <haru@dotalux.com>
2015-08-15HPM compatibility improvementsHaru1-7/+5
Improved compatibility, portability and standards conformance. - Since it is not possible to portably and reliably re-use the core's symbols in plugins, symbols are no longer exported unless explicitly required, in the UNIX builds. This mimics the Windows behavior and adds HPM compatibility to OSes such as FreeBSD. Credits to Andrei Karas for making this possible. - For convenience, it is no longer necessary to call GET_SYMBOL, since the plugin will automatically import all the available symbols when it's loaded, depending on the included headers. - Plugins are now supposed to include the "common/hercules.h" header before including anything else. Incluing common/HPMi.h, common/cbasetypes.h or conf/core.h is no longer necessary, as those are guaranteed to be automatically included by hercules.h. - HPM API version bumped to 1.1. Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Removed ".." from include directivesHaru1-2/+2
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2015-06-01Replaced some of the hardcoded values with constants (map)Haru1-0/+21
- Replaced several hardcoded values with the appropriate enums. - Added documentation for some hardcoded values that haven't been replaced by enums (yet) - Minor code legibility improvements. Signed-off-by: Haru <haru@dotalux.com>
2015-03-11RENEWAL Updates:malufett1-0/+1
-Fixed card bonuses related to to ATK.(Added 'bRaceTolerance'). Thanks Michi for the support. -Fixed Renewal EDP. Special thanks to Awesome Yommy <3 -Enabled 'display_skill_fail' since '/skillfail' is already available in the client Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2015-02-23Add battle config option check_occupied_cells.Andrei Karas1-0/+1
If set check_occupied_cells to 0 it will allow walk to occupied cells And it heavy reduce CPU usage on walking.
2015-01-12Blocked compilation of plugins that use unavailable functionsHaru1-0/+5
- Rather than failing at runtime, plugins that try to access non-interfaced, unavailable functions or variables, will now show an error at compile-time. Signed-off-by: Haru <haru@dotalux.com>
2015-01-10Extend battle.c for using custom skills from plugins.Andrei Karas1-0/+4
2014-11-17(Bugs 5237 and 7979)GrumpyLittlePanda1-0/+1
- Land Protector now behaves more like on official servers * Land Protector now protects from units being placed on it, no matter if they have splash range or not * Land Protector no longer protects from damage from units not outside Land Protector that splash inside * Meteor Storm no longer shows meteors falling if they would land on Land Protector * Pneuma can no longer be placed next to Land Protector * Safety wall no longer consumes gem if cast on LP. * Also cleaned up the code a bit, so the checks are done where they should be done - Ground skill splash ranges updated to their official values * Lord of Vermilion places units in a 11x11 area with 3x3 splash range each * Storm Gust places units in a 9x9 area with 3x3 splash range each * Heaven's Drive places units in a 5x5 area with no splash range * Venom Dust now has a splash range of 3x3 and is consequently larger than before - Storm Gust's knock-back behavior updated to official * Each of Storm Gust's units will knock back "Away from center" * As units in the south-west are processed first, the knock-back direction will usually be north-east * At the edges the knock-back direction will be "to the outside" * Land Protector and Ganbantein will influence the knock-back behavior strongly, e.g. if Storm Gust has a hole in the middle, it will have a "suck in" effect * Added a config option for those who want the old "random direction" behavior from eAthena
2014-11-16Whitespace cleanup (no code changes)Haru1-80/+81
This includes, and is not limited to: mixed or wrong indentation, excess whitespace (horizontal and vertical), misalignment, trailing spaces. Signed-off-by: Haru <haru@dotalux.com>
2014-11-03HPM Hooks UpdateHercules.ws1-1/+1
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
2014-11-03* No cell stacking implemented (official version)Michieru1-1/+2
- Split config cell_stack_limit into custom_cell_stack_limit (previous feature) and official_cell_stack_limit (see below) - Expanded map_count_oncell by a flag parameter, currently only one flag is supported: only count standing units (needed for official cell stack feature) - Added a new function map_closest_freecell that will return the closest free cell using the same order that official servers use - Monsters will now actively search for a free cell when starting to walk randomly and when unlocking target - When any unit finishes walking (regularly) and is not on a free cell, it will now actively search for a free cell - Step actions will be delayed until a suitable cell was found, they will even be executed when the player walked slightly out of attack range - Monsters will now stop instantly if their target is completely non-existent * This is mainly for looters that had their loot taken * Hide and most other situations still use the configuration setting monster_chase_refresh Mega Thanks to Playtester
2014-11-03Merge branch 'master' of github.com:HerculesWS/Herculesshennetsind1-1/+2
Signed-off-by: shennetsind <ind@henn.et> Conflicts: src/map/battle.c
2014-11-03Introducing 2014-10-22, Roulette and Per-Char Gender!shennetsind1-0/+2
Details in http://hercules.ws/board/topic/7618-2014-10-22-roulette-and-per-char-gender/ Special Thanks to the all-mighty Yommy, Ziu and Haruna! Signed-off-by: shennetsind <ind@henn.et>
2014-10-31- Monster chase range updates (bugreport:7637)Michieru1-1/+2
* Updated monster_chase_range in monster.conf from 1 to 3; I originally thought official value is 1, but doing some in-depth tests myself I realized it's 3 for the most important situations * When a monster cannot issue new "move" commands because it was affected by a status change, but is still moving due to knockback immunity, it will no longer unlock its target and stop * Fixed a bug that always caused the chase path monsters calculated to be 1 cell too short causing them to recalculate their path one cell before their goal every single time - Fixed the direction calculation once again and optimized it at the same time (bugreport:9373) * Now the calculated direction is 100% official, really truly, checked it myself with every single cell and various skills * Added a new function map_calc_dir_xy that allows to check for a direction between two cells without the need of a block_list * map_calc_dir will now just use map_calc_dir_xy to avoid duplicate code * Improved Icewall walk block implementation - Moved the configuration setting "icewall_walk_block" to monster.conf - Split the configuration into mob_icewall_walk_block and boss_icewall_walk_block so it can be configured for bosses separately - Expanded the configuration * If the value is set to 1, monsters on an ice wall cell will behave like trapped monsters, that means they won't be able to move at all, they will use idle skills and if they are attacked while nobody is in their attack range, they will use their rudeattacked skills; this is equal to official behavior of bosses * If the value is set to 2-255, it will behave as before but monsters in the AI loop now use both idle and chase skills, but will no longer use their rudeattacked skills even if attacked from range; this is equal to official behavior of normal monsters * Official values would be "220" for normal monsters (loop until Icewall expiration) and "1" for bosses (behave like trapped monster) on most official servers, but as some official servers have a less exploitable implementation (from looping AI only a limited amount of times up to outright blocking Icewall on all maps with bosses) - Cleaned up the rudeattacked code a little so it's easier to read - Fire Pillar is no longer a trap and can no longer be hit or knocked back in renewal Thanks to Playtester (rathena b43b855d2, 902c920b734cd)
2014-10-18Fix bug:7454Michieru1-0/+1
* Official Icewall implementation and other fixes - Reverted all the icewall-related changes done in SVN r15777 and following as testing shows they aren't official and are actually pretty exploitable (bugreport:7412) - Instead implemented the official icewall characteristic that monsters can only leave an icewall cell to the west or south, the changes include: * The "sight" path check no longer checks for the current cell so standing on an icewall allows you to see/attack into any direction * The path finding will still ignore the current cell as before but the walk routine will not allow to walk east or north while standing on an icewall cell * This leads monsters in the situation where they go through an AI loop not allowing them to escape the icewall (if their target is north or east of them) * Monster in this situation will use idle skills and if they get attacked will use their rudeattacked skills if available, similar to traps like Spiderweb * Added a configuration icewall_walk_block that allows to configure how long a monster should go through the AI loop before the server allows it any movement, this "safety" system is official and seems to equal about 75 AI loops; if you want to disable the whole icewall system so that monsters don't get stuck in icewall at all, just set this to 0 * Here are videos from jRO showing how this system works: http://ragdo.blog56.fc2.com/blog-entry-763.html - Implemented the official calculation for "direction"; now you will be considered horizontal/vertical/diagonally aligned with a target cell in the exact same way as on official servers, this is for example used to determine whether an icewall or a firewall should be horizontal, vertical or diagonal; the only thing that is still unofficial is the default direction (officially always "west"); effectively now there are more situations considered diagonal than before - Further cleanups on the idle skill use code for immobile monsters and monsters near a player but without a target (now skill using will always go via mob_unlocktarget) * This also fixes that monsters switched to idle mode and start to use idle skills one second too late Mega thanks to Playtester (rathena 5540d89cb0e)
2014-10-13* Monster skill use behavior, ranges, position lag fixesMichieru1-1/+1
- Updated monster skill use behavior so monsters use skills the same way and at the same rhythm as official servers (bugreport:009326), the changes include: * Unified the "monster can't move by default" and the "monster trapped" code as it really should behave exactly the same * Fixed a bug that caused the "monster skill use" routine to be called 20 times more often than it should in some situations * When a monster attacks you and you run away from it, the monster will now check if it has a ranged skill on "attack" state before switching to chase state * Monsters will now always do a normal attack before using "attack" state skills * Fixed a bug that caused monsters to switch to idle mode and never use their chase skills when they get hit continuously * Changed default for skillrange_from_weapon from 30 (all but player) to 0 (none); monsters will now use all skills at the skill range and not at their own attack range, if they get tanked from farther away than skill range, they won't use these skills - Updated ranges to work as on official servers (bugreport:009326), the changes include: * Implemented new functions "check_distance_client" and "distance_client", that instead of the server-sided square range system use the circular one that the client uses; these functions should be used for units that send their commands via the client (players mostly) * Applied the new distance algorithm to some player-specific range checks, players will now have a circular attack range that reflects their attack range on the client; this makes it impossible to hack the client for more diagonal range * Removed the arbitrary +1 range bonus at range checks; as monsters now react fluently, they won't need it anymore, that means a monster with for example 4 attack range will now only attack targets within a 9x9 area around it, the moment you step out of this area, the attacks will stop (if the monster can move it will follow you); as for players, the extra cell attack range when on a linear line to the target now is integrated into the distance algorithm, that means a player with attack range 4 can attack from 5 cells away when directly on line with a monster, but no longer diagonally as range is circular for players now * Implemented a new "step action" feature to reflect official chase range behavior; when an attack or skill is used inside the attack range, it will act exactly as now, the skill is used once the signal from the client was received; however, if an attack or skill is used outside the attack range, the player should move into the chase area which is 1 cell inside the attack range border; the client actually sends us where to use the attack / skill from, but previously we just dropped that information the moment an attack request came; now instead of stopping the player instantly on an attack request, the player will continue moving to the target cell and then automatically use the command received earlier (it will be remembered); this change was absolutely necessary as the client sends the attack request slightly before attack range is reached, execution on official servers only takes place on every full cell moved; the new system copies this behavior - Implemented an improved hit-lock system (bugreport:007460), the changes include: * MVPs are no longer immune to being stopped by a hit unless they used Endure * When hitting any unit, it will stop for its "dMotion" interval, exactly at the end of "dMotion" it will continue walking (official behavior); this helps getting more "move" packets to be displayed * The unit that was hit will be immune to being stopped for another "dMotion" interval, this allows to slow down any units by hitting them frequently, but makes it almost impossible to completely stop them forever (depends a lot of ASPD and dMotion value); this does not affect special hit-lock properties (some skills and events should set delay anyway) * The unit that was hit will no longer be "pulled" to the next cell; this caused a lot of position lag, it should be much better now * Random walking, monster target dropping - Implemented official behavior for random walking of monsters (bugreport:9340) * Updated the interval between walks from 3-6 seconds to 4-5 seconds * Added a define MIN_RANDOMWALKTIME that is now used anywhere the interval is applied so it's easier to change * Monsters will no longer attempt to walk to the cell they are currently standing on (note: still requires a proper "no cell stacking" implementation) * Monsters will only target a cell within a 15x15 area around them - Moved the "mob_ai" 0x008 configuration setting to mob_unlocktarget, so it applies to all cases of monsters unlocking targets - Cleaned up the unit_stop_attack and unit_stop_stepaction functions * unit_stop_attack now makes sure that the target is always set to 0, even if no attack timer currently exists * replaced several calls of unit_set_target that set target to 0 with unit_stop_attack, this is important because the attack timer should always be deleted at the same time the target is set to 0 * this also fixes the problem that caused monsters to sometimes drop their target after an attack * Minor monster walk and skill use fixes - Fixed a bug that caused monsters to never use their idle skills even if the define MOB_LAZYSKILLPERC was set * The default value of the define is now 100% for spotted mobs and 0% for non-spotted mobs as on official servers - Monsters now use complex path searching for their random walk, so they can also walk around corners now (OFFICIAL_WALKPATH still applies!) - Fixed spotted monsters using their "walk" skills even if nobody is on the map - Monsters will no longer stop when using "walk" skills (they are supposed to be used while walking) * Monster idle skills, chase, final cleanups - Spotted monsters will now use their idle skills even if no players are on the map * This is official behavior and allows them to metamorph and heal up even if nobody is on the map * I originally had concerns about the performance, but as the dynamic mobs option is enabled by default and set to 5 minutes, monsters will only stay "spotted" for 5 minutes when nobody is on the map anyway, this doesn't cost much extra performance - Increased chase range of monsters by 2 * Tested this thoroughly and the effective chase range is actually 2 cells larger than listed in the "Range3" column * Special thanks to ultramage and Michieru for helping me testing this - Some final cleanups in the unit_stop_attack and unit_stop_stepaction functions * Special thanks to icxbb-xx for pointing these out Super ultra mega thanks to Playtester (rAthena 2c86ee435670168,ebd3dc97bc7e,f3916c1baf1,b1330a4c6,c2377c8f54,464dd4586380)
2014-10-02* Rewrote the hard monster AI. Monsters will now behave a lot closer to ↵Michieru1-0/+1
official servers: * Monsters will now attack immediately when they are chasing a target and it comes into attack range (bugreport:7370) * Monsters will now chase their target during their aDelay, but they still have to wait for aMotion to be able to move again (bugreport:9269) * Monsters will now rethink their chase in a configurable interval (see monster_chase_refresh in monster.conf), official value is once per cell, previously it was once per 3 cells * Monsters will now stop when they rethink their chase and their target is gone (player hides or target loot was picked), regardless of the monster_ai setting (note: if you want the old, stupid behavior, just increase monster_chase_refresh instead) Thanks to Playtester (rathena: cfef8a0088c3)
2014-09-19Fixes damage missing. Snap dodging bug.csnv1-1/+3
- Fixes damage miss on out of range Devotion. Follow-up: 964b47351ef2156423f6e0a68bfd3361283936c1 - Fixes snap dodge bug. Added setting snap_dodge to return to old behavior. Bug report: http://hercules.ws/board/tracker/issue-3510-snap-dodge-bug/
2014-09-11Added option for song timers behaviour. Fixes bug 8265csnv1-0/+1
- Fixes bug 8265: http://hercules.ws/board/tracker/issue-8265-bragis-poem-overlapped-20-seconds-effect/ - Added setting in /conf/battle/skill.conf song_timer_reset: switch between official behaviour (songs don't reset time from prior songs) or eathena (every song resets the timer)
2014-08-28New Optional Configuration for unequipped disabled equipmentsAnnieRuru1-0/+1
http://hercules.ws/board/topic/334-suggestion-for-restricted-equipment-making-a-new-conf-for-it/?p=31003
2014-08-12Battle config option for knockback style when on same tile.Taylor Locke1-0/+1
2014-08-06- Fix 3rd class skills on pre-renewal.Michieru1-1/+2
- When under Mind Break Matk Effect and Mdef reduction should not show on ALT Q(bug:7915) - Plagiarism should not copy New 3rd class skills. Thanks to OmegaRed (bug:8118) - Update Runstone Lux Anima to official formula (bug:8285) - Add official formula for Demonic Fire - Update damage formula for Unlimit, apply Def and Mdef to 1 during the skill and adjust the cooldown to official. (bug:8227) - Flash Combo should not consume hp-sp and the skill not ignore the distance. - Fix a bug with Full Throttle that not consuming sp correctly and adjust the cooldown to official. - All WoE items are inactive outside WoE or PVP - Add bonus3 bSPVanishRate for Vellum Items. - Script Vellum Items. - Add 2 new bonus bSetDefRace and bSetMDefRace for the Vellum Items. (rAthena c046668034) - Fixed Bowling Bash, Brandish Spear, Grand Darkness and Meteor Assault reducing def during cast; the only skill that does this officially is Grand Cross (rAthena 694719048e) - Implemented official Bowling Bash with all its special behaviors including the gutter line * As many servers probably want to remove the gutter line problem, it is configurable; just adjust the bowling_bash_area setting in skill.conf (Bug:4209) - Sonic Blow now has a fixed range of 1, even for monsters; a monster can't use this skill if you tank it from farther away (rAthena a15cee063d)