// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
cvtsi2ssl 0x48(%rdi), %xmm0
mulss 0x35c7(%rip), %xmm0     # 0x72ac
cvttss2si %xmm0, %ecx
movl 0x44(%rdi), %eax
subl %ecx, %eax
jl 0x3f68
movq %rdi, %r14
movq %rsi, %rbx
movl %eax, 0x44(%rdi)
callq 0x2050
pushq $0xa
popq %rcx
cltd
idivl %ecx
testl %edx, %edx
je 0x3ea5
movl 0x30(%r14), %esi
movq %rbx, %rdi
callq 0x36ac
leaq 0x380f(%rip), %rsi      # 0x7532
leaq -0x180(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x2c78
leaq 0x8(%r14), %rsi
leaq 0x3572(%rip), %rdx      # 0x72b0
leaq -0x80(%rbp), %rdi
callq 0x39a9
leaq 0x8(%rbx), %r15
leaq -0xa0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movq %r15, %rdx
callq 0x3a41
leaq 0x340b(%rip), %rdx      # 0x7170
leaq -0x40(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x2dbc
movl 0x30(%r14), %esi
leaq -0x140(%rbp), %rdi
callq 0x39e1
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x140(%rbp), %rdx
callq 0x3938
leaq 0x33e1(%rip), %rdx      # 0x7181
leaq -0x160(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2dbc
leaq 0x33a6(%rip), %rdx      # 0x715d
leaq -0xe0(%rbp), %rdi
movq %r15, %rsi
callq 0x39a9
movq %rbx, %rdi
callq 0x3406
leaq -0xc0(%rbp), %rdi
movl %eax, %esi
callq 0x39e1
leaq -0x100(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x3938
leaq 0x335b(%rip), %rdx      # 0x7158
leaq -0x120(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x2dbc
leaq -0x180(%rbp), %rdi
leaq -0x160(%rbp), %rsi
leaq -0x120(%rbp), %rdx
callq 0x4e84
leaq -0x120(%rbp), %rdi
callq 0x22a8
leaq -0x100(%rbp), %rdi
callq 0x22a8
leaq -0xc0(%rbp), %rdi
callq 0x22a8
leaq -0xe0(%rbp), %rdi
callq 0x22a8
leaq -0x160(%rbp), %rdi
callq 0x22a8
leaq -0x60(%rbp), %rdi
callq 0x22a8
leaq -0x140(%rbp), %rdi
callq 0x22a8
leaq -0x40(%rbp), %rdi
callq 0x22a8
leaq -0xa0(%rbp), %rdi
callq 0x22a8
leaq -0x80(%rbp), %rdi
callq 0x22a8
leaq -0x180(%rbp), %rdi
jmp 0x3f63
leaq 0x3686(%rip), %rsi      # 0x7532
leaq -0x1e0(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
callq 0x2c78
addq $0x8, %r14
leaq 0x33e6(%rip), %rdx      # 0x72b0
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x39a9
addq $0x8, %rbx
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq %rbx, %rdx
callq 0x3a41
leaq 0x33dc(%rip), %rdx      # 0x72cd
leaq -0x1c0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2dbc
leaq 0x362a(%rip), %rsi      # 0x7532
leaq -0x1a0(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x2c78
leaq -0x1e0(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
leaq -0x1a0(%rbp), %rdx
callq 0x4e84
leaq -0x1a0(%rbp), %rdi
callq 0x22a8
leaq -0x1c0(%rbp), %rdi
callq 0x22a8
leaq -0x60(%rbp), %rdi
callq 0x22a8
leaq -0x40(%rbp), %rdi
callq 0x22a8
leaq -0x1e0(%rbp), %rdi
callq 0x22a8
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x22a8
jmp 0x3f8a
movq %rax, %rbx
leaq -0x1c0(%rbp), %rdi
callq 0x22a8
jmp 0x3f9b
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x22a8
jmp 0x3fa9
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x22a8
jmp 0x3fb7
movq %rax, %rbx
leaq -0x1e0(%rbp), %rdi
jmp 0x4075
jmp 0x401b
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
callq 0x22a8
jmp 0x3fd9
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
callq 0x22a8
jmp 0x3fea
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x22a8
jmp 0x4023
movq %rax, %rbx
jmp 0x402f
movq %rax, %rbx
jmp 0x403b
movq %rax, %rbx
jmp 0x4044
movq %rax, %rbx
jmp 0x4050
movq %rax, %rbx
jmp 0x4059
movq %rax, %rbx
jmp 0x4065
movq %rax, %rbx
jmp 0x406e
movq %rax, %rbx
jmp 0x407a
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x22a8
leaq -0x160(%rbp), %rdi
callq 0x22a8
leaq -0x60(%rbp), %rdi
callq 0x22a8
leaq -0x140(%rbp), %rdi
callq 0x22a8
leaq -0x40(%rbp), %rdi
callq 0x22a8
leaq -0xa0(%rbp), %rdi
callq 0x22a8
leaq -0x80(%rbp), %rdi
callq 0x22a8
leaq -0x180(%rbp), %rdi
callq 0x22a8
movq %rbx, %rdi
callq 0x2260