Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

voodoo survival time should depend on armor #137

Open
bretonium opened this issue Mar 20, 2019 · 3 comments
Open

voodoo survival time should depend on armor #137

bretonium opened this issue Mar 20, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@bretonium
Copy link
Collaborator

Today voodoo survival time after getting killed is static.

Lets make voodoo a more social class and make its survival time depend on its armor. I am not sure about the details and against which human classes it can be enabled. But the most obvious example is engineer. 10 armor when going through engie wall = 1.5 sec alive, 0 armor = 0.8 sec alive.

@teoman002
Copy link
Collaborator

teoman002 commented Mar 26, 2019

feature outline

  • if (voodoo armor changes and Voodoo not spirit) voodooalivetime changes

How does voodooalivetime change?

  • int defaultTime = (Server()->TickSpeed()*g_Config.m_InfVoodooAliveTime * alivefactor)
  • int amplifier = 2 * armor [max armor val = 10]
  • amplifier is now element of [0, 2, 4, ... ,20]
  • int VoodooTimeAlive = defaultTime + defaultTime * amplifier / 10
  • the extra time is now the double of the default time

@bretonium do you agree?

@teoman002 teoman002 added the enhancement New feature or request label Mar 26, 2019
@bretonium
Copy link
Collaborator Author

First of all, this is not my idea, it was suggested by somebody in the chat.

My view was that alive time changes only in case of instakill or in case when damage is > 10. For example, when killed by locked sniper, big soldier mine explosion, scientist's mine explosion and by engineer.

How does voodoo alivetime change?

After some thought, my view is to set voodoo alivetime to the amount of damage received. So if voodoo with 10 hp and 10 ap is killed by engineer wall, his alivetime time is N * (10 + 10) / 10. If voodoo with 7 hp and 8 ap is killed by engie wall, scie mine or somehow else, alivetime is N * (7 + 8) / 10. When killed with 3 hp and 4 ap, alivetime is N.

So, in pseudocode:

if (voodoo_health <= 0) {
    voodoo_alivetime = max(N, N * Dmg / 10).
}

+ separate condition for engie-related death.

Though i would like to hear other opinions about it.

@teoman002
Copy link
Collaborator

teoman002 commented Mar 29, 2019

Yea sounds good, I will do it how you suggested.

  • In CCharacter::TakeDamage(...)
  • considering armor and health
  • using the max() function for calculation

You said:

separate condition for engie-related death.

What has the engineer to do with voodoo alivetime?

@teoman002 teoman002 added the in progress will be fixed soon label Apr 2, 2019
@teoman002 teoman002 removed the in progress will be fixed soon label Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants