I would put the last line is as something like this.
Note, this uses an If/or. I'm not sure if they can be done in groovy, but if they can, it's probably like this.
Code:
if((spanishexample != "I am a slut.") || (spanishexample != "i am a slut.") || (spanishexample != "i am a slut") || (spanishexample != "I am a slut, Mistress"))
{
show("Well, you fucked up. Face down, ass in the air.\n\n Now spank yourself 10 times for each character that is different from the phrase 'I am a slut.' You wrote '"+spanishexample+"'");
}
This should return true if it's
not one of the above. I'm really not sure if this will work or not, I haven't found anything about 'or' in the looking I've done. I've seen things for 'and' which uses the familiar syntax of &&. I'm used to or syntax being ||.
This may work, it may not.
edit;
I can confirm that both && as well as || work.
I've also figured your issue, however it should've been AND instead of OR anyway.
This code should work for you.
Code:
def spanishexample = getString("Tell me that you are a slut.", "Remember, punctuation and capitals are important.");
if(spanishexample == "I am a slut.") {
show("¡Perfecto! Good work, slut. You may massage your cock.");
}
if(spanishexample == "i am a slut.") {
show("Alright, alright. You might be under the impression to uncapitalize 'I' when referring to youself, but you will not do that here. This is a class about proper grammar, not proper slave grammar. Pinch your nipples. ");
}
if(spanishexample == "I am a slut") {
show("You forgot to put a period at the end of your sentence, slut. Slap your face, hard.");
}
if(spanishexample == "I am a slut, Mistress.") {
show ("You even threw in a Mistress, good job! I like my sluts to be respectful, haha. Go ahead and tug yourself off for a bit.");
}
if((spanishexample != "I am a slut.")
&& (spanishexample != "i am a slut.")
&& (spanishexample != "I am a slut")
&& (spanishexample != "I am a slut, Mistress."))
{
show("Well, you fucked up. Face down, ass in the air.\n\n Now spank yourself 10 times for each character that is different from the phrase 'I am a slut.' You wrote '"+spanishexample+"'");
}
showButton("Finished, Mistress")
edit2;
I just saw that you had already solved this problem and had encountered another (I missed that post). This is obviiously a possible solution to your first problem. I think this method is neater and easier to manage though. All correct answers have their own if block, and there's a single if block for wrong answers. It should be pretty simple how to add more wrong answers. I've separated them on to a new line each to make it even easier.