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


Python Player.editTime方法代码示例

本文整理汇总了Python中Player.editTime方法的典型用法代码示例。如果您正苦于以下问题:Python Player.editTime方法的具体用法?Python Player.editTime怎么用?Python Player.editTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Player的用法示例。


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

示例1: attack

# 需要导入模块: import Player [as 别名]
# 或者: from Player import editTime [as 别名]
def attack(): #Gestion du combat
	if Map.isMonster(Player.getPosition()) == 0:
		descript = "Qui voulez-vous attaquer dites-moi? Les murs?"
	else :
		playerPow = Player.getPower()
		monsterPow = Map.getMonsterPower(Player.getPosition())
		player1, player2, monster1, monster2 = random.randint(1,6),random.randint(1,6),random.randint(1,6),random.randint(1,6)
		if Player.isEquip() == 1:
			equipPow = Player.getEquipModifier()
		else:
			equipPow = 0
		descript = "Vous chargez tous les deux."
		if playerPow+player1+player2+equipPow >= monsterPow+monster1+monster2:
			Map.editMonsterHealth(Player.getPosition(),-2)
			descript += "Vous blessez votre adversaire."
		else:
			if random.randint(1,6) == 6:
				Player.editHealth(-2)
			else:
				Player.editHealth(-1)
			descript += "Votre adversaire vous blesse. "
		if Map.getMonsterHealth(Player.getPosition()) <= 0:
			descript += "CE coup lui est fatal. Son corps tombe tel un pantin desarticule et, quelques secondes plus tard, il se desintegre." 
			Player.editXp(Map.getMonsterXp(Player.getPosition()))
			Map.removeMonster(Player.getPosition())
	Player.editTime(1)
	return descript
开发者ID:ForgetfulMuffin,项目名称:The-Shades,代码行数:29,代码来源:GameFR.py

示例2: attack

# 需要导入模块: import Player [as 别名]
# 或者: from Player import editTime [as 别名]
def attack(): #Gestion du combat
	if Map.isMonster(Player.getPosition()) == 0:
		descript = "Tell me, who are you trying to fight? The walls perhaps?"
	else :
		playerPow = Player.getPower()
		monsterPow = Map.getMonsterPower(Player.getPosition())
		player1, player2, monster1, monster2 = random.randint(1,6),random.randint(1,6),random.randint(1,6),random.randint(1,6)
		if Player.isEquip() == 1:
			equipPow = Player.getEquipModifier()
		else:
			equipPow = 0
		descript = "You both charge at the other."
		if playerPow+player1+player2+equipPow >= monsterPow+monster1+monster2:
			Map.editMonsterHealth(Player.getPosition(),-2)
			descript += "You hit your opponent."
		else:
			if random.randint(1,6) == 6:
				Player.editHealth(-2)
			else :
				Player.editHealth(-1)
			descript += "Your opponent hits you. "
		if Map.getMonsterHealth(Player.getPosition()) <= 0:
			descript += "THIS blow is deadly. It's body falls like a ragdoll and, a few seconds later, it disintegrates." 
			Player.editXp(Map.getMonsterXp(Player.getPosition()))
			Map.removeMonster(Player.getPosition())
	Player.editTime(1)
	return descript
开发者ID:ForgetfulMuffin,项目名称:The-Shades,代码行数:29,代码来源:GameEN.py

示例3: move

# 需要导入模块: import Player [as 别名]
# 或者: from Player import editTime [as 别名]
def move(direction): # Deplace le joueur si possible
    flee = random.randint(1,6)
    if Map.isMonster(Player.getPosition()) == 0 or flee == 6:
        answer = Map.check(Player.getPosition(),direction)
        if answer == 0:
            return 'Il y a un mur dans cette direction'
        elif answer == 1 :
            Player.move(direction)
            Player.editTime(10)
            return Map.getDescript(Player.getPosition())
        else :
            win()
            exitGame()
    else:
        Player.editHealth(-1)
        Player.editTime(1)
        return "Votre adversaire vous attrappe par le col et frappe a l'estomac. Battez-vous que diable!"
开发者ID:ValentinPearce,项目名称:The-Shades,代码行数:19,代码来源:OriginalGame.py

示例4: move

# 需要导入模块: import Player [as 别名]
# 或者: from Player import editTime [as 别名]
def move(direction): # Deplace le joueur si possible
    flee = random.randint(1,6)
    if Map.isMonster(Player.getPosition()) == 0 or flee == 6:
        answer = Map.check(Player.getPosition(),direction)
        if answer == 0:
            return "You can't go this way. Unless, of course, you can walk through walls!"
        elif answer == 1 :
            Player.move(direction)
            Player.editTime(10)
            return Map.getDescript(Player.getPosition())
        else :
            win()
            exitGame()
    else:
        Player.editHealth(-1)
        Player.editTime(1)
        return "Votre adversaire vous attrappe par le col et frappe a l'estomac. Battez-vous que diable!"
开发者ID:ValentinPearce,项目名称:The-Shades,代码行数:19,代码来源:Game.py

示例5: move

# 需要导入模块: import Player [as 别名]
# 或者: from Player import editTime [as 别名]
def move(direction): # Deplace le joueur si possible
	global visited
	flee = random.randint(1,6)
	if Map.isMonster(Player.getPosition()) == 0 or flee == 6:
		answer = Map.check(Player.getPosition(),direction)
		if answer == 0:
			return 'There is a wall in this direction.'
		elif answer == 1 :
			Player.move(direction)
			Player.editTime(10)
			if Map.getVisited(Player.getPosition()) == 0:
				Map.setMonster(Player.getPosition(),Player.getLevel())
				Map.setVisited(Player.getPosition())
				visited += 1
			return Map.getDescript(Player.getPosition())
		else :
			win()
			exitGame()
	else:
		Player.editHealth(-1)
		Player.editTime(1)
		return "You opponent pulls you by the collar and punches you in the stomach. Fight for heaven's sake!"
开发者ID:ForgetfulMuffin,项目名称:The-Shades,代码行数:24,代码来源:GameEN.py


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