功能:
1.自动迭代 builder、upgrader、harvester,无需手动创建。
2.分工职责完善
3.防御塔修建 供给 攻击 修复
<script src="https://screeps-cn.gitee.io/screeps-chinese-pack-release/main.js" async defer></script>
Game.spawns['Spawn1'].spawnCreep( [WORK, CARRY, MOVE], 'Harvester1' );
Game.spawns['Spawn1'].spawnCreep( [WORK, CARRY, MOVE], 'Upgrader1' );
Game.creeps['Harvester2'].memory.role = 'harvester';
Game.creeps['Upgrader1'].memory.role = 'upgrader';
被攻击时可以暂停攻击,前提你要有安全模式
Game.spawns['Spawn1'].room.controller.activateSafeMode();
Game.spawns['Spawn1'].room.createConstructionSite( 23, 22, STRUCTURE_TOWER );
Game.spawns['Spawn1'].spawnCreep( [WORK, CARRY, MOVE], 'Builder1',
{ memory: { role: 'builder' } } );Game.spawns['Spawn1'].spawnCreep( [WORK, CARRY, MOVE], 'Builder1',