Set random jump strength for horses as well.

This commit is contained in:
GJ 2013-09-26 10:43:45 -04:00
parent 92b4be9a01
commit 7f290504ad

View File

@ -234,10 +234,14 @@ public class TamingManager extends SkillManager {
break; break;
case HORSE: case HORSE:
entity.setMaxHealth(15 + Misc.getRandom().nextInt(16)); Horse horse = (Horse) entity;
entity.setMaxHealth(15.0 + (Misc.getRandom().nextDouble() * 15));
entity.setHealth(entity.getMaxHealth()); entity.setHealth(entity.getMaxHealth());
((Horse) entity).setColor(Horse.Color.values()[Misc.getRandom().nextInt(Horse.Color.values().length)]); horse.setColor(Horse.Color.values()[Misc.getRandom().nextInt(Horse.Color.values().length)]);
((Horse) entity).setStyle(Horse.Style.values()[Misc.getRandom().nextInt(Horse.Style.values().length)]); horse.setStyle(Horse.Style.values()[Misc.getRandom().nextInt(Horse.Style.values().length)]);
horse.setJumpStrength(Misc.getRandom().nextDouble() * 2);
//TODO: setSpeed, once available
break; break;
default: default: