Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s.calc = function() {
- //any stimjector-related things to do?
- if ('stimjector' in vs.myDefs) {
- //our stimjector is auto
- if (vs.switchingStim) {
- //we are switching to manual.
- return 'gsv.stimjector';
- }
- } else if (vs.abs.gst.rdy) {
- //our stimjector is manual
- if (vs.switchingStim) {
- //we are switching to auto
- return 'gston';
- }
- //do we need to heal manually?
- var threshold = vs.settings.hp_threshold;
- if (vs.vitals.hp < threshold) {
- return 'gst';
- }
- }
- var droneHere = vs.botHere('an aerodynamic drone')
- // do we need parts? Let's check if we have airdrop balance.
- if ( (vs.vitals.parts < vs.settings.airdropPartsThreshold) && vs.abs.bai.rdy) {
- //is the drone here?
- if (droneHere) {
- vs.verb('Vuu found that we need to airdrop.','engineer');
- return 'bai';
- //oh shit, no drone. Let's salvage a wormholer
- } else if (vs.myGadgets['an arm-mounted wormhole generator'].length > 1) {
- return 'gsv.wormholer';
- //out of wormholers? Salvage a hoverboard
- } else if (vs.myGadgets['a wing-shaped hoverboard'].length > 1) {
- return 'gsv.hoverboard';
- } else {
- display_notice('=======NO GADGETS TO SALVAGE FOR PARTS!======','red');
- }
- }
- //we really really want a carrybot at all times so we can interrupt
- if (!('a crane-armed carrybot' in vs.myBots)) {
- return 'bcon.carrybot';
- }
- //we also really want a shardflinger in the room.
- if (!vs.turretHere('a turret with a mounted shardflinger barrel')) {
- if ('a turret with a mounted shardflinger barrel' in vs.myTurrets) {
- if (vs.myTurrets['a turret with a mounted shardflinger barrel'].length >0) {
- var id = vs.myTurrets['a turret with a mounted shardflinger barrel'][0];
- return 'tde.'+id;
- }
- }
- display_notice('=======NEED A TURRET BUT HAVE NONE!======','red');
- } else {
- //so we do have a shardflinger here. But is it sentrymode?
- var tId = vs.getMyTurretHere();
- if (tId) {
- if (!(tId in vs.mySentryTurrets)) {
- //Not really sure... it could be... let's use a balanceless TURRET STATUS to check
- vs.turretStatusParsingId = tId;
- return 'tst';
- }
- }
- //we DO have a turret here and apparently it's out of energy.
- if (vs.boost) {
- vs.verb('Vuu found that we need to qpcboost.','engineer');
- return 'qpc';
- }
- }
- //remove them from cover.
- if (vs.theirCoverState.covering) {
- vs.verb('Vuu found that we need to propshrink.','engineer');
- return 'gps';
- }
- //harass them on cd
- if (droneHere && vs.abs.bha.rdy) {
- return 'bha';
- }
- var sh = vs.shardCounter;
- //5 shards is our money number for magnetize. Let's check...
- if (sh >= 5) {
- //We want shard counts to hover around 5/6, not 4/5, so let's check if shards are falling
- if (vs.shardCountIn(5000) < 5) { // checks if shards 5 seconds from now will be less than 5.
- //they are, so let's junkjet.
- display_notice('====Time to magnotron?====','yellow');
- return 'gj';
- } else {
- //magnetize yaaaah
- return 'gmz';
- }
- }
- //NYI DO NOT UNCOMMENT YET
- //we want them either spasming or with weak knees
- /*if (!vs.spasming) {
- return 'gsp';
- } else {
- //and now we want to make sure they have damaged right/left leg, conveniently also telling us if they are indeed weak knees.
- if ( (vs.constrictCount < 2) && (vs.botHere('a knife-mawed burrowbot')) ) {
- return 'bco';
- }
- }
- */
- //we will constrict them by default.
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement