-
Notifications
You must be signed in to change notification settings - Fork 0
/
bolt.py
30 lines (25 loc) · 1.09 KB
/
bolt.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import spell
""" Bolt class is the archetype of all bolt spells, such as ForceBolt, FireBolt, etc"""
class Bolt(spell.Spell):
def __init__(self, base_type, base_potential, base_mana = 10):
super().__init__(base_mana)
""" Setting up base cost of bolt """
self.speed = 1
self.magic_potential = 1
self.type = "null"
self.force = 0
self.target = None # TODO: Add the ability to target other objects
self.field = None # TODO: Create a field object
""" calculates damage based off of magic potential, force, and type"""
def _calculate_damage(self):
return self.force * self.magic_potential
""" Bolt Travels calls upon the field class to update its location"""
def bolt_travel(self):
self.field.bolt_travel(self.speed)
def bolt_hit(self):
effect = self.effect()
return (self._calculate_damage(), effect)
""" Effect is a method that you pass to the target hit by the bolt, it determines effects
beyond just damage, such as setting aflame, or freezing."""
def effect(target):
pass