var zlEffect = new Class({
	 action: null
	,type: 'default'
	,effect: null

	,initialize: function(action, effect, effectType){
		this.action = action;
		if(isString(effectType))	this.type = effectType;
		this.effect = effect;
	}
	
	,apply: function(actor, target){
		this.action.world.log("Applying " + this + " for " + this.action + " by " + actor + " on " + target);
		switch(this.type){
			case 'visual':
				var visualStrings = this.effect.copy();
				visualStrings.each(function(s, idx){
					visualStrings[idx] = s.replace(/\[ACTOR\]/, actor).replace(/\[OBJECT\]/, target);
				});
				this.action.world.log('VISUAL: You see: ' + visualStrings[0]);
				this.action.world.log('VISUAL: Others see: ' + visualStrings[1]);
				break;
			default:
				if(isFunction(this.effect)){
					this.effect(actor, target);
				}
		}
	}

	,toString: function(){
		return 'zlEffect_' + this.type;
	}
	
});
