.@r = min(14,getrefine());
bonus bMatkRate,.@r;
bonus bUnbreakableWeapon;
if (.@r>5) {
   .@bonus1 = 5;
   .@bonus2 = (.@r-5) * 2;
}
if (.@r>8) {
   bonus5 bAutoSpellOnSkill,"WZ_STORMGUST","MG_SAFETYWALL",10,200,1;
   bonus5 bAutoSpellOnSkill,"WZ_METEOR","MG_SAFETYWALL",10,200,1;
   bonus5 bAutoSpellOnSkill,"WZ_VERMILION","MG_SAFETYWALL",10,200,1;
}
bonus2 bMagicAddRace,RC_DemiHuman,15+.@bonus2;
bonus2 bMagicAddRace,RC_Player_Human,15+.@bonus2;
bonus2 bIgnoreMdefRaceRate,RC_DemiHuman,25+.@bonus1+.@bonus2;
bonus2 bIgnoreMdefRaceRate,RC_Player_Human,25+.@bonus1+.@bonus2;