当前位置: 首页>>代码示例>>Python>>正文


Python Ship类代码示例

本文整理汇总了Python中Ship的典型用法代码示例。如果您正苦于以下问题:Python Ship类的具体用法?Python Ship怎么用?Python Ship使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Ship类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: reInit

 def reInit(self):
     self.sta.name = 'Kongo'
     self.sta.length = 222
     self.sta.propulsion = 150
     self.sta.evasion = 0.04
     self.sta.health = [82, 82, 82, 82, 82, 82, 82, 82]
     self.sta.armor = [94, 94, 94, 94, 94, 94, 94, 94]
     self.sta.weapon = [[Arm.cannon356(), Arm.cannon152(), Arm.cannon152(), Arm.torpedo553(), Arm.torpedo553(), Arm.torpedo553(), Arm.torpedo553()], [Arm.cannon356(), Arm.cannon152(), Arm.cannon152()], [Arm.cannon356(), Arm.cannon152(), Arm.cannon152()], [Arm.cannon356(), Arm.cannon152(), Arm.cannon152()], [Arm.cannon356(), Arm.cannon152(), Arm.cannon152(), Arm.torpedo553(), Arm.torpedo553(), Arm.torpedo553(), Arm.torpedo553()], [Arm.cannon356(), Arm.cannon152(), Arm.cannon152()], [Arm.cannon356(), Arm.cannon152(), Arm.cannon152()], [Arm.cannon356(), Arm.cannon152(), Arm.cannon152()]]
     self.sta.block = [Ship.block(), Ship.block(), Ship.block(), Ship.block(), Ship.block(), Ship.block(), Ship.block(), Ship.block()]
     self.sta.color = (255, 200, 200)
     for i in range(0, 8):
         self.sta.block[i].number = i
         self.sta.block[i].init(self.sta)
     for block in self.sta.block:
         block.armor += self.sta.level
         block.health += self.sta.level
         for weapon in block.weapon:
             weapon.harm += self.sta.level
开发者ID:OkJoe,项目名称:Battleship,代码行数:18,代码来源:ShipSta.py

示例2: run

def run():
	print '--> mission The Space Telescope'

	if not ship.enableDefense():
		return False

	if not overview.activateAccelerationGate():
		return False

	if not overview.switchTo('lcs'):
		return False

	if not overview.lockTarget('guristas_space', 15):
		return False

	if not drones.launchSmall():
		return False

	ship.fireOnce()

	drones.engage()

	if not general.openMissionDetails():
		return False

	if not general.missionObjectiveComplete():
		return False

	if not drones.back():
		return False

	print '<-- mission The Space Telescope\n'
	return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:33,代码来源:TheSpaceTelescope.py

示例3: run

def run():
	print '--> mission Seek And Destroy'

	if not ship.enableDefense():
		return False

	if not general.openMissionDetails():
		return False

	if not overview.activateAccelerationGate():
		return False

	if not ship.enableAfterburn():
		return False

	if not drones.launchSmall():
		return False

	overview.seekAndDestory()

	if not general.missionObjectiveComplete():
		return False

	if not drones.back():
		return False

	print '<-- mission Seek And Destroy\n'
	return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:28,代码来源:SeekAndDestory.py

示例4: run

def run():
	print '--> mission The Rogue Slave Trader (1 of 2)'

	if not ship.enableDefense():
		return False

	if not drones.launchSmall():
		return False

	overview.seekAndDestory()

	if not overview.switchTo('lcs'):
		return False

	if not overview.lockTarget('slave_pen'):
		return False

	ship.approach()

	ship.enableAfterburn()

	time.sleep(10)

	if not drones.engage():
		return False

	while not overview.pickCargo():
		pass

	if not drones.back():
		return False

	print '<-- mission The Rogue Slave Trader (1 of 2)\n'
	return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:34,代码来源:TheRogueSlaveTrader1.py

示例5: run

