// Add this code under "class Entity"

this . explosive = false

// Add this under there also (look for "if (set." )

if ( set . EXPLOSIVE != null ) {

this . explosive = set . EXPLOSIVE

}

// replace this:

if ( this . invuln ) {

// with this

if ( this . invuln && this . type == 'tank' ) {

// under "if (this.range < 0) {" add

if ( this . explosive ) {

let damRadius = this . size * 7

var explo_me = this

entities. forEach ( function ( newelement ) {

let distancex = Math . abs ( newelement. x - explo_me. x )

let distancey = Math . abs ( newelement. y - explo_me. y )

let abs_distance = Math . sqrt ( ( distancex * distancex ) + ( distancey * distancey ) )

if ( abs_distance <= damRadius && abs_distance > 0 && newelement. team != explo_me. team && ! newelement. invuln ) {

newelement. health . amount -= explo_me. damage

if ( newelement. health . amount <= 0 ) {

explo_me. master . skill . score += Math . ceil ( util. getJackpot ( newelement. skill . score ) ) ;

if ( newelement. settings . givesKillMessage ) {

explo_me. master . sendMessage ( 'You killed ' + newelement. name + ' with an explosion.' ) ;

newelement. sendMessage ( 'You have been killed by ' + explo_me. master . name + ' with an explosive.' )

}

}

}

} )

let visual = new Entity ( { x : this . x , y : this . y } ) ;

visual. define ( Class. bullet ) ;

visual. range = 3

visual. SIZE = this . size * 7

visual. color = this . color

visual. team = this . team

visual. intangibility = true

visual. invuln = true

}

// then to make a bullet explosive, add this to it

EXPLOSIVE : true