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

class Marisa extends Body implements java.io.Serializable {
	static final long serialVersionUID = 2L;
	public static final int type = 0;
	public static final String nameJ = "まりさ";
	public static final String nameE = "Marisa";
	
	private static Image[][][] images = new Image[17][2][3];
	
	public static void loadImages (ClassLoader loader) throws IOException
	{
		final String dir = "images/marisa/";
		
		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 Reimu.type: return ReimuMarisa.type;
		default: return Marisa.type;
		}
	}
	
	@Override
	public String getNameJ () { return nameJ; }
	
	@Override
	public String getNameE () { return nameE; }
	
	@Override
	public Marisa clone () { return new Marisa(this); }
	
	@Override
	protected String [] msgWantFoodJ () {
		String[] output = {"ごはんしゃんのにおいがしゅりゅのじぇ", "ごはんしゃんのにおいがするのじぇ", "ごはんさんのにおいがするのぜ"};
		return output;
	}
	
	@Override
	protected String [] msgWantFoodE () {
		String[] output = {"The shmell of mishder food, je!", "Smelled mishder food, je!", "It's the smell of mister food, ze!"};
		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, je! Are you shtoopid?  Wand choo die?", "Mister food is not here, ze?  Are you stupid? Want to die?"},
								{"Gib back mishder food...", "Gib back mishder food...", "Pwease give back mister food..."}};
		return output;
	}
	
	protected String msgExciteJ() { return "すっぎりじだいのぜ〜！"; }
	protected String msgExciteE() { return "Want to refresh, ze~!"; }
	
	@Override
	protected String[] msgRelaxE()
	{
		String output[] = {"Chake id eajy!", "Chake id eajy!", "Take it easy!"};
		return output;
	}
	
	@Override
	protected String[] msgRelaxJ()
	{
		String output[] = {"ゆっきゅりしていっちぇね！", "ゆっきゅりしていっちぇね！", "ゆっくりしていってね！"};
		return output;
	}
	
	@Override
	protected String[] msgFuriFuriJ()
	{
		String output[] = {"ふーりふーり", "まりちゃはさいっきょうにょじぇ！", "まりさはさいっきょうなのぜ！"};
		return output;
	}
	
	@Override
	protected String[] msgFuriFuriE()
	{
		String output[] = {"Relax-relax~", "Mawisha ish da shdrongest, je!", "Marisa is the strongest, ze!"};
		return output;
	}
	
	@Override
	protected String[] msgWakeupJ()
	{
		String output[] = {"ゆっきゅりしていっちぇね！", "ゆっきゅりしていっちぇね！", "ゆっくりしていってね！"};
		return output;
	}
	
	@Override
	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, je!", "Stop it, ze!  Puff, ze!"},
								{"Shdop id, shdop id...", "Mawisha ish showwy sho pwease shdop id...", "Pwease, sdop id pwease..."}};
		return output;
	}
	
	@Override
	protected String[][] msgScareJ () {
		String[][] output = {{"ゆんやー！", "ゆっくちできにゃいのじぇー！", "ゆっくりできないのぜ！"},
								{"やめちぇにぇやめちぇにぇ、、、", "ごめんにゃちゃいやめちぇね、、、", "おねがいじばず、やめでぐだざい、、、"}};
		return output;
	}
	
	@Override
	protected String[][] msgScareE () {
		String[][] output = {{"YUNYA-!!", "I can'ch chake id eajy, je!", "I can't take it easy, ze!"},
								{"Shdop id, shdop id...", "Mawisha ish showwy sho pwease shdop id...", "Pwease, sdop id pwease..."}};
		return output;
	}
	
	@Override
	protected String[][] msgAlarmJ () {
		String[][] output = {{"にゃんだかゆっくちできにゃいのじぇ！", "にゃんだかゆっくちできにゃいのじぇ！", "やめるんだぜ！ぷくーだぜ！"},
								{"やめちぇにぇやめちぇにぇ、、、", "ごめんにゃちゃいやめちぇね、、、", "おねがいじばず、やめでぐだざい、、、"}};
		return output;
	}
	
	@Override
	protected String[][] msgAlarmE () {
		String[][] output = {{"I can'ch chake id eajy, je!", "I can'ch chake id eajy, je!", "Stop it, ze!  Puff, ze!"},
								{"Shdop id, shdop id...", "Mawisha ish showwy sho pwease shdop id...", "Pwease, sdop id pwease..."}};
		return output;
	}
	
	protected String[] msgDyingJ () {
		String[] output = {"ゆべっ！", "ぷきゅっ！", "ぶぼっ！"};
		return output;
	}
	
	@Override
	protected String[] msgDyingE () {
		String[] output = {"Yubee!", "Puff!", "Blarf!"};
		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, this shit's good, ze!"}};
		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 ze..."};
		return output;
	}
	
	@Override
	protected String[][] msgHealingJ () {
		String[][] output = {{"あみゃあみゃ！", "ゆっきゅちしちゃのじぇ！", "ゆっくりしたのぜ！"},
								{"あみゃあみゃ", "ゆっきゅちしちゃよ", "ゆっくりしたのぜ"}};
		return output;
	}
	
	@Override
	protected String[][] msgHealingE () {
		String[][] output = {{"Shweet-shweet!", "Weally eajy, je!", "Can take it easy, ze!"},
								{"Shweet-shweet", "Can chake id eajy", "Can take it easy, ze."}};
		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!", "Id'sh Mawisha's shuupa poo-poo time je!!", "It's Marisa's super poo-poo time, ze!"};
		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 Mawisha, je!", "Give up the mister munch-munch to Marisa!  A lot is fine!"},
								{"Where ish mishder food?", "Mishder tummy ish hungwy, je...", "Please give Marisa mister food..."}};
		return output;
	}
	
	@Override
	protected String[] msgNoAccessoryJ () {
		String[] output = {"ゆぇーん！おぼうししゃんどきょ？", "ゆぇーん！まりちゃのきゃわいいおびょうししゃんどきょにゃのじぇ？", "まりさのおぼうしさんどこなのぜ？"};
		return output;
	}
	
	@Override
	protected String[] msgNoAccessoryE () {
		String[] output = {"Yunn~! Where ish misder had?", "Yunn!! Where ish Mawisha's beaudiful mishder had, je?", "Where is Marisa's mister hat, ze?"};
		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", "A yukkuri that can'ch chake id eajy, je", "A yukkuri that can't take it easy, ze!  Punishment time, ze!"};
		return output;
	}
	
	@Override
	protected String[] msgFlyingJ () {
		String[] output = {"おちょらをとんでりゅみちゃいのじぇ！", "まりちゃはおしょらをせいふくしたのじぇ！", "まりさはおそらをせいふくしたのぜ！"};
		return output;
	}
	
	@Override
	protected String[] msgFlyingE () {
		String[] output = {"Ich feewsh wike fwying, je!", "Maricha conquered shky, je!", "Marisa conquered the sky, ze!"};
		return output;
	}

	@Override
	protected String msgSadnessForChildJ () { return "おちびしぬんじゃないのぜ！"; }

	@Override
	protected String msgSadnessForChildE () { return "Don't die, my little one, ze!"; }

	@Override
	protected String msgSadnessForPartnerJ (Body partner) {
		return partner.getNameJ() + "めをあけるのぜ！";
	}

	@Override
	protected String msgSadnessForPartnerE (Body partner) {
		return "Open your eyes," + partner.getNameE() + ", ze!";
	}

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