 }
 
 /* Master node */
-extension SKDamageableNode where Self:SKNode  {
-    
-    /* If your physics body that gets damaged has multiple body party
-     we want the damagable nodes children apply the damaging only to the
-     parent (this class). to prevent applying the same damage event multiple
-     times we execute them as action with an unique id. multiple events get 
-     overwritten
-     */
-    func syncedSubstractHealthPoints(number:Int, uniqueDamageEventID:String) {
-        let substractBlock = SKAction.runBlock( {
-          self.substractHealthPoints(number)
-        })
-        
-        self.runAction(substractBlock, withKey: uniqueDamageEventID)
-    }
-    
-    func substractHealthPoints(number:Int) {
+extension SKDamageableMaster where Self:SKNode  {
+
+    func subtractHealthPoints(number:Int) {
         updateHealthPoints(healthPoints-number)
     }
     

}

/* Master node */
protocol SKDamageableNode:class, SKDamagable {
    var healthPoints:Int { get set }

    func updateHealthPoints(number:Int) -> Void

    
}


/// Protocol that adds SKDamageEvents to SKDamagable
protocol SKDamagableWithDamageEvents:class, SKDamagable, SKDamagableEventManager {

    /// Adds and applies SKDamageEvent and subtracts health of node
    func addAndApplyDamageEvent(event: SKDamageEvent) -> Void
    
}

/// Default implementation for protocol SKDamagableWithDamageEvents
extension SKDamagableWithDamageEvents {
    
    /// Adds and applies SKDamageEvent and subtracts health of node
    func addAndApplyDamageEvent(event: SKDamageEvent) -> Void {
        event.applied = true
        event.appliedTime = NSDate().timeIntervalSince1970
        damageEvents.append(event)
        self.subtractHealthPoints(event.damagePoints)
        print(self.getHealthPoints())
    }

}

/// Updates an SKLabelNode with new health points & vibrates
protocol DamageableUserCharacter:SKDamageableMaster, SKDamagableWithDamageEvents {
    var healthPointsLabelNode:SKLabelNode { get }
}

extension DamageableUserCharacter {
