Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. BattleMode.prototype.copySelected = function(index) {
  2.  
  3. var copy, spec, unit;
  4.  
  5. if (commander.selection.length === 1) {
  6.  
  7. unit = commander.selection[0];
  8.  
  9. spec = unit.spec;
  10.  
  11. copy = new types.Unit(spec);
  12.  
  13. buildBar.setSpec(index, copy.toSpec());
  14.  
  15. return control.savePlayer();
  16.  
  17. }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement