Ir para conteúdo

[DxP] Exclusivo Poketibia OpenSource+Cliente+Site+DB


Taiger

Posts Recomendados

13 horas atrás, SirDubstep disse:

@Josegvb sobre o seu comentário antes de editar,  na lógica, tudo que NÃO esta dentro de "Super", "Weak" ou "Non", é considerado como "Normal"

 

sim por isso q editei, achei q no pda tinha normal pra os que pegam dano 1.0 e tals, porem msm assim aproveito pra lembrar q as effectiveness estao bugadas 

@Drakopoulos poderia me falar e ajudar modificando a formula do dano? paresce que a formula ficase pegando a hpmax dos pokemons pois fiz o teste e um shiny venusaur/shiny blastoise estao recebendo o msm dano pra water sendo que o blastoise deberia receber bem mais pouco

 

e eles 2 tem a msm a hp

c1271811b9bac206cd1587d3801231a4.gif

 

3f1cab80afaed01ca1a6f87c92f7fbe6.gif

Editado por Josegvb
Link para o comentário
Compartilhar em outros sites

14 horas atrás, Josegvb disse:

@Drakopoulos poderia me falar e ajudar modificando a formula do dano? paresce que a formula ficase pegando a hpmax dos pokemons pois fiz o teste e um shiny venusaur/shiny blastoise estao recebendo o msm dano pra water sendo que o blastoise deberia receber bem mais pouco

e eles 2 tem a msm a hp

Pq assim..

["water"] = {super = {"fire", "ground", "rock"}, weak = {"dragon", "grass", "water"}, non = {"none"}, stoneId = 12224, color = 29, damageID = WATERDAMAGE},

em weak está water e grass

e sh. venusaur e sh. blastoise é water e grass

['Shiny Venusaur'] = {offense = 2.3, defense = 10, specialattack = 12, life = 4200, vitality = 14, agility = 210, exp = 1050, level = 100, wildLvl = 250, type = 'grass', type2 = 'poison'},
['Shiny Blastoise'] = {offense = 2.3, defense = 11, specialattack = 12, life = 4200, vitality = 14, agility = 210, exp = 1050, level = 100, wildLvl = 250, type = 'water', type2 = 'no type'},

Se quiser que water hite mais no Sh. Vensusaur, só tirar o grass de weak no typeTable water.

Link para o comentário
Compartilhar em outros sites

4 minutos atrás, Drakopoulos disse:

Pq assim..

["water"] = {super = {"fire", "ground", "rock"}, weak = {"dragon", "grass", "water"}, non = {"none"}, stoneId = 12224, color = 29, damageID = WATERDAMAGE},

em weak está water e grass

e sh. venusaur e sh. blastoise é water e grass

['Shiny Venusaur'] = {offense = 2.3, defense = 10, specialattack = 12, life = 4200, vitality = 14, agility = 210, exp = 1050, level = 100, wildLvl = 250, type = 'grass', type2 = 'poison'},['Shiny Blastoise'] = {offense = 2.3, defense = 11, specialattack = 12, life = 4200, vitality = 14, agility = 210, exp = 1050, level = 100, wildLvl = 250, type = 'water', type2 = 'no type'},

Se quiser que water hite mais no Sh. Vensusaur, só tirar o grass de weak no typeTable water.

 

nao pois water debe bater msm weak mas mesmo assim deberia bater menos em shiny blastoise do que shiny venusaur... nao esta dando pra balançar os pokemons, mega venusaur esta levando o msm dano na outland fly q na outland water '-'

 

tb irei falar 1 coisa 

olhei no codigo 

 

    elseif isInArray(typeTable[spellRace].weak, pokeElement1) or isInArray(typeTable[spellRace].week, pokeElement2) then -- elemento atacante ser mais forte que os elementos de defesa

        value = value

 

tava errado isso pois deberia ser weak ne?

troquei pra weak porem os danos ficaram mt loucos 

b8c0259f8afd779464bc39ece4baf596.gif

Link para o comentário
Compartilhar em outros sites

18 horas atrás, Josegvb disse:

 

sim por isso q editei, achei q no pda tinha normal pra os que pegam dano 1.0 e tals, porem msm assim aproveito pra lembrar q as effectiveness estao bugadas 

@Drakopoulos poderia me falar e ajudar modificando a formula do dano? paresce que a formula ficase pegando a hpmax dos pokemons pois fiz o teste e um shiny venusaur/shiny blastoise estao recebendo o msm dano pra water sendo que o blastoise deberia receber bem mais pouco

 

e eles 2 tem a msm a hp

c1271811b9bac206cd1587d3801231a4.gif

 

3f1cab80afaed01ca1a6f87c92f7fbe6.gif

É como eu disse no Github, esse dano está certo, acontece que:

88a83cb5701d4859a8c930930def274c.png

Os dois pokemons estão com status praticamente IDÊNTICOS, e por ambos tomarem dano NORMAL de pokemons do tipo água, o dano que estão tomando do Feraligatr também é igual. O que precisa mesmo é dar uma revisada e balancear todos os pokemons, afinal Shiny Venusaur e Shiny Blastoise terem o mesmo status é ridículo...

Editado por SirDubstep
Link para o comentário
Compartilhar em outros sites

2 horas atrás, SirDubstep disse:

É como eu disse no Github, esse dano está certo, acontece que:

88a83cb5701d4859a8c930930def274c.png

Os dois pokemons estão com status praticamente IDÊNTICOS, e por ambos tomarem dano NORMAL de pokemons do tipo água, o dano que estão tomando do Feraligatr também é igual. O que precisa mesmo é dar uma revisada e balancear todos os pokemons, afinal Shiny Venusaur e Shiny Blastoise terem o mesmo status é ridículo...

 

malz mas isso aki nao paresce normal pra min 

19f1922d4685c1561012558a45337056.gif

 

2db1e8204322e0b165dcb1f3137fd919.gif

Link para o comentário
Compartilhar em outros sites

alguem poderia me explicar as 2 tabelas?

 

tabela 1 no 107- main tables:

Spoiler

typeTable = {
["normal"] = {super = {"none"}, weak = {"rock", "steel"}, non = {"ghost"}, stoneId = 12214, color = 129, damageID = NORMALDAMAGE},
["fire"] = {super = {"bug", "grass", "ice", "steel"}, weak = {"dragon", "fire", "rock", "water"}, non = {"none"}, stoneId = 12210, color = 144, damageID = FIREDAMAGE},
["fighting"] = {super = {"dark", "ice", "normal", "rock", "steel"}, weak = {"bug", "fairy", "flying", "poison", "psychic"}, non = {"ghost"}, stoneId = 12213, color = 127, damageID = FIGHTINGDAMAGE},
["water"] = {super = {"fire", "ground", "rock"},  weak = {"dragon", "grass", "water"}, non = {"none"}, stoneId = 12224, color = 29, damageID = WATERDAMAGE},
["flying"] = {super = {"bug", "fighting", "grass"}, weak = {"electric", "rock", "steel"}, non = {"none"}, stoneId = 12214, color = 172, damageID = FLYINGDAMAGE},
["grass"] = {super = {"ground", "rock", "water"}, weak = {"bug", "dragon", "fire", "flying", "grass", "poison", "steel"}, non = {"none"}, stoneId = 12211, color = 26, damageID = GRASSDAMAGE},
["poison"] = {super = {"fairy", "grass"}, weak = {"ghost", "ground", "poison", "rock"}, non = {"steel"}, stoneId = 12215, color = 103, damageID = POISONDAMAGE},
["electric"] = {super = {"flying", "water"}, weak = {"dragon", "grass"}, non = {"ground"}, stoneId = 12220, color = 210, damageID = ELECTRICDAMAGE},
["ground"] = {super = {"electric", "fire", "poison", "rock", "steel"}, weak = {"bug", "grass"}, non = {"flying"}, stoneId = 12222, color = 121, damageID = GROUNDDAMAGE},
["psychic"] = {super = {"fighting", "poison"}, weak = {"psychic", "steel", "dark"}, non = {}, stoneId = 12221, color = 125, damageID = PSYCHICDAMAGE},
["rock"] = {super = {"bug", "fire", "flying", "ice"}, weak = {"fighting", "ground", "steel"}, non = {"none"}, stoneId = 12223, color = 127, damageID = ROCKDAMAGE},
["ice"] = {super = {"dragon", "flying", "grass", "ground"}, weak = {"fire", "ice", "steel", "water"}, non = {"none"}, stoneId = 12225, color = 71, damageID = ICEDAMAGE},
["bug"] = {super = {"dark", "grass", "psychic"}, weak = {"fairy", "fighting", "fire", "flying", "ghost", "poison", "steel"}, non = {"none"}, stoneId = 12212, color = 30, damageID = BUGDAMAGE},
["dragon"] = {super = {"dragon"}, weak = {"steel"}, non = {"fairy"}, stoneId = 12219, color = 175, damageID = DRAGONDAMAGE},
["ghost"] = {super = {"ghost", "psychic"}, weak = {"dark"}, non = {"normal"}, stoneId = 12216, color = 77, damageID = GHOSTDAMAGE},
["dark"] = {super = {"ghost", "psychic"}, weak = {"dark", "fairy", "fighting"}, non = {"none"}, stoneId = 12216, color = 53, damageID = DARKDAMAGE},
["steel"] = {super = {"fairy", "ice", "rock"}, weak = {"electric", "fire", "steel", "water"}, non = {"none"}, stoneId = 12217, color = 172, damageID = STEELDAMAGE},
["fairy"] = {super = {"dark", "dragon", "fighting"}, weak = {"fire", "poison", "steel"}, non = {"none"}, stoneId = 12214, color = 130, damageID = NORMALDAMAGE},

 

tabela 2 

Spoiler

effectiveness = {
[WATERDAMAGE] = {super = {"rock", "ground", "fire"}, weak = {"water", "grass", "dragon"}},
[NORMALDAMAGE] = {weak = {"rock", "steel"}, non = {"ghost"}},
[FIGHTDAMAGE] = {super = {"normal", "rock", "steel", "ice", "dark"}, weak = {"flying", "poison", "bug", "psychic"}, non = {"ghost"}},
[FLYINGDAMAGE] = {super = {"fighting", "bug", "grass"}, weak = {"rock", "steel", "electric"}},
[POISONDAMAGE] = {super = {"grass"}, weak = {"poison", "ground", "rock", "ghost"}, non = {"steel"}},
[POISONEDDAMAGE] = {super = {"grass"}, weak = {"poison", "ground", "rock", "ghost"}, non = {"steel"}},
[GROUNDDAMAGE] = {super = {"poison", "rock", "steel", "fire", "electric"}, weak = {"bug", "grass"}, non = {"flying"}},
[ROCKDAMAGE] = {super = {"flying", "bug", "fire", "ice"}, weak = {"fighting", "ground", "steel"}},
[bUGDAMAGE] = {super = {"grass", "psychic"}, weak = {"fighting", "flying", "poison", "ghost", "steel", "fire"}},  
[GHOSTDAMAGE] = {super = {"ghost", "psychic"}, weak = {"steel", "dark"}, non = {"normal"}},
[sTEELDAMAGE] = {super = {"rock", "ice", "poison"}, weak = {"steel", "fire", "water", "electric"}},
[FIREDAMAGE] = {super = {"bug", "grass", "ice", "steel"}, weak = {"rock", "fire", "water"}},
[bURNEDDAMAGE] = {super = {"bug", "grass", "ice"}, weak = {"rock", "fire", "water"}},
[GRASSDAMAGE] = {super = {"ground", "rock", "water"}, weak = {"flying", "poison", "bug", "steel", "fire", "grass", "dragon"}},
[ELECTRICDAMAGE] = {super = {"flying", "water"}, weak = {"grass", "electric", "dragon"}, non = {"ground"}},
[PSYCHICDAMAGE] = {super = {"fighting", "poison"}, weak = {"steel"}, non = {"dark"}},
[iCEDAMAGE] = {super = {"flying", "ground", "grass", "dragon"}, weak = {"steel", "fire", "water"}},
[DRAGONDAMAGE] = {super = {"dragon"}, weak = {"steel"}},
[DARKDAMAGE] = {super = {"ghost", "psychic"}, weak = {"fighting", "steel", "dark"}},
[MIRACLEDAMAGE] = {super = {"fighting", "poison"}, weak = {"steel", "psychic", "dark"}},  --alterado v1.6     
[DARK_EYEDAMAGE] = {super = {"ghost", "psychic"}, weak = {"steel", "dark", "normal"}},           --alterado v1.6
[sEED_BOMBDAMAGE] = {super = {"ground", "rock", "water"}, weak = {"flying", "poison", "bug", "steel", "fire", "grass", "dragon"}}, --alterado v1.6
[sACREDDAMAGE] = {super = {"bug", "grass", "ice"}, weak = {"rock", "fire", "water"}},  --alterado v1.6
[MUDBOMBDAMAGE] = {super = {"poison", "rock", "steel", "fire", "electric"}, weak = {"bug", "grass"}, non = {"flying"}}, --alterado v1.8
}

 

 

pra oque é 1 e pra oq a outra?

 

Link para o comentário
Compartilhar em outros sites

3 minutos atrás, Josegvb disse:

alguem poderia me explicar as 2 tabelas?

 

tabela 1 no 107- main tables:

  Mostrar conteúdo oculto

typeTable = {

["normal"] = {super = {"none"}, weak = {"rock", "steel"}, non = {"ghost"}, stoneId = 12214, color = 129, damageID = NORMALDAMAGE},

["fire"] = {super = {"bug", "grass", "ice", "steel"}, weak = {"dragon", "fire", "rock", "water"}, non = {"none"}, stoneId = 12210, color = 144, damageID = FIREDAMAGE},

["fighting"] = {super = {"dark", "ice", "normal", "rock", "steel"}, weak = {"bug", "fairy", "flying", "poison", "psychic"}, non = {"ghost"}, stoneId = 12213, color = 127, damageID = FIGHTINGDAMAGE},

["water"] = {super = {"fire", "ground", "rock"},  weak = {"dragon", "grass", "water"}, non = {"none"}, stoneId = 12224, color = 29, damageID = WATERDAMAGE},

["flying"] = {super = {"bug", "fighting", "grass"}, weak = {"electric", "rock", "steel"}, non = {"none"}, stoneId = 12214, color = 172, damageID = FLYINGDAMAGE},

["grass"] = {super = {"ground", "rock", "water"}, weak = {"bug", "dragon", "fire", "flying", "grass", "poison", "steel"}, non = {"none"}, stoneId = 12211, color = 26, damageID = GRASSDAMAGE},

["poison"] = {super = {"fairy", "grass"}, weak = {"ghost", "ground", "poison", "rock"}, non = {"steel"}, stoneId = 12215, color = 103, damageID = POISONDAMAGE},

["electric"] = {super = {"flying", "water"}, weak = {"dragon", "grass"}, non = {"ground"}, stoneId = 12220, color = 210, damageID = ELECTRICDAMAGE},

["ground"] = {super = {"electric", "fire", "poison", "rock", "steel"}, weak = {"bug", "grass"}, non = {"flying"}, stoneId = 12222, color = 121, damageID = GROUNDDAMAGE},

["psychic"] = {super = {"fighting", "poison"}, weak = {"psychic", "steel", "dark"}, non = {}, stoneId = 12221, color = 125, damageID = PSYCHICDAMAGE},

["rock"] = {super = {"bug", "fire", "flying", "ice"}, weak = {"fighting", "ground", "steel"}, non = {"none"}, stoneId = 12223, color = 127, damageID = ROCKDAMAGE},

["ice"] = {super = {"dragon", "flying", "grass", "ground"}, weak = {"fire", "ice", "steel", "water"}, non = {"none"}, stoneId = 12225, color = 71, damageID = ICEDAMAGE},

["bug"] = {super = {"dark", "grass", "psychic"}, weak = {"fairy", "fighting", "fire", "flying", "ghost", "poison", "steel"}, non = {"none"}, stoneId = 12212, color = 30, damageID = BUGDAMAGE},

["dragon"] = {super = {"dragon"}, weak = {"steel"}, non = {"fairy"}, stoneId = 12219, color = 175, damageID = DRAGONDAMAGE},

["ghost"] = {super = {"ghost", "psychic"}, weak = {"dark"}, non = {"normal"}, stoneId = 12216, color = 77, damageID = GHOSTDAMAGE},

["dark"] = {super = {"ghost", "psychic"}, weak = {"dark", "fairy", "fighting"}, non = {"none"}, stoneId = 12216, color = 53, damageID = DARKDAMAGE},

["steel"] = {super = {"fairy", "ice", "rock"}, weak = {"electric", "fire", "steel", "water"}, non = {"none"}, stoneId = 12217, color = 172, damageID = STEELDAMAGE},

["fairy"] = {super = {"dark", "dragon", "fighting"}, weak = {"fire", "poison", "steel"}, non = {"none"}, stoneId = 12214, color = 130, damageID = NORMALDAMAGE},

 

tabela 2 

  Mostrar conteúdo oculto

effectiveness = {

[WATERDAMAGE] = {super = {"rock", "ground", "fire"}, weak = {"water", "grass", "dragon"}},

[NORMALDAMAGE] = {weak = {"rock", "steel"}, non = {"ghost"}},

[FIGHTDAMAGE] = {super = {"normal", "rock", "steel", "ice", "dark"}, weak = {"flying", "poison", "bug", "psychic"}, non = {"ghost"}},

[FLYINGDAMAGE] = {super = {"fighting", "bug", "grass"}, weak = {"rock", "steel", "electric"}},

[POISONDAMAGE] = {super = {"grass"}, weak = {"poison", "ground", "rock", "ghost"}, non = {"steel"}},

[POISONEDDAMAGE] = {super = {"grass"}, weak = {"poison", "ground", "rock", "ghost"}, non = {"steel"}},

[GROUNDDAMAGE] = {super = {"poison", "rock", "steel", "fire", "electric"}, weak = {"bug", "grass"}, non = {"flying"}},

[ROCKDAMAGE] = {super = {"flying", "bug", "fire", "ice"}, weak = {"fighting", "ground", "steel"}},

[bUGDAMAGE] = {super = {"grass", "psychic"}, weak = {"fighting", "flying", "poison", "ghost", "steel", "fire"}},  

[GHOSTDAMAGE] = {super = {"ghost", "psychic"}, weak = {"steel", "dark"}, non = {"normal"}},

[sTEELDAMAGE] = {super = {"rock", "ice", "poison"}, weak = {"steel", "fire", "water", "electric"}},

[FIREDAMAGE] = {super = {"bug", "grass", "ice", "steel"}, weak = {"rock", "fire", "water"}},

[bURNEDDAMAGE] = {super = {"bug", "grass", "ice"}, weak = {"rock", "fire", "water"}},

[GRASSDAMAGE] = {super = {"ground", "rock", "water"}, weak = {"flying", "poison", "bug", "steel", "fire", "grass", "dragon"}},

[ELECTRICDAMAGE] = {super = {"flying", "water"}, weak = {"grass", "electric", "dragon"}, non = {"ground"}},

[PSYCHICDAMAGE] = {super = {"fighting", "poison"}, weak = {"steel"}, non = {"dark"}},

[iCEDAMAGE] = {super = {"flying", "ground", "grass", "dragon"}, weak = {"steel", "fire", "water"}},

[DRAGONDAMAGE] = {super = {"dragon"}, weak = {"steel"}},

[DARKDAMAGE] = {super = {"ghost", "psychic"}, weak = {"fighting", "steel", "dark"}},

[MIRACLEDAMAGE] = {super = {"fighting", "poison"}, weak = {"steel", "psychic", "dark"}},  --alterado v1.6     

[DARK_EYEDAMAGE] = {super = {"ghost", "psychic"}, weak = {"steel", "dark", "normal"}},           --alterado v1.6

[sEED_BOMBDAMAGE] = {super = {"ground", "rock", "water"}, weak = {"flying", "poison", "bug", "steel", "fire", "grass", "dragon"}}, --alterado v1.6

[sACREDDAMAGE] = {super = {"bug", "grass", "ice"}, weak = {"rock", "fire", "water"}},  --alterado v1.6

[MUDBOMBDAMAGE] = {super = {"poison", "rock", "steel", "fire", "electric"}, weak = {"bug", "grass"}, non = {"flying"}}, --alterado v1.8

}

 

 

pra oque é 1 e pra oq a outra?

 

As duas são usadas para o sistema de efetividade. A "effectiveness" é do PDA e não é usada no DxP, se quiser pode até remover ela.

Link para o comentário
Compartilhar em outros sites

effectiveness é usada em outra funçao

Spoiler

function getResistance(cid, combat)
    if isPlayer(cid) then return false end
local poketype1 = pokes[getCreatureName(cid)].type
local poketype2 = pokes[getCreatureName(cid)].type2
local multiplier = 1
    if effectiveness[combat].super and isInArray(effectiveness[combat].super, poketype1) then
        multiplier = multiplier * 2
    end
    if poketype2 and effectiveness[combat].super and isInArray(effectiveness[combat].super, poketype2) then
        multiplier = multiplier * 2
    end
    if effectiveness[combat].weak and isInArray(effectiveness[combat].weak, poketype1) then
        multiplier = multiplier * 0.5
    end
    if poketype2 and effectiveness[combat].weak and isInArray(effectiveness[combat].weak, poketype2) then
        multiplier = multiplier * 0.5
    end
    if effectiveness[combat].non and isInArray(effectiveness[combat].non, poketype1) then
        multiplier = multiplier * 0
    end
    if poketype2 and effectiveness[combat].non and isInArray(effectiveness[combat].non, poketype2) then
        multiplier = multiplier * 0
    end

    if multiplier == 0.25 then
        multiplier = 0.5
    elseif multiplier == 4 then
        multiplier = 2
    end

return multiplier
end

 

Link para o comentário
Compartilhar em outros sites

7 minutos atrás, Josegvb disse:

effectiveness é usada em outra funçao

  Mostrar conteúdo oculto

function getResistance(cid, combat)

    if isPlayer(cid) then return false end

local poketype1 = pokes[getCreatureName(cid)].type

local poketype2 = pokes[getCreatureName(cid)].type2

local multiplier = 1

    if effectiveness[combat].super and isInArray(effectiveness[combat].super, poketype1) then

        multiplier = multiplier * 2

    end

    if poketype2 and effectiveness[combat].super and isInArray(effectiveness[combat].super, poketype2) then

        multiplier = multiplier * 2

    end

    if effectiveness[combat].weak and isInArray(effectiveness[combat].weak, poketype1) then

        multiplier = multiplier * 0.5

    end

    if poketype2 and effectiveness[combat].weak and isInArray(effectiveness[combat].weak, poketype2) then

        multiplier = multiplier * 0.5

    end

    if effectiveness[combat].non and isInArray(effectiveness[combat].non, poketype1) then

        multiplier = multiplier * 0

    end

    if poketype2 and effectiveness[combat].non and isInArray(effectiveness[combat].non, poketype2) then

        multiplier = multiplier * 0

    end

    if multiplier == 0.25 then

        multiplier = 0.5

    elseif multiplier == 4 then

        multiplier = 2

    end

return multiplier

end

 

sim, é usada nas funções getResistance e doAdvancedPoison que não é usado em nenhum script pois são do PDA.

Link para o comentário
Compartilhar em outros sites

pq o codigo fala week?

Spoiler

function getEffectvineCombat(cid, attacker, value)
if isPlayer(cid) or isPlayer(attacker) then return false end -- seguranca do player nao atacar
    local pokeRaceAttacker, pokeRaceDefender = getPokemonType(attacker).type1, getPokemonType(cid).type1
    if isInArray(typeTable[pokeRaceAttacker].super, pokeRaceDefender) or isInArray(typeTable[pokeRaceAttacker].super, pokeRaceDefender) then -- elemento atacante ser mais forte que os elementos de defesa
        value = value * 1.3
    elseif isInArray(typeTable[pokeRaceAttacker].week, pokeRaceDefender) or isInArray(typeTable[pokeRaceAttacker].week, pokeRaceDefender) then -- elemento atacante ser mais forte que os elementos de defesa
        value = value
    elseif isInArray(typeTable[pokeRaceAttacker].non, pokeRaceDefender) or isInArray(typeTable[pokeRaceAttacker].non, pokeRaceDefender) then -- elemento atacante ser mais forte que os elementos de defesa
        value = 0
    end
    if getCreatureName(cid) == "Venusaur" and value ~= 0 and isMega(cid) and isInArray({"ice", "fire"}, pokeRaceAttacker)then -- Passiva thick fat
       value = value / 2
    end
    return value
end

 

function getEffectvineSpell(attacker, spellNameFromAttacker, value, cid) -- printar os elementos
if(spellNameFromAttacker ~= -1) then -- checagem de efetividades
local name = getCreatureName(attacker) -- reflect system
      if isMega(attacker) then
         name = getPlayerStorageValue(attacker, storages.isMega)
      end
local spellRace, pokeElement1, pokeElement2 = getMoveType(name, spellNameFromAttacker), getPokemonType(cid).type1, getPokemonType(cid).type2
    
    if not typeTable[spellRace] then 
        local remover = removeSpellInXML(doCorrectString(name), spellNameFromAttacker)
        if remover then print("Magia: " .. spellNameFromAttacker .. " removida do XML: " .. doCorrectString(name) .. ".xml") end
        return 0
    end
    if isInArray(typeTable[spellRace].super, pokeElement1) or isInArray(typeTable[spellRace].super, pokeElement2) then -- elemento atacante ser mais forte que os elementos de defesa
        value = value * 1.3
    elseif isInArray(typeTable[spellRace].week, pokeElement1) or isInArray(typeTable[spellRace].week, pokeElement2) then -- elemento atacante ser mais forte que os elementos de defesa
        value = value
    elseif isInArray(typeTable[spellRace].non, pokeElement1) or isInArray(typeTable[spellRace].non, pokeElement2) then -- elemento atacante ser mais forte que os elementos de defesa
        value = 0
    end
    
    if getCreatureName(cid) == "Venusaur" and value ~= 0 and isMega(cid) and isInArray({"ice", "fire"}, spellRace)then -- Passiva thick fat
       value = value / 2
    end
    
end
    return value
end

 

n era pra ser weak?

ainda estou tentando arrumar esses danos ridiculos mas sem suceso algum

Link para o comentário
Compartilhar em outros sites

Pro pessoal que ta com problema no efetivo das spells, alterei o código com base na função getResistent que o servidor possui.

Vá em data/lib/106-main functions.lua e procure por: 

function getEffectvineSpell(attacker, spellNameFromAttacker, value, cid)

Altera toda função para essa:

Spoiler


function getEffectvineSpell(attacker, spellNameFromAttacker, value, cid) -- printar os elementos    if(spellNameFromAttacker ~= -1) then -- checagem de efetividades        local name = getCreatureName(attacker) -- reflect system        if isMega(attacker) then         name = getPlayerStorageValue(attacker, storages.isMega)        end                local spellRace, pokeElement1, pokeElement2 = getMoveType(name, spellNameFromAttacker), getPokemonType(cid).type1, getPokemonType(cid).type2                if not typeTable[spellRace] then             local remover = removeSpellInXML(doCorrectString(name), spellNameFromAttacker)            if remover then print("Magia: " .. spellNameFromAttacker .. " removida do XML: " .. doCorrectString(name) .. ".xml") end            return 0        end                local multiplier = 1        if isInArray(typeTable[spellRace].super, pokeElement1) then            multiplier = multiplier + 0.5        end        if pokeElement2 and isInArray(typeTable[spellRace].super, pokeElement2) then            multiplier = multiplier + 0.5        end        if isInArray(typeTable[spellRace].weak, pokeElement1) then            multiplier = multiplier - 0.25        end        if pokeElement2 and isInArray(typeTable[spellRace].weak, pokeElement2) then            multiplier = multiplier - 0.25        end        if isInArray(typeTable[spellRace].non, pokeElement1) then            multiplier = multiplier * 0        end        if pokeElement2 and isInArray(typeTable[spellRace].non, pokeElement2) then            multiplier = multiplier * 0        end        if multiplier == 1.5 and poketype2 == "no type" then            multiplier = 2                                                 elseif multiplier == 0.75 and poketype2 == "no type" then                multiplier = 0.5            elseif multiplier == 1.25 then                multiplier = 1           end                value = value * multiplier            if getCreatureName(cid) == "Venusaur" and value ~= 0 and isMega(cid) and isInArray({"ice", "fire"}, spellRace)then -- Passiva thick fat           value = value / 2        end    end    return valueend


 

 

OBS: Fiz poucos testes.

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...