#Help with code optimization. Simple text based game
41 messages · Page 1 of 1 (latest)
I dont speak French so I might get some stuff wrong but abilitiesDmg only has one value which you use for both abilities which is weird
bool yourTurn is also unused
You also keep track of yourHP but that has no effect on gameplay but maybe you wanna implement that later
learn what a switch statement is next and try to implement
Yea yea i know the first thing but i put arrays because i want to do more damages on the future
yea i created bool yourTurn to try to fix something but i didnt delete it
thats fair
wdym about the last thing
yea i already know that im going to try to implement it thank you
yea i should use it instead of if statements for the character and the abilities selection
I see plr.yourHP = plr.yourHP - plr.abilitiesDmg[0]; but Id expect something to happen when the player lost all his hp
U cant
because u attack first jajajaja
and they all do 50 damage
But ill implement a dead function tomorrow
nice lmao
Thank you so much for all the tips jajajaja
This server is amazing
the ascii art is weird
should it not be like
i put a minecraft sword jajajaja
while (plr.enemyHP > 0 && plr.yourHp > 0)
wdym
for the dead function?
for your main while loop
theres no enemyHP in the main while loop
U mean the while loop in the mainHistory function?
btw is not french jajajaja is spanish
ooh wait
yes ur right but u cant die rn in my game so thats why just enemyhp variable
but ill implement it tomorrow
btw is && the same as ||? @glad vine
no
whats &&