summaryrefslogtreecommitdiff
path: root/src/map/battle.c
AgeCommit message (Collapse)AuthorFilesLines
2006-05-05- OnEquip scripts will be trigger on log-on now.skotlex1-2/+2
- Infinite Endure will no longer give mdef bonus. - Removed bInfiniteEndure bonus, Eddga card now uses onequip/onunequip to start/end infinite endure. - Hammer fall's stun duration is now 1+lv seconds. - Fixed Kaahi's SP cost per heal. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6487 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-03- Kaite, Kaute will now show a skill effect when they trigger.skotlex1-1/+1
- Fusion's cast time reduced to 0. - Knowledge will now only trigger if you logon to the memorized map, not walk into it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6462 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-03- Fixed standing up not really standing you up.skotlex1-48/+16
- Moved battle_consume_ammo to the end of skill_castend_damage_id, skill_castend_nodamage_id and skill_castend_pos2 rather than battle_calc_weapon_attack. They will trigger when the player's arrow_atk state is active and a ground skill was not invoked. It should fix all issues with splash/ground skills consuming ammo per target rather than once per skill use. - Added structure state to the ground skills, their fields are magic_power, into_abyss and ammo_consume to indicate the states that were previously stored in val3. - Corrected Desperado ammo consumption (should be 10) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6455 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-02- Kaite now works against all types of spells.skotlex1-6/+9
- Kaupe now works against all skills. - Sanctuary now won't damage non-enemies. - Blessing now will always give you bonus stats even if you are wearing undead armor. - Linking skills now have their cast-time reduced by dex. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6447 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-02added support to regulate MVP drops [Reddozen]reddozen1-0/+10
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6439 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-30- If someone is expulsed from a guild while the guild storage is open, it ↵skotlex1-1/+7
will be auto-closed now. - Modified battle_consume_ammo to prevent consuming multiple arrows on AC_SHOWER. - Readded script command skillpointcount. (who removed it? <.<) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6406 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-30- Removed attack_type from sd->state structure (it's only use was for ↵skotlex1-3/+0
soul-drain!) - Moved the soul-drain code to skill_counter_additionaleffect git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6392 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-29fixed STEAL. now workingLupus1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6378 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-29Updated STEAL skill (WIP), added a battle config option: ↵Lupus1-0/+5
'skill_steal_max_tries' to set max number of stealing tries. It could help to fix stealing exploit on mobs with few drops git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6367 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-29- Clones can't be class-changed nowskotlex1-1/+2
- Readded the class == -1 distance check in npc_checknear - Replaced check sd->trade_partner for sd->state.trading in clif.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6356 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-28- Removed the sending of the online guild list when you log-on, may fix the ↵skotlex1-0/+3
"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-27- Corrected the hit value of the TK kicks (from single hit "6" to multi-hit "8")skotlex1-0/+2
- All kicks do 3 hits now. - Added battle config hide_woe_damage which hides damage on woe maps packet-wise. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6311 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-26- Updated item_db.sql to current.skotlex1-2/+0
- Some small code-cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6298 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-26- Item use interval is set to a default of 100ms now.skotlex1-16/+13
- 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-25- Renamed skill_clear_element_field to skill_clear_group, it accepts a flag ↵skotlex1-0/+2
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-24- Added new column to mob_db Sprite_Name to hold the mob's sprite name. ↵skotlex1-0/+3
Columns Name and JName now hold the mob's english and kro names respectively. - Currently both Name and Jname have the KRO names, so someone will have to update them. - Updated mob_db.sql and mob_db2.sql to latest. - Added battle_config option override_mob_names to make the spawned mob names use the mob_db names instead of the specified names in the spawn files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6246 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-21- SC_CLOAKING's val4 now holds whether cloaking ends or not on attack.skotlex1-0/+3
- 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-53/+76
- 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- Added support for n to specify minutes to @charban. skotlex1-3/+4
- Fixed a logic typo on the way dummy_npc_id was defined. - Added state.trading to specify when a trading has started. Now you should be able to walk around until the trade is either rejected or started. - Armor defense is no longer reduced by the amount of characters targetting you. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6192 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17- skill_clear_unitgroup is now invoked in unit_remove_map only on death if ↵skotlex1-1/+1
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-13- Fixed crash when looking for SC_MIRACLE in battle_calc_weapon_attackskotlex1-1/+1
- Some more standard C code cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6038 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-12- Simplified the mob-drops structure by using a single timer with a linked ↵skotlex1-5/+6
list of drops instead of separate timers for each drop. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6014 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-12- Fixed Landmine's level 1 duration.skotlex1-6/+5
- 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-30/+37
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- You don't get critical'ed when in counter-attack stance anymore.skotlex1-2/+3
- Changed the default counter-type to "always critical". git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Implemented use of ers for skill_unit_groups to reduce memory usage. NEEDS ↵skotlex1-2/+2
TESTING git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5991 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Modified battle_check_range to do a path-check on distances less than 2 ↵skotlex1-1/+1
(rather than 3) to avoid being able to hit through walls. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5988 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- Changed the default of multi_hit_delay from 230 to 80 which seems more ↵skotlex1-1/+1
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-07- Moved the devotion damage reduction to the block that only executes if ↵skotlex1-47/+55
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-05- Modified the ammo checks so that ammo is consumed at the end of ↵skotlex1-17/+46
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-45/+33
- 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- SC_AUTOCOUNTER now only blocks all attacks/skills when the flag is 0 ↵skotlex1-1/+1
(attempt to use skill) - Autocounter triggers are now checked against flag 1 (cast-end) rather than 0. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5893 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-03- Fixed a typo in battle.c (status_get_atk invoked instead of ↵skotlex1-1/+1
status_get_atk_) for dual wielders. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-03- Modified Rude-Attacked behaviour so that such skills only triggers when ↵skotlex1-0/+2
the rude-attacked count is greater than 3. - Added config setting slaves_inherit_mode to determine whether slaves take on their master's aggressive/passive status (defaults to yes) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5890 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-03- Moved skill_counter_additional_effect calls to trigger right after ↵skotlex1-6/+15
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-03-31- Changed the terminology from arrow to ammo for the last update.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5830 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-31- Changed the look field of all arrows to 1.skotlex1-34/+19
- Added column "RequiredArrowType" to skill_require_db, set to 1 all arrow-based skills. - Added support for ArrowType requirement on skills. It checks for having an item equipped on the arrow-slot who's view has to match with the required arrow-type (works the same way it does for weapons). - Skills will automatically be ranged and arrow-types when they have a arrow-requirement. - Skills will automatically consume arrows if used with a bow and the skill is an attack weapon-based skill even if the skill_require_db doesn't specifies arrow requirements (this is for stuff like backstab used with bows) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5829 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-31- Cleaned up battle_check_target to use the jA structure defines and get rid ↵skotlex1-27/+24
of the is_duel variable. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5826 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-30- Added a missing "return 0" that fixes a crash on failed lookups on ↵skotlex1-3/+3
status_change_timer git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5818 54d463be-8e91-2dee-dedb-b68131a5f0ec
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