Skip to content

Commit

Permalink
Updated Madogear effect
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
aleos89 committed Feb 8, 2016
1 parent f5ea1dc commit 744aed5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
18 changes: 12 additions & 6 deletions src/map/skill.c
Expand Up @@ -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_get_jobexp;
if( status_isimmune(bl) ||
(dstmd && (dstmd->mob_id == MOBID_EMPERIUM || mob_is_battleground(dstmd))) ||
(dstsd && pc_ismadogear(dstsd)) )//Mado is immune to heal
heal=0;
if (status_isimmune(bl) || (dstmd && (dstmd->mob_id == MOBID_EMPERIUM || mob_is_battleground(dstmd))))
heal = 0;

if( tsc && tsc->count ) {
if( tsc->data[SC_KAITE] && !(sstatus->mode&MD_BOSS) ) { //Bounce back heal
Expand Down Expand Up @@ -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);
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.
|| rnd()%100 >= 50+10*skill_lv
|| ( tsc && tsc->option&OPTION_MADOGEAR ) )//Mado Gear is immune to dispell according to bug report 49 [Ind]
|| rnd()%100 >= 50+10*skill_lv)
{
if (sd)
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
Expand Down Expand Up @@ -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);

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:
{
uint8 dir = map_calc_dir(src,target->x,target->y),t_dir = unit_getdir(target);
Expand Down
6 changes: 3 additions & 3 deletions src/map/status.c
Expand Up @@ -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])
return 0;

case SC_INCREASEAGI:
case SC_CONCENTRATE:
case SC_SPEARQUICKEN:
case SC_TRUESIGHT:
case SC_WINDWALK:
case SC_CARTBOOST:
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])
return 0;
if(sc->option&OPTION_MADOGEAR)
return 0; // Mado is immune to increase agi, wind walk, cart boost, etc (others above) [Ind]
break;
case SC_CLOAKING:
// Avoid cloaking with no wall and low skill level. [Skotlex]
Expand Down

0 comments on commit 744aed5

Please sign in to comment.