Help with turn based combat system with stats, etc

Huh. You can use percentage values in sets? Interesting. Can you do something like 1.5%?


I would read this. Fairmath is the only tool (well, most the time) that I use. It ensures your values never go above 100 or below 0. And yes, 1.5% would work
1 Like

Cool! Thanks for letting me know. Appreciate it!

1 Like

Well, I managed to get it done. Problem is I’m not exactly sure how to have this repeat over and over and over again. Maybe as a gosub routine?

I think it was @Alice-chan who said it, but I would make all combat a gosub

Hm. Problem is, when I set the *set values for the bandits HP, the skill goes through but the bandits HP won’t drop.

Code for main page:

    #Use a skill.
        *choice
            #Use ${skill}
                *gosub_scene skillstats skill_zenstrike
                *goto battlestart1
              
            #Use ${skill1}
                *gosub_scene skillstats skill_poison
                *if (poison = true)
                    *set bandithp %- 5
                    *return

Code for the gosub:

*label skill_zenstrike
*set mana - 30
*set minskill "5"
*set maxskill "15"
*rand skilldamage {minskill} {maxskill}
*set bandithp - (skilldamage)
*return

*comment ignore for now
*label skill_poison
*set mana - 45
*set poison "true"
*return

EDIT: Argh. I’m an idiot. I accidentally had the HP for the bandit set as a temp value in the other scene file. Whoopsies.

2 Likes