summaryrefslogtreecommitdiff
path: root/src/map/battle.c
AgeCommit message (Collapse)AuthorFilesLines
2016-09-30Add different fixes for gcc 7 warnings.Andrei Karas1-2/+12
Some possible buffer overflows. Add attribute for mark fallthrough cases. Skipped libconfig warnings.
2016-08-20Re-added HPM support for configuration settingsHaru1-1/+1
Plugin settings should be relative to the the libconfig file root. For example, a configuration setting of type HPCT_CHAR will be relative to the root of conf/char/char-server.conf. In order to add a configuration entry inside the char_configuration block, the full configuration path (slash-delimited) should be passed to addCharConf(), as in the following example: `addCharConf("char_configuration/my_setting", my_parser_function);` Signed-off-by: Haru <haru@dotalux.com>
2016-08-19Ported battle.conf to libconfigHaru1-58/+98
Ported to modern Hercules and cleaned up from Panikon's commits: 44fea0b3cdba6901599265220228ba4359b1f96d, 9cba05bc0811e638bbaaa6cff887d0b2c9872560 Signed-off-by: Haru <haru@dotalux.com>
2016-08-13Added atcommand configEmistry1-0/+1
Based on @Lemongrass3110's commit https://github.com/rathena/rathena/commit/9157318ee9939728b8d332a5668c13d4ad0a6f8b: Added a configuration to enable the atcommands baselevel and joblevel to trigger their respective npc events. This will help you guys with testing your custom scripts that are listening to OnPCBaseLvUpEvent or OnPCJobLvUpEvent. For safety reasons we only trigger the events on level increase.
2016-07-14Merge pull request #1361 from HerculesWS/coverity-fixesAndrei Karas1-3/+3
Fixed various issues reported by coverity
2016-07-14Fixes warp facing direction.KirieZ1-0/+1
Fixes #1240 Closes #1353 as merged
2016-07-14Changed mmo_charstatus::base_level and mmo_charstatus::job_level to intHaru1-3/+3
Fixes several -Wsign-compare issues Signed-off-by: Haru <haru@dotalux.com>
2016-07-12Extract some code from battle_calc_damage into battle_calc_pc_damage.Andrei Karas1-24/+34
2016-07-12Add into skill.c some handling for unknown skills/skill units.Andrei Karas1-23/+2
Also improve a bit cast end functions call.
2016-07-12Interface random.chemagx1-1/+1
2016-06-24Move ammo check into separate function in battle.cAndrei Karas1-32/+42
2016-05-08Fixed various issues pointed out by cppcheckHaru1-3/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-02-29Merge pull request #1115 from theultramage/bcdrenamingHaru1-45/+42
more meaningful variable names in battle_calc_damage()
2016-02-24Removed unnecessary explicit casts of the value of WBUFPHaru1-10/+10
- WBUFP now returns a pointer to void, which automatically casts to any non-const or const pointer. Signed-off-by: Haru <haru@dotalux.com>
2016-02-19Remove some unused macroses. Left macroses in socket.cAndrei Karas1-4/+0
2016-01-21Rename 'tsc' to 's_sc' in battle_calc_damage() since it's actually referring ↵ultramage1-16/+16
to the status of the source. Blame goes to 6f264513.
2016-01-21Rename 'sd' to 't_sd' in battle_calc_damage().ultramage1-19/+19
2016-01-21Add top-level s_sd variable to battle_calc_damage() to represent a player ↵ultramage1-12/+9
source of damage. This cleans up the various badly-named duplicates that have accumulated in local scopes over time. The unusual name, s_sd (with underscore), was chosen to prevent interaction with any existing custom code.
2016-01-12Whitespace cleanup (removed alignment tabs or trailing whitespace at line end)Haru1-2/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced the remaining explicit casts with BL_CAST/BL_UCASTHaru1-66/+61
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCASTHaru1-126/+167
- Replaced safe casts (bl type already checked) Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCAST/BL_UCCASTHaru1-4/+8
- Replaced casts in foreach callbacks. - Added assertions and nullpo checks where applicable. Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_ELEM to struct elemental_data as per style guidelineshemagx1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_PET to struct pet_data as per style guidelineshemagx1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_SKILL to struct skill_data as per style guidelineshemagx1-6/+6
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_MER to struct mercenary_data as per style guidelineshemagx1-4/+4
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_HOM to struct homun_data as per style guidelineshemagx1-7/+8
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_MOB to struct mob_data as per strly guidelineshemagx1-25/+33
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_PC to struct map_session_data as per style guidelineshemagx1-62/+71
Signed-off-by: Haru <haru@dotalux.com>
2016-01-05Fix battle config Hp/Sp overflow valueAnnieRuru1-3/+3
- client can't handle value over 21474836 - SQL also can't save value over 16777215 due to mediumint unsigned Closes #965 as merged Signed-off-by: Haru <haru@dotalux.com>
2016-01-05Added Support for BodyStyleDastgir1-0/+3
Closes #974 as merged
2015-12-29Spear Stab damage adjustmentKerubael1-1/+1
Set the skillratio to 20*skill_lv as mentioned in skill describtions.
2015-12-28Standardized (source) mob_id enumHaru1-7/+7
- MOBID_ constant names now follow the Mob DB spritenames. - The following names were changed: * MOBID_EMPERIUM => MOBID_EMPELIUM * MOBID_TREAS01 => MOBID_TREASURE_BOX1 * MOBID_TREAS40 => MOBID_TREASURE_BOX40 * MOBID_BARRICADE1 => MOBID_BARRICADE * MOBID_BARRICADE2 => MOBID_BARRICADE_ * MOBID_GUARIDAN_STONE1 => MOBID_S_EMPEL_1 * MOBID_GUARIDAN_STONE2 => MOBID_S_EMPEL_2 * MOBID_FOOD_STOR => MOBID_OBJ_A * MOBID_BLUE_CRYST => MOBID_OBJ_A2 * MOBID_PINK_CRYST => MOBID_OBJ_B2 * MOBID_TREAS41 => MOBID_TREASURE_BOX41 * MOBID_TREAS49 => MOBID_TREASURE_BOX49 - Added several missing items Signed-off-by: Haru <haru@dotalux.com>
2015-12-25*Show the katar critical bonus in player status windowAnnieRuru1-2/+3
- this is unofficial behavior, so it has to be in battle config Related to #579 Closes #882 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-25Merge pull request #975 from dastgir/8-RefineDefhemagx1-0/+3
Added Costume/Shadow Atk/Def refine bonus setting
2015-12-26Follow up ↵Jedzkie1-4/+2
https://github.com/Jedzkie/Hercules/commit/3f13598714f2d6cecb1c1e5c382592a904798624, thanks to dastgir.
2015-12-25Added Costume/Shadow Atk/Def refine bonus settingDastgir1-0/+3
2015-12-24Item Update:Jedzkie1-12/+26
- Fix items that uses SPVanishRate bonus are not working properly. - Fix Velum Katzbalger item effect. - Added HPVanishRate bonus.
2015-12-23Update:Jedzkie1-5/+5
- Rename BLUE_CRYST and PINK_CRYST to BLUE_CRYSTAL and PINK_CRYSTAL - Rename FOOD_STOR to FOOD_STORAGE - Rename TREAS01, TREAS40, TREAS41, TREAS49 to TREASURE_01, TREASURE_40, TREASURE_41, TREASURE_49
2015-12-23Item Update:Jedzkie1-2/+2
- Remove the hard coded entry of Monster Transform Scrolls - Change mob names into mob constants.
2015-12-19Corrected a typo in the Renewal cardfix calculationHaru1-3/+3
- If you name your variabled cardfix_ and cardfix, don't complain if you get confused... - Since 210c963d Signed-off-by: Haru <haru@dotalux.com>
2015-12-17Implement official effect of MVP ScrollsJedzkie1-0/+11
- Ghostring Scroll - Phreeoni Scroll - Tao Gunka Scroll - Mistress Scroll - Orc Hero Scroll - Orc Lord Scroll (thanks to Dastgir) Note: in Aegis, the reflect damage from Orc Lord Scroll is in the user not in the attacker, but in this commit, the attacker receives the reflect damage. - Added New Cash Boxes * Tao Gunka Scroll Box * Mistress Scroll Box Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-12-14Added official effect of Mora Berry.Jedzkie1-6/+18
Signed-off-by: Haru <haru@dotalux.com>
2015-12-13- Fixed #723 now it's possible to retrieve Battle Config Settings from ↵Your Name1-6/+14
plugins into scripts - Fixed Possible Crash when null parse function pointer passed to HPMi->addConf - Now it's possible to use same parse function for all config entries - Now Battle Config entries must have a return function
2015-12-06Refactored/fixed race handling for bonuses that store it as a bitmaskHaru1-16/+16
- The following bonuses now work correctly with RC_DemiPlayer, RC_NonDemiPlayer, RC_NonDemiHuman, RC_Nonplayer: * bIgnoreDefRace * bIgnoreMdefRace * bDefRatioAtkRace * bAddMonsterDropChainItem (bonus3) * bAddMonsterDropItem (bonus3) - A new function (map->race_id2mask) is provided, to easily and efficiently generate a bitmask from a race ID. - The RC_ALL race ID is mapped to RC_BOSS and RC_NONBOSS, for backwards compatibility. Signed-off-by: Haru <haru@dotalux.com>
2015-11-18Merge pull request #837 from AnnieRuru/request_5Haruna1-0/+1
Add new config to allow player vend/chat room nearby hidden npc (#834)
2015-11-14Add option for fix hit after warp.Andrei Karas1-4/+8
Introduced new configuration option: fix_warp_hit_delay_abuse. Official way is to set this option to false.
2015-10-29Add new config to allow player vend/chat room nearby hidden npc (#834)AnnieRuru1-0/+1
credit to Emistry for the idea
2015-10-25Merge pull request #516 from milky-milk/pre-re_defenderHaruna1-0/+5
Fixed defending aura bug in pre-renewal