Jump to content
  • 0

Mobs immune to skills


HeikoS

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   2
  • Joined:  01/08/12
  • Last Seen:  

Hi,

i want to have a mob, that will get no damage by skills.

I tried this: http://www.eathena.w...ndpost&p=927155

And I tried using parts of the function battle_calc_gvg_damage (in src/map/battle.c):

int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int damage,int skill_num,int skill_lv)
{
struct map_session_data *sd = NULL;
struct status_change *sc;
struct status_change_entry *sce;
int div_ = d->div_, flag = d->flag;
//## Mob-Skillimmune START
int class_ = status_get_class(bl);
//## Mob-Skillimmune END
	nullpo_ret(bl);
	if( !damage )
			return 0;
//## Mob-Skillimmune START
  if (class_ == 2993 && flag&BF_SKILL)
		  return 0;
//## Mob-Skillimmune END
if( mob_ksprotected(src, bl) )
 return 0;

But the special mob (ID 2993) gets still damage from skills like Jupitel Thunder.

Does anyone have a idea to make this mob immune to all skills?

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

I used your code , test on poring (1002) and it works well

http://i.imgur.com/TDP24.jpg

http://i.imgur.com/ISkSr.jpg

you can try to use some shown to see what date you got.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   2
  • Joined:  01/08/12
  • Last Seen:  

Thanks for this tip.

With a poring (ID 1002) it works well, too.

I think it will not work with mobs that are made as a sprite-copy via db/mob_avail.txt. So I will change my special mob to a real mob with real sprite.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

here is why

case BL_MOB: return ((TBL_MOB*)bl)->vd->class_;

it gives you vd (view date).

below is my way

if(bl->type==BL_MOB)
 if ( ((TBL_MOB*)bl)->class_ == 1002 && flag&BF_SKILL)
return 0;

and it success

http://i.imgur.com/K2ChL.jpg

http://i.imgur.com/9Wwgz.jpg

http://i.imgur.com/pgFUz.jpg

http://i.imgur.com/cyPXN.jpg

Edited by goddameit
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

yeah goddameit right. Your code fine but you get the wrong class_ here; put a breakpoint on it and you'll see that it wasn't the id you expect.

You should have take ((TBL_MOB*)bl)->class_ instead.

Also don't have the code here but if I recall there already a place who parse skills to see wheater or not inflict dammage (check on MOBID_EMPERIUM)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   2
  • Joined:  01/08/12
  • Last Seen:  

Thanks a lot, its working fine.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   2
  • Joined:  01/08/12
  • Last Seen:  

Oh, it prevents hits/damage from jupitel thunder.

But unfortunatly skills like arrow vulcan still does damage. Any ideas?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   2
  • Joined:  01/08/12
  • Last Seen:  

Bump.

Why is there damage from archer class skills like arrow vulcan/shower?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

because Arrow Vulcan/Shower is considered as BS_WEAPON not BS_MAGIC?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...