• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[General] Item Bug

Status
Not open for further replies.
Level 39
Joined
Feb 27, 2007
Messages
5,031
If the unit goes to < 1 max HP it will die, most likely as a result of having < 0 strength. What's the total HP of the unit before adding that item, and how much HP does 1 point of strength give? Negative total mana might also cause weird shit in the same way.
 
Level 8
Joined
Jul 10, 2018
Messages
383
If the unit goes to < 1 max HP it will die, most likely as a result of having < 0 strength. What's the total HP of the unit before adding that item, and how much HP does 1 point of strength give? Negative total mana might also cause weird shit in the same way.
That means the unit gotta have Extra Strength inorder for it to handle -12000 Strength right?
 
Level 8
Joined
Jul 10, 2018
Messages
383
Well... yes. I don't know why you would want to give it -12,000 of each stat other than to reduce a massive number of each stat. What are you trying to achieve? This is a really simple concept...
here's what i have in Mind
Hero Buys an item that item name is Test01
STATS: is
takes 12000 Stats from the Hero but in return it grants him Bash + Crit + CMD Aura + Evasion
but sadly it seems impossible for now.
 
That means the unit gotta have Extra Strength inorder for it to handle -12000 Strength right?

There would be no need to consider such a thing. However, if you can infer the hit points gained per strength, you can negate the subtraction of hit points by setting the total hit points to such a number + 1.

If the unit goes to < 1 max HP it will die, most likely as a result of having < 0 strength.

@Veldris

Think of a certain unit For. His total hit points is about 100100. For's total strength is 10000, and base hp is 100. That makes the hit points per strength equal to 10, assuming no other factors that alter hp exist.

If we remove 12000 strength from For, For will have -19900 hit points. Following the quote above, For will die.
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,031
but sadly it seems impossible for now.
No... in fact it's easily doable. If you choose a smaller number that doesn't cause the hero to have negative max hp then the hero won't die. Literally change -12,000 to -1,200 or -120 or -12 for now just for testing purposes. With a number that doesn't immediately kill your test hero you can be sure the item works as intended. Then when you actually put the item into your map change it back to -12,000.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,893
That item is good to bait players into suicide and make them think the item is bugged...which kind of is... lol
Even if you still have a good amount of hp when wearing the item, you will probably die a few seconds later because of the negative regeneration, don't forget you still have a really long, long attack cooldown, massive negative armor, and no mana and its regeneration at all. (Holy shit?!)
This item looks like a god damn curse
 
Level 8
Joined
Jul 10, 2018
Messages
383
There would be no need to consider such a thing. However, if you can infer the hit points gained per strength, you can negate the subtraction of hit points by setting the total hit points to such a number + 1.



Think of a certain unit For. His total hit points is about 100100. For's total strength is 10000, and base hp is 100. That makes the hit points per strength equal to 10, assuming no other factors that alter hp exist.

If we remove 12000 strength from For, For will have -19900 hit points. Following the quote above, For will die.
reducing the stats in percent with triggers might work, too. Like saving the current strength, reducing it by 99% and cap it
That item is good to bait players into suicide and make them think the item is bugged...which kind of is... lol
Even if you still have a good amount of hp when wearing the item, you will probably die a few seconds later because of the negative regeneration, don't forget you still have a really long, long attack cooldown, massive negative armor, and no mana and its regeneration at all. (Holy shit?!)
This item looks like a god damn curse
No... in fact it's easily doable. If you choose a smaller number that doesn't cause the hero to have negative max hp then the hero won't die. Literally change -12,000 to -1,200 or -120 or -12 for now just for testing purposes. With a number that doesn't immediately kill your test hero you can be sure the item works as intended. Then when you actually put the item into your map change it back to -12,000.
There would be no need to consider such a thing. However, if you can infer the hit points gained per strength, you can negate the subtraction of hit points by setting the total hit points to such a number + 1.



Think of a certain unit For. His total hit points is about 100100. For's total strength is 10000, and base hp is 100. That makes the hit points per strength equal to 10, assuming no other factors that alter hp exist.

If we remove 12000 strength from For, For will have -19900 hit points. Following the quote above, For will die.
it's Really difficult to think something for an item,Coz Item abilities are hard to make especially with Triggers and another thing in my mind is Every 5 seconds next hero attack will cause it to Deal 5% of maximum health of the enemy but i can't make it.
 
it's Really difficult to think something for an item,Coz Item abilities are hard to make especially with Triggers and another thing in my mind is Every 5 seconds next hero attack will cause it to Deal 5% of maximum health of the enemy but i can't make it.

That would be in another thread altogether. For this thread, (and not the unit For) the solution I can muster is to modify the Hero's strength when an item is acquired. Store the previous strength and deduct it down to 0.

JASS:
SetHeroStr(yourHero, IMaxBJ(GetHeroStr(yourHero, true) - 12000, 0), true)

In case of confusion, first store the difference between the prior strength of the Hero, and the resulting strength of the Hero (after reductions) (down to 0 only).

To visualise such a thing, consider this:

Code:
prior strength; 100
Resulting strength: Max(100 - 12000, 0) -> Will result to 0.
Disparity: prior strength - resulting strength = 100 - 0 = 100
 
Last edited:
Level 8
Joined
Jul 10, 2018
Messages
383
That would be in another thread altogether. For this thread, (and not the unit For) the solution I can muster is to modify the Hero's strength when an item is acquired. Store the previous strength and deduct it down to 0.

JASS:
SetHeroStr(yourHero, IMaxBJ(GetHeroStr(yourHero, true) - 12000, 0), true)

In case of confusion, first store the difference between the prior strength of the Hero, and the resulting strength of the Hero (after reductions) (down to 0 only).

To visualise such a thing, consider this:

Code:
prior strength; 100
Resulting strength: Max(100 - 12000, 0) -> Will result to 0.
Disparity: prior strength - resulting strength = 100 - 0 = 100
Thanks for helping.
 
Status
Not open for further replies.
Top