/* 
 *    Copyright 2013 Mimisuke
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

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[NUM_OF_CONDITIONS][2][3];

	public static void loadImages (ClassLoader loader) throws IOException {
		final String path = "images/marisa/";

		// left face
		images[BODY][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/body.png"));
		images[LICK][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/lick.png"));
		images[BRAID][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/braid.png"));
		images[ACCESSORY][LEFT][adultIndex] =	ImageIO.read(loader.getResourceAsStream(path+"left/hat.png"));
		images[DAMAGED][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/damage.png"));
		images[PANTS][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/pants.png"));
		images[STAIN][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/shit.png"));
		images[SICK][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/sick.png"));
		images[NORMAL][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/faces/normal.png"));
		images[SLEEPING][LEFT][adultIndex] =	ImageIO.read(loader.getResourceAsStream(path+"left/faces/sleeping.png"));
		images[CHEER][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/faces/cheer.png"));
		images[SMILE][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/faces/smile.png"));
		images[TIRED][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/faces/tired.png"));
		images[PUFF][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/faces/puff.png"));
		images[CRYING][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/faces/crying.png"));
		images[EXCITING][LEFT][adultIndex] =	ImageIO.read(loader.getResourceAsStream(path+"left/faces/exciting.png"));
		images[REFRESHED][LEFT][adultIndex] =	ImageIO.read(loader.getResourceAsStream(path+"left/faces/refreshed.png"));
		images[DEAD][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/faces/dead.png"));
		images[RUDE][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"left/faces/rude.png"));
		// right face
		images[BODY][RIGHT][adultIndex] =		flipImage(images[BODY][LEFT][adultIndex]);
		images[LICK][RIGHT][adultIndex] =		flipImage(images[LICK][LEFT][adultIndex]);
		images[BRAID][RIGHT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"right/braid.png"));
		images[ACCESSORY][RIGHT][adultIndex] =	flipImage(images[ACCESSORY][LEFT][adultIndex]);
		images[DAMAGED][RIGHT][adultIndex] =	flipImage(images[DAMAGED][LEFT][adultIndex]);
		images[PANTS][RIGHT][adultIndex] =		flipImage(images[PANTS][LEFT][adultIndex]);
		images[STAIN][RIGHT][adultIndex] =		flipImage(images[STAIN][LEFT][adultIndex]);
		images[SICK][RIGHT][adultIndex] =		flipImage(images[SICK][LEFT][adultIndex]);		
		images[NORMAL][RIGHT][adultIndex] =		flipImage(images[NORMAL][LEFT][adultIndex]);
		images[SLEEPING][RIGHT][adultIndex] =	flipImage(images[SLEEPING][LEFT][adultIndex]);
		images[CHEER][RIGHT][adultIndex] =		flipImage(images[CHEER][LEFT][adultIndex]);
		images[SMILE][RIGHT][adultIndex] =		flipImage(images[SMILE][LEFT][adultIndex]);
		images[TIRED][RIGHT][adultIndex] =		flipImage(images[TIRED][LEFT][adultIndex]);
		images[PUFF][RIGHT][adultIndex] =		flipImage(images[PUFF][LEFT][adultIndex]);
		images[CRYING][RIGHT][adultIndex] =		flipImage(images[CRYING][LEFT][adultIndex]);
		images[EXCITING][RIGHT][adultIndex] =	flipImage(images[EXCITING][LEFT][adultIndex]);
		images[REFRESHED][RIGHT][adultIndex] =	flipImage(images[REFRESHED][LEFT][adultIndex]);
		images[DEAD][RIGHT][adultIndex] =		flipImage(images[DEAD][LEFT][adultIndex]);
		images[RUDE][RIGHT][adultIndex] =		flipImage(images[RUDE][LEFT][adultIndex]);
		// center
		images[CRUSHED][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"crushed.png"));			
		images[CRUSHED2][LEFT][adultIndex] =	ImageIO.read(loader.getResourceAsStream(path+"crushed2.png"));			
		images[SHIT][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"shit.png"));
		images[ROLL_ACCESSORY][LEFT][adultIndex] =	ImageIO.read(loader.getResourceAsStream(path+"hat.png"));
		images[ROLL_SHIT][LEFT][adultIndex] =	ImageIO.read(loader.getResourceAsStream(path+"roll_left.png"));
		images[ROLL_SHIT][RIGHT][adultIndex] =	ImageIO.read(loader.getResourceAsStream(path+"roll_right.png"));
		images[PANTS2][LEFT][adultIndex] =		ImageIO.read(loader.getResourceAsStream(path+"pants.png"));
		images[PANTS2_ROLL][LEFT][adultIndex] = ImageIO.read(loader.getResourceAsStream(path+"left_pants.png"));
		images[PANTS2_ROLL][RIGHT][adultIndex] = ImageIO.read(loader.getResourceAsStream(path+"right_pants.png"));

		for(Image[][] array2d : images) {	
			for(Image[] array : array2d) {
				if(array[adultIndex] == null) {
					continue;
				}
				// Scale larger images down
				array[adultIndex] = array[adultIndex].getScaledInstance(adultSize, adultSize, Image.SCALE_AREA_AVERAGING);
				array[childIndex] = array[adultIndex].getScaledInstance(childSize, childSize, Image.SCALE_AREA_AVERAGING);
				array[babyIndex] =  array[adultIndex].getScaledInstance(babySize, babySize, Image.SCALE_AREA_AVERAGING);
			}
		}
	}

	public Image getImage(int type, int direction) {
		return images[type][direction][ageState.ordinal()];
	}

	@Override
	public int getType() {
		return type;
	}

	@Override
	public int getHybridType(int partnerType) {
		switch (partnerType) {
		case Reimu.type:
		case WasaReimu.type:
			return ReimuMarisa.type;
		default:
			return Marisa.type;
		}
	}

	@Override
	public String getNameJ() {
		return nameJ;
	}

	@Override
	public String getNameE() {
		return nameE;
	}

	@Override
	protected String msgWantFoodJ () {
		String[] output = {"ごはんしゃんのにおいがしゅりゅのじぇ", "ごはんしゃんのにおいがするのじぇ", "ごはんさんのにおいがするのぜ"};
		return output[ageState.ordinal()];
	}

	@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[ageState.ordinal()];
	}

	@Override
	protected String msgNoFoodJ()
	{
		if (!isRudeMessage()) {
			String[][] output = {{"ごはんしゃんにゃいよ！", "ごはんしゃんにゃいにょじぇ？", "ごはんさんがないのぜ？"},
					{"ごはんしゃんくだちゃい、、、", "ごはんしゃんくだちゃい、、、", "ごはんざんぐだざいぃ、、、"}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"ごはんしゃんにゃいよ！", "ごはんしゃんにゃいにょじぇ？ばきゃなの？しにゅの？", "ごはんさんないのぜ？ばかなの？しぬの？"},
					{"ごはんしゃんくだちゃい、、、", "ごはんしゃんくだちゃい、、、", "ごはんざんぐだざいぃ、、、"}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
	}

	@Override
	protected String msgNoFoodE()
	{
		if (!isRudeMessage()) {
			String[][] output = {{"Mishder food ish nod here!", "Mishder food ish nod here, je!", "Mister food is not here, ze?"},
					{"Gib me mishder food...", "Gib me mishder food...", "Please give me mister food..."}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"Mishder food ish nod here!", "Mishder food ish nod here,je! Are you shtoopid,je?  Wand choo die,je?", "Mister food is not here,ze?  Are you stupid,ze? Want to die,ze?"},
					{"Gib me mishder food...", "Gib me mishder food...", "Pwease give me misder food..."}};
			return output[damageState.ordinal()][ageState.ordinal()];			
		}
	}

	@Override
	protected String msgExciteJ() {
		if (!isRudeMessage()) {
			String output[] = {"ゆんやー!", "まりちゃのぺにぺにですっきちさせるのじぇ!", "まりさのぺにぺにですっきりさせてやるのぜ！"};
			return output[ageState.ordinal()];
		}
		else {
			String output[] = {"ゆんやー!", "まりちゃのびっぐまぐなむでひーひーいわせりゅのじぇ!", "まりささまのびっぐまぐなむでひーひーいわせるのぜ！"};
			return output[ageState.ordinal()];
		}
	}

	@Override
	protected String msgExciteE() {
		if (!isRudeMessage()) {
			String output[] = {"YUNYA-!", "Mawisha's penipeni will make you refresh, je!", "Marisa's penipeni will make you refresh, ze!"};
			return output[ageState.ordinal()];
		}
		else {
			String output[] = {"YUNYA-!", "Mawisha's big magnum will make you cry like a baby, je!", "The great Marisa's big magnum will make you cry like a baby, ze!"};
			return output[ageState.ordinal()];
		}
	}

	@Override
	protected String msgRelaxJ()
	{
		if (!isRudeMessage()) {
			String output[] = {"ゆっきゅりしていっちぇね！", "ゆっきゅりしていっちぇね！", "ゆっくりしていってね！"};
			return output[ageState.ordinal()];
		}
		else {
			String output[] = {"くしょどれいはちね！", "あまあまよこしぇ！", "まりささまにあまあまをけんっじょうするのぜ！"};
			return output[ageState.ordinal()];	    
		}
	}

	@Override
	protected String msgRelaxE()
	{
		if (!isRudeMessage()) {
			String output[] = {"Chake id eajy!", "Chake id eajy!", "Take it easy!"};
			return output[ageState.ordinal()];
		}
		else {
			String output[] = {"Shitty slave go die easy!", "Bwing shweet-shweets!", "Bring sweet-sweet to the great Marisa, ze!"};
			return output[ageState.ordinal()];	    
		}
	}

	@Override
	protected String msgFuriFuriJ()
	{
		if (!isRudeMessage()) {
			String output[] = {"ふーりふーり！ゆっくちー！", "まりちゃはさいっきょうにょじぇ！", "まりさはさいっきょうなのぜ！"};
			return output[ageState.ordinal()];
		}
		else {
			String output[] = {"ふーりふーり！ゆっくちー！", "まりちゃはさいっきょうなにょじぇ！", "まりささまはさいっきょうなのぜ！"};
			return output[ageState.ordinal()];			
		}
	}

	@Override
	protected String msgFuriFuriE()
	{
		if (!isRudeMessage()) {
			String output[] = {"Relax-relax~, chake id eajy!", "Mawisha ish da shdrongest, je!", "Marisa is the strongest, ze!"};
			return output[ageState.ordinal()];
		}
		else {
			String output[] = {"Relax-relax~, chake id eajy!", "Mawisha ish da shdrongest, je!", "The great Marisa is the strongest, ze!"};
			return output[ageState.ordinal()];			
		}
	}

	@Override
	protected String msgWakeupJ()
	{
		String output[] = {"ゆっきゅりしていっちぇね！", "ゆっきゅりしていっちぇね！", "ゆっくりしていってね！"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgWakeupE()
	{
		String output[] = {"Chake id eajy!", "Chake id eajy!", "Take it easy!"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgSleepJ() { return "すーやすーや"; }

	@Override
	protected String msgSleepE() { return "Sleep-Sleep---"; }

	@Override
	protected String msgScreamJ() {
		if (!isRudeMessage()) {
			String[][] output = {{"ゆんやー！", "いちゃい！やめりゅのじぇ！", "いたい！やめるんだぜ！ぷくーだぜ！"},
					{"ゆ、ゆ、ゆ、、、", "やめちぇねやめちぇね、、、", "おねがいじばず、やめでぐだざい、、、"}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"ゆんやー！", "いちゃい！ぷきゅーするのじぇ！", "いたい！まりささまになにをするのぜ！ぷくーだぜ！"},
					{"ゆ、ゆ、ゆ、、、", "ごめんにゃちゃいやめちぇね、、、", "おねがいじばず、ごめんなさい、やめでぐだざい、、、"}};
			return output[damageState.ordinal()][ageState.ordinal()];	    
		}
	}

	@Override
	protected String msgScreamE() {
		if (!isRudeMessage()) {
			String[][] output = {{"YUNYA-!", "ID HURD! Shdop id, je!", "Stop it, ze! Puff, ze!"},
					{"Yu,Yu,Yu...", "Shdop id, shdop id, je...", "Pwease, sdop id pwease, ze..."}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"YUNYA-!", "ID HURD! Going choo pyuff-pyuff, je!", "It hurts! What are you doing to the great Marisa, ze! Puff, ze!"},
					{"Yu,Yu,Yu...", "Shdop id, shdop id, je...", "Marisa is sorry, ze... Pwease, sdop id pwease, ze..."}};
			return output[damageState.ordinal()][ageState.ordinal()];	    
		}
	}

	@Override
	protected String msgScareJ () {
		String[][] output = {{"ゆんやー！", "ゆっくちできにゃいのじぇー！", "ゆっくりできないのぜ！"},
				{"やめちぇにぇやめちぇにぇ、、、", "ごめんにゃちゃいやめちぇね、、、", "おねがいじばず、やめでぐだざい、、、"}};
		return output[damageState.ordinal()][ageState.ordinal()];
	}

	@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, je...", "Pwease, sdop id pwease, ze..."}};
		return output[damageState.ordinal()][ageState.ordinal()];
	}

	@Override
	protected String msgScareRapistJ () {
		String[][] output = {{"ゆんやー！", "ゆんやー！れいぱーなのじぇー！", "れいぱーだー！"},
				{"ゆ、ゆ、ゆ、、、", "ごめんなちゃいやめちぇにぇ、、、", "おねがいじばず、やめでぐだざいぃ、、、"}};
		return output[damageState.ordinal()][ageState.ordinal()];
	}

	@Override
	protected String msgScareRapistE () {
		String[][] output = {{"YUNYA-!!", "YUNYA-! She is rapist, je!", "She is rapist!"},
				{"Shdop id, shdop id...", "Mawisha ish showwy sho pwease shdop id, je...", "Pwease, sdop id pwease, ze..."}};
		return output[damageState.ordinal()][ageState.ordinal()];
	}

	@Override
	protected String msgAlarmJ () {
		if (!isRudeMessage()) {
			String[][] output = {{"にゃんだかゆっくちできにゃいのじぇ！", "にゃんだかゆっくちできにゃいのじぇ！", "やめるんだぜ！ぷくーだぜ！"},
					{"やめちぇにぇやめちぇにぇ、、、", "ごめんにゃちゃいやめちぇね、、、", "おねがいじばず、やめでぐだざい、、、"}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"やめりょくしょどれい！", "やめりょくしょどれい！しぇいしゃいしゅりゅよ！", "くそどれいはいますぐやめるんだぜ！せいっさいするのぜ！"},
					{"やめちぇにぇやめちぇにぇ、、、", "ごめんにゃちゃいやめちぇね、、、", "おねがいじばず、やめでぐだざい、、、"}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
	}

	@Override
	protected String msgAlarmE () {
		if (!isRudeMessage()) {
			String[][] output = {{"Yu-!!", "I can'ch chake id eajy, je!", "Stop it, ze! Puff, ze!"},
					{"Yu,Yu,Yu...", "Mawisha ish showwy sho pwease shdop id, je...", "Pwease, sdop id pwease, ze..."}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"Yu-!!", "I can'ch chake id eajy, je! Shdop id shitty slave, je!", "Stop it quickly Shitty slave, ze! Sanction you, ze!"},
					{"Yu,Yu,Yu...", "Mawisha ish showwy sho pwease shdop id, je...", "Pwease, sdop id pwease, ze..."}};
			return output[damageState.ordinal()][ageState.ordinal()];			
		}
	}

	protected String msgDyingJ () {
		String[] output = {"ゆべっ！", "ゆ、ゆ、ゆ、、、", "ぶぼっ！"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgDyingE () {
		String[] output = {"Yubee!", "Puff!", "Blarf!"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgDeadJ () {
		String[] output = {"もっちょゆっくちしちゃかった、、、", "もっちょゆっくちしちゃかった、、、", "もっとゆっくりしたかった、、、"};
		return output[ageState.ordinal()];
	}

	@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[ageState.ordinal()];
	}

	@Override
	protected String msgEatingJ () {
		if (!isRudeMessage()) {
			String[][] output = {{"む〜ちゃむ〜ちゃ、ゆー", "むーちゃむーちゃ、ちあわちぇー！", "むーしゃむーしゃ、しあわせー！"},
					{"むっちゃむっちゃ、ゆー！", "むちゃむちゃ、はふはふ！", "むーしゃむーしゃ、めっちゃうめぇ！"}};
			return output[hungryState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"む〜ちゃむ〜ちゃ、ゆー", "むーちゃむーちゃ、それなりー！", "むーしゃむーしゃ、それなりー！"},
					{"むっちゃむっちゃ、ゆー！", "むっちゃむっちゃ、はふはふ！", "むーしゃむーしゃ、これめっちゃうめぇ！"}};
			return output[hungryState.ordinal()][ageState.ordinal()];
		}
	}

	@Override
	protected String msgEatingE () {
		if (!isRudeMessage()) {
			String[][] output = {{"Myunch~ Myunch~ Yu~", "Myunch~ Myunch~ Happinesh~", "Munch munch, Happiness"},	
					{"Yu!Yu!Yu!", "Myunch Myunch, nom nom", "Munch munch, so good!"}};
			return output[hungryState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"Myunch-Myunch, can'ch chake id eajy...", "Myunch-Myunch, can'ch chake id eajy...", "Munch munch, can't take it easy~"},	
					{"Yu!Yu!Yu!", "Myunch Myunch, nom nom", "Munch munch, so good!"}};
			return output[hungryState.ordinal()][ageState.ordinal()];	    
		}
	}

	@Override
	protected String msgEatingShitJ () {
		String[] output = {"む〜ちゃむ〜ちゃ、げりょまじゅ、、、", "むーちゃむーちゃ、げろまじゅ、、、", "むーしゃむーしゃ、げろまず、、、"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgEatingShitE () {
		String[] output = {"Myunch-Myunch, disgusting,,,", "Myunch~ Myunch~ disgusting,,,", "Munch munch, disgusting,,,"};
		return output[ageState.ordinal()];
	}
	
	@Override
	protected String msgEatingBitterJ () {
		String[] output = {"む〜ちゃむ〜ちゃ、こりぇどきゅはいっちぇりゅ！", "むーちゃむーちゃ、こりぇどきゅはいっちぇりゅ！", "むーしゃむーしゃ、これどくはいってるのぜ！"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgEatingBitterE () {
		String[] output = {"Myunch-Myunch, this is poison!", "Myunch~ Myunch~ this is poison!", "Munch munch, this is poison!"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgFullJ () {
		String[] output = {"おにゃかいっぱい、、、", "おにゃかいっぱい、、、", "もうたべられないのぜ、、、"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgFullE () {
		String[] output = {"Tummy ish full...", "Tummy ish full...", "Can't eat anymore ze..."};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgHealingJ () {
		if (!isRudeMessage()) {
			String[][] output = {{"あみゃあみゃ！", "あまあまおいちぃ！", "あまあまおいしいのぜ！"},
					{"あみゃあみゃ！", "ふっきゃつしちゃのじぇ", "ふっかつしたのぜ"}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"あみゃあみゃ！", "あまあまもっちょよこしゅのじぇ！", "あまあまもっとよこすのぜ！"},
					{"あみゃあみゃ！", "まりちゃはふっきゃつしちゃのじぇ！", "まりささまはかれいにふっかつしたのぜ！"}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
	}

	@Override
	protected String msgHealingE () {
		if (!isRudeMessage()) {
			String[][] output = {{"Shweet-shweet!", "Shweet-shweet! tasht good, je!", "Sweet-sweet! Taste good, ze!"},
					{"Shweet-shweet!", "Mawisha ish coming back!", "Marisa is coming back!"}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"Shweet-shweet!", "Gib Mawisha shweet-shweet more, je!", "Give Marisa sweet-sweet more, ze!"},
					{"Shweet-shweet!", "Mawisha ish coming back gorgeously, je!", "The great Marisa is coming back gorgeously, ze!"}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
	}

	@Override
	protected String msgSukkiriJ () {
		String[] output = {"ちゅっきち！", "ちゅっきり！", "すっきり！"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgSukkiriE () {
		String[] output = {"Wefweshed!", "Wefeshed!", "Refreshed!"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgBirthJ () { return "ゆっくちちていっちぇね！"; }

	@Override
	protected String msgBirthE () { return "Chake id eajy!"; }

	@Override
	protected String msgShitJ () {
		if (!hasPants) {
			if (!isRudeMessage()) {
				String[] output = {"うんうんぢぇりゅ！", "まりちゃのすーぴゃーうんうんちゃいみゅにょじぇ！", "まりさのすーぱーうんうんたいむのぜ！"};
				return output[ageState.ordinal()];
			}
			else {
				String[] output = {"うんうんぢぇりゅ！", "くしょじょれいはまりちゃのうんうんくらうにょじぇ！", "くそどれいはまりささまのうんうんくらうのぜ！"};
				return output[ageState.ordinal()];
			}
		}
		else {
			String[] output = {"うんうんもりぇりゅのじぇぇ！", "うんうんしゃんもれりゅのじぇぇ！", "うんうんさんもれちゃうのぜぇ！"};
			return output[ageState.ordinal()];
		}
	}

	@Override
	protected String msgShitE () {
		if (!hasPants) {
			if (!isRudeMessage()) {
				String[] output = {"Poo-pooing!", "Mawisha's shuupa poo-poo time ish shtarting, je!", "Marisa's super poo-poo time is starting, ze!"};
				return output[ageState.ordinal()];
			}
			else {
				String[] output = {"Poo-pooing!", "Shitty shlave can eat Mawisha's poo-poo, je!", "Shitty slave can eat Marisa's poo-poo, ze!"};
				return output[ageState.ordinal()];	    				
			}
		}
		else {
			String[] output = {"Poo-poo Maricha's pants, je!", "Poo-poo Mawisha's pants, je!", "Leaking mister poo-poo, ze!"};
			return output[ageState.ordinal()];
		}
	}

	@Override
	protected String msgShit2J () {
		if (!hasPants) {
			String[] output = {"すっきち！", "すっきちー！", "すっきりー！"};
			return output[ageState.ordinal()];
		}
		else {
			String[] output = {"ゆんやー！", "ゆんやー！", "きもちわるいのぜ、、、"};
			return output[ageState.ordinal()];			
		}
	}

	@Override
	protected String msgShit2E () {
		if (!hasPants) {
			String[] output = {"Wefeshed!", "Wefeshed-!!", "Refreshed~!"};
			return output[ageState.ordinal()];
		}
		else {
			String[] output = {"Yun ya-!", "Yun ya-!", "I feel I can't take it ease, ze..."};
			return output[ageState.ordinal()];
		}
	}
	
	@Override
	protected String msgSuriSuriJ () {
		String[] output = {"ちゅりちゅり", "ちゅーりちゅーり", "すーりすーり"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgSuriSuriE () {
		String[] output = {"Wub-wub", "Wub-wub", "Rub-rub"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgPeroPeroJ () {
		String[] output = {"ぺりょぺりょ", "ぺーりょぺーりょ", "ぺーろぺーろ"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgPeroPeroE () {
		String[] output = {"Wick-wick~", "Wick-wick~", "Lick-lick~"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgBreedJ () { return "う、おちびがうばれるのぜ、、、"; }

	@Override
	protected String msgBreedE () { return "B...Being born, ze..."; }

	@Override
	protected String msgBreed2J () {
		if (!hasPants) {
			return "ゆっくりしていってね！";
		}
		else {
			return "ゆがあぁ！おちびがあぁぁ！";
		}
	}

	@Override
	protected String msgBreed2E () {
		if (!hasPants) {
			return "Take it easy!";
		}
		else {
			return "Yugaa! My little one!";
		}
	}

	@Override
	protected String msgHateShitJ () {
		if (!isRudeMessage()) {
			String[][] output = {{"くちゃい〜！", "うんうんくちゃい！", "うんうんかたづけてね！"},
					{"くちゃい、、、", "くちゃいよ、ゆっきゅりできにゃい、、、", "くさいよ、ゆっくりできないよ、、、"}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"くちゃい！", "しゅぎゅにうんうんかたじゅきぇるのじぇ！", "くそどれいはすぐにうんうんかたづけるのぜ！"},
					{"くちゃい、、、", "くちゃいよ、ゆっきゅりできにゃい、、、", "くさいよ、ゆっくりできないよ、、、"}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
	}

	@Override
	protected String msgHateShitE () {
		if (!isRudeMessage()) {
			String[][] output = {{"Shmelly~!", "Poo-poo shdinky, je!", "Clean up mister poo-poo, ze!"},
					{"Shmelly...", "Shmelly, can'ch chake id eajy, je...", "Smelly... can't take it easy, ze..."}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"Shmelly~!", "Shmelly~! Clean up poo-poo quickly, je!", "Clean up Poo-poo quickly shitty slave, ze!"},
					{"Shmelly...", "Shmelly, can'ch chake id eajy, je...", "Smelly... can't take it easy, ze..."}};
			return output[damageState.ordinal()][ageState.ordinal()];			
		}
	}

	@Override
	protected String msgHungryJ () {
		if (!isRudeMessage()) {
			String[][] output = {{"あみゃあみゃちょうじゃい！", "ごはんしゃんまりしゃにちょうだいのじぇ！", "まりさはごはんさんほしいのぜ！"},
					{"ごはんしゃんどきょ？", "おにゃきゃへっちゃのじぇ、、、", "ばりざにごはんぐだざいぃ"}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"あみゃあみゃもっちぇこい！", "すぎゅにごはんしゃんもってきゅるのじぇ！", "くそどれいはごはんさんまりさによこすのぜ！たくさんでいいよ！"},
					{"ごはんしゃんどきょ？", "おにゃきゃへっちゃのじぇ、、、", "ばりざにごはんぐだざいぃ"}};
			return output[damageState.ordinal()][ageState.ordinal()];			
		}
	}

	@Override
	protected String msgHungryE () {
		if (!isRudeMessage()) {
			String[][] output = {{"Gib me shweet-shweets!", "Bwing mishder munch-munch choo Mawisha, je!", "Bring mister munch-munch to Marisa, ze!"},
					{"Yu... mishder food...", "Misder tummy ish hungwy, je...", "Pwease give Marisa some food, ze..."}};
			return output[damageState.ordinal()][ageState.ordinal()];
		}
		else {
			String[][] output = {{"Bwing shweet-shweet!", "Bwing Mawisha's shweet-shweet quickly, je!", "Bring the great Marisa's sweet-sweet, ze! A lot is fine, ze!"},
					{"Where ish mishder food?", "Misder tummy ish hungwy, je...", "Pwease give Barisa some food, ze..."}};
			return output[damageState.ordinal()][ageState.ordinal()];			
		}
	}

	@Override
	protected String msgNoAccessoryJ () {
		String[] output = {"ゆぇーん！かえちてね？かえちてね？", "ゆぇーん！まりちゃのしゅてきなおぼうししゃんかえちてね？", "まりさのくろくそびえたつおぼうしさんはどこなのぜ？"};
		return output[ageState.ordinal()];
	}

	@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[ageState.ordinal()];
	}

	@Override
	protected String msgHateYukkuriJ () {
		if (!isRudeMessage()) {
			String[] output = {"ゆっくちできにゃいゆっくちがいりゅよ", "ゆっくちできにゃいゆっくちがいりゅのじぇ", "ゆっくりできないゆっくりがいるのぜ！"};
			return output[ageState.ordinal()];
		}
		else {
			String[] output = {"ゆっくちできにゃいゆっくちがいりゅよ", "ゆへへ、ゆっくちできにゃいゆっくちがいりゅのじぇ", "ゆへへ、ゆっくりできないゆっくりがいるのぜ！せいっさいするのぜ！"};
			return output[ageState.ordinal()];	    
		}
	}

	@Override
	protected String msgHateYukkuriE () {
		if (!isRudeMessage()) {
			String[] output = {"There'sh a yukkuri that can'ch chake id eajy", "There'sh a yukkuri that can'ch chake id eajy, je", "A yukkuri that can't take it easy, ze!"};
			return output[ageState.ordinal()];
		}
		else {
			String[] output = {"There'sh a yukkuri that can'ch chake id eajy", "Yu-pfft, there'sh a yukkuri that can'ch chake id eajy, je", "Yu-pfft, a yukkuri that can't take it easy, ze!  Punishment time, ze!"};
			return output[ageState.ordinal()];
		}
	}

	@Override
	protected String msgFlyingJ () {
		String[] output = {"おちょらをとんでりゅみちゃいのじぇ！", "まりちゃはおしょらをせいふくしたのじぇ！", "まりさはおそらをせいふくしたのぜ！"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgFlyingE () {
		String[] output = {"Ich feewsh wike fwying, je!", "Mawisha conquered shky, je!", "Marisa conquered the sky, ze!"};
		return output[ageState.ordinal()];
	}

	@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!";
	}
	
	@Override
	protected String msgSadnessForSisterJ (Body partner) {
		if (isAdult()) {
			return partner.getNameJ()+"めをあけるのぜ！";
		}
		else if (age < partner.age) {
			return "おねぇしゃんめをあけるのじぇー！";
		}
		else {
			return "いもうちょめをあけるのじぇー！";
		}
	}

	@Override
	protected String msgSadnessForSisterE (Body partner) {
		if (isAdult()) {
			return "Open your eyes, "+partner.getNameE()+",ze!";
		}
		else if (age < partner.age) {
			return "Open your eyes, my elder sister, je!";
		}
		else {
			return "Open your eyes, my sister, je!";
		}
	}
	
	@Override
	protected String msgBlockedByWallJ () {
		if (!isRudeMessage()) {
			String[] output = {"まりちゃしゅしゅめにゃいにょじぇぇぇ！？", "にゃんでかべしゃんじゃましゅるにょじぇぇぇ！？", "なんでかべさんじゃまするのぜ！？"};
			return output[ageState.ordinal()];
		}
		else {
			String[] output = {"くちょかびぇはちね！！", "くちょかべはちね！！ぷきゅーじゃよ！！", "じゃまなかべさんはどくのぜ！すぐでいいよ！"};
			return output[ageState.ordinal()];
		}
	}
	
	@Override
	protected String msgBlockedByWallE () {
		if (!isRudeMessage()) {
			String[] output = {"Maricha can'ch go forward, je!?", "Why would mishter Wall block me, je!?", "Why would mister Wall block me, ze!?"};
			return output[ageState.ordinal()];
		}
		else {
			String[] output = {"Die shitty wall!", "Die shitty Wall, je! Puff, je!", "Mister Wall is in my way, ze! Move, ze! Quickly is fine, ze!"};
			return output[ageState.ordinal()];
		}
	}
	
	@Override
	protected String msgGetTreasureJ () {
		String[] output = {"こりぇをまりちゃにょたからもにょにしゅるにょじぇ！", "こりぇをまりちゃのたからものにしゅるのじぇ！", "これをまりさのたからものにするのぜ！"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgGetTreasureE () {
		String[] output = {"Make id Maricha's treasure, je!", "Make id Mawisha's treasure, je!", "Make it Marisa's treasure, ze!"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgLostTreasureJ () {
		String[] output = {"ゆんやー！", "ゆんやー！まりちゃのたからものさんかえちてぇ!", "まりさのたからものさんかえすのぜ!"};
		return output[ageState.ordinal()];
	}

	@Override
	protected String msgLostTreasureE () {
		String[] output = {"Yun-Ya-!", "Yun-Ya-! Please get back Mawisha's mishter treasure, je!", "Get back Marisa's mister treasure, ze!"};
		return output[ageState.ordinal()];
	}
	
	// Constructor of this class.
	public Marisa(int initX, int initY, int initZ, Body.AgeState initAgeState, Body p1, Body p2) {
		super(initX, initY, initZ, initAgeState, p1, p2);
	}
	
	public void tuneParameters() {
		// Tune individual parameters.
		double factor = Math.random()+1;
		HUNGRYLIMIT[AgeState.ADULT.ordinal()] *= factor; 
		HUNGRYLIMIT[AgeState.CHILD.ordinal()] *= factor;
		HUNGRYLIMIT[AgeState.BABY.ordinal()] *= factor;
		factor = Math.random()+1;
		SHITLIMIT[AgeState.ADULT.ordinal()] *= factor;
		SHITLIMIT[AgeState.CHILD.ordinal()] *= factor;
		SHITLIMIT[AgeState.BABY.ordinal()] *= factor;
		factor = Math.random()*2+1;
		DAMAGELIMIT[AgeState.ADULT.ordinal()] *= factor;
		DAMAGELIMIT[AgeState.CHILD.ordinal()] *= factor;
		DAMAGELIMIT[AgeState.BABY.ordinal()] *= factor;
		factor = Math.random()+0.5;
		BABYLIMIT *= factor;
		CHILDLIMIT *= factor;
		LIFELIMIT *= factor;
		factor = Math.random()+1;
		RELAXPERIOD *= factor;
		EXCITEPERIOD *= factor;
		PREGPERIOD *= factor;
		SLEEPPERIOD *= factor;
		ACTIVEPERIOD *= factor;
		sameDest = rnd.nextInt(10)+10;
		DECLINEPERIOD *= (Math.random()+0.5);
		DISCIPLINELIMIT *= (Math.random()+1);
		ROBUSTNESS = rnd.nextInt(10)+2;
		//EYESIGHT /= 1;
		factor = Math.random()+1;
		STRENGTH[AgeState.ADULT.ordinal()] *= factor;
		STRENGTH[AgeState.CHILD.ordinal()] *= factor;
		STRENGTH[AgeState.BABY.ordinal()] *= factor;
	}
}