import Random #Hero Classes Class Warrior(Object): Health=150 Strength=11 Defence=11 Magic=7 Class Wizand (Object): Health=127 Strength=9 Defence=8 Magie=12 Class Elf (Object):Health=109 Strength=9 Defence=30 Magic=8 # Enemy Classes Class Goblin (Object): Name=Shadow Health=20 Strength=5 Defence=5 Loot=Random.Randint(0,3) Class Bat (Object):Name= Flying Shadow Health=10 Strength=2 Defence=3 Loot=Random.Randint(0, 3) Class Troll (Object) Name=Fighter Shadow Health=30 Strength=7 Defence=1.5 Loot=Random.randint(0, 2) def heroselect():
what does this mean " We’ve promoted you up a trust level!
We invite you to keep getting involved – we enjoy having you around." so we level up in this thats cool
i don’t think this ‘code is supported by makecode. to me, it doesn’t seem like blocks or javascript or even python. I suggest you ask someone with more experience with javascript than me.
It’s Python, but without all the newlines. I’ll try later today to format everything, since I’m on a phone right now.
I love that so much!! Its SOOO cute!!
Well… That used to happen but when you get the promotion of a trust level person, it means that you have been here for more than a week or something. I don remember though. I thought the MakeCode team took out the levels and stuff.
I only see half the code, but here is it formatted:
import random
# Hero Classes
class Warrior:
Health = 150
Strength = 11
Defence = 11
Magic = 7
class Wizand:
Health = 127
Strength = 9
Defence = 8
Magie = 12
class Elf:
Health = 109
Strength = 9
Defence = 30
Magic = 8
# Enemy Classes
class Goblin:
Name = "Shadow"
Health = 20
Strength = 5
Defence = 5
Loot = random.randint(0,3)
class Bat:
Name = "Flying Shadow"
Health = 10
Strength = 2
Defence = 3
Loot = random.randint(0, 3)
class Troll:
Name = "Fighter Shadow"
Health = 30
Strength = 7
Defence = 1.5
Loot = random.randint(0, 2)
There are several mistakes:
-
classis the correct word, notClass. No capitalization. - Same with
object. It’sobject, notObject. And you don’t need to explicitly say you inherited fromobject. - And for readability, put spaces before and after the equal sign, like this:
health = 100. - You also need
"around your strings, like this:name = "Flying Shadow" - Some colons (
:) were missing. -
Randomis not a standard Python module. You meanrandom? - Related with 6, it’s
random.randint(0, 3), notRandom.Randint(0, 3). - There was a random
defstatement at the end of the code:def heroselect():
https://makecode.com/_9uAEPP5z3L1b can you add a character select and map select plz
if you have time
You have summoned me?
What exactly do you want me to do?
can you add a character select and map select https://arcade.makecode.com/96095-32885-54123-24015
I’m sorry I can’t do the coding for that yet, I’m a bit scared if i ruin the code, however when the code is done, i’ll be able to do art if that’s needed
if you do this add a among us map and a my hero Academia ok then you can pick other maps to put in it




