Can someone help me to update this code in desert dual pls

hero.summon("big", 0)"hot", 0)"boost", 0)"goliath", 0)

et1 = hero.findTheirPlayers(1)
et0 = hero.findTheirPlayers(0)
et2 = hero.findTheirPlayers(2)

def quicksand():
    et1 = hero.findTheirPlayers(1)
    et0 = hero.findTheirPlayers(0)
    et2 = hero.findTheirPlayers(2)
    if hero.isReady("quicksand"):
        if len(et1) >= 2: 
  "quicksand", 1) 
            if hero.isReady("press"): 
      "press", 2)
        elif len(et2) >= 2:
  "quicksand", 2) 
            if hero.isReady("press"): 
      "press", 1)
        elif len(et0) >= 2:
  "quicksand", 0)

while True:
    if et0:
        hero.summon("big", 0) 
        hero.summon("threat", 0)  
        hero.summon("driver", 0)"hot", 0)"boost", 0)
    if et1:
        hero.summon("big", 1) 
        hero.summon("threat", 1)
        hero.summon("driver", 1)"boost", 1)"goliath", 1)
    if et2:
        hero.summon("big", 2)
        hero.summon("threat", 2) 
        hero.summon("big", 2)"goliath", 2)"boost", 2)
    if et0 and hero.isReady("hot") and hero.isReady("boost"):
        hero.summon("big", 0)"hot", 0)"boost", 0)
    if et1 and hero.isReady("boost") and hero.isReady("goliath"):
        hero.summon("big", 1)"boost", 1)"goliath", 1)
    if et2 and hero.isReady("goliath") and hero.isReady("boost"):
        hero.summon("big", 2)"boost", 2)"goliath", 2)

Hi @Xuan_Nguyen_Nguy_n! Welcome to the Discourse! :partying_face: This is a fun place to share your ideas, chat with some amazing people, and ask for help on CodeCombat levels. If you haven’t already, take a look at the new users’ guide. We hope you enjoy your time here! :tada:

Could you please format your code correctly to make it easier for us to help you?

1 Like

here is my code if you want to look at it only 1 rules
1 do not copy it

my code. do not copy!

# this fuction checks two lanes and sees which one has more enemys and plays quicksand
def findAndKill(target1,target2):
    if hero.isReady("quicksand"):
        if hero.findTheirPlayers(targerget2) > hero.findTheirPlayers(targerget1):
  "quicksand", target1)
  "quicksand", target2)
# this fuction sends troops to a specifid lane and bufs them up
def attack(target):
    hero.summon("big", target)   
    hero.summon("charger", target)
    hero.summon("driver", target)    
    hero.summon("sniper", target)
    hero.summon("threat", target)
    if hero.isReady("goliath"):"goliath", target)
    if hero.isReady("boost"):"boost",target )
    if hero.isReady("hot"):"hot",target )
lastAttacket = 1
# this the main while true loop
while True:
    # this section checks how many enemys are in the top and bottom lanes and stores them in a variable
    e1 = hero.findTheirPlayers(1)
    e2 = hero.findTheirPlayers(2)
    # this if statment checks if e1 is less than e2 and runs the code inside
    if e1 < e2:
        # this variable stores which lane we are targeting
        attacking = 1
        # this checks if you last atacked the oposing lane and if so then it plays switch it also tells the code wether to run the findAndKill fuction
        if lastAttacket == 2 and hero.isReady("switch"):
            quicksand = 1
            quicksand = 0
        #this code checks if it should use the findAndKill fuction
        if quicksand == 1:
        lastAttacket = 1
        thing = 2
    # this if statment is a mirror of the last code but for the oposing lane
    if e2 < e1:
        attacking = 2
        if lastAttacket == 1 and hero.isReady("switch"):
            quicksand = 1
            quicksand = 0
        if quicksand == 1 and hero.findTheirPlayers(1) > 0:
        lastAttacket = 2
        thing = 1
    # this code is used in the event that both have the same amount of enemys
    if e2 == e1:
1 Like