public EnableChipStage(Battler[] battlers, ChipLibrary chiplibrary, int roundcount) { _Battlers = battlers; this._ChipLibrary = chiplibrary; this._RoundCount = roundcount; }
void Regulus.Game.IStage.Enter() { Queue<int> signs = new Queue<int>(_BuildSigns()); foreach (var battler in _Battlers) { battler.Initial(signs.Dequeue(), _ChipLibrary); battler.StimulatePassive(); } _Battlers = (from battler in _Battlers where battler.Hp > 0 orderby battler.Speed descending select battler).ToArray(); foreach (var battler in _Battlers) { battler.SetBattlers(_Battlers); } _Standby = new Queue<Battler>(_Battlers); _Current = _NextBattler(_Standby); _Current.OpenEnable(); }
void Regulus.Game.IStage.Update() { if (_Current.Done) { _Current.CloseEnable(); var battler = _NextBattler(_Standby); if (battler != null) { battler.OpenEnable(); } _Current = battler; } if (_Current == null) { if (TimeOutEvent != null) TimeOutEvent(new KillingStage((from battler in _Battlers select battler.Player).ToArray() , _ChipLibrary , _RoundCount - 1 ) ); TimeOutEvent = null; } }
private void _ExecuteSpell(Battler battler, int effect, Battler[] battlers) { if (effect == 1) { if (battler.Player.Energy.Green == 0) { battler.AddAttack(6); Player.OnPassiveMessage(battler.Name + "因為[下風突襲]能力啟用攻擊力+6"); } } if (effect == 2) { battler.Player.Hp += 3; Player.OnPassiveMessage(battler.Name + "因為[築巢]能力啟用希格斯+3"); } if (effect == 3) { foreach(var target in battlers) { if (target.Side != battler.Side) { int damage = battler.Attack + 10; target.SubGreen(); target.SubGreen(); target.Injuries(damage); Player.OnActiveMessage(battler.Name + "發動下風突襲 > " + target.Name + "損失" + damage + "希格斯"); } } } if (effect == 4) { battler.TurnonProtection(); battler.IncRed(); Player.OnActiveMessage(battler.Name + "發動築巢獲得保護狀態"); } }
public void SetBattlers(Battler[] battlers) { _Battlers = battlers; }