class Hero:
    def __init__(self, monster_hp, hp, damege, area,mana):
        self.monster_hp = monster_hp
        self.hp = hp
        self.damege = damege
        self.area = area
        self.mana = mana 

    def warrior(self):
        self.monster_hp
        self.monster_hp -= self.damege
        self.hp -= 10

    def wizard(self):
        self.monster_hp
        self.monster_hp -= self.area
        self.mana -= 10

    def result(self):
        print(f"몬스터 잔여 체력 {self.monster_hp}. 전사 체력 10 감소.")
        print(f"몬스터 잔여 체력 {self.monster_hp}. 마법사 마나 10 감소.")


attack = Hero(monster_hp = 500, hp=100, damege=50, area=30, mana = 20)

attack.warrior() 
attack.wizard() 
attack.result()

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: