anjasoleil1 Posted August 18, 2020 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 66 Reputation: 0 Joined: 05/11/14 Last Seen: January 30 Share Posted August 18, 2020 How do i make "Stealth Field" (Mado skill) not cancelled by land protector Quote Link to comment Share on other sites More sharing options...
0 Humble_Bee Posted September 29, 2020 Group: Members Topic Count: 54 Topics Per Day: 0.03 Content Count: 112 Reputation: 9 Joined: 09/22/19 Last Seen: July 24, 2022 Share Posted September 29, 2020 On 8/18/2020 at 9:06 AM, anjasoleil1 said: How do i make "Stealth Field" (Mado skill) not cancelled by land protector The easiest way would be to go into the skill_db (either .yml or .txt, depending on how old your file is) and adding it as not being affected by land protector. Look for the inf3 section. If you want to do it the more difficult way, you could: In skill.cpp, look for this: switch (skill_id) { case SA_LANDPROTECTOR: if( unit->group->skill_id == SA_LANDPROTECTOR ) {//Check for offensive Land Protector to delete both. [Skotlex] (*alive) = 0; skill_delunit(unit); return 1; } //It deletes everything except traps and barriers if ((!(skill_get_inf2(unit->group->skill_id)&(INF2_TRAP)) && !(skill_get_inf3(unit->group->skill_id)&(INF3_NOLP))) || unit->group->skill_id == WZ_FIREPILLAR || unit->group->skill_id == GN_HELLS_PLANT) { if (skill_get_unit_flag(unit->group->skill_id)&UF_RANGEDSINGLEUNIT) { if (unit->val2&UF_RANGEDSINGLEUNIT) skill_delunitgroup(unit->group); } else skill_delunit(unit); return 1; } break; And change it to this: switch (skill_id) { case SA_LANDPROTECTOR: if( unit->group->skill_id == SA_LANDPROTECTOR ) {//Check for offensive Land Protector to delete both. [Skotlex] (*alive) = 0; skill_delunit(unit); return 1; } //It deletes everything except traps and barriers if ((!(skill_get_inf2(unit->group->skill_id)&(INF2_TRAP)) && !(skill_get_inf3(unit->group->skill_id)&(INF3_NOLP))) || unit->group->skill_id == WZ_FIREPILLAR || unit->group->skill_id == NC_STEALTHFIELD || unit->group->skill_id == GN_HELLS_PLANT) { if (skill_get_unit_flag(unit->group->skill_id)&UF_RANGEDSINGLEUNIT) { if (unit->val2&UF_RANGEDSINGLEUNIT) skill_delunitgroup(unit->group); } else skill_delunit(unit); return 1; } break; And also look for this: if( !(skill_get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP)) && !(skill_get_inf3(group->skill_id)&(INF3_NOLP)) && group->skill_id != NC_NEUTRALBARRIER && map_getcell(unit->bl.m, unit->bl.x, unit->bl.y, CELL_CHKLANDPROTECTOR) ) return 0; //AoE skills are ineffective. [Skotlex] And change it to this: if( !(skill_get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP)) && !(skill_get_inf3(group->skill_id)&(INF3_NOLP)) && group->skill_id != NC_NEUTRALBARRIER && group->skill_id != NC_STEALTHFIELD && map_getcell(unit->bl.m, unit->bl.x, unit->bl.y, CELL_CHKLANDPROTECTOR) ) return 0; //AoE skills are ineffective. [Skotlex] I haven't tested the skill.cpp changes to know that they work though. Just a guess. Quote Link to comment Share on other sites More sharing options...
Question
anjasoleil1
How do i make "Stealth Field" (Mado skill) not cancelled by land protector
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.