In this particular case you don't even need a custom accessor. You can create extra constraints on your base type constraint with a where
clause:
class Wizzard {
has Int $.mana is rw where * > 0;
}
But if you did want to create a custom accessor you simply have to define a method with the same name and add the is rw
trait.
method mana is rw {