Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Pokémon in cc
- By martmists
- made on a mobile phone, not yet explained well.
- NOTE: This is only the bèta version! Current options:
- Create pkmn
- Levelup pkmn
- Add to moveset
- Evolve pkmn
- --]]
- Function newpkmn(typepkmn, lvl, moveset, abilitypkmn, statspkmn, nickname)
- Newpkmn = {type = typepkmn, level = lvl, moves = moveset, ability = abilitypkmn, stats = statspkmn, nick = nickname}
- End
- -- e.g. Newpkmn("Snivy",5,{upleft = "Tackle", upright = "Leer", downleft = nil, downright = nil},"Contrary",{Hp = 20, atk = 10, def = 10, spatk = 10, spdef = 10, spd = 10},"lolz grass starter")
- -- a pokemon must always have at least 2 moves. Also, a nickname is not required, so if you dont want one leave it nil.
- Function LearnMove(move)
- If not downright == nil then
- Override = true
- Else
- Override = false
- End
- If not Override then
- If Newpkmn.moves.downleft == nil then
- Newpkmn.moves.downleft = move
- Else
- Newpkmn.moves.downright = move
- End
- Else
- Print("Choose a move to delete.")
- For i = 1,4 do
- Print(Newpkmn.moves[i]\n)
- End
- While not correctmove do
- Deletemove = read()
- For i = 1,4 do
- If Deletemove == Newpkmn.moves[i] then
- Correctmove = true
- End
- End
- End
- For key, value in pairs(Newpkmn.moves) do
- If value == Deletemove then
- key = move
- End
- End
- End
- Function CheckEvolve(pkmntype,pkmnlvl)
- If pkmntype[pkmnlvl]["evolve"]["bool"] then
- Evolve(pkmntype[pkmnlvl]["evolve"]["newpkmn"]
- End
- end
- -- e.g. snivy evolves at lvl 17 into servine, do
- -- Snivy = {17 = {Evolve = {bool = true, newpkmn = "Servine"}}
- Function CheckMoves(pkmntype,pkmnlvl)
- If pkmntype[pkmnlvl]["move"]["bool"] then
- LearnMove(pkmntype[pkmnlvl]["move"]["move"])
- End
- End
- -- to make e.g. snivy learn vine whip at lvl 7 and wrap at lvl 10, do this:
- -- Snivy = {7 = {move = {bool = true, move = "Vine Whip"}},10 = {move = {bool = true, move = "Wrap"}}}
- -- this can be combined with evolution, just remember evolution comes before moves.
- -- Snivy = {7 = {move = {bool = true, move = "Vine Whip"}},10 = {move = {bool = true, move = "Wrap"}}, 17 = {evolve = {bool = true, newpkmn = "Servine"}}}
- -- this can all be done in parts, e.g.
- --[[
- Snivy.7.move = {bool = true, move = "Vine Whip"}
- Snivy.17.evolve.newpkmn = "Servine"
- Snivy.17.evolve.bool = true
- etc.
- Note that if you want SERVINE to learn a move after it has evolved from snivy you need to do servine.17.etc.
- --]]
- Function levelup()
- Newpkmn.level = Newpkmn.level + 1
- CheckEvolve(Newpkmn.type, Newpkmn.level)
- CheckMoves(Newpkmn.type,Newpkmn.level)
- End
Advertisement
Add Comment
Please, Sign In to add comment