- Sep 30, 2021
- 50
- 66
label start
screen and label fight
so, when i choose for "kick" , the damage income always 3 but if i choose "punch" the damage income always 4
my question here how can kick damage just 3 even strength mc default is 4
thanks for your help
or maybe someone can make it simple i'll be grateful
and i want to add block and counter att but i dont really know how to do that
maybe just simple att like this is enough
Code:
init:
$ import random
default mc_strength = 4
default dad_strength = 3
label start:
label fight_dad:
$ mc_max_hp = 10
$ mc_hp = mc_max_hp
$ mc_att = mc_strength
$ enemy_max_hp = 10
$ enemy_hp = enemy_max_hp
$ dad_att = dad_strength
show screen hp_mc_vs_dad
while mc_hp > 0 and enemy_hp > 0:
#call dice_roll
call position_dad
Code:
screen hp_mc_vs_dad:
vbox:
#spacing 1
xalign 0.1
yalign 0.0
xmaximum 600
text "MC" #[male_character], this is for MC
bar value mc_hp range mc_max_hp style "hp_mc"
vbox:
#spacing 1
xalign 0.9
yalign 0.0
xmaximum 600
text "Skeleton"# this is for enemy
bar value enemy_hp range enemy_max_hp style "hp_enemy"
label position_dad:
$ renpy.block_rollback()
$ fight1 = renpy.random.choice(['og', 'of', 'ob'])
if fight1 == 'og':
show fight_tutorial 1
menu:
"punch":
if mc_att >= dad_att:
$ mc_att = mc_strength
$ enemy_hp -= mc_att
"not bad [mc_att]"
elif mc_att <= dad_att:
$ dad_att = dad_strength
$ mc_hp -= dad_att
"stupid [dad_att] damage"
"kick":
if mc_att >= dad_att:
$ mc_att = mc_strength
$ enemy_hp -= mc_att
"stupid fuck [dad_att] damage"
elif mc_att <= dad_att:
$ dad_att = dad_strength
$ mc_hp -= dad_att
" fuck [dad_att] damage"
elif fight1 == 'of':
"try"
elif fight1 == 'ob':
"example"
if enemy_hp <= 0:
#call camera_knight_win
"You win the combat encounter!"
jump start
return
my question here how can kick damage just 3 even strength mc default is 4
thanks for your help
or maybe someone can make it simple i'll be grateful
and i want to add block and counter att but i dont really know how to do that
maybe just simple att like this is enough
Last edited: