イース英雄の装備品購入実行条件@OAC

def enabledYsEventBuyWeapon(argsList):
	pCaster, pPlot, eSpell = argsList
	pPlayer = gc.getPlayer(pCaster.getOwner())
	
	if pPlayer.getGold() >= 50:
		if not pCaster.isHasPromotion(gc.getInfoTypeForString(‘PROMOTION_YSSWORD3’)):
			if pPlayer.getNumAvailableBonuses(gc.getInfoTypeForString(‘BONUS_COPPER’)) > 0:
				if pPlayer.getGold() >= 1600:
					return True
				if pPlayer.getGold() >= 200 and not pCaster.isHasPromotion(gc.getInfoTypeForString(‘PROMOTION_YSSWORD2’)):
					return True
			if not pCaster.isHasPromotion(gc.getInfoTypeForString(‘PROMOTION_YSSWORD2’))\
			   and not pCaster.isHasPromotion(gc.getInfoTypeForString(‘PROMOTION_YSSWORD1’)):
				return True
		if not pCaster.isHasPromotion(gc.getInfoTypeForString(‘PROMOTION_YSARMOR3’)):
			if pPlayer.getNumAvailableBonuses(gc.getInfoTypeForString(‘BONUS_MARBLE’)) > 0:
				if pPlayer.getGold() >= 1600:
					return True
				if pPlayer.getGold() >= 200 and not pCaster.isHasPromotion(gc.getInfoTypeForString(‘PROMOTION_YSARMOR2’)):
					return True
			if not pCaster.isHasPromotion(gc.getInfoTypeForString(‘PROMOTION_YSARMOR2’))\
			   and not pCaster.isHasPromotion(gc.getInfoTypeForString(‘PROMOTION_YSARMOR1’)):
				return True
		if not pCaster.isHasPromotion(gc.getInfoTypeForString(‘PROMOTION_YSSHIELD3’)):
			if pPlayer.getNumAvailableBonuses(gc.getInfoTypeForString(‘BONUS_GOLD’)) > 0:
				if pPlayer.getGold() >= 1600:
					return True
				if pPlayer.getGold() >= 200 and not pCaster.isHasPromotion(gc.getInfoTypeForString(‘PROMOTION_YSSHIELD2’)):
					return True
			if not pCaster.isHasPromotion(gc.getInfoTypeForString(‘PROMOTION_YSSHIELD2’))\
			   and not pCaster.isHasPromotion(gc.getInfoTypeForString(‘PROMOTION_YSSHIELD1’)):
				return True
		if not pCaster.isHasPromotion(gc.getInfoTypeForString(‘PROMOTION_YSNECKLESS’))\
		   and pPlayer.getNumAvailableBonuses(gc.getInfoTypeForString(‘BONUS_GEMS’)) > 0\
		   and pPlayer.getGold() >= 100:
			return True
	return False