Jump to content

[Python 3.4+] Basic Battle Simulator


MasashiH
 Share

Recommended Posts

I have no clue of where to put this so it's here.

Have been working on this as I kept learning things for object-oriented programming by searching a lot on my own.

--- Basic Battle Simulator ---

Quite the title. Take turns between you and the opponent to defeat the other.

Python required: 3.4 or higher (I think 3.x might work well anyways)

Link: https://www.dropbox.com/s/ta8mw1jybwidrwo/BattleSimulatorVer2.py?dl=0

Available classes (your opponent will be randomized, selecting one of the classes below)

- Soldier (Balanced physical attacker.)

- Mage (Magical Attacker that can debuff enemies. Has a bit less health than the soldier.)

- General (High health, phyiscal damage and defense, but has mediocre hit rate.)

- Swordmaster (Has high hit rate and extra critical strike chance. Rather fragile.)

- Archon ("Straight ripped out of Starcraft LEL". Has insane magic damage and defenses, but has the lowest health from all the classes.)

Skills (case-sensitive, will raise an "unacceptable command" if written as for example Luna)

Universal

bash - Stuns the target for three turns (2 stun turns, 1 recovery turn)

Class-Specific

debuffmres - Mage only. Reduces enemy magic resistance by a percentage.

debuffdef - Mage only. Reduces enemy defence by a percentage.

luna - Soldier, General only. Next attack ignores half of the enemy's defense.

astra - Probably most people's favourite skill in the Fire Emblem series, Swordmaster only. 5 attacks at 75% damage (also for some reason I decided to ignore enemy defense by 20%)

Basic AI is written, but it is based on RNG choosing. (AI will usually attempt to use a skill that is not allowed by its selected class)

Feedback is more than welcome, it will help me for a later project. Feel free to test the game!

Edited by MasashiH
Link to comment
Share on other sites

I suppose the approach of "put it in the most permissive subform" is something I can get behind and admire. However, I don't think this belongs here. I'll do An Exception, and leave this in two places!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...