テスト

テストだっつってんだろハゲ

テストだっつってんだろハゲ

  • タグ:
  • タグはありません
def doWindsofMiasma(argsList):
	ePlayer, eEvent, kTriggeredData = argsList
	iPlayer = kTriggeredData.ePlayer
	pPlayer = gc.getPlayer(iPlayer)
	py = PyPlayer(iPlayer)
	liPromotions = []
	if pPlayer.getStateReligion() != ReligionTypes.NO_RELIGION and gc.getReligionInfo(pPlayer.getStateReligion()).getAlignment() == gc.getInfoTypeForString('ALIGNMENT_EVIL'):
		liPromotions += [	gc.getInfoTypeForString('PROMOTION_DISEASED'),
					gc.getInfoTypeForString('PROMOTION_FEAR'),
					gc.getInfoTypeForString('PROMOTION_FIRE_RESISTANCE'),
					gc.getInfoTypeForString('PROMOTION_FLYING'),
					gc.getInfoTypeForString('PROMOTION_LIGHT'),
					gc.getInfoTypeForString('PROMOTION_MAGIC_IMMUNE'),
					gc.getInfoTypeForString('PROMOTION_MUTATED'),
					gc.getInfoTypeForString('PROMOTION_POISON_RESISTANCE'),
					gc.getInfoTypeForString('PROMOTION_PLAGUED'),
					gc.getInfoTypeForString('PROMOTION_PROPHECY_MARK'),
					gc.getInfoTypeForString('PROMOTION_STIGMATA'),
					gc.getInfoTypeForString('PROMOTION_STONESKIN'),
					gc.getInfoTypeForString('PROMOTION_UNHOLY_TAINT'),
					gc.getInfoTypeForString('PROMOTION_VILE_TOUCH'),
					gc.getInfoTypeForString('PROMOTION_VULNERABLE_TO_FIRE'),
					gc.getInfoTypeForString('PROMOTION_WINTERBORN'),
					gc.getInfoTypeForString('PROMOTION_WITHERED'),
					gc.getInfoTypeForString('PROMOTION_KAIJIN_1'),
					gc.getInfoTypeForString('PROMOTION_MAGIC_WEAKNESS'),
					gc.getInfoTypeForString('PROMOTION_GRAVITATION'),
					gc.getInfoTypeForString('PROMOTION_HOOF'),
					gc.getInfoTypeForString('PROMOTION_FOUR_EYE'),
					gc.getInfoTypeForString('PROMOTION_SLAUGHTER_IMPULSER'),
					gc.getInfoTypeForString('PROMOTION_SHELL'),
					gc.getInfoTypeForString('PROMOTION_HAND_OF_THE_POISON')	]
	elif pPlayer.getStateReligion() == gc.getInfoTypeForString('RELIGION_FELLOWSHIP_OF_LEAVES'):
		liPromotions += [	gc.getInfoTypeForString('PROMOTION_AMPHIBIOUS'),
					gc.getInfoTypeForString('PROMOTION_COLD_RESISTANCE'),
					gc.getInfoTypeForString('PROMOTION_COMMAND1'),
					gc.getInfoTypeForString('PROMOTION_DRILL1'),
					gc.getInfoTypeForString('PROMOTION_FEAR'),
					gc.getInfoTypeForString('PROMOTION_FIRE_RESISTANCE'),
					gc.getInfoTypeForString('PROMOTION_FLYING'),
					gc.getInfoTypeForString('PROMOTION_LIGHT'),
					gc.getInfoTypeForString('PROMOTION_LIGHTNING_RESISTANCE'),
					gc.getInfoTypeForString('PROMOTION_MAGIC_IMMUNE'),
					gc.getInfoTypeForString('PROMOTION_MEDIC1'),
					gc.getInfoTypeForString('PROMOTION_MUTATED'),
					gc.getInfoTypeForString('PROMOTION_NOMAD'),
					gc.getInfoTypeForString('PROMOTION_PERFECT_SIGHT'),
					gc.getInfoTypeForString('PROMOTION_POISON_RESISTANCE'),
					gc.getInfoTypeForString('PROMOTION_PROPHECY_MARK'),
					gc.getInfoTypeForString('PROMOTION_SPIRIT_GUIDE'),
					gc.getInfoTypeForString('PROMOTION_STIGMATA'),
					gc.getInfoTypeForString('PROMOTION_STONESKIN'),
					gc.getInfoTypeForString('PROMOTION_UNHOLY_TAINT'),
					gc.getInfoTypeForString('PROMOTION_VILE_TOUCH'),
					gc.getInfoTypeForString('PROMOTION_VULNERABLE_TO_FIRE'),
					gc.getInfoTypeForString('PROMOTION_WINTERBORN'),
					gc.getInfoTypeForString('PROMOTION_KAIJIN_1'),
					gc.getInfoTypeForString('PROMOTION_MAGIC_WEAKNESS'),
					gc.getInfoTypeForString('PROMOTION_MARK_OF_THE_WARDEN'),
					gc.getInfoTypeForString('PROMOTION_ADVENTURER'),
					gc.getInfoTypeForString('PROMOTION_GRAVITATION'),
					gc.getInfoTypeForString('PROMOTION_HOOF'),
					gc.getInfoTypeForString('PROMOTION_FOUR_EYE'),
					gc.getInfoTypeForString('PROMOTION_SLAUGHTER_IMPULSER'),
					gc.getInfoTypeForString('PROMOTION_SHELL'),
					gc.getInfoTypeForString('PROMOTION_HAND_OF_THE_POISON')	]
	else:
		liPromotions += [	gc.getInfoTypeForString('PROMOTION_DISEASED'),
					gc.getInfoTypeForString('PROMOTION_DRILL1'),
					gc.getInfoTypeForString('PROMOTION_LIGHT'),
					gc.getInfoTypeForString('PROMOTION_MUTATED'),
					gc.getInfoTypeForString('PROMOTION_POISON_RESISTANCE'),
					gc.getInfoTypeForString('PROMOTION_SPIRIT_GUIDE'),
					gc.getInfoTypeForString('PROMOTION_STONESKIN'),
					gc.getInfoTypeForString('PROMOTION_VULNERABLE_TO_FIRE'),
					gc.getInfoTypeForString('PROMOTION_MAGIC_WEAKNESS'),
					gc.getInfoTypeForString('PROMOTION_GRAVITATION'),
					gc.getInfoTypeForString('PROMOTION_HOOF'),
					gc.getInfoTypeForString('PROMOTION_FOUR_EYE'),
					gc.getInfoTypeForString('PROMOTION_SLAUGHTER_IMPULSER'),
					gc.getInfoTypeForString('PROMOTION_SHELL'),
					gc.getInfoTypeForString('PROMOTION_HAND_OF_THE_POISON')	]
	for pUnit in py.getUnitList():
		if pUnit.isAlive():
			if CyGame().getSorenRandNum(100, "Winds of Miasma") < 10 and len(liPromotions) > 0:
				iCount = CyGame().getSorenRandNum(2, 'the number of effects') + 1
				liChosenPromotion = []
				for iLoop in range(iCount):
					liChosenPromotion.append(liPromotions.pop( CyGame().getSorenRandNum(len(liPromotions), "Variant") ))
				liChosenPromotion.sort()
				for iChosenPromotion in liChosenPromotion:
					pUnit.setHasPromotion(iChosenPromotion, True)