summaryrefslogtreecommitdiff
path: root/src/map/mob.c
AgeCommit message (Collapse)AuthorFilesLines
2007-08-09- Moved damage logging to mob_log_damage, now non-damage targetted (or ↵skotlex1-73/+86
splash) skills also get logged into the monster's 'damage history' which affects the exp-bonus per attacker setting. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10966 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-08- Changed the structure of the homunculus_db file so that the homunculus and ↵skotlex1-1/+1
its evolved version share the same line. Also added the evolution bonuses to it. - Updated the @homstats command to show evolution bonuses - Cleaned up the homunculus db structure. - Implemented the evolution stat growth bonuses. - Some small cleanups in the mercenary.c file - Corrected initial intimacy of a newly created homunculus (should be 21/1000) - Incremented the size of mob.c:summon.class_[] since mob_pouch has almost 350 entries. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10965 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-08* Cleaned up junk left in the code by the mapcache/mapindex updateultramage1-6/+6
- Added mapindex_getmapname(_ext) to help with ".gat" adding/removing - Moved related processing to the interface (prevents duplicity) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-08- Fixed some missing max levels for npc skillsskotlex1-6/+30
- Expanded isloggedin script command to support an optional argument (char id) - Expanded warpparty command to accept target "Leader", this will warp the party to the leader. - Added a summon structure to handle non-dead-branch mob-groups since the current implementation totally fails for mob groups that don't have MANY integrants - Fixed mobs not attempting an IDLE skill right before unlocking a target. - Removed a useless variable in the pet_data structure git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10961 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-04* Removed weird mvp reward item drop behavior (see topic:160077)ultramage1-3/+1
* Fixed Cart Revolution not transferring status effects on attack, and Cart Termination doing it when it shouldn't (see topic:156745) * Fixed #refine not accepting names with spaces in them * Fixed disguises not doing sit-down properly (missing self packet), broken since r6299 stable / r5833 trunk * Added missing /blackmith packet action to packet_db.txt * Removed "eathena's custom equipped mobs" from mob&skill db git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10946 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-27* Simplified exp gain equations (now more FPU-friendly and precise), also ↵ultramage1-19/+6
fixes the uninitialized variable problem * Corrected one exp calculation overflow (mainly affected high-rate pk servers) * Fixed Neuralizer item script typo git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10921 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-26* Cleaned up mob drop code, crashfix is still needed though...ultramage1-82/+68
* Reduced ignore-list length to 20, added proper reply packet * Cleaned up some very poorly written pm-ignore code (see r141) * Fixed a typo in Warp Portal code displaying an incorrect map name git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-18- Small update to the effects list (new exe's effects by Au{R}oN)ultramage1-1/+3
- No sending of the pet_equip packet when pet has no equip (thx to Skotlex) - Added back exp gain limiting for old formula to stop exploits (see r8177) - Now a message is printed when the packet_ver filter rejects someone - Renamed two structs using same name as variables (MSVC debugger issue) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10886 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-01Cleaned up some parts of the code.ultramage1-2/+2
Removed obsolete script function 'hasitems'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-11- Fixed pet equip not displaying correctly at all (closes topic:153753)ultramage1-5/+5
- Removed old fixpos packet (the 'new' one is way smaller) - Fixed some major logical typos in the code, cleaned up many places git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10746 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-03- Fixed missing client update when 'return to savepoint' failsultramage1-1/+1
- Fixed a bad copy-paste from r10028 letting players escape jail (char was dead on login, so statuses (SC_JAILED) couln't be applied) - Added clif_standing() to clif_sitting(), and used them in clif.c - Cleaned up clif.c a bit - clif_clearchar->clif_clearunit_area, clif_clearchar_id->clif_clearunit_single git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-25Corrected some weird fgets() statements, plus reformatted themultramage1-5/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-23- Added new flag to skill_castnodex.txt, to allow per-skill tweaking of cast ↵ultramage1-6/+6
time and delay reducibility by item scripts (cards and such) - Fixed Martyr's Reckoning never triggering for gms with all skills - Added MO_TRIPLEATTACK and RG_SNATCHER to @skillall's skill filter - Made gm_skill_unconditional bypass skill blocking (guild timer, etc) - Reverted the weird delay_dependon_agi thing (r8923, r9055, r9059) - Changed a few memsets to strncpy (reading past buffer is a bad idea) - Sped up some memset operations (multiples of 4 are faster) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19Reformatting @_@ultramage1-124/+66
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-10Attempt to fix unwanted teleporting of immobile mobsPlaytester1-1/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10525 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-04* Added up-to-date monster summoning files thanks to Vicious_PuccaPlaytester1-1/+1
- also fixed a bug in the code, please test the files before commiting them - thanks to Spre for the info on needed code changes git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10454 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-04- Updated mob_poring.txt, by Spre.DZeroX1-1/+2
- Minor source edits, to accommodate the new DB file, mob_pouch.txt, for the Red Pouch of Surprise, by Spre. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10451 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-24- Modified the mob ai think time update after using skills from ↵skotlex1-1/+0
adelay/amotion to 100ms since the previous method adds a large delay before the AI activates again (which screws up with the timing of idle/walk skills) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10348 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-24- The autoloot range check is no longer done unless AUTOLOOT_DISTANCE is ↵skotlex1-8/+23
defined (by default it is no longer defined) - Ganbantein now deletes individual skill cells instead of the whole skill in the area it is casted. - Modified the mob total damage code to prevent overflows when mobs receive over 2kM damage. - Made the dmg structure of the damage log an unsigned int rather than signed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10343 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-22- Corrected crash if itemskill is used without an attached player.skotlex1-4/+8
- Removed range checks for autospells as per UltraMage Aegis tests. - Added chatID skill fail check to skill_check_condition - Corrected @refresh not re-displaying your spirit spheres nor re-setting your cloth dye. - Now the "number of attackers" in mob_dead is counted only from online characters on the same map. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10307 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-18Added MEXP overflow checks.LuzZza1-1/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10287 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-14- Fixed a null pointer when a mob needs to unlock a target while it's idle.skotlex1-2/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10253 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-12- Oops, it turns out the state is never reset from walking to idle ↵skotlex1-2/+5
automatically when a mob was random walking... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10241 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-12- Moved the idle state random walk and idle skill triggering to ↵skotlex1-30/+34
mob_unlock_target, since our current AI has some execution paths where these would never be triggered. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10240 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-12- Oops, little error on previous commit.skotlex1-9/+9
- And cleaned a bit the mob use skill code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10236 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-12- Changed the meaning of inf2=0x1000. Now it is used to "disable usage on ↵skotlex1-2/+12
enemies", which only works for non-aggressive (inf!=1) skills. - If a skill is party/guild only (inf2 0x400/0x800) it will also be castable on enemies if the skill's inf is 1 (offensive target) - Corrected the mob behaviour when it locks into an enemy it can't chase. Previously it would get stuck on a lock->unlock->lock loop, with each unlock resetting the "random walk" timer, causing the mob to just idle in place. Now they will attempt idle skills and no longer reset the "random walk" timer, so they behave as if they were in Idle state properly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10234 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-11- When a mob fails to use the selected skill, it will now move on to the ↵skotlex1-2/+2
next one in the list, rather than return from the function with fail status. - Mobs won't try to run away when rude-attacked if they have a locked-on target already. - Moved the teleport on LP fail check from castend_nodamageid to status_check_skilluse, this way unit_useskill will return failed when trying to use it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10221 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-26- Fixed # commands not being blocked when muted if the mute config settings ↵skotlex1-14/+18
say you should be. - Moved skill db reading before loading mobs so that the new mob condition checks work. - Cleaned up the warning/errors of the mob skill reading function. They are now warnings if the skill is read anyway (default conditions are used) and an error when the skill is not loaded. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10075 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-26- Cleaned up some the mob skill use code. The skill re-use delay is set at ↵skotlex1-81/+93
the time the skill is used rather than when it finishes casting. The invalid target check was also moved to the mob skill db reading function. - Skills can be used now when the autoskill menu is open (since there's no packet sent by the client when you hit on cancel) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10074 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-20- getpetinfo 5 will now return the pet's rename flag.skotlex1-1/+2
- Autoloot will now only work on items dropped a certain distance from the player. The distance is defined by AUTOLOOT_DISTANCE in atcommand.h and defaults to AREA_SIZE. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10039 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-13- @pvpoff and @gvgoff will make everyone in the map stop auto-attacking now.skotlex1-2/+3
- when @killer is deactivated the issuer will stop attacking. - when @killable is deactivated, everyone around the user who is attacking the issuer will stop. - Cleaned up some the code for dispell. It no longer removes food boosts. - Players will stop attacking when they change their look. - Applied Alydis's fix to the mvp item logs logging mvp items even if the player couldn't get the item. - Changed the default of debuff_on_logout to 1 since food items shouldn't dispell on logout. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9997 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-11- Added player not attached crash prevention to countitem/countitem2skotlex1-2/+2
- Probably corrected delitem not deleting pet eggs at all. - Possibly nullpo fix on npcskilleffect - Corrected a warning when using #fakename - Hopefully fixed hidenpc/disablenpc not working on Guild flag sprites. - Mob skill state "anytarget" no longer triggers when the mob has an item-target (looting). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9991 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-09- Added info on packet 0x86 (simple move packet). Not usable until a clear ↵FlavioJS1-3/+3
separation between entering sight/leaving sight/walking in sight is done. - Propagating const char* from the script engine. - ".gat" is appended to the map name before sending the changemapserver packet to the client. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9979 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-26- NPC_AGIUP now boosts flee by 100% and duration is 5+5*lv secs, as stated ↵skotlex1-4/+7
on the Ragnarok Bible. - Fixed Soul Breaker's misc part not ignoring flee. - Fixed misc attack's flee check being backwards (the less hit%, the more chance you had to connect) - Corrected the range check in vending.c (TRADE_DISTANCE -> AREA_SIZE) - Added define DEFAULT_ENEMY_TYPE in mob.c to simplify the enemy bl check (for easier reading/customization) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9922 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-23- Fixed the mob_override_name setting not working on summoned mobs.skotlex1-1/+7
- The server now prints an error message when it the produce_db reaches the max number of allowed produce recipes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9907 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-16- Modified the "guardian" spawn script command, it no longer receives a ↵skotlex1-35/+40
"amount" argument (since that only leads to trouble), if the class is negative, it'll pick a random class the same way the monster spawn script command does, and if you pass a spawn position with coordinates equal or less to 0, a random spot in the map will be taken. However you can't use "this" as a map name anymore since these script commands do not need an attached player. - Guardian spawning will now fail if you attempt to spawn a guardian that already exists on the same position. - Collapsed clif_party_main_info and clif_party_join_info into a single function: clif_party_member_info - Collapsed config settings "sg_miracle_skill_min_duration" and "sg_miracle_skill_max_duration" into "sg_miracle_skill_duration", which defaults to an hour. - Miracle of the Sun, Moon and Stars can now retrigger to lenghten it's effect, and it is cancelled on warp/map-change. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9871 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-15- Cleaned up clif_party_info a bitultramage1-10/+14
- Reverted some of my mobdb code git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9870 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-08- Spider web can again be recasted on target.skotlex1-18/+25
- Modified Spider Web so it can instantly retrap a target, rather than idling on the ground waiting for a new target. - Cleaned up some the rude-attacked code, being attacked while under spider web now triggers rude-attacked. - Sped up the FrostJoke/Scream message length chat check. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9828 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-06- Cleaned up homunc attack request parsing. Homunculus no longer goes into ↵skotlex1-1/+3
auto-attack (ctrl+click) mode since the client does every attack request individually. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9805 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-06- Fixed char-server not sending party status update when a member logs on/offskotlex1-1/+1
- Fixed crash when parsing guild member information change from the char-server when the specified character is not found in the guild. - Fixed MvP mobs giving exp when killed even if they shouldn't git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9802 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-06- Fixed @lvup, #lvup not doing a stat reset and lowering your status points ↵skotlex1-2/+2
if you had 0 status points at that time. - Fixed MvP exp and item rewards being given even when the mob_dead flag specifies you should not receive exp or items. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9795 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-05- Fixed a duplicate warp name in Rachelskotlex1-2/+2
- Fixed Venom Splasher not being Poison elemental - Cleaned up #blv - Fixed the skill tree not always updating when using @allskill - Probably fixed the target-change on melee attack setting not working. - Moved the deletion of the invincible timer when using skills so that it is not deleted for skills such as Ashura (when just selecting a target) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9791 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-02- Resetting skills will now automatically remove peco, falcon, cart and ↵skotlex1-0/+1
homunculus (vaporize). - Fixed random mob picking choosing clones. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9780 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-01- Added support for mob skill target 'randomtarget', when specified, it will ↵skotlex1-0/+9
pick a random enemy from within the skill's cast range. - Updated the mob_db so that all skills from non-moving mobs that specified 'target' as enemy will use 'randomtarget' instead. - Amon Ra's meteors now use randomtarget instead of self. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9762 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-30- 'Long Range Attacked' mob skill conditions will no longer trigger on magic ↵skotlex1-1/+1
attacks. - Changed the element of Blood Drain from 'take weapon's element' to Dark. And Blood Drain/Energy Drain have a range of 7 now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9747 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-29- Corrected the homunculus deletion functions so that the homunculus is ↵skotlex1-2/+2
deleted together with the character. - Added npc_check_areanpc so that Wand of Hermod will correctly check for nearby warps. - Emergency avoid now stacks with other speed boost statuses - Item skills and skills that bring up a menu now are cleared on death. - Minor cleanings git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9742 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-28Some misc cleanups (typos, formatting, forgotten changelog entry etc)ultramage1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9733 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-21Typo huntultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9684 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-16- Added function unit_escape to simplify the run-away code a bit in the mob ai.skotlex1-14/+12
- Some cleaning on the mob_ai to enable mobs to run away from their current target when they are rude-attacked by them. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9658 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-15- The NPC elemental attacks will display a skill animation again.skotlex1-2/+2
- Mob instant cast skills will use their adelay now. - Spirit of Wizard won't work on Ganbantein - The pc normalize job function will consider you as novice if you don't have maxed out basic skill. - Cleaned up pc_calc_skilltree and related functions so that the id is left as 0 when you can't raise the skill even if you meet the prerequisites. This is to prevent raising quest/soul/marriage skills through packets. - Slaves should lock unto their master's target even if they are not attacking yet (eg: in chase mode) - Updated the Summon Slave skill to use the slave distance define as valid distance to spawn from master. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9656 54d463be-8e91-2dee-dedb-b68131a5f0ec