function LSouSouCharacterS(member,belong,direct,command){
	var self = this;
	base(self,LSouSouCharacter,[]);
	self.member = member;
	self.belong = belong;
	self.direction = direct;
	self.command = command;
	self.animeList = [];
	self.action = 0;
	self.actionIndex = 0;
	self.image = {};
	self.image["atk"] = new LBitmapData(LGlobal.imglist["s-view-atk"]);
	self.image["mov"] = new LBitmapData(LGlobal.imglist["s-view-mov"]);
	self.image["spc"] = new LBitmapData(LGlobal.imglist["s-view-spc"]);
	self.image["mov"].setProperties(0,0,48,48);
	self.bitmap = new LBitmap(self.image["mov"]);
	self.addChild(self.bitmap);
	self.setImage();
	self.loadImage();
	
	self.speed = 2;
	self.speedIndex = 0;
	self.addEventListener(LEvent.ENTER_FRAME,self.onframe);
}
LSouSouCharacterS.prototype.locationX = function(){
	return this.x/LSouSouObject.sMap.nodeLength >>> 0;
};
LSouSouCharacterS.prototype.locationY = function(){
	return this.y/LSouSouObject.sMap.nodeLength >>> 0;
};
LSouSouCharacterS.prototype.setImage = function(){
	var self = this;
	var atklist = LGlobal.divideCoordinate(self.image["atk"].image.width,self.image["atk"].image.height,12,1);
	var movlist = LGlobal.divideCoordinate(self.image["mov"].image.width,self.image["mov"].image.height,11,1);
	var spclist = LGlobal.divideCoordinate(self.image["spc"].image.width,self.image["spc"].image.height,5,1);
	var list;
	/*********站立*********/
	//下
	list = [ "mov", 48, 48, [[movlist[6][0],1]] ];
	self.animeList.push(list);
	//左
	list = [ "mov", 48, 48, [[movlist[8][0],1]] ];
	self.animeList.push(list);
	//上
	list = [ "mov", 48, 48, [[movlist[7][0],1]] ];
	self.animeList.push(list);
	//右
	list = [ "mov", 48, 48, [[movlist[8][0],-1]] ];
	self.animeList.push(list);
	/*********移動*********/
	//下
	list = [ "mov", 48, 48, [ [movlist[0][0], 1], [movlist[1][0], 1] ] ];
	self.animeList.push(list);
	//左
	list = [ "mov", 48, 48, [ [movlist[4][0], 1], [movlist[5][0], 1] ] ];
	self.animeList.push(list);
	//上
	list = [ "mov", 48, 48, [ [movlist[2][0], 1], [movlist[3][0], 1] ] ];
	self.animeList.push(list);
	//右
	list = [ "mov", 48, 48, [ [movlist[4][0], -1], [movlist[5][0], -1] ] ];
	self.animeList.push(list);
	/*********攻击*********/
	//下
	list = [ "atk", 64, 64, [ [atklist[0][0], 1], [atklist[0][0], 1], [atklist[1][0], 1], [atklist[2][0], 1], [atklist[3][0], 1], [atklist[3][0], 1] ] ];
	self.animeList.push(list);
	//左
	list = [ "atk", 64, 64, [ [atklist[8][0], 1], [atklist[8][0], 1], [atklist[9][0], 1], [atklist[10][0], 1], [atklist[11][0], 1], [atklist[11][0], 1] ] ];
	self.animeList.push(list);
	//上
	list = [ "atk", 64, 64, [ [atklist[4][0], 1], [atklist[4][0], 1], [atklist[5][0], 1], [atklist[6][0], 1], [atklist[7][0], 1], [atklist[7][0], 1] ] ];
	self.animeList.push(list);
	//右
	list = [ "atk", 64, 64, [ [atklist[8][0], -1], [atklist[8][0], -1], [atklist[9][0], -1], [atklist[10][0], -1], [atklist[11][0], -1], [atklist[11][0], -1] ] ];
	self.animeList.push(list);
	/*********挡格*********/
	//下
	list = [ "spc", 48, 48, [ [spclist[0][0], 1] ] ];
	self.animeList.push(list);
	//左
	list = [ "spc", 48, 48, [ [spclist[2][0], 1] ] ];
	self.animeList.push(list);
	//上
	list = [ "spc", 48, 48, [ [spclist[1][0], 1] ] ];
	self.animeList.push(list);
	//右
	list = [ "spc", 48, 48, [ [spclist[2][0], -1] ] ];
	self.animeList.push(list);
	/*********攻击预备*********/
	//下
	list = [ "atk", 64, 64, [ [atklist[0][0], 1] ] ];
	self.animeList.push(list);
	//左
	list = [ "atk", 64, 64, [ [atklist[8][0], 1] ] ];
	self.animeList.push(list);
	//上
	list = [ "atk", 64, 64, [ [atklist[4][0], 1] ] ];
	self.animeList.push(list);
	//右
	list = [ "atk", 64, 64, [ [atklist[8][0], -1] ] ];
	self.animeList.push(list);
	/*********受伤*********/
	list = [ "spc", 48, 48, [ [spclist[3][0], 1], [spclist[3][0], 1] ] ];
	self.animeList.push(list);
	
	self.action = self.direction+4;
};
LSouSouCharacterS.prototype.onframe = function(self){
	if(self.speedIndex++ < self.speed)return;
	self.speedIndex = 0;
	var anime = self.animeList[self.action]
	var list = anime[3];
	if(self.actionIndex >= list.length){
		self.actionIndex = 0;
	}
	var obj = list[self.actionIndex];
	var coordinate = obj[0];
	self.bitmap.bitmapData = self.image[anime[0]];
	self.bitmap.bitmapData.setProperties(coordinate.x,coordinate.y,anime[1],anime[2]);
	self.bitmap.scaleX = obj[1];
	if(self.action_mode == LStaticSouSouCharacterS.MODE_ATTACK){
		self.toAttackTargets();
	}
	self.move();
	if(self.actionIndex >= list.length - 1 && self.actionComplete){
		self.actionComplete();
		self.actionComplete = null;
	}
	self.actionIndex++;
};
LSouSouCharacterS.prototype.move = function(){
	var self = this;
	if(!self.path)return;
	if(self.x == self.tagerCoordinate.x && self.y == self.tagerCoordinate.y){
		if(self.path.length == 0){
			self.tagerCoordinate.x = self.locationX();
			self.tagerCoordinate.y = self.locationY();
			self.path = null;
			if(self.onMoveComplete)self.onMoveComplete();
			return;
		}else{
			self.tagerCoordinate.x = self.path[0].x*LSouSouObject.sMap.nodeLength;
			self.tagerCoordinate.y = self.path[0].y*LSouSouObject.sMap.nodeLength;
			self.path.shift();
		}
	}
	if(self.x > self.tagerCoordinate.x){
		self.x -= LStaticSouSouCharacterS.MOVESETP;
		self.action = LStaticSouSouCharacterS.MOVE_LEFT;
	}else if(self.y < self.tagerCoordinate.y){
		self.y += LStaticSouSouCharacterS.MOVESETP;
		self.action = LStaticSouSouCharacterS.MOVE_DOWN;
	}else if(self.y > self.tagerCoordinate.y){
		self.y -= LStaticSouSouCharacterS.MOVESETP;
		self.action = LStaticSouSouCharacterS.MOVE_UP;
	}else{
		self.x += LStaticSouSouCharacterS.MOVESETP;
		self.action = LStaticSouSouCharacterS.MOVE_RIGHT;
	}
};
LSouSouCharacterS.prototype.loadImage = function(){
	var self = this;
	atkLoader = new LLoader();
	atkLoader.parent = self;
	atkLoader.addEventListener(LEvent.COMPLETE,self.loadAtkOver);
	atkLoader.load("images/characters/s/" + self.member.getS() +"/atk.png" + (LGlobal.traceDebug?("?"+(new Date()).getTime()):""),"bitmapData");

	movLoader = new LLoader();
	movLoader.parent = self;
	movLoader.addEventListener(LEvent.COMPLETE,self.loadMovOver);
	movLoader.load("images/characters/s/" + self.member.getS() +"/mov.png" + (LGlobal.traceDebug?("?"+(new Date()).getTime()):""),"bitmapData");

	spcLoader = new LLoader();
	spcLoader.parent = self;
	spcLoader.addEventListener(LEvent.COMPLETE,self.loadSpcOver);
	spcLoader.load("images/characters/s/" + self.member.getS() +"/spc.png" + (LGlobal.traceDebug?("?"+(new Date()).getTime()):""),"bitmapData");
};
LSouSouCharacterS.prototype.loadAtkOver = function(event){
	var self = event.target.parent;
	self.image["atk"] = new LBitmapData(event.currentTarget);
};
LSouSouCharacterS.prototype.loadMovOver = function(event){
	var self = event.target.parent;
	self.image["mov"] = new LBitmapData(event.currentTarget);
};
LSouSouCharacterS.prototype.loadSpcOver = function(event){
	var self = event.target.parent;
	self.image["spc"] = new LBitmapData(event.currentTarget);
};
LSouSouCharacterS.prototype.addEventListener = function(type,listener){
	var s = this;
	arguments.callee[SUPER]["addEventListener"].apply(s,arguments);
	if(type == LSouSouEvent.CHARACTER_MOVE_COMPLETE){
		s.onMoveComplete = listener;
	}else if(type == LSouSouEvent.ANIMATION_COMPLETE){
		s.actionComplete = listener;
	}
};
LSouSouCharacterS.prototype.removeEventListener = function(type,listener){
	var s = this;
	arguments.callee[SUPER]["removeEventListener"].apply(s,arguments);
	if(type == LSouSouEvent.CHARACTER_MOVE_COMPLETE){
		s.onMoveComplete = null;
	}
};
LSouSouCharacterS.prototype.removeAllEventListener = function(type,listener){
	var s = this;
	arguments.callee[SUPER]["removeAllEventListener"].apply(s,arguments);
	s.onMoveComplete = null;
	s.actionComplete = null;
};
LSouSouCharacterS.prototype.toAttackStart = function(){
	var self = this;
	trace("self.targetCharacter="+self.targetCharacter);
	if(!self.targetCharacter)return;
	if(self.x > self.targetCharacter.x){
		self.action = LStaticSouSouCharacterS.ATK_LEFT;
	}else if(self.x < self.targetCharacter.x){
		self.action = LStaticSouSouCharacterS.ATK_RIGHT;
	}else if(self.y > self.targetCharacter.y){
		self.action = LStaticSouSouCharacterS.ATK_UP;
	}else{
		self.action = LStaticSouSouCharacterS.ATK_DOWN;
	}
	self.action_mode = LStaticSouSouCharacterS.MODE_ATTACK;
	self.addEventListener(LSouSouEvent.ANIMATION_COMPLETE,self.attackOver);
};
LSouSouCharacterS.prototype.attackOver = function(){
	var self = this;
	var charas,i;
	var target = self.targetCharacter;
	var checkBelong = LSouSouObject.sMap.belong_mode;
	self.removeEventListener(LSouSouEvent.ANIMATION_COMPLETE,self.attackOver);
	self.attackIndex++;
	//双击或双击以上攻击 暂略

	//对方没有混乱，兵力大于0，并且可以反击
	if(self.targetCharacter.member.getTroops() > 0
		 && self.targetCharacter.attackIndex < self.targetCharacter.attackNumber){
		self.action = LStaticSouSouCharacterS.DOWN + self.direction;
		for(i=0;i<self.targetArray.length;i++){
			charas = self.targetArray[i];
			if(charas.action_mode == LStaticSouSouCharacterS.MODE_STOP){
				charas.action = LStaticSouSouCharacterS.DOWN + charas.direction;
			}else{
				charas.action = LStaticSouSouCharacterS.MOVE_DOWN + charas.direction;
			}
		}
		trace("self.targetCharacter.targetCharacter="+self.targetCharacter.targetCharacter);
		trace("LSouSouCharacterSAI="+LSouSouCharacterSAI.atAttackRect(self.targetCharacter,self.locationX(),self.locationY()));
		if(self.targetCharacter.targetCharacter && 
			LSouSouCharacterSAI.atAttackRect(self.targetCharacter,self.locationX(),self.locationY())){
			self.targetCharacter.attackCalculate();
		}else{
			self.action_mode = LStaticSouSouCharacterS.MODE_STOP;
			self.targetCharacter.targetCharacter = null;
			self.targetCharacter = null;
		}
	}else{
		for(i=0;i<self.targetArray.length;i++){
			charas = self.targetArray[i];
			if(charas.action_mode == LStaticSouSouCharacterS.MODE_STOP){
				charas.action = LStaticSouSouCharacterS.DOWN + charas.direction;
			}else{
				charas.action = LStaticSouSouCharacterS.MOVE_DOWN + charas.direction;
			}
		}
		if(self.belong == LSouSouObject.charaSNow.belong){
			self.action_mode = LStaticSouSouCharacterS.MODE_STOP;
			self.action = LStaticSouSouCharacterS.DOWN + this.direction;
			self.targetCharacter.targetCharacter = null;
			self.targetCharacter = null;
		}else{
			self.action = LStaticSouSouCharacterS.MOVE_DOWN + this.direction;
			self.targetCharacter.action = LStaticSouSouCharacterS.DOWN + self.targetCharacter.direction;
			self.targetCharacter.action_mode = LStaticSouSouCharacterS.MODE_STOP;
			self.targetCharacter.targetCharacter = null;
			self.targetCharacter = null;
		}
	}
};
LSouSouCharacterS.prototype.setAttackNumber = function(){
	var self = this;
	//双击判定 暂略

	self.attackNumber = 1;
	self.attackIndex = 0;
	self.targetCharacter.attackIndex = 0;
	self.targetCharacter.attackNumber = 1;
};
LSouSouCharacterS.prototype.attackCalculate = function(){
	var self = this;
	
	//特技判定 暂略

	//物理攻击
	self.toAttackStart();
};
LSouSouCharacterS.prototype.toAttackTargets = function(){
	var self = this,charas,_charalist,i;
	if(!self.targetCharacter)return;
	if(self.actionIndex == 2){
		_charalist = {};
		if(self.belong == LSouSouObject.BELONG_SELF || self.belong == LSouSouObject.BELONG_FRIEND){
			for(i=0;i<LSouSouObject.sMap.enemylist.length;i++){
				charas = LSouSouObject.sMap.enemylist[i];
				if(!charas.visible)continue;
				_charalist[charas.locationX() + "," + charas.locationY()] = charas;
			}
		}else{
			for(i=0;i<LSouSouObject.sMap.ourlist.length;i++){
				charas = LSouSouObject.sMap.ourlist[i];
				if(!charas.visible)continue;
				_charalist[charas.locationX() + "," + charas.locationY()] = charas;
			}
			for(i=0;i<LSouSouObject.sMap.friendlist.length;i++){
				charas = LSouSouObject.sMap.friendlist[i];
				if(!charas.visible)continue;
				_charalist[charas.locationX() + "," + charas.locationY()] = charas;
			}
		}
		self.targetArray = [];
		var node,nodeArr,rangeAttackTarget = self.member.getRangeAttackTarget();
		for(i=0;i<rangeAttackTarget.length;i++){
			node = rangeAttackTarget[i];
			//nodeArr = nodeStr.split(",");
			charas = _charalist[(self.targetCharacter.locationX() + node.x) + "," + (self.targetCharacter.locationY() + node.y)];
			if(charas)self.toAttackTarget(charas);
		}
	}
};
LSouSouCharacterS.prototype.toAttackTarget = function(charas){
	var self = this;
	self.targetArray.push(charas);
	var hitrate = LSouSouCalculate.getHitrate(self,charas);
	if(hitrate){
		//攻击
		if(charas.member.getIndex() == self.targetCharacter.member.getIndex()){
			charas.targetCharacter = self;
		}
		//计算伤害值
		var hertValue = LSouSouCalculate.getHertValue(self,charas);
		//暴击修正 暂略

		//反击修正
		if(self.belong != LSouSouObject.charaSNow.belong)hertValue = Math.floor(hertValue*0.75);
		if(hertValue >= charas.member.getTroops()){
			hertValue = charas.member.getTroops();
			//获取经验值计算 暂略
		}
		//特技修正 暂略
		//减HP 暂略
		charas.action = LStaticSouSouCharacterS.HERT;
		
		//减HP显示 
		var numberShow = new LSouSouSMapNumber(-hertValue);
		numberShow.x = charas.x + (charas.getWidth() - numberShow.getWidth())*0.5;
		numberShow.y = charas.y + (charas.getHeight() - numberShow.getHeight())*0.5;
		LSouSouObject.sMap.charaLayer.addChild(numberShow);
	}else{
		//档格
		if(charas.member.getIndex() == self.targetCharacter.member.getIndex()){
			charas.targetCharacter = self;
		}
		if(self.x > charas.x){
			charas.action = LStaticSouSouCharacterS.BLOCK_RIGHT;
		}else if(self.x < charas.x){
			charas.action = LStaticSouSouCharacterS.BLOCK_LEFT;
		}else if(self.y > charas.y){
			charas.action = LStaticSouSouCharacterS.BLOCK_DOWN;
		}else{
			charas.action = LStaticSouSouCharacterS.BLOCK_UP;
		}
	
	}
	//升级判定 暂略
}