Updated Madogear effect

* Canto Candidus can now increase the agility of Madogear-ed players in the party.
* Heal, Increase Agility, Decrease Agility, Dispell, Renovatio, and Highness Heal now display the correct skill fail message.
This commit is contained in:
aleos89 2016-02-08 10:34:56 -05:00
parent f5ea1dcb3e
commit 744aed55e3
2 changed files with 15 additions and 9 deletions

View File

@ -5875,10 +5875,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
{ {
int heal = skill_calc_heal(src, bl, skill_id, skill_lv, true); int heal = skill_calc_heal(src, bl, skill_id, skill_lv, true);
int heal_get_jobexp; int heal_get_jobexp;
if( status_isimmune(bl) || if (status_isimmune(bl) || (dstmd && (dstmd->mob_id == MOBID_EMPERIUM || mob_is_battleground(dstmd))))
(dstmd && (dstmd->mob_id == MOBID_EMPERIUM || mob_is_battleground(dstmd))) || heal = 0;
(dstsd && pc_ismadogear(dstsd)) )//Mado is immune to heal
heal=0;
if( tsc && tsc->count ) { if( tsc && tsc->count ) {
if( tsc->data[SC_KAITE] && !(sstatus->mode&MD_BOSS) ) { //Bounce back heal if( tsc->data[SC_KAITE] && !(sstatus->mode&MD_BOSS) ) { //Bounce back heal
@ -7536,8 +7534,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif_skill_nodamage(src,bl,skill_id,skill_lv,1); clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
if((dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER) if((dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER)
|| (tsc && tsc->data[SC_SPIRIT] && tsc->data[SC_SPIRIT]->val2 == SL_ROGUE) //Rogue's spirit defends againt dispel. || (tsc && tsc->data[SC_SPIRIT] && tsc->data[SC_SPIRIT]->val2 == SL_ROGUE) //Rogue's spirit defends againt dispel.
|| rnd()%100 >= 50+10*skill_lv || rnd()%100 >= 50+10*skill_lv)
|| ( tsc && tsc->option&OPTION_MADOGEAR ) )//Mado Gear is immune to dispell according to bug report 49 [Ind]
{ {
if (sd) if (sd)
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
@ -10742,6 +10739,15 @@ static int8 skill_castend_id_check(struct block_list *src, struct block_list *ta
struct status_change *tsc = status_get_sc(target); struct status_change *tsc = status_get_sc(target);
switch (skill_id) { switch (skill_id) {
case AL_HEAL:
case AL_INCAGI:
case AL_DECAGI:
case SA_DISPELL: // Mado Gear is immune to Dispell according to bugreport:49 [Ind]
case AB_RENOVATIO:
case AB_HIGHNESSHEAL:
if (tsc && tsc->option&OPTION_MADOGEAR)
return USESKILL_FAIL_TOTARGET;
break;
case RG_BACKSTAP: case RG_BACKSTAP:
{ {
uint8 dir = map_calc_dir(src,target->x,target->y),t_dir = unit_getdir(target); uint8 dir = map_calc_dir(src,target->x,target->y),t_dir = unit_getdir(target);

View File

@ -8001,17 +8001,17 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
if(sc->data[SC_DECREASEAGI] || sc->data[SC_ADORAMUS]) if(sc->data[SC_DECREASEAGI] || sc->data[SC_ADORAMUS])
return 0; return 0;
case SC_INCREASEAGI:
case SC_CONCENTRATE: case SC_CONCENTRATE:
case SC_SPEARQUICKEN: case SC_SPEARQUICKEN:
case SC_TRUESIGHT: case SC_TRUESIGHT:
case SC_WINDWALK: case SC_WINDWALK:
case SC_CARTBOOST: case SC_CARTBOOST:
case SC_ASSNCROS: case SC_ASSNCROS:
if (sc->option&OPTION_MADOGEAR)
return 0; // Mado is immune to Wind Walk, Cart Boost, etc (others above) [Ind]
case SC_INCREASEAGI:
if (sc->data[SC_QUAGMIRE]) if (sc->data[SC_QUAGMIRE])
return 0; return 0;
if(sc->option&OPTION_MADOGEAR)
return 0; // Mado is immune to increase agi, wind walk, cart boost, etc (others above) [Ind]
break; break;
case SC_CLOAKING: case SC_CLOAKING:
// Avoid cloaking with no wall and low skill level. [Skotlex] // Avoid cloaking with no wall and low skill level. [Skotlex]