
-----------------------------------
Remm
Tue Aug 15, 2006 7:47 pm

Battle Test!
-----------------------------------
Alright, This is the battle test for a RPG or whatever. The basis is down, even with poison / burn / shielding working (can be seen with the burn, easy to manipulate)
Anyways, Its you, Mr Hack N slash VRS the mage. I will make a second spellcaster class open along with more elaborate skills in due time, but for now, I would like to see what you think of my system.

The wait system is similar to MGA/MGA2 's cost system, where each action adds t your WP (wait points), and such determines the turn order. Do somthing with more WP, and your opponent may be able to get in multiple attacks, and vice versa.
Scan feature is in, so I suggest using it to see your opponents health/wait points, so you can plan your attack accordingly. Not much to plan, seeing as how there is a whopping two skills for the user.
In new version, the screen will be bigger, yes. For now, it is at the MGF seal size.

Feedback wanted.
Oh, and not a process in sight.  :wink: 

(Code on below post)

Edit: Fixxed the Win/loss requirements. Hehe now how'd I miss that...

Edit: Heh. put the v back in the very first var statement. Bad C/P edit >.<

-----------------------------------
Remm
Thu Aug 17, 2006 9:39 am


-----------------------------------
Seeing as how im getting just soooo much feedback, I feel it is time I updated my code, using ALL of those WONDERFUL ideas you gave me  . 

Anyways, Changes: 
==>New skill choosing system, a grand total of 6 skills(not including scan), one doesnt do anything though, but dont worry, it will in the future. 

==> Window size 

==> A few minor fixes that I cant really remember... 

To come in the near future: 

==> More skills 

==> More enimies 

==> Leveling system 

==> mana system (this will mean spells // heal will be buffed, at the expense of being only able to cast when you have sufficient mana) 

==> Changing keys from a) b) c) ect.. to 1) 2) 3) for easier use. 

----------- 
I would have done these before sending out theis version, but regretably I have recieved next to no feedback, so I have yet to know what other people think about it. I would rather not get too in depth if no-one even cares for it. Code has been reposted here.
 

var p :
    record
        healing : real
        w : real
        dtaken : real
        sdtaken : real % self-damage taken
        hp : int
        wpp : real % Wait point plus
        wi : real % wait Increase
        wd : real % wait Decrease
    end record

var e :
    record
        healing : real
        w : real
        dtaken : real
        hp : int
        wpp : real
        wi : real
        wd : real
    end record

var start, chooser, win1, achance, rchance, fchance : int
var scan, badburn, goodburn, regencheck : boolean
var hpcheck, badburntime, goodburntime, regentime : int
var normal, ranged, frenzy, regen, master, sflame : boolean
procedure STATS
    if (scan = true) then
        locatexy (55, maxy - 10)
        put "Player's WP: ", p.w
        locatexy (55, maxy - 20)
        put "Player's HP: ", p.hp
        locatexy (250, maxy - 10)
        put "Target's WP: ", e.w
        locatexy (250, maxy - 20)
        put "Target's HP: ", e.hp
        color (brightred)
        color (brightred)
        put "=============================================================="
        color (black)
    elsif (scan = false) then
        locatexy (55, maxy - 10)
        put "Player's WP: ", p.w
        locatexy (55, maxy - 20)
        put "Player's HP: ", p.hp
        locatexy (250, maxy - 10)
        put "Target's WP: ??"
        locatexy (250, maxy - 20)
        put "Target's HP: ??"
        color (brightred)
        put "=============================================================="
        Draw.ThickLine (0, 0, maxx, 0, 5, black)
        Draw.ThickLine (0, maxy, maxx, maxy, 5, black)
        color (black)
    end if
