
-----------------------------------
Zampano
Sun Sep 09, 2007 1:03 am

This is my Debut Solo Project in Turing
-----------------------------------
I created this after 4 periods of instruction on Object Oriented Turing 4.0.
It's lame, but it's my beginning project.

var command:string
var enhealth,youhealth:int
put "A goblin has attacked you."
put "Fight back by entering battle commands or perish!"
enhealth:=200
youhealth:=100
loop
    put "Enter a command."
    put "(A)Attack"
    put "(B)Heal"
    put "(C)Nothing"
    get command
    if command="A" or command="a" then
        put "You chose to attack."
        enhealth:=enhealth-15
        youhealth:=youhealth-10
        put "You damaged your enemy for 15 points."
        put "Your enemy damaged you for 10 points."
        put "Your current health is ",youhealth,"/100."
    elsif command="B" or command="b" then
        put "You chose to heal."
        youhealth:=youhealth+40
        if youhealth>100 then
            youhealth:=100
        end if
        youhealth:=youhealth-10
        put "You healed yourself for 40 points."
        put "Your enemy damaged you for 10 points."
        put "Your current health is ",youhealth,"/100."
    elsif command="C" or command="c" then
        put "You chose to do nothing."
        youhealth:=youhealth-10
        put "Your enemy damaged you for 10 points."
        put "Your current health is ",youhealth,"/100."
    else
        put "Invalid battle command."
    end if
    exit when youhealth