本文整理汇总了C#中HRSim.Playfield.printMoveList方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.printMoveList方法的具体用法?C# Playfield.printMoveList怎么用?C# Playfield.printMoveList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HRSim.Playfield
的用法示例。
在下文中一共展示了Playfield.printMoveList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getMoveListForPlayfield
public void getMoveListForPlayfield(Playfield p, bool log, bool lethalCheck)
{
bool own = p.isOwnTurn;
Player mPlayer;
int playerNumber = 1;
if (own)
{
mPlayer = p.playerFirst;
playerNumber = 1;
}
else
{
mPlayer = p.playerSecond;
playerNumber = 2;
}
Action playedAction;
if (p.moveList.Count == 0) //if starting, generate move
{
//GameManager.Instance.moveCount++;
p.moveList = new List<Action>(getMoveList(p, lethalCheck, true, true));
if (log)
{
Helpfunctions.Instance.logg("######################start turn for player " + playerNumber);
}
}
else //non starting, generate move from existing moves
{
playedAction = mPlayer.playactions[mPlayer.playactions.Count - 1];
if (log)
{
Helpfunctions.Instance.logg("Action:------------------------------------");
playedAction.print();
p.printMoveList();
}
if (p.moveTrigger.handcardAdded || p.moveTrigger.tauntChanged || p.moveTrigger.manaChanged ||
p.moveTrigger.ownNewTarget || p.moveTrigger.enemyNewTarget)
{
p.moveList = getMoveList(p, lethalCheck, true, true);
}
else
{
if (p.moveTrigger.minionDied)
{
foreach (int entityID in p.moveTrigger.minionDiedList)
{
p.moveList.RemoveAll(x => ((x.target != null && x.target.entitiyID == entityID) || ((x.actionType == actionEnum.attackWithMinion) && x.own.entitiyID == entityID)));
}
}
//Helpfunctions.Instance.logg("movecount == " + GameManager.Instance.moveCount);
if (playedAction.actionType == actionEnum.playcard) //play a card
{
p.moveList.RemoveAll(x => (x.card != null && x.card.entity == playedAction.card.entity));
}
if (playedAction.actionType == actionEnum.attackWithMinion)//
{
if (playedAction.own.entitiyID == 1008 && playedAction.target.entitiyID == 1003)
{
int debug = 1;
}
if ((playedAction.own.windfury && playedAction.own.numAttacksThisTurn == 2) || !playedAction.own.windfury)
{
p.moveList.RemoveAll(x => (x.actionType == actionEnum.attackWithMinion && x.own.entitiyID == playedAction.own.entitiyID));
}
}
if (playedAction.actionType == actionEnum.useHeroPower)
{
p.moveList.RemoveAll(x => x.actionType == actionEnum.useHeroPower);
}
//mana
p.moveList.RemoveAll(x => x.manaCost > mPlayer.mana);
}
}
foreach (int m in p.moveTrigger.minionDiedList)
{
if (m == 1008)
{
int debug = 1;
}
}
p.moveTrigger.Clear();
if (log)
{
if (p.isOwnTurn)
{
Helpfunctions.Instance.logg("player 1 Mana: " + p.playerFirst.mana + "/" + p.playerFirst.ownMaxMana);
}
else
{
Helpfunctions.Instance.logg("player 2 Mana: " + p.playerSecond.mana + "/" + p.playerSecond.ownMaxMana);
}
p.printMoveList();
}
}