Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var creeperList = [
- ['mule', [CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE], 1],
- ['harvester', [WORK, WORK, WORK, WORK, WORK, MOVE], 2],
- ['hauler', [CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE], 2],
- ['builder', [WORK, WORK, WORK, WORK, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY, CARRY], 1],
- ['upgrader', [WORK, WORK, WORK, WORK, WORK, WORK, WORK, WORK, WORK, WORK, WORK, WORK, WORK, WORK, WORK, WORK, MOVE, MOVE, CARRY, CARRY], 1],
- ['archer', [TOUGH, TOUGH, TOUGH, TOUGH, TOUGH, RANGED_ATTACK, RANGED_ATTACK, RANGED_ATTACK, MOVE], 0],
- ['guard', [TOUGH, TOUGH, ATTACK, ATTACK, ATTACK, ATTACK, ATTACK, ATTACK, MOVE], 0],
- ['recovery', [WORK, MOVE, MOVE, CARRY, CARRY], 0],
- ];
- // Creeper Spawning Code
- for (var i = creeperList.length - 1; i >= 0; i--) {
- for (var p = 0, length = creeperList[i][2]; p < length; p++){
- // If there is no beta version of the creep, or if it will die before the alpha creep is born, spawn the alpha creep.
- if (Game.creeps[creeperList[i][0] + p + '_Beta'] == undefined || Game.creeps[creeperList[i][0] + p + '_Beta'].ticksToLive <= creeperList[i][1].length * 3 + 10){
- Game.spawns.Spawn1.createCreep( creeperList[i][1], creeperList[i][0] + p + '_Alpha', {role: creeperList[i][0], health: 'healthy'});
- }
- // If there is no alpha version of the creep, or if it will die before the beta creep is born, spawn the beta creep.
- if (Game.creeps[creeperList[i][0] + p + '_Alpha'] == undefined || Game.creeps[creeperList[i][0] + p + '_Alpha'].ticksToLive <= creeperList[i][1].length * 3 + 10) {
- Game.spawns.Spawn1.createCreep( creeperList[i][1], creeperList[i][0] + p + '_Beta', {role: creeperList[i][0], health: 'healthy'});
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment