summaryrefslogtreecommitdiff
path: root/src/map/mob.c
AgeCommit message (Collapse)AuthorFilesLines
2006-08-09- Added crash protection to the mob_db txt reading when the mob_db file has ↵skotlex1-2/+5
lines with insufficient number of columns. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8212 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-08- Casting Kaensin will clear out Suiton and viceversa now.skotlex1-3/+4
- Fixed drop-rates (@whodrops) getting duplicates when you use @reloadmobdb - Fixed unjailing not sending characters to Prontera. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8188 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-08- Changed define EQP_WEAPON to specify only the right-hand weapon, added ↵skotlex1-2/+0
define EQP_ARMS to specify both arm-slots. - Some minor code cleanups to take account for the above, fixed Strip shield/weapon removing both. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8177 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-07- Fixed the map_search_freecell error which was making mobs fail to respawn.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8169 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-07- Cleaned some of mpeg's updated work.skotlex1-16/+6
- Fixed HT_BLITZBEAT hitting neutral characters when it auto-triggers. - Simplified the Tatami Gaeshi code. - Fixed AS_SPLASHER doing full damage on everyone except targetted char instead of the other way around. - Fixed KAENSIN clearing out SUITON cells and viceversa. - The spawn area is now seen as range rather than absolute for mob spawn lines. This means that x,y,10,10 will spawn the mob on a 21x21 grid around the given x,y point. - Some clean up of the mob-spawn code. Now you can specify negative areas, so that a spawn location such as 100,150,0,-1 will spawn a mob always on x=100, but any Y value of the current map. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8165 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-04- Removed settings enemy_critical_rate, homun_critical_rate. Added settings ↵skotlex1-8/+0
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-04- Enabled Mastery damage on Soul Breaker again, moved adv katar mastery out ↵skotlex1-3/+3
of the mastery function so that it may apply to all skills except Soul Breaker. - Changed name of the setting log_pick to log_filter since that's what it does now. - Modified enable_logs so that instead of a 0/1 setting, you can specify which kind of events to log (so you can use a combination), see log_athena for the bitmask configuration. - Cleaned a bit the contents of log_athena.conf git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8129 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-03- Added a check to skip the experience share of characters who are dead or ↵skotlex1-0/+3
on another map. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8117 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-03- GAHH, I am sick tired of typing TBL_HOMUNCULUS/BL_HOMUNCULUS all over the ↵skotlex1-8/+8
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-03- Added RUDE_ATTACKED_COUNT so you can easily adjust how many rude-attacks ↵skotlex1-4/+8
should happen before a mob uses the rude-attacked skill. Value has been set to 2 for now. - Now when a mob changes target (to someone they can hit) their rude-attacked count won't be reset, but instead will be reduced by one. - SC_SPEEDUP0 can now stack with the other speed raising buffs. - Changed the inf2 value of SA_DISPEL so it can be casted on party/guild mates, but not yourself. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8104 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-03- Cleaned up the last NJ update code.skotlex1-1/+1
- Added @ command `charspeed` - Fixed @jailfor using MAP_PRONTERA as jail instead of MAP_JAIL - Removed case for GS_SPREADATTACK on damage packets to see if the skill displays correctly now. - Corrected Deluge/Volcano/V. Gale overlaps so that the placing tiles are removed, NOT the ones who were already placed. - Made SC_SPEEDUP0 and SC_SPEEDUP1 use different icon IDs, to fix icon-confusion when both are enabled at a time. - Mob rude-attacked count is not reset now on picking a new char (gotta investigate this further) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8096 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-01- Made Deluge/volcano/v. gale be castable on top of each other againskotlex1-2/+2
- 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-07-31- Removed incorrect "Waterball range+1 when standing on suiton" feature.skotlex1-1/+1
- Corrected the Speed update code to prevent sending "walk to xy" packets twice when the affected character is a player. - Expanded mob can't move warning to print out where this mob was stuck at (map, x,y) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7998 54d463be-8e91-2dee-dedb-b68131a5f0ec
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