* Added a new battle flag for telling which skills can have bHealPower effect.
* Added documentation for bHealPower. * Fixed some behaviors for healing skills, (thanks to L0ne_W0lf) git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13821 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
ac5aa55ae7
commit
f090bdbdbc
@ -257,3 +257,7 @@ sg_miracle_skill_duration: 3600000
|
|||||||
|
|
||||||
// Angel of the Sun, Moon and Stars skill ratio (100% = 10000)
|
// Angel of the Sun, Moon and Stars skill ratio (100% = 10000)
|
||||||
sg_angel_skill_ratio: 10
|
sg_angel_skill_ratio: 10
|
||||||
|
|
||||||
|
// Skills that bHealPower has effect on
|
||||||
|
// 1: Heal, 2: Sanctuary, 4: Potion Pitcher, 8: Slim Pitcher, 16: Apple of Idun
|
||||||
|
skill_add_heal_rate: 7
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
//= 1.1.20090122 - removed outdated bSPDrainValue command [ultramage]
|
//= 1.1.20090122 - removed outdated bSPDrainValue command [ultramage]
|
||||||
//= 1.1.20090421 - added the correct bonus documentation for bSPDrainValue [Playtester]
|
//= 1.1.20090421 - added the correct bonus documentation for bSPDrainValue [Playtester]
|
||||||
//= 1.1.20090524 - removed outdated bMatk/bMatk1/bMatk2 doc [ultramage]
|
//= 1.1.20090524 - removed outdated bMatk/bMatk1/bMatk2 doc [ultramage]
|
||||||
|
//= 1.1.20090529 - added documentation for bHealPower, bHealPower2 [Inkfish]
|
||||||
//===== Description =======================================
|
//===== Description =======================================
|
||||||
//= List of script instructions used in item bonuses,
|
//= List of script instructions used in item bonuses,
|
||||||
//= mainly bonus/bonus2/bonus3/bonus4/bonus5 arguments
|
//= mainly bonus/bonus2/bonus3/bonus4/bonus5 arguments
|
||||||
@ -112,6 +113,8 @@ bonus bNoGemStone,n; Skills requiring Gemstones do no require them
|
|||||||
(Hocus Pocus will still require 1 Yellow Gemstone | n is meaningless)
|
(Hocus Pocus will still require 1 Yellow Gemstone | n is meaningless)
|
||||||
bonus bIntravision,n; Always see Hiding and Cloaking players/mobs (n is meaningless)
|
bonus bIntravision,n; Always see Hiding and Cloaking players/mobs (n is meaningless)
|
||||||
|
|
||||||
|
bonus bHealPower,n; Increase heal amount of all heal skills by n% (supports skill names)
|
||||||
|
bonus bHealPower2,n; Increase heal amount if you are healed by any skills by n% (supports skill names)
|
||||||
bonus2 bAddEff,e,x; Adds a x/10000 chance to cause effect e to the target when attacking (e.g. x=100 makes 1% chance, x=10000 makes 100% chance, etc)
|
bonus2 bAddEff,e,x; Adds a x/10000 chance to cause effect e to the target when attacking (e.g. x=100 makes 1% chance, x=10000 makes 100% chance, etc)
|
||||||
e: Eff_Blind, Eff_Sleep, Eff_Poison, Eff_Freeze, Eff_Silence, Eff_Stan, Eff_Curse, Eff_Confusion, Eff_Stone, Eff_Bleeding
|
e: Eff_Blind, Eff_Sleep, Eff_Poison, Eff_Freeze, Eff_Silence, Eff_Stan, Eff_Curse, Eff_Confusion, Eff_Stone, Eff_Bleeding
|
||||||
bonus2 bResEff,e,x; Adds a x/10000 tolerance to effect e (e.g. x=100 makes 1% tolerance, x=10000 makes 100% tolerance, etc)
|
bonus2 bResEff,e,x; Adds a x/10000 tolerance to effect e (e.g. x=100 makes 1% tolerance, x=10000 makes 100% tolerance, etc)
|
||||||
|
@ -2280,7 +2280,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
|
|||||||
case AL_HEAL:
|
case AL_HEAL:
|
||||||
case PR_BENEDICTIO:
|
case PR_BENEDICTIO:
|
||||||
case PR_SANCTUARY:
|
case PR_SANCTUARY:
|
||||||
ad.damage = skill_calc_heal(src, target, skill_num, skill_lv)/2;
|
ad.damage = skill_calc_heal(src, target, skill_num, skill_lv, false);
|
||||||
break;
|
break;
|
||||||
case PR_ASPERSIO:
|
case PR_ASPERSIO:
|
||||||
ad.damage = 40;
|
ad.damage = 40;
|
||||||
@ -2671,7 +2671,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
|
|||||||
md.dmotion = 0; //No flinch animation.
|
md.dmotion = 0; //No flinch animation.
|
||||||
break;
|
break;
|
||||||
case NPC_EVILLAND:
|
case NPC_EVILLAND:
|
||||||
md.damage = skill_calc_heal(src,target,skill_num,skill_lv);
|
md.damage = skill_calc_heal(src,target,skill_num,skill_lv,false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3813,6 +3813,7 @@ static const struct _battle_data {
|
|||||||
{ "gm_viewequip_min_lv", &battle_config.gm_viewequip_min_lv, 0, 0, 99, },
|
{ "gm_viewequip_min_lv", &battle_config.gm_viewequip_min_lv, 0, 0, 99, },
|
||||||
{ "homunculus_auto_vapor", &battle_config.homunculus_auto_vapor, 0, 0, 1, },
|
{ "homunculus_auto_vapor", &battle_config.homunculus_auto_vapor, 0, 0, 1, },
|
||||||
{ "display_status_timers", &battle_config.display_status_timers, 1, 0, 1, },
|
{ "display_status_timers", &battle_config.display_status_timers, 1, 0, 1, },
|
||||||
|
{ "skill_add_heal_rate", &battle_config.skill_add_heal_rate, 7, 0, INT_MAX, },
|
||||||
// BattleGround Settings
|
// BattleGround Settings
|
||||||
{ "bg_update_interval", &battle_config.bg_update_interval, 1000, 100, INT_MAX, },
|
{ "bg_update_interval", &battle_config.bg_update_interval, 1000, 100, INT_MAX, },
|
||||||
{ "bg_short_attack_damage_rate", &battle_config.bg_short_damage_rate, 80, 0, INT_MAX, },
|
{ "bg_short_attack_damage_rate", &battle_config.bg_short_damage_rate, 80, 0, INT_MAX, },
|
||||||
|
@ -462,8 +462,9 @@ extern struct Battle_Config
|
|||||||
int auction_feeperhour;
|
int auction_feeperhour;
|
||||||
int auction_maximumprice;
|
int auction_maximumprice;
|
||||||
int gm_viewequip_min_lv;
|
int gm_viewequip_min_lv;
|
||||||
int homunculus_auto_vapor; //Keep Homunculus from Vaporizing when master dies. [L0ne_W0lf]
|
int homunculus_auto_vapor; //Keep Homunculus from Vaporizing when master dies. [L0ne_W0lf]
|
||||||
int display_status_timers; //Show or hide skill buff/delay timers in recent clients [Sara]
|
int display_status_timers; //Show or hide skill buff/delay timers in recent clients [Sara]
|
||||||
|
int skill_add_heal_rate; //skills that bHealPower has effect on [Inkfish]
|
||||||
// [BattleGround Settings]
|
// [BattleGround Settings]
|
||||||
int bg_update_interval;
|
int bg_update_interval;
|
||||||
int bg_short_damage_rate;
|
int bg_short_damage_rate;
|
||||||
|
12
src/map/pc.c
12
src/map/pc.c
@ -5245,6 +5245,18 @@ int pc_skillheal_bonus(struct map_session_data *sd, int skill_num)
|
|||||||
{
|
{
|
||||||
int i, bonus = sd->add_heal_rate;
|
int i, bonus = sd->add_heal_rate;
|
||||||
|
|
||||||
|
if( bonus )
|
||||||
|
{
|
||||||
|
switch( skill_num )
|
||||||
|
{
|
||||||
|
case AL_HEAL: if( !(battle_config.skill_add_heal_rate&1) ) bonus = 0; break;
|
||||||
|
case PR_SANCTUARY: if( !(battle_config.skill_add_heal_rate&2) ) bonus = 0; break;
|
||||||
|
case AM_POTIONPITCHER: if( !(battle_config.skill_add_heal_rate&4) ) bonus = 0; break;
|
||||||
|
case CR_SLIMPITCHER: if( !(battle_config.skill_add_heal_rate&8) ) bonus = 0; break;
|
||||||
|
case BA_APPLEIDUN: if( !(battle_config.skill_add_heal_rate&16) ) bonus = 0; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ARR_FIND(0, ARRAYLENGTH(sd->skillheal), i, sd->skillheal[i].id == skill_num);
|
ARR_FIND(0, ARRAYLENGTH(sd->skillheal), i, sd->skillheal[i].id == skill_num);
|
||||||
if( i < ARRAYLENGTH(sd->skillheal) ) bonus += sd->skillheal[i].val;
|
if( i < ARRAYLENGTH(sd->skillheal) ) bonus += sd->skillheal[i].val;
|
||||||
|
|
||||||
|
@ -269,9 +269,9 @@ int skill_get_range2 (struct block_list *bl, int id, int lv)
|
|||||||
return range;
|
return range;
|
||||||
}
|
}
|
||||||
|
|
||||||
int skill_calc_heal(struct block_list *src, struct block_list *target, int skill_id, int skill_lv)
|
int skill_calc_heal(struct block_list *src, struct block_list *target, int skill_id, int skill_lv, bool heal)
|
||||||
{
|
{
|
||||||
int skill, heal;
|
int skill, hp;
|
||||||
struct map_session_data *sd = map_id2sd(src->id);
|
struct map_session_data *sd = map_id2sd(src->id);
|
||||||
struct map_session_data *tsd = map_id2sd(target->id);
|
struct map_session_data *tsd = map_id2sd(target->id);
|
||||||
struct status_change* sc;
|
struct status_change* sc;
|
||||||
@ -279,50 +279,47 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, int skill
|
|||||||
switch( skill_id )
|
switch( skill_id )
|
||||||
{
|
{
|
||||||
case BA_APPLEIDUN:
|
case BA_APPLEIDUN:
|
||||||
heal = 30+5*skill_lv+5*(status_get_vit(src)/10); // HP recovery
|
hp = 30+5*skill_lv+5*(status_get_vit(src)/10); // HP recovery
|
||||||
if( sd )
|
if( sd )
|
||||||
heal += 5*pc_checkskill(sd,BA_MUSICALLESSON);
|
hp += 5*pc_checkskill(sd,BA_MUSICALLESSON);
|
||||||
break;
|
break;
|
||||||
case PR_SANCTUARY:
|
case PR_SANCTUARY:
|
||||||
heal = (skill_lv>6)?777:skill_lv*100;
|
hp = (skill_lv>6)?777:skill_lv*100;
|
||||||
break;
|
break;
|
||||||
case NPC_EVILLAND:
|
case NPC_EVILLAND:
|
||||||
heal = (skill_lv>6)?666:skill_lv*100;
|
hp = (skill_lv>6)?666:skill_lv*100;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (skill_lv >= battle_config.max_heal_lv)
|
if (skill_lv >= battle_config.max_heal_lv)
|
||||||
return battle_config.max_heal;
|
return battle_config.max_heal;
|
||||||
|
|
||||||
heal = ( status_get_lv(src)+status_get_int(src) )/8 *(4+ skill_lv*8);
|
hp = ( status_get_lv(src)+status_get_int(src) )/8 *(4+ skill_lv*8);
|
||||||
if( sd && ((skill = pc_checkskill(sd, HP_MEDITATIO)) > 0) )
|
if( sd && ((skill = pc_checkskill(sd, HP_MEDITATIO)) > 0) )
|
||||||
heal += heal * skill * 2 / 100;
|
hp += hp * skill * 2 / 100;
|
||||||
else if( src->type == BL_HOM && (skill = merc_hom_checkskill(((TBL_HOM*)src), HLIF_BRAIN)) > 0 )
|
else if( src->type == BL_HOM && (skill = merc_hom_checkskill(((TBL_HOM*)src), HLIF_BRAIN)) > 0 )
|
||||||
heal += heal * skill * 2 / 100;
|
hp += hp * skill * 2 / 100;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//FIXME: Is NPC_EVILLAND or BA_APPLEIDUN really an exception or we failed to add them to the original code? [Inkfish]
|
if( ( (target && target->type == BL_MER) || !heal ) && skill_id != NPC_EVILLAND )
|
||||||
if( target && target->type == BL_MER && skill_id != NPC_EVILLAND )
|
hp >>= 1;
|
||||||
heal >>= 1;
|
|
||||||
|
|
||||||
if( sd && (skill = pc_skillheal_bonus(sd, skill_id)) )
|
if( sd && (skill = pc_skillheal_bonus(sd, skill_id)) )
|
||||||
heal += heal*skill/100;
|
hp += hp*skill/100;
|
||||||
|
|
||||||
if( tsd && (skill = pc_skillheal2_bonus(tsd, skill_id)) )
|
if( tsd && (skill = pc_skillheal2_bonus(tsd, skill_id)) )
|
||||||
heal += heal*skill/100;
|
hp += hp*skill/100;
|
||||||
|
|
||||||
//FIXME: Is offensive heal affected by the following status? [Inkfish]
|
|
||||||
//According to the original code, HEAL is but SANCTUARY isn't. Is that true?
|
|
||||||
sc = status_get_sc(target);
|
sc = status_get_sc(target);
|
||||||
if( sc && sc->count )
|
if( sc && sc->count )
|
||||||
{
|
{
|
||||||
if( sc->data[SC_CRITICALWOUND] )
|
if( sc->data[SC_CRITICALWOUND] && heal ) // Critical Wound has no effect on offensive heal. [Inkfish]
|
||||||
heal -= heal * sc->data[SC_CRITICALWOUND]->val2/100;
|
hp -= hp * sc->data[SC_CRITICALWOUND]->val2/100;
|
||||||
if( sc->data[SC_INCHEALRATE] ) //FIXME: BA_APPLEIDUN not affected by this one? [Inkfish]
|
if( sc->data[SC_INCHEALRATE] && skill_id != NPC_EVILLAND && skill_id != BA_APPLEIDUN )
|
||||||
heal += heal * sc->data[SC_INCHEALRATE]->val1/100;
|
hp += hp * sc->data[SC_INCHEALRATE]->val1/100; // Only affects Heal, Sanctuary and PotionPitcher.(like bHealPower) [Inkfish]
|
||||||
}
|
}
|
||||||
|
|
||||||
return heal;
|
return hp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Making plagiarize check its own function [Aru]
|
// Making plagiarize check its own function [Aru]
|
||||||
@ -3173,7 +3170,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
|||||||
case HLIF_HEAL: //[orn]
|
case HLIF_HEAL: //[orn]
|
||||||
case AL_HEAL:
|
case AL_HEAL:
|
||||||
{
|
{
|
||||||
int heal = skill_calc_heal(src, bl, skillid, skilllv);
|
int heal = skill_calc_heal(src, bl, skillid, skilllv, true);
|
||||||
int heal_get_jobexp;
|
int heal_get_jobexp;
|
||||||
|
|
||||||
if( status_isimmune(bl) || (dstmd && (dstmd->class_ == MOBID_EMPERIUM || mob_is_battleground(dstmd))) )
|
if( status_isimmune(bl) || (dstmd && (dstmd->class_ == MOBID_EMPERIUM || mob_is_battleground(dstmd))) )
|
||||||
@ -5559,7 +5556,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
|||||||
bl = map_id2bl(battle_gettarget(src));
|
bl = map_id2bl(battle_gettarget(src));
|
||||||
|
|
||||||
if (!bl) bl = src;
|
if (!bl) bl = src;
|
||||||
i = skill_calc_heal(src, bl, skillid, 1+rand()%skilllv);
|
i = skill_calc_heal(src, bl, skillid, 1+rand()%skilllv, true);
|
||||||
//Eh? why double skill packet?
|
//Eh? why double skill packet?
|
||||||
clif_skill_nodamage(src,bl,AL_HEAL,i,1);
|
clif_skill_nodamage(src,bl,AL_HEAL,i,1);
|
||||||
clif_skill_nodamage(src,bl,skillid,i,1);
|
clif_skill_nodamage(src,bl,skillid,i,1);
|
||||||
@ -7315,7 +7312,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int heal = skill_calc_heal(ss,bl,sg->skill_id,sg->skill_lv);
|
int heal = skill_calc_heal(ss,bl,sg->skill_id,sg->skill_lv,true);
|
||||||
struct mob_data *md = BL_CAST(BL_MOB, bl);
|
struct mob_data *md = BL_CAST(BL_MOB, bl);
|
||||||
if( md && mob_is_battleground(md) )
|
if( md && mob_is_battleground(md) )
|
||||||
break;
|
break;
|
||||||
@ -7339,7 +7336,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
|
|||||||
if(battle_check_target(&src->bl,bl,BCT_ENEMY)>0)
|
if(battle_check_target(&src->bl,bl,BCT_ENEMY)>0)
|
||||||
skill_attack(BF_MISC, ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0);
|
skill_attack(BF_MISC, ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0);
|
||||||
} else {
|
} else {
|
||||||
int heal = skill_calc_heal(ss,bl,sg->skill_id,sg->skill_lv);
|
int heal = skill_calc_heal(ss,bl,sg->skill_id,sg->skill_lv,true);
|
||||||
if (tstatus->hp >= tstatus->max_hp)
|
if (tstatus->hp >= tstatus->max_hp)
|
||||||
break;
|
break;
|
||||||
if (status_isimmune(bl))
|
if (status_isimmune(bl))
|
||||||
@ -7500,7 +7497,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
|
|||||||
int heal;
|
int heal;
|
||||||
if( sg->src_id == bl->id && !(tsc && tsc->data[SC_SPIRIT] && tsc->data[SC_SPIRIT]->val2 == SL_BARDDANCER) )
|
if( sg->src_id == bl->id && !(tsc && tsc->data[SC_SPIRIT] && tsc->data[SC_SPIRIT]->val2 == SL_BARDDANCER) )
|
||||||
break; // affects self only when soullinked
|
break; // affects self only when soullinked
|
||||||
heal = skill_calc_heal(ss,bl,sg->skill_id, sg->skill_lv);
|
heal = skill_calc_heal(ss,bl,sg->skill_id, sg->skill_lv, true);
|
||||||
clif_skill_nodamage(&src->bl, bl, AL_HEAL, heal, 1);
|
clif_skill_nodamage(&src->bl, bl, AL_HEAL, heal, 1);
|
||||||
status_heal(bl, heal, 0, 0);
|
status_heal(bl, heal, 0, 0);
|
||||||
break;
|
break;
|
||||||
|
@ -318,7 +318,7 @@ void skill_identify(struct map_session_data *sd,int idx);
|
|||||||
void skill_weaponrefine(struct map_session_data *sd,int idx); // [Celest]
|
void skill_weaponrefine(struct map_session_data *sd,int idx); // [Celest]
|
||||||
int skill_autospell(struct map_session_data *md,int skillid);
|
int skill_autospell(struct map_session_data *md,int skillid);
|
||||||
|
|
||||||
int skill_calc_heal(struct block_list *src, struct block_list *target, int skill_id, int skill_lv);
|
int skill_calc_heal(struct block_list *src, struct block_list *target, int skill_id, int skill_lv, bool heal);
|
||||||
|
|
||||||
bool skill_check_cloaking(struct block_list *bl, struct status_change_entry *sce);
|
bool skill_check_cloaking(struct block_list *bl, struct status_change_entry *sce);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user