summaryrefslogtreecommitdiff
path: root/src/map/skill.c
AgeCommit message (Collapse)AuthorFilesLines
2006-06-13- Oppositions can't be made during WoE now.skotlex1-6/+5
- Fixed a few compiler warnings from VC - Commented out the Homunculus Skills<->Status Change link which was causing some memory corruptions. - git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7127 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-09Changed the interval between waterballs back to 125,MasterOfMuppets1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7071 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-09* restored all damaged japanese comments in skill.c and converted it to utf8 ↵Lance1-472/+479
[theultramage] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7062 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-08git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7047 ↵Lance1-1/+2
54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-08- Adjusted Don't Forget Me, Defender, Longing to use all val entries, and to ↵skotlex1-1/+1
hold the speed adjustment value rather than speed penalty (eg: 125 instead of 25). - Cleaned up status_calc_speed so that speed penalties are correctly handled (eg: 25% penalty is speed*100/125, not +speed*25/100). Thanks to Euph for pointing it out and Belle for the speed mechanics. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7046 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-08git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7045 ↵Lance1-495/+486
54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07- Added pc_calcexp to calculate individual exp bonuses acquired from exp's ↵skotlex1-3/+3
source (race bonus cards, SG Exp skills, pk-mode higher level exp) - pc_gain_exp now also receives the source of the exp, when said source exists, bonuses are applicated as needed. - Added status_kill when capturing a mob, should take care of the mob not respawning after caputed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7037 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07- Moved souldrain code from skill_counter_additional_effect to mob_dead. It ↵skotlex1-13/+1
should display the skill animation correctly now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7033 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07- Cleaned status_get_sc_tick/status_get_sc_def to use the status_data function.skotlex1-12/+6
- SC_STOP's chance and duration can't be reduced anymore. - Storm Gust no longer has a 100% chance to freeze by passing mdef, now it has a 300% base chance reduced by mdef and the like as explained out by Tharis. - Frost Diver/Frost Nova's base freezing chance is no longer affected by target's int. - Lots of indentation fixes in login_sql/login.c to make it match with stable's layout. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7025 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-06- Hopefully fixed for sure mobs getting extra stats when changing-class due ↵skotlex1-5/+0
to the mobs level up setting. - Removed a piece of code that should no longer be needed due to the combo-skill setting - Added a status_check_skilluse call in Sightblaster to prevent it from hitting hidden/cloaked/act-dead/etc players. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7018 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-06- Fixed firewall counter going down by 2 each hit rather than 1.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7015 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-06- Fixed Soul Burn not zapping away all SP.skotlex1-8/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7012 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05- Fixed a crash when using SL_SMA and the "combo" ain't ready.skotlex1-1/+1
- Hopefully fixed changing a mob's class causing them to get all sort of stat bonuses due to the mobs-level-up setting. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6994 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05- Removed a few useless lines.skotlex1-6/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6991 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05- Fog of Wall won't affect the caster now in any way.skotlex1-2/+3
- Added a missing status_calc_mob on mob_spawn_guardian_sub - Added clif_fixpos packets before attacking for the first time to clear any position sync issues with the client. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6985 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05- Fixed skill_unitsetting using layout->count for the for instead of ↵skotlex1-3/+4
group->count - Added SC_INCDEXRATE/SC_INCAGIRATE. NPC_POWERUP/NPC_AGIUP now correctly increase dex/agi by 40% per level. - Fixed char-sql server not deleting character variables git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6984 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-03Solved the bug that made firewalls only castable a few times until you ↵MasterOfMuppets1-1/+1
relogged. Thanks to Euph for the fix. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6959 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02Changed the interval between waterballs from 150 to 250 milliseconds.MasterOfMuppets1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6944 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02- Some cleaning of the mob slave ai. skotlex1-1/+1
- Moved MOB_SLAVEDISTANCE to mob.h - NPC_CALLSLAVES now uses the slave-distance previously mentioned. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6940 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02- Corrected Brandish Spear to work on levels above 10.skotlex1-3/+2
- Updated Two-HandQuicken, One-HandQuicken to give 30 +2*lv% aspd-rate for skill levels above 10 (meant for boss casted skills) - Fixed Spear-Quicken messing with the calc_flag git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6936 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01- Fixed NPC_SELFDESTRUCTION not showing nor dealing damage.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6919 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01- NPC_TRANSFORMATION/NPC_METAMORPHOSIS will now preserve the original mob ↵skotlex1-10/+4
without removing it when the skill level is greater than one. - Added SC_DANCING declaration in the Status Change tables to signal it modifies Walk speed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6918 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01- Fixed Autoblitz taking into account target's luck rather than attacker'sskotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6910 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01- Fixed Soul Drain not really giving you SPskotlex1-6/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6907 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30- Call Slave now invokes slaves on a 5x5 area around master.skotlex1-2/+2
- AL_TELEPORT will fail when used by slave mobs. - Added NPC_ENERGYDRAIN, NPC_MENTALBREAKER to the list of undodgeable attacks. - slaves inherit speed setting will now work regardless of whether the slave or master has the MD_CANMOVE mode bit. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6865 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30- Fixed Absorb Spirit Spheresskotlex1-10/+3
- Added battle_config min_chat_delay (default 0) specifies in ms what is the min delay between player sent chats (whisper/global/party/guild). Messages that exceed this threshold are silently ignored for now (perhaps need to add a "DON'T SPAM" reply to the player?) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6859 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30[Optimized]: Lance1-3/+3
- clif_specialeffect to use the enums. [Improved]: - buildin_specialeffect and buildin_specialeffect2 to accept effect area definition. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6855 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-29- Modified skill_get_range2 to return range 9 for skills with range 0 for ↵skotlex1-0/+2
Non-Players. This usually signals Self skills, and mobs/pets should be able to use them in other characters. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6820 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-29- Cleaned up some status_get functions.skotlex1-23/+11
- Optimized a bit the SC_PROVOKE code (to use val3/val4) - Fixed draining when the amount drained is negative (invoke zap rather than heal) - Implemented GS_FLING as per the current skill description. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6819 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-29* [Fixed]: Lance1-2/+2
- status.c:920: warning: 'mbl' might be used uninitialized in this function - skill.c:6648: warning: 'matk_min' might be used uninitialized in this function - skill.c:6648: warning: 'matk_max' might be used uninitialized in this function - skill.c:2826: warning: 'sid' might be used uninitialized in this function git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6816 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-28- Added functions status_revive, pc_revive and mob_revive to handle revival ↵skotlex1-26/+25
(it doesn't handles player respawning, though) - Corrected alive, raisemap, raiseall to use these functions. - Updated resurrection/mob-kaizel to use status_revive - Added SC_BLADESTOP to the skill enum at the beginning of status.c (fixes Bladestop causing an unknown status change message) - Fixed MSS_DEAD state skills not triggering. - Corrected some compilation warnings on the merc.* files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6807 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-28- Suppressed compilation warnings (unsigned and signed mismatches)Lance1-8/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6793 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-27- Added structure status_data which holds status-related information (str, ↵skotlex1-11100/+10980
agi, etc, speed, amotion, adelay, dmotion, weapon-damage, race, size, etc) and weapon_atk structure with the weapon specific info (atk, atk2, element) to be used by all combat structures (TODO: Homun needs to be updated to use it) - Cleaned up TBL_PC, TBL_MOB, TBL_PC and mob_db structures to use status_data. - Set the NPC-Change Attribute duration on Time1, updated their max to 1 in the db. - Berserk's HP cost interval is now defined as time2. - Split damage received functions into pc_damage/pc_dead and mob_damage/mob_dead - Rewrote the @heal related functions to use the new status_* healing functions. - Added status functions to deal with damage and healing (status_damage, status_heal, status_percent_change) and a bunch of defines for easier handling of them (status_percent_heal, status_percent_damage, status_fix_damage, status_kill, etc) - Splitted mob_once_spawn into two. mob_once_spawn_sub creates the mob instance without spawning it. - Added defines for Elements (ELE_*) - Modified battle_calc_(weapon/magic/misc)_attack to use the status data structure. - Rewrote and cleaned up battle_calc_misc_attack - Merged config options pc_attack_attr_none, mob_attack_attr_none, pet_attack_attr_none into attack_attr_none (type 4) - Removed config options player_defense_type, monster_defense_type, pet_defense_type in favor of weapon_defense_type - Cleaned up pet.c to stop invoking status_calc_pc when unnecessary - Modified skill_calc_heal to take into account the MEDITATION bonus. - Cleaned up code of Adjustment, Madness Cancel and other GS/NJ skills inside skill_check_condition - Added status change SC_MODECHANGE which handles mob state changes (this SC is continous until manually ended, eg: like Weight50) - Modified Slim Pitcher so it will work when casted by non-players. Will now also work with SP-healing items. - Rewrote Freedom of Cast code to use function status_freecast_switch to switch adelay/speed when cast begins/ends. - Modified Magic Power to store amplified MATK/MATK2 in val3/val4 for easier updating when used in conjunction with ground skills. - Fixed Asura Strike being usable from within a combo regardless of combo skill. - Modifed SC_DANCING to store speed-change in val3 (it is shared with skill duration...) - Added StatusChangeFlagTable to store which statuses are changed by each SC - Added SCB_* constants to specify the different stats that each sc changes. SCB_PC is the only one that means a change hardcoded in status_calc_pc, the rest are handled by status_calc_bl - Added some helper functions to simplify with basic status calculations (status_base_atk, status_calc_misc, status_base_pc_maxhp, status_base_pc_maxsp) - Added status_calc_mob which calculates initial status and special base status alterations (HP changes, stat changes due to big/small mobs, etc) - Made all the status_calc functions static. - Added status_calc_bl_sub_pc for PC related calculations that must happen after status-change adjustments. - Added status_calc_bl which does status-change related calculations using as base the base_status of the bl object and the SCB_* flag passed. - Added status_get_status_data and status_get_base_status to retrieve the bl objects current status_data and basic status_data (current never returns null, instead it returns a dummy structure with basic data) - The main switch in status_change_start now only sets the tick and val values, therefore it is skipped when loading (flag&4) - Cleaned up status_change_start and replaced many of the ex-japanese comments for english ones. - Changed Hiding to store the speed penalty on val3. val4 stores interval SP cost. - Changed Chase Walk to store Speed adjustment on val3, sp cost in val4 - Changed Cloaking to store speed penalty on val3, val4&2 signals wall-present, val4&1 is infinite cloaking. - Changed Wind walk to store speed bonus on val3 - Rewrote Marionette Control to store the status to add/substract in val3/val4, it now works on anyone (players/mobs) - Changed Improve concentration to store Card bonuses (which are not counted for total % increase) on val3/val4 - Changed SC_ADRENALINE, SC_CONCENTRATION, SC_ANGELUS, SC_IMPOSITIO, SC_MELTDOWN, SC_TRUESIGHT, SC_SUN_COMFORT, SC_MOON_COMFORT, SC_STAR_COMFORT, SC_QUAGMIRE, SC_GATLINGFEVER to store the bonus modifiers in their val values rather than calculate them in status_calc_* - Status_change_start/end will use clif_status_load rather than clif_status_change when related bl is not on a map. - Modified status_change_timer to use the status_charge function rather than directly substracting SP - Added SC_ELEMENTALCHANGE to modify someone's base defense element. - pc_clean_skilltree will now also remove item-granted skills. - Learning skills will now only invoke status_calc_pc when the skill is passive. - Cleaned up pc_steal_coin - Cleaned up pc_check_base/job_lvup to only invoke the lv-up related packets and functions ONCE regardless of skill-levls earned. - Cleaned up pc_ regen related functions. - Made player-sprite mobs have item pickup animation and walkdelay when taking items. - Cleaned up mob_dead code. - Removed paramb, parame from struct map_session_data, replaced them by param_bonus[6],param_equip[6] - mob special ai state 3 signals summon flora. - Moved petDB pet_hungry_timer vars from TBL_PC to TBL_PET - Cleaned up some pet functions, made the menu functions receive as argument both pet and master. - Clones will copy a player's base status rather than battle status (so status-change alterations are not cloned) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6791 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-27Fix possible compile mistakes in there. >_>blackhole891-0/+38
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6790 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-26I'm still here!DracoRPG1-2/+2
Rewrote fame ranking lists git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6764 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-25- Simplified ASC_BREAKER by making it a BF_WEAPON attack with an additional ↵skotlex1-17/+1
int-based damage component (which is added right before elemental modifiers). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6760 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-24- Item sharing now shares the same rules as exp sharing (no sharing when ↵skotlex1-2/+0
dead, or idle, etc) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6737 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-24- The clif_skill_poseffect packet will not be invoked in Snap unless the ↵skotlex1-5/+3
skill was successful. May fix the client-position lag. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6734 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-24- Corrected SL KA* spells not working on other Soul Linkers.skotlex1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6727 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-23- Modified battle_calc_weapon_attack to use new flags pdef/pdef (pierce ↵skotlex1-4/+8
defense), Investigate and Icepick will now use the final def/vit-def values rather than the base ones. - The move-enable condition checks for skills are now checked for only when on skill use, not at cast-end time. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6714 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-23- Corrected clif parse name request failing on disguised characters.skotlex1-1/+4
- Corrected Soul Drain draining from all non-ground-based skills including non-magic attacks. - Corrected pc_setoption to change the option and then change class. changing option-wedding will automatically convert the view-class as well. - Corrected the 15% drop rate increase when killing higher level mobs in pk-mode triggering for all mobs with lower level than yourself. Thanks to Vayu. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6709 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-22- Updated skill_delayfix to return 0 for mobs since they have no skill delay ↵skotlex1-0/+3
other than the one specified in mob_skill_db git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6699 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-21* Player must learn the skill before doing auto-spell Lance1-3/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6673 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-19- Corrected number of water-ball hits when used by mobs and not consuming ↵skotlex1-4/+10
deluge cells when using lv1 (Thanks to Kyoki). - cardillust_read_grffile, item_equip_override_grffile, item_slots_override_grffile, and item_name_override_grffile are set to 0 after map-server loads to prevent crashes on item_db reloading. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6656 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-18- Some code cleaning of the skill reiteration/nofootset code.skotlex1-24/+12
- skill reiteration code now does not checks for the trigger-area of the skill in the case of non-players, which means mobs can now place traps in cells adjacent to each other. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6640 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-18- NPC_AGIUP will now give movement boost of 50%skotlex1-3/+7
- Fixed WZ_WATERBALL number of hits when used by non-players. - MO_BODYRELOCATION will send the slide packet with the actual src's coordinates rather than selected tile. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6638 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-17- Power Up and Agi Up now increase Hit/Flee by 20%/lvskotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6629 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-16- Fire Pillar will now do 200%MATK damage per hit when level is >10.skotlex1-1/+10
- Blood Drain always hits now. - Fixed Mob Area Skills not updating their use-time (rendering their skill delay useless) - Search free cell will now skip picking the center-tile as target location. Will prevent slaves from walking on top of their master, or mobs placing stuff right under themselves with the "around" target conditions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6621 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-15- Soul Drain will now show the SP drained regardless of drain display settings.skotlex1-21/+21
- SC_COMBO state will now end in skill_attack rather than skill_check_condition (as it is required there to apply damage bonuses based on combo-casted skills) - Spirit skills now have 500ms delay. - KA skills can now be casted on other Soul Linkers as well without the Spirit requirement. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6607 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-15- Fixed the nocast flag 2 (not usable in pvp) returning true in pk-mode servers.skotlex1-4/+6
- When removing a castle's owning guild, the char servers will erase the guardian data now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6602 54d463be-8e91-2dee-dedb-b68131a5f0ec