// 骑兵:2 public static void Skill_Qibing02(Wujiang wujiang, Coordinates target) { Dictionary <Coordinates, Wujiang> wujiangExpeditions = BattleGameManager.GetInstance().GetWujiangData().GetWujiangExpeditions(); Wujiang targetWujiang = wujiangExpeditions[target]; // 1.伤害 targetWujiang.OnDamage(3000); // 2.移动 Coordinates c1 = wujiang.GetCoordinates(); Coordinates c2 = targetWujiang.GetCoordinates(); int dx = (c2.HexX - c1.HexX); int dy = (c2.HexY - c1.HexY); Coordinates myCoordinates = new Coordinates(); myCoordinates.SetHexXY(c2.HexX + dx, c2.HexY + dy); if (!Skills.CanMoveIn(myCoordinates)) { if (targetWujiang.GetWujiangState() == WujiangState.WujiangState_Dead) { wujiang.Move(c2); return; } return; } wujiang.Move(myCoordinates); }
public static void Skill_Qiangbing03(Wujiang wujiang, Coordinates target) { Dictionary <Coordinates, Wujiang> wujiangExpeditions = BattleGameManager.GetInstance().GetWujiangData().GetWujiangExpeditions(); Wujiang targetWujiang = wujiangExpeditions[target]; // 1.伤害 targetWujiang.OnDamage(5000); // 2.移动 Coordinates c1 = wujiang.GetCoordinates(); Coordinates c2 = targetWujiang.GetCoordinates(); int dx = (c2.HexX - c1.HexX) * 2; int dy = (c2.HexY - c1.HexY) * 2; Coordinates myCoordinates = new Coordinates(); Coordinates otherCoordinates = new Coordinates(); myCoordinates.SetHexXY(c1.HexX + dx, c1.HexY + dy); otherCoordinates.SetHexXY(c2.HexX + dx, c2.HexY + dy); if (!Skills.CanMoveIn(myCoordinates)) { return; } else if (!Skills.CanMoveIn(otherCoordinates)) { targetWujiang.Move(myCoordinates); } else { targetWujiang.Move(otherCoordinates); } }
public static void Skill_Nubing01(Wujiang wujiang, Coordinates target) { Dictionary <Coordinates, Wujiang> wujiangExpeditions = BattleGameManager.GetInstance().GetWujiangData().GetWujiangExpeditions(); Wujiang targetWujiang = wujiangExpeditions[target]; // 1.伤害 targetWujiang.OnDamage(3000); }