def __init__(self): GOAPAgent.__init__(self) self.data_provider = self self.tile_color = g_vars["Unit"]["Soldier"]["TileColor"] self.image = Surface((g_vars["Game"]["UnitSize"], g_vars["Game"]["UnitSize"])) GameActor.__init__(self) # overrides self.move_factor = 4 # local variables self.position = Position(3, 1) self.home = Position(3, 1) self.backpack = [] self.health = 100 self.hunger = 0 self.social = 10 self.boredom = 25 self.subjects = 2 # flags self.waited_for_food = False # actions self.add_action(EatMeat()) self.add_action(BurnSubject()) self.add_action(SurveyTerritory()) self.add_action(ReturnHome()) self.add_action(WaitForMeat()) self.add_action(HuntForMeat())
def __init__(self): GOAPAgent.__init__(self) self.data_provider = self self.tile_color = g_vars["Unit"]["Explorer"]["TileColor"] self.image = Surface((g_vars["Game"]["UnitSize"], g_vars["Game"]["UnitSize"])) GameActor.__init__(self) # local variables # actions self.add_action(Explore())
def __init__(self): GOAPAgent.__init__(self) self.data_provider = self self.tile_color = g_vars["Unit"]["Artisan"]["TileColor"] self.image = Surface( (g_vars["Game"]["UnitSize"], g_vars["Game"]["UnitSize"])) GameActor.__init__(self) # local variables self.profession = None # actions self.add_action(PickupBuilderJob()) self.add_action(PickupRefinerJob()) self.add_action(PickupMetallurgistJob()) self.add_action(PickupSmithJob())
def __init__(self, dragon): GOAPAgent.__init__(self) self.data_provider = self self.tile_color = g_vars["Unit"]["Worker"]["TileColor"] self.image = Surface( (g_vars["Game"]["UnitSize"], g_vars["Game"]["UnitSize"])) GameActor.__init__(self) # local variables self.dragon = dragon self.position = Position(3, 3) self.backpack = [] # actions self.add_action(FishForDragon()) self.add_action(HuntForDragon()) self.add_action(FeedDragon())
def __init__(self): GOAPAgent.__init__(self) self.data_provider = self self.tile_color = g_vars["Unit"]["Worker"]["TileColor"] self.image = Surface( (g_vars["Game"]["UnitSize"], g_vars["Game"]["UnitSize"])) GameActor.__init__(self) # local variables self.backpack = [] # actions self.add_action(GatherLogs()) self.add_action(GatherOre()) self.add_action(PickupFetchJob()) self.add_action(PickupCollectJob()) self.add_action(PickupUpgradeJob())
def __init__(self): GOAPAgent.__init__(self) self.data_provider = self self.tile_color = g_vars["Structure"]["Base"]["TileColor"] self.image = Surface( (g_vars["Game"]["StructureSize"], g_vars["Game"]["StructureSize"])) GameActor.__init__(self) self.position = Position(0, 0) # local variables self.structure_name = "Base" self.construction_time = 0 self.construction_materials = {} self.is_built = False self.is_worked = False self.has_materials = False self.production_ready = False # production self.inventory = [] self.produce = [] self.production_target = "" self.production_table = {} self.required_artisan = None
def update(self): GOAPAgent.update(self) GameActor.update(self)
def update(self): GOAPAgent.update(self) GameActor.update(self) self.hunger += 2.0 * time.clock.delta self.social += 1.0 * time.clock.delta self.boredom += 3.0 * time.clock.delta