SCENE 50000, acrossportmeadow, SCENE, "Old-School Battle"
TOKEN 3952,"You visited the Old School Fight Center."
ACTOR 1, "Battle Guy", ben1, 1, 25, 65
POSE 1, 4
1: Hello! This is the Old-School Battle simulator!
1: Here, you can re-enact a battle from Final Fantasy!
IF T3952, @skip9
@skip9
@eventActorClick1
MENU "Instructions=@instruct","Battle=@battle","My stats=@stats"
END
@instruct
1: So you want to learn how to play?
1: You fight a monster. On your turn, a menu comes up with attack or cast spell on it.
1: You can't cast any spell yet! But, you can attack the monster.
1: You each take turns attacking until one of you dies. The winner is the one who is left standing.
1: Anything else?
GOTO @eventActorClick1
END

@stats
1: This is only the first version of the BattleScript.
1: Soon, you'll be able to have full-blown FF1 battles, and gain experience.
1: Perhaps you could even fight another player online!
END

@battle
GOTO SCENE 50001
END

SCENE 50001, acrossportmeadow, CUT, "Battle!"
@fight666
N: FIGHT!!
WAIT 1.5
MUSIC ff1battl
SET mon1hp, 45
SET playerHP, 65
ACTOR 1, "Imp", Joeimp, 1, 20, 70
SEL 1
POSE 1, 4
ACTOR 2, "#<str.name>", mirror, 1, 70, 70
SEL 2
FACE 2
POSE 1, 4
IF R50, @first
WAIT 1.0
GOTO @monsterAttack
WAIT 1.0
GOTO @playerAttack

@monsterAttack
COMPARE #<mon1hp>, 0
IF< @monsterDead
IF= @monsterDead
1: I have #<mon1hp> HP left!
N: Imp attacks!
SEL 1
POSE 2
MOVE 1, 65, 70, 3
WAIT 1.0
IF R15, @monsterMiss
SET damage, %R10
SUB playerHP, #<damage>
N: Attack does #<damage> damage to you!
MOVE 1, 20, 70, 3
WAIT 1.0
GOTO @playerAttack

@playerAttack
COMPARE #<playerHP>, 0
IF< @playerDead
IF= @playerDead
N: You have #<playerHP> Hit Points left.
@menu1
MENU "Attack=@attack","Cast Spell=@spell"
GOTO @menu1

@attack
N: You attack!
IF R15, @playerMiss
SET damage, %R10
SUB mon1hp, #<damage>
N: Your attack does #<damage> damage!
WAIT 1.0
GOTO @monsterAttack

@spell
N: You don't have any spells!
WAIT 1.0
GOTO @menu1

@playerMiss
N: Miss!
WAIT 1.0
GOTO @monsterAttack

@monsterMiss
N: Miss!
MOVE 1, 20, 70, 3

WAIT 1.0
GOTO @playerAttack

@playerDead
N: You lost...
WAIT 1.0
GOTO SCENE 50000

@monsterDead
N: You won!
N: Play again(Yes/No)?
ASK 60
IF YES, @fight666
GOTO SCENE 50000
MUSIC #silence
END