Code: Select all
label enemy_turn:
if enemy_health > 0:
if enemy_type == "Slime":
$ d6 = renpy.random.randint(1,6)
if d6 == 5 or 6:
$ d6 = renpy.random.randint(2,6)
"The Slime's acid burns you."
label enemydone:
$ enemy_attack = d6
$ health -= enemy_attack
"It does %(enemy_attack)s damage."
call yourturn
elif d6 == 2:
"The slime misses it's attack"
else:
"The Slime lunges with its teeth"
$ d6 = renpy.random.randint(1,4)
jump enemydone
elif enemy_type == "RatCat":
$ d6 = renpy.random.randint(1,6)
if d6 == 5 or 6:
"The ratcat's teeth sink into you."
$ d6 = renpy.random.randint(3,7)
jump enemydone
elif d6 == 2 or 3:
"The Ratcat misses it's attack"
else:
$ d6 = renpy.random.randint(2,4)
"The ratcat swipes with its claws"
jump enemydone
elif enemy_type == "Rock Crab":
$ d6 = renpy.random.randint(1,6)
if d6 == 5 or 6:
"The rock crab bodyslams you."
$ d6 = renpy.random.randint(6,7)
jump enemydone
elif d6 == 2 or 3:
"The rock crab misses it's attack"
else:
$ d6 = renpy.random.randint(4,5)
"The rock crab pinches you."
jump enemydone
else:
"The foe was vanished."
call area_after