Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Battlegrounds - How to get the board's state at the beginning of combat #10

Closed
breeky-dev opened this issue Sep 24, 2020 · 1 comment
Closed

Comments

@breeky-dev
Copy link

Hi,

I want to collect both players' minions at the start of the battle phase on Battlegrounds. I periodically read the Power.log and want to detect when the phases change and all minions have been created for combat.

How do I know when the log contains all the entities for combat?

@breeky-dev
Copy link
Author

breeky-dev commented Sep 25, 2020

Ok, I figure it out myself. When the combat is about to begin this line is printed in the log :
D 14:03:20.8593382 GameState.DebugPrintPower() - BLOCK_START BlockType=TRIGGER Entity=[entityName=XXX id=XXX zone=PLAY zonePos=0 cardId=TB_BaconShop_DragBuy player=4] EffectCardId=System.Collections.Generic.List 1[System.String] EffectIndex=0 Target=0 SubOption=-1 TriggerKeyword=0

And to know when the boards are ready, I search for this line :
TAG_CHANGE Entity=GameEntity tag=STEP value=MAIN_END

So I read dynamically the log file, and when I detect the first line, I wait for the second line to be print and then I parse the log and I limit the packets until the one corresponding to the TAG_CHANGE line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant