Latest game update reflections
Added ``pokememes_wealth`` in profiles, because we now can retrieve it from profiles. Removed ``pokememe_lvl`` from profile pokememes due to latest game update, where level calculating become almost impossible (or hard enough to throw it away). Added ``pokememe_attack`` for profile pokememes, which will be used instead of level.
This commit is contained in:
@@ -18,7 +18,7 @@ import (
|
||||
func (t *Talkers) pokememesListing(update tgbotapi.Update, page int, pokememesArray []dbmapping.PokememeFull) {
|
||||
message := "*Известные боту покемемы*\n"
|
||||
message += "Список отсортирован по грейду и алфавиту.\n"
|
||||
message += "Покедекс: " + strconv.Itoa(len(pokememesArray)) + " / 206\n"
|
||||
message += "Покедекс: " + strconv.Itoa(len(pokememesArray)) + " / 219\n"
|
||||
message += "Отображаем покемемов с " + strconv.Itoa(((page-1)*50)+1) + " по " + strconv.Itoa(page*50) + "\n"
|
||||
if len(pokememesArray) > page*50 {
|
||||
message += "Переход на следующую страницу: /pokedeks" + strconv.Itoa(page+1)
|
||||
|
@@ -52,12 +52,8 @@ func (t *Talkers) ProfileMessage(update tgbotapi.Update, playerRaw dbmapping.Pla
|
||||
for i := range profilePokememes {
|
||||
for j := range pokememes {
|
||||
if profilePokememes[i].PokememeID == pokememes[j].ID {
|
||||
singleAttack := float64(pokememes[j].Attack)
|
||||
singleAttack = singleAttack * float64(profilePokememes[i].PokememeLevel)
|
||||
if profilePokememes[i].PokememeRarity == "rare" {
|
||||
singleAttack = singleAttack * 1.15
|
||||
}
|
||||
attackPokememes += int(singleAttack)
|
||||
singleAttack := profilePokememes[i].PokememeAttack
|
||||
attackPokememes += singleAttack
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,18 +77,13 @@ func (t *Talkers) ProfileMessage(update tgbotapi.Update, playerRaw dbmapping.Pla
|
||||
for i := range profilePokememes {
|
||||
for j := range pokememes {
|
||||
if profilePokememes[i].PokememeID == pokememes[j].ID {
|
||||
singleAttack := float64(pokememes[j].Attack)
|
||||
singleAttack = singleAttack * float64(profilePokememes[i].PokememeLevel)
|
||||
if profilePokememes[i].PokememeRarity == "rare" {
|
||||
singleAttack = singleAttack * 1.15
|
||||
}
|
||||
|
||||
message += "\n" + strconv.Itoa(pokememes[j].Grade)
|
||||
message += "⃣ " + pokememes[j].Name
|
||||
message += " +" + c.Parsers.ReturnPoints(int(singleAttack)) + "⚔"
|
||||
message += " +" + c.Parsers.ReturnPoints(profilePokememes[i].PokememeAttack) + "⚔"
|
||||
}
|
||||
}
|
||||
}
|
||||
message += "\nСтоимость покемемов на руках: " + c.Parsers.ReturnPoints(profileRaw.PokememesWealth) + "$"
|
||||
message += "\n\n💳" + strconv.Itoa(playerRaw.TelegramID)
|
||||
message += "\n⏰Последнее обновление профиля: " + profileRaw.CreatedAt.Format("02.01.2006 15:04:05")
|
||||
message += "\n\nНе забывай обновляться, это важно для получения актуальной информации.\n\n"
|
||||
|
Reference in New Issue
Block a user