summaryrefslogtreecommitdiff
path: root/src/map/unit.c
AgeCommit message (Collapse)AuthorFilesLines
2006-08-24- Added setting clear_skills_on_warp to specify when a character's ↵skotlex1-1/+5
land-based skills are deleted when the caster changes maps. Defaults to all types. - Should have fixed Brandish Spear not passing the flag to skill_attack, causing it to do miserable damage. - Warp Portal will no longer be removed when caster steps through it (this is left to the new clear_skills_on_warp setting) - Cleaned up status_percent_change to switch equations when the target has high hp to prevent overflows, also it will directly take hp/maxhp when a rate of 100 or higher is passed to prevent calculations. - Traps and Land Elemental fields are no longer automatically removed on map change (handled now by clear_skills_on_warp) - traps_setting &2 no longer does anything (handled now by blah blah) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8469 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-21- Cleaned up some more the regen_data structure, so that skill/sitting-skill ↵skotlex1-6/+0
related data is optional (since only players have it). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-20- Gravitation now only blocks the caster from using potions.skotlex1-15/+16
- Corrected Madness Canceller not letting you walk while the effect lasts. - Splitted yet again ASC_BREAKER into a two-part attack. This time the int-based damage is a MISC type attack, and gets reduced by skills as such. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8392 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-20- Added clif_skill_fail for homunc to skill_castend_id & skill_castend_pos ↵toms1-2/+2
('skill has failed' will may be appear 2 times) - Fixed homunc skill 8016 not considered as homunc skill git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8386 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-19Fixed a possible sigsegv when deleting lif under Mental Changetoms1-1/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8367 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-18- Fixed HLIF_HEAL healing the homunc instead of the mastertoms1-0/+1
- Fixed HLIF_AVOID not increasing walk speed of master git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8355 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-18- Made HLIF_HEAL a self skill that auto-selects target to caster's master.skotlex1-0/+1
- Implemented SC_BLOODLUST and SC_CHANGE, cleaned up HLIF_CHANGE - Applied a correction to HVAN_EXPLOSION - Fixed Homun ASPD calculation being able to underflow and give you min speed. - Added monster_ai&128 to make aggressive mobs ignore that behaviour of always picking Homun targets above player targets regardless of who is closer. - Fixed homun info packet being unable to display HP/SP correctly once the values are above 32k. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8349 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-18- Added guild_aura (skill.conf) setting so you can specify when it works and ↵skotlex1-1/+5
if it works on the guild-master itself. Defaults to working all the time on everyone except GM. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8342 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-18- Little code cleanuptoms1-3/+3
- Cleaned merc_hom_evolution to avoid free'ing/realloc'ing - Fixed "args of aFree is freed pointer" on Homunc deletion git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8341 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-18- Changed unit_free so that it receives which cleartype should be used when ↵skotlex1-5/+5
the character is still on a map. Used this on status_damage so that mobs that do not respawn when killed will properly display the death animation. - Should have fixed the signed/unsigned comparison warnings in the main regen function. - Fixed Energy Coat consuming 10x less SP per hit than it should. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8339 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-18- Applied use of structure regen_data for a unified regen module. Natural ↵skotlex1-1/+0
and skill-heal is handled by this structure, while sitting-skill-heal is still player dependant (mostly because the other object types can't sit) - Added SCB_REGEN constant to identify status changes which alter regeneration - Modified SC_REGENERATION so that if val4 is set, the status actually blocks regen rather than increase it, this is what now Frenzy uses instead of "canregen_tick" - Cleaned up the status calc code for homun by moving it from status_calc_bl_sub_homun to status_calc_homun (where it should had always been) - Moved the Fleet watk code to status_calc_watk where it belongs. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8334 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-16- @produce now can make any kind of equipmentskotlex1-9/+0
- Fixed a warning on the mob_ai - Made HLIF_AVOID and HAMI_DEFENCE cause the status change on both caster and target. - AM_REST shouldn't be checking for a range now (since it's a self skill) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8318 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-15- Moved the deletion of timers from unit_remove_map to the homun ↵skotlex1-2/+0
vaporize/dead routines since unit_remove_map is also invoked whenever you warp or change maps. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8309 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-15Homunc Timers should be disabled when the homunc is vaporized or dead an ↵toms1-0/+2
re-enabled on call/resu git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8305 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-15- Cleaned up some of the pet related @/# commands, same for some script ↵skotlex1-13/+9
commands. - Moved s_pet structure from map_session_data to pet_data, this enabled the removal of a few redundant values in the pet_data structure (name, class, equip) - Pet offensive skills who's inf value is self will be casted on the pet now (for stuff like Grand Cross) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8301 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-15Fixed SIGSEGV with homunc savetoms1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8288 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-14- Sacrifice no longer shows damage to self.skotlex1-30/+31
- When Asura fails, the skill display will still come off. - Cleaned up AM_CALLHOMUN so that the required item is specified on skill_require_db - Cleaned up function merc_call_homun and added function merc_hom_vaporize to handle the respective cases. - Cleaned up a bit unit_remove_map/unit_free on regards to homun. it will display the /sob emotion when the homun dies due to low intimacy. Moved removal of timers and all that to unit_free - Cleaned up function merc_hom_dead - Simplified lots of code around by using the new merc functions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8279 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-10Code cleanup on homunc, they stay in memory until player disconnect or ↵toms1-10/+24
homunc destruction git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8241 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-08- Fixed yet again AS_SPLASHER doing full damage on all characters. Now you ↵skotlex1-0/+10
can use the NK split damage value in the skill_db if you want damage divided by the amount of targets rather than by 2. - Fixed crash on the battle_drain functions. - Cleaned up HAMI_CASTLE, HLIF_AVOID, HAMI_DEFENCE so that it's usable by other types of objects other than Homunculus. - Cleaned up the Asura Strike code so that the SP/Spheres/States is not consumed when the skill fails due to Fog of Wall. - When a negative delay for a skill is specified, this delay is now added on top of the character's amotion rather than adelay - Modified main.sql to make the guild table allow NULL on the emblem data. - Added file conf-tmpl/Changelog.txt git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8185 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-07- Cleaned up the Asura code so that when the skill fails your ↵skotlex1-0/+2
SP/Spheres/Fury are all taken away always, as well as moving you next to the target (as long as the target still exists within a reachable path from your position) - SC_GUILDAURA is now removed on logout. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8175 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-04- Removed settings enemy_critical_rate, homun_critical_rate. Added settings ↵skotlex1-1/+3
enable_critical (defaults to specify only players), mob_critical_rate and critical_rate. The last applies to all non-mobs and non-players (battle/battle.conf) - Removed settings mob_npc_warp, mob_warpportal. Replaced with setting mob_warp which specifies which types of warp can a mob step into (battle/monster.conf) - Updated status_calc_misc so that it also handles the BL_PC case, removed redundant info from status_calc_pc, and moving the SNovice Max Hp bonus to status_base_pc_maxhp git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8135 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-03- GAHH, I am sick tired of typing TBL_HOMUNCULUS/BL_HOMUNCULUS all over the ↵skotlex1-2/+2
place. The idea is that the TBL* versions are supposed to be easier to use than the standard structure definition, but using TBL_HOMUNCULUS as an alias to struct homun_data kinda beats the purpose! Renamed them all to TBL_HOM/BL_HOM. - Fixed using the right-hand weapon's size modifiers regardless of which weapon was being used. - Simplified the ignore-size check by making the Weapon Perfection check be done when specifying the flag, also moved the size-fix property of riding spear-knights to status_calc_pc. - Removed variable hd from status_calc_bl as it's not needed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8112 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-02- Added a check in the walking code when triggering skills. ↵skotlex1-3/+8
NPC_SELFDESTRUCTION will no longer cancel walking, it will instead resend the walk packet, this effectively causes the mob to start walking (clientside) while the cast-bar is showing. - Updated the mob skills so that the marine sphere casts self-destruction with 3 second cast after it starts walking. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8079 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-02- Rewrote pc_payzeny to not use doubles, it may more accurately prevent ↵skotlex1-2/+3
charging a player more zeny than they can withhold. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8072 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-02- Recoded the GuildAura code to use val3 & val4, allowing much greater stat ↵skotlex1-7/+7
bonuses (in case someone wants to get Guild Skill level 20 or something crazy like that) - Fixed compilation error... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8053 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-02- Updated battle_check_target so that all alchemist summoned mobs can be ↵skotlex1-1/+1
target by everyone. - Cleaned up skill_check_condition_mob_master_sub, it will now count both total number of summoned mobs and amount that belong to the same type. - Corrected AM_CANNIBALIZE so it will fail if you already have plants of another type out. - Using NPC_SELFDESTRUCTION no longer will make the caster stop walking. - Removed SI_GUILDAURA, and replaced it with SI_LANDENDOW, now Volcano/Deluge/V. Gale will get that funky icon instead. - Changed clif_hominfo to receive both sd and hd as parameters - Some redundancy cleaning in mercenary.c - Moved updating of sd->mercenary.hp from merc_damage to pc_makesavestatus. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8048 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-02- Fixed NPC_SELFDESTRUCTION damaging yourself, causing the source to be ↵skotlex1-5/+2
knocked back, as well as making others in the splash damage not receive any damage if they are hurt after the caster. - Fixed NPC_RUN not setting the mob's state to MSS_WALK (normally not set by the mob ai) - unit_walktoxy flag&2 setting will now also ignore unit_can_move, for a forced walk. - Adjusted NPC_RUN level of Marine Spheres (5->7 cells) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8044 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-01- Made Deluge/volcano/v. gale be castable on top of each other againskotlex1-3/+6
- Modified unit_walktoxy and NPC_RUN to enable running even when the caster does not has the MD_CANMOVE bit on. - PF_MINDBREAKER will now silently fail if you try to use it on someone who already has the status active. - Cleaned up yet again skill_landprotector, now new cells of Deluge/Volcano/V.Gale will delete previous cells when they are recasted on top of each other. - Summoned Marine Spheres no longer get the MD_CANMOVE bit. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8039 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-01- Modified Self Destruction, so that Marine Spheres in non-versus maps will ↵skotlex1-1/+26
hurt only enemies, while in all other situations this skill will hurt everyone around them. - Expanded setting debuff_on_logout so that &1 removes negative buffs and &2 removes positive buffs. - Food status boosts will no longer end on death, but they will end when you respawn or logout. - Added battle config file status.conf, moved some settings from skill.conf and battle.conf to it since they are entirely Status-Change related. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8033 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-31Merged mpeg's fix on ninja skillstoms1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8012 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-29- Some small bug fixes discovered while merging.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7961 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-27- Changed npc_click declaration to receive an npc structure rather than a ↵skotlex1-1/+1
generic block-list one. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7925 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-21- Corrected the @follow timer not being deleted on logout.skotlex1-0/+3
- Applied the homunculus code fixes provided by Toms. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7820 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-21- Now when the char-txt server does not finds a requested party, it will ↵skotlex1-1/+3
clear out said party id of all characters (will help prevent massive spamming/overhead when for some reason the party file needs to be deleted). - Combo skills (inf = self, inf2 = no target self) no longer check range if you use them while your attack-timer is still active. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7806 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-20- Corrected Cloaking level 1-2 not letting you move across walls.skotlex1-3/+4
- updated cloaking code so that when you set "enable cloaking without walls", the code will consider you as "always next to a wall", thus you get the wall-speed bonus always. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7778 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18- Fixed a compile warning. Some minor format cleanups.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7733 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18- Corrected Venom splasher's splash damageskotlex1-1/+2
- You now can't move/attack/use-skills when using Cloaking of a level less than 3 - Fixed compilation of mercenary.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7729 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18- Added a proper check to make aggressive mobs never override homun targets ↵skotlex1-8/+9
regardless of distance. - Removed a bunch of homun-related variables that are not needed at all. The alive condition is removed, now the code checks for the hp value to know if the homun is alive or not. - Cleaned up a bit the skill-id function, homun skill checks (such as delay and skill-lv learned) should be correct now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7727 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-17Orn's and Albator's Homunculus system, finally, YAY!!DracoRPG1-1/+23
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-12- Resurrection will now silently fail when used on non-undead + not-dead ↵skotlex1-1/+2
characters. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7638 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-11- Added a clif_fixpos packet when a mob cancels walking due to using a ↵skotlex1-3/+6
idle/walk/chase skill. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7615 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-11- Fixed the subele bonus (elemental reduction) being applied to the element ↵skotlex1-1/+3
of the attacker instead of the element of the attack. - mob skills now won't trigger on unit_stopwalking calls. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7614 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-11- Corrected Frost Nova's splash range and Land Protector's cast range. ↵skotlex1-1/+0
Thanks to Haplo. - Fixed Beast Strafing not having inf2 = 512 (to make it a target-auto-select skill) - Fixed the duration of Land Protector, removed unusued time2 value from their entries in skill_cast_db. Thanks to Haplo. - Corrected Warp Portal being unable to warp people who are standing on it on the moment it triggers. - Fixed @follow stopping the moment you are warped. - Fixed pc_additem messing with the equip field of the passed item data. Fixes the famous "equip stuff on your arrow slot" bug. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7607 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-08- Fixed mobinfo displaying exp as signed ints rather than unsigned.skotlex1-1/+1
- Added status_check_visibility to check if an object is within range of view of another. Nothing more, nothing less. It's used by unit movement to check whether you can continue chasing your target or not when the "chase target" directive is given. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7582 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-03- Warmth will dispel when warping now (or else the effect is left on the ground)skotlex1-0/+2
- Fixed reading of the refine_db not working right when MAX_REFINE is increased from 10. - Some more cleaning to the implementation of Abracadabra git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7456 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-30- Moved item group enumeration from itemdb.h to map.hskotlex1-0/+1
- Cleanup in itemheal related code, fixed the item heal group bonus not working on Groups beyond 7. - Fixed pet's loot not being moved to your inventory on logout. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7419 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-28- Cleaned up a bit the code for @itemskotlex1-6/+7
- Fixed character/storage being sent to be saved TWICE when you logged out while the storage is opened. - Added save_settings map config. Specifies after which events do characters get saved (defaults to all): 1 - Trade successful, 2 - Vending transaction, 4 - Closing storage/guild storage, 8 - hatching a pet. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7375 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-23- Standarized PF_MEMORIZE to be 50% cast time on all skills (instead of -50% ↵skotlex1-12/+0
for targetted skills and -66% for ground skills >.>) - Cleared up the comment on what item_check does and how it works. - Changed the pointer dummy_item to a normal struct variable. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7316 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-20- Corrected the line terminator setting on the unit.* files as pointed out ↵skotlex1-1735/+1735
by Irmin git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7268 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-20- Updated skill_require_db to place the Zeny requirements of ZenyNage and Fling.skotlex1-1/+2
- Fixed crash when non-players use ZenyNage. Added the correct Zeny check in skill_check_condition, fixed the skill so that it's damage is based on whatever zeny is specified in skill_require_db. - Can-act delay will not be reset when warping now. - Fixed Quagmire not altering walking-speed. - Silence now blocks skills both on begin/end casting. - Updated status_calc_bl so that when walking speed changes, the character is made to rewalk so that the new speed takes effect inmediately. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7264 54d463be-8e91-2dee-dedb-b68131a5f0ec