import random

def funprint(text,status):
    #prints text in fun ways for user!
    hallucinating=status.get("hallucinating") #can hallucinate
    hangry=status.get("hangry") #be hangry
    drunk=status.get("drunk") #or be drunk

    if drunk or hangry or hallucinating:
        output=[]
        words=text.split(" ")

        for word in words: #for every word

            if len(word)>3 and hallucinating: #scramble if hallucinating
                word=list(word)
                first=random.randint(0,len(word)-1)
                second=random.randint(0,len(word)-1)

                word[first],word[second]=word[second],word[first]
                word="".join(word)

            if hangry: #turn some to uppercase if we're hangry
                if random.randint(0,10)<5:
                    word=word.upper()

            if drunk!=False: #screw with single letter capitilization and add hiccups when drunk
                if random.randint(0,11)<drunk: #when more drunk, screw up words more
                    word=list(word)
                    indice=random.randint(0,len(word)-1)
                    word[indice]=word[indice].upper()
                    word="".join(word)

                if random.randint(0,100)<drunk:
                    word+=" *hiccup*"
            
            output.append(word)
    
        text=" ".join(output)

    print(text,flush=True)

#status={}
#status["drunk"]=50
#funprint('THIS is a test Longer words Now And is this noticeable enough',status)