.@r = getrefine();
bonus bMatk,(.@r/2)*20;
if (.@r>6) {
   bonus bVariableCastrate,-10;
}
if (.@r>8) {
   bonus2 bMagicAtkEle,Ele_Dark,10;
   bonus2 bMagicAtkEle,Ele_Neutral,10;
}
if (.@r>10) {
   bonus2 bMagicAtkEle,Ele_Water,10;
   bonus2 bMagicAtkEle,Ele_Wind,10;
   bonus2 bMagicAtkEle,Ele_Earth,10;
   bonus2 bMagicAtkEle,Ele_Fire,10;
}
.@val = max(min(.@r-15,5),0);
bonus bFixedCast,-.@val*100;