
//Powerを見て変数を更新する
function updatePower( let ary ) {
	let var;
	if ( m_nPower >= 128 ) {
		var = ary[ 8 ];
	}
	else if ( m_nPower >= 96 ) {
		var = ary[ 7 ];
	}
	else if ( m_nPower >= 80 ) {
		var = ary[ 6 ];
	}
	else if ( m_nPower >= 64 ) {
		var = ary[ 5 ];
	}
	else if ( m_nPower >= 48 ) {
		var = ary[ 4 ];
	}
	else if ( m_nPower >= 32 ) {
		var = ary[ 3 ];
	}
	else if ( m_nPower >= 16 ) {
		var = ary[ 2 ];
	}
	else if ( m_nPower >= 8 ) {
		var = ary[ 1 ];
	}
	else {
		var = ary[ 0 ];
	}
	return var;
}

//Powerを見て変数を更新する
function updatePowerEx( let pwrary, let baseary ) {
	if ( length( pwrary ) != length( baseary ) ) {
		return pwrary[ 0 ];
	}
	ascent ( let j in 0..length( baseary ) ) {
		let i = length( baseary ) - j - 1;
		if ( m_nPower >= baseary[ i ] ) {
			return pwrary[ i ];
		}
	}
	return pwrary[ 0 ];
}
