Esempio n. 1
0
 def triggerEffect(self):
     finder = self.getTarget()
     if finder is None:
         LOG_ERROR('Var finder is not found', self._effect.getTargetID())
         return
     finderType = finder.getType()
     if finderType == chapter.VAR_FINDER_TYPE.GAME_ATTRIBUTE:
         getter = self._tutorial.getVars().get
         args = map(lambda varID: getter(varID, default=varID), finder.getArgs())
         self._tutorial.getVars().set(finder.getTargetID(), game_vars.getAttribute(finder.getName(), *args))
     else:
         LOG_ERROR('Type of setter is not supported', finderType)
Esempio n. 2
0
 def triggerEffect(self):
     finder = self.getTarget()
     if finder is None:
         LOG_ERROR('Var finder is not found', self._effect.getTargetID())
         return
     finderType = finder.getType()
     if finderType == chapter.VAR_FINDER_TYPE.GAME_ATTRIBUTE:
         getter = self._tutorial.getVars().get
         args = map(lambda varID: getter(varID, default=varID),
                    finder.getArgs())
         self._tutorial.getVars().set(
             finder.getTargetID(),
             game_vars.getAttribute(finder.getName(), *args))
     else:
         LOG_ERROR('Type of setter is not supported', finderType)