()
| 673 | } |
| 674 | |
| 675 | func (u *UserRecord) WimpyCheck() { |
| 676 | if currentWimpy := u.GetConfigOption(`wimpy`); currentWimpy != nil { |
| 677 | healthPct := int(math.Floor(float64(u.Character.Health) / float64(u.Character.HealthMax.Value) * 100)) |
| 678 | if healthPct < currentWimpy.(int) { |
| 679 | u.Command(`flee`, -1) |
| 680 | } |
| 681 | } |
| 682 | } |
no test coverage detected