summaryrefslogtreecommitdiff
path: root/src/map/battle.c
AgeCommit message (Collapse)AuthorFilesLines
2017-08-17Remove separate cardfix definition for pre-re/reHaru1-32/+3
Cardfix is now always calculated in thousandths (it previously was in hundredths in renewal mode only). The variable size is increased to int (from short), to ensure that no overflows occur in case of large multipliers. This doesn't change the game mechanics (barring some minor truncation issues that would previously occur due to the lack of precision in renewal) Signed-off-by: Haru <haru@dotalux.com>
2017-08-01add option to restrict party leader change to same mapgumi1-0/+1
2017-07-30Implementation of RoDEXKirieZ1-0/+2
2017-05-27Merge pull request #1722 from Smokexyz/mmo_charstatus-fixHaru1-1/+1
Dismemberment of `storage_data` from `mmo_charstatus`.
2017-05-22Add storage_data reception, parsing and sending to/from the map-server.Smokexyz1-1/+1
Remove loading and saving of storage_data through char.c Re-declaration of structure storage_data as a vector. Re-code of portions in the map-server using storage_data. A new approach is taken by saving the loaded storage data from sql into memory for the duration of the session, thereby removing the need of querying the database to re-load all items everytime a storage save routine is issued from the map-server. Saving of storage items is done through a new function that significantly reduces the number of queries compared to char_memitemdata_tosql(), and therefore run-time speed. This method potentially reduces the number of update and delete queries from MAX_STORAGE (which could be >= 600) times to literally 1. Storage items are stored in a dynamically allocated array and handled accordingly. struct mmo_charstatus size reduces by 34,800 bytes. Update pc_checkitem() with masks for item checks. `sd->state.itemcheck` has been changed to `sd->itemcheck` of type `enum pc_checkitem_types` `battle/items.conf` has been updated to reflect configuration changes. Further updates to assert a successful reception of storage data in related functions.
2017-05-09Merge pull request #1699 from Jedzkie/11-SummerCostumeHaru1-0/+2
Implemented Official Summer 2 Costume
2017-05-04Merge pull request #1695 from Jedzkie/7-CashFoodFixHaru1-1/+0
Cash Foods Update
2017-04-29Removal of rare_drop_announce config.Jedzkie1-1/+0
2017-04-25Removal of cashfood_use_interval setting.Jedzkie1-1/+0
2017-04-24Removed hard coded values on @cashmount and setcashmount.Jedzkie1-1/+2
2017-04-20Made prevent_logout effect on log-in optionalJedzkie1-0/+1
kRO does not prevent players from logging out after connecting to its zone servers. Credits to @secretdataz of rAthena
2017-04-19Added oktoberfest_ignorepalette configurationJedzkie1-0/+1
2017-04-19Implemented Official Summer 2 CostumeJedzkie1-0/+1
Added summer2_ignorepalette configuration
2017-04-10Monster Vulture's Eye and Snake's Eye removed.Smokexyz1-0/+1
Original PR #1148 by @SamuelHercules committed on 8 Feb 2016 * Monsters no longer have Vulture's Eye level 10 and Snake's Eye level 10 learned by default * When you tank Cecil Damon from 10-14 cells away, she will no longer use her target skills * Added a configuration with which you can set the level of Vulture's Eye and Snake's Eye that monsters have learned Merged rAthena @ cccd1496f716fe02a3db20780b6e52b3c33391b4 Credit: Playtester
2017-04-09Fix a null pointer in guild->isallied()Haru1-4/+4
Introduced in cb4297e6eb734c60825ebfa13f32989fa3a470eb, that doesn't check for a nonzero guild ID before calling guild->isallied(). Signed-off-by: Haru <haru@dotalux.com>
2017-04-08Merge pull request #1663 from Smokexyz/bow-unequip-fixHaru1-0/+1
Unequip arrows when a bow is unequipped. (RE only)
2017-04-04Unequip arrows when a bow is unequipped. (RE only)Smokexyz1-0/+1
Forces the unequipment of arrows when a bow is unequipped. Based on original PR by @Jedzkie in #1079
2017-03-23Fixes issue #1647smokexyz1-7/+16
Allow skills and attacks with flags BCT_ENEMY and BCT_PARTY to affect "guild enemy units" within the party on maps with flag `gvg` and `gvg_noparty`.
2017-03-14Fixed MVP exp message issue for clients 2013-12-23cRagexe and newerEmistry Haoyan1-0/+8
- Fixed MVP exp message issue clients 2013-12-23cRagexe and newer. - Gravity remove packet MVP exp message - Credit to https://github.com/rathena/rathena/commit/85749e84b91087960e868e30a7a052b0c0cdce5b
2017-01-27remove hardcoded chat area size from clif.c, add chat_area_size to battleconfgumi1-0/+1
2016-12-03Clarify some Job Class vs MapID confusion (2/2)Haru1-6/+6
This commit ensures that `sd->job` and related variables only contain MapIDs (i.e. the serverside optimized values, where High Novice is MAPID_NOVICE | JOBL_UPPER) and are never checked against the client-based Job Class values. As a rule of thumb, from now on, when a variable is named `job` or `jobid`, it is intended to contain a MapID and not a Job Class ID. The type of such variable shall be an unsigned `uint16` or `uint32`. To ensure that related third party code is also verified when this commit is merged, the variable `struct map_session_data::class_ (i.e. `sd->class_`) is renamed to `job`. Some issues in related lines are also fixed, including: - The atcommand `@mount` would not check properly that the requesting character is a 2nd class Swordsman type. - `pc->addfame()` would silently accept invalid MapIDs, sending unknown values to the client (more on this in a subsequent commit). - `pc->famerank()` would not use the passed job as a bitmask, causing the caller to have to mask it beforehand (more on this in a subsequent commit). - The Soul Linker check in TK_JUMPKICK wasn't future-proof (no harm caused currently). - Gunslingers would be able to be targeted by Spiritual Bestowment (`MO_KITRANSLATION`) and Spiritual Sphere Absorption (`MO_ABSORBSPIRITS`) due to a faulty check introduced when the Rebellion class was implemented (causing unintended interaction with Coins). Signed-off-by: Haru <haru@dotalux.com>
2016-12-03Clarify some Job Class vs MapID confusion (1/2)Haru1-5/+6
This commit ensures that `sd->status.class` and related variables only contain Job Classes (i.e. the client-compatible values, where High Novice 4001) and are never checked against the bitmask-based MapID values. As a rule of thumb, from now on, when a variable is named `class`, it is intended to contain a Job Class ID and not a MapID. The type of such variable shall be a signed `int16` or `int`. To ensure that related third party code is also verified when this commit is merged, the variable `struct mmo_charstatus::class_ (i.e. `sd->status.class_`) is renamed to `class`. Some issues in related lines are also fixed, including: - A wrong check in the char server would prevent the correct detection of babies in code related to the family exp sharing. - Baby Arch Bishops would not be affected by Eucharistica. - A wrong check would cause the `questinfo()` script command not to display its information for most classes (except 1-1 classes). - Map IDs and Job Classes were mixed up in `itemdb_jobid2mapid()` and `itemdb_jobmask2mapid()` for 1-1 classes (causing currently no harm, since they just happen to coincide). - The Baby Sura class would not cause parties to be marked as containing a monk type character (for SLS Team Up purposes). - Baby Geneticists would bypass the cart check when trying to equip ammunitions. - Baby Mechanics would bypass the Mado Gear check when trying to equip ammunitions. - Transcendent Shadow Chasers would lose the Stalkers' ability to clone transcendent skills. Signed-off-by: Haru <haru@dotalux.com>
2016-10-22Added max_summoner_parameter:Dastgir Pojee1-0/+1
Default max parameter for summoner is 120.
2016-10-22Implemented SU_TUNAPARTY Skill.Dastgir Pojee1-0/+13
Protects the target for 30 seconds. Tuna's Defense Power: (10+(20*(SkillLv-1)))% of Caster's MaxHP
2016-10-22Implemented SU_LUNATICCARROTBEAT Skill.Dastgir Pojee1-0/+3
Atk +(200+100*SkillLv)%. When 1 Carrot is consumed, Add's a chance to stun enemy. Lv1-2: 3x3 AoE Lv3-4: 5x5 AoE Lv5: 7x7 AoE Added Item Constants in itemdb.h
2016-10-22Implemented SU_ARCLOUSEDASH Skill.Dastgir Pojee1-0/+3
For (50+10*SkillLv) Seconds, Atk +(15+5*SkillLv). Increases Movement Speed. If Target is Doram Race, Increases Range Physical attack by 10%.
2016-10-22Implemented SU_PICKYPECK Skill.Dastgir Pojee1-0/+6
ATK + (200+100*SkillLv)% Every 30 Base Levels, Adds an Additional Chance to reactivate the skill. When the Enemy has Less than 50% HP Left, Damage is doubled.
2016-10-22Implemented SU_SCAROFTAROU Skill.Dastgir Pojee1-0/+3
Heal,Cure,Clearance cancels the effect. Atk + 100*SkillLv%. Reduces Fixed Amount of MaxHP for 9 seconds. For Every 30 Base Levels, Adds an Additional chance that skill will be activated again.
2016-10-22Implemented SU_SV_ROOTTWIST Skill.Dastgir Pojee1-0/+6
Duration: (5+(2*SkillLv)) seconds. Cannot be used on Boss Monsters. Effect is cancelled when Heaven's Drive or Trample is used. Enemies trapped on roots receive poison property damage.
2016-10-22Implemented SU_POWEROFLIFE Skill.Dastgir Pojee1-0/+8
Increases Flee, Hit and CRI by 20. If >= 20 Skill points invested in animal-based skills, Ranged Physical Attack + 20%.
2016-10-22Implemented SU_CN_METEOR:Dastgir Pojee1-0/+3
Catnip Meteor: Increases Matk by 200+100*SkillLevel%. When 1 Catnip is consumed, Adds a Chance to curse target[Not Implemented].
2016-10-22Implemented SU_SV_STEMSPEAR Skill.Dastgir Pojee1-0/+3
Silvervine Steam Spear: 10% Bleeding Chance, 700% Matk at all levels. Lv 1: Earth Magic Lv 2: Fire Magic Lv 3: Water Magic Lv 4: Wind Magic Lv 5: Ghost Magic Base Level 30: Chance to activate skill again. Every 30 Base Level: Increases the chance to activate skill.
2016-10-22Implemented SU_STOOP Skill.Dastgir Pojee1-0/+3
Reduces Incoming Damange by 90% for 6 seconds. When Knock Back, the effect disappears.
2016-10-22Implemented SU_SCRATCH:Dastgir Pojee1-0/+3
Max Level: 3 Attack Increases by 50+(50+Level)% Base Level >= 30: Activates a Chance to cast skill again. Every 30 Base Level: Increases the chance to cast skill again.
2016-10-22Implemented SU_BITE Skill:Dastgir Pojee1-2/+8
Lv.1: Atk+ 200% BaseLevel 30: Adds a Chance to Reactive the skill. Every 30 Base Levels: Increases the chance to reactive the skill.
2016-10-07Fixed some issues detected by clang's static analyzer (Xcode 8/macOS Sierra)Haru1-4/+2
Signed-off-by: Haru <haru@dotalux.com>
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>