Skip to content

Commit

Permalink
Updated Wedding Skills effect
Browse files Browse the repository at this point in the history
* Male max HP required increased from 10% to 15%.
* Female max SP required increased from 10% to 15%.
-- These changes only affect renewal mode.
  • Loading branch information
aleos89 committed Feb 11, 2016
1 parent 30141bd commit a7de6f8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
4 changes: 2 additions & 2 deletions db/pre-re/skill_db.txt
Expand Up @@ -474,7 +474,7 @@
333,0,6,4,0,0x1,0,1,0,no,0,0x2,0,none,0,0x0, NPC_REVENGE,Revenge

//****
// Mariage Skills
// Marriage Skills
334,9,6,4,0,0x1,0,1,1,yes,0,0x4,0,none,0,0x0, WE_MALE,I Will Protect You
335,9,6,4,0,0x1,0,1,1,yes,0,0x4,0,none,0,0x0, WE_FEMALE,I Look up to You
336,9,6,4,0,0x1,3,1,1,yes,0,0x4,1,none,0,0x0, WE_CALLPARTNER,I miss You
Expand Down Expand Up @@ -605,7 +605,7 @@
407,0,6,4,0,0x1,0,1,0,no,0,0,0,none,0,0x0, ASC_CDP,Create Deadly Poison

//****
// Mariage Skills for Baby
// Marriage Skills for Baby
408,9,6,4,0,0x1,0,1,1,yes,0,0x4,0,none,0,0x0, WE_BABY,Baby
409,9,6,4,0,0x1,3,1,1,yes,0,0x4,1,none,0,0x0, WE_CALLPARENT,Call Parent
410,9,6,4,0,0x1,3,1,1,yes,0,0x4,1,none,0,0x0, WE_CALLBABY,Call Baby
Expand Down
4 changes: 2 additions & 2 deletions db/re/skill_db.txt
Expand Up @@ -474,7 +474,7 @@
333,0,6,4,0,0x1,0,1,0,no,0,0x2,0,none,0,0x0, NPC_REVENGE,Revenge

//****
// Mariage Skills
// Marriage Skills
334,9,6,4,0,0x1,0,1,1,yes,0,0x4,0,none,0,0x0, WE_MALE,I Will Protect You
335,9,6,4,0,0x1,0,1,1,yes,0,0x4,0,none,0,0x0, WE_FEMALE,I Look up to You
336,9,6,4,0,0x1,3,1,1,yes,0,0x4,1,none,0,0x0, WE_CALLPARTNER,I miss You
Expand Down Expand Up @@ -605,7 +605,7 @@
407,0,6,4,0,0x1,0,1,0,no,0,0,0,none,0,0x0, ASC_CDP,Create Deadly Poison

//****
// Mariage Skills for Baby
// Marriage Skills for Baby
408,9,6,4,0,0x1,0,1,1,yes,0,0x4,0,none,0,0x0, WE_BABY,Baby
409,9,6,4,0,0x1,3,1,1,yes,0,0x4,1,none,0,0x0, WE_CALLPARENT,Call Parent
410,9,6,4,0,0x1,3,1,1,yes,0,0x4,1,none,0,0x0, WE_CALLBABY,Call Baby
Expand Down
4 changes: 2 additions & 2 deletions db/re/skill_require_db.txt
Expand Up @@ -307,8 +307,8 @@
329,0,0,43:46:49:52:55:58:61:64:67:70,0,0,0,13:14,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0//DC_FORTUNEKISS
330,0,0,40:45:50:55:60:65:70:75:80:85,0,0,0,13:14,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0//DC_SERVICEFORYOU

334,0,0,1,-10,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_MALE
335,0,0,1,0,-10,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_FEMALE
334,0,0,1,-15,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_MALE
335,0,0,1,0,-15,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_FEMALE
336,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARTNER
337,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ITM_TOMAHAWK

Expand Down
27 changes: 17 additions & 10 deletions src/map/skill.c
Expand Up @@ -7961,18 +7961,24 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
break;

case WE_MALE:
if( status_get_hp(src) > status_get_max_hp(src) / 10 ) {
int hp_rate=(!skill_lv)? 0:skill_get_hp_rate(skill_id, skill_lv);
int gain_hp= tstatus->max_hp*abs(hp_rate)/100; // The earned is the same % of the target HP than it costed the caster. [Skotlex]
clif_skill_nodamage(src,bl,skill_id,status_heal(bl, gain_hp, 0, 0),1);
case WE_MALE: {
uint8 hp_rate = abs(skill_get_hp_rate(skill_id, skill_lv);

if (hp_rate && status_get_hp(src) > status_get_max_hp(src) / hp_rate) {
int gain_hp = tstatus->max_hp * hp_rate / 100; // The earned is the same % of the target HP than it costed the caster. [Skotlex]

clif_skill_nodamage(src,bl,skill_id,status_heal(bl, gain_hp, 0, 0),1);
}
}
break;
case WE_FEMALE:
if( status_get_sp(src) > status_get_max_sp(src) / 10 ) {
int sp_rate=(!skill_lv)? 0:skill_get_sp_rate(skill_id, skill_lv);
int gain_sp=tstatus->max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it costed the caster. [Skotlex]
clif_skill_nodamage(src,bl,skill_id,status_heal(bl, 0, gain_sp, 0),1);
case WE_FEMALE: {
uint8 sp_rate = abs(skill_get_sp_rate(skill_id, skill_lv);

if (sp_rate && status_get_sp(src) > status_get_max_sp(src) / sp_rate) {
int gain_sp = tstatus->max_sp * sp_rate / 100; // The earned is the same % of the target SP than it costed the caster. [Skotlex]

clif_skill_nodamage(src,bl,skill_id,status_heal(bl, 0, gain_sp, 0),1);
}
}
break;

Expand All @@ -7981,6 +7987,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if(sd){
struct map_session_data *f_sd = pc_get_father(sd);
struct map_session_data *m_sd = pc_get_mother(sd);

if( (!f_sd && !m_sd) // if neither was found
|| (sd->status.party_id != 0 && //not in same party
((!f_sd || sd->status.party_id != f_sd->status.party_id)
Expand Down

2 comments on commit a7de6f8

@renniw
Copy link

@renniw renniw commented on a7de6f8 Feb 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi

uint8 sp_rate = abs(skill_get_sp_rate(skill_id, skill_lv); / /you forgot " )" after skill_lv)

@aleos89
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Fixed it in b9cce00. :)

Please sign in to comment.