Battle
Simulate a battle
Simulates a vanilla battle using assets owned by attacker and defender. No DB writes occur. Battle replay is saved to S3 and the battle_key is returned. Result: 0=DRAW, 1=WIN(attacker), 2=LOSE(attacker).
Battle Replay URL (returnUrl is required):
https://bravefrontierheroes.com/battle/{battleKey}?returnUrl=https://{YOUR_WEBSITE}.com
post/v1/battle/simulate
Request
- Base URL: https://api.bravefrontierheroes.com (the document declares no server; this is the origin it was published from)
- URL: https://api.bravefrontierheroes.com/v1/battle/simulate
- Auth: OAuth 2 (authorization code, authorization URL https://auth.bravefrontierheroes.com/oauth2/auth, token URL https://auth.bravefrontierheroes.com/oauth2/token, scopes: openid profile)
Request body
Response
OK
Example response
{
"actionCounts": 50,
"actionLimit": 100,
"attackerTakenDamage": 500,
"battleType": 7,
"battle_key": "abc-123",
"defenderTakenDamage": 1000,
"opponentName": "Player2",
"playerName": "Player1",
"result": 1
}Changes
No recorded changes to this operation across all 1 revision of this API.