//This function makes an item fall to the floor when spawned
IfSpawned
  tmpargument = ACTIONJB
  DoAction
  KeepAction
  MakeCrushValid

IfCrushed
  tmpx = selfx
  tmpy = selfy
  tmpdistance = selfz
  tmpargument = 0
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  GoPoof
  tmpargument = 1
  SendMessageNear
  
IfDropped				// Make it lie on floor
  KeepAction

//Handle kursed shield stuff
IfNotDropped
  tmpargument = 2
  SendMessageNear  
//IfNotPutAway
//  tmpargument = 2         //No longer needed, this is handled by the sourcecode now...
//  SendMessageNear

IfGrabbed				// Tell them what they've won...
  SetTargetToWhoeverIsHolding
  IfTargetIsAPlayer
    tmpargument = 0
    SendMessageNear

IfHitGround				// Make a sound
  tmpargument = 0
  PlaySound

//A small chance the player will drop the shield (Its rusty)
IfUsed
  SetTargetToWhoeverIsHolding
  IfKursed
    DoNothing     //Ignore if shield is kursed
  Else
    tmpx = rand % 500
    tmpy = 2
    IfYIsMoreThanX
      DetachFromHolder
      tmpargument = 3
      SendMessageNear

End					// All done
