question: public String damageBayDoor ( ) { String bayType = "none" ; Vector < Bay > potential ; potential = new Vector < Bay > ( ) ; Enumeration < Transporter > iter = transports . elements ( ) ; while ( iter . hasMoreElements ( ) ) { Transporter next = iter . nextElement ( ) ; if ( next instanceof Bay ) { Bay nextBay = ( Bay ) next ; if ( nextBay . getDoors ( ) > 0 ) { potential . add ( nextBay ) ; } } } if ( potential . size ( ) > 0 ) { Bay chosenBay = potential . elementAt ( Compute . randomInt ( potential . size ( ) ) ) ; chosenBay . destroyDoor ( ) ; chosenBay . resetDoors ( ) ; chosenBay . setDoors ( chosenBay . getDoors ( ) - 1 ) ; bayType = chosenBay . getType ( ) ; } return bayType ; }
target:  Damages a randomly determined bay door on the entity, if one exists