summaryrefslogtreecommitdiff
path: root/src/map/skill.c
AgeCommit message (Collapse)AuthorFilesLines
2011-06-30Replaced custom type 'intptr' with standard 'intptr_t'.ultramage1-7/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14873 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-25Slightly cleaned up some ancient Brandish Spear code:ultramage1-50/+55
* remove helper 'struct square' from common/mmo.h * moved skill_castend_nodamage_id's case ML_BRANDISH to separate function git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14866 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-22Added enum e_skill_flag to represent the values of struct s_skill's ↵ultramage1-3/+3
complicated 'flag' field. Reordered the enum values so SKILL_FLAG_REPLACED_LV_0 goes last and arithmetic can be done on it safely (for storing skill level values). This also adds support for skill levels higher than 10. Fixed several places where SKILL_FLAG_TEMPORARY was not handled properly, and instead was considered as one of the saved skill level values (resulting in skill level -1). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14861 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-29Renamed clif_parse_ReqFeel to clif_feel_req (since r4352).ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14839 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-23* Changed enumerating defines into enumerations (related topic:264007).ai4rei1-3/+3
- Minor fixups on few macros. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14831 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-03-20* Random accumulated tweaks and fixes.ai4rei1-0/+1
- Added a error message to npc_enable, to spot disablenpc/enablenpc/hideoffnpc/hideonnpc on non-existing NPCs (related r14750). - Replaced inlined npc_name2id code with calls to npc_name2id. - Open Buying Store skill is now exempted from noskill mapflag like Vending as well (bugreport:4815, follow up to r14713). - Fixed signed constant being returned as unsigned value in get_percentage (bugreport:4765, since r12679). - Replaced strlen checks, which checked whether or not a string is empty, with first-byte checks. - Fixed enabling 'fakename' not clearing party and guild name and cleaned up atcommand 'fakename' code. - Cleaned up party/guild name code in clif_charnameack (follow up to r14737). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14751 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-02-19* Implemented buying store system (aka. reverse vending, purchase shop) ↵ai4rei1-0/+6
together with related skill and items, without NPCs. - For SQL apply upgrade_svn14713_log.sql to upgrade tables `picklog` and `zenylog`; for TXT no action is necessary. - Requires 2010-04-20aRagexeRE or later and can be disabled in 'conf/battle/feature.conf'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14713 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-31* Various accumulated cleanups and fixes.ai4rei1-2/+10
- Improved the compile speed for files which include common/socket.h on windows builds (related r10471). - Moved FIFOSIZE_SERVERLINK define from common/mmo.h to common/socket.h (since it is a server connection FIFO size setting). - Fixed script command 'areamobuseskill' canceling monster's skill cast before it determined it's new target, which could be 'none' (bugreport:3272, since r13897). - Added a protection against attempts to read an empty backup / write to a full backup in skill_dance_switch as per TODO from r11347. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14690 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-14* Removed unconditional redundant status change checks before ↵ai4rei1-36/+18
status_change_end calls (follow up to r12890). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14671 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-14* Replaced remaining occurences of '-1' with 'INVALID_TIMER', where ↵ai4rei1-103/+104
appropriate (follow up to r12998). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14670 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-27* Fixed skill_can_produce_mix not checking, whether or not the produced ↵ai4rei1-0/+5
goods can actually be stored (bugreport:4674). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14633 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-17* Added temporary check to skill_delunitgroup to prevent crashes when ↵ai4rei1-2/+6
'group' is NULL and added some debug messages to track down the source of the crash (bugreport:3504). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14599 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-02* Various code tweaks and updates related to item types.ai4rei1-2/+2
- Replaced item type literals with their appropriate constants. - Added itemdb_typename to replace the ugly "BUG!" filled array in @iteminfo (since r1741, follow up to r14550). - Made the item database parser verify item type for validity. - Added item type constants to const.txt for use in scripts (getiteminfo). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14551 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-02* Various additions and updates to the comments and documentation of packets ↵ai4rei1-1/+1
in clif. - Renamed clif_01ac to clif_skillunit_update to make it look less 'mysterious'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14542 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-02* Removed clif_weather_sub and clif_misceffect2 in favor of ↵ai4rei1-1/+1
clif_specialeffect_single and clif_specialeffect (all of them are ZC_NOTIFY_EFFECT2). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14541 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-01* Fixed bAutoSpellOnSkill bonuses could not be chained (bugreport:4421, ↵ai4rei1-8/+9
since r13596). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14536 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-29* Insignificant code tweaks: removal of excess function declarations and ↵ai4rei1-2/+0
self assignments. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14520 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-28* Added emotion_type enumeration for clif_emotion constants.ai4rei1-3/+3
- Made clif_parse_Emotion use clif_emotion, rather than having it's code inlined. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14518 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-28* Added clr_type enumeration for vanish effect constants.ai4rei1-14/+14
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14517 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-23* Added script command pushpc, which is required by newer scripts.ai4rei1-39/+2
- Moved knockback-part of skill_blown into unit_blown, to allow unconditional knockback required by pushpc without copy-pasting code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14492 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-02Applied patch by xazax to clean up various bits of code across mapserver ↵Paradox924X1-9/+1
code. (bugreport:4512) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14438 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-11Implemented official cash food behavior, including use delay, not being ↵Paradox924X1-27/+29
dispelled (including on death), distinct status effects and icons from the ordinary food types. Updated items accordingly. (bugreport:2560) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14426 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-11Applied ultramage's fix to prevent a segfault when a mob dead event ↵Paradox924X1-0/+3
triggered by a land-based skill causes the player to warp. (bugreport:4426) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14425 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-09Replaced all nullpo_retr() calls which returned 0 with nullpo_ret() calls.Paradox924X1-67/+67
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14414 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-09-20Fixed when devoter is killed by the redirected damage, devotee takes the ↵Inkfish1-17/+17
whole damage. (follow up to r14406) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-09-18* Added bard/dancer songs and duets to the nodispell list. (bugreport:4411)L0ne_W0lf1-1/+7
* Applied Ai4rei's patch for the skill WE_CALLPARTNER (bugreport:4437) * Lots of updates to monster stats/drops, all fairly minor. * Updated the price and weight of a handful of etc items. * Removed drops for quest-spawned Satan Morroc. (bugreport:4425) * Changed weight on novice consumable items to 0 (bugreport:4442) * Updated Sage quest skill quest with the file curtosy of 5511. * Fixed the Pink Crystal being named Blue Crystal in Flavius. * Touched up the archer tutorial, and phantasmic arrow quests. * Fixed Turbo Track records for 8 and 16 normal saving as expert. (bugreport:4433) * Corrected the positions for the arug castle 04 exterior flags. (bugreport:4436) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14409 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-09-12All direct damages such as reflected damage or Tarot Card damage should not ↵Inkfish1-2/+20
be redirected. (follow up to r14400) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14406 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-09-06* Implemented Icescope's fix for devotion, reflect damage is no longer ↵L0ne_W0lf1-1/+1
absorbed by the devoter. (bugreport:3189) * As a folow up to r14301, increased MAX_REG_NUM to 256, to prevent possible data loss. * Touched up the endless tower script slightly. - Added ends to several NPCs which would allow you to restart timers. - Added some missing stopnpctimers to npcs. (bugreport:4418) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14400 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-28Replaced a map_moveblock() call with a call to unit_movepos() to prevent an ↵Paradox924X1-1/+1
exploit. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14396 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-19- Implemented usage of packets 0x7fa and 0x7f7, 0x7f8, 0x7f9. These are used ↵Skotlex1-12/+12
for proper deletion of items as well as movement/spawn packets for Renewal clients. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14383 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-17* Attempting to tackle, and fix some simple errors in skills.L0ne_W0lf1-17/+12
- Stormgust hit counter no longer resets under new casts of stormgust. - RG_STEALCOIN will now cause the monster to aggro player on success. (bugreport:3547) - SL_WIZARD will now consume one crystal fragement per reflected hit. (bugreport:3603) - WZ_FROSTNOVA will now ignore targets in area that are already frozen. (bugreport:3980) - SL_KAAHI will no longer uses SP if player has full health already. (bugreport:3918) - CG_TAROTCARD "The Lovers" will heal source player instead of target. (bugreport:4171) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14378 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-07-31* Implemented three new mercenary skills.L0ne_W0lf1-2/+9
* Added two new monster mercenaries. - Added information for the three new mercenary skills. - Added mercenary skills with cast times to castnodex. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14367 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-28* Updated specialeffect2 to accept player names. (follow up to r14353)L0ne_W0lf1-2/+2
* Bascilica now allows boss-flagged monsters to knock you back as per official. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14357 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-28* Follow up to r13895, added a battle.conf setting to control if ranges ↵L0ne_W0lf1-4/+7
should be checked with autocasts. 'autospell_check_range', by default is set to no, as this is official behavior. This does not affect autospellwhenhit. * Sonic Blow autocast now stops players attacking when it triggers. It's possible there is more depth to this on official servers, and should 'stop' attacking on regular casts as well. It appears so far that this is the only skill that behaves this way. * Modified the default value for homunculus_auto_vapor in source to 1. * pvp_points are no longer calculated in the gvg_dungeon flagged maps. * Corrected a view ID and an equip location in the item database. (bugreport:4330) * Corrected a typo in the DTS_Warper script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14356 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-14* Blocked being able to use the skill CR_DEVOTION on players under the ↵L0ne_W0lf1-2/+6
status SC_HELLPOWER. - Additionally, users afflicted by the status can also no longer use Token of Siegfried to self-res. * Added Manuk, Splendide and SC_HELLPOWER statuses to the status effects that can't be dispelled. * Changed SC_SPEEDUP0 to use the correct status icon SI_MOVHASTE_HORSE. * Changed SI_SPEEDUP1 to use the correct status icon SI_SPEEDPOTION1. * Added updated 13.2 drops to existing monsters. (Most rates are unknown, and set to 0.1%) * And time to squish database bug reports! - Fixed guild event quest log entry time limit. (Bugreport:4204) - Fixed Musika healing while attacking and not when attacked. (Bugreport:4211) - Corrected the Int and HP/SP reduction on the Dead Tree Cane. (Bugreport:4217) - Fixed the non-set bonus for Glorious Ring's heal increase. (Bugreport:4223) - Fixed Death Guidance not casting NPC_HELLPOWER on the user. (Bugreport:4250) - Changed the usable job for Bone Plate from all to thief class. (Bugreport:4286) - Changed the bonus on alternate large bapho horns to subrace. (Bugreport:4291) - Added slots to blu and pink night caps, and a couple others. (Bugreport:4301) - Removed an extra comma from the Mini_Propeller_M headgear. (Bugreport:4307) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14342 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-05-30Damaged reflected from skills will now be shown as multiple hits if the ↵Paradox924X1-1/+1
skill used was multi-hit. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14314 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-03-30Fixed the first item in the inventory is unbreakableInkfish1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14274 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-03-24* Implemented NPC_TALK (Credit to SnakeDrak and Daegaladh)L0ne_W0lf1-0/+1
- Also added in the ability to use '@npctalkc' as a GM command. - Added supporting information to the databases. - Sneaking in a fix to the Refined Ballista. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14270 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-02-19* Fixed NPC_INVINCIBLE can be dispelled. (bugreport:4046)Inkfish1-1/+1
* Fixed a compliation warning. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14247 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-02-062010/02/06Inkfish1-3/+3
* Added official packet to display received expirience. (info provided by papkil) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14240 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-01-28* SN_SHARPSHOOTING is no longer affected by AC_VULTURE. (Bugreport:3909)L0ne_W0lf1-2/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14232 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-01-28Reverted r3619. Evidences show Margaretha Solin Card works when player is ↵Inkfish1-1/+1
hit by Storm Gust. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14231 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-01-19Intimidate now checks the distance between source and target in case it ↵Inkfish1-1/+1
kills the target and then warps the respawned one. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14221 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-01-19Intimidate should warp you anyway even if the target died.Inkfish1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14220 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-01-15* Fixed change cart packet doesn't check for skill.Inkfish1-3/+5
* Added new packets for Plagiarism. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14218 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-12-27Fixed Meteor Assault and Spread Attack have twice the chance to trigger ↵Inkfish1-1/+6
AutoSpellOnSkill. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14215 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-12-08Corrected a variable defined in a header file.ultramage1-1/+3
Cleaned up a bad case of variable recycling. Separated the ALL_WEWISH case from the unrelated sage skill cases (undo of r14183). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14190 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-12-02Semi-revert of 14182, moved ALL_WEWISH up under SA_GRAVITY instead, as I ↵L0ne_W0lf1-3/+1
hadn't noticed it does exactly what the new case did. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14183 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-12-02Added skill ALL_WEWISH. This skill in older clients plays a song, however in ↵L0ne_W0lf1-0/+3
current clients it does not. The effect (AL_ANGELUS) still shows. Added ALL_WEWISH to the skill databases, and enabled the Christmas Musicbox item. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14182 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-26* NPC event code cleanups.Inkfish1-5/+7
- removed the 'OnMyMobDead' dead code. It's never supported though documented. - removed the 'feature' that events only trigger when the player is in the OnTouch area IF it's specified. It's never documented and breaks official scripts. - some cleanups and bug fixes to OnTouch_. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14173 54d463be-8e91-2dee-dedb-b68131a5f0ec