elementum-games / shinobi-chronicles

https://shinobichronicles.com
MIT License
12 stars 44 forks source link

War Table WIP #466

Closed aumu1031 closed 1 year ago

aumu1031 commented 1 year ago

image

Queries to fix region capture count on prod:

UPDATE player_war_logs AS total
SET total.regions_captured = (
    SELECT SUM(war.regions_captured)
    FROM player_war_logs AS war
    WHERE war.user_id = total.user_id AND war.relation_id IS NOT NULL
)
WHERE total.relation_id IS NULL;
UPDATE village_war_logs AS total
SET total.regions_captured = (
    SELECT SUM(war.regions_captured)
    FROM village_war_logs AS war
    WHERE war.village_id = total.village_id AND war.relation_id IS NOT NULL
)
WHERE total.relation_id IS NULL;

PvP Win: 100 Battle, 10 Objective (from Defense)

Patrol Win: 25 Battle, 30 Objective (from Defense)

Region Capture: 1500 Objective

Village Capture: 500 Objective

Reinforce:

Infiltrate:

Raid:

Loot: