//Damage increases with how much the holder has bled
IfUsed
  
  SetTargetToWhoeverIsHolding
  IfTargetIsHurt
    tmpargument = 0         //Reset as default
    tmpy = targetlife
    
    //75% life left
    tmpx = targetmaxlife > 2
    tmpx = tmpx * 3
    IfXIsMoreThanY
      tmpargument = 2         //Level 1 damage
      
    //50% life left
    tmpx = targetmaxlife > 1
    IfXIsMoreThanY
      tmpargument = 3         //Level 2 damage
      
    //25% life left
    tmpx = targetmaxlife > 2
    IfXIsMoreThanY
      tmpargument = 4         //Level 3 damage
      
    tmpx = tmpargument
    tmpy = 0
    IfXIsMoreThanY
      tmpdistance = SPAWNLAST
      SpawnAttachedParticle
  
// ZZ> 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 = 1
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  GoPoof
  tmpargument = 1
  SendMessageNear
IfDropped				// Make it lie on floor
  KeepAction				  //
IfGrabbed				// Tell them what they've won...
  SetTargetToWhoeverIsHolding		  //
  IfTargetIsAPlayer			  //
    tmpargument = 0			  //
    SendMessageNear			  //
IfHitGround				// Make a sound
  tmpargument = 1			  //
  PlaySound				  //
IfNotDropped
  tmpargument = 2
  SendMessageNear
IfTakenOut
  SetTargetToWhoeverIsHolding
  IfTargetIsAPlayer
    tmpargument = 4
    SendMessageNear
    
//IfNotPutAway
//  tmpargument = 3         //No longer needed, this is handled by the sourcecode now...
//  SendMessageNear

End					// All done
