getCurrentLoadout

getCurrentLoadout

> 함수

부추가 지금 착용한 장비를 setLoadout 형식으로 반환합니다: 무기, 칩, 부품(각 부품의 변질 포함), 총 능력치, 그리고 각 능력치에 투자한 캐피탈입니다. setLoadout을 호출하기 전에는 부추가 전투에 들어올 때의 장비이고, 그 후에는 setLoadout이 준 장비입니다. setLoadout(getCurrentLoadout())은 아무것도 바꾸지 않습니다: 코드로 장비를 구성하기 위한 출발점입니다(getInventory 참고). beforeFight() 안에서 호출하세요(전투 훅 참고).

// 이 함수는 1턴 전에 자동으로 호출됩니다
function beforeFight() {
	var current = getCurrentLoadout()

	// stats: 총 능력치, capitals: 각 능력치에 투자한 캐피탈
	debug("힘: " + current.stats.strength + ", 투자한 캐피탈: " + current.capitals.strength)

	// base: 모델의 값, stats: 합계, bonuses: 착용한 부품의 변질이 바꾸는 값
	for (var component in current.components) {
		debug(component.item + ": " + jsonEncode(component.bonuses))
	}

	// 섬광 칩을 뺀 같은 장비. 투자한 캐피탈을 줄일 때만 리스탯 포션을 씁니다
	var chips = []
	for (var chip in current.chips) {
		if (chip != CHIP_FLASH) push(chips, chip)
	}
	current.chips = chips
	setLoadout(current)
}
// 이 함수는 1턴 전에 자동으로 호출됩니다
function beforeFight() {
	const current = Fight.me.getCurrentLoadout()

	// stats: 총 능력치, capitals: 각 능력치에 투자한 캐피탈
	Debug.log("힘: " + current.stats.strength + ", 투자한 캐피탈: " + current.capitals.strength)

	// base: 모델의 값, stats: 합계, bonuses: 착용한 부품의 변질이 바꾸는 값
	for (const component of current.components) {
		Debug.log(component.item + ": " + JSON.stringify(component.bonuses))
	}

	// 섬광 칩을 뺀 같은 장비. 투자한 캐피탈을 줄일 때만 리스탯 포션을 씁니다
	current.chips = current.chips.filter(chip => chip !== Chip.flash.id)
	Fight.me.setLoadout(current)
}

// TypeScript와 JavaScript에서는 AI가 turn()을 정의한 경우에만 훅이 호출됩니다
function turn() {
	// ...
}
# 이 함수는 1턴 전에 자동으로 호출됩니다
def beforeFight():
	current = Fight.me.getCurrentLoadout()

	# stats: 총 능력치, capitals: 각 능력치에 투자한 캐피탈
	Debug.log("힘: " + str(current["stats"]["strength"]) + ", 투자한 캐피탈: " + str(current["capitals"]["strength"]))

	# base: 모델의 값, stats: 합계, bonuses: 착용한 부품의 변질이 바꾸는 값
	for component in current["components"]:
		Debug.log(str(component["item"]) + ": " + str(component["bonuses"]))

	# 섬광 칩을 뺀 같은 장비. 투자한 캐피탈을 줄일 때만 리스탯 포션을 씁니다
	current["chips"] = [chip for chip in current["chips"] if chip != Chip.flash.id]
	Fight.me.setLoadout(current)

# Python에서는 AI가 turn()을 정의한 경우에만 훅이 호출됩니다
def turn():
	pass
반환값