Text Fighting (Gladitorial) Sim

I am attempting to create a gladitorial fighting sim. It will be able to
pit two players (computer controlled) and based on stats, weapons, armor
and some randomness will attack, deal damage, dodge and counter attack.
What would be the easiest way to go about doing this. The outcome will
be in a play-by-play format, printed on screen and also saved as a text
document. The players stats will be saved and would earn experience
based on the difficulty of the battle. I appreciate any response.

Very Respectfully,
Wiz

Take a look at Ryan B.'s Ruby Warrior?

http://github.com/ryanb/ruby-warrior

Pier-Luc Caron St-Pierre wrote:

Take a look at Ryan B.'s Ruby Warrior?

http://github.com/ryanb/ruby-warrior

Yeah ive taken a look at that. Not really what im looking for though,
this is more of a simulation, you tell the computer to use these two
gladiators and then it does the simulation on its own, figuring out the
outcome with some randomness added with the skills of the fighter. Then
prints out a play by play to the screen and file name. The play by play
lines would come from the program or a seperate text file based on how
well the attack or dodge was executed.

Garret Dupont wrote:

I am attempting to create a gladitorial fighting sim. It will be able to
pit two players (computer controlled) and based on stats, weapons, armor
and some randomness will attack, deal damage, dodge and counter attack.
What would be the easiest way to go about doing this. The outcome will
be in a play-by-play format, printed on screen and also saved as a text
document. The players stats will be saved and would earn experience
based on the difficulty of the battle. I appreciate any response.

Very Respectfully,
Wiz

You’ll want to use .rand for a certain number and add it as an attack
modifyer… basically adding it in, then subtracting it when you don’t
need it. Or just use a variable for base stats.

Printing on screen is easy,though if it’s like R-warriorwith it’s
showing positions on screen you’ll want to use print and \n for a new
line.

Though for a text doc, you might want to use a Yaml doc and just read it
with notepad or WordPad.

Garret Dupont wrote:

I am attempting to create a gladitorial fighting sim. It will be able to
pit two players (computer controlled) and based on stats, weapons, armor
and some randomness will attack, deal damage, dodge and counter attack.
What would be the easiest way to go about doing this. The outcome will
be in a play-by-play format, printed on screen and also saved as a text
document. The players stats will be saved and would earn experience
based on the difficulty of the battle. I appreciate any response.

Very Respectfully,
Wiz

Sounds like you should take a look at the seventh Ruby P.ming
Challenge For Newbies:
http://rubylearning.com/blog/2010/02/23/rpcfn-broadsides-7/

The submitted server and winning codes may help you.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs