summaryrefslogtreecommitdiff
path: root/src/map/battle.c
AgeCommit message (Collapse)AuthorFilesLines
2008-02-26- Added new settings for autotrade on battle/misc.conf (you can read ↵zephyrus1-0/+2
descriptions there). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12243 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-14- Added some new config settings: homunculus_autoloot, idle_no_autoloot, ↵zephyrus1-16/+22
max_guild_alliance. - Added a code to activate a Kill Steal protection and the required mapflags. * (I will explain this later on forums). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12203 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-07- Fixed Freezing Trap doing no damage (changed type from misc to weapon)skotlex1-1/+1
- Changed suiton's element to water (apparently fixes not being able to use water-based skills on it) - Fixed Landmine doing no damage (decreased trigger range to 0 to match its splash range) - Fixed the disguise commands using the wrong variable when attempting to disguise as an npc. - Fixed a compilation warning on CELL_CHKNODAMAGE (which is a totally bad-ripoff of basilica cells anyway) - Corrected and optimized npc_remove_map's npc array cleanup (@reloadscripts no longer report 'too many npcs per map and related dangling pointer crashes are fixed) - Removed suspicious, yet totally unused npc_data variable 'n' - HP loss item scripts can no longer kill you. - Corrected the item-drop-rate check to avoid duplicate entries in @whodrops after a @reloadmobdb - Cleaned up and optimized map_addnpc (there are never any gaps in the npc array so npc_num always points to the last valid entry) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12180 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-04- Some code cleanups.zephyrus1-0/+3
- Added new Cell types (NoChat and NoDamage) - Added JobChangeLevel and FreeSKPoints to #stats - Added a Crash protection in clif_send with invalid fd values. - Merged a missing update in TK Mission. - Added script command 'getmapflag' - Merged some new Status Change to Stable. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12175 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-22- Removed hom_setting&02 (ignore skill range) as this was fixed by Gravity ↵skotlex1-4/+0
some time ago. - Moved pc_delinvincibletimer from unit_removemap to unit_free as the previous method has a logic glitch that could cause an on-place event to trigger after the on-left event. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12130 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-21Fixed battle config loading not applying the side-effects of ↵ultramage1-14/+16
battle_adjust_conf() side-effect if an import: operation fails. This is what caused the odd slowdown reported in bugreport:260. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12118 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-20- Fixed a comparison whn doing item searchesskotlex1-2/+3
- Fixed hom_setting&0x2 conflicting with the 'view-range' limit check. - Stone curse now uses status_percent_damage instead of a precalculated value. - Merged the SA_MONOCELL and SA_CLASSCHANGE code. After changing class all the status changes that cannot be triggered on bosses are dispelled. - SA_CLASSCHANGE now uses the bloody branch list to pick a target MVP class. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12098 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-17- Made battle_check_range fail whenever the distance between src/target is ↵skotlex1-1/+5
greater than the viewing range. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12084 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-14Simplified the BL_CAST macro (see topic:166795)ultramage1-9/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12072 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-13- Updated Safety wall so it does not blocks melee magic.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12062 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-11- Implemented the extra damage bonus to TK_JUMPKICK when it is used while ↵skotlex1-1/+3
running (however what the bonus's equation is has been lost to time, so someone else correct it). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12053 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-10- Fixed getmonsterinfo to return "null" when returning the name of a ↵skotlex1-1/+1
non-existing mob instead of -1. - Extended the status_percent_damage define to include a bolean to specify whether or not the target can be killed from it. - Corrected CR_CULTIVATION to fail when the target cell has some BL_CHAR on it already. - Changed the meaning of 'flag' in status_percent_change, to enable differentiation between damage that can kill the object and damage that cannot. - Script command percentheal will no longer kill the player if the specified amount is negative (and not -100). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12051 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-10- Removed 'skill_steal_type' from skill.conf as said config no longer exists.skotlex1-8/+0
- Corrected @slaveclone/@clone behaving as @evilclone when you change the @ symbol. - Modified SC_ARMOR_ELEMENT so it grants elemental resist as if it they were card granted bonuses. - fixed a SA_DISPELL crash when casted on an object with no status changes. - Adjusted the autospell code so that it does not relies on card_id == 0 for subtracting rates. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12041 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06- Fixed Overthrust's timer not being able to be refreshed when recasting it ↵skotlex1-1/+1
(conflict on what val2 should mean) - Changed the code in status_change_timer so that a null pointer no longer causes a crash but prints an error instead. - Corrected clones not copying over a player's skills properly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12027 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-03Changes to reduce the number of map cell typesultramage1-8/+6
- Pneuma now again works via status change (see r3969) - removed unused CELL_SAFETYWALL - removed custom CELL_REGEN, it just increased regen rate (r1192, r1518) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12005 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-29Implemented THE official Steal skill equation and game mechanics (basically ↵ultramage1-1/+0
version from /stable plus a few tweaks) (see topic:116540). Added missing bAddStealRate reference to doc/item_bonus.txt. Removed skill_steal_rate, as it was never used in the code (see r231). Removed skill_steal_type, it's just a one-liner source mod (see r231). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-22Path code cleaning...ultramage1-7/+8
* Added map/path.h, moved path-related function headers to path.h. * Removed the macroed _real() path functions. * Modified some functions to use boolean return values instead of 1/0 or 0/-1. * Modified path_search_long() to allow a NULL output pointer (in which case a temporary local buffer will be used instead). * Removed an unused ->path_half member variable from struct walkpath_data. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11958 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-19- Corected the SC_MIRACLE + Anger code using the wrong skill level to ↵skotlex1-2/+2
calculate damage bonus. - Corrected SC_MIRACLE to trigger Bless of the Stars on all defeated mobs. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11950 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-14Guardian hp handling code removal (see bugreport:342)ultramage1-3/+1
- removed guardian hp from the castle data structure, database, savefiles and various script functions (use upgrade_svn11914.sql) - removed guardian hp calculation and manipulation from the castle manager npc, now the hp values are updated by the server itself (glitch: when castle defense changes, all guardians are healed to full) - tweaked script function 'guardianinfo' to provide some data needed by the manager npc (currently available are hp, maxhp and visibility); also, it doesn't need a player attached to execute anymore The whole thing is experimental, use at your own risk (seems to work though...) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-12* Some preparations for the guild script updateultramage1-2/+2
- cleaned up npc event execution code - cleaned up guild data loading/saving code; to be improved later - removed dummy 'account name' expulsion list management code - removed columns 'rsv1' and 'rsv2' from guild member data - removed columns 'rsv1' 'rsv2' 'rsv3' and 'acc' from guild expulsion data - added upgrade_svn11895.sql for SQL git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11895 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-10- Cleared up npc shop id when warping a player.skotlex1-1/+1
- Added missing range/skill-mask info to reflected damage (fixes autospells not triggering on it) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11880 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-05- Made the struct weapon_atk lhw in status_data a static member rather than ↵skotlex1-6/+6
a pointer as requested by Ultra Mage. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11858 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-05- Fixed a possible crash when the memory manager is disabled and a ↵skotlex1-1/+4
non-respawning object is killed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11857 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-29- Probably fixed splash damage.skotlex1-5/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11841 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-29- Integrated the SG related info of hate_mob and feel_map into a single ↵skotlex1-12/+6
structure (sg_info). - Modified skill_blown and skill_attack so that reflected spells do not cause knockback. - SG Blessing skills now grant the extra experience to everyone when the SG killed the mob. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11840 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-28- Applied the required changes to handle def as a signed char (allows for ↵skotlex1-3/+3
negative def) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11837 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-27- Overpowered some more NPC_EARTHQUAKE as per Gravity retardation.skotlex1-0/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11822 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-22- Changed the status_change structure to use dynamic rather than static ↵skotlex1-135/+127
memory to hold the individual status changes, this should have a noticeable impact on the server's memory consumption. - Had to add a few 'ugly' flags to status_change since now you can't track SC related information while said SC is not active (happens only for Storm Gust, Joint Beat and Magic Power). - Since I am unable to fully test, watch out for any bugs~ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11786 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-17Removed battle_config.error_log as console_silent already handles thisultramage1-8/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11751 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-15Fixed Divine Protection working against players (bugreport:410)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11735 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-12Fixed homunculus skills having unlimited range instead of being capped to ↵ultramage1-1/+1
view_distance+1 (for details see bugreport:376) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11723 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-11- hom_setting&0x2 now disables skill range checks for homunculus. For the ↵skotlex1-0/+3
love of everything that is sinful, please unset this on your server. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11717 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08- Ooops! Adding a missing comma (,).zephyrus1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11700 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08- Added a new setting 'guild_skill_relog_delay' to activate the guild skills ↵zephyrus1-0/+1
delay on Guild Master relog. - The official setting is 'No', but this is an option for game masters. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11699 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-05Corrected the max. allowed skill name length, and optimized code that works ↵ultramage1-3/+3
with skill names according to latest changes. Changed skill db loading code to work similarly to how itemdb/mobdb is loaded (generic file loader + specialized function to process rows). * all skill db files are now checked for inconsistencies the same way. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11659 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-02Removed some long-unneccessary debug messages (from r1105).ultramage1-5/+4
Removed function skill_count_target() because it's a duplicate (see topic:169337). Renamed skill_get_pl to skill_get_ele (because it retrieves element ids). The block_list structure now uses the BL_ enums instead of 'unsigned char'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11640 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-29Fixed a compilation problem and warning (maybe).ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11611 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-28- Corrected the firewall/kaensin knockback code to how it is supposed to be ↵skotlex1-1/+1
done (the element/race check was originally in battle.c, and it was moved to skill.c because of the firewall hits on undead setting, now that it is not needed the code can be changed to how it was back then). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11594 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-26- Removed the config setting firewall_hits_on_undead setting, Firewall and ↵skotlex1-1/+0
kaensin now automatically calculate the number of hits they should do per iteration based on the skill trigger frequency (you may want to raise that delay of 1ms in the db, though) - Cleaned a bit the loop for the Warmth skills. - Added a mising pc_class2idx invocation (fixes a very minor bug when you request max skill lv for a skill in your tree with different max than the skill_db max) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11578 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18Fixed numerous /W4 warnings (and created more :)ultramage1-24/+15
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11514 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18* Further optimization of the skill unit codePlaytester1-0/+1
- removed code for Crimson Fire Formation it now uses the same code as Fire Wall - added same knockback behavior as Fire Wall for Fire Formation - Heat now does 50 hits a second in pvp too - please let me know of any bugs that might appear git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11510 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-16* Venom Splasher fixes according to bugreport:230ultramage1-3/+3
- added passive skillv*30% bonus from Poison React - added official splash damage calculation - damage gets split by the number of targets at range 1, then applied to all targets in range 2 - reverted some very old code - clif_calc_delay() - that was preventing skills from displaying properly, by erroneously assuming that if the target has ddelay 0, it has endure effect activated - TODO: the skill should not consume a gemstone when it fails git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11494 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-16* Fixed a copy-paste mistake in disguise code (from r5833)ultramage1-13/+13
* Commented out clif_skill_damage2() as it is not used anymore * Made Venom Splasher a splash attack that distributes damage * Fixed displaying of several splash skills (see bugreport:238) - added flag SD_PREAMBLE for skills that need the 'magic' packet (fixes Grimtooth / Cart Revolution displaying out of sync) - hacked together Venom Splasher's "no animation for central mob" - hacked in a custom packet to make Dragonfear display semi-correctly git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11491 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-13- Again modified the delayfix function to reflect the current skill delay ↵skotlex1-1/+1
knowledge. Skills with 0 delay use amotion always (regardless of cast times) - Renamed the config default_skill_delay to default_walk_delay as that is the only thing it does now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11446 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-10* Partially removed the usage of 'flags' to direct the execution path in ↵ultramage1-1/+1
skill unit code (some people seem to really like flags >_>) - wiped out r8478 and its multiple levels of useless flag propagation - skill_unit_onlimit (expiration) no longer executes in skill_delunit - added skill_unit_ondelete for proper handling of this event git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11399 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-28* Implemented Summer Outfit care of Zephyrus_CR.L0ne_W0lf1-0/+1
- Increased MAX_GUILDCASTLE in mmo.h to 29 for future implementation of the 12.1 Guild Castles. * Added constants for Summer Outfit and updated the Summer_Event_Suit item script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11321 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-24- Changed Greed Scroll's type to 11 (all itemskill items should use this)skotlex1-1/+1
- Ignore %MDef bonuses now only reduce target's base MDEF, not MDEF2. - Updated the 'skills that cause no damage are blocked now if the skill element is blocked by the target' to only apply if the skill has a status change associated (fixes Resurrection/Heal being blocked). - Reverted the opt_flag2 change in status_change_start (clif_changeoption2) since it never served its purpose. - Added a warning to prevent loading mobs with IDs that belong to the clone range. - Changed MAX_MOB_DB to 3000, updated the definitions of the clone range defines so they are updated automatically with the change of MAX_MOB_DB. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11287 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-21* Corrected skill Charge Attack as described in bugreport:67ultramage1-1/+5
- cast time is between 100% and 300% (+ infinite waiting fixed) - damage is also between 100% and 300% (doesn't increase past range 9) - added knockback that's equal to the distance to target - no longer causes teleportation on WoE grounds - if target runs behind an obstacle, the skill will still teleport you, but will not perform the attack or do knockback - this should be official behavior, so enjoy the weirdness! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11256 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20* Merged the tmpsql branch:FlavioJS1-0/+1
- Abstraction for the sql code (sql.c/h). - New configure script and makefiles. - Restored txt zeny logging code. (r10814) - Rewrote mapserver's sql code - itemdb, mobdb, mapreg, logs. (r10814) - Fixed a precedence issue (&& and ) in char_sql/char.c. (r10833) - Improved db reading code a bit for consistency. (r11077) - Added separate atcommand for mail deletion. (r11077) - Corrected a few messages that said "new" instead of "unread". (r11077) - Broadcast (*) messages now use "*" as the target's name (not ""). (r11077) - Moved StringBuf code from utils.c/h to strlib.c/h. (r11084 r11117) - Some misc login server cleanups (reformatting etc). (r11136) - Corrected/modified some header entries. (r11141 r11147 11148) - Adjusted VS project files. (r11147) - Adjusted the way the sql charserver does item saving. (r11192) - Corrected usage of reserved keyword 'friend' in mmo.h. (r11192) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-14- Gravitional Field is now a MISC type of attack.skotlex1-43/+23
- battle_calc_return_damage now is only for BF_WEAPON attacks, added skill_magic_reflect to check whether a spell is bounced back or not. - Magic reflection now effectively switches the caster/target (after damage has been calculated) - Now when GTB completely blocks a spell, the spell animation will still come off, but with a single bolt and MISS damage. - Removed hom_setting&0x2 since Homunculus can be hit by land spells. - Monster Property now gives a Skill Failed message when attempted on players. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11203 54d463be-8e91-2dee-dedb-b68131a5f0ec