#!/usr/bin/python3

"""Statistics module
"""
from experience import Experience

NATURES = {'serious' : [1, 1, 1, 1, 1, 1]}

class Statistics(Experience):

    def __init__(self, nature='serious', stats=None, base=(0, 0, 0, 0, 0, 0),
                 evs=(0, 0, 0, 0, 0, 0), ivs=(0, 0, 0, 0, 0, 0), exp_group='slow',
                 current_exp=0):

        super().__init__(exp_group=exp_group, current_exp=current_exp)

        self.base = base
        self.evs = evs
        self.ivs = ivs
        self.nature = NATURES[nature]
        if stats is None:
            self.stats = self.get_stats(self.base, self.evs, self.ivs, self.nature)
        else:
            self.stats = stats

    def get_stats(self, base, evs, ivs, nature):
        stats = [0, 0, 0, 0, 0, 0]

        for stat in len(stats):
            if stat == 0:
                stats[stat] = (((2 * base[stat] + ivs[stat] + (evs[stat]/4)) * \
                    self.current_level) / 100)+ self.current_level + 10
            else:
                stats[stat] = (((((2 * base[stat] + ivs[stat] + (evs[stat]))* self.current_level)\
                    /100)+5) * nature[stat])
    #
    # def set_evs(self, evs):
    #     # Set ev list to new ev list, run set_stats at end
    #
    # def ivs(self, ivs):
    #     # Set iv list to new iv list, run set_stats at end
    #
    # def set_nature(self, nature):
    #     # Set nature to new nature, then set_stats
    #
    # def nature_effect(self, nature):
    #     # Applies nature impact to stats, to be run in set_stats

def value_check(nature='serious', stats=None, base=(0, 0, 0, 0, 0, 0),
                evs=(0, 0, 0, 0, 0, 0), ivs=(0, 0, 0, 0, 0, 0)):
    if nature not in NATURES:
        raise ValueError("nature must be one of {}, {} was given".format(
            NATURES.keys(), nature))


if __name__ == '__main__':
    a = Statistics(nature='serious', stats=[100, 100, 100, 100, 100, 100], current_exp=10000)
    print(a.current_level)

@@ -47,80 +47,98 @@
 rom 
-experience import Experience%0A%0ANATURES = %7B'serious' : %5B1, 1, 1, 1, 1, 1%5D%7D
+db_queries import query_get_only_base, query_get_nature%0Afrom experience import Experience%0A
 %0A%0Acl
@@ -184,24 +184,48 @@
 init__(self,
+ dex_no=None, form=None,
  nature='ser
@@ -234,39 +234,56 @@
 us', stats=None,
+%0A                
  base=
-(
+%5B
 0, 0, 0, 0, 0, 0
@@ -286,33 +286,16 @@
 0, 0
-),%0A                
+%5D,
  evs=
-(
+%5B
 0, 0
@@ -302,32 +302,49 @@
 , 0, 0, 0, 0
-),
+%5D,%0A                
  ivs=
-(
+%5B
 0, 0, 0, 0, 
@@ -347,17 +347,17 @@
  0, 0, 0
-)
+%5D
 , exp_gr
@@ -367,33 +367,16 @@
 ='slow',
-%0A                
  current
@@ -461,33 +461,8 @@
 p)%0A%0A
-        self.base = base%0A
     
@@ -520,32 +520,155 @@
 elf.
-nature = NATURES%5B
+base = base%0A        if dex_no is not None:%0A            self.base = query_get_only_base(dex_no, form)%0A        self.nature = query_get_nature(
 nature
-%5D
+)
 %0A   
@@ -925,16 +925,22 @@
 stat in 
+range(
 len(stat
@@ -941,18 +941,43 @@
 n(stats)
+)
 :%0A
+            print(stat)%0A
         
@@ -1024,16 +1024,20 @@
 stat%5D = 
+int(
 (((2 * b
@@ -1150,16 +1150,17 @@
 vel + 10
+)
 %0A       
@@ -1200,16 +1200,20 @@
 stat%5D = 
+int(
 (((((2 *
@@ -1252,35 +1252,16 @@
 tat%5D))* 
-self.current_level)
 %5C%0A      
@@ -1278,14 +1278,37 @@
     
-/
+self.current_level) / 
 100)
-+
+ + 
 5) *
@@ -1321,16 +1321,38 @@
 e%5Bstat%5D)
+)%0A        return stats
 %0A    #%0A 
@@ -1742,16 +1742,18 @@
 _stats%0A%0A
+# 
 def valu
@@ -1815,16 +1815,18 @@
  0, 0),%0A
+# 
         
@@ -1878,24 +1878,26 @@
  0, 0, 0)):%0A
+# 
     if natur
@@ -1914,16 +1914,18 @@
 ATURES:%0A
+# 
         
@@ -1990,16 +1990,18 @@
 format(%0A
+# 
         
@@ -2081,64 +2081,35 @@
 ics(
-nature='serious', stats=%5B100, 100, 100, 100, 100, 100%5D, 
+dex_no=3, nature='adamant',
 curr
@@ -2116,17 +2116,17 @@
 ent_exp=
-1
+5
 0000)%0A  
@@ -2150,8 +2150,27 @@
 _level)%0A
+    print(a.stats)%0A

Use query to get base stats