summaryrefslogtreecommitdiff
path: root/src/map/status.c
AgeCommit message (Collapse)AuthorFilesLines
2006-07-04- Added structure s_addeffect to handle status change additions. Cleaned up ↵skotlex1-6/+2
relevant code. It is now possible to specify ANY status change, not just the basic ones. - Added support for bonus3 bAddEff/bAddEffWhenHit as follows: bonus3 bAddEff/bAddEffWhenHit, <SC value>, <rate>, <target flag>. Target flag is 0: Self. 1: Enemy. 2: Both. - Added these descriptions to doc/item_bonus.txt git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7514 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-03- Warmth will dispel when warping now (or else the effect is left on the ground)skotlex1-2/+2
- Fixed reading of the refine_db not working right when MAX_REFINE is increased from 10. - Some more cleaning to the implementation of Abracadabra git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7456 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-03- Fixed a compile warning in login sql/txtskotlex1-1/+1
- Fixed pc_makesavestatus not setting your logout position. - Fixed the UF * flags of Songs/Dances in skill_unit_db. - Fixed two dances becoming BA_DISSONANCE instead of DC_UGLYDANCE. - Added the missing +100% damage modifier of Enchant Deadly Poison. - Fixed SkillStatusChangeTable not working correctly for Homun/Guild skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7454 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-30- Removed the check to prevent equipped items from being traded as ↵skotlex1-0/+2
pc_delitem will take care of unequipping it on trade. - Added a missing abort when the arrow's script re-calls status_calc_pc git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7436 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-29- Some indentation corrections.skotlex1-0/+6
- Ending SC_CLOAK/SC_HIDE/SC_CHASEWALK will now trigger ontouch npcs. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7394 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-27- Fixed indentation on int_pet.c (how did it got messed up?)skotlex1-1/+8
- Added mapflag "loadevent", now load-map script events will ONLY trigger on maps with this mapflag on, rather than every map. - High Jump can now be used in all versus maps. - Added Kaite's opt3 value, taken from jA - Added state dirty == 2 to storages. Signals when a storage was sent for final saving. Said storage is removed from memory after the ack from the char-server, and they are sent to save if the map/char servers reconnect before the act arrives. In short: they are guaranteed to be saved after a char logs out. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7358 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-27- Corrected the element of hunter traps.skotlex1-1/+3
- Deadly Poison now also reduces def2 by 25% - Changed skill_setmapcell to use skill splash rather than range. - Cleaned up a bit skill_moonlit, now it knocks back the correct amount of cells. - Fixed @mi displaying always 0 instead of the mob's class. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7351 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-26- Forgot to add Tatami Gaeshi's 3 sec block of ranged attacks.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7345 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-26- Corrected unit id of desperado and Ground Drift using jA's info.skotlex1-14/+18
- Rough implementation of Ground Drift according to description and jA info. - Implemented Tatami Gaeshi using skill description and jA implementation for reference. - map_foreachinpath calls will no longer go beyond the target point, as this function is required for skills other than SharpShooting now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7344 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-23- Updated BD_INTOABYSS's unit flag to not affect mobs.skotlex1-2/+2
- Changed setting for skill_nocast flag 16. It is no longer a "pk-mode map" setting, it's now a clone-forbidden skill. That is, skills with the flag 16 will never be copied by clones. If you use a PK-mode server, use flag 2 now to forbid skills from common maps. - Default skills from not being cloned are Magnus Exorcism and Turn Undead. - The map search free cell will now use the size of the map # of tries before giving up when the spawn area is the whole map. Added a check to inmediately give up when the number of spawn retries has reached the max specified (no_spawn_onplayer = 100). - Cleaned up a bit the clone code to account for the unit flags UF_NOPC/UF_NOMOB when the skill is not ground-based (accounts for self skill that causes a ground-tile to be placed, like Dances). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7315 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21- Added function parse_hostbyname() which takes a hostname and a char[4]. ↵skotlex1-0/+16
The hostname is resolved to an ip, whose individual components are stored in char[], the return value of the function is the inet_addr result of the lookup (or returns 0 when failed). Meant to be used in the rest of the code without the need to do socket/network related includes. - Applied use of parse_hostbyname() in chrif.c to fix compilation errors. - status_percent_change will now account for when the target's max hp/sp is above INT_MAX. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7281 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-20- Updated skill_require_db to place the Zeny requirements of ZenyNage and Fling.skotlex1-5/+16
- Fixed crash when non-players use ZenyNage. Added the correct Zeny check in skill_check_condition, fixed the skill so that it's damage is based on whatever zeny is specified in skill_require_db. - Can-act delay will not be reset when warping now. - Fixed Quagmire not altering walking-speed. - Silence now blocks skills both on begin/end casting. - Updated status_calc_bl so that when walking speed changes, the character is made to rewalk so that the new speed takes effect inmediately. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7264 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-19Reverting my change.. lalalaLance1-3/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7252 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-19- Some cleanups and corrections in battle.c to account for negative ↵skotlex1-1/+0
(absorbed) damage. - Fixed umbala.txt's Elemental Stones Quest bug. Thanks to Vhan Morthis. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7250 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-19* [Fixed]: Lance1-2/+5
- Typo in status.c add_sc() using 'skill' instead of 'sk' as index, resulting in filling the SkillStatusChangeTableArray with junk data. - > NEEDS CONFIRMATION < Ends casting if player is knocked with freezing/stun/whatever git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7241 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-17- Devotion absorbed damage will now appear to come from oneself (instead of ↵skotlex1-1/+1
the original attacker changing directions towards the Crusader) - Updated clif_refres to send inventory, cart, and weight info. - Fixed intif_guild_memberinfoshort to not leave a dangling pointer when someone logs out <.< - Cleaned up a bit guild_check_member git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7226 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16- Removed unused variable aspd_rate in map_session_data.skotlex1-34/+34
- Modified aspd_rate in status_data to hold aspd change on a base of 1000 = 100% rather than 100 = 100%. All status changes that affect aspd have been updated. Study and Single Action should now correctly give +0.5% aspd per level. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7213 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16- Modified the bNoMagicDamage/bNoWeaponDamage bonuses to be a 0-100 setting. ↵skotlex1-2/+2
Meaning you can do bonus bNoMagicDamage,50; To make all magic damage be reduced by half. This bonus stack, so two cards with bNoMagicDamage,50 will give magic immunity. - Removed setting gtb_pvp_only and replaced it with gtb_sc_immunity which specifies the threshold before the bNoMagicDamage starts blocking support statuses as well. ie: gtb_sc_imunity: 75 will mean that "bonus bNoMagicDamage,70;" reduces magic damage by 70%, but does not blocks heal or support status, while "bonus bNoMagicDamage,80;" does. - Updated GTB's card script to be "bonus bNoMagicDamage,100;" git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7212 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-15- Altered a bit how status_set_viewdata behaves in regards to Wedding/Xmas ↵skotlex1-4/+12
options. - Added back OPTION_XMAS, but the actual value is missing! - Corrected chrif_save so that the player is not set offline on map-change. - Added change-look support in pc_setoption when specifying OPTION_XMAS - Fixed clif_parse_RemoveOption removing all options instead of just Falcon/Cart/Peco git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7183 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-15- Fixed clif_send not sending packets to SELF when specifying AREA if the ↵skotlex1-11/+1
source is not on the map yet. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7180 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-15- Fixed and cleaned up script command 'equip'skotlex1-1/+1
- Fixed 'autoequip' items. - Fixed Aspd not being updated in your status window after Agi/Dex increasing statuses take effect. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7179 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-14- Modified how luk reduces status changes by reducing the gap. Eg: resist = ↵skotlex1-19/+35
vit; resist += (max - resist)*luk/300; - Added battle settings pc_max_sc_luk/mob_max_sc_luk to handle which is the luk threshold at which you gain inmunity (defaults to 300). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7168 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-14- blocked again skill usage during marionette.skotlex1-3/+3
- Some minor code cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7162 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-13- Marionette and Devotion will now check raw distance and ignore obstacles ↵skotlex1-2/+2
and the like. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7134 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-13- Added HM_SKILLBASE, MAX_HOMUNSKILL to specify the skill level range of ↵skotlex1-41/+66
Homunculus. - Added support for reading correctly status change data from Guild and Homun skills. - Added support for reading Homun skill data (which means the HM skills are now safe to add to skill_db, skill_require_db, etc) - Moved StatusSkillChangeTable to StatusSkillChangeTableArray and made a function called StatusSkillChangeTable to do the conversions taking into account HM/GD skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7128 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-13- Oppositions can't be made during WoE now.skotlex1-5/+6
- 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-12- @heal no longer displays a healing animation. Fixes the client believing ↵skotlex1-1/+8
you couldn't be healed more than 32K. - Now you can use any skills (except encore/dancing ones) while under Longing for Freeding. - Now you can use any skills while under Marionette Control. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7111 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-12- Made guild member exp an unsigned int.skotlex1-7/+14
- Modified npc_click to receive the bl that was clicked directly. Also cleaned it up so it isn't as easy to crash the server with invalid ids <.< - Moved npc_checknear to npc_checknear2 and added npc_checknear. The near version receives a bl, checks it's validity, and returns a TBL_NPC object, near2 does the same but doesn't checks for type NPC. The first returns a pointer, the second returns 1 on fail, 0 success. - Also uncommented various npc_checknear calls in the code, who's idea was to comment them out so you could exploit npcs from afar with custom packets? - Added overflow checks for bonus settings mdef_rate/def_rate. - Added missing update of INT after a buf. - Small cleanup of how SC_BLEEDING works. - Fixed party_foreach_samemap invoking the function on the CASTER instead of on the party members. - Added clif_parse_ActionRequest_sub to handle player commands, is used from npc_click or any other function that needs to "re-route" a player's request. - Modified clif_parse_NpcClicked to handle the different situations with different bl-objects (attack on players/mobs, click on npcs or mobs with npc attached) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7103 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-08- Adjusted Don't Forget Me, Defender, Longing to use all val entries, and to ↵skotlex1-30/+40
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-07- Added pc_calcexp to calculate individual exp bonuses acquired from exp's ↵skotlex1-1/+0
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- Adjusted status resistances and durations taking as base Viccious's info ↵skotlex1-25/+32
from the kro guidebook. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7034 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07- Adjusted several sc rate/time reductions as pointed out by Playtester.skotlex1-13/+7
- Luk now plays a luk/10 reduction role rather than a luk/3 one. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7032 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07- Cleaned status_get_sc_tick/status_get_sc_def to use the status_data function.skotlex1-35/+29
- 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-2/+3
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- The monsters can level up setting will not take effect when the mob's ↵skotlex1-1/+1
level is LESS than their db counter-part (should prevent under-leveling causing underflows and semi-immortal mobs) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7005 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-06- cleaned up status_check_skilluse some to use status_data variables.skotlex1-30/+44
- Fixed mvp-exp calculations being messed up with more than one attacker. - Changed the mob exp race bonus so that each player gets their own bonus, rather than the killer's bonus applying to everyone. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05- Fixed a crash when using SL_SMA and the "combo" ain't ready.skotlex1-1/+2
- 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- Cleaned up code for SC_MINDBREAKER.skotlex1-48/+61
- Changed hit, flee, cri, flee2, def2 and mdef2 to signed short, def, mdef to signed char to correctly account for cards with penalties in said stats. - Added cap_value checks in all of the status_calc_* return paths to make sure no stat is invalid. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6986 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05- Fixed skill_unitsetting using layout->count for the for instead of ↵skotlex1-2/+7
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-05- Corrected cloaking not ending on attack if you are near a wall.skotlex1-3/+1
- Moved define cap_value to map.h as it's quite handy. - Updated pc_bonus to use cap_value on all status_data modifiers to prevent overflows/underflows. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6979 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02- Moved setting a mob's level from mob_spawn to status_calc_mob, resetting ↵skotlex1-1/+9
their level on death has also been removed (as it is handled now on spawn) - Fixed a bug in status_revive - Updated Holy Cross, Investigate and Finger Offensive to be usable by all weapons. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6938 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02- Corrected Brandish Spear to work on levels above 10.skotlex1-12/+19
- 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-02- Fixed Freeze/Stone/Benedictio not changing your elemental LEVEL to 1.skotlex1-1/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6931 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02- Uncommented the npc_debug_warps code.. oops.skotlex1-5/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6930 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02- Corrected some signed/unsigned comparisons corrections which were incorrect.skotlex1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6926 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02- Altered status_calc_pc so that equipment scripts are ran before card-scripts.skotlex1-77/+74
- Fixed pc_bonus to not underflow/overflow when adjusting def/mdef. - These two together, should fix Tao Gunka Card. - npc_debug_warps() will now be invoked if warp_point_debug is set. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6925 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01- NPC_TRANSFORMATION/NPC_METAMORPHOSIS will now preserve the original mob ↵skotlex1-0/+1
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 pc_damage setting your canlog_tick even if the damage has no source ↵skotlex1-2/+4
(eg: poison, berserk) - Berserk's aspd bonus now stacks with other aspd bonuses, and is unaffected by Quagmire/Forget-me-not. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6916 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01- Some small cleanups on status_calc_petskotlex1-7/+12
- Fixed one valgrind error report. - Added back the Freeze/Petrify adjustments of -50%def and +25%mdef (when where these lost?) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6903 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31- Removed typedef bool from socket.h and included cbasetypes.c instead.skotlex1-24/+24
- Cleaned up and corrected the calculation of hit/flee/cri/lucky dodge in status_calc_bl. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6890 54d463be-8e91-2dee-dedb-b68131a5f0ec