Commit 9f9bc397 authored by nschroeder1771's avatar nschroeder1771
Browse files

Added a second thrower type with basically no implementation yet.

parent 1c49f827
......@@ -114,7 +114,7 @@ class UnitType(Enum):
class Insect(object):
......@@ -283,11 +283,20 @@ class Harvester(Ant):
class SuperHarvester(Harvester):
A Super Harvester produces more food per turn than a Harvester for the colony.
def __init__(self, unit_type, food_cost, health, production):
Create a Super Harvester with the given type, cost, health and per-turn food production.
super().__init__(unit_type, food_cost, health, production)
def act(self, game_state):
A Super Harvest produces more food than a Harvest for the colony.
super().act(self, game_state)
......@@ -440,6 +449,23 @@ class Thrower(Ant):
class NinjaThrower(Thrower):
A Ninja Thrower throws a leaf each turn at the nearest Bee in its range. This thrower kills any bee with one shot.
def __init__(self, unit_type, food_cost, health, damage, ammo, minimum_range=0, maximum_range=0):
Create a Thrower with the given type, cost, health, and damage.
A Thrower can only target bees at distances between its minimum range and maximum range, inclusive. A range of
0 corresponds to the Place the Ant is in, a range of 1 corresponds to all places leading to there, etc.
Furthermore, Throwers can only target bees in the colony; they cannot, for instance, target bees still in the
super().__init__(unit_type, food_cost, health, damage, ammo, minimum_range, maximum_range)
class GameOutcome(Enum):
A GameOutcome represents whether a game should continue or not and, if not,
......@@ -546,7 +572,8 @@ class GameState(object):
Harvester(UnitType.HARVESTER, food_cost=3, health=1, production=1),
Thrower(UnitType.THROWER, food_cost=7, health=1, damage=1, ammo=4, minimum_range=0, maximum_range=2),
SuperHarvester(UnitType.SUPER_HARVESTER, food_cost=5, health=1, production=2)
SuperHarvester(UnitType.SUPER_HARVESTER, food_cost=5, health=1, production=2),
NinjaThrower(UnitType.NINJA_THROWER, food_cost=10, health=1, damage=2, ammo=4, minimum_range=0, maximum_range=2)
......@@ -112,10 +112,12 @@ class Game(BoxLayout):
ants_vs_some_bees.UnitType.BEE: 'assets/bee.gif',
ants_vs_some_bees.UnitType.HARVESTER: 'assets/ant_harvester.gif',
ants_vs_some_bees.UnitType.THROWER: 'assets/ant_medium.gif',
ants_vs_some_bees.UnitType.SUPER_HARVESTER: 'assets/ant_fire.gif'
ants_vs_some_bees.UnitType.SUPER_HARVESTER: 'assets/ant_fire.gif',
ants_vs_some_bees.UnitType.NINJA_THROWER: 'assets/ant_ninja.gif',
ants_vs_some_bees.UnitType.THROWER: 'assets/leaf_green.gif',
ants_vs_some_bees.UnitType.NINJA_THROWER: 'assets/leaf_silver.gif'
QUEEN_SPRITE_FILENAME = 'assets/ant_queen.gif'
PLACE_SPRITE_FILENAME = 'assets/place.gif'
#:import Game main.Game
#:import UnitType ants_vs_some_bees.UnitType
#:set UNIT_NAMES {UnitType.HARVESTER: 'Harvester Ant', UnitType.THROWER: 'Leaf Thrower', UnitType.SUPER_HARVESTER: 'Super Harvester Ant'}
#:set UNIT_NAMES {UnitType.HARVESTER: 'Harvester Ant', UnitType.THROWER: 'Leaf Thrower', UnitType.SUPER_HARVESTER: 'Super Harvester Ant', UnitType.NINJA_THROWER: 'Ninja Thrower'}
......@@ -101,6 +101,9 @@ ScreenManager:
source: 'assets/ant_fire.gif'
text: 'A super harvester ant costs 5 food units to deploy, but produces 2 units of food per turn.'
source: 'assets/ant_ninja.gif'
text: 'A ninja thrower ant costs 10 food units to deploy and dies after throwing four leaves. It will only throw leaves outward, away from the queen. However, each leaf does twice the damage of a leaf thrower.'
text: 'To sacrifice an ant, which can be useful if you need space for new deployments, select the sacrifice tool and tap on the ant you want to sacrifice.'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment