export const buildTribeURL = (id) => {
return (
window.location.origin +
TribalWars.buildURL('', {
screen: 'info_ally',
id,
})
);
};
export const buildPlayerURL = (id) => {
screen: 'info_player',
export const buildVillageURL = (id) => {
screen: 'info_village',
export const buildVillageName = (n = '', x = 500, y = 500) => {
const continent = 'K' + String(y)[0] + String(x)[0];
return `${n} (${x}|${y}) ${continent}`;
export const calcAttackDuration = (distance, baseSpeed) => {
return Math.round(distance * baseSpeed);
export const buildImgURL = (img) => {
return image_base + img;