-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
skill.py
110 lines (105 loc) · 3.17 KB
/
skill.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
from items import weapon
from elements import Elements
import ability
from ability import EffectType, Effect
from items.weapon import all_types, bladed_types, melee_types
class Skill(ability.Ability):
def __init__(self, _name, _description, _cost, _effects, _activates, _consumes, _weapon_types, _multiplier, _area=0,
_area_modifiable=False):
for eff in _effects:
if eff.type in [EffectType.restore_health, EffectType.restore_stamina, EffectType.restore_mana]:
raise Exception(f'Skill {_name} includes effect with unsupported type {eff.type}')
super().__init__(_name, _description, _cost, _effects, _activates, _consumes, _area, _area_modifiable)
self.weapon_types = _weapon_types
self.multiplier = _multiplier
skills = {
'strike': Skill(
'Strike',
'Strike skill description.',
{'h': 0, 's': 5, 'm': 0},
[Effect(EffectType.damage_health, None)],
[],
[],
all_types,
1.2),
'slash': Skill(
'Slash',
'Slash skill description.',
{'h': 0, 's': 8, 'm': 0},
[
Effect(EffectType.damage_health, None),
Effect(EffectType.debuff, None, _dice_value=4, _stat='health_regen', _status_effect_name='Wounded',
_effect_turns=2)
],
[Elements.earth],
[],
bladed_types,
1.0,
_area=1,
_area_modifiable=True),
'lacerate': Skill(
'Lacerate',
'Slash skill description.',
{'h': 0, 's': 8, 'm': 0},
[
Effect(EffectType.damage_health, None),
Effect(EffectType.bleed, None, _dot_value=1, _effect_turns=2)
],
[],
[],
bladed_types,
0.8,
_area=0,
_area_modifiable=True),
'jinx': Skill(
'Jinx',
'Jinx skill description.',
{'h': 0, 's': 5, 'm': 0},
[
Effect(EffectType.debuff, None, _dice_value=10, _stat='intelligence', _status_effect_name='Stupefied',
_effect_turns=3)
],
[Elements.fire],
[],
[weapon.WeaponType.magic],
1.0,
_area=1,
_area_modifiable=True),
'volley': Skill(
'Volley',
'Volley skill description.',
{'h': 0, 's': 8, 'm': 0},
[Effect(EffectType.damage_health, None)],
[],
[],
[weapon.WeaponType.thrown],
0.8,
_area=2,
_area_modifiable=True),
'barrage': Skill(
'Barrage',
'Barrage skill description.',
{'h': 0, 's': 20, 'm': 0},
[
Effect(EffectType.damage_health, None),
Effect(EffectType.damage_health, None),
Effect(EffectType.damage_health, None)
],
[],
[],
[weapon.WeaponType.thrown],
0.4),
'flurry': Skill(
'Flurry',
'Flurry skill description.',
{'h': 0, 's': 20, 'm': 0},
[
Effect(EffectType.damage_health, None),
Effect(EffectType.damage_health, None),
Effect(EffectType.damage_health, None)
],
[],
[],
[melee_types],
0.4),
}