public List <PlayerChar> GetTargetPool(ICommandData targetIntarface) { var commandData = targetIntarface.GetCommandData(); var user = _playerDisplayers[0]._mycharData; return(Battle_targetDicide.GetTargetPool(commandData._target, user, _mycf.GetFriend(user), _mycf.GetEnemy(user)) .Select(x => (PlayerChar)x).ToList()); }
public static string Format(ICommandData idata, string beforeText) { var data = idata.GetCommandData(); string result = ""; result = $"{beforeText}\n" + $"対象:{CommandEnumAction.Target2String(data._target)}\n" + $"消費:{CommandEnumAction.Resource2String(data._useResourceType)} {ConverUseNum(data._useNum)}\n" + $"効果:{ConvertEffect(data)}"; return(result); }
protected override void UseResource(BattleChar user, ICommandData icommand) { var command = icommand.GetCommandData(); bool isPlayer = user is PlayerChar; if (isPlayer) { var pl = (PlayerChar)user; var bur = new Battle_useResource(command._useResourceType, command._useNum, pl); if (!bur.IsUseable()) { return; } bur.Use(); } }
//引数多すぎてよくわからなくなる public void TurnAction(BattleChar user, BattleChar inputTarget, ICommandData icommand , Action <bool, bool, BattleChar, int> damageAction = null , List <BattleChar> friends = null, List <BattleChar> enemys = null) { var command = icommand.GetCommandData(); UseResource(user, icommand); var effectNum = CalcEffectNum(user, command); var targetPool = Battle_targetDicide.GetTargetPool(command._target, user, friends, enemys); var targetList = Battle_targetDicide.SelectTarget(command._target, targetPool, inputTarget); TrrigerEffect(effectNum, command, targetList, CommandEnumAction.IsCure(command._target) , damageAction); }