Round Timer & End Turn UX Update –
30-Second Round Timer
Visual Timer Overlay
- Added a 30-second visible countdown timer during the Set Cards phase
- Timer fills the End Turn button from right to left as time progresses
- Timer uses the same beautiful visual style as the mulligan timer
- Red pulsing warning effect starts at 5 seconds remaining
Anti-Cheat Protection
- Timer continues running even after clicking “End Turn”
- Timer continues running even if you undo your end turn
- No way to pause or extend the timer by any action
- Ensures fair play and prevents timing exploits
Auto-Advance Phase
- Phase automatically advances when timer reaches zero
- Both players are marked ready when timer expires
- Guarantees matches never stall or hang indefinitely
End Turn Button Improvements
Always Visible During Active Play
- End Turn button remains visible but disabled during transitional phases
- No more button flickering or disappearing between phases
- Clearer visual feedback of game state
Immediate Disable on Both Ready
- Button disables instantly when both players are ready
- Fixed bug where button stayed clickable after phase changed
- Prevents invalid “Undo” actions after phase transition
Better State Management
- Button only shows “Undo” mode when actually possible to undo
- Clearer visual communication of available actions
Technical Implementation
New Components
RoundTimerUI.cs: Visual timer component with coroutine-based countdown- Timer overlay created as child of End Turn button (matches mulligan structure)
- Registered in
GameManagerandMatchManagerRegistrar
Modified Systems
SetCardsPhaseHandler.cs: Integrated timer start/stop and phase advancement logicEndTurnButton.cs: AddedEnable(),Disable()methods and fixed state managementEndTurnManager.cs: AddedOnBothPlayersReadyevent for immediate UI response
Scene Changes
- Created
TimerOverlayGameObject under End Turn button - Configured with stretched anchors to fill parent
- Uses same sprite as button with dark overlay fill effect
Why These Changes?
These updates improve match pacing, fairness, and user experience:
- The visible timer creates urgency and keeps matches moving forward
- Anti-cheat protection ensures competitive integrity
- Better button state management prevents confusion and invalid actions
The timer visual is non-intrusive but provides clear feedback, matching the quality of existing UI elements.
Match State & Bug Fix Update
Match Cleanup & Fresh Starts
Cleaner Match Transitions
- Fixed an issue where starting a new match from the end-match screen could carry over old match state
- Location abilities and effects now properly reset between matches
- Opponents now load correctly when entering matchmaking from match results
- Every match now starts with a completely clean slate
What This Fixes
- No more ghost effects from previous matches lingering in new games
- Location abilities work correctly from match to match
- Deck selection is reliable when rematching or finding new opponents
Heka Bug Fix
Heka Now Works As Intended
- Fixed: Heka’s -2 power debuff no longer persists after he’s removed from the board
- When Heka is destroyed, discarded, or banished, all cards he debuffed immediately return to their correct power
- Lane scores update instantly when Heka leaves play
Before This Fix
- If Heka was destroyed by Bloodthirst or another card ability, his debuff stayed active
- Enemy cards moving into the lane where Heka used to be would still get -2 power
- The effect functioned as if Heka was still on the board, even though he wasn’t
After This Fix
- Heka’s ability only works while he’s actually on the board
- Removing Heka from the game immediately ends his ongoing effect
- Cards already debuffed by Heka are restored to normal when he leaves
Why These Changes?
These fixes ensure the game behaves consistently and fairly:
- Match state cleanup prevents confusing situations where old effects bleed into new matches
- Heka fix ensures his ongoing ability works like other ongoing effects—they end when the card leaves play
- Both changes improve game clarity and prevent unintended interactions
Faction UI Update
MyFaction Scene Leave Button
- Full Feature Parity with Nexus
- Added Leave Faction button functionality to MyFaction scene
- Button now auto-hides when faction is at war (matches Nexus behavior)
- Uses identical cloud code endpoint and async handling as Nexus scene
- Added UI feedback during leave operation (“Leaving…” text, disabled state)
War Protection
- Leave button automatically hidden during both Pending and Active war states
- Prevents players from abandoning faction during conflict
- Checks attacker and defender status in `FactionManager.CachedActiveWars`
User Experience
- Shows “LEAVE” button when faction has no active wars
- Changes to “Leaving…” during async operation
- Button disables during operation to prevent double-clicks
- Automatically hides when player has no faction
- On failure, re-enables button for retry with error logging
Faction Icon Selection Cleanup
Visual Simplification
- Removed display name text from faction icon selection interface
- Icons now display without any text labels
- Cleaner, more visual-focused selection experience
Code Changes
- Removed `displayName` field from `FactionIcon` class
- Updated `FactionIconButton` to hide name text instead of displaying it
- Disabled `IconNameText` GameObject in `FactionIconButton.prefab` by default
Technical Implementation
MyFactionSceneManager Updates
- Added `leaveFactionButton` serialized field with header “Action Buttons”
- Added `isLeaving` state tracking flag
- Added `UpdateLeaveFactionButton(FactionData)` method for UI state management
- Added `IsFactionInWar(string)` method for war detection
- Added `OnLeaveClicked()` async event handler
- Updated `ShowFaction()` to call `UpdateLeaveFactionButton()`
- Updated `ShowNoFaction()` to hide leave button
- Updated `OnFactionLeft()` callback to reset state
Scene Wiring
- Connected `/Main Camera/Canvas/LeaveFaction` Button to MyFactionSceneManager
- Verified component references in `/Assets/Scenes/MyFaction.unity`
Icon System Refactoring
- Simplified `FactionIcon.cs` data structure
- Updated `FactionIconButton.cs` Setup() method
- Modified `/Assets/Resources/Prefabs/FactionIconButton.prefab`
Why These Changes?
These updates improve faction management UX and UI consistency:
- MyFaction scene now has complete feature parity with Nexus for leaving factions
- War-time protection prevents strategic exploits (can’t leave during conflict)
- Icon selection is cleaner and more intuitive without redundant text labels
- All changes maintain existing functionality while improving user experience
All changes are backward compatible with existing faction data.
Audio & Polish Update
Match End Improvements
Better Pacing
- Added a brief pause after the final round before the results screen appears
- Gives you a moment to process the match outcome before the UI pops up
Match End Audio
- Different victory sounds for normal matches vs bounty matches
- Different defeat sounds for normal matches vs bounty matches
- Audio now reinforces whether you won or lost at a glance
Wager System Audio
- Wager Raise Feedback
- First wager increase now plays a distinct sound
- Second wager increase plays a different, more intense sound
- Works for both your wager raises and your opponent’s raises
- You’ll always hear when the stakes go up, even if you’re not watching the button
Game Scene Audio Track
Deflector by Ghostrifter Official | https://soundcloud.com/ghostrifter-official
Music promoted by https://www.chosic.com/free-music/all/
Creative Commons CC BY-SA 3.0
https://creativecommons.org/licenses/by-sa/3.0
Why These Changes?
These updates improve match flow and add audio feedback to key moments:
- The pause at match end prevents the jarring instant transition to results
- Match-specific sounds help you instantly recognize what kind of match you just finished
- Wager audio adds tension and ensures you never miss when stakes are raised