def run():
	print '--> mission Deadly Arrival'

	if not ship.enableDefense():
		return False

	if not overview.switchTo('lco'):
		return False

	if not overview.lockTarget('ruined_structure'):
		return False

	if not ship.approach():
		return False

	if not ship.enableAfterburn():
		return False

	if not general.openMissionDetails():
		return False

	if not general.missionObjectiveComplete():
		return False

	print '<-- mission Deadly Arrival\n'
	return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:26,代码来源:DeadlyArrival.py

示例6: run

def run():
	print '--> mission New Frontiers - Asnendanne (7 of 7)'

	if not ship.enableDefense():
		return False

	if not general.openMissionDetails():
		return False

	ship.enableAfterburn()

	if not overview.activateAccelerationGate():
		return False

	print 'pocket 1'

	if not drones.launchSmall():
		return False

	overview.seekAndDestory()

	if not general.missionObjectiveComplete():
		return False

	if not drones.back():
		return False


	print '<-- mission New Frontiers - Asnendanne (7 of 7)\n'
	return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:30,代码来源:NewFrontiers7.py

示例7: run

def run():
    print "--> mission Intercept the Pirate Smugglers"

    result = None
    begin = time.time()
    while not result and time.time() - begin < 5:
        time.sleep(0.2)
        result = findAtFull("close")
    if result:
        mouse.leftClickAtP(result)

    if not ship.enableDefense():
        return False

    if not drones.launchSmall():
        return False

    if not general.openMissionDetails():
        return False

    ship.enableAfterburn()

    overview.seekAndDestory()

    if not general.missionObjectiveComplete():
        return False

    if not drones.back():
        return False

    print "<-- mission Intercept the Pirate Smugglers\n"
    return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:32,代码来源:InterceptThePirateSmugglers.py

示例8: run

def run():
	print '--> mission Smuggler lnterteption'

	if not ship.enableDefense():
		return False

	# 2 pockets
	for i in range(2):

		if not overview.activateAccelerationGate():
			return False

		print 'pocket ' + str(i+1)

		if not drones.launchSmall():
			return False

		ship.enableAfterburn()	

		overview.seekAndDestory()

		if not drones.back():
			return False

	# loot grustas personal transport
	while not overview.pickTarget('guristas_personnel'):
		pass

	print '<-- mission Smuggler lnterteption\n'
	return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:30,代码来源:Smugglerlnterteption.py

示例9: run

def run():
	print '--> mission Retribution'

	if not ship.enableDefense():
		return False

	if not overview.activateAccelerationGate():
		return False

	if not overview.switchTo('lcs'):
		return False

	if not overview.lockTarget('guristas_outpost', 5):
		return False

	if not general.openMissionDetails():
		return False

	if not drones.launchSentry():
		return False

	ship.fireOnce()

	drones.engage()

	if not general.missionObjectiveComplete():
		return False

	if not drones.back():
		return False

	print '<-- mission Retribution\n'
	return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:33,代码来源:Retribution.py

示例10: run

def run():
	print '--> mission Rogue Drone Harassment'

	if not ship.enableDefense():
		return False

	# 2 pockets
	for i in range(2):

		if not overview.activateAccelerationGate():
			return False

		print 'pocket ' + str(i+1)

		if not drones.launchSmall():
			return False

		ship.enableAfterburn()	

		overview.seekAndDestory()

		if not drones.back():
			return False

	print '<-- mission Rogue Drone Harassment\n'
	return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:26,代码来源:RogueDroneHarassment.py

示例11: run

def run():
	print '--> mission Angel Extravaganza'

	if not ship.enableDefense():
		return False

	# 5 pockets
	for i in range(5):

		if not overview.activateAccelerationGate():
			return False

		print 'pocket ' + str(i+1)

		if not drones.launchSmall():
			return False

		ship.enableAfterburn()	

		overview.seekAndDestory()

		if not drones.back():
			return False

	print '<-- mission Angel Extravaganza\n'
	return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:26,代码来源:AngelExtravaganza.py

