Wrote up a draft for the first version of my battle system, looking for critique.

Doinathing

That Guy
Veteran
Joined
Sep 4, 2020
Messages
120
Reaction score
95
First Language
English
Primarily Uses
RMXP
Hi.

So, I wanted to make a unique card battle system, and I decided to write up a draft for how the base of it all should look.
I just wanted to post the draft here and see if there's anything wrong with it. I'd hate to wind up with some in efficient code as the base for my combat.
I'm going to program the whole thing using Common Events, because scripts terrify me.

Here's the draft.

Pre-Battle
set variable for enemy to 0(or whatever)
move to battle map, display player image.
check variable for enemy
if 0, set variable for enemy HP to 100

show image for enemy0
set variable for card number to 0

Card Choosing

check variable for card number
if >3, go to label for turn start
else, continue

randomize variable for card type, (0-6)
if 0, go to label for defensive cards
if 1-2, go to label for passive cards
if 3-5, go to label for aggressive cards

AGR Cards

randomize variable for card (0-14)


)REPEAT THESE STEPS FOR ALL 15 CARDS(

if 0, check for card number variable

if 0, display image for acard0 on the left
set variable for card 1 to card variable

if 1, display image for acard0 in the middle
set variable for card 2 to card variable

if 2, display image for acard0 on the right
set variable for card 3 to card variable
)-------------------------------------------(

add 1 to variable for card number
go to label for card choosing

PAS Cards

randomize variable for card (15-29)


)REPEAT THESE STEPS FOR ALL 15 CARDS(

if 0, check for card number variable

if 0, display image for pcard0 on the left
set variable for card 1 to card variable

if 1, display image for pcard0 in the middle
set variable for card 2 to card variable

if 2, display image for pcard0 on the right
set variable for card 3 to card variable
)-------------------------------------------(

add 1 to variable for card number
go to label for card choosing

DEF Cards

randomize variable for card (30-44)


)REPEAT THESE STEPS FOR ALL 5 CARDS(

if 31, check for card number variable

if 0, display image for dcard0 on the left
set variable for card 1 to card variable

if 1, display image for dcard0 in the middle
set variable for card 2 to card variable

if 2, display image for dcard0 on the right
set variable for card 3 to card variable
)-------------------------------------------(

add 1 to variable for card number
go to label for card choosing

Turn Start

show text: First Card?
show choices
>card 1
change variable for first card to 0

>card 2
change variable for first card to 1

>card 3
change variable for first card to 2


show text: Second Card?
show choices
>card 1
change variable for second card to 0

>card 2
change variable for second card to 1

>card 3
change variable for second card to 2

erase all card images

comment: this is where the turn happens


check variable for card 1

------------------------------------------------------------------
if 0, check variable for enemy hp
multiply variable for enemy hp by 4, divide by 10 put into enemy damage variable
subtract enemy damage variable from enemy hp
show text, [ENEMY] took [ENEMY DAMAGE VARIABLE] damage.
--------------------------------------------------------------------
if 15, randomize variable for misc cards, (0-9)

if between 0 and 3, set variable for instant karma to 1
else, do nothing.
--------------------------------------------------------------------
if 30, randomize variable for misc cards, (0-9)

if between 0 and 5, set variable for negate damage to 1
else, do nothing
-----------------------------------------------

check variable for card 2, repeat above steps.

if enemy health is less than 10, show text: you won! fade to player coords on starting map using x and y variables
else, continue



Enemy Turn

check variable for instant karma
if 1,

check negate damage, if 1, jump to label for enemy turn end

subtract 1 from variable for Mist's health.
if less than 1, transfer to death map

else, continue

check variable for instant karma
if 1, check variable for enemy hp
multiply variable for enemy hp by 7, divide by 10 put into enemy damage variable
show text, [ENEMY] received [ENEMY DAMAGE VARIABLE] HP of karma.

else, continue

go to label for card picking

Any advice is appreciated. Thank you!

Edit: Wait, should this be in game ideas and prototypes?

Edit 2: yeah, I tried putting the code in, and it's got a few oversights. Mostly forgot to reset variables

edit 3: this is all broken and inefficient. just for 35 cards is gonna be a nightmare to navigate, there's gotta be a better way

Edit 4: Okay! I got a very basic version of this system working! Here's each part to the new code.

1610493843313.png
1610493892680.png1610493912638.png1610493942495.png1610493963797.png
1610494022390.png1610494044872.png
1610494097773.png
1610494119457.png
1610494178025.png1610494197725.png1610494235505.png1610494279760.png1610494300525.png1610494316723.png
1610494355491.png1610494367269.png

All of this is a work in progress, but I still wanted to show it off and see what the more professional RMXP users think.
 
Last edited:

Doinathing

That Guy
Veteran
Joined
Sep 4, 2020
Messages
120
Reaction score
95
First Language
English
Primarily Uses
RMXP
This post has been updated.
 

Latest Threads

Latest Posts

Latest Profile Posts

cdjensen94 wrote on Kaliya's profile.
Are you the one who develops Kaliya's Visual Map Enhancements. If so I desperately need some help. I bought the plugin back a few months. I've only started using it recently.
Cause MP Damage instead of HP, Localization Plugin for Translation | RPG Maker News #112

Here in Fla were are seeing crazy covid spikes and some vaccinated getting bad infections. I had a mild fever on Thurs but it went down fast. How is everyone else doing. Hopefully you are all well. :)
Wish I was better at art, specifically that I was faster at it, bc this one NPC took Several Days to complete! It's gonna take So Extremely Long to do all of the art for my game, never mind writing it... Anyways, here's my gorgon, Hopernica Sthyxis!

57b88732c7abbcd84981dacf624a98495af61fcc.gifv
Idk if this is my ADHD or if it's a common problem. But I cant stay motivated for anything. I want to work on so many different things at once. Game dev, skateboarding, ranking up in League, playing OSRS, fitness, nutrition, relationships. It's like, where do I even begin?

Forum statistics

Threads
113,822
Messages
1,077,713
Members
147,879
Latest member
TassieBoamiia
Top