def place_encounters(self, new_map):
		print("new_map: {}".format(new_map))
		print("place_encounters.encounters_placed == {}".format(self.encounters_placed))
		startup_zmod.zmod_templeplus_config_apply()
		startup_zmod.zmod_conditions_apply_pc()

		if (self.encounters_placed and new_map == 0): return

		this_entrance_time = toee.game.time.time_game_in_hours2(toee.game.time)
		print("this_entrance_time == {}".format(this_entrance_time))
		if (not self.encounters_placed):
			self.first_entered_shrs = this_entrance_time
		self.last_entered_shrs = this_entrance_time
		if (not self.last_leave_shrs):
			self.last_leave_shrs = this_entrance_time

		if (not self.encounters_placed):
			pass

		self.encounters_placed += 1
		self.factions_existance_refresh()
		self.check_sleep_status_update(1)

		utils_obj.scroll_to_leader()
		return
示例#2
0
    def place_encounters(self, new_map):
        print("new_map: {}".format(new_map))
        print("place_encounters.encounters_placed == {}".format(
            self.encounters_placed))
        startup_zmod.zmod_templeplus_config_apply()
        startup_zmod.zmod_conditions_apply_pc()

        if (self.encounters_placed and new_map == 0): return

        this_entrance_time = toee.game.time.time_game_in_hours2(toee.game.time)
        print("this_entrance_time == {}".format(this_entrance_time))
        if (not self.encounters_placed):
            self.first_entered_shrs = this_entrance_time
        self.last_entered_shrs = this_entrance_time
        if (not self.last_leave_shrs):
            self.last_leave_shrs = this_entrance_time

        if (not self.encounters_placed):
            self.place_encounter_j01()
            self.place_encounter_j02()

        self.encounters_placed += 1
        self.factions_existance_refresh()
        self.check_sleep_status_update(1)

        #toee.game.fade_and_teleport(0, 0, 0, self.get_map_default(), 479, 494) #smith
        #toee.game.fade_and_teleport(0, 0, 0, self.get_map_default(), 466, 468) #near fontain entrance
        utils_obj.scroll_to_leader()
        return
示例#3
0
	def place_encounters(self, new_map):
		print("new_map: {}".format(new_map))
		print("place_encounters.encounters_placed == {}".format(self.encounters_placed))
		startup_zmod.zmod_templeplus_config_apply()
		startup_zmod.zmod_conditions_apply_pc()

		if (self.encounters_placed and new_map == 0): return

		this_entrance_time = toee.game.time.time_game_in_hours2(toee.game.time)
		print("this_entrance_time == {}".format(this_entrance_time))
		if (not self.encounters_placed):
			self.first_entered_shrs = this_entrance_time
		self.last_entered_shrs = this_entrance_time
		if (not self.last_leave_shrs):
			self.last_leave_shrs = this_entrance_time

		if (not self.encounters_placed):
			self.create_npc_at(utils_obj.sec2loc(478, 508), py14710_smith.CtrlVillageSmith, const_toee.rotation_0900_oclock, "merchant", "smith", None, 0, 1)
			self.create_npc_at(utils_obj.sec2loc(476, 505), py14711_smith_wife.CtrlVillageSmithWife, const_toee.rotation_0800_oclock, "merchant", "smith_wife", None, 0, 1)
			self.create_npc_at(utils_obj.sec2loc(503, 477), py14712_wizard.CtrlVillageWizard, const_toee.rotation_0200_oclock, "merchant", "wizard", None, 0, 1)
			self.create_npc_at(utils_obj.sec2loc(494, 506), py14713_priest.CtrlVillagePriest, const_toee.rotation_1100_oclock, "merchant", "priest", None, 0, 1)
			self.create_npc_at(utils_obj.sec2loc(475, 475), py14714_mayor.CtrlVillageMayor, const_toee.rotation_1000_oclock, "authority", "mayor", None, 0, 1)
			self.generate_crowd()

		self.encounters_placed += 1
		self.factions_existance_refresh()
		self.check_sleep_status_update(1)

		#toee.game.fade_and_teleport(0, 0, 0, self.get_map_default(), 479, 494) #smith
		toee.game.fade_and_teleport(0, 0, 0, self.get_map_default(), 466, 468) #near fontain entrance
		utils_obj.scroll_to_leader()
		return
示例#4
0
def san_first_heartbeat(attachee, triggerer):
    assert isinstance(attachee, toee.PyObjHandle)
    #print(attachee.id)
    #debug.breakp("san_first_heartbeat")
    startup_zmod.zmod_templeplus_config_apply()
    if (attachee.map != coe_consts.MAP_ID_CRYPT_LV1): toee.RUN_DEFAULT
    ctrl = CtrlCryptLv1.ensure(attachee)
    ctrl.place_encounters(0)
    return toee.RUN_DEFAULT
def san_first_heartbeat(attachee, triggerer):
	assert isinstance(attachee, toee.PyObjHandle)
	#print(attachee.id)
	#debug.breakp("san_first_heartbeat")
	startup_zmod.zmod_templeplus_config_apply()
	if (attachee.map != rev_consts.MAP_ID_CASTLE_DUNGEON): toee.RUN_DEFAULT
	ctrl = CtrlCastleDungeon.ensure(attachee)
	ctrl.place_encounters(0)
	return toee.RUN_DEFAULT
示例#6
0
def san_heartbeat_disable(attachee, triggerer):
    assert isinstance(attachee, toee.PyObjHandle)
    #debug.breakp("san_heartbeat")
    if (attachee.map != coe_consts.MAP_ID_CRYPT_LV1): toee.RUN_DEFAULT
    startup_zmod.zmod_templeplus_config_apply()
    ctrl = cs()
    if (not ctrl):
        ctrl = CtrlCryptLv1.ensure(attachee)
        ctrl.place_encounters(1)
    if (ctrl):
        ctrl.heartbeat()
    return toee.RUN_DEFAULT
示例#7
0
def san_heartbeat(attachee, triggerer):
    assert isinstance(attachee, toee.PyObjHandle)
    #debug.breakp("san_heartbeat")
    if (attachee.map != MAP_ID_VILLAGE): toee.RUN_DEFAULT
    startup_zmod.zmod_templeplus_config_apply()
    ctrl = cs()
    if (not ctrl):
        ctrl = CtrlVillage.ensure(attachee)
        ctrl.place_encounters(1)
    if (ctrl):
        ctrl.heartbeat()
    return toee.RUN_DEFAULT
示例#8
0
def load(savename):
    Storage.load(savename)
    Co8PersistentData.load(savename)
    startup_zmod.zmod_templeplus_config_apply()