Jump to content
  • 0
DevelopeR

How Debug skill sure (enchanted blade) Game 34k

Question

Hello, people.

 

I won't ask how debug the skill -(enchanted blade)- on game 34

 

 

someone can help ?

 

 

I'm sorry my Inglesh is so bad.

:ph34r:

 

 

And if the post not must here on this direction, I'm sorry but i don't  know where to post.

 

Share this post


Link to post

10 answers to this question

Recommended Posts

  • 0

What's wrong with it?

 

Also, this belongs in Beginner Zone.

Share this post


Link to post
  • 0

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.

Share this post


Link to post
  • 0

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.

Share this post


Link to post
  • 0

yes, I'll explain how you can do it.

Either I'll edit it here or make a new topic for the how to. Depends on if it's better to make a new topic or if it's not enough to be a own topic.

Share this post


Link to post
  • 0

You can add it here, I will move and rename the thread afterwards.

Share this post


Link to post
  • 0

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

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.