NotQuiteParadise2

Source code for nqp.world_elements.actions

from nqp.world_elements.hitbox import Hitbox


[docs]class Action:
[docs] def __init__(self, game): self._game = game self.target_type = "free"
[docs] def use(self): pass
[docs]class Fireball(Action):
[docs] def __init__(self, *args): super().__init__(*args) self.type = "fireball" self.target_type = "free" self.damage = 50 self.radius = 30
[docs] def use(self, location): hitbox = Hitbox(self._game.combat.all_entities, "circle", (location, self.radius), self.damage) hitbox.apply()
actions = {"fireball": Fireball}