import java.awt.Image;
import java.io.IOException;
import javax.imageio.*;

public class Reimu extends Body implements java.io.Serializable {
	static final long serialVersionUID = 2L;
	public static final int type = 1;
	public static final String nameJ = "れいむ";
	public static final String nameE = "Reimu";
	
	private static Image[][][] images = new Image[17][2][3];
	
	public static void loadImages (ClassLoader loader) throws IOException
	{
		final String dir = "images/reimu/";
		
		images[ImgFlag.STANDARD][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"standard_left.png"));
		images[ImgFlag.SHIT][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"shit.png"));
		images[ImgFlag.WANT_REFRESH][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"want-refresh_left.png"));
		images[ImgFlag.SLEEPING][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"sleeping_left.png"));
		images[ImgFlag.DEAD][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"dead_left.png"));
		images[ImgFlag.INJURED][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"injured_left.png"));
		images[ImgFlag.PUFF][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"puff_left.png"));
		images[ImgFlag.CRYING][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"crying_left.png"));
		images[ImgFlag.NO_ACCESSORY][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"no-accessory_left.png"));
		images[ImgFlag.NO_ACCESSORY_INJURED][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"no-accessory-injured_left.png"));
		images[ImgFlag.NO_ACCESSORY_DEAD][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"no-accessory-dead_left.png"));
		images[ImgFlag.ROLL][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"roll_left.png"));
		images[ImgFlag.LICK][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"lick_left.png"));
		images[ImgFlag.REFRESHED][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"refreshed_left.png"));
		images[ImgFlag.CRUSHED][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"crushed.png"));
		images[ImgFlag.LICK_INJURED][ImgFlag.LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"lick-injured_left.png"));
		
		images[ImgFlag.STANDARD][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"standard_right.png"));
		images[ImgFlag.SHIT][ImgFlag.RIGHT][adultIndex] = null;
		images[ImgFlag.WANT_REFRESH][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"want-refresh_right.png"));
		images[ImgFlag.SLEEPING][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"sleeping_right.png"));
		images[ImgFlag.DEAD][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"dead_right.png"));
		images[ImgFlag.INJURED][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"injured_right.png"));
		images[ImgFlag.PUFF][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"puff_right.png"));
		images[ImgFlag.CRYING][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"crying_right.png"));
		images[ImgFlag.NO_ACCESSORY][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"no-accessory_right.png"));
		images[ImgFlag.NO_ACCESSORY_INJURED][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"no-accessory-injured_right.png"));
		images[ImgFlag.NO_ACCESSORY_DEAD][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"no-accessory-dead_right.png"));
		images[ImgFlag.ROLL][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"roll_right.png"));
		images[ImgFlag.LICK][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"lick_right.png"));
		images[ImgFlag.REFRESHED][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"refreshed_right.png"));
		images[ImgFlag.CRUSHED][ImgFlag.RIGHT][adultIndex] = null;
		images[ImgFlag.LICK_INJURED][ImgFlag.RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(dir+"lick-injured_right.png"));
		
		for(Image[][] array2d : images)
		{	
			for(Image[] array : array2d)
			{
				if(array[adultIndex] == null) { continue; }
				// Scale larger images down for koyukkuri
				array[babyIndex] = array[adultIndex].getScaledInstance(babyWidth, babyHeight, Image.SCALE_AREA_AVERAGING);
				array[childIndex] = array[adultIndex].getScaledInstance(childWidth, childHeight, Image.SCALE_AREA_AVERAGING);
			}
		}
	}
	
	public Image getImage (int type, int direction, AgeState age) { return images[type][direction][age.ordinal()]; }
	
	@Override
	public int getType () { return type; }
	
	@Override
	public int getHybridType (int partnerType)
	{
		switch (partnerType)
		{
		case Marisa.type: return MarisaReimu.type;
		default: return Reimu.type;
		}
	}
	
	@Override
	public String getNameJ () { return nameJ; }
	
	@Override
	public String getNameE () { return nameE; }
	
	@Override
	public Reimu clone () { return new Reimu(this); }
	
	@Override
	protected String [] msgWantFoodJ () {
		String[] output = {"ごはんしゃんのにおいがすりゅよ", "ごはんしゃんのにおいがすりゅよ", "ごはんさんのにおいがするよ"};
		return output;
	}
	
	@Override
	protected String [] msgWantFoodE () {
		String[] output = {"The shmell of mishder food!", "Shmell of mishder food!", "It's the smell of mister food!"};
		return output;
	}
	
	@Override
	protected String[][] msgNoFoodJ()
	{
		String[][] output = {{"ごはんしゃんにゃいよ！", "ごはんしゃんにゃいよ？ばきゃなの？しにゅの？", "ごはんさんないよ？ばかなの？しぬの？"},
									{"ごはんしゃんかえちて、、、", "ごはんしゃんかえちて、、、", "ごはんさんがえぢでぐだざいぃ、、、"}};
		return output;
	}
	
	@Override
	protected String[][] msgNoFoodE()
	{
		String[][] output = {{"Mishder food ish nod here!", "Mishder food ish nod here! Are you shtoopid?  Wand choo die?", "Mister food is not here?  Are you stupid? Want to die?"},
									{"Gib back mishder food...", "Gib back mishder food...", "Pwease give back mister food..."}};
		return output;
	}
	
	@Override
	protected String msgExciteJ() { return "すっぎりじだいの〜！"; }
	
	@Override
	protected String msgExciteE() { return "Want to refresh~!"; }
	
	@Override
	protected String[] msgRelaxJ()
	{
		String output[] = {"ゆっきゅりしていっちぇね！", "ゆっきゅりしていっちぇね！", "ゆっくりしていってね！"};
		return output;
	}
	
	@Override
	protected String[] msgRelaxE()
	{
		String output[] = {"Chake id eajy!", "Chake id eajy!", "Take it easy!"};
		return output;
	}
	
	@Override
	protected String[] msgFuriFuriJ()
	{
		String output[] = {"ふーりふーり", "れいみゅかわいきゅてごみぇんね！", "れいむのあにゃるでしこってもいいよ！"};
		return output;
	}
	
	@Override
	protected String[] msgFuriFuriE()
	{
		String output[] = {"Relax-relax~", "Weimu ish showwy for being sho cude!", "Taste Reimu's anyaru is ok too!"};
		return output;
	}
	
	protected String[] msgWakeupJ()
	{
		String output[] = {"ゆっきゅりしていっちぇね！", "ゆっきゅりしていっちぇね！", "ゆっくりしていってね！"};
		return output;
	}
	
	protected String[] msgWakeupE()
	{
		String output[] = {"Chake id eajy!", "Chake id eajy!", "Take it easy!"};
		return output;
	}
	
	@Override
	protected String msgSleepJ() { return "すーやすーや"; }
	
	@Override
	protected String msgSleepE() { return "Sleep-Sleep---"; }
	
	@Override
	protected String[][] msgScreamJ() {
		String[][] output = {{"ゆんやー！", "いちゃい！ぷきゅーじゃよ！", "いたい！ぷくーだよ！"},
									{"やめちぇにぇやめちぇにぇ", "ごめんなちゃいやめちぇにぇ、、、", "どぼじででいぶにこんなごどずるのぉ、、、"}};
		return output;
	}
	
	@Override
	protected String[][] msgScreamE() {
		String[][] output = {{"YUNYA-!!", "ID HURD!  Going choo pyuff-pyuff!", "It hurts! Puff!!"},
									{"Shdop id shdop id-", "Weimu ish showwy sho pwease shdop id...", "Why would you do thisss...."}};
		return output;
	}
	
	@Override
	protected String[][] msgScareJ () {
		String[][] output = {{"ゆんやー！", "ゆっくちできにゃいー！", "なんだかゆっくりできないよ！"},
									{"やめちぇにぇやめちぇにぇ", "ごめんなちゃいやめちぇにぇ、、、", "どぼじででいぶにこんなごどずるのぉ、、、"}};
		return output;
	}
	
	@Override
	protected String[][] msgScareE () {
		String[][] output = {{"YUNYA-!!", "I can'ch chake id eajy!", "I feel like I can't take it easy!"},
									{"Shdop id shdop id-", "Weimu ish showwy sho pwease shdop id...", "Why would you do thisss...."}};
		return output;
	}
	
	@Override
	protected String[][] msgAlarmJ () {
		String[][] output = {{"にゃんだかゆっくちできにゃい！", "にゃんだかゆっくちできにゃい！", "なんだかゆっくりできないよ！"},
									{"やめちぇにぇやめちぇにぇ", "ごめんなちゃいやめちぇにぇ、、、", "どぼじででいぶにこんなごどずるのぉ、、、"}};
		return output;
	}
	
	@Override
	protected String[][] msgAlarmE () {
		String[][] output = {{"I can'ch chake id eajy!", "I can'ch chake id eajy!", "I feel like I can't take it easy!"},
									{"Shdop id shdop id-", "Weimu ish showwy sho pwease shdop id...", "Why would you do thisss...."}};
		return output;
	}
	
	@Override
	protected String[] msgDyingJ () {
		String[] output = {"ゆべっ！", "ぷきゅっ！", "げぼっ！"};
		return output;
	}
	
	@Override
	protected String[] msgDyingE () {
		String[] output = {"Yubee!!", "Puff!", "Blarg!"};
		return output;
	}
	
	@Override
	protected String[] msgDeadJ () {
		String[] output = {"もっちょゆっくちしちゃかった、、、", "もっちょゆっくちしちゃかった、、、", "もっとゆっくりしたかった、、、"};
		return output;
	}
	
	@Override
	protected String[] msgDeadE () {
		String[] output = {"Wanted choo chake id eajy more...", "Wanted choo chake id eajy more...", "Wanted to take it easy more..."};
		return output;
	}
	
	@Override
	protected String[][] msgEatingJ () {
		String[][] output = {{"む〜ちゃむ〜ちゃ、ちあわちぇー", "むーちゃむーちゃ、ちあわちぇー", "むーしゃむーしゃ、しあわせー"},
									{"むっちゃむっちゃ、、、", "むちゃむちゃ、はふはふ", "むっしゃむっしゃ、うめぇ"}};
		return output;
	}
	
	@Override
	protected String[][] msgEatingE () {
		String[][] output = {{"Myunch-Myunch, happinesh~ ", "Myunch~ Myunch~ Happinesh~", "Munch munch, Happiness"},
									{"Myunch myunch...", "Myunch Myunch, nom nom", "Munch munch, so good!"}};
		return output;
	}
	
	@Override
	protected String[] msgEatingShitJ () {
		String[] output = {"む〜ちゃむ〜ちゃ、げりょまじゅ、、、", "むーちゃむーちゃ、げろまじゅ、、、", "むーしゃむーしゃ、げろまず、、、"};
		return output;
	}
	
	@Override
	protected String[] msgEatingShitE () {
		String[] output = {"Myunch-Myunch, disgusting,,,", "Myunch~ Myunch~ disgusting,,,", "Munch munch, disgusting,,,"};
		return output;
	}
	
	@Override
	protected String[] msgFullJ () {
		String[] output = {"おにゃかいっぱい、、、", "おにゃかいっぱい、、、", "もうたべられないの、、、"};
		return output;
	}
	
	@Override
	protected String[] msgFullE () {
		String[] output = {"Tummy ish full...", "Tummy ish full...", "Can't eat anymore..."};
		return output;
	}
	
	@Override
	protected String[][] msgHealingJ () {
		String[][] output = {{"あみゅあみゃ！", "ゆっきゅちしちゃよ！", "ゆっくりしたよ！"},
									{"あみゃあみゃ", "ゆっきゅちしちゃよ", "ゆっくりしたよ"}};
		return output;
	}
	
	@Override
	protected String[][] msgHealingE () {
		String[][] output = {{"Shweet-shweet!", "Eajy!", "Can take it easy!"},
									{"Shweet-shweet", "Can chake id eajy", "Can take it easy"}};
		return output;
	}
	
	@Override
	protected String[] msgSukkiriJ () {
		String[] output = {"ちゅっきち！", "ちゅっきり！", "すっきり！"};
		return output;
	}
	
	@Override
	protected String[] msgSukkiriE () {
		String[] output = {"Wefweshed!", "Wefeshed!", "Refreshed!"};
		return output;
	}
	
	@Override
	protected String msgBirthJ () { return "ゆっくちちていっちぇね！"; }
	
	@Override
	protected String msgBirthE () { return "Chake id eajy!"; }
	
	@Override
	protected String[] msgShitJ () {
		String[] output = {"うんうんぢぇりゅ！", "りぇいみゅのすーぴゃーうんうんちゃいみゅはぢみゃりゅにょ！", "れいむのすーぱーうんうんたいむはじまるよ！"};
		return output;
	}
	
	@Override
	protected String[] msgShitE () {
		String[] output = {"Poo-pooing!", "Weimu's shuupa poo-poo time ish shtarting!", "Reimu's super poo-poo time is starting!"};
		return output;
	}
	
	@Override
	protected String[] msgShit2J () {
		String[] output = {"すっきち！", "すっきちー！", "すっきりー！"};
		return output;
	}
	
	@Override
	protected String[] msgShit2E () {
		String[] output = {"Wefeshed!", "Wefeshed-!!", "Refreshed~!"};
		return output;
	}
	
	@Override
	protected String[] msgSuriSuriJ () {
		String[] output = {"ちゅりちゅり", "ちゅーりちゅーり", "すーりすーり"};
		return output;
	}
	
	@Override
	protected String[] msgSuriSuriE () {
		String[] output = {"Wub-wub", "Wub-wub", "Rub-rub"};
		return output;
	}
	
	@Override
	protected String[] msgPeroPeroJ () {
		String[] output = {"ぺりょぺりょ", "ぺーりょぺーりょ", "ぺーろぺーろ"};
		return output;
	}
	
	@Override
	protected String[] msgPeroPeroE () {
		String[] output = {"Wick-wick~", "Wick-wick~", "Lick-lick~"};
		return output;
	}
	
	@Override
	protected String msgBreedJ () { return "う、うばれる、、、"; }
	
	@Override
	protected String msgBreedE () { return "B...Being born..."; }
	
	@Override
	protected String msgBreed2J () { return "ゆっくりしていってね！"; }
	
	@Override
	protected String msgBreed2E () { return "Take it easy!"; }
	
	@Override
	protected String[][] msgHateShitJ () {
		String[][] output = {{"くちゃい〜！", "うんうんくちゃい！しゅぎゅにかたじゅきぇりょ！", "うんうんかたづけてね！すぐでいいよ！"},
									{"くちゃい、、、", "くちゃいよ、ゆっきゅりできにゃい、、、", "くさいよ、ゆっくりできないよ、、、"}};
		return output;
	}
	
	@Override
	protected String[][] msgHateShitE () {
		String[][] output = {{"Shmelly~!", "Poo-poo shdinky!!  Help eajy!!", "Hurry up and save me from poo-poo!! Right now is fine!"},
									{"Shmelly...", "Shmelly, can'ch chake id eajy...", "Smelly... can't take it easy..."}};
		return output;
	}
	
	@Override
	protected String[][] msgHungryJ () {
		String[][] output = {{"あみゃあみゃちょうじゃい！", "ごはんしゃんをれいみゅにもってきちぇね！", "ごはんさんをれいむにちょうだいね！たくさんでいいよ！"},
									{"ごはんしゃんどきょ？", "おにゃきゃへっちゃよ、、、", "でいぶにごはんぐだざいぃ"}};
		return output;
	}
	
	@Override
	protected String[][] msgHungryE () {
		String[][] output = {{"Gib up shweet-shweets!", "Bwing mishder munch-munch choo Weimu!", "Bring the munch-munch to Reimu! A lot is fine!"},
									{"Where ish mishder food?", "Misder tummy ish hungwy...", "Pwease give Deibu some food..."}};
		return output;
	}
	
	@Override
	protected String[] msgNoAccessoryJ () {
		String[] output = {"ゆぇーん！おりぼんしゃんどきょ？", "ゆぇーん！りぇいみゅのきゃわいいおりぼんしゃんどこ？", "れいむのおりぼんさんどこ？"};
		return output;
	}
	
	@Override
	protected String[] msgNoAccessoryE () {
		String[] output = {"Yunn~!  Where ish misder Wibbon?", "Yunn~!  Where ish Weimu's cude-cude misder Wibbon?", "Where's Reimu's mister ribbon?"};
		return output;
	}
	
	@Override
	protected String[] msgHateYukkuriJ () {
		String[] output = {"ゆっくちできにゃいゆっくちがいりゅよ", "ゆっくちできにゃいゆっくちがいりゅよ", "ゆっくりできないゆっくりがいるよ！せいっさいするよ！"};
		return output;
	}
	
	@Override
	protected String[] msgHateYukkuriE () {
		String[] output = {"There'sh a yukkuri that can'ch chake id eajy", "There'sh a yukkuri that can'ch chake id eajy", "A yukkuri that can't take it easy!  Punishment time!"};
		return output;
	}
	
	@Override
	protected String[] msgFlyingJ () {
		String[] output = {"おちょらをとんでりゅみちゃい！", "りぇいむはおしょらをとぶとりさん！", "おそらをとんでるみたい！"};
		return output;
	}
	
	@Override
	protected String[] msgFlyingE () {
		String[] output = {"Ich feewsh wike fwying!", "Weimu ish mishter flying bird!", "I feel like I'm flying!"};
		return output;
	}
	
	@Override
	protected String msgSadnessForChildJ () { return "おちびちゃんすきとおったきれいなおめめをあけてー！"; }
	
	@Override
	protected String msgSadnessForChildE () { return "Open your beautiful clear eyes, my little one!"; }
	
	@Override
	protected String msgSadnessForPartnerJ (Body partner) {
		return partner.getNameJ()+"めをあけてー！";
	}
	
	@Override
	protected String msgSadnessForPartnerE (Body partner) {
		return "Open your eyes, "+partner.getNameE()+"!";
	}

	// public methods
	public Reimu(int initX, int initY, int initZ, Body.AgeState initAgeState, Body p1, Body p2) {
		super(initX, initY, initZ, initAgeState, p1, p2);
	}
	
	protected Reimu (Reimu other) { super(other); }
}
