Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #006604

  • 2 - Fair

  • Fixed

Issue Confirmations

  • Yes (0)No (0)
Photo

Assassin Cross of Sunset AGI Effect

Posted by Hercules Bot on 02 September 2012 - 05:29 AM

Originally posted by Rytech
A while ago I had someone complain to me that AGI wasnt affecting the skill at all even with like 120 AGI. After checking the formula I found why....

case BA_ASSASSINCROSS:
  val1 = 100+(10*skilllv)+(status->agi/10); // ASPD increase

I found a bug report that claimed it was incorrect before that divide by 10 was added which also showed a incorrect understanding of how ASPD is handled.

http://rathena.org/b...correct-script/

Here's how ASPD is handled as found in status.c
/// Calculates an object's ASPD modifier (alters the base amotion value).
/// Note that the scale of aspd_rate is 1000 = 100%.

So that means 10 AGI would be 1% or 1.0%. The value works in a way where 250 would equal 25.0% and 1000 would equal 100.0% for example. So the correct formula is the old which was....

val1 = 100+(10*skilllv)+(status->agi); // ASPD increase

Originally posted by malufett
no actually the formula is correct...

but this is really the problem

if(sc->data[SC_ASSNCROS] &&
max < sc->data[SC_ASSNCROS]->val2)
{
if (bl->type!=BL_PC)
   max = sc->data[SC_ASSNCROS]->val2;
else
   switch(((TBL_PC*)bl)->status.weapon)
   {
	  case W_BOW:
	  case W_REVOLVER:
	  case W_RIFLE:
	  case W_GATLING:
	  case W_SHOTGUN:
	  case W_GRENADE:
			break;
	  default:
			max = sc->data[SC_ASSNCROS]->val2;
	  }
}

val2 should be multiplied by 10...
but if you want to use your suggested formula it suppose to be
val1 = 1000+(100*skilllv)+(status->agi); // ASPD increase

:meow:

Originally posted by Rytech
Ehhhh.....what does val2 do? Shouldnt we be looking at val1?

  if(sc->data[SC_ASSNCROS] &&
   skills1 < 5+1*sc->data[SC_ASSNCROS]->val1) // needs more info
  {
   if (bl->type!=BL_PC)
    skills1 = 4+1*sc->data[SC_ASSNCROS]->val1;
   else
   switch(((TBL_PC*)bl)->status.weapon)
   {
    case W_BOW:
    case W_REVOLVER:
    case W_RIFLE:
    case W_GATLING:
    case W_SHOTGUN:
    case W_GRENADE:
	 break;
    default:
	 skills1 = 5+1*sc->data[SC_ASSNCROS]->val1;
   }
  }


Originally posted by malufett
that is the val1 from skill.c and convert to val2..because of this
sc_start4(bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->limit);

:meow:

Originally posted by Rytech
So val2 takes val1's value, val3 takes val2's value.....wtf is this? Im really confused now. /heh

Originally posted by malufett
hahaha..here I'll gonna explain to you..

the val1 from skill.c is different from the val1 of status.c

the val1 in the skill.c is used for the skill_unit_group..
so this value is use for other value except the skill level since skill_unit_group has a different variable for that...

and status_change general usage of val1 is for skill level so they move it to val2..

so here for more clearer view...


case UNT_WHISTLE:
case UNT_ASSASSINCROSS:
case UNT_POEMBRAGI:
case UNT_APPLEIDUN:
case UNT_HUMMING:
case UNT_DONTFORGETME:
case UNT_FORTUNEKISS:
case UNT_SERVICEFORYOU:
   if (sg->src_id==bl->id && !(sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_BARDDANCER)) {
      if( sce )/* We have the status but we're not elegible for it, so we take it away. (bugreport:4591) */
         sce->val4 = 2;
         return 0;
   }
   if (!sc) return 0;
   if (!sce)
      sc_start4(bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->limit);
   else if (sce->val4 == 1) {
      //Readjust timers since the effect will not last long.
      sce->val4 = 0;
      delete_timer(sce->timer, status_change_timer);
      sce->timer = add_timer(tick+sg->limit, status_change_timer, bl->id, type);
   }
break;


Originally posted by Rytech
Think I understand now........MAAAAAAYBE.  Wow so complex.

Originally posted by malufett

Think I understand now........MAAAAAAYBE.  Wow so complex.

well that is how it was implemented.. ^_^

btw regarding this one
skills1 = 5+1*sc->data[SC_ASSNCROS]->val1;

I use the val1  as skill level and not the suggested formula since I don't know its aspd increase in kro renewal...

and you may commit the fix by multiplying val2 by 10 in status.c... /no1
:meow:

Originally posted by Angezerus
Was this fixed?

Originally posted by donkeyg
was this fixed?

Originally posted by donkeyg
any solution?

Originally posted by donkeyg
........... bump?

moved issue from Skills

changed status to: Fixed

Fixed @ 0395610469ffcd3b71c93ef90861f73e0ab8d16f
:meow: