22 lines
361 B
Plaintext
Executable File
22 lines
361 B
Plaintext
Executable File
str msg = " damage inflicted!\n";
|
|
nat AT = 14;
|
|
nat accuracy = 150;
|
|
|
|
nat dmg = calc_damage(AT, accuracy);
|
|
|
|
print(dmg as str);
|
|
print(msg);
|
|
halt;
|
|
|
|
function calc_damage(nat at, nat accuracy) nat {
|
|
return at * accuracy / 20 - 3;
|
|
}
|
|
|
|
function print(str string) {
|
|
nat i = 0;
|
|
while (i < string.length) {
|
|
write = string[i];
|
|
i = i + 1;
|
|
}
|
|
}
|