Flamingolo / game

Text based web game
1 stars 0 forks source link

Implement encountner/action endpoint #53

Closed olegsiga closed 2 weeks ago

olegsiga commented 2 weeks ago

encounter/action

request: encounterId action ActionObject   ActionObject attack   defend   run

user encounter service and controller to implement encounter action action can be initiated until mob remaining health is 0 or character health is 0 if health is 0 of mob or character and encounter/action is called again then return error, character dead/ mob dead

encounter damage logic: Damage = (Base Damage + Strength Stat Modifier) - defense (armor) this logic applies for both, character and mob

character always hits first, mob hits second only 1 hit from each each hit is reducing remaining health of mob or character

response: encounter info