summaryrefslogtreecommitdiff
path: root/src/map/battle.c
AgeCommit message (Collapse)AuthorFilesLines
2013-12-04Follow-up to 6e9c385b8fa2fbca97ca23e35f0b8e5dabd13526Haru1-9/+10
- Case-sensitive AegisName and Sprite ID lookups are now optional, controlled by the case_sensitive_aegisnames battle config flag (you can set it to "no" to restore the case insensitive behavior.) - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2013-12-02Fixed Bug 7336 (woo %2)shennetsind1-1/+3
flag was discarding elegible guild mates. Special Thanks to kyeme. http://hercules.ws/board/tracker/issue-7336-gvg-noparty-is-missing/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-28Follow up fdb6de1aa34086fd4d22ae127437727f556cea3cshennetsind1-102/+144
Modified reflect code so that each reflection source can judge whether to apply or not, necessary for mechanics such as item-bonus reflect triggers even on autoguard while reflect shield does not. Re-added that "reflect shield" overhead display which I mistakenly removed in fdb6de1aa34086fd4d22ae127437727f556cea3c. Added code to refrain damage numbers from overlapping in the client, which would render them illegible. Special Thanks to kyeme, Yommy. http://hercules.ws/board/tracker/issue-7792-safety-wall-reflect-bug-body-relocation-error/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-27Fixed Bug 7792shennetsind1-37/+37
Updated damage reflection logic to reflect the official (but weird to say the least) logic, whereas ATK_BLOCK can trigger reflection (e.g. inside safety wall) instead of only ATK_DEF (atk_def = attack connected, yup misleading name). Special Thanks to Yommy, kyeme, Haruna. http://hercules.ws/board/tracker/issue-7792-safety-wall-reflect-bug-body-relocation-error/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-25calc_return_damage cleanup & fixesshennetsind1-89/+91
Fixed skill_id not being passed and thus causing some conditions to never be met, dropped some other conditions that would never be met and thus were just wasting space. Moved clif damage outside so that its only used once and with the overall damage instead of several times aggregating the combined delay. Special Thanks to Haruna. Signed-off-by: shennetsind <ind@henn.et>
2013-11-25Fixed Bug 7827shennetsind1-1/+13
Fixed reflect shield not respecting maps reduction flags. Data tested and confirmed on official server, special Thanks to Yommy and Haruna. http://hercules.ws/board/tracker/issue-7827-reflect-shield-woe-reductions-autoguard/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-19Replaced hardcoded Item IDs with constantsHaru1-10/+10
- This makes it harder to get the item IDs wrong in the code. - Fixes item 'Slot_Coupon' being incorrectly considered a Spell Book due to an oversight (wrong item nameid) when the check was introduced. Signed-off-by: Haru <haru@dotalux.com>
2013-11-19Sanitized and improved several macros through the codeHaru1-18/+32
- Sanitized all potentially unsafe macros (related eA:15259) - Improved some function-like macros to evaluate their argument only once and keep it in a temporary variable. This improves performance in the damage calculation related code. Signed-off-by: Haru <haru@dotalux.com>
2013-11-18Merge pull request #224 from datmumbles/size_changesshennetsind1-9/+9
Corrected size-related constant names (closes #222).
2013-11-18Fixed Bug 7819 - Renewal Elemental Damageshennetsind1-5/+1
Special Thanks to Michieru for gathering official server data and testing. http://hercules.ws/board/tracker/issue-7819-element-tables/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-18Corrected size-related constant names and cleaned up comments (closes #222).Mumbles1-9/+9
2013-11-17Added emblem blank pixels checkHaru1-0/+1
- Made possible thanks to (and using base code by) Ai4rei - eAthena r15263 and add-on patch http://hercules.ws/board/topic/2974-add-on-patch-for-ea-r15263-commit/ - Modified to allow checking for a percentage of transparent pixels rather than full image transparency. - Tweaked to accept some other bmp formats that are currently allowed by the client. - The performance hit from enabling this check is negligible (benchmarks show that scanning an emblem requires about half the time required to decompress it after it's received), but it does exist, as noted in the configuration file. - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2013-11-16Renewal elemental attr fixshennetsind1-2/+5
I'm committing on malufett's behalf. Signed-off-by: shennetsind <ind@henn.et>
2013-11-06Merge pull request #217 from HerculesWS/script-checkershennetsind1-1/+4
Introducing the Hercules Standalone Script Syntax Checker
2013-11-06Modified status_calc_shennetsind1-2/+2
Replaces the previous 'first' flag with a multi-option flag capable of selectively determining calls where the recalculation must not be hold by delayed damage, and therefore must take place immediately. This fixes issues caused by actions that require immediate recalculation e.g. on-level-up max_hp update, also modified @baselevel where status_calc was being called after the heal and not before, causing it not to be fully healed. Special Thanks to Haruna! <3 Signed-off-by: shennetsind <ind@henn.et>
2013-11-05Introducing the Hercules Standalone Script Syntax CheckerHaru1-1/+4
- Added a command line argument '--script-check' to check a script's syntax without running the server (and without requiring a SQL connection). Usage: ./map-server --script-check /path/to/the/script.txt - For convenience, a script-checker bash script is provided, to set the path correctly when called from a different directory. Usage: /path/to/Hercules/script-checker /path/to/the/script/to/check.txt - While the script checker will supposedly work under windows as well, no convenience scripts are currently provided for platforms other than UNIX (feel free to open a pull request with a .bat launcher or whatever you like) - Integration with IDEs or text editors is possible. In fact, I already have a fully functional plugin for vim (through vim-syntastic), and if there's enough interest, I'll publish it. - screenshot: http://d.pr/i/NOBD - If you want an online checker, http://haru.ws/scriptchecker/ is running this code, without modifications and will be kept up to date (without any warranty though.) - Special thanks to Ind, Yommy, Streusel, who helped making this possible, in a way or another.
2013-10-26Changed 'tick' variables to 64 bitHaru1-9/+9
- This fixes an issue with timers that stop working after about 24-49 days when the tick overflows (note that this may happen much earlier than that, and at hard to predict times, on some systems) - Updated the RDTSC help message in the configure script to also warn users about issues with SpeedStep enabled systems. - On Windows, tick() still has a resolution of 10~15ms (or even as low as 100ms on some systems). A TODO comment (thanks, Ai4rei) was added for a follow-up patch, as I want this one to be as small as possible) - Note: on Windows versions earlier than 6.x (Vista, Server 2008), the tick overflow issue is NOT fixed, since they don't support the function used to retrieve a 64 bit tick. This isn't a big issue, since those platforms are already - or going soon to be - out of their extended support period, and it's already advisable to upgrade, for other reasons. If you're the unfortunate user of such a system, it is recommended that you reboot your machine at least once every 49 days for Hercules to work reliably. - Note: To clear some doubts, since I've already been asked, this has absolutely NOTHING to do with 32/64 bit CPUs or OSes. It's all about a variable's size, not the size of registers of your CPU, and your 32bit CPU will be able to handle this just fine. Signed-off-by: Haru <haru@dotalux.com>
2013-10-24Added idletime optionsshennetsind1-0/+1
There have been requests for the extension of the feature, I was reluctant given more options would cause features relying on the feature to be easier to counter (less accurate), with the modification of the feature to employ options the feature is now configurable at the server owners discretion. Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-10-19Fixed Bug#7737malufett1-22/+7
-http://hercules.ws/board/tracker/issue-7737-shadow-form-and-interaction-with-multi-hit-skills/?gopid=20576#entry20576 Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-10-16Fixed Bug#7122malufett1-0/+2
-where 'bLongAtkDef' affects magic in RE. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-10-16Fixed Bug#7374malufett1-1/+8
-Hercules now fully support Monster Transformation. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-10-11Follow up 646f7e2f4ea4bd6b07e66d2949817ebdc18f3484shennetsind1-1/+1
Adjusted range, thanks to haruna realising the feature had been fixed on recent clients. Special Thanks to ossi0110 for testing the feature on multiple 2013 clients, which allowed us to restrict the date range more accurately. Signed-off-by: shennetsind <ind@henn.et>
2013-10-10Added code to disable auction for clients it is no longer stableshennetsind1-0/+10
Regarding http://hercules.ws/board/topic/414-auction-feature-all-screwed-up Signed-off-by: shennetsind <ind@henn.et>
2013-10-10Introducing Bank Supportshennetsind1-0/+10
http://hercules.ws/board/topic/2455-introducing-bank-support/ Thanks to Yommy, Haru! Signed-off-by: shennetsind <ind@henn.et>
2013-10-08Follow up 547b01da35d290b633efaefbbc3af2755d2811e7shennetsind1-1/+1
Thanks to Haruna, ossi0110 Signed-off-by: shennetsind <ind@henn.et>
2013-10-07Fixed Pre-re spiral pierce (when cast by mobs)shennetsind1-4/+4
Partial merge of a4b7719bde71b7fa82a2fcebb9084a3dafb1dc5c Closes #153 Signed-off-by: shennetsind <ind@henn.et>
2013-10-04HPM: Hooking!shennetsind1-12/+14
http://hercules.ws/board/topic/2399-hpm-hooking-now-available/ Signed-off-by: shennetsind <ind@henn.et>
2013-10-02HPM: Map.c Completedshennetsind1-61/+61
Fully Interfaced. Moved missing vars and declarations of interest into the interface, removed duplicate mentions of map within calls to shorten wherever it made sense to. Ladies and Gentleman its my pleasure to announce that with this commit we've revised all of map-server, we've learned a hell lot from this, improved many things on the go and have a number of features to be released thanks to this. *cough* hpm hooking *cough*. Signed-off-by: shennetsind <ind@henn.et>
2013-09-28HPM: pc.c Completedshennetsind1-1/+1
Moved missing vars and declarations of interest into the interface. Signed-off-by: shennetsind <ind@henn.et>
2013-09-28HPM: Party.c Completedshennetsind1-3/+3
Moved missing vars and declarations of interest into the interface, removed duplicate mentions of party within calls to shorten wherever it made sense to, and renamed some members to ease reading. Signed-off-by: shennetsind <ind@henn.et>
2013-09-27HPM: Battle.c Completedshennetsind1-25/+10
Moved missing vars and declarations of interest into the interface Signed-off-by: shennetsind <ind@henn.et>
2013-09-27HPM: Skill.c Completedshennetsind1-3/+3
Moved missing vars and declarations of interest into the interface. Signed-off-by: shennetsind <ind@henn.et>
2013-09-27Renamed iMap interface to mapHaru1-122/+124
Signed-off-by: Haru <haru@dotalux.com>
2013-09-27Renamed iStatus interface to statusHaru1-146/+141
Signed-off-by: Haru <haru@dotalux.com>
2013-09-26Renamed variables that would conflict with a rename of iMap to mapHaru1-82/+76
Note to plugin developers: if you were importing the "map", you'll need to change it to "maplist" Signed-off-by: Haru <haru@dotalux.com>
2013-09-25Renamed local variables that would conflict with a rename of iStatus to statusHaru1-35/+33
Signed-off-by: Haru <haru@dotalux.com>
2013-09-25Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-66/+64
Conflicts: src/map/chrif.c src/map/clif.c src/map/homunculus.c src/map/pet.c src/map/script.c src/map/skill.c src/map/status.c All clear.
2013-09-25Renamed iTimer interface to timer.shennetsind1-29/+29
Also removed duplicate mentions of timer within calls to shorten.
2013-09-25Renamed more forgotten variables during interface conversionsHaru1-66/+64
(related: b9c8f57) Most renames are trivial (just to avoid shadowing global variables, even if they currently did no harm), but there were some cases of partly renamed variables that caused some NULL checks to always pass and who knows what could have been happened when they were too subtle to make the application crash. Also corrected some potentially unsafe macro definitions Signed-off-by: Haru <haru@dotalux.com>
2013-09-17HPM: Battleground.c Interfaceshennetsind1-2/+2
Fully Integrated. Closes #97 Signed-off-by: shennetsind <ind@henn.et>
2013-09-17Fixed Tiger Cannon Damageshennetsind1-1/+1
Issue identified and solved by Michieru, Thanks! Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Path.c Interfaceshennetsind1-3/+3
Fully Integrated Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Unit.c Interfaceshennetsind1-12/+12
Fully Interfaced Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Mob.c Interfaceshennetsind1-11/+11
Fully Interfaced Signed-off-by: shennetsind <ind@henn.et>
2013-09-09Fixed Bug #7694shennetsind1-0/+1
Implemented official guild notice behavior of re-displaying upon teleport, added conf/battle/guild.conf setting to modify this. Special Thanks to kyeme, Frost. http://hercules.ws/board/tracker/issue-7694-guild-notice/ Signed-off-by: shennetsind <ind@henn.et>
2013-09-09Fixed Bug #6626shennetsind1-0/+1
Game client is currently broken on this feature, sending the request when the criteria doesn't match and not doing anything when it matches, I've restored the previous method to make the feature work once again, the message is configurable by conf/messages.conf and whether maxed characters can use it now a setting in conf/battle/player.conf http://hercules.ws/board/tracker/issue-6626-cant-prayer-guardian-angel-super-novice/ Signed-off-by: shennetsind <ind@henn.et>
2013-08-29Follow up@c11390cbffc983b01ac9ee4af3b16ccb533dd94cmalufett1-2/+2
-Fixed bug#7681 -sorry guys got crossed eyed in diffing..XD
2013-08-30Follow up @ cccc5bc9256b196b1f4e9ad881838ad32c8b3424malufett1-1/+3
-Bonus 'bLongAtkRate' is not working properly. RE Updates -Added missing atk bonus of BS_HILTBINDING and removed unnecessary hit bonus of BS_WEAPONRESEARCH. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-08-26Fixed Bug#7584malufett1-129/+128
-Where HW_SOULDRAIN should work only in single target. Fixed Bug#7670 -Where PA_GOSPEL is not working properly. Fixed Bug#7668 -Bonus 'bLongAtkRate' is not working properly. Fixed Bug#7512 -Bonus 'bCritAtkRate' is not working properly. Fixed Bug#7515 -Fixed MO_EXTREMITYFIST animation. -Fixed RE armor/weapon storage tab positioning. -Fixed HW_MAGICPOWER cast time. -Fixed '/item' '/monster' aegis command where it not working properly in some item names or monsters. -Added NC_DISJOINT cast time hidden modifier. -Updated RE ATK for post damage modifier. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-08-22Fixed MSVC warnings on 7f9f6e1b84061a7d393debf37395c8b4a2667db1shennetsind1-20/+22
Special Thanks to KeiKun for bringing them to me. Signed-off-by: shennetsind <ind@henn.et>