Jump to content

How Debug skill sure (enchanted blade) Game 34k


Recommended Posts

He meant the bug that when you overkill someone, you'll loose hp in cause of the hp drain.

 

In 34083 you'll need a lib because there's no room for further number checkings.

 

 

It's in the source, you may search for the applying bonus. There the hp drain will be calculated but not checked if it's < 0. Just make a check and if it's less than zero, multiply it with -1. This will revert the value and makes sure you'll always gain hp, not loose some.

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
Share on other sites

He meant the bug that when you overkill someone, you'll loose hp in cause of the hp drain.

 

In 34083 you'll need a lib because there's no room for further number checkings.

 

 

It's in the source, you may search for the applying bonus. There the hp drain will be calculated but not checked if it's < 0. Just make a check and if it's less than zero, multiply it with -1. This will revert the value and makes sure you'll always gain hp, not loose some.

 

Can you make a how to please?

 

Regards.

Link to comment
Share on other sites

It's quite easy, doesn't require a new thread for it. Sorry for the late answer I didn't noticed you replying (need to get used to the board).

 

Opfen char_battle.cpp and search for POINT_HIT_SP_RECOVERY

You'll find this one:

 

 


if (pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) && number(0, 4) > 0) // 80% È®·ü
            {
                int i = MIN(dam, iCurHP) * pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) / 100;

                if (i)
                {
                    CreateFly(FLY_HP_SMALL, pAttacker);
                    pAttacker->PointChange(POINT_HP, i);
                }
            }

 

The problem with this is, as you may noticed, that if you manage to overkill someone his tp goes < 0 and the hp drained will become negative too. An easy way to go around this is the following:

if(i<0)

   i *= -1;

 

This will check if the value you'll get is lesser than 0. And if it's the case, your core will multiply it with -1 so it won't be negative anymore and you'll still be healed. Just put it before you create the Fly event.

  • Love 1

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.