2018-04-25 13:02:10 +02:00
|
|
|
package com.minelittlepony.pony.data;
|
2015-12-09 04:14:42 +01:00
|
|
|
|
2018-04-25 16:40:47 +02:00
|
|
|
import com.minelittlepony.model.player.PlayerModels;
|
2018-04-24 14:55:32 +02:00
|
|
|
|
2018-04-25 13:00:18 +02:00
|
|
|
public enum PonyRace implements ITriggerPixelMapped<PonyRace> {
|
2017-06-13 05:55:50 +02:00
|
|
|
|
2018-06-22 01:46:10 +02:00
|
|
|
HUMAN(0, PlayerModels.DEFAULT, false, false),
|
2018-04-28 16:39:32 +02:00
|
|
|
EARTH(0xf9b131, PlayerModels.EARTH,false, false),
|
|
|
|
PEGASUS(0x88caf0, PlayerModels.PEGASUS, true, false),
|
2018-05-11 20:20:10 +02:00
|
|
|
UNICORN(0xd19fe4, PlayerModels.UNICORN, false, true),
|
2018-04-28 16:39:32 +02:00
|
|
|
ALICORN(0xfef9fc, PlayerModels.ALICORN, true, true),
|
|
|
|
CHANGELING(0x282b29, PlayerModels.ALICORN, true, true),
|
2018-04-30 14:10:30 +02:00
|
|
|
ZEBRA(0xd0cccf, PlayerModels.ZEBRA, false, false),
|
2018-04-28 16:39:32 +02:00
|
|
|
REFORMED_CHANGELING(0xcaed5a, PlayerModels.ALICORN, true, true),
|
|
|
|
GRIFFIN(0xae9145, PlayerModels.PEGASUS, true, false),
|
2018-06-29 18:36:03 +02:00
|
|
|
HIPPOGRIFF(0xd6ddac, PlayerModels.PEGASUS, true, false),
|
2018-08-24 17:19:21 +02:00
|
|
|
BATPONY(0xdddddd, PlayerModels.BATPONY, true, false),
|
2018-08-14 22:58:53 +02:00
|
|
|
SEAPONY(0x3655dd, PlayerModels.SEAPONY, false, true);
|
2018-04-24 14:55:32 +02:00
|
|
|
|
2018-04-26 23:53:03 +02:00
|
|
|
private boolean wings;
|
|
|
|
private boolean horn;
|
2018-04-24 14:55:32 +02:00
|
|
|
|
2018-04-25 13:00:18 +02:00
|
|
|
private int triggerPixel;
|
2018-04-27 13:49:33 +02:00
|
|
|
|
2018-04-24 14:55:32 +02:00
|
|
|
private PlayerModels model;
|
|
|
|
|
2018-04-25 13:00:18 +02:00
|
|
|
PonyRace(int triggerPixel, PlayerModels model, boolean wings, boolean horn) {
|
|
|
|
this.triggerPixel = triggerPixel;
|
2018-04-27 13:49:33 +02:00
|
|
|
|
2015-12-09 04:14:42 +01:00
|
|
|
this.wings = wings;
|
|
|
|
this.horn = horn;
|
2018-04-24 14:55:32 +02:00
|
|
|
this.model = model;
|
2015-12-09 04:14:42 +01:00
|
|
|
}
|
|
|
|
|
2018-04-25 21:29:49 +02:00
|
|
|
/**
|
|
|
|
* Returns true if this pony has a horn (and by extension can cast magic).
|
|
|
|
* @return
|
|
|
|
*/
|
2015-12-09 04:14:42 +01:00
|
|
|
public boolean hasHorn() {
|
|
|
|
return horn;
|
|
|
|
}
|
|
|
|
|
2018-04-25 21:29:49 +02:00
|
|
|
/**
|
|
|
|
* Returns true if this pony has wings. If it has wings, it can fly, of course.
|
|
|
|
*/
|
2015-12-09 04:14:42 +01:00
|
|
|
public boolean hasWings() {
|
|
|
|
return wings;
|
|
|
|
}
|
2018-04-24 14:55:32 +02:00
|
|
|
|
2018-04-25 21:29:49 +02:00
|
|
|
/**
|
|
|
|
* Returns true if this is a human.
|
|
|
|
*/
|
2018-04-24 14:55:32 +02:00
|
|
|
public boolean isHuman() {
|
|
|
|
return this == HUMAN;
|
|
|
|
}
|
|
|
|
|
2018-04-25 21:29:49 +02:00
|
|
|
/**
|
|
|
|
* Gets the model type associated with this species.
|
|
|
|
*/
|
2018-04-24 14:55:32 +02:00
|
|
|
public PlayerModels getModel() {
|
|
|
|
return model;
|
|
|
|
}
|
|
|
|
|
2018-04-25 21:29:49 +02:00
|
|
|
/**
|
|
|
|
* Gets the actual race determined by the given pony level.
|
|
|
|
* PonyLevel.HUMANS would force all races to be humans.
|
|
|
|
* PonyLevel.BOTH is no change.
|
|
|
|
* PonyLevel.PONIES (should) return a pony if this is a human. Don't be fooled, though. It doesn't.
|
|
|
|
*/
|
2018-04-24 14:55:32 +02:00
|
|
|
public PonyRace getEffectiveRace(PonyLevel level) {
|
|
|
|
if (level == PonyLevel.HUMANS) return HUMAN;
|
|
|
|
return this;
|
|
|
|
}
|
2018-04-25 13:00:18 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getTriggerPixel() {
|
|
|
|
return triggerPixel;
|
|
|
|
}
|
2015-12-09 04:14:42 +01:00
|
|
|
}
|