summaryrefslogtreecommitdiff
path: root/src/map/mob.c
AgeCommit message (Collapse)AuthorFilesLines
2006-09-14- Corrected Smokie's pet script to use petskillbonus instead of "bonus"skotlex1-3/+6
- Added constant map_flag_gvg2 which tags gvg maps independently of whether woe is on or off. - battle_calc_gvg_damage will be invoked in gvg maps regardless of woe time. - NPC_MENTALBREAKER now zaps matk*lv SP based on observations by Tharis. - md->class_ will be changed on mob-class-change to fix all class-change related bugs. On respawn, the spawn data will be used to revert to the original class. - Improved the pet skillbonus timer for "eternal bonuses" cases where the bonus delay is 0. - Adjusted gvg long damage rate to 80%, magic damage rate to 60% git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8748 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-12- Moved the morph restrictions from skill_additional_effect to ↵skotlex1-0/+10
mob_class_change, so that SA_MONOCELL will not convert clones, emperium, or treasure boxes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8724 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-05- Removed setting mob_show_hp, it's been replaced now by mob_show_info, ↵skotlex1-5/+5
which can be used to specify what kind of info should be displayed from a mob. Current options are two different formats for Hp display, and current level. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8644 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-04- Removed status_get_sc_tick, duration and chance are now both handled by ↵skotlex1-15/+15
status_get_sc_def - Fixed mob-kill experience getting screwed up when characters who did damage die/logout at the moment the mob dies. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8619 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-04- Ordered up entries in skill_unit_dbskotlex1-0/+6
- SC_REFLECTSHIELD will now be passed to devoted characters at cast-time. - Added a check to make a mob's level 1 if the read level from the db is less than it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8615 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-04- Some cleanup of how mobcount works.skotlex1-6/+5
- status_calc_misc will now be invoked in status_calc_bl even on the first call, since status could have gone up due to skill bonuses. - Moved max HP/SP calculations to before invoking status_calc_misc - Simplified distance and check_distance to use "aegis" methods (greater of dx/dy = distance), there's a new define in map.h called CIRCULAR_AREA, when set, the previous method is used, and map for each in range calls will also check for distances, making most ground skills and battle system use real circles instead of squares. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8609 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-01- Added defines status_base_matk_(max/min) for code readabilityskotlex1-4/+12
- Expanded status_calc_misc so it may also calculate the batk of characters as well as their regen data (if they have it) - Fixed a memory leak when using charsave_method:1 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8576 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-01- Soul Breaker will now be affected by Lex Aeterna on both parts of the attack.skotlex1-14/+4
- Some minor code cleanups - Cleaned Adaptation's code to not require to check the Skill Unit group structure to extract the skill lv info. - Status changes with no skill and no SCB* data will now go through if they have an SI* icon. This should fix SC_MIRACLE - Reverted switching a mob's adelay/amotion when the later is longer than the former, now both get updated to amotion. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8574 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-31Fixed new mob's name not sent to the client when the mob is morphedtoms1-2/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8562 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-31- Fixed @summon's delete timer being screwed up.skotlex1-1/+1
- Cleaned up a bit the summon script command. - Fixed the clone script command's delete-timer being screwed up. - Corrected battle config name max_walk_rate, it should be named max_walk_speed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8559 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-29- Mobs will now always chase players using hard-path seeks.skotlex1-7/+8
- monster_ai&1 now only signals whether mobs should update their target cell while chasing more frequently (rather than being state-driven like Aegis) - Changed the defaults of view_range_rate and chase_range_rate to 120 to aproximate better Aegis's view ranges (which are square areas and not circles) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8536 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-28- Added a missing pair of lines to mob.c which mysteriously vanished on my ↵skotlex1-1/+2
last commit @.@ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8519 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-28- Fixed exp bonuses applying twice for the job-expskotlex1-5/+6
- Magic damage adjustment per number of hits is now performed before mdef reductions. - @reloadbattleconf will now also update the ragsrvinfo table on the char-server. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8518 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27* Optional macro MEMSET_TURBO for faster low-level memory initializations.Lance1-21/+21
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-26- Small adjustment on the mob_ai code which could fix mobs not chasing you ↵skotlex1-1/+1
if you hit them from the maximum possible diagonal distance. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8490 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-24- Now when a mob's adelay is set to be less than the amotion, both values ↵skotlex1-2/+13
will be swapped (this is an attempt to understand how those mobs actually work on aegis) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8474 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-24- Reverted the previous change, changed the pet capture code to try to ↵skotlex1-3/+2
capture a mob based on their view class rather than actual class. - Changed various instances of md->db->lv for md->level, since the later is the actual mob level. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-24- Fixed the md->class_ variable not being updated when a mob's class is changed.skotlex1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8470 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-24- Fixed mob_clone_spawn completely ignoring the mode variable.skotlex1-1/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8462 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-22- Fixed a crash on the mobspawn script command.skotlex1-2/+10
- Made SC_FLEET increase batk as well as watk. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8444 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-20- Added a check during mob_db loading so that the six basic stats, max hp ↵skotlex1-13/+22
and max sp are never below 1, as this could cause crashes when using certain skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8393 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-18- Made HLIF_HEAL a self skill that auto-selects target to caster's master.skotlex1-1/+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- Changed unit_free so that it receives which cleartype should be used when ↵skotlex1-6/+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-16- @produce now can make any kind of equipmentskotlex1-1/+1
- 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-16- Updated mob_ai so that mobs will use their rude-attacked skill when they ↵skotlex1-2/+3
can't reach their current target. - Fixed the default txt config making pets be saved to the homun file instead of to the pet file. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8316 54d463be-8e91-2dee-dedb-b68131a5f0ec
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