예제 #1
0
 def __init__(self):
     super(GameWorld, self).__init__()
     self._rounds = 1
     self._moveable_list = list()
     self._immovable_list = list()
     self._text_object_list = list()
     self._drawable = list()
     self._creature_list = list()
     self._player = None
     self._interface = None
     self.index = 0
     self.image_state = 0
     self.name = "game world"
     self._current_turn = ""
     self.start = False
     self.end_turn_boolean = True
     self.dark = False
     self.tk_end_turn_boolean = tk.BooleanVar
     self.distance = Distance()
     
     # Visitors
     self.attack_move_position_visitor = AttackMovePositionVisitor()
     self.move_position_visitor = MovePositionVisitor()
     
     # Move Position States
     self._attack_move_position = AttackMovePosition()
     self._move_position = MovePosition()
     self._move_position_state = None
예제 #2
0
파일: states.py 프로젝트: UzayAnil/Forager
 def __init__(self):
     super(WorldState, self).__init__()
     self.distance = Distance()
예제 #3
0
    def __init__(self, col, row, name, image, width, height, **kwargs):
        super(Human, self).__init__(**kwargs)
        self._name = name
        self._creature_type = "human"
        self._position_col = col
        self._position_row = row
        self._position = [self.position_col, self.position_row]
        self._possible_move_col = 0
        self._possible_move_row = 0
        self._possible_move = [0, 0]
        self._width = width
        self._height = height
        self._base_speed = 8
        self._speed = 4
        self._hunger_points = 10
        self._experience_points = 200
        self._target = None
        self._prepare_attack = False
        self._prepare_attack_move = False
        self._prepare_move = False
        self.set_sprite(tk.PhotoImage(file=image))

        # Strategies
        self.attack = Stab()
        self.combat_maneuver = Trip()
        self.move = Sneak()
        self.skill = Craft()
        self.posture = Standing()

        # Condition States
        self.normal_state = NormalState(self)
        self.staggered_state = StaggeredState(self)
        self.dead_state = DeadState(self)
        self.unconscious_dying_state = UnconsciousDyingState(self)
        self.unconscious_stable_state = UnconsciousStableState(self)
        self.current_state = NormalState(self)

        # Image States
        self._image_state = StandFront()
        self._stand_front = StandFront()
        self._walk_left_front = WalkLeftFront()
        self._walk_right_front = WalkRightFront()

        # Abilities
        self.strength = 15
        self.dexterity = 15
        self.constitution = 14
        self.intelligence = 10
        self.wisdom = 12

        # Ability Modifiers
        self._str_mod = (self.strength // 2) - 5
        self._dex_mod = (self.dexterity // 2) - 5
        self._con_mod = (self.constitution // 2) - 5
        self._int_mod = (self.intelligence // 2) - 5
        self._wis_mod = (self.wisdom // 2) - 5

        # Combat
        self._base_attack_bonus = 1
        self._armor = 0
        self._dodge = 1
        self._other = 0
        self._vigor_points = 12
        self._wound_points = self.constitution
        self._wound_threshold = self.constitution // 2

        # Skills
        self.acrobatics = 5
        self.craft = 5
        self.perception = 4
        self.stealth = 6
        self.survival = 5

        # Other
        self._standard_action = 1
        self._move_action = 2
        self._action_count = 2
        self.end_turn = tk.BooleanVar()
        self.distance = Distance()
        self.image_list = [
            self.stand_front, self.walk_left_front, self.stand_front,
            self.walk_right_front
        ]
예제 #4
0
    def __init__(self, col, row, name, image, width, height, **kwargs):
        super(Wolf, self).__init__(**kwargs)
        self._position_col = col
        self._position_row = row
        self._position = [self.position_col, self.position_row]
        self._possible_move_col = 0
        self._possible_move_row = 0
        self._possible_move = [0, 0]
        self._width = width
        self._height = height
        self._creature_type = "wolf"
        self._base_speed = 10
        self._speed = 10
        self._hunger_points = 10
        self._experience_points = 400
        self._prepare_attack = False
        self._prepare_attack_move = False
        self._target = None
        self._prepare_move = False
        self._name = name
        self.set_sprite(tk.PhotoImage(file=image))

        # Strategies
        self.attack = Bite()
        self.combat_maneuver = Trip()
        self.move = Walk()
        self.posture = Standing()
        self.skill = Stealth()

        # Condition States
        self.normal_state = NormalState(self)
        self.staggered_state = StaggeredState(self)
        self.dead_state = DeadState(self)
        self.unconscious_dying_state = UnconsciousDyingState(self)
        self.unconscious_stable_state = UnconsciousStableState(self)
        self.current_state = NormalState(self)

        # Abilities
        self.strength = 13
        self.dexterity = 15
        self.constitution = 15
        self.intelligence = 2
        self.wisdom = 12

        # Ability Modifiers
        self._str_mod = (self.strength // 2) - 5
        self._dex_mod = (self.dexterity // 2) - 5
        self._con_mod = (self.constitution // 2) - 5
        self._int_mod = (self.intelligence // 2) - 5
        self._wis_mod = (self.wisdom // 2) - 5

        # Combat
        self._base_attack_bonus = 1
        self._dodge = 0
        self._armor = 2
        self._other = 0
        self._vigor_points = 9
        self._wound_points = self.constitution
        self._wound_threshold = self.constitution // 2

        # Skills
        self.acrobatics_ranks = 0
        self.acrobatics = 2
        self.perception_ranks = 0
        self.perception = 8
        self.stealth_ranks = 0
        self.stealth = 6
        self.survival_ranks = 0
        self.survival = 1

        # Other
        self._standard_action = 1
        self._move_action = 2
        self._action_count = 2
        self.distance = Distance()
        self.max_move = 40
예제 #5
0
    def __init__(self, **kwargs):
        super(Creature, self).__init__(**kwargs)
        self._name = ""
        self._creature_type = ""

        # States
        self.current_state = NormalState(self)
        self.normal_state = NormalState(self)
        self.staggered_state = StaggeredState(self)
        self.unconscious_stable_state = UnconsciousStableState(self)
        self.unconscious_dying_state = UnconsciousDyingState(self)
        self.dead_state = DeadState(self)

        # Behaviors
        self.attack = Attack()
        self.combat_maneuver = CombatManeuver()
        self.move = Move()
        self.posture = Posture()
        self.skill = Skill()

        # Abilities
        self.strength = 10
        self.dexterity = 10
        self.constitution = 10
        self.intelligence = 10
        self.wisdom = 10

        # Ability Modifiers
        self._str_mod = (self.strength // 2) - 5
        self._dex_mod = (self.dexterity // 2) - 5
        self._con_mod = (self.constitution // 2) - 5
        self._int_mod = (self.intelligence // 2) - 5
        self._wis_mod = (self.wisdom // 2) - 5

        # Other
        self._standard_action = 1
        self._move_action = 2
        self._vigor_points = 1
        self._speed = 6
        self._other = 0
        self._armor = 0
        self._base_attack_bonus = 0
        self._dodge = 0
        self._wound_points = self.constitution
        self._wound_threshold = self.constitution // 2
        self._position_col = 0
        self._position_row = 0
        self._position = (0, 0)
        self._possible_move_col = 0
        self._possible_move_row = 0
        self._possible_move = [0, 0]
        self._action_count = 2
        self._inventory = list()
        self._target = None
        self._prepare_attack = False
        self._prepare_attack_move = False
        self._prepare_move = False
        self._hide = False
        self._width = 0
        self._height = 0
        self._lineofsight = 500
        self.distance = Distance()
        self._hidden = list()