Page 8 of 8
Re: Set bonus lost when shields are in non-active weapon slo
Posted: Sun Oct 26, 2014 11:31 pm
by Dr.Disaster
badhabit wrote:What do you talking about? Petri is considering changing the game mechanic, if he would do it according to model B:
B) Adjust health / energy as percentage. E.g. if character is at full health and completes the armor set, the character would still be at full health (which is now higher). Same with unequipping. Downside: More complex to implement.
...even the Ancient Shield would work and would not result in suicide when rounded reasonable, e.g. MaxHP=100, HP=100, %HP=100%, equip ancient shield: MaxHP=85, HP=85, %HP=100%, unequip Ancient Shield: MaxHP=100, HP=100, %HP=100%; Another case: MaxHP=100, HP=10, %HP=10%, equip ancient shield: MaxHP=85, HP=9 (rounded up to full points, internally not rounded but double), %HP=10%, unequip Ancient Shield: MaxHP=100, HP=10, %HP=10%;
Current behavior in your wording with my numbers (see post above):
MaxHP 100, HP 1 -> Equip Ancient Shield -> Max HP 85, HP=1
Proposed behavior in your wording with my numbers:
MaxHP 100, HP 1, %HP=1% -> Equip Ancient Shield -> Max HP 85, HP=0 =>> Character went suicide!
(xx% of any number above 0 rounded up is 1)
Re: Set bonus lost when shields are in non-active weapon slo
Posted: Sun Oct 26, 2014 11:49 pm
by badhabit
Dr.Disaster wrote:badhabit wrote:What do you talking about? Petri is considering changing the game mechanic, if he would do it according to model B:
B) Adjust health / energy as percentage. E.g. if character is at full health and completes the armor set, the character would still be at full health (which is now higher). Same with unequipping. Downside: More complex to implement.
...even the Ancient Shield would work and would not result in suicide when rounded reasonable, e.g. MaxHP=100, HP=100, %HP=100%, equip ancient shield: MaxHP=85, HP=85, %HP=100%, unequip Ancient Shield: MaxHP=100, HP=100, %HP=100%; Another case: MaxHP=100, HP=10, %HP=10%, equip ancient shield: MaxHP=85, HP=9 (rounded up to full points, internally not rounded but double), %HP=10%, unequip Ancient Shield: MaxHP=100, HP=10, %HP=10%;
Current behavior in your wording with my numbers (see post above):
MaxHP 100, HP 1 -> Equip Ancient Shield -> Max HP 85, HP=1
Proposed behavior in your wording with my numbers:
MaxHP 100, HP 1, %HP=1% -> Equip Ancient Shield -> Max HP 85, HP=0 =>> Character went suicide!
(xx% of any number above 0 rounded up is 1)
No, as I said, reasonable rounded:
MaxHP 100, HP 1, %HP=1%
Equip Ancient Shield -> Max HP 85, HP=1%*85=0.85 double => round up to HP=1
unequip Ancient Shield -> Max HP 100, HP=1.
Re: Set bonus lost when shields are in non-active weapon slo
Posted: Sun Oct 26, 2014 11:55 pm
by Dr.Disaster
badhabit wrote:No, as I said, reasonable rounded:
MaxHP 100, HP 1, %HP=1%
Equip Ancient Shield -> Max HP 85, HP=1%*85=0.85 double => round up to HP=1
Even then your "round up to HP=1" kills your character since HP 1 before equip minus 1 (rounded as you showed by equip) is still 0.
You only calculated the HP lost and did not substract it from the current stat.
Re: Set bonus lost when shields are in non-active weapon slo
Posted: Mon Oct 27, 2014 12:00 am
by badhabit
Dr.Disaster wrote:badhabit wrote:No, as I said, reasonable rounded:
MaxHP 100, HP 1, %HP=1%
Equip Ancient Shield -> Max HP 85, HP=1%*85=0.85 double => round up to HP=1
Even then your "round up to HP=1" kills your character since HP 1 before equip minus 1 (rounded as you showed by equip) is still 0.
You only calculated the HP lost and did not substract it from the current stat.
There is no -1, there is just a percentual scaling with a round up end step ("ceil"). I calculated directly the current HP, not the difference.
Re: Set bonus lost when shields are in non-active weapon slo
Posted: Mon Oct 27, 2014 12:18 am
by Dr.Disaster
Ah i see your method now
This works as long as your %HP is known before your actual HP. Try a real game situation:
MaxHP: 70 HP:40 -> %H=57.14
-> Equip Ancient Shield
MaxHP: 55 HP:40 - to-be-calculate-value -> %H=unknown
Re: Set bonus lost when shields are in non-active weapon slo
Posted: Mon Oct 27, 2014 12:27 am
by badhabit
Dr.Disaster wrote:Ah i see your method now
This works as long as your %HP is known before your actual HP. Try a real game situation:
MaxHP: 70 HP:40 -> %H=57.14
-> Equip Ancient Shield
MaxHP: 55 HP:40 - to-be-calculate-value -> %H=unknown
This is known ?!
CurrentHP/maxHP=%H (double)
ceil(maxhp*%H) =currentHP
equip: 55 * 0.5714 = 31.427 (internal stored as double value) -> current HP 32
unequip: 70 * (31.427/55)=39.98 -> current 40HP
Re: Set bonus lost when shields are in non-active weapon slo
Posted: Mon Oct 27, 2014 4:18 am
by Rithrin
petri wrote:Two potential fixes we're considering are:
A) Remove shield from crystal armor set. Crystal shield would still exist, but it would not be needed to complete the armor set.
B) Adjust health / energy as percentage. E.g. if character is at full health and completes the armor set, the character would still be at full health (which is now higher). Same with unequipping. Downside: More complex to implement.
btw. there is no "accidental suicide" chance with current implementation -- only max health is affected.
Thank you, petri, and the rest of AH for being responsive to community feedback. it is excellent to see.
If you feel you have the time to implement a more complex feature, B would probably be the best way, as it addresses more than just the Crystal set. Players won't be so hesitant to utilize their wizards' alternate weapon sets, either.
Re: Set bonus lost when shields are in non-active weapon slo
Posted: Mon Oct 27, 2014 10:22 pm
by LastFootnote
Another vote here for Option B. As long as the adjustment always rounds down except when that would result in 0 HP, I think it will work great.
newCurrentHP = max(1, floor(oldCurrentHP * (newMaxHP/oldMaxHP)));
Re: Set bonus lost when shields are in non-active weapon slo
Posted: Mon Oct 27, 2014 11:26 pm
by badhabit
LastFootnote wrote:Another vote here for Option B. As long as the adjustment always rounds down except when that would result in 0 HP, I think it will work great.
newCurrentHP = max(1, floor(oldCurrentHP * (newMaxHP/oldMaxHP)));
another matlab programmer?

Nice, the complete formulation.