update get info

This commit is contained in:
bridge
2025-10-12 01:40:36 +08:00
parent 29c60febaf
commit 42dc91aec7
14 changed files with 140 additions and 47 deletions

View File

@@ -21,6 +21,12 @@ class MagicStone(int):
_upper, _middle, _value = self.exchange()
return f"上品灵石:{_upper},中品灵石:{_middle},下品灵石:{_value}"
def get_info(self) -> str:
return str(self)
def get_detailed_info(self) -> str:
return str(self)
def __add__(self, other: Union['MagicStone', int]) -> 'MagicStone':
if isinstance(other, int):
return MagicStone(self.value + other)