flyinian
Member
I've been trying to create a combat system for the last few days.
I'm also learning about arrays, lists and maps so, it's Abit more challenging.
How difficult would this be?:
First,
When player/enemy attacks, randomly pick between groups 1 - 10. Or more than 1 group.
Then,
Once the group(s) is randomly selected, randomly select sub group(s) of the selected group(s).
After that,
Apply a predetermined amount of damage to the sub group's health.
Lastly,
Update all of the stats of the groups due to change in health.
Groups are the categories.
Sub groups are the units .
Health is the quantity in troops.
I also have to determine if the groups and sub groups have health and if they don't, they have to reroll the random selection of the group/subgroup until it finds one with health to subtract from. If all groups/sub groups have no health, then battle is over...along with various seen and unforseen things.
The hardest for me to do is the random selection and rerolling group selection, due to arrays/lists/maps.
I guess I'm mainly looking for feedback. Or possibly a much easier work around for a beginner.
I'm also learning about arrays, lists and maps so, it's Abit more challenging.
How difficult would this be?:
First,
When player/enemy attacks, randomly pick between groups 1 - 10. Or more than 1 group.
Then,
Once the group(s) is randomly selected, randomly select sub group(s) of the selected group(s).
After that,
Apply a predetermined amount of damage to the sub group's health.
Lastly,
Update all of the stats of the groups due to change in health.
Groups are the categories.
Sub groups are the units .
Health is the quantity in troops.
I also have to determine if the groups and sub groups have health and if they don't, they have to reroll the random selection of the group/subgroup until it finds one with health to subtract from. If all groups/sub groups have no health, then battle is over...along with various seen and unforseen things.
The hardest for me to do is the random selection and rerolling group selection, due to arrays/lists/maps.
I guess I'm mainly looking for feedback. Or possibly a much easier work around for a beginner.