summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-08-21 06:21:44 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-08-21 06:21:44 +0000
commitad8b21eed7219a457340278ed39642578d48b2eb (patch)
treef6efe58eafbe1ecdb554f888feb8f40bdd6fc1b9
parent8f8f101effc1c7e73af479a5474e59a6ebf3d0d3 (diff)
downloadhercules-ad8b21eed7219a457340278ed39642578d48b2eb.tar.gz
hercules-ad8b21eed7219a457340278ed39642578d48b2eb.tar.bz2
hercules-ad8b21eed7219a457340278ed39642578d48b2eb.tar.xz
hercules-ad8b21eed7219a457340278ed39642578d48b2eb.zip
Added bMagicHPGainValue and bMagicSPGainValue.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14018 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--db/const.txt2
-rw-r--r--db/item_db.txt14
-rw-r--r--src/map/map.h2
-rw-r--r--src/map/pc.c8
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/skill.c18
-rw-r--r--src/map/status.c2
8 files changed, 36 insertions, 14 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index f8eec07ba..98e67415a 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+09/08/20
+ * Added bMagicHPGainValue and bMagicSPGainValue. [Inkfish]
09/08/18
* Some fixes for Heat [Inkfish]
- Heat and other ground skills' activation won't cancel combo wait. (bugreport:3228)
diff --git a/db/const.txt b/db/const.txt
index 89fe11a0b..cd0140bc5 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -430,6 +430,8 @@ bAddMonsterDropItemGroup 2039
bSPLossRate 2040
bAddSkillBlow 2041
bSPVanishRate 2042
+bMagicSPGainValue 2043
+bMagicHPGainValue 2044
EQI_HEAD_TOP 1
EQI_ARMOR 2
diff --git a/db/item_db.txt b/db/item_db.txt
index a6004581d..228491b17 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -1285,7 +1285,7 @@
2382,Elite_Shooter_Suit,Elite Shooter Suit,5,0,,0,,3,,1,0x01000000,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2540) && isequipped(2437)) { bonus2 bSubRace,RC_NonDemiHuman,-300; bonus bDex,3; bonus bMaxHPRate,12; bonus bLongAtkDef,10; bonus bDelayRate,-25; }; },{},{}
2383,Brynhild,Brynhild,5,0,,400,,,,0,0xFFFFFFFF,7,2,16,,94,0,0,{ bonus bMdef,10; bonus bMaxHP,20*BaseLevel; bonus bMaxSP,5*BaseLevel; bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus bMatkRate,10; bonus bUnbreakableArmor,0; bonus bNoKnockback,0; },{},{}
2384,Spritual_Tunic,Spiritual Tunic,5,20,,0,,10,,0,0xFFFFFFFF,7,2,16,,0,0,0,{ bonus bMaxHP,800; bonus2 bResEff,Eff_Freeze,10000; bonus2 bSubEle,Ele_Earth,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Wind,20; bonus2 bSubEle,Ele_Poison,20; bonus2 bSubEle,Ele_Holy,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Ghost,20; bonus2 bSubEle,Ele_Undead,20; },{},{}
-2385,Recuperative_Armor,Recuperative Armor,5,20,,0,,12,,0,0xFFFFFFFF,7,2,16,,0,0,0,{ bonus bNoRegen,1; bonus bNoRegen,2; bonus bHPGainValue,60; bonus bSPGainValue,6; },{},{ heal 0,-100; }
+2385,Recuperative_Armor,Recuperative Armor,5,20,,0,,12,,0,0xFFFFFFFF,7,2,16,,0,0,0,{ bonus bNoRegen,1; bonus bNoRegen,2; bonus bHPGainValue,60; bonus bSPGainValue,6; bonus bMagicHPGainValue,60; bonus bMagicSPGainValue,6; },{},{ heal 0,-100; }
2386,Chameleon_Armor,Chameleon Armor,5,20,,1700,,5,,0,0x000FDF80,2,2,16,,70,1,0,{ bonus bMaxHP,(BaseLevel*7); bonus bMaxSP,(BaseLevel/2); autobonus2 "{ bonus bNoMagicDamage,100; }",10,2000,BF_MAGIC,"{ specialeffect2 EF_ENERGYCOAT; }"; if( BaseClass == Job_Mage || BaseClass == Job_Archer || BaseClass == Job_Acolyte ) bonus bMdef,5; else if( BaseClass == Job_Swordman || BaseClass == Job_Merchant || BaseClass == Job_Thief ) bonus bDef,3; },{},{}
2387,Sprint_Mail,Sprint Mail,5,20,,1000,,3,,1,0x000FDF80,2,2,16,,70,1,0,{ bonus bVit,1; bonus bHPrecovRate,5; bonus2 bAddItemHealRate,IG_Recovery,3; bonus2 bSkillHeal,"AL_HEAL",3; if( isequipped(2440) && isequipped(2744) ) { bonus bMaxHPrate,7; bonus bMaxSPrate,7; bonus bCastrate,-3; bonus bDelayrate,-15; } },{},{}
2388,Kandura,Gandora,5,20,,300,,4,,1,0x00001000,2,2,16,,70,1,0,{ bonus bAgi,1; bonus bFlee,5; bonus bAspdRate,2; },{},{}
@@ -2477,12 +2477,12 @@
5337,Party_Recruiter_Hat,Party Hat,5,0,,0,,2,,0,0xFFFFFFFF,7,2,256,,10,1,351,{},{},{}
5338,Bf_Recruiter_Hat,Boyfriend Hat,5,0,,0,,2,,0,0xFFFFFFFF,7,2,256,,10,1,352,{},{},{}
5339,Friend_Recruiter_Hat,Friend Hat,5,0,,0,,2,,0,0xFFFFFFFF,7,2,256,,10,1,353,{},{},{}
-5340,Deprotai_Doll_Hat,Deporte Doll Hat,5,0,,500,,0,,1,0xFFFFFFFF,7,2,256,,60,0,354,{ bonus2 bSubRace,RC_DemiHuman,5; bonus bStr,2; },{},{}
-5341,Claris_Doll_Hat,Clarice Doll Hat,5,0,,500,,0,,1,0xFFFFFFFF,7,2,256,,60,0,355,{ bonus2 bSubRace,RC_DemiHuman,5; bonus bInt,2; },{},{}
-5342,Sorin_Doll_Hat,Sorin Doll Hat,5,0,,500,,0,,1,0xFFFFFFFF,7,2,256,,60,0,356,{ bonus2 bSubRace,RC_DemiHuman,5; bonus bDex,2; },{},{}
-5343,Tayelin_Doll_Hat,Tailring Doll Hat,5,0,,500,,0,,1,0xFFFFFFFF,7,2,256,,60,0,357,{ bonus2 bSubRace,RC_DemiHuman,5; bonus bAgi,2; },{},{}
-5344,Binit_Doll_Hat,Vinit Doll Hat,5,0,,500,,0,,1,0xFFFFFFFF,7,2,256,,60,0,358,{ bonus2 bSubRace,RC_DemiHuman,5; bonus bVit,2; },{},{}
-5345,Debril_Doll_Hat,W Doll Hat,5,0,,500,,0,,1,0xFFFFFFFF,7,2,256,,60,0,359,{ bonus2 bSubRace,RC_DemiHuman,5; bonus bLuk,2; },{},{}
+5340,Deprotai_Doll_Hat,Deporte Doll Hat,5,0,,500,,0,,1,0xFFFFFFFF,7,2,256,,60,0,354,{ bonus2 bSubRace,RC_DemiHuman,5; bonus bStr,2; bonus3 bAutoSpellWhenHit,"AL_ANGELUS",10,20; },{},{}
+5341,Claris_Doll_Hat,Clarice Doll Hat,5,0,,500,,0,,1,0xFFFFFFFF,7,2,256,,60,0,355,{ bonus2 bSubRace,RC_DemiHuman,5; bonus bInt,2; bonus bMagicHPGainValue,50; },{},{}
+5342,Sorin_Doll_Hat,Sorin Doll Hat,5,0,,500,,0,,1,0xFFFFFFFF,7,2,256,,60,0,356,{ bonus2 bSubRace,RC_DemiHuman,5; bonus bDex,2; autobonus "{ bonus bBaseAtk,50; }",20,10000,0,"{ specialeffect2 EF_POTION_BERSERK; }"; },{},{}
+5343,Tayelin_Doll_Hat,Tailring Doll Hat,5,0,,500,,0,,1,0xFFFFFFFF,7,2,256,,60,0,357,{ bonus2 bSubRace,RC_DemiHuman,5; bonus bAgi,2; bonus2 bAddItemHealRate,504,10; bonus2 bAddItemHealRate,547,10; },{},{}
+5344,Binit_Doll_Hat,Vinit Doll Hat,5,0,,500,,0,,1,0xFFFFFFFF,7,2,256,,60,0,358,{ bonus2 bSubRace,RC_DemiHuman,5; bonus bVit,2; autobonus "{ bonus bAspdRate,5; }",20,30000,0,"{ specialeffect2 EF_HASTEUP; }"; },{},{}
+5345,Debril_Doll_Hat,W Doll Hat,5,0,,500,,0,,1,0xFFFFFFFF,7,2,256,,60,0,359,{ bonus2 bSubRace,RC_DemiHuman,5; bonus bLuk,2; bonus2 bAddRace,RC_Undead,5; bonus2 bMagicAddRace,RC_Undead,5; bonus2 bSubRace,RC_Undead,5; },{},{}
5346,Gf_Recruiter_Hat,Girlfriend Hat,5,0,,0,,2,,0,0xFFFFFFFF,7,2,256,,10,1,360,{},{},{}
5347,Ph.D_Hat_,Ph.D Hat,5,20,,200,,3,,1,0xFFFFFFFE,7,2,256,,0,1,98,{},{},{}
5348,Big_Sis'_Ribbon_,Big Ribbon,5,15000,,200,,2,,1,0xFFFFFFFE,7,2,256,,0,1,28,{ bonus bMdef,3; },{},{}
diff --git a/src/map/map.h b/src/map/map.h
index a5a9ac03d..101be46cf 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -322,7 +322,7 @@ enum _sp {
SP_SP_GAIN_RACE, SP_SUBRACE2, SP_UNBREAKABLE_SHOES, // 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
+ SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE //2041-2044
};
enum _look {
diff --git a/src/map/pc.c b/src/map/pc.c
index 17a8917cd..acd583ca1 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2225,6 +2225,14 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
if(!sd->state.lr_flag)
sd->hp_gain_value += val;
break;
+ case SP_MAGIC_SP_GAIN_VALUE:
+ if(!sd->state.lr_flag)
+ sd->magic_sp_gain_value += val;
+ break;
+ case SP_MAGIC_HP_GAIN_VALUE:
+ if(!sd->state.lr_flag)
+ sd->magic_hp_gain_value += val;
+ break;
case SP_ADD_HEAL_RATE:
if(sd->state.lr_flag != 2)
sd->add_heal_rate += val;
diff --git a/src/map/pc.h b/src/map/pc.h
index c219c8f45..c1102d514 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -275,7 +275,7 @@ struct map_session_data {
short splash_range, splash_add_range;
short add_steal_rate;
short add_heal_rate, add_heal2_rate;
- short sp_gain_value, hp_gain_value;
+ short sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value;
short sp_vanish_rate;
short sp_vanish_per;
unsigned short unbreakable; // chance to prevent ANY equipment breaking [celest]
diff --git a/src/map/skill.c b/src/map/skill.c
index 9d8c3d6c2..1ed612dee 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1234,13 +1234,21 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
status_heal(src, 0, status_get_lv(bl)*(95+15*rate)/100, 2);
}
- if( sd && status_isdead(bl) && attack_type&BF_WEAPON )
+ if( sd && status_isdead(bl) )
{
int sp = 0, hp = 0;
- sp += sd->sp_gain_value;
- sp += sd->sp_gain_race[status_get_race(bl)];
- sp += sd->sp_gain_race[is_boss(bl)?RC_BOSS:RC_NONBOSS];
- hp += sd->hp_gain_value;
+ if( attack_type&BF_WEAPON )
+ {
+ sp += sd->sp_gain_value;
+ sp += sd->sp_gain_race[status_get_race(bl)];
+ sp += sd->sp_gain_race[is_boss(bl)?RC_BOSS:RC_NONBOSS];
+ hp += sd->hp_gain_value;
+ }
+ if( attack_type&BF_MAGIC )
+ {
+ sp += sd->magic_sp_gain_value;
+ hp += sd->magic_hp_gain_value;
+ }
if( hp || sp )
status_heal(src, hp, sp, battle_config.show_hp_sp_gain?2:0);
}
diff --git a/src/map/status.c b/src/map/status.c
index 857a0a7a7..7479b726c 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1823,6 +1823,8 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
+ sizeof(sd->add_heal2_rate)
+ sizeof(sd->hp_gain_value)
+ sizeof(sd->sp_gain_value)
+ + sizeof(sd->magic_hp_gain_value)
+ + sizeof(sd->magic_sp_gain_value)
+ sizeof(sd->sp_vanish_rate)
+ sizeof(sd->sp_vanish_per)
+ sizeof(sd->unbreakable)