// Made by Clonkinator
// Nasty Spear. Pierces through several enemies at the same time, but weakens it's holder's
// defense.

// Make vulnerable against physical damage
SetTargetToWhoeverIsHolding
  UndoEnchant
  SetOwnerToTarget
  EnchantTarget
Else
  UndoEnchant
// 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 = 2
  SendMessageNear
  UndoEnchant
IfNotDropped				// Say oops, that's kursed
  SetTargetToWhoeverIsHolding		  //
  tmpargument = 1			  //
  SendMessageNear			  //
//IfNotPutAway
//  tmpargument = 3         //No longer needed, this is handled by the sourcecode now...
//  SendMessageNear
IfDropped				// Make it lie on floor
  KeepAction				  //
  UndoEnchant
IfHitGround				// Make a sound
  tmpargument = 1			  //
  PlaySound				  //
  DisaffirmCharacter			  // Stop thrown attack
IfGrabbed				// Tell them what they've won...
  SetTargetToWhoeverIsHolding		  //
  IfTargetIsAPlayer			  //
    tmpargument = 0			  //
    SendMessageNear			  //
//Remove enchant if not holding
IfPutAway
  UndoEnchant
End					// All done
