Hello,
There is a little mistake in StatsReset()
line 3325:
// Tea Effects
double teahealth = 0;
double newhealth = currenthealth - armor;
if (GetTeaCooldown(player) != 0)
{
switch (GetTeaTypes(player))
{
case "basic":
teahealth = 105;
break;
case "advanced":
teahealth = 113;
break;
case "pure":
teahealth = 120;
break;
}
}
if (player._health > teahealth)
{
newhealth = teahealth;
}
else
{
newhealth = player._health;
}
If the player didn't drink a tea, the value of teahealth is 0.
Therefore when you test "player._health > teahealth", it is true, and set the health to 0.
Edit: There are maybe other problems, I let you see ^^' (I tried to fix myself, and others issues happened)
Edit2:
I replaced:
if (player._health > teahealth)
{
newhealth = teahealth;
}
else
{
newhealth = player._health;
}By:
if (newhealth > teahealth && teahealth != 0)
{
newhealth = teahealth;
}
It fixed the issue. I let you confirm if it is all good.