Implement Channel Points Twungeon MVP

This commit is contained in:
2026-08-17 07:16:13 -07:00
parent 21b845d16e
commit 222cf903f6
33 changed files with 4399 additions and 75 deletions
+12
View File
@@ -0,0 +1,12 @@
import type { GameSnapshot } from '../../domain/src/index.js'
export function controlDisabledReason(snapshot:GameSnapshot,twitchUserId:string|null):string|null{
if(!twitchUserId)return 'Sign in to the Extension.'
const p=snapshot.players.find(x=>x.twitchUserId===twitchUserId)
if(!p)return 'Type !spawn in chat first.'
if(!p.extensionBound)return 'Extension identity is not bound.'
if(p.lifeState==='dead')return 'Your character is dead.'
if(snapshot.phase.kind!=='player')return 'Wait for Player Phase.'
if(p.ap===0)return 'No AP remains this phase.'
return null
}