nasagnilac
New member
- Messages
- 121
- Points
- 0
- Github
- gmblank
How can I disable Absorb Spirit effect when the opponents already hide.
Do you mean by this example?How can I disable Absorb Spirit effect when the opponents already hide.
yes it is.Do you mean by this example?How can I disable Absorb Spirit effect when the opponents already hide.
- You cast "Absorb Spirit" on the enemy but in mid casting, the enemy hides and his spheres still get absorbed? You want it so that the hiding cancels the absorb cast/or doesn't absorb when in hiding?
case MO_ABSORBSPIRITS: i = 0; if (dstsd && dstsd->spiritball && (sd == dstsd || map_flag_vs(src->m) || (sd && sd->state.pvpmode && dstsd->state.pvpmode)) && ((dstsd->class_&MAPID_BASEMASK) != MAPID_GUNSLINGER || (dstsd->class_&MAPID_UPPERMASK) != MAPID_REBELLION || (dstsd->class_&MAPID_UPPERMASK) != MAPID_THIEF || (dstsd->class_&MAPID_UPPERMASK) != MAPID_ASSASSIN)) { // split the if for readability, and included gunslingers in the check so that their coins cannot be removed [Reddozen] i = dstsd->spiritball * 7; pc_delspiritball(dstsd,dstsd->spiritball,0); } else if (dstmd && !(tstatus->mode&MD_BOSS) && rnd() % 100 < 20) { // check if target is a monster and not a Boss, for the 20% chance to absorb 2 SP per monster's level [Reddozen] i = 2 * dstmd->level; mob_target(dstmd,src,0); } if (i) status_heal(src, 0, i, 3); clif_skill_nodamage(src,bl,skill_id,skill_lv,i?1:0); break;yes it is.Do you mean by this example?How can I disable Absorb Spirit effect when the opponents already hide.
- You cast "Absorb Spirit" on the enemy but in mid casting, the enemy hides and his spheres still get absorbed? You want it so that the hiding cancels the absorb cast/or doesn't absorb when in hiding?
NICE !I've just made up a solution.
open src/map/status.c
find:
// Applies even if the target hides
if ((skill->get_ele(skill_id,1) == ELE_EARTH && skill_id != MG_STONECURSE) // Ground type
|| (flag&1 && skill->get_nk(skill_id)&NK_NO_DAMAGE && skill_id != ALL_RESURRECTION )) // Buff/debuff skills started before hiding
hide_flag &= ~OPTION_HIDE;
Then just add this " && skill_id != MO_ABSORBSPIRITS "
It would be look like this:
if ((skill->get_ele(skill_id,1) == ELE_EARTH && skill_id != MG_STONECURSE) // Ground type
|| (flag&1 && skill->get_nk(skill_id)&NK_NO_DAMAGE && skill_id != ALL_RESURRECTION && skill_id != MO_ABSORBSPIRITS )) // Buff/debuff skills started before hiding
hide_flag &= ~OPTION_HIDE;
tested it![]()
Sorry i dont know how to use box code
We use essential cookies to make this site work, and optional cookies to enhance your experience.