I think that
when 'f' {
say "You ran away from the $enemy.name()!"
}
if ($.weapons.exists($_)) {
.attack($enemy, $.weapons{$_});
}
else {
say "Please enter a valid command!"
}
Is much prettier when written as
when 'f' { say "You ran away from the { $enemy.name }!" }
when $.weapons { .attack($enemy, $.weapons{$_}); }
default { say "Please enter a valid command!" }
"when" combined with "if"/"else" just doesn't feel right. It's better style to write %.weapons, by the way. (Why would $.weapons even work? It's not declared!)
Note that my comments are not tested against the reality of Pugs.