Merge branch 'Upstream/master'

This commit is contained in:
nanakiwurtz 2013-12-19 13:48:03 +07:00
commit 49b034e6f5
6 changed files with 40 additions and 14 deletions

View File

@ -181,6 +181,12 @@ gx_disptype: 1
// Max Level Difference for Devotion
devotion_level_difference: 10
// Using 'old' behavior for devotion vs reflect damage? (Note 2)
// Default is 0 (official). If 'devotion_rdamage' is > 0 (chance to devot the reflected damage),
// when player with devotion attacks player with reflect damage ability (item bonus or skill),
// the damage will be taken by the person who provides devotion instead the attacker.
devotion_rdamage: 0
// If no than you can use the ensemble skills alone. (Note 1)
player_skill_partner_check: yes

View File

@ -186,7 +186,7 @@ payon,162,67,4 script Guide#pay 708,{
break;
}
}
cutin "pay_soldier",255;
cutin "",255;
end;
}
@ -291,6 +291,6 @@ pay_arche,85,30,2 script Guide#2pay 708,{
break;
}
}
cutin "pay_soldier",255;
cutin "",255;
end;
}

View File

@ -178,8 +178,8 @@ payon,163,64,3 script Guide#01payon::GuidePayon 708,{
case 4:
mes "[Payon Guide]";
mes "Enjoy your stay.";
close;
cutin "pay_soldier",255;
close2;
cutin "",255;
end;
}
}
@ -287,7 +287,7 @@ pay_arche,86,33,4 script Guide#05payon 708,{
mes "[Payon Guide]";
mes "Enjoy your stay.";
close2;
cutin "pay_soldier",255;
cutin "",255;
end;
}
}

View File

@ -4477,11 +4477,20 @@ void battle_do_reflect(int attack_type, struct Damage *wd, struct block_list* sr
// Item reflect gets calculated first
rdamage = battle_calc_return_damage(target, src, &damage, wd->flag, skill_id, 0);
if( rdamage > 0 ) {
//Use Reflect Shield to signal this kind of skill trigger. [Skotlex]
rdelay = clif_damage(src, src, tick, wd->amotion, sstatus->dmotion, rdamage, 1, 4, 0);
bool isDevotRdamage = false;
//Get info if the attacker has Devotion from other player
struct status_change *ssc = NULL;
struct block_list *d_bl = NULL;
if (battle_config.devotion_rdamage && battle_config.devotion_rdamage > rand()%100) {
ssc = status_get_sc(src);;
if (ssc && ssc->data[SC_DEVOTION] && (d_bl = map_id2bl(ssc->data[SC_DEVOTION]->val1)))
isDevotRdamage = true;
}
rdelay = clif_damage(src, (!isDevotRdamage) ? src : d_bl, tick, wd->amotion, sstatus->dmotion, rdamage, 1, 4, 0);
if( tsd ) battle_drain(tsd, src, rdamage, rdamage, sstatus->race, is_boss(src));
battle_delay_damage(tick, wd->amotion,target,src,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,rdelay,true);
skill_additional_effect(target, src, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick);
//Use Reflect Shield to signal this kind of skill trigger. [Skotlex]
battle_delay_damage(tick, wd->amotion,target,(!isDevotRdamage) ? src : d_bl,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,rdelay,true);
skill_additional_effect(target, (!isDevotRdamage) ? src : d_bl, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick);
}
// Calculate skill reflect damage separately
@ -4489,6 +4498,15 @@ void battle_do_reflect(int attack_type, struct Damage *wd, struct block_list* sr
struct status_data *tstatus = status_get_status_data(target);
rdamage = battle_calc_return_damage(target, src, &damage, wd->flag, skill_id, 1);
if( rdamage > 0 ) {
bool isDevotRdamage = false;
//Get info if the attacker has Devotion from other player
struct status_change *ssc = NULL;
struct block_list *d_bl = NULL;
if (battle_config.devotion_rdamage && battle_config.devotion_rdamage > rand()%100) {
ssc = status_get_sc(src);;
if (ssc && ssc->data[SC_DEVOTION] && (d_bl = map_id2bl(ssc->data[SC_DEVOTION]->val1)))
isDevotRdamage = true;
}
//if(tsc->data[SC__SHADOWFORM]) {
// struct block_list *s_bl = map_id2bl(tsc->data[SC__SHADOWFORM]->val2);
// if(s_bl)
@ -4500,11 +4518,11 @@ void battle_do_reflect(int attack_type, struct Damage *wd, struct block_list* sr
if(attack_type == BF_WEAPON && tsc->data[SC_REFLECTDAMAGE] ) // Don't reflect your own damage (Grand Cross)
map_foreachinshootrange(battle_damage_area,target,skill_get_splash(LG_REFLECTDAMAGE,1),BL_CHAR,tick,target,wd->amotion,sstatus->dmotion,rdamage,tstatus->race);
else if(attack_type == BF_WEAPON || attack_type == BF_MISC) {
rdelay = clif_damage(src, src, tick, wd->amotion, sstatus->dmotion, rdamage, 1, 4, 0);
rdelay = clif_damage(src, (!isDevotRdamage) ? src : d_bl, tick, wd->amotion, sstatus->dmotion, rdamage, 1, 4, 0);
if( tsd ) battle_drain(tsd, src, rdamage, rdamage, sstatus->race, is_boss(src));
// It appears that official servers give skill reflect damage a longer delay
battle_delay_damage(tick, wd->amotion,target,src,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,rdelay,true);
skill_additional_effect(target, src, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick);
battle_delay_damage(tick, wd->amotion,target,(!isDevotRdamage) ? src : d_bl,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,rdelay,true);
skill_additional_effect(target, (!isDevotRdamage) ? src : d_bl, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick);
}
}
}
@ -7264,6 +7282,7 @@ static const struct _battle_data {
{ "emblem_transparency_limit", &battle_config.emblem_transparency_limit, 80, 0, 100, },
{ "discount_item_point_shop", &battle_config.discount_item_point_shop, 0, 0, 3, },
{ "update_enemy_position", &battle_config.update_enemy_position, 0, 0, 1, },
{ "devotion_rdamage", &battle_config.devotion_rdamage, 0, 0, 100, },
};
#ifndef STATS_OPT_OUT
/**

View File

@ -514,6 +514,7 @@ extern struct Battle_Config
int emblem_transparency_limit;
int discount_item_point_shop;
int update_enemy_position;
int devotion_rdamage;
} battle_config;
void do_init_battle(void);

View File

@ -5952,7 +5952,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
mer->devotion_flag = 1; // Mercenary Devoting Owner
clif_skill_nodamage(src, bl, skill_id, skill_lv,
sc_start4(src,bl, type, 100, src->id, i, skill_get_range2(src,skill_id,skill_lv),0, skill_get_time2(skill_id, skill_lv)));
sc_start4(src, bl, type, 100, src->id, i, skill_get_range2(src,skill_id,skill_lv),0, skill_get_time2(skill_id, skill_lv)));
clif_devotion(src, NULL);
}
break;