diff --git a/Assets/Prefabs/SP/SPCardInfo.cs b/Assets/Prefabs/SP/SPCardInfo.cs index 14da916..ac22595 100644 --- a/Assets/Prefabs/SP/SPCardInfo.cs +++ b/Assets/Prefabs/SP/SPCardInfo.cs @@ -60,4 +60,10 @@ public static Sprite GetColoredSprite(CARDCOLOR color) return Resources.Load("Cards/Templates/Orange"); } } + + public void RevealCard() + { + isRevealed = true; + GetComponent().SetTrigger("Correct"); + } } diff --git a/Assets/Prefabs/SP/SPCardZoom.cs b/Assets/Prefabs/SP/SPCardZoom.cs index 7b4b3f7..1acb212 100644 --- a/Assets/Prefabs/SP/SPCardZoom.cs +++ b/Assets/Prefabs/SP/SPCardZoom.cs @@ -59,10 +59,17 @@ void ZoomCard() zoomCard = Instantiate(zoomCardPrefab); zoomCard.transform.SetParent(canvas, false); zoomCard.transform.localPosition = new Vector2(0f, 0f); - + CardData data = GetComponent().cardData; zoomCard.GetComponent().InitCardData(data); - zoomCard.GetComponent().SetTrigger("Zoom"); + if (GetComponent().isRevealed) + { + zoomCard.GetComponent().SetTrigger("ZoomWithYear"); + } + else + { + zoomCard.GetComponent().SetTrigger("Zoom"); + } } public void UnzoomCard() diff --git a/Assets/Prefabs/SP/SPDragDrop.cs b/Assets/Prefabs/SP/SPDragDrop.cs index 290ed78..cc5de1f 100644 --- a/Assets/Prefabs/SP/SPDragDrop.cs +++ b/Assets/Prefabs/SP/SPDragDrop.cs @@ -148,7 +148,6 @@ public void OnDiscard() public void OnPlaceCorrect() { - GetComponent().SetTrigger("Correct"); DisableDrag(); } diff --git a/Assets/Scripts/Game & Assessment/MP/MPGameManager.cs b/Assets/Scripts/Game & Assessment/MP/MPGameManager.cs index d513611..2072772 100644 --- a/Assets/Scripts/Game & Assessment/MP/MPGameManager.cs +++ b/Assets/Scripts/Game & Assessment/MP/MPGameManager.cs @@ -598,7 +598,7 @@ public void OnPlayerQuit(string playerName, bool isHost = false) // TODO: Set in Prod [Range(0f, 1f)] - private float specialActionRate = 0.15f; // 0.0 to 1.0 = Percentage of special action + private float specialActionRate = 0.3f; // 0.0 to 1.0 = Percentage of special action public SPECIALACTION GetRandomSpecialAction() { diff --git a/Assets/Scripts/Game & Assessment/MP/PlayerManager.cs b/Assets/Scripts/Game & Assessment/MP/PlayerManager.cs index a6f3f72..bb611a9 100644 --- a/Assets/Scripts/Game & Assessment/MP/PlayerManager.cs +++ b/Assets/Scripts/Game & Assessment/MP/PlayerManager.cs @@ -488,7 +488,7 @@ public void TargetPeekCard(NetworkConnection conn) if (cardCount > 0) { - int randIndex = UnityEngine.Random.Range(0, cardCount); + int randIndex = UnityEngine.Random.Range(0, cardCount - 1); playerArea.transform.GetChild(randIndex).GetComponent().RevealCard(); } } diff --git a/Assets/Scripts/Game & Assessment/SP/SPGameController.cs b/Assets/Scripts/Game & Assessment/SP/SPGameController.cs index f7573b0..9de6c68 100644 --- a/Assets/Scripts/Game & Assessment/SP/SPGameController.cs +++ b/Assets/Scripts/Game & Assessment/SP/SPGameController.cs @@ -264,6 +264,8 @@ public void HandleDropInTimeline(GameObject droppedCard, int dropPos) { droppedCard.GetComponent().ReplacePlaceholder(); droppedCard.GetComponent().OnPlaceCorrect(); + droppedCard.GetComponent().RevealCard(); + playerStats.CorrectDrop(); messenger.ShowMessage("Good Job! That's correct.", MPGameMessageType.CORRECT); @@ -446,7 +448,11 @@ private void SpawnCard(CardData data, Transform container, bool showYear = false card.GetComponent().cardData = data; card.GetComponent().InitCardData(data); - if (showYear) card.GetComponent().OnPlaceCorrect(); + if (showYear) + { + card.GetComponent().OnPlaceCorrect(); + card.GetComponent().RevealCard(); + } card.transform.SetParent(container, false); }