summaryrefslogtreecommitdiff
path: root/src/map/skill.c
AgeCommit message (Collapse)AuthorFilesLines
2006-04-29git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6357 ↵Lance1-1/+1
54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-29* Using malloc for memory allocations that doesn't need to be pre-initialized.Lance1-3/+4
* Eliminated initializations for pointers returned by calloc. * Moved grfio_final to do_init since it's not used after server boot. * Optimized scripts to return CONSTSTR instead of allocating memory just to return a constant string. Some buildin functions still need work. * Disabled graph since it doesn't work yet. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6355 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-28- Modified HP conversion so that it fails when you don't have enough Hp. ↵skotlex1-29/+68
Also updated it to enable casting on "someone else" (effect: target loses Hp and gains Sp based on the max HP of the caster, will someone ever use this? who knows, but it's nice to have :P) - Cleaned up Strip skills so that the skill animation will only show when something was stripped. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6349 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-28- Storm Kick's range increased to 2.skotlex1-11/+10
- Mobinfo's drop list will use jName rather than Name for drop names. - Some cleaning of the ASC_BREAKER code in skill_attack - Modified skill_attack so that all skills with amotion get their damage delayed (should fix mob walk-teleport issues) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6346 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-28- Removed the sending of the online guild list when you log-on, may fix the ↵skotlex1-5/+6
"getting stuck" problem. - Added battle config default_skill_delay. Specifies the default skill delay for most skills, it is also applied as a walkdelay (total skill walkdelay is default_skill_delay + that skill's can't walk delay) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6344 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-28- skill_castend_id and skill_castend_pos will trigger unit_stop_walking with ↵skotlex1-2/+2
flag 1 (fix pos) rather than none. Should fix some skills making you appear moving while doing them. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6336 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-28- Modified clif_skill_nodamage to allow for a NULL source. This is to ↵skotlex1-34/+10
simplify code related to AL_HEAL/MG_RECOVERY effects where someone shows a healing value, but there's no "caster" in sight (Pitcher skills, Blood Drain, Kaahi) - Updated Kaahi to use clif_skill_nodamage to display amount healed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6335 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-27- Changed in the behaviour of wedding skills, should invoke ↵skotlex1-15/+15
skill_castend_pos when skill_castend_id triggers, should enable all the config settings for land skills to apply to the wedding skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6321 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-26- Updated item_db.sql to current.skotlex1-16/+3
- Some small code-cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6298 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-26- Modified mob_drop_adjust function to receive unsigned int as initial ↵skotlex1-1/+1
parameter, should give a bit more room before data overflows. - Increased range check for Extremity to 2. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6297 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-26- Item use interval is set to a default of 100ms now.skotlex1-28/+6
- Updated Full Buster so that the can't act delay carries on to the weapon attack delay and can't use item intervals. - Added script command getbattleflag to retrieve the current value of a battle_config switch. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6296 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-26- Changed the skill_wall_check to use shoot-path seeking. May fix ↵skotlex1-2/+1
skill_wall_check setting. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6291 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-26* Fixed typo in skill.c: skill_clear_groupLance1-1/+1
* Fixed command descriptions in script_commands.txt * Cosmetic changes to script.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6289 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-25- Renamed skill_clear_element_field to skill_clear_group, it accepts a flag ↵skotlex1-8/+20
to determine what to erase. &1 for elemental fields, &2 for traps. Also rewrote how it works to prevent missing elements (since each time an element is erased, the array contents shift) - Added battle config traps_setting to determine how traps should behave. With &1 traps are invisible if you didn't see them get set up. With &2 traps will be removed after changing maps. The default is 2. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6285 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-25- When battle_damage's flag is &2, the flag 3 is passed to mob_damage so ↵skotlex1-1/+1
that it won't give exp nor items. NPC_SUICIDE was updated to reflect this. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6282 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-25- Moved the mapflag skill restrictions from skill_checkcondition to ↵skotlex1-33/+32
skillnotok, this makes auto-spells not work in maps where they aren't allowed. - Added TK_HIGHJUMP to skillnotok, the skill is blocked in noteleport maps (with the exception of gvg ones) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6281 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-25- Modified and simplified the random item group format. It now is ↵skotlex1-3/+11
<GroupID>,<ItemID>,<Rate>, where Rate normally is 1, greater numbers is the equivalent of adding the line multiple times. - Added constants to identify all groups to db/const.txt - Cleaned up and updated item_db to use these new constants (warning: item_db.sql needs to be updated!) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-24- Added script command escape_sql. It will return an escaped string for use ↵skotlex1-1/+3
in the sql_query script command (in case you want to use input of players in your queries). - Removed the skill packet from TK_RUN as the client ignores the walkok packet sent right after it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6262 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-24- Fixed skill_delayfix not altering delay at all after you reached 150.skotlex1-0/+2
- Applied ers to pet loot drops. - Cleaned up the pet loot drop function. - Mob skill state MSS_ANY won't include MSS_DEAD now. - Added mob skill state MSS_ANYTARGET ("anytarget") which means any state (except dead) on which the mob has a target set. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6250 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-21- SC_CLOAKING's val4 now holds whether cloaking ends or not on attack.skotlex1-1/+6
- Implemented NPC_INVISIBLE, it starts SC_CLOAKING with val4 set to 1, skill duration is 30 secs. - Moved uncloaking on attack from attack_timer_sub to battle_calc_weapon_attack. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6223 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-21- Updated the HP/SP leech structures to have race-data attached to them.skotlex1-33/+12
- Merged all leeching code to battle_drain function. - Added an enum for races (they match the RC entries in const.txt, except they are in all caps) - Cleaned up atk_mods and aspd_base to be MAX_WEAPON_TYPE sized rather than MAX_WEAPON_TYPE+1 - Simplified a bit the code for Signum Crucis - Added script bonuses: bonus3 bHPDrainRateRace,<Race>,<Activation Rate>,<Drain %> bonus3 bSPDrainRateRace,<Race>,<Activation Rate>,<Drain %> bonus2 bHPDrainValueRace,<Race>,<Value> bonus2 bSPDrainValueRace,<Race>,<Value> git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6221 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-20- Cleaned up a bunch of GS/NJ skillsskotlex1-31/+17
- Fixed Gatling Fever crashing server when used by non players. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6193 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-18- Removed message 592 from trade.cskotlex1-3/+1
- Removed mapflag nopvp - Added support for disabling mapflags on a mapflag line: comodo.gat mapflag nomemo <- turns on nomemo mapflag comodo.gat mapflag nomemo off <- turns off nomemo mapflag - Cleaned up and optimized the restricted/zones mapflag. Restricted cards will just not work in disallowed maps rather than blocking the compounded equipement from being used. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6159 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17- skill_clear_unitgroup is now invoked in unit_remove_map only on death if ↵skotlex1-33/+17
the applicable battle setting is set. It is now also invoked in unit_free. - Changed setting clear_unit_ondeath to a type 4 (bl-based) which defaults to BL_ALL. - Fixed Absorb spirit sphere not working on mobs, thanks to Vividd. - Cleared the ud->target on pc_stop_attack to prevent attack resuming an other such oddities. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6145 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17- Fixed TK_RUN having a cast-bar when attempting to stop-running and ↵skotlex1-1/+2
generating timer_delete errors when halting as well. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6135 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-16- Fixed Magnum break's animation not showing if the fire-elemental bonus did ↵skotlex1-5/+4
not start. - Removed some last traces of waterlevel reading. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6120 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-16- Fixed wrong check of Deluge + Suiton which broke the water-requirement ↵skotlex1-1/+1
check for skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6103 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-15- Removed the ->prev != NULL checks in skill_attack due to the fact that the ↵skotlex1-3/+3
code should check elsewhere how it should behave (eg: if traps are not cleared on death, stepping on one afterwards SHOULD cause damage) - Removed use of packet 0x1c9 for skill_unit display, except for Graffiti (which is the only unit which requires the much larger packet) - clif_getareachar_skillunit will sent the unit_id of UNT_ATTACK_SKILLS for traps (this is to prevent them from displaying on the client) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6091 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-13- Halved the aftercast delay of auto-casted spells.skotlex1-4/+4
- Allowed auto-spells to retrigger themselves. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6028 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-13- Changed slave chasing from using unit_walktobl to map_search_freecell + ↵skotlex1-2/+2
unit_walktoxy, since the previous behaviour makes all slaves always end up on the same cell. - Changed some function declarations to take x,y arguments as short rather than int. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6024 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-12- Added cast time to pick stone of 3 secs and 500ms delayskotlex1-7/+25
- Removed area of effect of Assumptio. - Added "can't act" delay update when an auto-spell triggers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6021 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-12- Fixed Landmine's level 1 duration.skotlex1-26/+12
- Cleaned up implementation of BlastMine and Claymore Trap. - Added Freezing trap information to battle_calc_weapon attack. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5998 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Changed clif_damage/clif_skill_damage to return the walk-delay based on ↵skotlex1-21/+34
the passed on damage-delay. - Changed battle_damage to accept the walk-delay as well. - Removed the walk-delay timers from unit.c, merged them to battle_delay_damage. - Traps will not be displayed when you walk within their range. - Added HT_DETECTING revealing traps. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5997 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Added ers handling for skill_timerskill structures.skotlex1-83/+85
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5995 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Implemented use of ers for skill_unit_groups to reduce memory usage. NEEDS ↵skotlex1-81/+92
TESTING git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5991 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Fixed Looted items always dropping in quantities of 1.skotlex1-1/+2
- Removed the check that deletes Magnus Exorcism cells after they hit once. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5984 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Multiple optimizations to the unit_data auto-chase upgrade, also ↵skotlex1-2/+2
simplified the mob and pet ai routines. - Simplified the walk routines to half the number of timers required for walking. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5982 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-09- Added the missing last_thinktime initialization to pets.skotlex1-1/+1
- Reverted the change in skill_Wall_check to let skills go over pits. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5973 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-09- Fixed @npcmove not sending the correct packets to make the moving refresh ↵skotlex1-1/+1
client-side. - Fixed mobs with aggressive + looter mode never looting. - skill_wall_check now also checks for pits so that skill effects don't go through them. - Now you can't leave/be-kicked from a guild inside guild castles. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5969 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-09- Small code cleanups. One should lower a bit function overhead when using ↵skotlex1-1/+1
mob_ai&32 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5967 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-09- Changed the default of multi_hit_delay from 230 to 80 which seems more ↵skotlex1-5/+5
official. - Wedding recall skills are now blocked by the nomemo mapflag. - Skill delay for weapon types is now based on adelay (ASPD) rather than amotion (ASPD/2) - Removed ending Endure when casting Berserk, may fix the timer mismatch issues. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-08- Fixed skill_nocast_db reading so that when the same skill is specified ↵skotlex1-1/+1
multiple times, the blocked effects add up instead of replacing each other. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5960 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-07- Moved the devotion damage reduction to the block that only executes if ↵skotlex1-15/+17
flag is zero in battle_damage. - skill_castcancel won't trigger on battle_damage when the passed flag is 1 - The flag in battle_heal is now used to determine whether Berserk blocks the healing or not. - Moved the Fusion HP penalty to battle_calc_weapon_attack - Some cleaning to use battle_heal/damage rather than pc_heal/damage where appropiate. - cleaned up the deadly-poison hp reduction code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5949 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-07- Added missing creation/destruction of the expcache_ers in guild.cskotlex1-2/+2
- Unified status_remove_buffs/status_remove_debuffs into a single function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5946 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-06- Changed the default of skill_add_range to 0, said value now disables ↵skotlex1-2/+4
skill-range checking when casting ends. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5934 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-05- Fixed a compilation error due to a missing semicolon...skotlex1-2/+11
- TK ranking kicks can't be used on sucession now (can't use any of the kick skills twice in a row without using a different one first). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-05- Modified the ammo checks so that ammo is consumed at the end of ↵skotlex1-6/+18
battle_calc_weapon_attack (should fix element being lost on final arrow). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5914 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-05- Added a define list for weapon types in pc.hskotlex1-11/+12
- Cleaned up pc_checkallowskill and moved the Gatling fever check to it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5912 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-03- Moved skill_counter_additional_effect calls to trigger right after ↵skotlex1-5/+6
skill_additional_effect (which means they trigger at the end of the attack motion for physical attacks) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5888 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-03- Cleaned up (fixed?) a possible overflow in pc_isUseitem, thanks to foobar.skotlex1-2/+7
- When you have the wrong ammo-type equipped the skill-failed message is now "skill can't be used with this weapon", which is less misleading than "please equip arrows first". - Corrected pet-equipment display (I originally assumed they went in the shield view-position, when they actually go in the head-bottom position). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5883 54d463be-8e91-2dee-dedb-b68131a5f0ec