OSDN Git Service

add alchemy simulator
[amulettoolsmh4/main.git] / model / db_accessor.py
index 9544ae6..48bc233 100644 (file)
@@ -17,6 +17,7 @@ from seed2thresholdtable import Seed2ThresholdTableAccessor
 from seed2inishietable import Seed2InishieTableAccessor
 from sufficienttable import SufficientTableAccessor
 from seed1tenuntable import Seed1TenunTableAccessor
+from alchemysimulator import AlchemySimulator
 
 class DataBaseAccessor(object):
     u""" this is access class to database """
@@ -35,6 +36,7 @@ class DataBaseAccessor(object):
         self._acc_seed2inishie = Seed2InishieTableAccessor(self._cursor)
         self._acc_sufficient = SufficientTableAccessor(self._cursor)
         self._acc_seed1tenun = Seed1TenunTableAccessor(self._cursor)
+        self._simulator = AlchemySimulator(self._cursor)
 
         self._minmax_dict_by_name = self._acc_minmax.get_minmax_by_name()
 
@@ -145,6 +147,30 @@ class DataBaseAccessor(object):
         else:
             return None
 
+    def simulate_nazo(self, seed1, seed2):
+        u""" なぞの錬金
+        return (skill1_name, skill1_val, skill2_name, skill2_val, slot_num, type_name)
+        """
+        return self._simulator.alchemy_nazo_name(seed1, seed2)
+
+    def simulate_komyou(self, seed1, seed2):
+        u""" 光明の錬金
+        return (skill1_name, skill1_val, skill2_name, skill2_val, slot_num, type_name)
+        """
+        return self._simulator.alchemy_komyou_name(seed1, seed2)
+
+    def simulate_inishie(self, seed1, seed2):
+        u""" いにしえの錬金
+        return (skill1_name, skill1_val, skill2_name, skill2_val, slot_num, type_name)
+        """
+        return self._simulator.alchemy_inishie_name(seed1, seed2)
+
+    def simulate_tenun(self, seed1, seed2, alchemy_key):
+        u""" 天運の錬金
+        return list of (skill1_name, skill1_val, skill2_name, skill2_val, slot_num, type_name)
+        """
+        return self._simulator.alchemy_tenun_name(seed1, seed2, alchemy_key)
+
     def close(self):
         u""" close database accessor """
         self._cursor.close()