summaryrefslogtreecommitdiff
path: root/src/map/map.h
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-03 20:00:33 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-03 20:00:33 +0000
commit7689b26c216bb9de59d7ddfcbe9c45c18cfb7cc4 (patch)
tree38fc970c9b971dae33515eaff4fea45192a8d44e /src/map/map.h
parent7bb91031c6b244781f6637dc87dafa5835326888 (diff)
downloadhercules-7689b26c216bb9de59d7ddfcbe9c45c18cfb7cc4.tar.gz
hercules-7689b26c216bb9de59d7ddfcbe9c45c18cfb7cc4.tar.bz2
hercules-7689b26c216bb9de59d7ddfcbe9c45c18cfb7cc4.tar.xz
hercules-7689b26c216bb9de59d7ddfcbe9c45c18cfb7cc4.zip
- Added bonuses bSPRegenRate, bHPRegenRate. They behave like the opposite of bHPLossRate/bSPLossRate, making you gain x Hp/Sp every y ms.
- Added bonus bIgnoreMdefRate, used to ignore a % of the target's mdef when using magic attacks (bonus2 will ignore part of the mdef of all targets, bonus3 receives a race argument) - You can now use bonus2 bCastRate to adjust the cast rate of a single skill. - Cleaned the code for bleeding (hp-loss) and extended it to handle regen as well. - Some small cleanups in the pc_bonus functions - Removed bonus3 bHpLossRate since it was doing nothing and is not used. - Corrected bGetZeny bonus to be like in Aegis. The amount received is from 1 to the given amount, you can use negative zeny values to use an amount dependant on mob's level (amount*lv). - Updated doc/item_bonus.txt with all these changes - Anti-Magic/Stone-Skin now increase/decrease def/mdef only and in an absolute mode (+20*lv rather than +20%*lv). Also the duration is greatly decreased (x/15) when used on players. - Now when a player uses a strip skill without having it in the skill tree (auto-casted) the duration will be 0, the equipment will be stripped without causing the status change that blocks reequipping. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11112 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.h')
-rw-r--r--src/map/map.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/map/map.h b/src/map/map.h
index 5a8c55315..8dc60b7cf 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -659,6 +659,7 @@ struct map_session_data {
int magic_addsize[3];
int critaddrace[RC_MAX];
int expaddrace[RC_MAX];
+ int ignore_mdef[RC_MAX];
int itemgrouphealrate[MAX_ITEMGROUP];
short sp_gain_race[RC_MAX];
// zeroed arrays end here.
@@ -671,8 +672,14 @@ struct map_session_data {
unsigned char flag;
} addeff[MAX_PC_BONUS], addeff2[MAX_PC_BONUS];
struct { //skillatk raises bonus dmg% of skills, skillheal increases heal%, skillblown increases bonus blewcount for some skills.
- short id, val;
- } skillatk[MAX_PC_BONUS], skillheal[5], skillblown[MAX_PC_BONUS];
+ unsigned short id;
+ short val;
+ } skillatk[MAX_PC_BONUS], skillheal[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS];
+ struct {
+ short value;
+ int rate;
+ int tick;
+ } hp_loss, sp_loss, hp_regen, sp_regen;
struct {
short class_, rate;
} add_def[MAX_PC_BONUS], add_mdef[MAX_PC_BONUS],
@@ -704,17 +711,12 @@ struct map_session_data {
int random_attack_increase_add,random_attack_increase_per; // [Valaris]
int break_weapon_rate,break_armor_rate;
int crit_atk_rate;
- int hp_loss_rate;
- int sp_loss_rate;
int classchange; // [Valaris]
int speed_add_rate, aspd_add;
unsigned int setitem_hash, setitem_hash2; //Split in 2 because shift operations only work on int ranges. [Skotlex]
short splash_range, splash_add_range;
short add_steal_rate;
- short hp_loss_value;
- short sp_loss_value;
- short hp_loss_type;
short sp_gain_value, hp_gain_value;
short sp_vanish_rate;
short sp_vanish_per;
@@ -733,9 +735,6 @@ struct map_session_data {
int matk_rate;
int critical_rate,hit_rate,flee_rate,flee2_rate,def_rate,def2_rate,mdef_rate,mdef2_rate;
- int hp_loss_tick;
- int sp_loss_tick;
-
int itemid;
short itemindex; //Used item's index in sd->inventory [Skotlex]
@@ -1171,7 +1170,7 @@ enum _sp {
SP_CRITICAL_DEF,SP_NEAR_ATK_DEF,SP_LONG_ATK_DEF, // 1019-1021
SP_DOUBLE_RATE, SP_DOUBLE_ADD_RATE, SP_SKILL_HEAL, SP_MATK_RATE, // 1022-1025
SP_IGNORE_DEF_ELE,SP_IGNORE_DEF_RACE, // 1026-1027
- SP_ATK_RATE,SP_SPEED_ADDRATE,SP_FREE3, // 1028-1030
+ SP_ATK_RATE,SP_SPEED_ADDRATE,SP_SP_REGEN_RATE, // 1028-1030
SP_MAGIC_ATK_DEF,SP_MISC_ATK_DEF, // 1031-1032
SP_IGNORE_MDEF_ELE,SP_IGNORE_MDEF_RACE, // 1033-1034
SP_MAGIC_ADDELE,SP_MAGIC_ADDRACE,SP_MAGIC_ADDSIZE, // 1035-1037
@@ -1187,6 +1186,7 @@ enum _sp {
SP_HP_DRAIN_VALUE,SP_SP_DRAIN_VALUE, // 1079-1080
SP_WEAPON_ATK,SP_WEAPON_ATK_RATE, // 1081-1082
SP_DELAYRATE,SP_HP_DRAIN_RATE_RACE,SP_SP_DRAIN_RATE_RACE, // 1083-1085
+ SP_IGNORE_MDEF_RATE, //1086
SP_RESTART_FULL_RECOVER=2000,SP_NO_CASTCANCEL,SP_NO_SIZEFIX,SP_NO_MAGIC_DAMAGE,SP_NO_WEAPON_DAMAGE,SP_NO_GEMSTONE, // 2000-2005
SP_NO_CASTCANCEL2,SP_NO_MISC_DAMAGE,SP_UNBREAKABLE_WEAPON,SP_UNBREAKABLE_ARMOR, SP_UNBREAKABLE_HELM, // 2006-2010
@@ -1194,15 +1194,12 @@ enum _sp {
SP_CRIT_ATK_RATE, SP_CRITICAL_ADDRACE, SP_NO_REGEN, SP_ADDEFF_WHENHIT, SP_AUTOSPELL_WHENHIT, // 2013-2017
SP_SKILL_ATK, SP_UNSTRIPABLE, SP_ADD_DAMAGE_BY_CLASS, // 2018-2020
- SP_SP_GAIN_VALUE, SP_FREE, SP_HP_LOSS_RATE, SP_ADDRACE2, SP_HP_GAIN_VALUE, // 2021-2025
+ SP_SP_GAIN_VALUE, SP_HP_REGEN_RATE, SP_HP_LOSS_RATE, SP_ADDRACE2, SP_HP_GAIN_VALUE, // 2021-2025
SP_SUBSIZE, SP_HP_DRAIN_VALUE_RACE, SP_ADD_ITEM_HEAL_RATE, SP_SP_DRAIN_VALUE_RACE, SP_EXP_ADDRACE, // 2026-2030
SP_SP_GAIN_RACE, SP_SUBRACE2, SP_ADDEFF_WHENHIT_SHORT, // 2031-2033
SP_UNSTRIPABLE_WEAPON,SP_UNSTRIPABLE_ARMOR,SP_UNSTRIPABLE_HELM,SP_UNSTRIPABLE_SHIELD, // 2034-2037
SP_INTRAVISION, SP_ADD_MONSTER_DROP_ITEMGROUP, SP_SP_LOSS_RATE, // 2038-2040
SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE //2041
- //Before adding another, note that these are free:
- //1030 (SP_FREE3, previous AspdAddRate)
- //2022 (SP_FREE, previous bDefIgnoreMob)
};
enum _look {