Beispiel #1
0
    def __init__(self):
        self.intelligence = 10 # currently not used
        self.strength = 10 # used to determine how much damage the player should deal
        self.toughness = 10 # used to determine how much health the player should have
        self.inventory = [] # inventory
        self.hp = 5*self.toughness # current amount of health player has
        self.location_x, self.location_y = world.starting_position # player's position
        self.victory = False

        self.blunt_res = f.randomF(0.025,0.25,3) # how much blunt damage the player can absorb
        self.sharp_res = f.randomF(0,0.1,2) # how much sharpess damage the player can absorb
        self.ex_res = f.randomF(-0.5,-0.25,2)  # how much explotion damage the player can absorb
Beispiel #2
0
 def __init__(self, inv=[[items.Sword, (), {}]]):
     super().__init__(name="Brute",
                      hp=52,
                      damage=f.random(5, 11),
                      sharp=0,
                      blunt=1,
                      ex=0,
                      ex_chance=0,
                      ex_health=0,
                      shr=f.randomF(0.01, 0.02, 3),
                      blr=f.randomF(0.025, 0.05, 3),
                      exr=f.randomF(-0.55, -0.45, 2),
                      inv=inv)
Beispiel #3
0
 def __init__(self):
     self.sharp = f.randomF(0.25, 0.75)
     super().__init__(name="Red Powder Cow",
                      hp=60,
                      damage=5,
                      sharp=self.sharp,
                      blunt=1 - self.sharp,
                      ex=f.random(10, 20),
                      ex_chance=f.randomF(0.125, 0.25, 3),
                      ex_health=40,
                      shr=f.randomF(0.005, 0.015, 3),
                      blr=f.randomF(0.045, 0.055, 3),
                      exr=f.randomF(-0.5, -1.5, 1),
                      inv=[])
Beispiel #4
0
 def __init__(self):
     self.sharp = f.randomF(0.9, 1.0, 2)
     super().__init__(name="Sword",
                      description="A good sword.",
                      value=5,
                      damage=f.random(19, 22),
                      sharp=self.sharp,
                      blunt=1.0 - self.sharp,
                      explotion=0)
Beispiel #5
0
 def __init__(self):
     self.sharp = f.randomF(0.0, 0.2, 2)
     super().__init__(
         name="Rock",
         description="A fist-sized rock, suitable for bludgeoning.",
         value=0,
         damage=f.random(4, 6),
         sharp=self.sharp,
         blunt=1.0 - self.sharp,
         explotion=0)
Beispiel #6
0
 def __init__(self):
     self.sharp = f.randomF(0.6, 0.99, 2)
     super().__init__(
         name="Dagger",
         description=
         "A small dagger with some rust. Somewhat more dangerous than a rock.",
         value=5,
         damage=f.random(8, 11),
         sharp=self.sharp,
         blunt=1.0 - self.sharp,
         explotion=0)
Beispiel #7
0
 def __init__(self, x, y, items=[[items.Dagger, (), {}], [items.Diamond, (round(w(), 3), False), {}], [items.SilverCoin, (f.random(25,75),), {}], [items.GoldCoin, (f.randomF(0.5, 2.0),), {}]], looted = False):
     super().__init__(x, y, items, looted)
Beispiel #8
0
 def w():
     w = f.randomWeight([0,5,2.5,1.5,1])
     minw = 0.005/4
     maxw = 0.025/4
     return f.randomF(minw, maxw) * w