public override void Activate() { Initialize(); _enemyRowSelected = !_battleModel.TargetInfo.Spell.IsSupportSpell; _activeRow = _enemyRowSelected ? _battleModel.Enemies : _battleModel.FrontRow; _activeIndex = 0; _activeRow[_activeIndex].IsMarked = true; _targetInfo = _battleModel.TargetInfo; _targetInfo.Target = _activeRow[_activeIndex]; }
public override void Activate() { Initialize(); SetCurrentState(0); _targetInfo = _battleModel.TargetInfo; ClearStates(); var currentMP = _battleModel.CurrentAttacker.CurrentMP; var i = 0; foreach (var spellVar in _battleModel.CurrentAttacker.Spells) { ++i; if (i == 1 || i == 2) { continue; } var spell = spellVar; var item = Factories.RFactory.CreateMenuItem(spell.Name, () => { _targetInfo.Spell = spell; if (spell.TargetType == TargetType.Single || spell.TargetType == TargetType.Decaying) { Master.SetCurrentState((int)BattleMenuState.SelectTarget); } else { Master.SetCurrentState((int)BattleMenuState.Execute); } }); item.IsDisabled = spell.MPCost >= currentMP + 1; AddState(item); } Model.MenuModel.SpellSelectMenu = this; for (var j = 0; j < GetStateCount(); ++j) { var item = GetMenuItem(j); if (item.IsDisabled) { continue; } item.Activate(); SetCurrentState(j); break; } }
public override void Run() { _battleModel = Model.BattleModel; _currentAttacker = _battleModel.CurrentAttacker; _targetInfo = _battleModel.TargetInfo; _enemyTurn = _battleModel.IsEnemyTurn; ++_frameCounter; if (_frameCounter == ConsequenceFrames) { FrameLimitReached(); return; } if (_frameCounter > 1) { FramesCounting(); return; } Calculate(); }