SelectCardEffect.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System.Linq;
  5. using Photon.Pun;
  6. using System;
  7. public class SelectCardEffect : MonoBehaviourPunCallbacks
  8. {
  9. public void SetUp(
  10. Func<CardSource, bool> canTargetCondition,
  11. Func<List<CardSource>, CardSource, bool> canTargetCondition_ByPreSelecetedList,
  12. Func<List<CardSource>, bool> canEndSelectCondition,
  13. Func<bool> canNoSelect,
  14. Func<CardSource, IEnumerator> selectCardCoroutine,
  15. Func<List<CardSource>, IEnumerator> afterSelectCardCoroutine,
  16. string message,
  17. int maxCount,
  18. bool canEndNotMax,
  19. bool isShowOpponent,
  20. Mode mode,
  21. Root root,
  22. List<CardSource> customRootCardList,
  23. bool canLookReverseCard,
  24. Player selectPlayer,
  25. ICardEffect cardEffect)
  26. {
  27. _canTargetCondition = canTargetCondition;
  28. _canTargetCondition_ByPreSelecetedList = canTargetCondition_ByPreSelecetedList;
  29. _canEndSelectCondition = canEndSelectCondition;
  30. _canNoSelect = canNoSelect;
  31. _selectCardCoroutine = selectCardCoroutine;
  32. _afterSelectCardCoroutine = afterSelectCardCoroutine;
  33. _message = message;
  34. _maxCount = maxCount;
  35. _canEndNotMax = canEndNotMax;
  36. _isShowOpponent = isShowOpponent;
  37. _mode = mode;
  38. _root = root;
  39. _customRootCardList = customRootCardList;
  40. _canLookReverseCard = canLookReverseCard;
  41. _selectPlayer = selectPlayer;
  42. _cardEffect = cardEffect;
  43. _customMessage = null;
  44. _customMessage_Enemy = null;
  45. _customMessage_ShowCard = null;
  46. _customCountText = null;
  47. _showReverseCard = true;
  48. _showCard = true;
  49. _isDigiXros = false;
  50. _isDeckBottom = false;
  51. _isDeckTop = false;
  52. _notAddLog = false;
  53. _isSecurity = false;
  54. _skillInfos = new List<SkillInfo>();
  55. _afterSelectIndexCoroutine = null;
  56. }
  57. public void SetIsDeckBottom()
  58. {
  59. _isDeckBottom = true;
  60. }
  61. public void SetIsDeckTop()
  62. {
  63. _isDeckTop = true;
  64. }
  65. public void SetNotShowCard()
  66. {
  67. _showCard = false;
  68. }
  69. public void SetNotAddLog()
  70. {
  71. _notAddLog = true;
  72. }
  73. public void SetDigiXros()
  74. {
  75. _isDigiXros = true;
  76. }
  77. public void SetIsSecurity()
  78. {
  79. _isSecurity = true;
  80. }
  81. public void SetUpSkillInfos(List<SkillInfo> skillInfos)
  82. {
  83. _skillInfos = skillInfos.Clone();
  84. }
  85. public void SetUpCustomMessage(string CustomMessage, string CustomMessage_Enemy)
  86. {
  87. _customMessage = CustomMessage;
  88. _customMessage_Enemy = CustomMessage_Enemy;
  89. }
  90. public void SetUpCustomMessage_ShowCard(string CustomMessage_ShowCard)
  91. {
  92. _customMessage_ShowCard = CustomMessage_ShowCard;
  93. }
  94. public void SetUpCustomCountText(string CustomCountText)
  95. {
  96. _customCountText = CustomCountText;
  97. }
  98. public void SetShowReverseCard()
  99. {
  100. _showReverseCard = false;
  101. }
  102. Func<CardSource, bool> _canTargetCondition = null;
  103. Func<List<CardSource>, CardSource, bool> _canTargetCondition_ByPreSelecetedList = null;
  104. Func<List<CardSource>, bool> _canEndSelectCondition = null;
  105. Func<bool> _canNoSelect = null;
  106. List<CardSource> _targetCards = new List<CardSource>();
  107. Func<CardSource, IEnumerator> _selectCardCoroutine = null;
  108. Func<List<CardSource>, IEnumerator> _afterSelectCardCoroutine = null;
  109. string _message = "";
  110. int _maxCount = 0;
  111. bool _canEndNotMax = false;
  112. bool _isShowOpponent = false;
  113. bool _canLookReverseCard = false;
  114. List<CardSource> _customRootCardList { get; set; } = new List<CardSource>();
  115. Player _selectPlayer = null;
  116. ICardEffect _cardEffect = null;
  117. bool _showReverseCard = true;
  118. bool _showCard = true;
  119. bool _notAddLog = false;
  120. bool _isDigiXros = false;
  121. bool _isSecurity = false;
  122. public enum Mode
  123. {
  124. AddHand,
  125. Discard,
  126. // PutLibraryTop,
  127. // PutLibraryBottom,
  128. Custom,
  129. }
  130. Mode _mode;
  131. public enum Root
  132. {
  133. Library,
  134. Trash,
  135. Clock,
  136. Security,
  137. Custom,
  138. Hand,
  139. Recollection,
  140. Execution,
  141. DigivolutionCards,
  142. EnemyHand,
  143. None,
  144. }
  145. Root _root;
  146. bool _endSelect = false;
  147. bool _isDeckBottom = false;
  148. bool _isDeckTop = false;
  149. string _customMessage = null;
  150. string _customMessage_Enemy = null;
  151. string _customMessage_ShowCard = null;
  152. string _customCountText = null;
  153. List<SkillInfo> _skillInfos = new List<SkillInfo>();
  154. List<int> _slectedInexesInList = new List<int>();
  155. Func<List<int>, IEnumerator> _afterSelectIndexCoroutine = null;
  156. public void SetUpAfterSelectIndexCoroutine(Func<List<int>, IEnumerator> AfterSelectIndexCoroutine)
  157. {
  158. _afterSelectIndexCoroutine = AfterSelectIndexCoroutine;
  159. }
  160. public virtual List<CardSource> RootCardList()
  161. {
  162. List<CardSource> RootCardList = new List<CardSource>();
  163. switch (_root)
  164. {
  165. case Root.Library:
  166. foreach (CardSource cardSource in _selectPlayer.LibraryCards)
  167. {
  168. RootCardList.Add(cardSource);
  169. }
  170. break;
  171. case Root.Trash:
  172. foreach (CardSource cardSource in _selectPlayer.TrashCards)
  173. {
  174. RootCardList.Add(cardSource);
  175. }
  176. break;
  177. case Root.Security:
  178. foreach (CardSource cardSource in _selectPlayer.SecurityCards)
  179. {
  180. RootCardList.Add(cardSource);
  181. }
  182. break;
  183. case Root.Recollection:
  184. foreach (CardSource cardSource in _selectPlayer.LostCards)
  185. {
  186. RootCardList.Add(cardSource);
  187. }
  188. break;
  189. case Root.EnemyHand:
  190. _selectPlayer.Enemy.HandCards = RandomUtility.ShuffledDeckCards(_selectPlayer.Enemy.HandCards);
  191. foreach (CardSource cardSource in _selectPlayer.Enemy.HandCards)
  192. {
  193. RootCardList.Add(cardSource);
  194. }
  195. break;
  196. case Root.Custom:
  197. foreach (CardSource cardSource in _customRootCardList)
  198. {
  199. RootCardList.Add(cardSource);
  200. }
  201. break;
  202. }
  203. return RootCardList;
  204. }
  205. public bool active()
  206. {
  207. if (RootCardList().Count > 0)
  208. {
  209. if (_root != Root.Library && _root != Root.Security && _root != Root.Custom)
  210. {
  211. if (RootCardList().Count((cardSource) => _canTargetCondition(cardSource)) > 0)
  212. {
  213. return true;
  214. }
  215. }
  216. else
  217. {
  218. return true;
  219. }
  220. }
  221. return false;
  222. }
  223. public virtual IEnumerator Activate()
  224. {
  225. bool oldIsSelecting = GManager.instance.turnStateMachine.IsSelecting;
  226. List<CardSource> handCards = new List<CardSource>();
  227. _targetCards = new List<CardSource>();
  228. _slectedInexesInList = new List<int>();
  229. yield return GManager.instance.photonWaitController.StartWait("SelectCardEffect");
  230. bool oldIsActiveOutline_AttackingPermanent = false;
  231. if (GManager.instance.attackProcess.AttackingPermanent != null)
  232. {
  233. if (GManager.instance.attackProcess.AttackingPermanent.ShowingPermanentCard != null)
  234. {
  235. oldIsActiveOutline_AttackingPermanent = GManager.instance.attackProcess.AttackingPermanent.ShowingPermanentCard.Outline_Select.gameObject.activeSelf;
  236. }
  237. }
  238. foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players)
  239. {
  240. GManager.instance.turnStateMachine.OffFieldCardTarget(player);
  241. GManager.instance.turnStateMachine.OffHandCardTarget(player);
  242. }
  243. if (GManager.instance.attackProcess.AttackingPermanent != null)
  244. {
  245. if (GManager.instance.attackProcess.AttackingPermanent.ShowingPermanentCard != null)
  246. {
  247. GManager.instance.attackProcess.AttackingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(oldIsActiveOutline_AttackingPermanent);
  248. }
  249. }
  250. if (_maxCount == 0)
  251. {
  252. _canNoSelect = () => true;
  253. }
  254. if (_root == Root.Security)
  255. {
  256. SetIsSecurity();
  257. }
  258. if (active())
  259. {
  260. if (_isSecurity)
  261. {
  262. GManager.instance.turnStateMachine.gameContext.IsSecurityLooking = true;
  263. }
  264. if (_selectPlayer.isYou)
  265. {
  266. if ((_isDeckBottom && ContinuousController.instance.autoDeckBottomOrder)
  267. || (_isDeckTop && ContinuousController.instance.autoDeckTopOrder))
  268. {
  269. AutoSelect();
  270. }
  271. else
  272. {
  273. List<int> targetCardIDs = new List<int>();
  274. GManager.instance.turnStateMachine.IsSelecting = true;
  275. #region Message Display
  276. if (!string.IsNullOrEmpty(_customMessage))
  277. {
  278. GManager.instance.commandText.OpenCommandText(_customMessage, _isDigiXros);
  279. }
  280. else
  281. {
  282. string message = "";
  283. switch (_mode)
  284. {
  285. case Mode.AddHand:
  286. message = "Select cards to add to your hand.";
  287. break;
  288. case Mode.Discard:
  289. message = "Select cards to trash.";
  290. break;
  291. case Mode.Custom:
  292. message = "Select cards.";
  293. break;
  294. }
  295. if (!string.IsNullOrEmpty(message))
  296. {
  297. GManager.instance.commandText.OpenCommandText(message, _isDigiXros);
  298. }
  299. }
  300. #endregion
  301. List<CardSource> RootCards = new List<CardSource>();
  302. foreach (CardSource cardSource in RootCardList())
  303. {
  304. RootCards.Add(cardSource);
  305. }
  306. #region 並び替え
  307. if (_root == Root.Library || _root == Root.Trash)
  308. {
  309. RootCards = DeckData.SortedCardsList(RootCards);
  310. List<CardSource> matchConditionCards = new List<CardSource>();
  311. List<CardSource> notMatchConditionCards = new List<CardSource>();
  312. foreach (CardSource cardSource in RootCards)
  313. {
  314. if (_canTargetCondition != null)
  315. {
  316. if (_canTargetCondition(cardSource))
  317. {
  318. matchConditionCards.Add(cardSource);
  319. }
  320. else
  321. {
  322. notMatchConditionCards.Add(cardSource);
  323. }
  324. }
  325. }
  326. RootCards = new List<CardSource>();
  327. foreach (CardSource cardSource in matchConditionCards)
  328. {
  329. RootCards.Add(cardSource);
  330. }
  331. foreach (CardSource cardSource in notMatchConditionCards)
  332. {
  333. RootCards.Add(cardSource);
  334. }
  335. }
  336. #endregion
  337. #region 効果発動中・発動待機中表示
  338. if (_cardEffect != null)
  339. {
  340. if (_cardEffect.EffectSourceCard != null)
  341. {
  342. if (_skillInfos.Count == 0)
  343. {
  344. if (_root == Root.Trash)
  345. {
  346. SkillInfo[] skillInfoArray = new SkillInfo[RootCards.Count];
  347. for (int i = 0; i < skillInfoArray.Length; i++)
  348. {
  349. if (0 <= i && i <= RootCards.Count - 1)
  350. {
  351. if (RootCards[i] == _cardEffect.EffectSourceCard)
  352. {
  353. ICardEffect cardEffect = new ChangeBaseDPClass();
  354. cardEffect.SetUpICardEffect("Effect Processing", null, RootCards[i]);
  355. skillInfoArray[i] = new SkillInfo(cardEffect, null, EffectTiming.None);
  356. }
  357. else
  358. {
  359. if (GManager.instance.autoProcessing.executingMultipleSkills != null)
  360. {
  361. bool isEffectWaiting(SkillInfo skillInfo)
  362. {
  363. if (skillInfo != null)
  364. {
  365. if (skillInfo.CardEffect != null)
  366. {
  367. if (skillInfo.CardEffect.EffectSourceCard != null)
  368. {
  369. if (skillInfo.CardEffect.EffectSourceCard == RootCards[i])
  370. {
  371. return true;
  372. }
  373. }
  374. }
  375. }
  376. return false;
  377. }
  378. if (GManager.instance.autoProcessing.executingMultipleSkills.StackedSkillInfos.Count(isEffectWaiting) >= 1)
  379. {
  380. ICardEffect cardEffect = new ChangeBaseDPClass();
  381. cardEffect.SetUpICardEffect("Effect Waiting", null, RootCards[i]);
  382. skillInfoArray[i] = new SkillInfo(cardEffect, null, EffectTiming.None);
  383. }
  384. }
  385. }
  386. }
  387. }
  388. _skillInfos = skillInfoArray.ToList();
  389. }
  390. }
  391. }
  392. }
  393. #endregion
  394. GManager.instance.selectCardPanel._customCountText = _customCountText;
  395. yield return StartCoroutine(GManager.instance.selectCardPanel.OpenSelectCardPanel(
  396. Message: _message,
  397. RootCardSources: RootCards,
  398. _CanTargetCondition: _canTargetCondition,
  399. _CanTargetCondition_ByPreSelecetedList: _canTargetCondition_ByPreSelecetedList,
  400. _CanEndSelectCondition: _canEndSelectCondition,
  401. _MaxCount: _maxCount,
  402. _CanEndNotMax: _canEndNotMax,
  403. _CanNoSelect: _canNoSelect,
  404. CanLookReverseCard: _canLookReverseCard,
  405. skillInfos: _skillInfos,
  406. root: _root));
  407. foreach (CardSource selectedCard in GManager.instance.selectCardPanel.SelectedList)
  408. {
  409. targetCardIDs.Add(selectedCard.CardIndex);
  410. }
  411. foreach (int selectedIndex in GManager.instance.selectCardPanel.SelectedIndex)
  412. {
  413. _slectedInexesInList.Add(selectedIndex);
  414. }
  415. photonView.RPC("SetTargetCard", RpcTarget.All, targetCardIDs.ToArray());
  416. }
  417. }
  418. else
  419. {
  420. if (!string.IsNullOrEmpty(_customMessage_Enemy))
  421. {
  422. GManager.instance.commandText.OpenCommandText(_customMessage_Enemy, _isDigiXros);
  423. }
  424. else
  425. {
  426. GManager.instance.commandText.OpenCommandText("The opponent is selecting cards.", _isDigiXros);
  427. }
  428. #region AI
  429. if (GManager.instance.IsAI)
  430. {
  431. AutoSelect();
  432. }
  433. #endregion
  434. }
  435. void AutoSelect()
  436. {
  437. List<CardSource> ValidCards = new List<CardSource>();
  438. foreach (CardSource cardSource in RootCardList())
  439. {
  440. if (_canTargetCondition(cardSource))
  441. {
  442. ValidCards.Add(cardSource);
  443. }
  444. }
  445. IList<int> indexList = Enumerable.Range(0, ValidCards.Count).ToList();
  446. if (ValidCards.Count >= _maxCount)
  447. {
  448. for (int i = 0; i < 1000; i++)
  449. {
  450. List<int> GetIndexes = indexList.GetRandom(_maxCount).ToList();
  451. List<CardSource> GetCards = new List<CardSource>();
  452. foreach (int index in GetIndexes)
  453. {
  454. GetCards.Add(ValidCards[index]);
  455. }
  456. if (_canEndSelectCondition != null)
  457. {
  458. if (!_canEndSelectCondition(GetCards))
  459. {
  460. continue;
  461. }
  462. }
  463. List<int> CardIDs = new List<int>();
  464. foreach (CardSource cardSource in GetCards)
  465. {
  466. CardIDs.Add(cardSource.CardIndex);
  467. }
  468. if (GManager.instance.IsAI)
  469. {
  470. SetTargetCard(CardIDs.ToArray());
  471. }
  472. else
  473. {
  474. photonView.RPC("SetTargetCard", RpcTarget.All, CardIDs.ToArray());
  475. }
  476. break;
  477. }
  478. }
  479. if (GManager.instance.IsAI)
  480. {
  481. _endSelect = true;
  482. }
  483. }
  484. yield return new WaitWhile(() => !_endSelect);
  485. _endSelect = false;
  486. GManager.instance.commandText.CloseCommandText();
  487. yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
  488. #region 選択されたカードを表示
  489. if (_targetCards.Count > 0 && _showCard)
  490. {
  491. if (_targetCards.Count((cardSource) => cardSource.IsFlipped) > 0 && !_showReverseCard)
  492. {
  493. //表示しない
  494. }
  495. else
  496. {
  497. if (_isShowOpponent || (_selectPlayer.isYou && _targetCards.Count((cardSource) => cardSource.Owner == _selectPlayer) > 0))
  498. {
  499. if (!string.IsNullOrEmpty(_customMessage_ShowCard))
  500. {
  501. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, _customMessage_ShowCard, true, true));
  502. }
  503. else
  504. {
  505. switch (_mode)
  506. {
  507. case Mode.AddHand:
  508. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, "Cards added to hand", true, true));
  509. break;
  510. case Mode.Discard:
  511. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, "Cards put on the trash", true, true));
  512. break;
  513. case Mode.Custom:
  514. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, "Selected Cards", true, true));
  515. break;
  516. }
  517. }
  518. }
  519. }
  520. }
  521. #endregion
  522. Hashtable hashtable = CardEffectCommons.CardEffectHashtable(_cardEffect);
  523. string log = "";
  524. if (_mode == Mode.AddHand)
  525. {
  526. log += $"\nCard{Utils.PluralFormSuffix(_targetCards.Count)} added to hand:";
  527. }
  528. else if (_mode == Mode.AddHand)
  529. {
  530. log += $"\nTrash Card{Utils.PluralFormSuffix(_targetCards.Count)}:";
  531. }
  532. else
  533. {
  534. log += $"\nSelected Card{Utils.PluralFormSuffix(_targetCards.Count)}:";
  535. }
  536. if (_root == Root.Library)
  537. {
  538. yield return ContinuousController.instance.StartCoroutine(CardObjectController.Shuffle(_selectPlayer));
  539. }
  540. foreach (CardSource cardSource in _targetCards)
  541. {
  542. log += $"\n{cardSource.BaseENGCardNameFromEntity}({cardSource.CardID})";
  543. }
  544. switch (_mode)
  545. {
  546. case Mode.AddHand:
  547. foreach (CardSource cardSource in _targetCards)
  548. {
  549. cardSource.SetFace();
  550. if (cardSource.PermanentOfThisCard() != null)
  551. {
  552. if (cardSource.PermanentOfThisCard().DigivolutionCards.Contains(cardSource))
  553. {
  554. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().RemoveDigivolveRootEffect(cardSource, cardSource.PermanentOfThisCard()));
  555. }
  556. }
  557. handCards.Add(cardSource);
  558. }
  559. break;
  560. case Mode.Discard:
  561. foreach (CardSource cardSource in _targetCards)
  562. {
  563. if (CardEffectCommons.IsExistOnHand(cardSource))
  564. {
  565. List<IDiscardHand> discardHands = _targetCards.Map(cardSource => new IDiscardHand(cardSource, hashtable));
  566. yield return ContinuousController.instance.StartCoroutine(new IDiscardHands(discardHands, _cardEffect).DiscardHands());
  567. }
  568. else
  569. yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddTrashCard(cardSource));
  570. }
  571. break;
  572. case Mode.Custom:
  573. if (_selectCardCoroutine != null)
  574. {
  575. foreach (CardSource cardSource in _targetCards)
  576. {
  577. yield return StartCoroutine(_selectCardCoroutine(cardSource));
  578. }
  579. }
  580. break;
  581. }
  582. if (handCards.Count >= 1)
  583. {
  584. yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddHandCards(handCards, false, _cardEffect));
  585. }
  586. #region ログ追加
  587. if (!_notAddLog)
  588. {
  589. if (_isShowOpponent || _selectPlayer.isYou)
  590. {
  591. if (_targetCards.Count >= 1)
  592. {
  593. log += "\n";
  594. GManager.instance.playLog.AddLogString(log);
  595. }
  596. }
  597. }
  598. #endregion
  599. }
  600. if (_afterSelectCardCoroutine != null)
  601. {
  602. yield return StartCoroutine(_afterSelectCardCoroutine(_targetCards));
  603. }
  604. if (_afterSelectIndexCoroutine != null)
  605. {
  606. yield return StartCoroutine(_afterSelectIndexCoroutine(_slectedInexesInList));
  607. }
  608. GManager.instance.turnStateMachine.gameContext.IsSecurityLooking = false;
  609. GManager.instance.turnStateMachine.IsSelecting = oldIsSelecting;
  610. }
  611. [PunRPC]
  612. public void SetTargetCard(int[] CardIDs)
  613. {
  614. _targetCards = new List<CardSource>();
  615. foreach (int CardID in CardIDs)
  616. {
  617. _targetCards.Add(GManager.instance.turnStateMachine.gameContext.ActiveCardList[CardID]);
  618. }
  619. _endSelect = true;
  620. }
  621. }