From: H- 16 Date: 2010-04-12T07:34:55+09:00 Subject: Re: Text Fighting (Gladitorial) Sim 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. -- Posted via http://www.ruby-forum.com/.