This is the terminal based version of the popular game Clash of Clans built in python3 without using any curses library(like pygame) and using the concept of OOPS. The user gets to select bewteen using a king or a queen. The following are some important commands to know for playing this game :
w
makes the king/queen move upa
makes the king/queen move lefts
makes the king/queen move downd
makes the king/queen move down<space>
makes the king/queen attack. The king/queen destroys any building to its top/bottom/left/rightz
spawns a barbarian in the bottom-left spawning pointx
spawns a balloon in the bottom-left spawning pointc
spawns an archer in the bottom-left spawning pointu
spawns a barbarian in the top-right spawning pointi
spawns a balloon in the top-right spawning pointo
spawns an archer in the top-right spawning pointm
spawns a barbarian in the bottom-right spawning pointn
spawns a balloon in the bottom-right spawning pointb
spawns an archer in the bottom-right spawning pointe
activates Archer Queen's Eagle Arrow attackh
heal spell: increases king's and barbarians' health to 150% of the current health (capped at the maximum health)r
rage spell : doubles damage and movement speed of barbarians and kingq
quits the game
- Huts (H)
- Townhall (T)
- Walls
- Cannons (C)
- Wizard Towers (W)
- Barbarian (B)
- assist the king in battle
- target the nearest building, moving towards it and attack it.
- Archer (A)
- Archers can attack OVER walls and buildings.
- Move similar to barbarians
- Attack from a distance
- Balloon (O)
- aerial troop, i.e. walls and buildings do not affect its movement and certain defensive buildings can’t attack it.
- Only wizard tower can attack it.
There are 3 levels in the game with increasing levels of difficulty as you have to face more number of cannons and wizard towers!
Note: Replay is available for every game you play so that you can be better prepared in your next game! Just run python3 replay.py
and enter the name of the file from replays folder for which you want to see the replay of the game.
Win: All buildings (excluding walls) have been destroyed
Defeat:All troops and the King have died without destroying all buildings
Assumptions
- Manhattan distance has been used to calculate the nearest bulding for the barbarian to attack and also the nearest troop for the cannon to attack
- Rage and heal spells can be used any number of times