bonus bMatk,100;
bonus bVariableCastrate,-5;
.@r = getrefine();
if (.@r>=2) {
   bonus bMatkRate,.@r/2;
}
if (.@r>=3) {
   bonus bVariableCastrate,.@r/3*-1;
}
if (.@r>=7) {
   bonus bMatk,50;
}
if (.@r>=9) {
   bonus bVariableCastrate,-5;
}