class Soil : Item { override fun kill() { actor.event("die") val above = lookNorth() if (above is Rock) { (above as Rock).fallImmediately = false } replaceAction( ( EventAction(actor, "off") then Delay(0.01) then EventAction(actor, "on") then Delay(0.01) ) .repeat( 3 ) then EventAction( actor, "blasted") then Kill(actor) ) } }