File size: 505 Bytes
2f63a42
 
 
 
 
 
 
88de31c
2f63a42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from typing import Union, Dict

from base.attribute import Attribute
from base.skill import Skill


class Gain:
    def __init__(self, gain_name="NotImplemented"):
        self.gain_name = gain_name

    def add(self, other):
        pass

    def sub(self, other):
        pass

    def __radd__(self, other: Union[Attribute, Dict[int, Skill]]):
        self.add(other)
        return other

    def __rsub__(self, other: Union[Attribute, Dict[int, Skill]]):
        self.sub(other)
        return other