public override void ActorEffect(Combat combat, Actor source, TileNode target) { TileNode dest; LineTarget line = new LineTarget(new List <string> { "wall" }, true); if (target.HasActor() == false) { return; } if (push) { dest = DestTile(source.GetPosX(), source.GetPosY(), target.data.posX, target.data.posY); List <TileNode> path = line.TargetTiles(target.actorOnTile, dest); if (path.Count == 0) { return; } //We'll just use the code for the teleport unit skill TeleportUnitSkillEffect t = new TeleportUnitSkillEffect(); t.ActorEffect(combat, target.actorOnTile, path[path.Count - 1]); } else { //push dest = DestTile(target.data.posX, target.data.posY, source.GetPosX(), source.GetPosY()); List <TileNode> path = line.TargetTiles(target.actorOnTile, dest); if (path.Count == 0) { return; } //We'll just use the code for the teleport unit skill TeleportUnitSkillEffect t = new TeleportUnitSkillEffect(); t.ActorEffect(combat, target.actorOnTile, path[path.Count - 1]); } }
public void InitDisplay(LineTarget t) { curTarget = t; }