end STATS
%=============
procedure PLAYER
    var key : string (1)
    e.dtaken := 0
    p.wpp := 0
    p.sdtaken := 0
    color (black)
    put "a) Scan - 6  WP"
    color (blue)
    put "   Shows target's WP and HP."
    if (normal = true) then
        color (black)
        put ""
        put "b) Normal Attack - 12 WP"
        color (blue)
        put "   Basic, reliable attack. 5-11 DMG"
    elsif (ranged = true) then
        color (black)
        put ""
        put "b) Ranged Attack   - 13 WP"
        color (blue)
        put "   Standard Ranged Attack. 6-14 DMG"
        put "   However, a 20% Chance to Miss"
    elsif (frenzy = true) then
        color (black)
        put ""
        put "b) Frenzied Slash - 25 WP"
        color (blue)
        put "   Attacks with wild speed. 3-6 DMG"
        put "   66% Chance to reduce WP by 20."
    end if

    if (regen = true) then
        color (black)
        put ""
        put "c) Regeneration - 18 WP"
        color (blue)
        put "   Heals you for 2 hp for every 1 wait over"
        put "   a period of 6-14 wait. (Stacks)."
    elsif (master = true) then
        put ""
        color (black)
        put "c) Ice Mastery"
    elsif (sflame = true) then
        put ""
        color (black)
        put "c) Searing Flame - 18 WP"
        color (blue)
        put "   Deals 1-3 damage and " ..
        color (brightred)
        put "burns" ..
        color (blue)
        put " for another"
        put "   4-16 wait."
    end if
    color (red)
    put ""
    put "Choose A Spell \\ Skill"
    color (blue)
    loop
        getch (key)
        if (key = "a") or (key = "A") then
            if (scan = true) then
                put "You have already scanned the Target.."
                getch (key)
                exit
            elsif (scan = false) then
                scan := true
                p.wpp := p.wpp + 6
                put "You scan the Target."
                getch (key)
                exit
            end if
        elsif (key = "b") or (key = "B") then
            if (normal = true) then
                e.dtaken := e.dtaken + Rand.Int (5, 11)
                p.wpp := p.wpp + 12
                put "You hit Target for ", e.dtaken, " Dmg."
                getch (key)
                exit
            elsif (ranged = true) then
                rchance := Rand.Int (1, 10)
                if (rchance = 1) or (rchance = 2) then
                    put "You Miss!"
                    p.wpp := p.wpp + 13
                    getch (key)
                    exit
                else
                    e.dtaken := e.dtaken + Rand.Int (6, 14)
                    p.wpp := p.wpp + 13
                    put "You hit Target for ", e.dtaken, " Dmg."
                    getch (key)
                    exit
                end if
            elsif (frenzy = true) then
                fchance := Rand.Int (1, 3)
                if (fchance = 1) then
                    p.wpp := p.wpp + 25
                    e.dtaken := e.dtaken + Rand.Int (3, 6)
                    put "You hit Target for ", e.dtaken, " Dmg."
                    getch (key)
                    exit
                else
                    p.wpp := p.wpp + 5
                    e.dtaken := e.dtaken + Rand.Int (3, 6)
                    put "You hit Target for ", e.dtaken, " Dmg."
                    put "Your WP has been reducde by 20!"
                    getch (key)
                    exit
                end if
            end if
        elsif (key = "c") or (key = "C") then
            if (regen = true) then
                regentime := regentime + Rand.Int (6, 14)
                regencheck := true
                p.wpp := p.wpp + 18
                put "You Cast Regeneration."
                put "You will regenerate for ", regentime, " WP"
                getch (key)
                exit
            elsif (master = true) then
                p.wpp := p.wpp + 3
                put "This skill is Passive..."
                getch (key)
                exit
            elsif (sflame = true) then
                p.wpp := p.wpp + 18
                goodburn := true
                goodburntime := goodburntime + Rand.Int (4, 16)
                e.dtaken := e.dtaken + Rand.Int (1, 3)
                put "You hit Target for ", e.dtaken, " Dmg."
                put "Target is now burning."
                getch (key)
                exit
            end if
        end if
        color (black)
    end loop
