summaryrefslogtreecommitdiff
path: root/src/map/mob.c
AgeCommit message (Collapse)AuthorFilesLines
2006-11-09- Fixed status-change loading not working.skotlex1-1/+1
- Fixed permanent mob-spawn script-events not working. - AL_CURE won't confuse undead players. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9187 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-08- Moved the duel functions to pc.c since they are so totally out of place in ↵skotlex1-14/+22
atcommand.c - Fixed Spider Web not ending when hit by a fireelemental attack. - Cast-time reductions from status changes will not be executed until right before casting, to prevent status changes from ending when attempting to cast and the attempt fails (invalid cells, not enough sp, wrong target, etc, etc) - Added check to prevent Wand of Hermod from seeking for a partner to encore, since the partner is supposed to be the warp. - Moved the duel auto-reject on logout from map_quit to unit_free - Corrected the mob spawn reading code so that the event-name can be up to 50 characters long (which is the actual event length) and so that it can read spaces within them, it will also strip the leading/trailing quotes if you use them so that the event is actually found on mob-death (so you can do stuff like "My NPC::OnDead" as a valid event). - Moved the homunc inherit speed from the master from status_calc_pc to LoadEndAck, since the hom's speed matches that of the master each time the master changes maps. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9173 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-07- Fixed map_foreachiddb and map_foreachpc so they don't encapsulate the ↵skotlex1-7/+2
variable arguments into a double va_arg list. Thanks to the Ultra Mage for the tip. - Cleaned up the clif_hate/mob_info functions with the correct fields/usage as explained by Rayce. - Implemented clif_feel_hate_reset packet to properly display the Angel of the Sun/Moon/Stars, thanks again to Rayce for the relevant information. - LP will again block all land-stuff from being placed down on top of it for the exception of Song/Dance/Encores. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9162 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-06- Corrected Kaupe so it doesn't ends on the first part of Soul Destroyer.skotlex1-9/+8
- Applied some cleaning to the way Tatami Gaeshi knocks back. - Cleaned up the way mobskill_use checks for the correct event. It should fix unlimited mob-skill-casting issues. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9154 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-31- When Kaizel (or super novice rebirth skill) triggers, you get debuffed now.skotlex1-3/+3
- Modified the player_cloak_check_type and monster_cloak_check_type settings. 1 makes it check for walls, 2 makes cloaking NOT end on normal attacks, and 4 makes cloaking NOT end when using skills. The default setting for players is still 1, but for mobs the default has been changed to 4. - Non-players can now use all skills while hidden. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9109 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-31- Added a check to prevent adding negative damage to the total accumulated ↵skotlex1-3/+12
damage in mob_damage. - Implemented the property where the first attacker get's double exp-share than the others. Due to the way exp calculation is done, this bonus will not apply when you use exp_calc_type 1 (damage/max_hp) instead of the default (damage/total-damage). For now this bonus is done after calculating who is the MVP character instead of before. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9107 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-30- Corrected GS skill ranges using Aegis data. All their targetted skills ↵skotlex1-1/+2
have a base range of 9 T_T, and Dust (Choke) has a range of 2. - Updated the code so mobs can use ChainAction as a targetted skill. - Added GroundDrift effects for Wind (Stun) and Fire (knockback). The knockback value is unknown, so 3 is used for now. - Cleaned up some more the steal code, now you can't steal the last slot regardless of skill level used. - Added consideration of Chain Action when cloning GunSlingers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9100 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-28- Fixed mob-skill event "skillused" not triggering at all.skotlex1-2/+2
- Summoned mobs will only be removed from a map if their master is also removed (dynamic mobs) - Minor cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9088 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-25- Made the exp bonus settings be adjustable:skotlex1-4/+11
- exp_bonus_attacker: Indicates how much additional exp a mob gives per additional attacker (eg: 10 -> +10%*attacker) - exp_bonus_max_attacker: Indicates at which number of attackers the bonus is capped (eg: 5 -> 5 attackers, so a mob yield the same exp whether 5 or 10 people attack it) - Changed the way the party_even_share_bonus setting works. It now uses a simple linear bonus increase (eg: 10 -> +10%*party member) - The defaults are as explained by Tharis: +25%/attacker, capped at 12 attackers, no party bonus. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9067 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-23- Removed NJ_TOBIDOUGU adding damage to W_HUUMA weapons which somehow got ↵skotlex1-1/+2
readded. - When nonplayers use Cloaking, it will be forced to level 10 since mobs shouldn't have movement/attack restrictions while walking cloaked. - Should fix a warning in int_homun.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9043 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-20- Added config setting "summon_flora_setting", which it you can decide now ↵skotlex1-7/+16
two things: a. Whether or not players can harm your floras outside versus grounds, and b. Whether or not you can summon out and mix different types of plants at the same time. - Likely fixed pc_steal_item always failing to steal (it was attempting to steal random item IDs...) - Cleaned up a bit the mob on-death event so that when the killer is a homunculus, it's master will be taken. Also, the variable killerrid will be set before running the script to specify who delivered the final blow. If the killerrid matches with the script attached player, you can be sure your player did the final blow to the mob, otherwise, the attached player is who did the most damage to the mob. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9026 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-19- Cleaned up the log.c file.skotlex1-5/+5
- Splitted log_pick into log_pick_pc and log_pick_mob to avoid ugly type-casting. - Fixed log_chat not recording anything if the server is compiled in SQL mode and sql_logs is turned off (it should then record to a plain txt file) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9017 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-11- Corrected the mob damagelog structure so that you can't exploit it by ↵skotlex1-50/+36
switching characters. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-06- Disabling status abnormalities will now reset a mob's target.skotlex1-0/+6
- Mob morphing also resets their target now. - Monk combos no longer can ignore skill delay (delay skill for all their combo-related skills is ASPD) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8945 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-27- Merged some splash changes from stable. Sharp-Shooting will now display a ↵skotlex1-0/+10
skill animation. - The no_spawn_on_player setting will now also work for static mobs, but only if the setting is set to 100 or higher. - Some small cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8887 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-20- A mob's HP is set temporarily to 0 before invoking it's on-death script, ↵skotlex1-0/+2
prevents said scripts being able to "rekill" the mob indefinitely (if stuff like killmonster is used within) - Some small cleanups in chat.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8829 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-17- Fixed NPC_INVISIBLE's cloak ending after attacking once.skotlex1-0/+3
- Fixed SG_FUSION being castable without Soul Link state. - Moved the item-use restriction SC checks from clif.c to pc_use_item, fixed Gravitation blocking potion usage on it's area of effect. - Sphere Marines and Summoned Flora are now inmune to class-changing. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8782 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-16- Added monster_ai&256. When set, a monster will pick a random starting ↵skotlex1-2/+2
position to begin checking versus it's skills, otherwise, it will always begin checking from the beginning. - Added NPC_CHANGEUNDEAD to the skill_cast_db, fixes it apparently doing "nothing". git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8778 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-15- Now mobs won't do a distance check to lose their target on every ai ↵skotlex1-1/+1
iteration, but only when they finish walking (unless you set monster_ai&1) - The chase distance before a mob gives up following a player has been increased from view-size (range2) to min-chase (range3). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8773 54d463be-8e91-2dee-dedb-b68131a5f0ec
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