Jump to content
  • 0
Sign in to follow this  
kinori

[Help] Atk and Def

Question

Hello, I compiled my emulator renewal mode, set up the server to high lvl 500/400 status.

renewal formula for atk distribution is very low and very high def so does to matk.

I would be replacing the renewal formula for pre-re, keeping my compilation renewal mode.

I imagine that changes occur in the status.c battle.c files, could give the formulas to be changed?

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

In src/map/status.c
replaces this:
 

#ifdef RENEWAL // renewal formulas
if ( bl->type == BL_HOM ) {
st->def2 = status_get_homvit(bl) + status_get_homagi(bl) / 2;
st->mdef2 = (status_get_homvit(bl) + status_get_homint(bl)) / 2;
st->def += status_get_homvit(bl) + level / 2; // Increase. Already initialized in status_calc_homunculus_
st->mdef = (int)(((float)status_get_homvit(bl) + level) / 4 + (float)status_get_homint(bl) / 2);
st->hit = level + st->dex + 150;
st->flee = level + status_get_homagi(bl);
st->rhw.atk = (status_get_homstr(bl) + status_get_homdex(bl)) / 5;
st->rhw.atk2 = (status_get_homluk(bl) + status_get_homstr(bl) + status_get_homdex(bl)) / 3;
} else {
st->hit += level + st->dex + (bl->type == BL_PC ? st->luk / 3 + 175 : 150); //base level + ( every 1 dex = +1 hit ) + (every 3 luk = +1 hit) + 175
st->flee += level + st->agi + (bl->type == BL_MER ? 0: (bl->type == BL_PC ? st->luk / 5 : 0) + 100); //base level + ( every 1 agi = +1 flee ) + (every 5 luk = +1 flee) + 100
st->def2 += (int)(((float)level + st->vit) / 2 + (bl->type == BL_PC ? ((float)st->agi / 5) : 0)); //base level + (every 2 vit = +1 def) + (every 5 agi = +1 def)
st->mdef2 += (int)(bl->type == BL_PC ? (st->int_ + ((float)level / 4) + ((float)(st->dex + st->vit) / 5)) : ((float)(st->int_ + level) / 4)); //(every 4 base level = +1 mdef) + (every 1 int = +1 mdef) + (every 5 dex = +1 mdef) + (every 5 vit = +1 mdef)
}
#else // not RENEWAL
st->matk_min = status_base_matk_min(st);
st->matk_max = status_base_matk_max(st);
st->hit += level + st->dex;
st->flee += level + st->agi;
st->def2 += st->vit;
st->mdef2 += st->int_ + (st->vit >> 1);
#endif // RENEWAL 

 

 

 
For this:

 

st->matk_max = status_base_matk_max(st);
st->hit += level + st->dex;
st->flee += level + st->agi;
st->def2 += st->vit;
st->mdef2 += st->int_ + (st->vit >> 1);
Edited by kinori

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.