Update Main.js

delete cap param, new array system with flags, some skills fixes.