end PLAYER
%=============
procedure TARGET
    e.wpp := 0
    p.dtaken := 0
    p.wi := 0
    e.healing := 0
    hpcheck := e.hp
    var clicky : string (1)
    color (black)
    put "Target's Turn:"
    delay (350)
    achance := Rand.Int (1, 5)
    if (achance = 1) then
        e.wpp := e.wpp + 23
        p.wi := p.wi + 7
        p.dtaken := p.dtaken + Rand.Int (4, 12)
        color (red)
        put "Target Casts Frost Burst."
        getch (clicky)
        put ""
        color (blue)
        put "You take ", p.dtaken, " Dmg."
        put "Your WP increases by ", p.wi
        getch (clicky)
    elsif (achance = 2) or (achance = 3) then
        e.wpp := e.wpp + 12
        p.dtaken := p.dtaken + Rand.Int (2, 6)
        color (red)
        put "Target attacks you normally."
        color (blue)
        put ""
        getch (clicky)
        put "You take ", p.dtaken, " Dmg."
        getch (clicky)
    elsif (achance = 4) then
        if (hpcheck < 60) then
            e.healing := e.healing + Rand.Int (1, 40)
            e.wpp := 32
            color (red)
            put "Target Casts Chance Heal."
            getch (clicky)
            put ""
            color (blue)
            put "Target is healed for ", e.healing, " Dmg."
            getch (clicky)
        else
            e.wpp := e.wpp + 12
            p.dtaken := p.dtaken + Rand.Int (2, 6)
            color (red)
            put "Target attacks you normally."
            color (blue)
            getch (clicky)
            put ""
            put "You take ", p.dtaken, " Dmg."
            getch (clicky)
        end if
    elsif (achance = 5) then
        p.dtaken := p.dtaken + Rand.Int (2, 5)
        badburn := true
        badburntime := Rand.Int (5, 15)
        e.wpp := e.wpp + 19
        color (red)
        put "Target Casts Enflame."
        getch (clicky)
        color (blue)
        put "You take ", p.dtaken, " Dmg."
        put "You are now on fire for"
        put badburntime, " Wait."
        getch (clicky)
    end if
end TARGET
%=============
procedure BATTLE

    p.sdtaken := 0
    e.dtaken := 0
    p.dtaken := 0
    p.healing := 0
    e.healing := 0
    p.hp := 100
    e.hp := 100
    scan := false
    e.wpp := 0
    p.wpp := 0
    p.wd := 0
    e.wd := 0
    p.wi := 0
    e.wi := 0
    badburntime := 0
    badburn := false
    goodburntime := 0
    goodburn := false
    regentime := 0
    regencheck := false
    start := Rand.Int (1, 4)
    if (start = 1) or (start = 2) or (start = 3) then
        p.w := 0
        e.w := 1
    elsif (start = 4) then
        p.w := 1
        e.w := 0
    end if

    %Continue battle until one is victorious.
    loop

        if (p.w = 0) and (e.w = 0) then
            chooser := Rand.Int (1, 2)
            if (chooser = 1) then
                cls
                STATS
                PLAYER
                cls
                STATS
                TARGET

            elsif (chooser = 2) then
                cls
                STATS
                TARGET
                cls
                STATS
                PLAYER

            end if
        elsif (e.w = 0) then
            cls
            STATS
            TARGET
        elsif (p.w = 0) then
            cls
            STATS
            PLAYER
        end if
        %add / subtract damage taken and amount healed.
        %then see if someone dies. +/- regen // burns // poisons
        if (badburntime = 0) then
            badburn := false
        end if

        if (badburn = true) then
            badburntime := badburntime - 1
            p.dtaken := p.dtaken + 1
        end if

        if (goodburntime = 0) then
            goodburn := false
        end if

        if (goodburn = true) then
            goodburntime := goodburntime - 1
            e.dtaken := e.dtaken + 1
        end if

        if (regentime = 0) then
            regencheck := false
        end if

        if (regencheck = true) then
            regentime := regentime - 1
            p.healing := p.healing + 2
        end if

        p.hp := round (p.hp - p.dtaken - p.sdtaken + p.healing)
        e.hp := round (e.hp - e.dtaken + e.healing)
        p.w := p.w + p.wpp + p.wi - p.wd
        e.w := e.w + e.wpp + e.wi - e.wd


        p.w := p.w - 1
        e.w := e.w - 1


        p.dtaken := 0
        p.sdtaken := 0
        e.dtaken := 0

        p.healing := 0
        e.healing := 0

        p.wpp := 0
        e.wpp := 0

        p.wi := 0
        e.wi := 0

        p.wd := 0
        e.wi := 0

        %Falesafe...
        if (p.w 