• Advertisement
Sign in to follow this  
  • entries
    122
  • comments
    121
  • views
    68557

Updates

Sign in to follow this  

86 views

First of all, thanks to Programmer16 for his suggestion that I let getKey() take the keys as a parameter instead of just reading the string off of cConsole. I might as well get rid of the 'keys' string now since it's redundant. Thanks P16!

The character creation stuff is nearly done, just have to add in the formula for getting the health of the player. I experimented with making a console.conArt() function that would take some collection of hexadecimal color codes (like how I use output()), a length, a width, and a point in the buffer to start outputting the semi-ASCII art. Well, it was far too difficult to code, so I'm dropping that idea.

After I finish with removing 'keys' and adding the health formula in character creation, I'm moving on to the store. I'll probably have to add "int armor" and "int weapon[3]"; into the cChar class (what I use to hold the player's data). 'armor' basically holds an integer which "means" some unique defence bonus. 'weapon' holds three values: the attack bonus of the weapon, the battle roll(s) needed to count a critical strike, and the critical strike modifier (2 or 3), which means how many more times the attack hits to count for the crit.

Oi. I think I might just make a class "armor" and a class "weapon" to hold these values, then do "player.armor = new armor" or something like that. Seems a bit easier on the brain.

Comments welcome. :)
Sign in to follow this  


1 Comment


Recommended Comments

Quote:
Original post by linkofazeroth
First of all, thanks to Programmer16 for his suggestion that I let getKey() take the keys as a parameter instead of just reading the string off of cConsole. I might as well get rid of the 'keys' string now since it's redundant. Thanks P16!

No problem, glad I could help[smile].

Quote:
The character creation stuff is nearly done, just have to add in the formula for getting the health of the player. I experimented with making a console.conArt() function that would take some collection of hexadecimal color codes (like how I use output()), a length, a width, and a point in the buffer to start outputting the semi-ASCII art. Well, it was far too difficult to code, so I'm dropping that idea.

After I finish with removing 'keys' and adding the health formula in character creation, I'm moving on to the store. I'll probably have to add "int armor" and "int weapon[3]"; into the cChar class (what I use to hold the player's data). 'armor' basically holds an integer which "means" some unique defence bonus. 'weapon' holds three values: the attack bonus of the weapon, the battle roll(s) needed to count a critical strike, and the critical strike modifier (2 or 3), which means how many more times the attack hits to count for the crit.

Oi. I think I might just make a class "armor" and a class "weapon" to hold these values, then do "player.armor = new armor" or something like that. Seems a bit easier on the brain.

Comments welcome. :)

An armor and weapon class would be preferred IMHO. It would allow you to extend if needed and would be a lot easier. It's also a lot cleaner IMHO.

Good luck!

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement