summaryrefslogtreecommitdiff
path: root/src/map/mob.c
AgeCommit message (Collapse)AuthorFilesLines
2006-07-29- Some small bug fixes discovered while merging.skotlex1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7961 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-27- Removed a redeclared variable i in the parsing of the fame list (char-txt ↵skotlex1-1/+0
server) which seems to be the cause of the random memory corruptions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-27* Fix homunc & code cleanup [Toms] toms1-1/+4
- Timer problems on delete_timer - Intimacy problem (overflow & new values) - Homunc deleted if intimacy < 0 - base exp is now given to master - Homunc sometimes not saved git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7913 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-27- Applied the necessary changes to make @partyoption reflect it's changes on ↵skotlex1-2/+2
the alt+p window. - Some code indentation cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7905 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-26- Modified party_item_share_type config setting so that using 1 disables ↵skotlex1-1/+1
item-sharing from non-mob loot (player dropped items or pet loot) and 2 enables round-robin instead of random sharing. Using 3 obviously is enabling both 1 and 2. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7898 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-21- Added a check to prevent Blind from ending while standing on a fog of wall.skotlex1-10/+15
- The mob Slave ai will be executed now even when the slave has a target. This will allow for "instant" warping to the master when it changes maps or teleports. if the slave has a target already, it won't unlock it and chase back to the master or anything like that. - Removed a couple of checks that prevents item ids above 20000. However, remember that the max id is still ~32k or the client is the one who's gonna crash! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7799 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-19- Oops, should have fixed sql compilation of mob.cskotlex1-7/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7753 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-19- Fixed the inf code update breakage which was blocking all offensive skills.skotlex1-7/+1
- Added battle setting homun_critical_rate (defaults to 0) - Removed enemy_str/pet_str/enemy_perfect_flee and replaced them with - enable_perfect_flee which specifies which objects can have perfect flee and enable_baseatk which specifies which objects can have a base attack value (both in battle.conf) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7752 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-19- Corrected Trim chars to block 'enter', as explained by the Ultra mage.skotlex1-0/+6
- When the client passes account version 0, the login server will set it to 1 now. - Corrected the HP bar scaling when HP is above Short Max. It should display fine for any HP value now. - Added a check when the mob's adelay is shorter than the amotion, in which case the adelay will be changed to the amotion value. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7742 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18- Fixed a compile warning. Some minor format cleanups.skotlex1-9/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7733 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18- Added a proper check to make aggressive mobs never override homun targets ↵skotlex1-2/+4
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-17- Should have fixed the Cart Termination damage code to be scaled correctly ↵skotlex1-4/+0
when you change the max cart weight. Thanks to The Ultra Mage for the error clarification. - Implemented Grandcross weird property where if there's noone on the path it'll hit twice for the skill's reported damage, and when there is (or you cant knockback the target) it'll do a splash attack that hits twice for 500% to all affected targets. - Some cleaning of the combo code. TK Rankers will now get their combo-time extended each time they trigger a kick, enabling them to do "unlimited combos". - Modified the autosave function to use a sweep across the player db instead of across connected clients. This will cause non-connected players (like autotraders) to also be saved on a regular interval, may help with possible data-loss from said characters on unclean shutdowns. - Added function map_foreachpc - Removed the code that forces aggressive mobs to go after a Homun instead of their master (no reason why there should be such a condition). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7721 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-17Orn's and Albator's Homunculus system, finally, YAY!!DracoRPG1-18/+53
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-11- Fixed mob.c compilation...skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7618 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-11- Coded @reset.skotlex1-14/+14
- Reenabled @changesex - Added function pet_create_egg which handles creating pet eggs correctly (when passed item id is indeed a valid petegg). Applied this on @createitem and getitem. - Cleaned up code of @item - Added define UNKNOWN_ITEM_ID (512 = apple) - Added IT_* enumation item_Types to identify said data from items. - Cleaned up the itemdb_isequip functions. itemdb_isequip will now return if the item is equipable by players, itemdb_isstackable returns if the item can be stacked, and itemdb_isidentified returns if the item should drop identified. - Added defines CARD0_PET/CARD0_FORGE/CARD0_CREATED to identify if a given item has "invalid" cards, added define function itemdb_isspecial to simplify this check. - Removed itemdb.c considering item ids above 20000 as invalid. - Cleaned up script commands getitem and card-counting related ones. - Cleaned up a bit more pc_isequip git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-29* [Fixed] Lance1-9/+12
- Scripting system screwing up script position after mixing timers with menus. - NPC attached AI mobs display as alive when dead. - View data not updating after buildin_unitdeadsit. [Improved] - NPCE_LOADMAP to execute after all (area) objects are sent to the player. - Simplified scripting system. sd will now use pointer to the script state itself. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7388 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-28- Fixed a compile warning in the login txt/sql server.skotlex1-2/+2
- Changed the mob drop rate adjust function to receive a signed int argument. Probably will fix those drops with 0% becoming 100% git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7371 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-24* [Optimized]: Lance1-5/+9
- Setting of variables with defined scope in some frequently executed script events. * [Added]: - Missing script_require_trigger flags for some power hungry events. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7325 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-23- Updated BD_INTOABYSS's unit flag to not affect mobs.skotlex1-6/+12
- Changed setting for skill_nocast flag 16. It is no longer a "pk-mode map" setting, it's now a clone-forbidden skill. That is, skills with the flag 16 will never be copied by clones. If you use a PK-mode server, use flag 2 now to forbid skills from common maps. - Default skills from not being cloned are Magnus Exorcism and Turn Undead. - The map search free cell will now use the size of the map # of tries before giving up when the spawn area is the whole map. Added a check to inmediately give up when the number of spawn retries has reached the max specified (no_spawn_onplayer = 100). - Cleaned up a bit the clone code to account for the unit flags UF_NOPC/UF_NOMOB when the skill is not ground-based (accounts for self skill that causes a ground-tile to be placed, like Dances). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7315 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22- Fixed the compile error in mob.cskotlex1-8/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7293 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22* [Removed]: Lance1-6/+8
- Redundant mob name copying. (it's already copied in mob_parse_dataset) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7292 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-19- Moved back Soul Drain code from mob_dead to ↵skotlex1-8/+0
skill_counter_additional_effect. Now we are back to where the skill animation does not shows, but you DO get SP T.T' (fixing this is turning out so difficult...) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7253 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-18- Fix for #102547Lance1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7235 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-18* [Removed]: Lance1-1/+0
- Large part of scripted mob control commands are removed. - Large part of scripted player control commands are removed. - Scripted mob slaves changing master ID. [Added]: - Unit control commands. - CALLBACK_NPCCLICK for scripted mobs, added this to db/const.txt too. - Macro RECURSIVE_MASTER_CHECK in battle.c [Modified]: - buildin_skilluseid and buildin_skillusepos -> buildin_unitskilluseid and buildin_unitskillusepos. - md->callback_flag to short (double word). [Lance] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7233 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-17* [Added]: Lance1-4/+4
- buildin_checkcell, buildin_mobwarp, buildin_pcattack. * [Improved]: - buildin_skilluseid and buildin_skillusepos to accept a few more arguments. - mob_script_callback to return sucess value. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7219 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16- Removed unused variable aspd_rate in map_session_data.skotlex1-2/+2
- Modified aspd_rate in status_data to hold aspd change on a base of 1000 = 100% rather than 100 = 100%. All status changes that affect aspd have been updated. Study and Single Action should now correctly give +0.5% aspd per level. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7213 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16- Whoops, fixed compilation issue on mob_dead.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7210 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16- Removed db_tables.sql as it's no longer used.skotlex1-0/+5
- the mvp_sd is removed when the mob is the emperium and there's no killer/exp-awarded (assumed killed by script), this prevents the on-kill event from triggering and giving the castle to whoever damaged the most the emperium without destroying it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7208 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16- Removed return from CALLBACK_ASSISTLance1-3/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7205 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7204 ↵Lance1-0/+1
54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16* [Improved]: Lance1-39/+29
- Cleaned up Custom Mob Script Callback codes. Looks much better now :B. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7202 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-10- Added structure party_data and party_member_data to the map server to hold ↵skotlex1-2/+2
party-specific required information about parties including Monk/TK/SG/SN states and party member count. - party Hp updates are no longer done each time the Hp is modified, but together with the party xy timer. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7083 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-08git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7045 ↵Lance1-1/+4
54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07- Fixed the mob state not being set to Berserk/Angry correctly after the mob ↵skotlex1-0/+4
reaches the target's location. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7040 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07- Added config setting mob_npc_warp, when set to yes, enables mobs to be ↵skotlex1-1/+24
warped between maps when stepping on a npc-warp. - Added monster_ai setting &64, when enabled makes a mob run to any nearby npc-warp when their current target has switched maps. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7039 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07- Added pc_calcexp to calculate individual exp bonuses acquired from exp's ↵skotlex1-20/+4
source (race bonus cards, SG Exp skills, pk-mode higher level exp) - pc_gain_exp now also receives the source of the exp, when said source exists, bonuses are applicated as needed. - Added status_kill when capturing a mob, should take care of the mob not respawning after caputed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7037 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07- Moved souldrain code from skill_counter_additional_effect to mob_dead. It ↵skotlex1-0/+8
should display the skill animation correctly now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7033 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07- Solved an ambiguous if in mob_dead.skotlex1-1/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7026 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07* [Improved]:Lance1-3/+7
- mob_dead not to remove script controlled monsters with player sprites. (can be removed later using removemob command, it can be resurrected too :D) * [Added]: - buildin_mobdeadsit :D git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7024 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07* [Fixed]:Lance1-1/+2
- temp++ gets issued before if(mvp_damage<(unsigned int)md->dmglog[i].dmg) in mob_damage. Thanks to seahorsix. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7023 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-06- Some cleaning of mob_damage, added a default case when attacked to ↵skotlex1-13/+16
retaliate to whatever attacked the mob. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7017 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-06- The monsters can level up setting will not take effect when the mob's ↵skotlex1-2/+2
level is LESS than their db counter-part (should prevent under-leveling causing underflows and semi-immortal mobs) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7005 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-06- cleaned up status_check_skilluse some to use status_data variables.skotlex1-9/+8
- Fixed mvp-exp calculations being messed up with more than one attacker. - Changed the mob exp race bonus so that each player gets their own bonus, rather than the killer's bonus applying to everyone. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05- Fixed a crash when using SL_SMA and the "combo" ain't ready.skotlex1-1/+2
- Hopefully fixed changing a mob's class causing them to get all sort of stat bonuses due to the mobs-level-up setting. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6994 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05- Fog of Wall won't affect the caster now in any way.skotlex1-0/+2
- Added a missing status_calc_mob on mob_spawn_guardian_sub - Added clif_fixpos packets before attacking for the first time to clear any position sync issues with the client. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6985 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02- Some cleaning of the mob slave ai. skotlex1-15/+9
- Moved MOB_SLAVEDISTANCE to mob.h - NPC_CALLSLAVES now uses the slave-distance previously mentioned. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6940 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02- Moved setting a mob's level from mob_spawn to status_calc_mob, resetting ↵skotlex1-4/+0
their level on death has also been removed (as it is handled now on spawn) - Fixed a bug in status_revive - Updated Holy Cross, Investigate and Finger Offensive to be usable by all weapons. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6938 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6927 ↵Lance1-1/+1
54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02[Fixed] Lance1-1/+1
- Yet another compilation warning. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6924 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01- Corrected setting slaves_inherit_mode to not apply to morphosis skills.skotlex1-1/+1
- Added define OPTION_CART which holds the 5 cart option values. - Corrected pc_setoption to invoke status_calc_pc when getting/removing the cart. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6914 54d463be-8e91-2dee-dedb-b68131a5f0ec