USSyorktown10 / STF-Captains-Chair

(dev VERSION - VERY BUGGY) In this game, you will explore the outer reaches of space itself! Push the limits of humanity, and become one of the strongest Captains in the Galaxy!
2 stars 0 forks source link

Battle system outline #4

Closed quantumbagel closed 1 week ago

quantumbagel commented 1 month ago

You need a better battling system.

Here's an outline of what you need in a function for battling (pseudocode)

Try to write code for a function based on this.

USSyorktown10 commented 1 month ago

I am confused on what you mean my calculate damage and calculate opponent dodge. I think that the current battle system is fine, but are you asking me to make a battle simulator that will run the entire thing for you? Also, this is the code i have added so far: `def battle(opponent_health, opponent_name, oppenent_damage, income):

print('You are attacking the ', opponent_name, ' ! This ship has ', opponent_health, ' health, and if you win, you get ', income, '.')

while Health > 0:`

quantumbagel commented 4 weeks ago

for MarkDown, you need three backticks for multiline code

like this

hi

yo

I'm asking you to make a function that handles the battle (which you are doing). I'm just saying that I don't personally like the attack system (what about items you can buy like a missile launch or something different?). You could also make it so it has different opponent strengths - and there doesn't seem to be a tangible reward from actually killing these people.

calculate damage means

You already have this in your code.

let me know if you got any questions

USSyorktown10 commented 4 weeks ago

Ah, I see what you mean now. I just reuse the code, but instead of the variables being case specific to the ship, they are the opponent_health variable. Makes sense now. Also, I did have different strengths, but yes, there is no reward for winning. (currently)

USSyorktown10 commented 4 weeks ago

Alright, I finished the battle function and have committed. Next, I need to integrate it. You look over it and tell me how its looking, give me some suggestions, then once thats fixed, you can show me how to integrate it with the actual battles. (I can already see how this is gonna make things so much easier. If I want to make the game more playable, its much easier to find the code and easier to fix then the current system.)

USSyorktown10 commented 3 weeks ago

Finished the battle function, all of it is functional. If there is anything else you want added to it, just tell me, or I can close the issue if its finnaly done.