// File: XxAdi101xX[P]ChamberCrawler/Character/Character.cc
// Function: Character::getInfo() const
Info Character::getInfo() const {
	Info characterInfo;

	// sets fields with proper info
	characterInfo.race = this->getRace();
	characterInfo.gold = this->wallet;
	characterInfo.HP = this->getHP();
	characterInfo.attackValue = this->getTotalAttack();
	characterInfo.defenceValue = this->getTotalDefence();

	characterInfo.coordinates = (this->currentCell)->getCoords();

	if (this->getRace() == Race::Dragon) {
		characterInfo.displayChar = CHAR_DRAGON;
	}

	else if (this->getRace() == Race::Drow) {
		characterInfo.displayChar = CHAR_DROW;
	}

    else if (this->getRace() == Race::Dwarf) {
        characterInfo.displayChar = CHAR_DWARF;
    }

    else if (this->getRace() == Race::Elf) {
        characterInfo.displayChar = CHAR_ELF;
    }

    else if (this->getRace() == Race::Goblin) {
        characterInfo.displayChar = CHAR_GOBLIN;
    }

    else if (this->getRace() == Race::Halfling) {
        characterInfo.displayChar = CHAR_HALFLING;
    }

    else if (this->getRace() == Race::Human) {
        characterInfo.displayChar = CHAR_HUMAN;
    }

    else if (this->getRace() == Race::Merchant) {
        characterInfo.displayChar = CHAR_MERCHANT;
    }

    else if (this->getRace() == Race::Orc) {
        characterInfo.displayChar = CHAR_ORC;
    }

    else if (this->getRace() == Race::Shade) {
        characterInfo.displayChar = CHAR_SHADE;
    }

    else if (this->getRace() == Race::Troll) {
        characterInfo.displayChar = CHAR_TROLL;
    }
    
	else if (this->getRace() == Race::Vampire) {
        characterInfo.displayChar = CHAR_VAMPIRE;
    }

    else {
        characterInfo.displayChar = CHAR_PLAYER;
    }

	characterInfo.lastAction = this->lastAction;

	return characterInfo;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x2db80
movq -0x58(%rbp), %rdi
callq 0x31240
movq -0x58(%rbp), %rdi
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
movl 0x60(%rdi), %ecx
movl %ecx, 0x4(%rax)
callq 0x2eb40
movq -0x58(%rbp), %rdi
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x8(%rax)
callq 0x30130
movl %eax, -0x44(%rbp)
jmp 0x31313
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rax
movl -0x44(%rbp), %ecx
movl %ecx, 0xc(%rax)
callq 0x30160
movl %eax, -0x64(%rbp)
jmp 0x3132b
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rax
movl -0x64(%rbp), %ecx
movl %ecx, 0x10(%rax)
addq $0x50, %rdi
callq 0x19df0
movq %rax, %rsi
leaq -0x40(%rbp), %rdi
callq 0x2cbb0
jmp 0x31350
movq -0x50(%rbp), %rdi
addq $0x18, %rdi
leaq -0x40(%rbp), %rsi
callq 0x19610
leaq -0x40(%rbp), %rdi
callq 0x19640
movq -0x58(%rbp), %rdi
callq 0x31240
cmpl $0xa, %eax
jne 0x3139f
movq -0x50(%rbp), %rax
movb $0x44, 0x30(%rax)
jmp 0x314d7
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x1a1b0
jmp 0x3150b
movq -0x58(%rbp), %rdi
callq 0x31240
cmpl $0x1, %eax
jne 0x313ba
movq -0x50(%rbp), %rax
movb $0x52, 0x30(%rax)
jmp 0x314d5
movq -0x58(%rbp), %rdi
callq 0x31240
cmpl $0x6, %eax
jne 0x313d5
movq -0x50(%rbp), %rax
movb $0x57, 0x30(%rax)
jmp 0x314d3
movq -0x58(%rbp), %rdi
callq 0x31240
cmpl $0x7, %eax
jne 0x313f0
movq -0x50(%rbp), %rax
movb $0x45, 0x30(%rax)
jmp 0x314d1
movq -0x58(%rbp), %rdi
callq 0x31240
cmpl $0x4, %eax
jne 0x3140b
movq -0x50(%rbp), %rax
movb $0x42, 0x30(%rax)
jmp 0x314cf
movq -0x58(%rbp), %rdi
callq 0x31240
cmpl $0xb, %eax
jne 0x31426
movq -0x50(%rbp), %rax
movb $0x4c, 0x30(%rax)
jmp 0x314cd
movq -0x58(%rbp), %rdi
callq 0x31240
cmpl $0x5, %eax
jne 0x31441
movq -0x50(%rbp), %rax
movb $0x48, 0x30(%rax)
jmp 0x314cb
movq -0x58(%rbp), %rdi
callq 0x31240
cmpl $0x9, %eax
jne 0x31459
movq -0x50(%rbp), %rax
movb $0x4d, 0x30(%rax)
jmp 0x314c9
movq -0x58(%rbp), %rdi
callq 0x31240
cmpl $0x8, %eax
jne 0x31471
movq -0x50(%rbp), %rax
movb $0x4f, 0x30(%rax)
jmp 0x314c7
movq -0x58(%rbp), %rdi
callq 0x31240
cmpl $0x0, %eax
jne 0x31489
movq -0x50(%rbp), %rax
movb $0x53, 0x30(%rax)
jmp 0x314c5
movq -0x58(%rbp), %rdi
callq 0x31240
cmpl $0x3, %eax
jne 0x314a1
movq -0x50(%rbp), %rax
movb $0x54, 0x30(%rax)
jmp 0x314c3
movq -0x58(%rbp), %rdi
callq 0x31240
cmpl $0x2, %eax
jne 0x314b9
movq -0x50(%rbp), %rax
movb $0x56, 0x30(%rax)
jmp 0x314c1
movq -0x50(%rbp), %rax
movb $0x40, 0x30(%rax)
jmp 0x314c3
jmp 0x314c5
jmp 0x314c7
jmp 0x314c9
jmp 0x314cb
jmp 0x314cd
jmp 0x314cf
jmp 0x314d1
jmp 0x314d3
jmp 0x314d5
jmp 0x314d7
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
addq $0x68, %rsi
addq $0x38, %rdi
callq 0x6050
jmp 0x314ee
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x31501
movq -0x50(%rbp), %rdi
callq 0x1a1b0
movq -0x60(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x6550
nopw %cs:(%rax,%rax)
nop