// File: Matteo-Grellier[P]RPG/Mage.cpp
// Function: Mage::fireball(Character&)
void Mage::fireball(Character& other){
    if(!tryUsingMp(this->maxMp*0.10f)){
        return;
    }
    int randomNumber = rand() % 10;
    if(randomNumber == 0){

        Menu::toScreen(
            "",
            this->name + " lance une boule de feu sur " + other.name + " mais trébuche sur un tronc d'arbre et loupe la cible..." ,
            ""
        );
        return;
    }
    other.receiveDamage(this->magicAttack);

    Menu::toScreen(
        "",
        this->name + " lance une boule de feu sur " + other.name + " et lui inflige " + to_string(magicAttack) + " de dégats" ,
        other.name + " est à " + to_string(other.getCurrentHp()) + " pv."
    );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x248(%rbp)
cvtsi2ssl 0x48(%rdi), %xmm0
movss 0x6fc1(%rip), %xmm1     # 0xe28c
mulss %xmm1, %xmm0
cvttss2si %xmm0, %esi
callq 0x7260
testb $0x1, %al
jne 0x72e1
jmp 0x76c5
callq 0x3080
movl $0xa, %ecx
cltd
idivl %ecx
movl %edx, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x74b4
leaq -0x39(%rbp), %rdi
movq %rdi, -0x250(%rbp)
callq 0x33a0
movq -0x250(%rbp), %rdx
leaq 0x71f9(%rip), %rsi      # 0xe512
leaq -0x38(%rbp), %rdi
callq 0x4500
jmp 0x7324
movq -0x248(%rbp), %rsi
addq $0x8, %rsi
leaq 0x6f5a(%rip), %rdx      # 0xe290
leaq -0xb0(%rbp), %rdi
callq 0x66a0
jmp 0x7344
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x6840
jmp 0x7361
leaq 0x6f45(%rip), %rdx      # 0xe2ad
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x4770
jmp 0x737a
leaq -0xd1(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x33a0
movq -0x258(%rbp), %rdx
leaq 0x7177(%rip), %rsi      # 0xe512
leaq -0xd0(%rbp), %rdi
callq 0x4500
jmp 0x73a9
leaq -0x38(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x93f0
jmp 0x73bf
leaq -0xd0(%rbp), %rdi
callq 0x3418
leaq -0xd1(%rbp), %rdi
callq 0x3280
leaq -0x70(%rbp), %rdi
callq 0x3418
leaq -0x90(%rbp), %rdi
callq 0x3418
leaq -0xb0(%rbp), %rdi
callq 0x3418
leaq -0x38(%rbp), %rdi
callq 0x3418
leaq -0x39(%rbp), %rdi
callq 0x3280
jmp 0x76c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x74a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x749d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7491
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7470
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x3418
leaq -0xd1(%rbp), %rdi
callq 0x3280
leaq -0x70(%rbp), %rdi
callq 0x3418
leaq -0x90(%rbp), %rdi
callq 0x3418
leaq -0xb0(%rbp), %rdi
callq 0x3418
leaq -0x38(%rbp), %rdi
callq 0x3418
leaq -0x39(%rbp), %rdi
callq 0x3280
jmp 0x7819
movq -0x248(%rbp), %rax
movq -0x10(%rbp), %rdi
movl 0x30(%rax), %esi
callq 0x6160
leaq -0xf9(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0x33a0
movq -0x260(%rbp), %rdx
leaq 0x702a(%rip), %rsi      # 0xe512
leaq -0xf8(%rbp), %rdi
callq 0x4500
jmp 0x74f6
movq -0x248(%rbp), %rsi
addq $0x8, %rsi
leaq 0x6d88(%rip), %rdx      # 0xe290
leaq -0x1a0(%rbp), %rdi
callq 0x66a0
jmp 0x7516
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
leaq -0x180(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x6840
jmp 0x7533
leaq 0x6c1a(%rip), %rdx      # 0xe154
leaq -0x160(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x4770
jmp 0x754f
movq -0x248(%rbp), %rax
movl 0x30(%rax), %esi
leaq -0x1c0(%rbp), %rdi
callq 0x6720
jmp 0x7567
leaq -0x140(%rbp), %rdi
leaq -0x160(%rbp), %rsi
leaq -0x1c0(%rbp), %rdx
callq 0x65d0
jmp 0x7583
leaq 0x6bdb(%rip), %rdx      # 0xe165
leaq -0x120(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x4770
jmp 0x759f
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
leaq 0x6b93(%rip), %rdx      # 0xe141
leaq -0x220(%rbp), %rdi
callq 0x66a0
jmp 0x75bc
movq -0x10(%rbp), %rdi
callq 0x5da0
movl %eax, -0x264(%rbp)
jmp 0x75cd
movl -0x264(%rbp), %esi
leaq -0x240(%rbp), %rdi
callq 0x6720
jmp 0x75e1
leaq -0x200(%rbp), %rdi
leaq -0x220(%rbp), %rsi
leaq -0x240(%rbp), %rdx
callq 0x65d0
jmp 0x75fd
leaq 0x6b38(%rip), %rdx      # 0xe13c
leaq -0x1e0(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x4770
jmp 0x7619
leaq -0xf8(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x1e0(%rbp), %rdx
callq 0x93f0
jmp 0x7635
leaq -0x1e0(%rbp), %rdi
callq 0x3418
leaq -0x200(%rbp), %rdi
callq 0x3418
leaq -0x240(%rbp), %rdi
callq 0x3418
leaq -0x220(%rbp), %rdi
callq 0x3418
leaq -0x120(%rbp), %rdi
callq 0x3418
leaq -0x140(%rbp), %rdi
callq 0x3418
leaq -0x1c0(%rbp), %rdi
callq 0x3418
leaq -0x160(%rbp), %rdi
callq 0x3418
leaq -0x180(%rbp), %rdi
callq 0x3418
leaq -0x1a0(%rbp), %rdi
callq 0x3418
leaq -0xf8(%rbp), %rdi
callq 0x3418
leaq -0xf9(%rbp), %rdi
callq 0x3280
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x780d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7801
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x77f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x77e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x77dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x77d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x77c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x77b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x77ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x77a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7795
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x3418
leaq -0x200(%rbp), %rdi
callq 0x3418
leaq -0x240(%rbp), %rdi
callq 0x3418
leaq -0x220(%rbp), %rdi
callq 0x3418
leaq -0x120(%rbp), %rdi
callq 0x3418
leaq -0x140(%rbp), %rdi
callq 0x3418
leaq -0x1c0(%rbp), %rdi
callq 0x3418
leaq -0x160(%rbp), %rdi
callq 0x3418
leaq -0x180(%rbp), %rdi
callq 0x3418
leaq -0x1a0(%rbp), %rdi
callq 0x3418
leaq -0xf8(%rbp), %rdi
callq 0x3418
leaq -0xf9(%rbp), %rdi
callq 0x3280
movq -0x48(%rbp), %rdi
callq 0x3390
nopw %cs:(%rax,%rax)