dtalley11

Example.js

Feb 2nd, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /** Expanded and flattened data structures are seen the same way by the node.js, but flattened structures tend to be more difficult for people to read and expanded structures use more resources to host
  2.  
  3. Structures will be modified and created while expanded (also easier to see typos) but implemented after they have been flattened
  4.  
  5. My other version of this, when I was just making myself some quite notes can be found here: http://pastebin.com/dj1FrW7f
  6. **/
  7.  
  8. //Examples:
  9.  
  10. // Pokedex.js (flattened)
  11. syclar:{num:-101,species:"Syclar",types:["Ice","Bug"],genderRatio:{M:0.5,F:0.5},baseStats:{hp:40,atk:76,def:45,spa:74,spd:39,spe:91},abilities:{0:"Compound Eyes",1:"Snow Cloak"},heightm:0.2,weightkg:4.0,color:"",evos:["syclant"],eggGroups:["Bug"]}
  12.  
  13. // Pokedex.js (expanded)
  14. syclar:{
  15.     num:-101, // Pokedex Number
  16.     species:"Syclar", // Friendly Species name (can use caps and space)
  17.     types:["Ice","Bug"], // List of types (["type"] for mono or ["typea","typeb"] for dual types)
  18.     genderRatio:{M:0.5,F:0.5}, // Genderless pokemon and pokemon with only 1 gender are done using gender:"N", gender:"M"/"F"
  19.     baseStats:{hp:40,atk:76,def:45,spa:74,spd:39,spe:91},
  20.     abilities:{0:"Compound Eyes",1:"Snow Cloak"}, // {index:"string"}
  21.     heightm:0.2,
  22.     weightkg:4.0,
  23.     color:"", // if this has no color, make it a empty string
  24.     evos:["syclant"], // don't bother defining this if it does not evolve
  25.     eggGroups:["Bug"] // another list ["group"] or ["groupa","groupb"]
  26. },
  27.  
  28. // Learnset.js (flattened)
  29. /**
  30. This DOES NOT need to be in alphabetical order
  31. L is moves learned when leveling up (xLy where x is the generation and y is the level it learns it)
  32. T is Moves learned from the Tutor (xT, where x is the generation)
  33. M is Learned from a Technical or Hidden Machine (TM/HM) (xM where x is the generation)
  34. E is for Egg Moves (xE where x is the generation)
  35. **/
  36. syclar:{learnset:{furyattack:["6L1"],leer:["6L1"],leachlife:["6L5"],iceshard:["6L8"],focusenergy:["6L13"],icywind:["6L18"],xscissor:["6L23"],hail:["6L28"],bugbuzz:["6L42"],sheercold:["6L49"],bugbite:["6T"],counter:["6T"],earthpower:["6T"],furycutter:["6T"],icywind:["6T"],mimic:["6T"],snore:["6T"],stringshot:["6T"],superpower:["6T"],waterpulse:["6M"],toxic:["6M"],hail:["6M"],hiddenpower:["6M"],taunt:["6M"],icebeam:["6M"],blizzard:["6M"],protect:["6M"],frustration:["6M"],"return":["6M"],doubleteam:["6M"],facade:["6M"],secretpower:["6M"],rest:["6M"],attract:["6M"],falseswipe:["6M"],fling:["6M"],endure:["6M"],silver Wind:["6M"],avalanche:["6M"],swordsdance:["6M"],captivate:["6M"],xscissor:["6M"],sleeptalk:["6M"],naturalgift:["6M"],swagger:["6M"],uturn:["6M"],substitute:["6M"],cut:["6M"],earthpower:["6E"],pinmissile:["6E"],spikes:["6E"],superpower:["6E"],tailglow:["6E"]}},
  37.  
  38. // Learnset.js (expanded)  
  39. syclar:{
  40.     learnset:{
  41.         furyattack:["6L1"],
  42.         leer:["6L1"],
  43.         leachlife:["6L5"],
  44.         iceshard:["6L8"],
  45.         focusenergy:["6L13"],
  46.         icywind:["6L18"],
  47.         xscissor:["6L23"],
  48.         hail:["6L28"],
  49.         bugbuzz:["6L42"],
  50.         sheercold:["6L49"],
  51.         bugbite:["6T"],
  52.         counter:["6T"],
  53.         earthpower:["6T"],
  54.         furycutter:["6T"],
  55.         icywind:["6T"],
  56.         mimic:["6T"],
  57.         snore:["6T"],
  58.         stringshot:["6T"],
  59.         superpower:["6T"],
  60.         waterpulse:["6M"],
  61.         toxic:["6M"],
  62.         hail:["6M"],
  63.         hiddenpower:["6M"],
  64.         taunt:["6M"],
  65.         icebeam:["6M"],
  66.         blizzard:["6M"],
  67.         protect:["6M"],
  68.         frustration:["6M"],
  69.         // Return needs to be in quotes otherwise JS thinks it's the function return
  70.         "return":["6M"],
  71.         doubleteam:["6M"],
  72.         facade:["6M"],
  73.         secretpower:["6M"],
  74.         rest:["6M"],
  75.         attract:["6M"],
  76.         falseswipe:["6M"],
  77.         fling:["6M"],
  78.         endure:["6M"],
  79.         silverwind:["6M"],
  80.         avalanche:["6M"],
  81.         swordsdance:["6M"],
  82.         captivate:["6M"],
  83.         xscissor:["6M"],
  84.         sleeptalk:["6M"],
  85.         naturalgift:["6M"],
  86.         swagger:["6M"],
  87.         uturn:["6M"],
  88.         substitute:["6M"],
  89.         cut:["6M"],
  90.         earthpower:["6E"],
  91.         pinmissile:["6E"],
  92.         spikes:["6E"],
  93.         superpower:["6E"],
  94.         tailglow:["6E"]
  95.     }
  96. },
  97.  
  98. //formats-data.js (flattened)
  99. syclar: {
  100.     viableMoves: {"furyattack":1,"leer":1,"leechlife":1,"iceshard":1,"focusenergy":1,"icywind":1,"x-scissor":1,"hail":1},
  101.     isNonstandard: true,
  102.     tier: "CAP"
  103. }
  104. //formats-data.js (expanded)
  105. syclar: {
  106.     viableMoves:{ // I don't know what the 1 is for, but every move for every pokemon is like this
  107.         "furyattack":1,
  108.         "leer":1,
  109.         "leechlife":1,
  110.         "iceshard":1,
  111.         "focusenergy":1,
  112.         "icywind":1,
  113.         "x-scissor":1,
  114.         "hail":1
  115.     },
  116.     isNonstandard: true,
  117.     tier: "CAP"
  118. },
Advertisement
Add Comment
Please, Sign In to add comment