示例12: run

def run():
	print '--> mission Eliminate the Pirate Campers'

	if not ship.enableDefense():
		return False

	if not drones.launchSentry():
		return False

	if not overview.switchTo('battle'):
		return False

	begin = time.time()
	result = None
	while not result and time.time() - begin < 5:
		result = findAtFull('close')
	if result:
		mouse.leftClickAtP(result)

	# kill small

	count = 0
	while count < 4:
		result = overview.lockTarget('s', 1)
		if result:
			count += 1

	begin = time.time()
	while time.time() - begin < 120:
		overview.lockTarget('s', 1)
		ship.fireOnce()
		drones.engage()

	if not drones.back():
		return False

	# seek and destory

	if not general.openMissionDetails():
		return False

	ship.enableAfterburn()

	if not drones.launchSmall():
		return False

	overview.seekAndDestory()

	if not general.missionObjectiveComplete():
		return False

	if not drones.back():
		return False

	print '<-- mission Eliminate the Pirate Campers\n'
	return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:56,代码来源:EliminateThePirateCampers.py

示例13: run

def run():
	print '--> mission The Spy Stash'

	if not ship.enableDefense():
		return False

	if not overview.activateAccelerationGate():
		return False

	# pocket 1 direct access

	ship.enableAfterburn()	

	if not overview.activateAccelerationGate():
		return False

	# pocket 2
	if not drones.launchSmall():
		return False

	ship.enableAfterburn()	

	overview.seekAndDestory()

	if not drones.back():
		return False

	result = findAtOverview('officers')
	if not result:
		return False
	mouse.doubleClickAtP(result)

	print 'wait until cargo open'
	result = None
	while not result:
		time.sleep(0.5)
		result = findAtFull('report')
	mouse.leftDownAtP(result)

	result = findAtFull('ship', 0.5)
	if not result:
		mouse.leftUp()
		return False
	mouse.moveToP(result)
	mouse.leftUp()
	time.sleep(2)

	result = findAtFull('x')
	if not result:
		return False
	mouse.leftClickAtP(result)

	print '<-- mission The Spy Stash\n'
	return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:54,代码来源:TheSpyStash.py

示例14: run

def run():
	print '--> mission The Score'

	if not ship.enableDefense():
		return False

	if not overview.activateAccelerationGate():
		return False

	# pocket 1

	if not drones.launchSmall():
		return False

	ship.enableAfterburn()	

	overview.seekAndDestory()

	if not drones.back():
		return False

	if not overview.activateAccelerationGate():
		return False

	# pocket 2
	if not overview.switchTo('battle'):
		return False

	for i in range(4):
		overview.lockTarget('s', 1)

	drones.launchSentry()

	time.sleep(20)

	begin = time.time()
	while time.time() - begin < 100:
		ship.fireOnce()
		drones.engage()
		overview.lockEnemy(1)

	drones.back()

	ship.enableAfterburn()	

	if not drones.launchSmall():
		return False

	ship.fireOnce()

	overview.seekAndDestory()

	if not drones.back():
		return False

	print '<-- mission The Score\n'
	return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:57,代码来源:TheScore.py

示例15: run

def run():
	print '--> mission Break Their Will'

	if not ship.enableDefense():
		return False

	if not overview.switchTo('lcs'):
		return False

	if not overview.lockTarget('repair_station'):
		return False

	if not general.openMissionDetails():
		return False

	if not drones.launchSentry():
		return False

	if not drones.engage():
		return False

	if not general.missionObjectiveComplete():
		return False

	if not drones.back():
		return False

	print '<-- mission Break Their Will\n'
	return True
开发者ID:kidsang,项目名称:EVE-Script-2,代码行数:29,代码来源:BreakTheirWill.py


注:本文中的Ship类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。