summaryrefslogtreecommitdiff
path: root/src/map/battle.c
AgeCommit message (Collapse)AuthorFilesLines
2006-03-30- the auth function in login.c won't jstrescapecpy passwords that were ↵skotlex1-14/+31
encrypted. - Moved the Endure and Gravitation sc ends to battle_damage from pc_damage. - Endure level 11 and above are now considered infinite-endure. - Set the minimum pet hungry delay to 10 - modified function skill_delayfix to only receive skill/lv, actual time is now always acquired from skill_get_delay. It also now will never return a value below min_skill_delay_limit. - Modified brandish spear so you won't see the skill-animation for every targetted mob. Also cleaned it up to use map_foreachincell calls. - splitted skill_cast_fix into skill_cast_fix and skill_cast_fix_sc, the first does cast adjustments based on dex and server settings, the later only based on sc changes. Mobs use the later while everyone else use the former (which invokes the later when appropiate) - Added the Steel Body icon to auto-berserk. - Now you can't cast auto-counter while the previous one is active. - For the duration of Berserk, infinite-endure is activated. - Added Veider's suggestion to do a hack-report when players request the name of an invisible/cloaked character. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-23- Fixed Potion Pitcher sometimes crashing the server.skotlex1-7/+7
- Fixed a compile warning by adjusting the acid demonstration formula. - Added flag 2 to the skill_castnodex_db file for skills that shouldn't be affected by delay/cast reducing skills/effects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5714 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-22- Merged the unit_data structure from jA for handling unit-related data ↵skotlex1-323/+96
(attack times, walking, auto-attack timers, skill related data) - Modified unit_skillcastcancel to receive flag&2, which stands for "cancel casting only if current skill is cancellable" - Battle config options changed from yes/no to BL_TYPE settings: skillrange_by_distance, skill_noreiteration, skill_nofootset, gvg_traps_target_all, skill_log, attack_direction_change, auto_counter_type - Clif.c will disconnect sessions that send an unknown command packet above 0x30000 instead of just ignoring it. - Cleaned up/rewrite of the pet ai, same for pet_calc_pos - Implemented use of mob variable attacked_players as it is used on jA - Cleaned up error reporting during mob-skill loading to be less spamy with non-loaded mobs. - Corrected water_height reading. I forgot to give credits to LittleWolf for providing the water-reading function :X git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5707 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-22fixed Piercing shot, desperado, fullbuster damageVicious1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5705 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-22- Some cleanups in irc.cskotlex1-2/+4
- Changed ASC_BREAKER's cast to 700ms - Magic skills that ignore element now also don't take into account elemental cards. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5702 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-22* Fixed compiler warnings in battle.c Lance1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5700 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-22[reddozen's fix]Lance1-5/+6
- Updated Full Buster's damage, status effects, and skill levels - Bullseye now only uses 1 coin - changed Adjustment's required SP - changed Incerase Accuracy's effect bonuses - changed Magical Bullet's SP cost - changed Piercing Shot's damage and SP - changed Desperado's range, hit count, aftercast delay, and SP - fixed Absorb Spirit Sphere being able to remove coins - changed Acid Demonstration's damage to the new Japanese formula git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5699 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-21Fixed duel in pk-mode (same party/same guild/alliance non-targeting issue).LuzZza1-3/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5696 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-20- Small fix to prevent killer/killable states from allowing you to target ↵skotlex1-2/+2
yourself. - Added Explosion Spirits to list of effects that dispel on logout. - Fixed handling of guild skills by pc_blockskill_start, renamed it to skill_blockpc_start as it needs some constants available only in skill.c - Fixed autoguard icon showing with stun. - Fixed splash area of Ganbantein - Fixed acid demonstration breaking shield instead of armor. - Fixed Slim Pitcher crashing server ocassionally. - Hopefully fixed Ankle Snare lasting the whole trap's duration - Added sc_start(SC_ENDURE) on infinite endure bonus. - Fixed Berserk Pitcher consuming required items twice. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5681 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17- Fixed handling of the char_gm_read config for packet 0x2af7 (reloadgmdb)skotlex1-0/+5
- Added battle_config debuff_on_logout which removes Asura's SP regen delay and Strip-Equip effects on logout when set to yes (default). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5644 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-16Update NJ_ZENYNAGE to deal a random ammount of damage depending on its skill ↵MasterOfMuppets1-2/+6
lvl. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5632 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-15- Added battle config options item_rate_adddrop, item_drop_add_min and ↵skotlex1-0/+6
item_drop_add_max to control drop rate of card-acquired loot bonuses. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5610 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-14- Fixed incorrect range check in autospell2 triggers.skotlex1-12/+14
- Modified Wedding recall skills to behave as in officials. - Modified Arrow Shower to be a ground-based skill and work as it should on officials. - Fixed skill_additional_effect triggering every time you were being hit even if no damage was returned. - Fixed battle_calc_damage_return to make magic damage be returned by 100%, and received damage nullified git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5598 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-14- Status_check_skilluse again does the status_isdead check, but only on ↵skotlex1-1/+1
non-skills checks. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5597 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-13- HW_GRAVITATION now ignores elemental modifiers.skotlex1-1/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5591 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-13- Added function battle_calc_gvg_damage for gvg related damage reductions. ↵skotlex1-48/+91
Fixes Gravitation being reduced as well as Pressure overriding max-castles restriction. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5588 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-13- Corrected char-server parameters so that the subnet config file is the ↵skotlex1-0/+1
third parameter, not the second (which was conflicting with inter_athena.conf's argument), thanks to foobar. - Fixed TK and Soul Linker's position of their job entry in exp2.txt, thanks to Coltaro. - Fixed NPC_GRANDDARKNESS targetting the enemy instead of yourself in mob_skill_db. - Fixed Grandcross's hit and range entries in the skill_db (it had hit 5? that wasn't even a valid value from the description) - PR_BENEDICTIO now ignores mdef - Removed the status_isdead checks from status_check_skilluse, they are now done only on the skill_castend_* functions. - Fixed NPC_SELFDESTRUCTION not doing the correct damage to oneself. - Fixed chatlog's x/y column capacity. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5584 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-11more ninja/gs workVicious1-3/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-10- Cleaned up the Skillbreaker implementation, HP gaining happens at level 5 now.skotlex1-2/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5567 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-10- Changed div behaviour. Skills with div above zero will get their total ↵skotlex1-39/+46
damage increased by the number of hits, div less than zero is just for "show", total number of hits displayed is abs(div), but damage isn't increased by number of hits. - Adjusted several skill damage equations to make up for this. - Moved the Shield Chain soul-linked bonus to the second layer. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5564 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-10GS_MAGICALBULLET implementation: declaring variables after case: without ↵blackhole891-3/+5
defining a block of {}, using something weird called atn_rand(something) instead of just rand. Fixed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-10some ninja/gs workVicious1-5/+21
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5561 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-09fixing max_weapon_sizeVicious1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5541 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-09- Made Magic Crasher a BF_WEAPON attack.skotlex1-1/+1
- Made skill_unit_range a per-level setting. meteor and Lov now have their unit range adjusted in the skill_unit_db rather than hardcoded. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5536 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-09more ninja/gs updateVicious1-3/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5535 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-09- Moved a bunch of sc_effects that should be cancelled on hit from ↵skotlex1-0/+10
mob_damage/pc_damage to battle_damage. - Changed ITEM_NAME_LENGTH to 50. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5533 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-09* included MAX_WEAPON_SIZE for flexible weapon typesVicious1-17/+24
* more ninja/GS work git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5527 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-09more skill fix.Vicious1-0/+25
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5524 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-08Some more skill fix.Vicious1-2/+17
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5522 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-07some random battle.c edit. /hoVicious1-1/+59
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5504 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-07- skill_blown flag&0x40000 now knocks back in a random direction.skotlex1-0/+3
- Some small cleanups to prevent skill_blown execution when the distance is 0 or the target couldn't be knocked back. - WZ_STORMGUST now knocks back on a random direction. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5484 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-07- Some corrections due to the guild skill position change.skotlex1-1/+1
- Removed file todo-for-stable as it's impossible to keep it updated :X git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5479 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-06- Fixed a debug message showing up on skill castend nodamage id when using a ↵skotlex1-0/+2
guild skill - Fixed #save not working on maps not in the current map server. - Added battle config clear_skills_on_death to decide whether all ground-based skills should be removed when you die. Defaults to yes. - Changed Magic Crasher's element to -1 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5472 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-04- Fixed missing baby-dancer job in exp2.txtskotlex1-45/+39
- Added function battle_set_walkdelay in charge of updating walkdelays of characters based on two criterias: when the delay is induced by damage, if the current walk delay isn't over yet, do not update it. If the delay is instead caused by a skill, then the current walk delay cannot be decreased, only increased. - Removed the canmove tick reset on skill cast cancel; likewise it isn't updated on begin casting. pc_can_move uses a skilltimer check to know whether you can move or not. - Added GrandCross's can't move delay of 900ms to skill_cast_db - Added Finger Offensive's can't move delay of 200ms/lv to skill_cast_db git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5457 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-04- The rate passed to status_change_start must now be in 0->10000 range.skotlex1-4/+4
- Added macros sc_start and sc_start4 to simplify invocation of status_change_start. - Cleaned the active guild skills, requirements moved to skill_check_require, should now be usable by non-players as well (pets/mobs). - Updated skill_cast_db time info. Magnum's time2 is skill-block time, St. Recovery/ Cure's time2 is the confuse/blind duration, added NPC_POWERUP/NPC_AGIUP durations, Napalm Vulcan's time2 is curse length, and most of Tarot Card's effects last time2 as well. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5454 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-03- Added event 8 for mobspawns that should spawn with special ai set.skotlex1-2/+4
- Modified battle_check_target so that mobs with special ai's default enemy are mobs with no special ai. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5448 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-03- Added the skill-related variables to pet_data, removed the pet skill delay ↵skotlex1-2/+1
structure. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5440 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-02- Gospel no longer blocks item usage of whoever is in the area of effect.skotlex1-0/+6
- Added the long/near attack_def_rate card effects to battle_calc_magic - Cleaned up a bit the slim pitcher code. - Elemental fields should vanish on map-change now. - Land Protector only blocks magical skills. - Adjusted the duration of blind/bleeding of Meteor Assault git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5426 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-01- Turn Undead and Offensive Resurrection should now work on undead players.skotlex1-4/+9
- Fixed the range checking of Repair weapon - Rude attacked is now also triggered when you hit a target that can't move out of their melee attack range. - Mob ai will attempt to do a long-range attacked condition skill before unlocking a target when it is attacked and said target is out of melee range of a non-walking mob. - Corrected mobskill event to set the target_id before triggering. - Moved MSC_SKILLUSED trigger to mobskill_event which is triggered in battle_calc_damage. It is also triggered on skill_castend_nodamage_id - Added party_share_loot for handling party-share loot. it should now work with autoloot as well. - Fixed skill_break_rate breaking stuff even if the rate is 0. - pc_stopwalking will not send a fixpos packet if you are sitting. - mob_can_reach rude-attacked condition now uses the mob's field of view. - SC_NOCHAT is automatically started on pc_authok if manner is negative. - Map server now refuses to start if you try to define a label with the same name as some const.txt defined character parameter. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5414 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-23- Modified the way autospells stack to mimic official servers. Cards of the ↵skotlex1-0/+2
same ID cannot stack, but different cards with the same skill can each trigger indepedently of each other. - Added battle_config autospell_stacking to enable stacking of cards of same ID. - Moved card-specific battle options to items.conf - Autospells triggered when hit will check the range to the target. - Some cleaning up of status_calc_pc - In status_change_start capped the passed success chance to 100% git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5377 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-22- Removed pc_break_equip, added function skill_break_equip which handles ↵skotlex1-24/+14
rates, defenses and all that. On non-players it causes the strip effect for the corresponding skill lv1. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5374 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-21- Vending is now cancelled on a pc_setposskotlex1-1/+1
- Pressure again ignores Basilica. - Fixed attacker's sc being nulled when the target's sc is empty. - Slaves now do a battle_check_target to check if the new target is an enemy when acquired through sd->skilltarget. - Fixed SC_SKE halving defense2 twice. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5355 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-20- Fixed Taekwon stances not triggering.skotlex1-2/+1
- Added atcommand @exp - Added error reporting when add_timer_interval receives a negative/0 interval value. - Fixed a possible infinite recursion bug with splash self skills. - Modified the way firewall_hits_on_undead works, to loop and invoke multiple skill_attacks based on the value. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5338 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-18* Implemented SG_MIRACLE (Miracle of the Sun, Moon and Stars)Komurka1-1/+14
- duration is stored in battle_config.sg_miracle_skill_duration (currently it's set to 10 minutes) - ratio is stored in battle_config.sg_miracle_skill_ratio (currently it's set to 0.01% chance per character move) - this skill enables you usage of all Warmth skills, Comfort skills, and also all mobs will be target of the Stars regardless of the day and map - you'll see message "[Miracle of the Sun, Moon and Stars]" when skill kicks in git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5323 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-17- Added NK value 3: No damage + area of effect skill (NK_SPLASH_NO_DAMAGE)skotlex1-35/+19
- Removed the double-cast specific code and made it use skill_addtimerskill instead. - Modified party_foreachsamemap so that it returns to addition of the return value of the functions invoked. Type has been changed for "range", when 0, it scans all party members in the map. - Updated most skill/battle code to use map_foreachinrange rather than map_foreachinarea. - map_foreachinrange does not performs an exact range check anymore. However the relevant code is commented and anyone can enable it. - Updated most skills to use skill_get_splash instead of hardcoded ranges. - Added function skill_get_casttype which returns the type of function that should be invoked for that skill: skill_castend_pos, skill_castend_nodamage_id or skill_castend_damage_id. - self skills are sent to skill_castend_nodamage_id regardless of nk (nk should signal if the skill causes damage above everything, it is used on autospell/effects). - Due to the previous change, self skills where the target and src are different, and don't have an nk of no damage, they are sent to castend_damage_id (assumed target auto-selected skills) - Applied the relevant updates to db/skill_db.txt, db/skill_unit_db also got updated, as trap ranges should all be 1, the splash damage range is defined now in skill_db - Cleaned up the implementation of the code related to Gangster's paradise and TK_HP/SPtime git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5313 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-15- Added battle config option pk_level_range for specifying valid level ↵skotlex1-8/+19
ranges to engage in PK - Added battle config allow_es_magic_player to enable SL_S* skills to work on non-mobs. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5290 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-15- Fixed the char servers to store correctly exp as uints. They are also ↵skotlex1-1/+1
capped to LONG_MAX before being sent to the client. - TK_DODGE now dodges all ranged attacks, when used with SPURT, dodges everything. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5289 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-15- Made the warm skills BF_WEAPON type so that they may trigger effect cards.skotlex1-13/+24
- Also changed their pl to -1 so they carry the elemeso they carry the element. - Warm skills now damage other players for 60sp per hit. - Warm skill damage interval decreased to 100ms instead of 1000ms. - TK_DODGE now only dodges ranged weapon attacks, while under Spurt mode it dodges everything. - Cleaned up and expanded the sc_def_rate battle config. The new battle flags are mob_sc_def_rate, pc_sc_def_rate, mob_max_sc_def, pc_max_sc_def - Modified Marionette Control so that the max bonus stats you get is capped to your server's defined max stats instead of 99. - Mobs are no longer affected by the vs_traps_bctall switch. - Added function pc_damage_sp to damage the SP of players. - Modified Warm skills so that it only hurts SP of players while attacking/knocking back mobs. - Autospell loop breaks after one skill is successful. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5288 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-15- Some cleaning of the slave moving code.skotlex1-1/+1
- Fixed the icon for Provoke not showing. - Fixed skill_timerskills (type was not being stored, water-ball at least got broken, doing only 1 hit always) - pc_setinventorydata won't try to set data for positions with no item. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5283 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-14- Hiding cancels Close Confine.skotlex1-2/+2
- Added the move enable condition to High Jump and Jump Kick. - ST_MOVE_ENABLE now also checks for pc_can_move(), and only perform a walk check if the skill is ground targetted. - Moved the berserk_cancel_buffs code to status_change_start. - Moved most checks of status_isimmune() to status_get_sc_def - Allowed Endow skills to go through status_isinmune characters. - Added variable type to skill_castend_nodamage_id which holds the value of SkillStatusChangeTable[skillid] to simplify code reading afterwards. - Fixed PR_BENEDICTIO not taking away all SP - Fixed the most horrible typo ever. (SC_STAN -> SC_STUN) - Added StatusSkillChangeTable which returns the Skill for a given SC. Used in skill_additional_effect for SC cards. - Removed the whole ugly static implementation of SkillStatusChangeTable, see status_initChangeTables() for new format which is much easier to read. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5278 54d463be-8e91-2dee-dedb-b68131a5f0ec