A command line interface game
- sudo apt mpg123 install
- King (type king when game starts)
- Archer Queen (type queen when game starts)
- W/S/A/D : PCC movement
- : PCC normal attack
- l : PCC levaithan axe attack
- h : health spell
- r : rage spell
- 1/2/3: barbarian spawning
- 4/5/6: Archer spawning
- 7/8/9: balloon spawning
- n : nuke
- q : quit
- Inheritance : done for Class Building : containing townhall, walls, canons, huts and similarly for moving characters
- Polymorphism: barbarians have their own attack function that overrides inherited attack function
- Encapsulation: used a class and object based approach throughout
- Abstractrion: we have different methods within the class just like move() or attack() etc.
-
Spawning Points: have 3 spawning predefined spawning points controlled using keys:- '1', '2', '3'.
-
TownHall: only one townhall placed near centre and has size 4*3
-
Huts: have 5 huts of size 1*1
-
Walls: there are walls which are acting as boundary to protect the village, have size 1*1
-
There are two canons which can shoot within 6-tile range. At a given point the canon targets a single troop and priority is PCC.
-
All buildings have a health attribute and the color of the building depends on the following split:
- Green: 50% to 100% hitpoints
- Yellow: 20%-50% hitpoints
- Red: 0%-20% hitpoints
- A building with 0 hit points is considered destroyed and is not displayed on the screen or targeted by troops.
-
W/S/A/D controls for king
-
is used for normal attack
-
The King attacks a single location with a sword. This location is specified relative to the location of the king, any building present in that location would be damaged by the king’s attack.
-
Attributes:
- Damage/attack_power
- health bar shown at the bottom all the times
- When the health of the king drops to 0, the King would be dead and cannot move or attack anymore.
- Movement Speed: The distance that the king moves in each time step. One adjacent block movement is 1 move/time step
- Attributes:
- Damage/attack_power
- Health and color changes : green, yellow, red
- Once the health of a barbarian drops to 0, they are considered dead and cannot move or attack any longer.
- Movement Speed: The distance that the king moves in each time step. One adjacent block movement is 1 move/time step
- Movement : The barbarians will always try to attack the nearest non-wall building and will always move towards it. The barbarian movement is automated. If there is a wall in its path then the barbarian is expected to first destroy the wall and then move forward.
- Both Rage and Health Spell implemented
- Implemented
- Done, replays getting saved in a seperate replay folder
- Leviathan Axe for king implemented (10)
- Extra features:
-
Nuke weapon : A Nuke gets launched and destroys the townhall (with a sound effect)
-
Score board : A dynamic score board in which barbarians will try to break more walls on way but in an optimistic manner
-
Barbarian count and limit : there is a limit on barbarians that can be deployed
- Movements same as king
- Normal Attack: : hits an Area of 5*5 8 tiles far from it
- hit buildings from a distance
- prioritise hitting defensive buildings
- hits troops with an AoE of 3*3
- game has 3 levels
- hits exactly after 1 second of pressing the special attack button
- hits targets at 16 tiles distance with 9*9 AoE