PoGo-UWP
PoGo-UWP copied to clipboard
[WIP] Add BattlePage UI with basic animations (no game play)
Closes issues
- Closes #1669
Changes
Add Battle Page
- [x] Basic battle UI and animations.
- [ ] Swap pokemon dialog
- [x] Battle conclusion dialog
Add UIHelper, and refactor some UI related code to utilize following functions
- ColorFromString
- IsDaySky
Change details
I don't know how the battling will be implemented; so I just prepared basic UI and some (crappy) animations for future use. Below are sample "scripted" animations, not a real game play.
Other informations
- View model's binding vars are to be rewritten.
I liked! It would be a great resource for pogo
Awesome work! I was already gathering information how will I implement it. In the API the fight works like this:
- You start the fight with
public static async Task<StartGymBattleResponse> StartGymBattle(string gymid, ulong defendingPokemonId, IEnumerable<ulong> attackingPokemonIds)
Then the fight with this PR animations and UI begins. You fight you aquire skill points for secondary attack on every attack. With your attacks you decrease enemy pokemon HP. This all is done localy and is stored. 2. Every second this stored information is sent to the server via
public static async Task<AttackGymResponse> AttackGym(string gymid, string battleId, List<POGOProtos.Data.Battle.BattleAction> battleActions, POGOProtos.Data.Battle.BattleAction lastRetrievedAction)
function where you send gymid, battleid, list of battleactions and lastretrievedaction. And in response there is calculated actual HP of both pokemon and actual skill points of attacking pokemon (I guess) When servers responds that some pokemon died. The fight continues.
What I don't know right now is:
- Is secondary attack sent in the stored list of actions? Or is it sent differently alone?
- How do I get information about enemy attacks? Will I get enemy attacks in some action list for the next second until new action list is retrieved after sending stored actions from me?
Also I haven't looked into the responses yet. But with this PR and your help we could get this working I think :). If the whole API we have supports all aspects of the fighting.
@jakubsuchybio that coding you showed there Works just for the battles between different teams or is it to the training too?
I think both battles are the same. Only input button is different and output is different (gym prestige++)
Where are we going to get the Pokecoins?
@ArthurSDev the pokecoins for PoGo so they are coming in later update for pogo no release date yet for new update yet and they are pretty much trying to find a new API Read Why #1725
How is the API work going @jakubsuchybio ? I love this by the way @khunpanya seriously well done!
@khunpanya The API already fixed, you want to continue with this work?
@BrazilianBug Yeah, already aware of that. But currently I only know how to make animation. For the game play mechanism, I hope someone would come in and pick these animations up. I'm trying to learn about Touch Manipulation though and hopefully could ready up some Tap, Hold and Swipe events.
@khunpanya i have found a issue in ALL OF THE CODE you have script like todo example:
// TODO Binding vars just for demonstration, need to be rewritten
replace the TODO with something like NTD becuase codeclimate can detect this and show it as a failed if that dies not work try to fix that before uploading it.
@programmer135 Uh... I write it TODO because it really is. The code need attention, a drastic change is expected but it's not a bug. As long as the whole code compiled, would be just fine. Whether to accept it, the devs will decide.
Yes and I can help fix the code in pull
Is not hard the code fixing and binding should be easy just look at other sections of the code of pogo and look for them
Good. I currently focus on making the UI. Have no time to see which objects to bind. At first I think I will leave this essential part to the main devs. But if you have time to do it, you can send a PR by and have the main devs review. But shouldn't you make a PR upon my fork than ST-Apps:master?
@khunpanya visual studio is not working so i cant do any editing till i get it fixed is a error in the designer but i will get it fixed is a minor error aand i can get it fixed well try.
Uh oh my master branch is messed.
I just know that I should make changes in another branch and leave master branch update with the main repo. Now can anyone tell me how can I reset/clean master branch to keep it update with main repo again? Sorry for messed up here.
Try to fix them check than upload
how is it going
@khunpanya @jakubsuchybio i am working on the code to start the fights, but, for some reason, when i use the GameClient.StartGymBattle()
method the answer is always "unset". Do you have any idea why?
Haven't test battle api yet. But be careful they are forcing update api 0.47 now.
@ST-Apps is there any difference in the api related to gym support?