This repository has been archived on 2021-07-14. You can view files and clone it, but cannot push or open issues or pull requests.
scriptcraft/src/main/js/plugins/drone/contrib/temple.js
2014-08-23 16:45:43 +01:00

32 lines
590 B
JavaScript

var Drone = require('../drone').Drone;
//
// constructs a mayan temple
//
function temple( side ) {
if ( !side ) {
side = 20;
}
var stone = '98:1';
var stair = '109:' + Drone.PLAYER_STAIRS_FACING[ this.dir ];
this.chkpt('temple');
while ( side > 4 ) {
var middle = Math.round( (side-2) / 2 );
this.chkpt('corner')
.box( stone, side, 1, side )
.right( middle )
.box( stair )
.right()
.box( stair )
.move('corner')
.up()
.fwd()
.right();
side = side - 2;
}
this.move('temple');
}
Drone.extend(temple);