Screeps Wiki
Advertisement

function () {

   if (!this.my) {
     return C.ERR_NOT_OWNER;
   }
   if (data(this.id).spawning) {
     return C.ERR_BUSY;
   }
   if (this.getActiveBodyparts(C.RANGED_ATTACK) == 0) {
     return C.ERR_NO_BODYPART;
   }
   intents[this.id] = intents[this.id] || {};
   intents[this.id].rangedMassAttack = {};
   return C.OK;
 }

Advertisement