function ExecEvent(state) ResetRequest() hkbFireEvent(state) return end function ExecEventNoReset(state) hkbFireEvent(state) return end function ExecEvents(...) local buff = {...} for local0 = 1, #buff, 1 do ExecEvent(buff[local0]) end return end function ResetRequest() act(9101) act("自動捕捉対象クリア") return end function GetVariable(variable) return hkbGetVariable(variable) end function ExecEventHalfBlend(event_table, blend_type) if blend_type == ALLBODY then SetVariable("MoveSpeedLevelReal", 0) local lower_event = event_table[1] local upper_event = lower_event .. "_Upper" ExecEvents(lower_event, upper_event) for local0 = 2, #event_table, 1 do SetVariable("LowerDefaultState0" .. local0 - 2, event_table[local0]) SetVariable("UpperDefaultState0" .. local0 - 2, event_table[local0]) end elseif blend_type == LOWER then ExecEvent(event_table[1]) for local1 = 2, #event_table, 1 do SetVariable("LowerDefaultState0" .. local1 - 2, event_table[local1]) end elseif blend_type == UPPER then ExecEvent(event_table[1] .. "_Upper") for local1 = 2, #event_table, 1 do SetVariable("UpperDefaultState0" .. local1 - 2, event_table[local1]) end end return end function ExecEventHalfBlendNoReset(event_table, blend_type) if blend_type == ALLBODY then local lower_event = event_table[1] local upper_event = lower_event .. "_Upper" ExecEventNoReset(lower_event) ExecEventNoReset(upper_event) for local0 = 2, #event_table, 1 do SetVariable("LowerDefaultState0" .. local0 - 2, event_table[local0]) SetVariable("UpperDefaultState0" .. local0 - 2, event_table[local0]) end elseif blend_type == LOWER then ExecEventNoReset(event_table[1]) for local1 = 2, #event_table, 1 do SetVariable("LowerDefaultState0" .. local1 - 2, event_table[local1]) end elseif blend_type == UPPER then ExecEventNoReset(event_table[1] .. "_Upper") for local1 = 2, #event_table, 1 do SetVariable("UpperDefaultState0" .. local1 - 2, event_table[local1]) end end return end function ExecEventAllBody(event) SetVariable("MoveSpeedLevelReal", 0) ExecEvent(event) return end function IsNodeActive(...) local buff = {...} for local0 = 1, #buff, 1 do if hkbIsNodeActive(buff[local0]) then return TRUE end end return FALSE end function ResetEventState() SetVariable("MoveSpeedLevelReal", 0) ResetRequest() return end function Replanning() act("キャンセルタイミングでAIへのリプランニング要求") return end function AddStamina(num) act(110) act(1001, num) return end function SetMoveWeightIndex() SetVariable("MoveWeightIndex", GetWeightIndex(TRUE)) return end function SetBaseCategory() SetVariable("IndexBaseCategory", GetBaseCategory()) return end function SetStyleSpecialEffect() if c_Style == HAND_LEFT_BOTH then if env(1116, 139995) == FALSE then act(2002, 139995) end elseif env(1116, 139990) == FALSE then act(2002, 139990) end return end function SetMoveType() if env(1116, 100130) == TRUE then SetVariable("MoveType", 1) SetVariable("DrawStanceLoopUpperBlend", 1) elseif env(1116, 100140) == TRUE then SetVariable("MoveType", 2) SetVariable("DrawStanceLoopUpperBlend", 1) elseif env(1116, 100150) == TRUE then SetVariable("MoveType", 0) SetVariable("DrawStanceLoopUpperBlend", 1) elseif env(1116, 100160) == TRUE then SetVariable("MoveType", 0) SetVariable("DrawStanceLoopUpperBlend", 1) else SetVariable("MoveType", 3) SetVariable("DrawStanceLoopUpperBlend", 1) end return end function SetThrowDefBlendWeight() if env(1114, GetVariable("ThrowID") + 4) == FALSE then return end local regist_num = env("投げ抜け抵抗回数取得") local dT = GetDeltaTime() local blend_weight = GetVariable("ThrowHoldBlendWeight") local is_holding = GetVariable("ThrowHolding") local no_regist_time = GetVariable("ThrowNoRegistTime") if 0 < regist_num then is_holding = true end if is_holding == true then if regist_num <= 0 then no_regist_time = no_regist_time + dT end if 0.699999988079071 < no_regist_time then is_holding = false else blend_weight = blend_weight + 2 * dT if 0.990000009536743 < blend_weight then blend_weight = 0.990000009536743 end SetVariable("IsEnableTAEThrowHold", true) end else no_regist_time = 0 blend_weight = blend_weight - 4 * dT if blend_weight < 0.00999999977648258 then blend_weight = 0.00999999977648258 SetVariable("IsEnableTAEThrowHold", false) else SetVariable("IsEnableTAEThrowHold", true) end end SetVariable("ThrowHoldBlendWeight", blend_weight) SetVariable("ThrowHolding", is_holding) SetVariable("ThrowNoRegistTime", no_regist_time) return end function SetTurnSpeed(turn_speed) act(2004, turn_speed) return end function SetRollingTurnCondition(is_selftrans) local rolling_angle = "RollingAngleReal" if is_selftrans == TRUE then rolling_angle = "RollingAngleRealSelftrans" end if GetVariable("IsLockon") == true then local angle = GetVariable("TurnAngleReal") if 180 < angle then SetTurnSpeed(0) elseif 90 < angle then SetTurnSpeed(360) end elseif env(234) == TRUE then SetTurnSpeed(0) SetVariable("TurnAngleReal", 300) elseif 0.00100000004749745 < math.abs(GetVariable(rolling_angle)) then SetTurnSpeed(0) elseif 200 < GetVariable("TurnAngleReal") then SetTurnSpeed(0) end return end function SetAIActionState() act(9103, 1) return end function SetAttackHand(hand) act("武器パラメータ参照先", hand) return end function SetInterruptType(num) act("AI通知攻撃タイプ", num) return end function SetArtsGeneratorTransitionIndex(gen_hand, is_from) if gen_hand == FALSE then SetVariable("ArtsTransition", 0) return elseif IsNonGeneratorTransition() == TRUE then SetVariable("ArtsTransition", 0) return end local hand = HAND_LEFT if gen_hand == GEN_TRANS_RIGHT then hand = HAND_RIGHT end local offset = 0 if is_from == TRUE and env(225, HAND_LEFT) == WEAPON_CATEGORY_FIST then offset = 4 hand = HAND_RIGHT end local changetype = GetHandChangeType(hand) if offset == 4 and env("装備武器特殊カテゴリ番号取得", HAND_RIGHT) == 161 then offset = 0 changetype = WEAPON_CHANGE_REQUEST_LEFT_BACK end if changetype == WEAPON_CHANGE_REQUEST_LEFT_WAIST or changetype == WEAPON_CHANGE_REQUEST_RIGHT_WAIST then SetVariable("ArtsTransition", 1 + offset) elseif changetype == WEAPON_CHANGE_REQUEST_LEFT_BACK or changetype == WEAPON_CHANGE_REQUEST_RIGHT_BACK then SetVariable("ArtsTransition", 2 + offset) elseif changetype == WEAPON_CHANGE_REQUEST_LEFT_SHOULDER or changetype == WEAPON_CHANGE_REQUEST_RIGHT_SHOULDER then SetVariable("ArtsTransition", 3 + offset) elseif changetype == WEAPON_CHANGE_REQUEST_LEFT_SPEAR or changetype == WEAPON_CHANGE_REQUEST_RIGHT_SPEAR then SetVariable("ArtsTransition", 4 + offset) else SetVariable("ArtsTransition", 0) end return end function GetDeltaTime() return env(333) / 1000 end function GetConstVariable() c_HasActionRequest = IsActionRequest() local local0, local1 = GetSwordArtsInfo() c_SwordArtsHand = local1 c_SwordArtsID = local0 c_IsEnableSwordArts = IsEnableSwordArts() c_Style = env(207) return end function GetMoveSpeed(stick_level) local speed = GetVariable("MoveSpeedLevelReal") local inc_val = ACCELERATION_WALK_SPEED_UP local dec_val = ACCELERATION_SPEED_DOWN if stick_level == 2 then inc_val = ACCELERATION_DASH_SPEED_UP dec_val = ACCELERATION_DASH_SPEED_DOWN end local ret = ConvergeValue(stick_level, speed, inc_val, dec_val) return ret end function GetWeightIndex(is_move) local move_id = env(257) local move_weight = MOVE_WEIGHT_NORMAL local evasion_weight = EVASION_WEIGHT_INDEX_MEDIUM if move_id == WEIGHT_LIGHT or move_id == WEIGHT_LIGHT + 20 or move_id == WEIGHT_LIGHT + 40 or move_id == WEIGHT_LIGHT + 60 then move_weight = MOVE_WEIGHT_LIGHT evasion_weight = EVASION_WEIGHT_INDEX_LIGHT elseif move_id == WEIGHT_HEAVY or move_id == WEIGHT_HEAVY + 20 or move_id == WEIGHT_HEAVY + 40 or move_id == WEIGHT_HEAVY + 60 then move_weight = MOVE_WEIGHT_HEAVY evasion_weight = EVASION_WEIGHT_INDEX_HEAVY elseif move_id == WEIGHT_OVERWEIGHT or move_id == WEIGHT_OVERWEIGHT + 20 or move_id == WEIGHT_OVERWEIGHT + 40 or move_id == WEIGHT_OVERWEIGHT + 60 then move_weight = MOVE_WEIGHT_HEAVY evasion_weight = EVASION_WEIGHT_INDEX_OVERWEIGHT elseif move_id == WEIGHT_SUPERLIGHT or move_id == WEIGHT_SUPERLIGHT + 20 or move_id == WEIGHT_SUPERLIGHT + 40 or move_id == WEIGHT_SUPERLIGHT + 60 then move_weight = MOVE_WEIGHT_LIGHT evasion_weight = EVASION_WEIGHT_INDEX_SUPERLIGHT end if env(1116, 130110) == TRUE then if move_weight < MOVE_WEIGHT_HEAVY then move_weight = MOVE_WEIGHT_HEAVY end if evasion_weight < EVASION_WEIGHT_INDEX_HEAVY then evasion_weight = EVASION_WEIGHT_INDEX_HEAVY end elseif env(305, CONDITION_TYPE_GRAVITY_MEDIUM) == TRUE then if move_weight < MOVE_WEIGHT_HEAVY then move_weight = MOVE_WEIGHT_HEAVY end if evasion_weight < EVASION_WEIGHT_INDEX_HEAVY then evasion_weight = EVASION_WEIGHT_INDEX_HEAVY end elseif env(305, CONDITION_TYPE_GRAVITY_WEAK) == TRUE and move_weight < MOVE_WEIGHT_HEAVY then move_weight = MOVE_WEIGHT_HEAVY end local weight = evasion_weight if is_move == TRUE then weight = move_weight end return weight end function GetHalfBlendInfo() local blend_type = ALLBODY local lower_state = LOWER_IDLE if GetLocomotionState() == PLAYER_STATE_MOVE then blend_type = UPPER lower_state = LOWER_MOVE elseif IsLowerQuickTurn() == TRUE then if IsExitLowerQuickTurn() == TRUE then lower_state = LOWER_END_TURN else blend_type = UPPER lower_state = LOWER_TURN end end return blend_type, lower_state end function GetLocomotionState() local state = GetVariable("LowerDefaultState00") if state == MOVE_DEF0 or state == MOVECEREMONY_DEF0 then if env(1116, 100000) == TRUE then return PLAYER_STATE_MOVE elseif env(1116, 100001) == TRUE then return PLAYER_STATE_MOVE elseif env(1116, 100002) == TRUE then return PLAYER_STATE_MOVE end end return PLAYER_STATE_IDLE end function GetBaseCategory() local basecategoryid = 0 if kind_special == 50 then basecategoryid = 0 else basecategoryid = env("待機アニメカテゴリ取得") end local index = 0 if basecategoryid == 0 then index = 0 elseif basecategoryid == 2 or basecategoryid == 12 then index = 1 elseif basecategoryid == 3 or basecategoryid == 13 then index = 2 end return index end function GetEquipType(hand, ...) local buff = {...} local kind = {} local num = 1 if hand == HAND_BOTH then kind[1] = env(225, HAND_LEFT) kind[2] = env(225, HAND_RIGHT) num = 2 else kind[1] = env(225, hand) end for local0 = 1, num, 1 do for local1 = 1, #buff, 1 do if kind[local0] == buff[local1] then return TRUE end end end return FALSE end function GetWeaponChangeType(hand) local left_offset = 0 local pos = env("武器格納場所タイプ取得", hand) if hand == HAND_LEFT then left_offset = 4 end if pos == 0 then return WEAPON_CHANGE_REQUEST_RIGHT_WAIST + left_offset elseif pos == 1 then return WEAPON_CHANGE_REQUEST_RIGHT_BACK + left_offset elseif pos == 2 then return WEAPON_CHANGE_REQUEST_RIGHT_SHOULDER + left_offset elseif pos == 3 then return WEAPON_CHANGE_REQUEST_RIGHT_SPEAR + left_offset else return WEAPON_CHANGE_REQUEST_INVALID end end function GetHandChangeType(hand) local left_offset = 0 local pos = env("武器格納場所タイプ取得", hand) if hand == HAND_LEFT then left_offset = 4 end if pos == 0 then return WEAPON_CHANGE_REQUEST_RIGHT_WAIST + left_offset elseif pos == 1 then return WEAPON_CHANGE_REQUEST_RIGHT_BACK + left_offset elseif pos == 2 then return WEAPON_CHANGE_REQUEST_RIGHT_SHOULDER + left_offset elseif pos == 3 then return WEAPON_CHANGE_REQUEST_RIGHT_SPEAR + left_offset else return WEAPON_CHANGE_REQUEST_INVALID end end function GetSwordArtsInfo() local style = c_Style local is_both = FALSE if HAND_LEFT_BOTH <= style then is_both = TRUE end local arts_id = 0 local arts_hand = 0 if is_both == TRUE then if style == HAND_RIGHT_BOTH then arts_hand = HAND_RIGHT elseif style == HAND_LEFT_BOTH then arts_hand = HAND_LEFT end arts_id = env(326, arts_hand) else local weaponswordartid = env(326, HAND_LEFT) if weaponswordartid == SWORDARTS_RIGHTARTS then arts_hand = HAND_RIGHT arts_id = env(326, HAND_RIGHT) else arts_hand = HAND_LEFT arts_id = weaponswordartid end if env(225, HAND_LEFT) == WEAPON_CATEGORY_FIST then if arts_hand == HAND_LEFT then if arts_id ~= SWORDARTS_ONESHOTFULL then arts_id = SWORDARTS_PARRY end elseif arts_id == SWORDARTS_RIGHTARTS then arts_id = SWORDARTS_PARRY arts_hand = HAND_LEFT end end end return arts_id, arts_hand end function GetSwordArtsRequest() local style = c_Style local is_both = FALSE local arts_id = c_SwordArtsID if HAND_LEFT_BOTH <= style then is_both = TRUE end if is_both == TRUE then local request = arts_id + 200 return request elseif c_SwordArtsHand == HAND_RIGHT then local request = arts_id + 200 return request else local request = arts_id + 100 return request end end function GetAttackRequest(is_guard) local style = c_Style local is_both = FALSE local is_both_right = FALSE if HAND_LEFT_BOTH <= style then is_both = TRUE end if style == HAND_RIGHT_BOTH then is_both_right = TRUE end local hand = HAND_RIGHT if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local is_arrow = GetEquipType(hand, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW) local is_crossbow = GetEquipType(hand, WEAPON_CATEGORY_CROSSBOW) local is_staff = GetEquipType(hand, WEAPON_CATEGORY_STAFF) if env(1106, ACTION_ARM_R1) == TRUE then if is_both == TRUE then if is_arrow == TRUE then act("弓矢スロット選択", 0) return ATTACK_REQUEST_ARROW_FIRE_RIGHT elseif is_crossbow == TRUE then act("弓矢スロット選択", 0) if style == HAND_LEFT_BOTH then return ATTACK_REQUEST_BOTHLEFT_CROSSBOW else return ATTACK_REQUEST_BOTHRIGHT_CROSSBOW end elseif is_staff == TRUE then return ATTACK_REQUEST_INVALID elseif env(1106, ACTION_ARM_LIGHT_KICK) == TRUE then return ATTACK_REQUEST_LIGHT_KICK else return ATTACK_REQUEST_BOTH_LIGHT end elseif is_guard == TRUE then local is_spear = GetEquipType(HAND_RIGHT, WEAPON_CATEGORY_SPEAR) local is_rapier = GetEquipType(HAND_RIGHT, WEAPON_CATEGORY_RAPIER) if is_spear == TRUE or is_rapier == TRUE then if 0 < env(1108, ACTION_ARM_L1) then return ATTACK_REQUEST_ATTACK_WHILE_GUARD end elseif is_staff == TRUE then return ATTACK_REQUEST_INVALID elseif is_arrow == TRUE then return ATTACK_REQUEST_ARROW_BOTH_RIGHT elseif is_crossbow == TRUE then act("弓矢スロット選択", 0) return ATTACK_REQUEST_RIGHT_CROSSBOW end elseif is_staff == TRUE then return ATTACK_REQUEST_INVALID elseif is_arrow == TRUE then return ATTACK_REQUEST_ARROW_BOTH_RIGHT elseif is_crossbow == TRUE then act("弓矢スロット選択", 0) return ATTACK_REQUEST_RIGHT_CROSSBOW end if env(1106, ACTION_ARM_LIGHT_KICK) == TRUE then return ATTACK_REQUEST_LIGHT_KICK else return ATTACK_REQUEST_RIGHT_LIGHT end elseif env(1106, ACTION_ARM_R2) == TRUE then if is_arrow == TRUE then if is_both == TRUE then act("弓矢スロット選択", 1) return ATTACK_REQUEST_ARROW_FIRE_RIGHT2 else return ATTACK_REQUEST_ARROW_BOTH_RIGHT end elseif is_crossbow == TRUE then if is_both == TRUE then if style == HAND_LEFT_BOTH then act("弓矢スロット選択", 1) return ATTACK_REQUEST_BOTHLEFT_CROSSBOW2 else act("弓矢スロット選択", 1) return ATTACK_REQUEST_BOTHRIGHT_CROSSBOW2 end else act("弓矢スロット選択", 1) return ATTACK_REQUEST_RIGHT_CROSSBOW2 end elseif env(1106, ACTION_ARM_HEAVY_KICK) == TRUE then local check_weapon = GetEquipType(hand, WEAPON_CATEGORY_STAFF) if check_weapon == FALSE and env(1116, 100260) == FALSE then return ATTACK_REQUEST_HEAVY_KICK end end local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if sp_kind == 178 or sp_kind == 207 or sp_kind == 217 or sp_kind == 220 or sp_kind == 234 then return ATTACK_REQUEST_INVALID elseif sp_kind == 257 and env(1116, 100580) == FALSE then return ATTACK_REQUEST_INVALID elseif is_both == TRUE then return ATTACK_REQUEST_BOTH_HEAVY else return ATTACK_REQUEST_RIGHT_HEAVY end elseif env(1106, ACTION_ARM_L1) == TRUE then if env(234) == TRUE then return ATTACK_REQUEST_INVALID elseif is_both == TRUE then if is_arrow == TRUE or is_crossbow == TRUE then return ATTACK_REQUEST_INVALID end elseif GetEquipType(HAND_LEFT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW) == TRUE then return ATTACK_REQUEST_ARROW_BOTH_LEFT elseif GetEquipType(HAND_LEFT, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("弓矢スロット選択", 0) return ATTACK_REQUEST_LEFT_CROSSBOW end if is_both == TRUE then if c_SwordArtsID ~= 32 then if IsDualBlade() == TRUE then return ATTACK_REQUEST_BOTH_LEFT end else return ATTACK_REQUEST_INVALID end end if is_both == FALSE then local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) if sp_kind == 178 or sp_kind == 207 or sp_kind == 217 or sp_kind == 220 or sp_kind == 234 or sp_kind == 257 then return ATTACK_REQUEST_LEFT_HEAVY elseif sp_kind == 99 or sp_kind == 101 or sp_kind == 137 or sp_kind == 151 or sp_kind == 164 or sp_kind == 218 then return ATTACK_REQUEST_LEFT_HEAVY_SP end end local is_shield_left = GetEquipType(HAND_LEFT, WEAPON_CATEGORY_SMALL_SHIELD, WEAPON_CATEGORY_LARGE_SHIELD, WEAPON_CATEGORY_TORCH) local is_shield_right = GetEquipType(HAND_RIGHT, WEAPON_CATEGORY_SMALL_SHIELD, WEAPON_CATEGORY_LARGE_SHIELD, WEAPON_CATEGORY_TORCH) if is_shield_left == TRUE then return ATTACK_REQUEST_INVALID elseif is_shield_right == TRUE and is_both_right == TRUE then return ATTACK_REQUEST_INVALID elseif IsEnableGuard() == TRUE then return ATTACK_REQUEST_INVALID elseif GetEquipType(HAND_LEFT, WEAPON_CATEGORY_STAFF) == TRUE then return ATTACK_REQUEST_INVALID elseif is_both == FALSE and env(225, HAND_LEFT) == 42 then return ATTACK_REQUEST_LEFT_HEAVY else return ATTACK_REQUEST_LEFT_LIGHT end elseif env(1106, ACTION_ARM_L2) == TRUE then if is_both == FALSE then if GetEquipType(HAND_LEFT, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("弓矢スロット選択", 1) return ATTACK_REQUEST_LEFT_CROSSBOW2 elseif GetEquipType(HAND_LEFT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW) == TRUE then return ATTACK_REQUEST_ARROW_BOTH_LEFT end local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) if sp_kind == 178 or sp_kind == 207 or sp_kind == 217 or sp_kind == 220 or sp_kind == 234 or sp_kind == 257 then return ATTACK_REQUEST_INVALID end end if c_IsEnableSwordArts == TRUE then local swordartrequest = GetSwordArtsRequest() if (swordartrequest == SWORDARTS_REQUEST_LEFT_CHARGESHOT or swordartrequest == SWORDARTS_REQUEST_RIGHT_CHAINSHOT or swordartrequest == SWORDARTS_REQUEST_LEFT_CHAINSHOT or swordartrequest == SWORDARTS_REQUEST_RIGHT_CHARGESHOT or swordartrequest == SWORDARTS_REQUEST_LEFT_STRONGSHOT or swordartrequest == SWORDARTS_REQUEST_RIGHT_STRONGSHOT or swordartrequest == SWORDARTS_REQUEST_LEFT_WIDESHOT or swordartrequest == SWORDARTS_REQUEST_RIGHT_WIDESHOT) and is_both == FALSE then local arts_hand = c_SwordArtsHand if arts_hand == HAND_RIGHT then return ATTACK_REQUEST_ARROW_BOTH_RIGHT else return ATTACK_REQUEST_ARROW_BOTH_LEFT end else return swordartrequest end elseif HAND_LEFT_BOTH <= style then return ATTACK_REQUEST_BOTH_HEAVY else return ATTACK_REQUEST_LEFT_HEAVY end else return ATTACK_REQUEST_INVALID end end function GetEvasionRequest() if env(1001) < STAMINA_MINIMUM then return ATTACK_REQUEST_INVALID elseif env(1106, ACTION_ARM_JUMP) == TRUE then local speed = GetVariable("MoveSpeedLevelReal") if SPEED_ENABLE_JUMP < speed then return ATTACK_REQUEST_JUMP end end if env(1106, ACTION_ARM_ROLLING) == TRUE then return ATTACK_REQUEST_ROLLING elseif env(1106, ACTION_ARM_BACKSTEP) == TRUE then return ATTACK_REQUEST_BACKSTEP else return ATTACK_REQUEST_INVALID end end function GetLadderEventCommand(is_start) if env(1007) == FALSE then return env(105, 0) end local req_up = env(1106, ACTION_ARM_LADDERUP) local req_down = env(1106, ACTION_ARM_LADDERDOWN) if is_start == TRUE then if req_up == TRUE then return LADDER_ACTION_START_BOTTOM elseif req_down == TRUE then return LADDER_ACTION_START_TOP end elseif req_up == TRUE then if env(304) == TRUE then return LADDER_EVENT_COMMAND_END_TOP else return LADDER_EVENT_COMMAND_UP end elseif req_down == TRUE then if env(303) == TRUE then return LADDER_EVENT_COMMAND_END_BOTTOM else return LADDER_EVENT_COMMAND_DOWN end end return INVALID end function SetVariable(name, value) act(148, name, value) return end function SetHandChangeStyle(s, e) SetVariable("HandChangeStartIndex", s) SetVariable("HandChangeEndIndex", e) return end function SetEvasionStaminaCost() local weight = env(257) if weight == WEIGHT_LIGHT then c_StaminaCostRolling = -16 c_StaminaCostBackStep = -11 c_StaminaCostJump = -16 elseif weight == WEIGHT_NORMAL then c_StaminaCostRolling = -16 c_StaminaCostBackStep = -11 c_StaminaCostJump = -16 elseif weight == WEIGHT_HEAVY then c_StaminaCostRolling = -16 c_StaminaCostBackStep = -11 c_StaminaCostJump = -16 elseif weight == WEIGHT_OVERWEIGHT then c_StaminaCostRolling = -26 c_StaminaCostBackStep = -18 c_StaminaCostJump = -26 else c_StaminaCostRolling = -16 c_StaminaCostBackStep = -11 c_StaminaCostJump = -16 end return end function SetSwordArtsCancelType() local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) if IsEnableSwordArts() == TRUE then act(2011, env("剣戟キャンセルタイプを取得", c_SwordArtsHand)) else act(2011, 0) end return end function SetGender() if env(1116, 112074000) == TRUE then if env("女性か") == TRUE then c_IsFemale = FALSE else c_IsFemale = TRUE end elseif env("女性か") == TRUE then c_IsFemale = TRUE else c_IsFemale = FALSE end return end function SetSwordArtsPointInfo(button, is_point_consume) local hand = c_SwordArtsHand if is_point_consume == TRUE then act("アーツポイント使用予約", button, hand) end local sel = 0 if env("アーツポイント足りるか", button, hand) == FALSE then sel = 1 elseif env(311, hand) == 0 then sel = 1 elseif env(262, hand) == TRUE then sel = 1 elseif c_SwordArtsID == SWORDARTS_MAGICBUFFPRAY and env(1116, 135000) == FALSE then sel = 1 end local val = "IsEnoughArtPointsL2" if button == ACTION_ARM_R1 then if IsNodeActive("DrawStanceRightAttackLight_Selector") == TRUE then val = "IsEnoughArtPointsR1_2" elseif IsNodeActive("DrawStanceRightAttackLight2_Selector") == TRUE then val = "IsEnoughArtPointsR1_3" else val = "IsEnoughArtPointsR1" end elseif button == ACTION_ARM_R2 then if IsNodeActive("DrawStanceRightAttackHeavy_Selector") == TRUE or IsNodeActive("Charge_Upper_Selector") == TRUE then val = "IsEnoughArtPointsR2_2" elseif IsNodeActive("ChargeContinue_Selector") == TRUE then val = "IsEnoughArtPointsR2_3" else val = "IsEnoughArtPointsR2" end elseif button == ACTION_ARM_L2 then if IsNodeActive("MagicBuffRight_Upper_Selector") == TRUE or IsNodeActive("MagicBuffLeft_Upper_Selector") == TRUE then local sp_kind_L = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) local sp_kind_R = env("装備武器特殊カテゴリ番号取得", HAND_RIGHT) local style = c_Style if sp_kind_L == 265 and sp_kind_R == 265 then DebugPrint(1, style) if style == HAND_BOTH or style == HAND_LEFT_BOTH or style == HAND_RIGHT_BOTH then val = "IsEnoughArtPointsL2_2" else val = "IsEnoughArtPointsL2_3" end else val = "IsEnoughArtPointsL2_2" end elseif IsNodeActive("MagicBuffRight2_Selector") == TRUE or IsNodeActive("MagicBuffLeft2_Selector") == TRUE then val = "IsEnoughArtPointsL2_3" elseif IsNodeActive("MagicBuffRight3_Selector") == TRUE or IsNodeActive("MagicBuffLeft3_Selector") == TRUE then val = "IsEnoughArtPoints_L2_2" end end SetVariable(val, sel) return end function SetAttackQueue(r1, r2, l1, l2, b1, b2) g_r1 = r1 g_r2 = r2 g_l1 = l1 g_l2 = l2 g_b1 = b1 g_b2 = b2 return end function ClearAttackQueue() g_r1 = "W_AttackRightLight1" g_r2 = "W_AttackRightHeavy1Start" g_l1 = "W_AttackLeftLight1" g_l2 = "W_AttackLeftHeavy1" g_b1 = "W_AttackBothLight1" g_b2 = "W_AttackBothHeavy1Start" return end function UpdateOldMonkState() if env(1116, 9130) == FALSE then if env(1116, 9139) == FALSE then act(2002, 9139) end elseif env(1116, 9139) == TRUE then act(2002, 9133) end return end function UpdateAtkAutoAim() local aim_time = GetVariable("AtkAutoAimTime") local upper_limit = 0.165999993681908 if GetVariable("AtkAutoAimFlag") == true and GetVariable("AtkAutoAimTime") < upper_limit and GetVariable("IsLockon") == false then act("自動捕捉対象設定") end if aim_time < upper_limit then SetVariable("AtkAutoAimTime", aim_time + GetDeltaTime()) else SetVariable("AtkAutoAimFlag", false) end if 30 < math.abs(GetVariable("MoveAngle")) then act("自動捕捉対象クリア") end return end function IsEnableSwordArts() local style = c_Style local arts_id = c_SwordArtsID local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) if style ~= HAND_LEFT_BOTH and c_SwordArtsHand == 0 then if sp_kind == 178 or sp_kind == 207 or sp_kind == 217 or sp_kind == 220 or sp_kind == 234 or sp_kind == 257 then return FALSE elseif arts_id == SWORDARTS_PARRY or arts_id == SWORDARTS_SPIN or arts_id == SWORDARTS_STRONGBASH or arts_id == SWORDARTS_CHAINSHOT or arts_id == SWORDARTS_MAGICBUFF or arts_id == SWORDARTS_SAMAGIC or arts_id == SWORDARTS_CHARGESHOT or arts_id == SWORDARTS_ONESHOTFULL or arts_id == SWORDARTS_STRONGSHOT or arts_id == SWORDARTS_SAMAGICMEDIUM or arts_id == SWORDARTS_SAMAGICSTRONG or arts_id == SWORDARTS_WIDESHOT or arts_id == SWORDARTS_MAGICBUFFPRAY or arts_id == SWORDARTS_MAGICBUFFATTACK then return TRUE end elseif arts_id ~= SWORDARTS_RIGHTARTS and arts_id ~= SWORDARTS_INVALID then return TRUE end return FALSE end function IsAttackMagic(index) for local0 = 1, #AttackMagicIndex, 1 do if AttackMagicIndex[local0] == index then return TRUE end end return FALSE end function IsExistArrow() local style = c_Style local hand = HAND_RIGHT if style == HAND_LEFT_BOTH then hand = HAND_LEFT end return env(245, hand) end function IsExistBolt(hand) return env(245, hand) end function IsEnoughWeaponReleaseStatus(hand) return env("武器能力開放ステータス値到達か", hand) end function IsActionRequest() return env(1109) end function IsLowerQuickTurn() if GetVariable("LowerDefaultState00") == QUICKTURN_DEF0 and env(1116, 100010) == TRUE then return TRUE else return FALSE end end function IsExitLowerQuickTurn() if env("アニメ終了か", 2) == TRUE or env(301, 1) == TRUE then return TRUE elseif GetVariable("IsLockon") == false then return TRUE else return FALSE end end function IsNonGeneratorTransition() local style = c_Style local sp_kind = env("装備武器特殊カテゴリ番号取得", c_SwordArtsHand) if env(1116, 100500) == TRUE then return TRUE elseif sp_kind == 232 then if 0 < GetVariable("MoveSpeedLevel") and env(1116, 100490) == TRUE then return FALSE else return TRUE end elseif sp_kind == 256 then return TRUE elseif style ~= HAND_RIGHT then SetVariable("ArtsTransition", 0) return TRUE end local kind_right = env(225, HAND_RIGHT) if c_SwordArtsID == SWORDARTS_DRAWSTANCE and kind_right == WEAPON_CATEGORY_RAPIER then return TRUE elseif IsDualBlade() == FALSE then local kind_left = env(225, HAND_LEFT) if kind_left == WEAPON_CATEGORY_FIST then return TRUE end end return FALSE end function IsHoldMagic() local magic_type = env(227) if magic_type == MAGIC_REQUEST_FLAMETHROWER then SetVariable("IndexHoldMagicType", 0) return TRUE elseif magic_type == MAGIC_REQUEST_PRAYHOLD then SetVariable("IndexHoldMagicType", 1) return TRUE elseif magic_type == MAGIC_REQUEST_AOEPRAYHOLD then SetVariable("IndexHoldMagicType", 2) return TRUE elseif magic_type == MAGIC_REQUEST_SLASHHOLD then SetVariable("IndexHoldMagicType", 3) return TRUE elseif magic_type == MAGIC_REQUEST_BOW then SetVariable("IndexHoldMagicType", 4) return TRUE else return FALSE end end function IsQuickMagic() local magic_type = env(227) if magic_type == MAGIC_REQUEST_QUICKENBULLET then SetVariable("IndexQuickMagicType", 0) return TRUE elseif magic_type == MAGIC_REQUEST_QUICKSLASH then SetVariable("IndexQuickMagicType", 1) return TRUE else return FALSE end end function IsComboMagic() local magic_type = env(227) if magic_type == MAGIC_REQUEST_FAN then return TRUE else return FALSE end end function IsLoopMagic() local magic_type = env(227) if magic_type == MAGIC_REQUEST_FLAMETHROWER then SetVariable("IndexLoopMagicType", 0) return TRUE else return FALSE end end function IsWeaponCanGuard() local style = c_Style local kind = 0 local pos = 0 if style == HAND_RIGHT or style == HAND_LEFT_BOTH then kind = env(225, HAND_LEFT) pos = 2 else kind = env(225, HAND_RIGHT) pos = 3 end for local0 = 1, #WeaponCategoryID, 1 do local local1 = WeaponCategoryID[local0] if local1[1] == kind then local1 = WeaponCategoryID[local0] local canguard = local1[pos] return canguard end end return end function IsEnableGuard() local style = c_Style local hand = HAND_LEFT if style == HAND_RIGHT_BOTH then hand = HAND_RIGHT end local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if style == HAND_RIGHT then if GetEquipType(hand, WEAPON_CATEGORY_STAFF) == TRUE then return FALSE elseif sp_kind == 123 then return TRUE elseif sp_kind == 178 or sp_kind == 207 or sp_kind == 217 or sp_kind == 220 or sp_kind == 234 or sp_kind == 257 then return FALSE elseif sp_kind == 99 or sp_kind == 101 or sp_kind == 137 or sp_kind == 151 or sp_kind == 164 or sp_kind == 218 then return FALSE end end if sp_kind == 229 or sp_kind == 231 or sp_kind == 234 then return TRUE elseif IsWeaponCanGuard() == FALSE then return FALSE elseif c_SwordArtsID ~= 32 and HAND_LEFT_BOTH <= style and IsDualBlade() == TRUE then return FALSE else return TRUE end end function IsDualBlade() local style = c_Style if style == HAND_LEFT_BOTH then return env("双剣か", 0) else return env("双剣か", 1) end end function IsDualBladeSpecific(hand) local style = c_Style if hand == HAND_LEFT then return env("双剣か", 0) else return env("双剣か", 1) end end function IsWarcrySpAtk() local style = c_Style local offset = 0 if style == HAND_LEFT_BOTH then offset = 50 end local buff = {1062301, 1062311, 1070101, 1070111, 1070401, 1070411, 1070501, 1070511, 1080001, 1080011, 1080601, 1080611, 1083201, 1092401, 1092411} for local0 = 1, #buff, 1 do if env(1116, buff[local0] + offset) == TRUE then return TRUE end end return FALSE end function IsArtsSpAtk() local style = c_Style local offset = 0 if style == HAND_LEFT_BOTH then offset = 50 end local buff = {1083201, 1092401, 1092411} for local0 = 1, #buff, 1 do if env(1116, buff[local0] + offset) == TRUE then return TRUE end end return FALSE end function IsWepBrokenHeavyAtk() local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if env(311, hand) == 0 or env(262, hand) == TRUE then local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if sp_kind == 158 then return TRUE elseif sp_kind == 162 then return TRUE end end return FALSE end function IsWepBrokenParry(hand) if env(311, hand) == 0 or env(262, hand) == TRUE then return TRUE else return FALSE end end function IsEnableJumpAtk() local style = c_Style local hand = HAND_RIGHT if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if env(225, hand) == WEAPON_CATEGORY_STAFF then return FALSE else return TRUE end end function IsGuardbreakBlowDamage(damage_level) return FALSE end function IsLadderDamage(hand) local damage_flag = Flag_LadderDamage if damage_flag == LADDER_DAMAGE_SMALL then AddStamina(-30) if ExecLadderFall() == TRUE then return TRUE elseif hand == HAND_STATE_LEFT then ExecEvent("W_LadderDamageSmallLeft") else ExecEvent("W_LadderDamageSmallRight") end elseif damage_flag == LADDER_DAMAGE_LARGE then AddStamina(-40) if ExecLadderFall() == TRUE then return TRUE elseif hand == HAND_STATE_LEFT then ExecEvent("W_LadderDamageLargeLeft") else ExecEvent("W_LadderDamageLargeRight") end else Flag_LadderDamage = LADDER_DAMAGE_NONE return FALSE end Flag_LadderDamage = LADDER_DAMAGE_NONE return TRUE end function CalcDamageCount() if env(334, 8) == TRUE then SetVariable("UseChainRecover", 1) return end local damagecount = GetVariable("DamageCount") SetVariable("DamageCount", damagecount + 1) SetVariable("UseChainRecover", 1) end function ResetDamageCount() SetVariable("DamageCount", 0) SetVariable("UseChainRecover", 0) return end function ExecGuard(event, blend_type) if env(1106, ACTION_ARM_L1) == TRUE or 0 < env(1108, ACTION_ARM_L1) then if env(1001) <= 0 then return FALSE elseif IsEnableGuard() == TRUE then local style = c_Style local hand = HAND_LEFT if style == HAND_RIGHT_BOTH then hand = HAND_RIGHT end local kind = env(225, hand) local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) local guardindex = env(278, hand) if kind == WEAPON_CATEGORY_TORCH and style == HAND_RIGHT then guardindex = GUARD_STYLE_TORCH elseif sp_kind == 240 and style == HAND_RIGHT then guardindex = GUARD_STYLE_TORCH elseif (style == HAND_RIGHT_BOTH or style == HAND_LEFT_BOTH) and env("待機アニメカテゴリ取得") ~= 15 then guardindex = GUARD_STYLE_DEFAULT end SetVariable("IndexGuardStyle", guardindex) if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(event, blend_type) return TRUE end end return FALSE end function ExecStop() if 0 < GetVariable("MoveSpeedLevel") and env(1116, 100200) == FALSE then return FALSE end local stop_speed = GetVariable("MoveSpeedLevelReal") local movedirection = GetVariable("MoveDirection") SetVariable("ArtsTransition", 0) if 0 <= stop_speed and stop_speed <= 1 then if stop_speed <= 0.349999994039536 then ExecEventAllBody("W_Idle") elseif movedirection == 0 then ExecEventHalfBlend(Event_RunStopFront, ALLBODY) elseif movedirection == 1 then ExecEventHalfBlend(Event_RunStopBack, ALLBODY) elseif movedirection == 2 then ExecEventHalfBlend(Event_RunStopLeft, ALLBODY) elseif movedirection == 3 then ExecEventHalfBlend(Event_RunStopRight, ALLBODY) end elseif 1 < stop_speed then ExecEventHalfBlend(Event_DashStop, ALLBODY) else ExecEventAllBody("W_Idle") end return TRUE end function ExecStopHalfBlend(event, to_idle) if 0 < GetVariable("MoveSpeedLevel") and env(1116, 100200) == FALSE then return FALSE else SetVariable("LocomotionState", 0) if to_idle == TRUE then ExecEventNoReset("W_Idle") return TRUE else ExecEventHalfBlendNoReset(event, LOWER) return TRUE end end end function MoveStart(blend_type, event, gen_hand) if GetVariable("MoveSpeedLevel") <= 0 then return FALSE elseif env(1116, 100200) == TRUE then return FALSE elseif blend_type ~= LOWER then if gen_hand == FALSE then SetVariable("ArtsTransition", 0) else SetArtsGeneratorTransitionIndex(gen_hand, TRUE) end end if GetLocomotionState() ~= PLAYER_STATE_MOVE then SetVariable("MoveSpeedLevelReal", 0) SpeedUpdate() end if blend_type == ALLBODY and event[2] == MOVE_DEF0 then local guard_event = Event_GuardStart if IsNodeActive("Rolling_CMSG", "RollingSelftrans_CMSG", "EStepDown_CMSG") == TRUE then guard_event = Event_GuardStartLong end if ExecGuard(guard_event, UPPER) == TRUE then blend_type = LOWER end end ExecEventHalfBlend(event, blend_type) return TRUE end function MoveStartonCancelTiming(event, gen_hand) if env(2000) == TRUE then if GetLocomotionState() == PLAYER_STATE_MOVE then if MoveStart(UPPER, event, gen_hand) == TRUE then return TRUE end elseif MoveStart(ALLBODY, event, gen_hand) == TRUE then return TRUE end end return FALSE end function ExecAttack(r1, r2, l1, l2, b1, b2, is_guard, blend_type, artsr1, artsr2) if c_HasActionRequest == FALSE then return FALSE elseif env(1001) <= 0 then return FALSE end local request = GetAttackRequest(is_guard) if request == ATTACK_REQUEST_INVALID then return FALSE end local style = c_Style local atk_hand = HAND_RIGHT local is_find_atk = TRUE local is_atk_auto_aim = TRUE act(2006, 0) if env(271) == TRUE then r1 = "W_AttackRightLight1" r2 = "W_AttackRightHeavy1Start" l1 = "W_AttackLeftLight1" l2 = "W_AttackLeftHeavy1" b1 = "W_AttackBothLight1" b2 = "W_AttackBothHeavy1Start" end if request == ATTACK_REQUEST_RIGHT_LIGHT then if artsr1 == TRUE then SetSwordArtsPointInfo(ACTION_ARM_R1, TRUE) end if IsArtsSpAtk() == TRUE and r1 == "W_AttackRightLightStep" then r1 = "W_AttackRightLightStepSpecial" end ExecEventAllBody(r1) elseif request == ATTACK_REQUEST_LIGHT_KICK then if HAND_LEFT_BOTH <= style then ExecEventAllBody("W_AttackBothLightKick") else ExecEventAllBody("W_AttackRightLightKick") end elseif request == ATTACK_REQUEST_RIGHT_HEAVY then if artsr2 == TRUE then SetSwordArtsPointInfo(ACTION_ARM_R2, TRUE) end if IsWarcrySpAtk() == TRUE then if r2 == "W_AttackRightHeavy1Start" then r2 = "W_AttackRightHeavySpecial1Start" elseif r2 == "W_AttackRightHeavy1SubStart" then r2 = "W_AttackRightHeavySpecial1SubStart" elseif r2 == "W_AttackRightHeavy2Start" then r2 = "W_AttackRightHeavySpecial2Start" end elseif IsWepBrokenHeavyAtk() == TRUE then if r2 == "W_AttackRightHeavy1Start" then r2 = "W_AttackRightHeavyWepBroken1Start" elseif r2 == "W_AttackRightHeavy1SubStart" then r2 = "W_AttackRightHeavyWepBroken1SubStart" elseif r2 == "W_AttackRightHeavy2Start" then r2 = "W_AttackRightHeavyWepBroken2Start" end end ExecEventAllBody(r2) elseif request == ATTACK_REQUEST_HEAVY_KICK then if HAND_LEFT_BOTH <= style then if IsArtsSpAtk() == TRUE then ExecEventAllBody("W_AttackBothHeavyKickSpecial") else ExecEventAllBody("W_AttackBothHeavyKick") end elseif IsArtsSpAtk() == TRUE then ExecEventAllBody("W_AttackRightHeavyKickSpecial") else ExecEventAllBody("W_AttackRightHeavyKick") end elseif request == ATTACK_REQUEST_LEFT_LIGHT then atk_hand = HAND_LEFT ExecEventAllBody(l1) elseif request == ATTACK_REQUEST_LEFT_HEAVY then atk_hand = HAND_LEFT ExecEventAllBody(l2) elseif request == ATTACK_REQUEST_LEFT_HEAVY_SP then atk_hand = HAND_LEFT if l2 == "W_AttackLeftHeavy2" then l2 = "W_AttackLeftHeavySp2" elseif l2 == "W_AttackLeftHeavy3" then l2 = "W_AttackLeftHeavySp3" else l2 = "W_AttackLeftHeavySp1" end ExecEventAllBody(l2) elseif request == ATTACK_REQUEST_BOTH_LIGHT then if artsr1 == TRUE then SetSwordArtsPointInfo(ACTION_ARM_R1, TRUE) end if IsArtsSpAtk() == TRUE and b1 == "W_AttackBothLightStep" then b1 = "W_AttackBothLightStepSpecial" end ExecEventAllBody(b1) elseif request == ATTACK_REQUEST_BOTH_LEFT then if r1 == "W_AttackRightLightDash" then l1 = "W_AttackBothLeftDash" elseif r1 == "W_AttackRightLightStep" then l1 = "W_AttackBothLeftStep" elseif l1 == "W_AttackLeftLight1" then l1 = "W_AttackBothLeft1" elseif l1 == "W_AttackLeftLight2" then l1 = "W_AttackBothLeft2" end ExecEventAllBody(l1) elseif request == ATTACK_REQUEST_BOTH_HEAVY then if artsr2 == TRUE then SetSwordArtsPointInfo(ACTION_ARM_R2, TRUE) end if IsWarcrySpAtk() == TRUE then if b2 == "W_AttackBothHeavy1Start" then b2 = "W_AttackBothHeavySpecial1Start" elseif b2 == "W_AttackBothHeavy1SubStart" then b2 = "W_AttackBothHeavySpecial1SubStart" elseif b2 == "W_AttackBothHeavy2Start" then b2 = "W_AttackBothHeavySpecial2Start" end elseif IsWepBrokenHeavyAtk() == TRUE then if b2 == "W_AttackBothHeavy1Start" then b2 = "W_AttackBothHeavyWepBroken1Start" elseif b2 == "W_AttackBothHeavy1SubStart" then b2 = "W_AttackBothHeavyWepBroken1SubStart" elseif b2 == "W_AttackBothHeavy2Start" then b2 = "W_AttackBothHeavyWepBroken2Start" end end ExecEventAllBody(b2) elseif request == ATTACK_REQUEST_ARROW_BOTH_RIGHT then if ExecHandChange(HAND_RIGHT, TRUE, blend_type) == TRUE then return TRUE else return FALSE end elseif request == ATTACK_REQUEST_ARROW_BOTH_LEFT then if ExecHandChange(HAND_LEFT, TRUE, blend_type) == TRUE then return TRUE else return FALSE end elseif request == ATTACK_REQUEST_LEFT_REVERSAL then ExecEventAllBody("W_AttackLeftReversal") elseif request == SWORDARTS_REQUEST_LEFT_PARRY then is_find_atk = FALSE atk_hand = HAND_LEFT SetBaseCategory() if IsWepBrokenParry(HAND_LEFT) == TRUE then ExecEventAllBody("W_ParryLeftStart_WepBreak") else ExecEventAllBody("W_ParryLeftStart") end elseif request == SWORDARTS_REQUEST_LEFT_MAGICBUFF then is_find_atk = FALSE is_atk_auto_aim = FALSE atk_hand = HAND_LEFT SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(Event_MagicBuffLeft, blend_type) elseif request == SWORDARTS_REQUEST_LEFT_CROSSBOWSTEPIN then return FALSE elseif request == SWORDARTS_REQUEST_LEFT_ONESHOTFULL then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) atk_hand = HAND_LEFT SetBaseCategory() ExecEventAllBody("W_OneShotFullLeftStart") elseif request == SWORDARTS_REQUEST_LEFT_MAGICBUFFPRAY then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, FALSE) ExecEventHalfBlend(Event_MagicBuffLeft, ALLBODY) elseif request == SWORDARTS_REQUEST_LEFT_MAGICBUFFATTACK then atk_hand = HAND_LEFT SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) local sp_kind_left = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) local sp_kind_right = env("装備武器特殊カテゴリ番号取得", HAND_RIGHT) local dual = FALSE local style = c_Style if sp_kind_left == 265 and sp_kind_right == 265 then dual = TRUE end if dual == TRUE and style == HAND_RIGHT then if IsNodeActive("MagicBuffLeft_Upper_Selector") == TRUE then ExecEventAllBody("W_MagicBuffRight3") elseif IsNodeActive("MagicBuffLeft2_Selector") == TRUE then ExecEventAllBody("W_MagicBuffRight2") elseif IsNodeActive("MagicBuffLeft3_Selector") == TRUE then ExecEventAllBody("W_MagicBuffRight3") elseif IsNodeActive("MagicBuffRight_Upper_Selector") == TRUE then ExecEventAllBody("W_MagicBuffLeft3") elseif IsNodeActive("MagicBuffRight2_Selector") == TRUE then ExecEventAllBody("W_MagicBuffLeft2") elseif IsNodeActive("MagicBuffRight3_Selector") == TRUE then ExecEventAllBody("W_MagicBuffLeft3") else ExecEventHalfBlend(Event_MagicBuffRight, ALLBODY) end elseif IsNodeActive("MagicBuffLeft_Upper_Selector") == TRUE then ExecEventAllBody("W_MagicBuffLeft2") elseif IsNodeActive("MagicBuffLeft2_Selector") == TRUE then ExecEventAllBody("W_MagicBuffLeft3") elseif IsNodeActive("MagicBuffLeft3_Selector") == TRUE then ExecEventAllBody("W_MagicBuffLeft2") else ExecEventHalfBlend(Event_MagicBuffLeft, ALLBODY) end elseif request == SWORDARTS_REQUEST_RIGHT_STEPIN or request == SWORDARTS_REQUEST_LEFT_STEPIN then is_find_atk = FALSE SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) if IsNodeActive("StepInRightStart_CMSG", "StepInRightUppercut", "StepInRightSlash") ~= TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, FALSE) end AddStamina(-25) ExecEventHalfBlend(Event_StepInRightStart, ALLBODY) elseif request == SWORDARTS_REQUEST_RIGHT_PARRY then is_find_atk = FALSE local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if IsWepBrokenParry(hand) == TRUE then ExecEventAllBody("W_ParryRightStart_WepBreak") else ExecEventAllBody("W_ParryRightStart") end elseif request == SWORDARTS_REQUEST_RIGHT_SPIN or request == SWORDARTS_REQUEST_LEFT_SPIN then is_find_atk = FALSE SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) AddStamina(-35) SetVariable("SpinAngle", GetVariable("MoveAngle")) ExecEventAllBody("W_SpinRightStart") elseif request == SWORDARTS_REQUEST_RIGHT_STRONGBASH or request == SWORDARTS_REQUEST_LEFT_STRONGBASH then is_find_atk = FALSE ExecEventAllBody("W_StrongBashRightStart") elseif request == SWORDARTS_REQUEST_RIGHT_DOUBLEATTACK or request == SWORDARTS_REQUEST_LEFT_DOUBLEATTACK then ExecEventAllBody("W_DoubleAttackRightStart") elseif request == SWORDARTS_REQUEST_RIGHT_STAMPEDE or request == SWORDARTS_REQUEST_LEFT_STAMPEDE then ExecEventAllBody("W_StampedeRightStart") elseif request == SWORDARTS_REQUEST_RIGHT_SPECIALATTACK or request == SWORDARTS_REQUEST_LEFT_SPECIALATTACK then ExecEventAllBody("W_SpecialAttackRightStart") elseif request == SWORDARTS_REQUEST_RIGHT_ATTACKSPIN or request == SWORDARTS_REQUEST_LEFT_ATTACKSPIN then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) if IsNodeActive("AttackSpinStart_CMSG", "AttackSpinLight_CMSG", "AttackSpinHeavy_CMSG") ~= TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, FALSE) end ExecEventHalfBlend(Event_AttackSpinStart, ALLBODY) elseif request == SWORDARTS_REQUEST_RIGHT_WARCRY or request == SWORDARTS_REQUEST_LEFT_WARCRY then is_find_atk = FALSE is_atk_auto_aim = FALSE SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) ExecEventAllBody("W_Warcry") elseif request == SWORDARTS_REQUEST_RIGHT_CHARGE or request == SWORDARTS_REQUEST_LEFT_CHARGE then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) ExecEventHalfBlend(Event_Charge, ALLBODY) elseif request == SWORDARTS_REQUEST_RIGHT_ENDURE or request == SWORDARTS_REQUEST_LEFT_ENDURE then is_find_atk = FALSE SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) ExecEventHalfBlend(Event_Endure, ALLBODY) SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, FALSE) elseif request == SWORDARTS_REQUEST_RIGHT_MAGICBUFF then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(Event_MagicBuffRight, blend_type) elseif request == SWORDARTS_REQUEST_RIGHT_MAGICBUFFATTACK then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) local sp_kind_left = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) local sp_kind_right = env("装備武器特殊カテゴリ番号取得", HAND_RIGHT) local dual = FALSE local style = c_Style if sp_kind_left == 265 and sp_kind_right == 265 then dual = TRUE end if dual == TRUE and style == HAND_RIGHT then if IsNodeActive("MagicBuffRight_Upper_Selector") == TRUE then ExecEventAllBody("W_MagicBuffLeft3") elseif IsNodeActive("MagicBuffRight2_Selector") == TRUE then ExecEventAllBody("W_MagicBuffLeft2") elseif IsNodeActive("MagicBuffRight3_Selector") == TRUE then ExecEventAllBody("W_MagicBuffLeft3") elseif IsNodeActive("MagicBuffLeft_Upper_Selector") == TRUE then ExecEventAllBody("W_MagicBuffRight3") elseif IsNodeActive("MagicBuffLeft2_Selector") == TRUE then ExecEventAllBody("W_MagicBuffRight2") elseif IsNodeActive("MagicBuffLeft3_Selector") == TRUE then ExecEventAllBody("W_MagicBuffRight3") else ExecEventHalfBlend(Event_MagicBuffRight, ALLBODY) end elseif IsNodeActive("MagicBuffRight_Upper_Selector") == TRUE then ExecEventAllBody("W_MagicBuffRight2") elseif IsNodeActive("MagicBuffRight2_Selector") == TRUE then ExecEventAllBody("W_MagicBuffRight3") elseif IsNodeActive("MagicBuffRight3_Selector") == TRUE then ExecEventAllBody("W_MagicBuffRight2") else ExecEventHalfBlend(Event_MagicBuffRight, ALLBODY) end elseif request == SWORDARTS_REQUEST_LEFT_DAGGERSTANCE or request == SWORDARTS_REQUEST_RIGHT_DAGGERSTANCE then if IsNodeActive("AttackRight_Script") == TRUE or IsNodeActive("AttackBoth_Script") == TRUE then if GetLocomotionState() == PLAYER_STATE_IDLE then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) local rightarmlocation = RightArmLocation() if rightarmlocation == 0 then ExecEventAllBody("W_DrawStanceRightComboStartRight") else ExecEventAllBody("W_DrawStanceRightComboStartLeft") end else return FALSE end elseif 1.5 < GetVariable("MoveSpeedLevel") then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) local rightarmlocation = RightArmLocation() ExecEventAllBody("W_DrawStanceStartDash") elseif IsNodeActive("Rolling_CMSG") == TRUE and env(301, 0) == TRUE then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) local rightarmlocation = RightArmLocation() ExecEventAllBody("W_DrawStanceStartRolling") else return FALSE end elseif request == SWORDARTS_REQUEST_RIGHT_SAMAGIC or request == SWORDARTS_REQUEST_LEFT_SAMAGIC then return FALSE elseif request == SWORDARTS_REQUEST_LEFT_DRAWSTANCE or request == SWORDARTS_REQUEST_RIGHT_DRAWSTANCE then return FALSE elseif request == SWORDARTS_REQUEST_LEFT_CHAINSHOT or request == SWORDARTS_REQUEST_RIGHT_CHAINSHOT then return FALSE elseif request == SWORDARTS_REQUEST_LEFT_WIDESHOT or request == SWORDARTS_REQUEST_RIGHT_WIDESHOT then return FALSE elseif request == SWORDARTS_REQUEST_LEFT_STRONGSHOT or request == SWORDARTS_REQUEST_RIGHT_STRONGSHOT then return FALSE elseif request == SWORDARTS_REQUEST_RIGHT_SAMAGICMEDIUM or request == SWORDARTS_REQUEST_LEFT_SAMAGICMEDIUM then return FALSE elseif request == SWORDARTS_REQUEST_RIGHT_SAMAGICSTRONG or request == SWORDARTS_REQUEST_LEFT_SAMAGICSTRONG then return FALSE elseif request == SWORDARTS_REQUEST_RIGHT_CIRCLESTEP or request == SWORDARTS_REQUEST_LEFT_CIRCLESTEP then is_find_atk = FALSE is_atk_auto_aim = FALSE local angle = GetVariable("MoveAngle") if GetWeightIndex(FALSE) == EVASION_WEIGHT_INDEX_OVERWEIGHT then local event = "W_RollingOverweightFront" if 135 < math.abs(angle) then event = "W_RollingOverweightBack" elseif 45 < angle then event = "W_RollingOverweightRight" elseif angle < -45 then event = "W_RollingOverweightLeft" end ExecEventAllBody(event) else local front, back, left, right = false if 135 < math.abs(angle) then back = true elseif 45 < angle then right = true elseif angle < -45 then left = true else front = true end SetVariable("EnableTAE_CircleStepFront", front) SetVariable("EnableTAE_CircleStepBack", back) SetVariable("EnableTAE_CircleStepLeft", left) SetVariable("EnableTAE_CircleStepRight", right) SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) if IsNodeActive("CircleStepStart_Blend") == TRUE then if 0 <= angle then SetVariable("CircleStepDirectionSelftrans", 1) else SetVariable("CircleStepDirectionSelftrans", 0) end SetVariable("CircleStepAngleSelftrans", angle) ExecEventAllBody("W_CircleStepStartSelftrans") else if 0 <= angle then SetVariable("CircleStepDirection", 1) else SetVariable("CircleStepDirection", 0) end SetVariable("CircleStepAngle", angle) ExecEventAllBody("W_CircleStepStart") end end elseif request == SWORDARTS_REQUEST_RIGHT_CHARGESHOT or request == SWORDARTS_REQUEST_LEFT_CHARGESHOT then is_find_atk = FALSE is_atk_auto_aim = FALSE ExecEventHalfBlend(Event_ChargeShotRightStart, ALLBODY) elseif request == SWORDARTS_REQUEST_RIGHT_CROSSBOWSTEPIN then is_find_atk = FALSE SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, FALSE) ExecEventHalfBlend(Event_CrossbowStepInRightStart, ALLBODY) elseif request == SWORDARTS_REQUEST_RIGHT_HEADHUNT or request == SWORDARTS_REQUEST_LEFT_HEADHUNT then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, FALSE) ExecEventHalfBlend(Event_HeadHunt, ALLBODY) elseif request == SWORDARTS_REQUEST_RIGHT_ONESHOT or request == SWORDARTS_REQUEST_LEFT_ONESHOT then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, FALSE) ExecEventHalfBlend(Event_OneShot, ALLBODY) elseif request == SWORDARTS_REQUEST_RIGHT_ONESHOTFULL then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) if style == HAND_RIGHT then ExecEventAllBody("W_OneShotFullRightStart") else ExecEventAllBody("W_OneShotFullBothStart") end elseif request == SWORDARTS_REQUEST_RIGHT_ONESHOT_NOGENTRANS or request == SWORDARTS_REQUEST_LEFT_ONESHOT_NOGENTRANS then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) ExecEventAllBody("W_OneShotNoGenTransStart") elseif request == SWORDARTS_REQUEST_RIGHT_STORMSTANCE or request == SWORDARTS_REQUEST_LEFT_STORMSTANCE then return FALSE elseif request == SWORDARTS_REQUEST_RIGHT_MAGICBUFFPRAY then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, FALSE) ExecEventHalfBlend(Event_MagicBuffRight, ALLBODY) elseif request == SWORDARTS_REQUEST_RIGHT_FOURWAYATTACK or request == SWORDARTS_REQUEST_LEFT_FOURWAYATTACK then local angle = GetVariable("MoveAngle") if GetWeightIndex(FALSE) == EVASION_WEIGHT_INDEX_OVERWEIGHT then local event = "W_RollingOverweightFront" if 135 < math.abs(angle) then event = "W_RollingOverweightBack" elseif 45 < angle then event = "W_RollingOverweightRight" elseif angle < -45 then event = "W_RollingOverweightLeft" end ExecEventAllBody(event) else local front, back, left, right = false if 135 < math.abs(angle) then back = true elseif 45 < angle then right = true elseif angle < -45 then left = true else front = true end SetVariable("EnableTAE_FourWayAttackStartFront", front) SetVariable("EnableTAE_FourWayAttackStartBack", back) SetVariable("EnableTAE_FourWayAttackStartLeft", left) SetVariable("EnableTAE_FourWayAttackStartRight", right) SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) if IsNodeActive("FourWayAttackStart_CMSG") == FALSE then if 0 <= angle then SetVariable("FourWayAttackStartDirection", 1) else SetVariable("FourWayAttackStartDirection", 0) end SetVariable("FourWayAttackStartAngle", angle) ExecEventAllBody("W_FourWayAttackStart") else if 0 <= angle then SetVariable("FourWayAttackStartDirection_SelfTrans", 1) else SetVariable("FourWayAttackStartDirection_SelfTrans", 0) end SetVariable("FourWayAttackStartAngle_SelfTrans", angle) ExecEventAllBody("W_FourWayAttackStart_SelfTrans") end end elseif request == SWORDARTS_REQUEST_RIGHT_FOURWAYDRAWSTANCE or request == SWORDARTS_REQUEST_LEFT_FOURWAYDRAWSTANCE then is_find_atk = FALSE is_atk_auto_aim = FALSE if GetVariable("MoveSpeedLevel") < 0.509999990463257 then if IsNodeActive("DrawStanceRightEnd_Upper_CMSG", "DrawStanceRightAttackLight_CMSG", "DrawStanceRightAttackLight2_CMSG", "DrawStanceRightAttackLight3_CMSG", "DrawStanceRightAttackHeavy_CMSG") ~= TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, FALSE) end if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end if env(1116, 100490) == TRUE then ExecEventHalfBlend(Event_DrawStanceRightLoop, blend_type) else ExecEventHalfBlend(Event_DrawStanceRightStart, blend_type) end else local angle = GetVariable("MoveAngle") local front, back, left, right = false if 135 < math.abs(angle) then back = true elseif 45 < angle then right = true elseif angle < -45 then left = true else front = true end SetVariable("EnableTAE_FourWayDrawStanceStartFront", front) SetVariable("EnableTAE_FourWayDrawStanceStartBack", back) SetVariable("EnableTAE_FourWayDrawStanceStartLeft", left) SetVariable("EnableTAE_FourWayDrawStanceStartRight", right) SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) if 0 <= angle then SetVariable("FourWayDrawStanceStartDirection", 1) else SetVariable("FourWayDrawStanceStartDirection", 0) end SetVariable("FourWayDrawStanceStartAngle", angle) ExecEventAllBody("W_FourWayDrawStanceRightStart") act(1001, -10) end elseif request == SWORDARTS_REQUEST_LEFT_GATLINGSTANCE or request == SWORDARTS_REQUEST_RIGHT_GATLINGSTANCE then return FALSE elseif request == SWORDARTS_REQUEST_LEFT_RANDOMONESHOT or request == SWORDARTS_REQUEST_RIGHT_RANDOMONESHOT then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) ExecEventAllBody("W_RandomOneShot1") elseif request == ATTACK_REQUEST_ARROW_FIRE_RIGHT or request == ATTACK_REQUEST_ARROW_FIRE_RIGHT2 then is_find_atk = FALSE is_atk_auto_aim = FALSE local arrow_hand = HAND_RIGHT if style == HAND_LEFT_BOTH then arrow_hand = HAND_LEFT end local sp_kind = env("装備武器特殊カテゴリ番号取得", arrow_hand) if IsExistArrow() == TRUE then ExecEventAllBody("W_NoArrow") elseif sp_kind == 81 or sp_kind == 249 then if IsEnoughWeaponReleaseStatus(arrow_hand) == TRUE then if r1 == "W_AttackRightLightStep" then is_find_atk = TRUE ExecEventAllBody("W_AttackArrowRightFireStep") elseif r1 == "W_AttackRightLightDash" then is_find_atk = TRUE ExecEventAllBody("W_AttackArrowRightFireStep") else if env(225, arrow_hand) == WEAPON_CATEGORY_LARGE_ARROW then blend_type = ALLBODY elseif blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(Event_AttackArrowRightStart, blend_type) end else if env(225, arrow_hand) == WEAPON_CATEGORY_LARGE_ARROW then blend_type = ALLBODY elseif blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(Event_AttackArrowRightStart, blend_type) end else if env(225, arrow_hand) == WEAPON_CATEGORY_LARGE_ARROW then blend_type = ALLBODY elseif blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(Event_AttackArrowRightStart, blend_type) end elseif request == ATTACK_REQUEST_RIGHT_CROSSBOW or request == ATTACK_REQUEST_RIGHT_CROSSBOW2 then is_find_atk = FALSE is_atk_auto_aim = FALSE if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end if IsExistBolt(HAND_RIGHT) == TRUE then ExecEventHalfBlend(Event_AttackCrossbowRightEmpty, blend_type) elseif env("ボルト装填状態取得", 1) == TRUE then ExecEventHalfBlend(Event_AttackCrossbowRightStart, blend_type) else ExecEventHalfBlend(Event_AttackCrossbowRightReload, blend_type) end elseif request == ATTACK_REQUEST_LEFT_CROSSBOW or request == ATTACK_REQUEST_LEFT_CROSSBOW2 then is_find_atk = FALSE is_atk_auto_aim = FALSE atk_hand = HAND_LEFT if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end if IsExistBolt(HAND_LEFT) == TRUE then ExecEventHalfBlend(Event_AttackCrossbowLeftEmpty, blend_type) elseif env("ボルト装填状態取得", 0) == TRUE then ExecEventHalfBlend(Event_AttackCrossbowLeftStart, blend_type) else ExecEventHalfBlend(Event_AttackCrossbowLeftReload, blend_type) end elseif request == ATTACK_REQUEST_BOTHRIGHT_CROSSBOW or request == ATTACK_REQUEST_BOTHRIGHT_CROSSBOW2 then is_find_atk = FALSE is_atk_auto_aim = FALSE if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end if IsExistBolt(HAND_RIGHT) == TRUE then ExecEventHalfBlend(Event_AttackCrossbowBothRightEmpty, blend_type) elseif env("ボルト装填状態取得", 1) == TRUE then ExecEventHalfBlend(Event_AttackCrossbowBothRightStart, blend_type) else ExecEventHalfBlend(Event_AttackCrossbowBothRightReload, blend_type) end elseif request == ATTACK_REQUEST_BOTHLEFT_CROSSBOW or request == ATTACK_REQUEST_BOTHLEFT_CROSSBOW2 then is_find_atk = FALSE is_atk_auto_aim = FALSE if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end if IsExistBolt(HAND_LEFT) == TRUE then ExecEventHalfBlend(Event_AttackCrossbowBothLeftEmpty, blend_type) elseif env("ボルト装填状態取得", 0) == TRUE then ExecEventHalfBlend(Event_AttackCrossbowBothLeftStart, blend_type) else ExecEventHalfBlend(Event_AttackCrossbowBothLeftReload, blend_type) end elseif request == ATTACK_REQUEST_ATTACK_WHILE_GUARD then local index = env(278, HAND_LEFT) if GetVariable("IndexGuardStyle") == GUARD_STYLE_TORCH then index = 3 end SetVariable("IndexAttackWhileGuard", index) ExecEventAllBody("W_AttackRightWhileGuard") else return FALSE end if is_find_atk == TRUE then SetInterruptType(INTERRUPT_FINDATTACK) end if is_atk_auto_aim == TRUE then SetVariable("AtkAutoAimFlag", true) if GetVariable("IsLockon") == false then act("自動捕捉対象設定") end end SetVariable("AtkAutoAimTime", 0) if style == HAND_RIGHT_BOTH then atk_hand = HAND_RIGHT elseif style == HAND_LEFT_BOTH then atk_hand = HAND_LEFT end SetAttackHand(atk_hand) SetAIActionState() return TRUE end function ExecSwordArtsStance(blend_type) if c_IsEnableSwordArts == FALSE then return FALSE end local style = c_Style local arts_id = c_SwordArtsID if env(1108, ACTION_ARM_L2) <= 0 then return FALSE elseif arts_id == SWORDARTS_DAGGERSTANCE then if IsNodeActive("AttackRight_Script") == TRUE or IsNodeActive("AttackBoth_Script") == TRUE then if GetLocomotionState() == PLAYER_STATE_IDLE then return FALSE end elseif 1.5 < GetVariable("MoveSpeedLevel") then return FALSE elseif IsNodeActive("Rolling_CMSG") == TRUE then return FALSE end end if env("装備武器特殊カテゴリ番号取得", c_SwordArtsHand) == 248 and env(1001) <= 0 then return FALSE elseif arts_id == SWORDARTS_DRAWSTANCE or arts_id == SWORDARTS_DAGGERSTANCE then if IsNodeActive("DrawStanceRightEnd_Upper_CMSG", "DrawStanceRightAttackLight_CMSG", "DrawStanceRightAttackHeavy_CMSG") ~= TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, FALSE) end if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end if env(1116, 100490) == TRUE then ExecEventHalfBlend(Event_DrawStanceRightLoop, blend_type) else ExecEventHalfBlend(Event_DrawStanceRightStart, blend_type) end elseif arts_id == SWORDARTS_STORMSTANCE then if IsNodeActive("StormStanceEnd_Upper_CMSG", "StormStanceFullEnd_Upper_CMSG", "StormStanceLight_CMSG", "StormStanceFullLight_CMSG", "StormStanceHeavy_CMSG", "StormStanceFullHeavy_CMSG") ~= TRUE and IsNodeActive("StormStanceChange_Upper_CMSG") == FALSE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, FALSE) end if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end local stormstancefull = FALSE if c_SwordArtsHand == HAND_LEFT then if env(1116, 100911) == TRUE then stormstancefull = TRUE end elseif env(1116, 100910) == TRUE then stormstancefull = TRUE end if stormstancefull == FALSE then ExecEventHalfBlend(Event_StormStanceStart, blend_type) else ExecEventHalfBlend(Event_StormStanceFullStart, blend_type) end elseif arts_id == SWORDARTS_CHAINSHOT or arts_id == SWORDARTS_WIDESHOT or arts_id == SWORDARTS_STRONGSHOT then if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end if HAND_LEFT_BOTH <= style then SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) ExecEventHalfBlend(Event_ChainShotRightStart, blend_type) else return FALSE end elseif arts_id == SWORDARTS_FOURWAYDRAWSTANCE then if arts_id == SWORDARTS_FOURWAYDRAWSTANCE then if env(1108, ACTION_ARM_L2) <= 0 then return FALSE elseif IsNodeActive("DrawStanceRightEnd_Upper_CMSG", "DrawStanceRightAttackLight_CMSG", "DrawStanceRightAttackLight2_CMSG", "DrawStanceRightAttackLight3_CMSG", "DrawStanceRightAttackHeavy_CMSG") ~= TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, FALSE) end if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end if env(1116, 100490) == TRUE then ExecEventHalfBlend(Event_DrawStanceRightLoop, blend_type) else ExecEventHalfBlend(Event_DrawStanceRightStart, blend_type) end else local angle = GetVariable("MoveAngle") local front, back, left, right = false if 135 < math.abs(angle) then back = true elseif 45 < angle then right = true elseif angle < -45 then left = true else front = true end SetVariable("EnableTAE_FourWayDrawStanceStartFront", front) SetVariable("EnableTAE_FourWayDrawStanceStartBack", back) SetVariable("EnableTAE_FourWayDrawStanceStartLeft", left) SetVariable("EnableTAE_FourWayDrawStanceStartRight", right) SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) if 0 <= angle then SetVariable("FourWayDrawStanceStartDirection", 1) else SetVariable("FourWayDrawStanceStartDirection", 0) end SetVariable("FourWayDrawStanceStartAngle", angle) ExecEventAllBody("W_FourWayDrawStanceRightStart") act(1001, -10) end elseif arts_id == SWORDARTS_GATLINGSTANCE then if IsNodeActive("GatlingStanceRightEnd_Upper_CMSG") ~= TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, FALSE) end if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end if env(1116, 100490) == TRUE then ExecEventHalfBlend(Event_GatlingStanceRightLoop, blend_type) else ExecEventHalfBlend(Event_GatlingStanceRightStart, blend_type) end else return FALSE end if style == HAND_LEFT_BOTH then SetAttackHand(HAND_LEFT) else SetAttackHand(HAND_RIGHT) end SetAIActionState() return TRUE end function ExecSwordArtsStanceOnCancelTiming(blend_type) if env("剣戟キャンセル可能か") == TRUE and ExecSwordArtsStance(blend_type) == TRUE then return TRUE else return FALSE end end function ExecMagic(quick_type, blend_type) if c_HasActionRequest == FALSE then return FALSE elseif env(1001) <= 0 then return FALSE end local style = c_Style local magic_hand = HAND_RIGHT local is_samagic = FALSE if env(1106, ACTION_ARM_MAGIC_R) == TRUE then if style == HAND_LEFT_BOTH then if GetEquipType(HAND_LEFT, WEAPON_CATEGORY_STAFF) == FALSE then return FALSE end SetAttackHand(HAND_LEFT) else if GetEquipType(HAND_RIGHT, WEAPON_CATEGORY_STAFF) == FALSE then return FALSE end SetAttackHand(HAND_RIGHT) end elseif env(1106, ACTION_ARM_MAGIC_L) == TRUE then if style == HAND_RIGHT_BOTH or style == HAND_LEFT_BOTH then return FALSE elseif GetEquipType(HAND_LEFT, WEAPON_CATEGORY_STAFF) == FALSE then return FALSE end SetAttackHand(HAND_LEFT) magic_hand = HAND_LEFT elseif env(1106, ACTION_ARM_R2) == TRUE then if env(1106, ACTION_ARM_HEAVY_KICK) == TRUE then return FALSE elseif style == HAND_LEFT_BOTH then local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) if sp_kind ~= 178 and sp_kind ~= 207 and sp_kind ~= 217 and sp_kind ~= 220 and sp_kind ~= 234 and sp_kind ~= 257 then return FALSE elseif sp_kind == 257 and env(1116, 100580) == TRUE then return FALSE end SetAttackHand(HAND_LEFT) else local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_RIGHT) if sp_kind ~= 178 and sp_kind ~= 207 and sp_kind ~= 217 and sp_kind ~= 220 and sp_kind ~= 234 and sp_kind ~= 257 then return FALSE elseif sp_kind == 257 and env(1116, 100580) == TRUE then return FALSE end SetAttackHand(HAND_RIGHT) end elseif env(1106, ACTION_ARM_L2) == TRUE then if c_SwordArtsID == SWORDARTS_SAMAGIC or c_SwordArtsID == SWORDARTS_SAMAGICMEDIUM or c_SwordArtsID == SWORDARTS_SAMAGICSTRONG then is_samagic = TRUE if style == HAND_RIGHT_BOTH then SetAttackHand(HAND_RIGHT) elseif style == HAND_LEFT_BOTH then SetAttackHand(HAND_LEFT) elseif c_SwordArtsHand == HAND_RIGHT then SetAttackHand(HAND_RIGHT) else SetAttackHand(HAND_LEFT) magic_hand = HAND_LEFT end elseif style == HAND_RIGHT then local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) if sp_kind ~= 178 and sp_kind ~= 207 and sp_kind ~= 217 and sp_kind ~= 220 and sp_kind ~= 234 and sp_kind ~= 257 then return FALSE end SetAttackHand(HAND_LEFT) magic_hand = HAND_LEFT else return FALSE end else return FALSE end if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end local magic_type = env(227) local magic_index = MAGIC_REQUEST_NOTHING local is_atk_auto_aim = FALSE if env(232) == FALSE then if magic_hand == HAND_LEFT then ExecEventHalfBlend(Event_MagicInvalidLeft, blend_type) else ExecEventHalfBlend(Event_MagicInvalidRight, blend_type) end act(118, TRUE) SetAIActionState() return TRUE elseif magic_type == 0 then magic_index = MAGIC_REQUEST_ENBULLET elseif magic_type == 1 then if c_Style == HAND_LEFT_BOTH then ExecEventHalfBlend(Event_MagicInvalidRight, blend_type) act(118, TRUE) SetAIActionState() return TRUE end magic_index = MAGIC_REQUEST_WEAPON_ENCHANT elseif magic_type == 2 then magic_index = MAGIC_REQUEST_SELF_ENCHANT elseif magic_type == 3 then magic_index = MAGIC_REQUEST_PRAY elseif magic_type == 4 then magic_index = MAGIC_REQUEST_PRAY_BRO elseif magic_type == 5 then magic_index = MAGIC_REQUEST_FLAME_RADIATION elseif magic_type == 6 then magic_index = MAGIC_REQUEST_SELF_FLAME_ENCHANT elseif magic_type == 7 then magic_index = MAGIC_REQUEST_DRAIN elseif magic_type == 8 then magic_index = MAGIC_REQUEST_FLAME_NEAR elseif magic_type == 9 then magic_index = MAGIC_REQUEST_CLOUD elseif magic_type == 10 then magic_index = MAGIC_REQUEST_SPARK elseif magic_type == 11 then magic_index = MAGIC_REQUEST_CHARM elseif magic_type == 12 then magic_index = MAGIC_REQUEST_IMPACT elseif magic_type == 13 then magic_index = MAGIC_REQUEST_CHAMELEON elseif magic_type == 14 then magic_index = MAGIC_REQUEST_TRANSFORM elseif magic_type == 15 then if c_Style == HAND_LEFT_BOTH then ExecEventHalfBlend(Event_MagicInvalidRight, blend_type) act(118, TRUE) SetAIActionState() return TRUE end magic_index = MAGIC_REQUEST_WEAPON_ENCHANT2 elseif magic_type == 16 then magic_index = MMAGIC_REQUEST_SUMMON elseif magic_type == 17 then magic_index = MAGIC_REQUEST_SHIELD_ENCHANT elseif magic_type == 18 then magic_index = MAGIC_REQUEST_FORCE elseif magic_type == 19 then magic_index = MAGIC_REQUEST_THUNDER elseif magic_type == 20 then magic_index = MAGIC_REQUEST_ENVIRONMENT elseif magic_type == 21 then magic_index = MAGIC_REQUEST_BREATH elseif magic_type == 22 then magic_index = MAGIC_REQUEST_ENBULLET2 elseif magic_type == 23 then magic_index = MAGIC_REQUEST_FLAMETHROWER elseif magic_type == 24 then magic_index = MAGIC_REQUEST_WHIP is_atk_auto_aim = TRUE elseif magic_type == 25 then magic_index = MAGIC_REQUEST_SLASH is_atk_auto_aim = TRUE elseif magic_type == 26 then magic_index = MAGIC_REQUEST_PRAYHOLD elseif magic_type == 27 then magic_index = MAGIC_REQUEST_STANDINGPRAYHOLD elseif magic_type == 28 then magic_index = MAGIC_REQUEST_AOEPRAYHOLD elseif magic_type == 29 then magic_index = MAGIC_REQUEST_QUICKENBULLET elseif magic_type == 30 then magic_index = MAGIC_REQUEST_QUICKSLASH is_atk_auto_aim = TRUE elseif magic_type == 31 then magic_index = MAGIC_REQUEST_BEAM_CANNON elseif magic_type == 32 then magic_index = MAGIC_REQUEST_FLAME_BACKHAND elseif magic_type == 33 then magic_index = MAGIC_REQUEST_FLAME_GRAB is_atk_auto_aim = TRUE elseif magic_type == 34 then magic_index = MAGIC_REQUEST_CRUSH is_atk_auto_aim = TRUE elseif magic_type == 35 then magic_index = MAGIC_REQUEST_MIRACLE_RADIATION elseif magic_type == 36 then magic_index = MAGIC_REQUEST_LIGHTNING_ROD elseif magic_type == 37 then magic_index = MAGIC_REQUEST_CHOP is_atk_auto_aim = TRUE elseif magic_type == 38 then magic_index = MAGIC_REQUEST_TRAP elseif magic_type == 39 then magic_index = MAGIC_REQUEST_WRATH elseif magic_type == 40 then magic_index = MAGIC_REQUEST_MACHINEGUN elseif magic_type == 41 then magic_index = MAGIC_REQUEST_STRONGENBULLET elseif magic_type == 42 then magic_index = MAGIC_REQUEST_FAST_SPARK elseif magic_type == 43 then magic_index = MAGIC_REQUEST_FAST_FLAME_RADIATION elseif magic_type == 44 then magic_index = MAGIC_REQUEST_SCYTHE is_atk_auto_aim = TRUE elseif magic_type == 45 then magic_index = MAGIC_REQUEST_HOLY_SPARK elseif magic_type == 46 then magic_index = MAGIC_REQUEST_SLASHHOLD elseif magic_type == 47 then magic_index = MAGIC_REQUEST_BIT elseif magic_type == 48 then magic_index = MAGIC_REQUEST_CHAKRAM elseif magic_type == 49 then magic_index = MAGIC_REQUEST_BOW elseif magic_type == 50 then magic_index = MAGIC_REQUEST_FAN else if magic_hand == HAND_LEFT then ExecEventHalfBlend(Event_MagicInvalidLeft, blend_type) else ExecEventHalfBlend(Event_MagicInvalidRight, blend_type) end act(118, TRUE) SetAIActionState() return TRUE end if env(116) == TRUE then return FALSE elseif env(114) == TRUE then ResetRequest() act(124) return TRUE end SetVariable("IndexMagicType", magic_index) if IsQuickMagic() == TRUE then if magic_hand == HAND_RIGHT then if quick_type == QUICKTYPE_NORMAL then ExecEventHalfBlend(Event_MagicLaunchRight, blend_type) elseif quick_type == QUICKTYPE_DASH then ExecEventHalfBlend(Event_QuickMagicFireRightDash, blend_type) elseif quick_type == QUICKTYPE_ROLLING then ExecEventHalfBlend(Event_QuickMagicFireRightStep, blend_type) elseif quick_type == QUICKTYPE_ATTACK then if ForwardLeg() == 1 then ExecEventHalfBlend(Event_QuickMagicFireRightAttackRight, blend_type) else ExecEventHalfBlend(Event_QuickMagicFireRightAttackLeft, blend_type) end elseif quick_type == QUICKTYPE_COMBO then if ForwardLeg() == 1 then ExecEventHalfBlend(Event_QuickMagicFireRightAttackRight2, blend_type) else ExecEventHalfBlend(Event_QuickMagicFireRightAttackLeft2, blend_type) end end elseif quick_type == QUICKTYPE_NORMAL then ExecEventHalfBlend(Event_MagicLaunchLeft, blend_type) elseif quick_type == QUICKTYPE_DASH then ExecEventHalfBlend(Event_QuickMagicFireLeftDash, blend_type) elseif quick_type == QUICKTYPE_ROLLING then ExecEventHalfBlend(Event_QuickMagicFireLeftStep, blend_type) elseif quick_type == QUICKTYPE_ATTACK then if ForwardLeg() == 1 then ExecEventHalfBlend(Event_QuickMagicFireLeftAttackRight, blend_type) else ExecEventHalfBlend(Event_QuickMagicFireLeftAttackLeft, blend_type) end elseif quick_type == QUICKTYPE_COMBO then if ForwardLeg() == 1 then ExecEventHalfBlend(Event_QuickMagicFireLeftAttackRight2, blend_type) else ExecEventHalfBlend(Event_QuickMagicFireLeftAttackLeft2, blend_type) end end elseif IsComboMagic() == TRUE then if magic_hand == HAND_RIGHT then if env(1116, 100620) == TRUE then ExecEventHalfBlend(Event_MagicFireRight2, blend_type) elseif env(1116, 100650) == TRUE then ExecEventHalfBlend(Event_MagicLaunchRight, blend_type) elseif env(1116, 100630) == TRUE then ExecEventHalfBlend(Event_MagicFireRight3, blend_type) elseif env(1116, 100660) == TRUE then ExecEventHalfBlend(Event_MagicLaunchRight, blend_type) elseif env(1116, 100640) == TRUE then ExecEventHalfBlend(Event_MagicFireRight2, blend_type) elseif env(1116, 100670) == TRUE then ExecEventHalfBlend(Event_MagicLaunchRight, blend_type) else ExecEventHalfBlend(Event_MagicLaunchRight, blend_type) end elseif env(1116, 100620) == TRUE then ExecEventHalfBlend(Event_MagicLaunchLeft, blend_type) elseif env(1116, 100650) == TRUE then ExecEventHalfBlend(Event_MagicFireLeft2, blend_type) elseif env(1116, 100630) == TRUE then ExecEventHalfBlend(Event_MagicLaunchLeft, blend_type) elseif env(1116, 100660) == TRUE then ExecEventHalfBlend(Event_MagicFireLeft3, blend_type) elseif env(1116, 100640) == TRUE then ExecEventHalfBlend(Event_MagicLaunchLeft, blend_type) elseif env(1116, 100670) == TRUE then ExecEventHalfBlend(Event_MagicFireLeft2, blend_type) else ExecEventHalfBlend(Event_MagicLaunchLeft, blend_type) end elseif is_samagic == TRUE then ExecEventNoReset("W_SAMagicStart") SetVariable("SAMagicBlendRate", 1) SetSwordArtsPointInfo(ACTION_ARM_L2, TRUE) if c_SwordArtsID == SWORDARTS_SAMAGIC then if env("アーツポイント足りるか", ACTION_ARM_L2, c_SwordArtsHand) == TRUE then act(2002, 120800) act(2002, 120801) else act(2002, 120810) act(2002, 120811) end elseif c_SwordArtsID == SWORDARTS_SAMAGICMEDIUM then if env("アーツポイント足りるか", ACTION_ARM_L2, c_SwordArtsHand) == TRUE then act(2002, 120820) act(2002, 120821) else act(2002, 120830) act(2002, 120831) end elseif env("アーツポイント足りるか", ACTION_ARM_L2, c_SwordArtsHand) == TRUE then act(2002, 120840) act(2002, 120841) else act(2002, 120850) act(2002, 120851) end if magic_hand == HAND_RIGHT then ExecEventHalfBlend(Event_MagicLaunchRightSA, blend_type) else ExecEventHalfBlend(Event_MagicLaunchLeftSA, blend_type) end elseif magic_hand == HAND_RIGHT then ExecEventHalfBlend(Event_MagicLaunchRight, blend_type) else ExecEventHalfBlend(Event_MagicLaunchLeft, blend_type) end if IsAttackMagic(magic_index) == TRUE then SetInterruptType(INTERRUPT_FINDATTACK) end if is_atk_auto_aim == TRUE then SetVariable("AtkAutoAimFlag", true) if GetVariable("IsLockon") == false then act("自動捕捉対象設定") end end SetVariable("AtkAutoAimTime", 0) act(118, TRUE) SetAIActionState() return TRUE end function ExecGesture() if c_HasActionRequest == FALSE then return FALSE elseif env(1106, ACTION_ARM_GESTURE) == FALSE then return FALSE end local request = env(1104) if request == INVALID then return FALSE end local isloop = FALSE if request == 7 then SetVariable("IndexGestureLoop", 0) isloop = TRUE elseif request == 9 then SetVariable("IndexGestureLoop", 1) isloop = TRUE elseif request == 17 then SetVariable("IndexGestureLoop", 2) isloop = TRUE elseif request == 22 then SetVariable("IndexGestureLoop", 3) isloop = TRUE elseif request == 23 then SetVariable("IndexGestureLoop", 4) isloop = TRUE elseif request == 25 then SetVariable("IndexGestureLoop", 5) isloop = TRUE elseif request == 27 then SetVariable("IndexGestureLoop", 6) isloop = TRUE elseif request == 29 then SetVariable("IndexGestureLoop", 7) isloop = TRUE elseif request == 31 then SetVariable("IndexGestureLoop", 8) isloop = TRUE elseif request == 32 then SetVariable("IndexGestureLoop", 9) isloop = TRUE elseif request == 33 then SetVariable("IndexGestureLoop", 10) isloop = TRUE elseif request == 34 then SetVariable("IndexGestureLoop", 11) isloop = TRUE end if isloop == TRUE then SetAIActionState() if GetVariable("LocomotionState") == PLAYER_STATE_MOVE then ExecEventHalfBlend(Event_GestureLoopStart, UPPER) return TRUE else ExecEventHalfBlend(Event_GestureLoopStart, ALLBODY) return TRUE end else SetVariable("IndexGesture", request) SetAIActionState() if GetVariable("LocomotionState") == PLAYER_STATE_MOVE then ExecEventHalfBlend(Event_GestureStart, UPPER) return TRUE else ExecEventHalfBlend(Event_GestureStart, ALLBODY) return TRUE end end end function ExecItem(quick_type, blend_type) if c_HasActionRequest == FALSE then return FALSE elseif env(1106, ACTION_ARM_USE_ITEM) == FALSE then return FALSE elseif env(115) == TRUE then return FALSE elseif env(113) == TRUE and env(233) == TRUE then ResetRequest() act(123) return TRUE end local item_type = env(231) if IsNodeActive("ItemDrinking_Upper_CMSG") == TRUE then if item_type ~= ITEM_DRINK then return FALSE end elseif IsNodeActive("ItemDrinkingMP_Upper_CMSG") == TRUE then if item_type ~= ITEM_DRINK_MP then return FALSE end elseif IsNodeActive("ItemDrinkingSake_Upper_CMSG") == TRUE and item_type ~= ITEM_DRINK_SAKE then return FALSE end if item_type == ITEM_RECOVER then if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(Event_ItemRecover, blend_type) elseif item_type == ITEM_WEAPON_ENCHANT then if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(Event_ItemWeaponEnchant, blend_type) elseif item_type == ITEM_THROW_KNIFE then if env(1001) <= 0 then ResetRequest() return FALSE end AddStamina(-7) if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(Event_ItemThrowKnife, blend_type) elseif item_type == ITEM_THROW_BOTTLE then if env(1001) <= 0 then ResetRequest() return FALSE end AddStamina(-7) if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(Event_ItemThrowBottle, blend_type) elseif item_type == ITEM_MEGANE then if env(305, 15) == TRUE then ExecEventHalfBlend(Event_ItemMeganeEnd, ALLBODY) else ExecEventHalfBlend(Event_ItemMeganeStart, ALLBODY) end elseif item_type == ITEM_REPAIR then ExecEventHalfBlend(Event_ItemWeaponRepair, blend_type) elseif item_type == ITEM_PRAY then ExecEventHalfBlend(Event_ItemPray, blend_type) elseif item_type == ITEM_TRAP then ExecEventHalfBlend(Event_ItemTrap, blend_type) elseif item_type == ITEM_MESSAGE then ExecEventHalfBlend(Event_ItemMessage, ALLBODY) elseif item_type == ITEM_SOUL then ExecEventHalfBlend(Event_ItemSoul, blend_type) elseif item_type == ITEM_DRINK then if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end if env(305, CONDITION_TYPE_NO_EST) == TRUE then ExecEventHalfBlend(Event_ItemDrinkNothing, blend_type) elseif IsNodeActive("ItemDrinking_Upper_CMSG") == TRUE then SetInterruptType(INTERRUPT_USEITEM) ExecEventHalfBlend(Event_ItemDrinking, blend_type) else SetInterruptType(INTERRUPT_USEITEM) ExecEventHalfBlend(Event_ItemDrinkStart, blend_type) end elseif item_type == ITEM_DRAGONHEAD then if env(305, CONDITION_TYPE_DRAGONHEAD) == TRUE or env(305, CONDITION_TYPE_DRAGONFULL) == TRUE then if env(1001) <= 0 then ResetRequest() return FALSE end ExecEventHalfBlend(Event_DragonHeadStartAfter, blend_type) else ExecEventHalfBlend(Event_DragonHeadStartBefore, blend_type) end elseif item_type == ITEM_DRAGONFULL then if env(305, CONDITION_TYPE_DRAGONFULL) == TRUE then if env(1001) < 0 then ResetRequest() return FALSE end AddStamina(-80) ExecEventHalfBlend(Event_DragonFullStartAfter, blend_type) else ExecEventHalfBlend(Event_DragonFullStartBefore, blend_type) end elseif item_type == ITEM_SHOCK_WAVE then ExecEventHalfBlend(Event_ItemShockWeaveStart, blend_type) elseif item_type == ITEM_QUICK_WEAPON_ENCHANT then if quick_type == QUICKTYPE_NORMAL then ExecEventHalfBlend(Event_QuickItemEnchantNormal, blend_type) elseif quick_type == QUICKTYPE_DASH then ExecEventHalfBlend(Event_QuickItemEnchantDash, blend_type) elseif quick_type == QUICKTYPE_ROLLING then ExecEventHalfBlend(Event_QuickItemEnchantStep, ALLBODY) elseif quick_type == QUICKTYPE_ATTACK then if ForwardLeg() == 1 then ExecEventHalfBlend(Event_QuickItemEnchantAttackRight, ALLBODY) else ExecEventHalfBlend(Event_QuickItemEnchantAttackLeft, ALLBODY) end else return FALSE end elseif item_type == ITEM_QUICK_THROW_KNIFE then if env(1001) <= 0 then ResetRequest() return FALSE end AddStamina(-7) if quick_type == QUICKTYPE_NORMAL then ExecEventHalfBlend(Event_QuickItemThrowKnifeNormal, ALLBODY) elseif quick_type == QUICKTYPE_DASH then ExecEventHalfBlend(Event_QuickItemThrowKnifeDash, ALLBODY) elseif quick_type == QUICKTYPE_ROLLING then ExecEventHalfBlend(Event_QuickItemThrowKnifeStep, ALLBODY) elseif quick_type == QUICKTYPE_ATTACK then if ForwardLeg() == 1 then ExecEventHalfBlend(Event_QuickItemThrowKnifeAttackRight, ALLBODY) else ExecEventHalfBlend(Event_QuickItemThrowKnifeAttackLeft, ALLBODY) end elseif quick_type == QUICKTYPE_COMBO then if ForwardLeg() == 1 then ExecEventHalfBlend(Event_QuickItemThrowKnifeAttackRight2, ALLBODY) else ExecEventHalfBlend(Event_QuickItemThrowKnifeAttackLeft2, ALLBODY) end else return FALSE end elseif item_type == ITEM_QUICK_THROW_BOTTLE then return FALSE elseif item_type == ITEM_DRINK_MP then if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end if env(305, CONDITION_TYPE_NO_EST) == TRUE then ExecEventHalfBlend(Event_ItemDrinkNothingMP, blend_type) elseif IsNodeActive("ItemDrinkingMP_Upper_CMSG") == TRUE then SetInterruptType(INTERRUPT_USEITEM) ExecEventHalfBlend(Event_ItemDrinkingMP, blend_type) else SetInterruptType(INTERRUPT_USEITEM) ExecEventHalfBlend(Event_ItemDrinkStartMP, blend_type) end elseif item_type == ITEM_BACK_BOTTLE then ExecEventHalfBlend(Event_ItemBackBottle, blend_type) elseif item_type == ITEM_DRINK_SAKE then if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end if IsNodeActive("ItemDrinkingSake_Upper_CMSG") == TRUE then ExecEventHalfBlend(Event_ItemDrinkingSake, blend_type) else ExecEventHalfBlend(Event_ItemDrinkStartSake, blend_type) end elseif item_type == ITEM_CHAMELEON then ExecEventHalfBlend(Event_ItemChameleon, blend_type) elseif item_type == ITEM_DRAGONHEADLVL2 then if env(305, CONDITION_TYPE_DRAGONHEAD) == TRUE or env(305, CONDITION_TYPE_DRAGONFULL) == TRUE then if env(1001) <= 0 then ResetRequest() return FALSE end ExecEventHalfBlend(Event_DragonHeadStartAfterLVL2, blend_type) else ExecEventHalfBlend(Event_DragonHeadStartBefore, blend_type) end elseif item_type == ITEM_DRAGONFULLLVL2 then if env(305, CONDITION_TYPE_DRAGONFULL) == TRUE then if env(1001) < 0 then ResetRequest() return FALSE end AddStamina(-100) ExecEventHalfBlend(Event_DragonFullStartAfterLVL2, blend_type) else ExecEventHalfBlend(Event_DragonFullStartBefore, blend_type) end elseif item_type == ITEM_OLDMONK then ExecEventHalfBlend(Event_ItemOldMonk, blend_type) elseif item_type == ITEM_QUICK_THROW_HOMINGKNIFE then if env(1001) <= 0 then ResetRequest() return FALSE end AddStamina(-10) if quick_type == QUICKTYPE_NORMAL then ExecEventHalfBlend(Event_QuickItemThrowKnifeNormal, ALLBODY) elseif quick_type == QUICKTYPE_DASH then ExecEventHalfBlend(Event_QuickItemThrowKnifeDash, ALLBODY) elseif quick_type == QUICKTYPE_ROLLING then ExecEventHalfBlend(Event_QuickItemThrowKnifeStep, ALLBODY) elseif quick_type == QUICKTYPE_ATTACK then if ForwardLeg() == 1 then ExecEventHalfBlend(Event_QuickItemThrowKnifeAttackRight, ALLBODY) else ExecEventHalfBlend(Event_QuickItemThrowKnifeAttackLeft, ALLBODY) end elseif quick_type == QUICKTYPE_COMBO then if ForwardLeg() == 1 then ExecEventHalfBlend(Event_QuickItemThrowKnifeAttackRight2, ALLBODY) else ExecEventHalfBlend(Event_QuickItemThrowKnifeAttackLeft2, ALLBODY) end else return FALSE end elseif item_type == ITEM_NO_DRINK then if env(1007) == TRUE and env(1116, 5110) == FALSE then act(2002, 5110) end if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(Event_ItemDrinkEmpty, blend_type) elseif item_type == ITEM_INVALID then if env(1007) == TRUE and env(1116, 5111) == FALSE then act(2002, 5111) end if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(Event_ItemInvalid, blend_type) else return FALSE end act("アイテムアニメ中か設定") g_ItemFirstFrame = 1 SetAIActionState() return TRUE end function ExecLadderItem(hand) if c_HasActionRequest == FALSE then return FALSE elseif env(1106, ACTION_ARM_USE_ITEM) == FALSE then return FALSE elseif env(115) == TRUE then return FALSE elseif env(113) == TRUE and env(233) == TRUE then ResetRequest() act(123) return TRUE end local item_type = env(231) local event = "W_ItemLadderInvalid" local event_hand = "Left" if hand == HAND_STATE_RIGHT then event_hand = "Right" end if IsNodeActive("ItemLadderDrinkingRight_CMSG", "ItemLadderDrinkingLeft_CMSG") == TRUE then if item_type ~= ITEM_DRINK then return FALSE end elseif IsNodeActive("ItemLadderDrinkingMPRight_CMSG", "ItemLadderDrinkingMPLeft_CMSG") == TRUE then if item_type ~= ITEM_DRINK_MP then return FALSE end elseif IsNodeActive("ItemLadderDrinkingSakeRight_CMSG", "ItemLadderDrinkingSakeLeft_CMSG") == TRUE and item_type ~= ITEM_DRINK_SAKE then return FALSE end if item_type == ITEM_RECOVER then event = "W_ItemLadderRecover" elseif item_type == ITEM_SOUL then event = "W_ItemLadderSoul" elseif item_type == ITEM_DRINK then if env(305, CONDITION_TYPE_NO_EST) == TRUE then event = "W_ItemLadderDrinkNothing" elseif IsNodeActive("ItemLadderDrinkingRight_CMSG") == TRUE then event = "W_ItemLadderDrinking" event_hand = "Right" elseif IsNodeActive("ItemLadderDrinkingLeft_CMSG") == TRUE then event = "W_ItemLadderDrinking" event_hand = "Left" else event = "W_ItemLadderDrinkStart" end elseif item_type == ITEM_DRINK_MP then if env(305, CONDITION_TYPE_NO_EST) == TRUE then event = "W_ItemLadderDrinkNothingMP" elseif IsNodeActive("ItemLadderDrinkingMPRight_CMSG") == TRUE then event = "W_ItemLadderDrinkingMP" event_hand = "Right" elseif IsNodeActive("ItemLadderDrinkingMPLeft_CMSG") == TRUE then event = "W_ItemLadderDrinkingMP" event_hand = "Left" else event = "W_ItemLadderDrinkStartMP" end elseif item_type == ITEM_DRINK_SAKE then if IsNodeActive("ItemLadderDrinkingSakeRight_CMSG") == TRUE then event = "W_ItemLadderDrinkingSake" event_hand = "Right" elseif IsNodeActive("ItemLadderDrinkingSakeLeft_CMSG") == TRUE then event = "W_ItemLadderDrinkingSake" event_hand = "Left" else event = "W_ItemLadderDrinkStartSake" end elseif item_type == ITEM_NO_DRINK then event = "W_ItemLadderDrinkEmpty" end act("アイテムアニメ中か設定") ExecEvent(event .. event_hand) return TRUE end function ExecWeaponChange(blend_type) if c_HasActionRequest == FALSE then return FALSE end local kind = WEAPON_CHANGE_REQUEST_INVALID if env(1106, ACTION_ARM_CHANGE_WEAPON_R) == TRUE then kind = GetWeaponChangeType(HAND_RIGHT) elseif env(1106, ACTION_ARM_CHANGE_WEAPON_L) == TRUE then kind = GetWeaponChangeType(HAND_LEFT) else return FALSE end if kind == WEAPON_CHANGE_REQUEST_INVALID then return FALSE end SetVariable("WeaponChangeType", kind) if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(Event_WeaponChangeStart, blend_type) SetAIActionState() return TRUE end function ExecHandChange(hand, is_force, blend_type) if is_force == FALSE then if c_HasActionRequest == FALSE then return FALSE elseif env(1106, ACTION_ARM_CHANGE_STYLE) ~= TRUE then if env(1106, ACTION_ARM_CHANGE_STYLE_LEFT) == TRUE then hand = HAND_LEFT else return FALSE end end end local style = c_Style local pos = nil if style == HAND_RIGHT then if hand == HAND_RIGHT then if env(335, HAND_RIGHT) == FALSE then return FALSE end pos = GetHandChangeType(HAND_LEFT) if pos == WEAPON_CHANGE_REQUEST_LEFT_WAIST then if IsDualBladeSpecific(HAND_RIGHT) == TRUE then local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_RIGHT) local kind = env(225, HAND_LEFT) if sp_kind == 144 and kind == WEAPON_CATEGORY_FIST then SetHandChangeStyle(LEFT_TO_BACK, LEFT_FROM_BACK) else SetHandChangeStyle(LEFT_TO_WAIST, LEFT_FROM_WAIST) end else SetHandChangeStyle(LEFT_TO_WAIST, BOTH_FROM_ALL) end elseif pos == WEAPON_CHANGE_REQUEST_LEFT_BACK then local kind = env(225, HAND_LEFT) if IsDualBladeSpecific(HAND_RIGHT) == TRUE then SetHandChangeStyle(LEFT_TO_BACK, LEFT_FROM_BACK) elseif kind == WEAPON_CATEGORY_KATANA then SetHandChangeStyle(LEFT_TO_WAIST, BOTH_FROM_ALL) else SetHandChangeStyle(LEFT_TO_BACK, BOTH_FROM_ALL) end elseif pos == WEAPON_CHANGE_REQUEST_LEFT_SHOULDER then if IsDualBladeSpecific(HAND_RIGHT) == TRUE then SetHandChangeStyle(LEFT_TO_SHOULDER, LEFT_FROM_SHOULDER) else SetHandChangeStyle(LEFT_TO_SHOULDER, BOTH_FROM_ALL) end elseif pos == WEAPON_CHANGE_REQUEST_LEFT_SPEAR then if IsDualBladeSpecific(HAND_RIGHT) == TRUE then SetHandChangeStyle(LEFT_TO_SPEAR, LEFT_FROM_SPEAR) else SetHandChangeStyle(LEFT_TO_SPEAR, BOTH_FROM_ALL) end elseif IsDualBladeSpecific(HAND_RIGHT) == TRUE then SetHandChangeStyle(LEFT_TO_SPEAR, LEFT_FROM_SPEAR) else SetHandChangeStyle(LEFT_TO_SPEAR, BOTH_FROM_ALL) end act(104, 1) else if env(335, HAND_LEFT) == FALSE then return FALSE end pos = GetHandChangeType(HAND_RIGHT) if pos == WEAPON_CHANGE_REQUEST_RIGHT_WAIST then if IsDualBladeSpecific(HAND_LEFT) == TRUE then local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) local kind = env(225, HAND_RIGHT) if sp_kind == 144 and kind == WEAPON_CATEGORY_FIST then SetHandChangeStyle(RIGHT_TO_BACK, RIGHT_FROM_BACK) else SetHandChangeStyle(RIGHT_TO_WAIST, RIGHT_FROM_WAIST) end else SetHandChangeStyle(RIGHT_TO_WAIST, BOTHLEFT_FROM_ALL) end elseif pos == WEAPON_CHANGE_REQUEST_RIGHT_BACK then local kind = env(225, HAND_RIGHT) if IsDualBladeSpecific(HAND_LEFT) == TRUE then if kind == WEAPON_CATEGORY_KATANA then SetHandChangeStyle(RIGHT_TO_WAIST, BOTHLEFT_FROM_ALL) else SetHandChangeStyle(RIGHT_TO_BACK, RIGHT_FROM_BACK) end elseif kind == WEAPON_CATEGORY_KATANA then SetHandChangeStyle(RIGHT_TO_WAIST, BOTHLEFT_FROM_ALL) else SetHandChangeStyle(RIGHT_TO_BACK, BOTHLEFT_FROM_ALL) end elseif pos == WEAPON_CHANGE_REQUEST_RIGHT_SHOULDER then if IsDualBladeSpecific(HAND_LEFT) == TRUE then SetHandChangeStyle(RIGHT_TO_SHOULDER, RIGHT_FROM_SHOULDER) else SetHandChangeStyle(RIGHT_TO_SHOULDER, BOTHLEFT_FROM_ALL) end elseif pos == WEAPON_CHANGE_REQUEST_RIGHT_SPEAR then if IsDualBladeSpecific(HAND_LEFT) == TRUE then SetHandChangeStyle(RIGHT_TO_SPEAR, RIGHT_FROM_SPEAR) else SetHandChangeStyle(RIGHT_TO_SPEAR, BOTHLEFT_FROM_ALL) end elseif IsDualBladeSpecific(HAND_LEFT) == TRUE then SetHandChangeStyle(RIGHT_TO_BACK, RIGHT_FROM_BACK) else SetHandChangeStyle(RIGHT_TO_BACK, BOTHLEFT_FROM_ALL) end act(104, 2) end elseif style == HAND_RIGHT_BOTH then pos = GetHandChangeType(HAND_LEFT) if pos == WEAPON_CHANGE_REQUEST_LEFT_WAIST then local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_RIGHT) local kind = env(225, HAND_LEFT) if sp_kind == 144 and kind == WEAPON_CATEGORY_FIST then SetHandChangeStyle(BOTH_TO_BACK, LEFT_FROM_BACK) else SetHandChangeStyle(BOTH_TO_WAIST, LEFT_FROM_WAIST) end elseif pos == WEAPON_CHANGE_REQUEST_LEFT_BACK then SetHandChangeStyle(BOTH_TO_BACK, LEFT_FROM_BACK) elseif pos == WEAPON_CHANGE_REQUEST_LEFT_SHOULDER then SetHandChangeStyle(BOTH_TO_SHOULDER, LEFT_FROM_SHOULDER) else SetHandChangeStyle(BOTH_TO_BACK, LEFT_FROM_SPEAR) end act(104, 3) elseif style == HAND_LEFT_BOTH then pos = GetHandChangeType(HAND_RIGHT) if pos == WEAPON_CHANGE_REQUEST_RIGHT_WAIST then local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) local kind = env(225, HAND_RIGHT) if sp_kind == 144 and kind == WEAPON_CATEGORY_FIST then SetHandChangeStyle(BOTHRIGHT_TO_BACK, RIGHT_FROM_BACK) else SetHandChangeStyle(BOTHRIGHT_TO_WAIST, RIGHT_FROM_WAIST) end elseif pos == WEAPON_CHANGE_REQUEST_RIGHT_BACK then SetHandChangeStyle(BOTHRIGHT_TO_BACK, RIGHT_FROM_BACK) elseif pos == WEAPON_CHANGE_REQUEST_RIGHT_SHOULDER then SetHandChangeStyle(BOTHRIGHT_TO_SHOULDER, RIGHT_FROM_SHOULDER) else SetHandChangeStyle(BOTHRIGHT_TO_BACK, RIGHT_FROM_SPEAR) end act(104, 1) end if blend_type == ALLBODY and MoveStart(LOWER, Event_MoveLong, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlend(Event_HandChangeStart, blend_type) SetAIActionState() return TRUE end function ExecEvasion(backstep_limit, estep, is_usechainrecover) if c_HasActionRequest == FALSE then return FALSE end local request = GetEvasionRequest() if request == ATTACK_REQUEST_INVALID then return FALSE elseif backstep_limit == TRUE and request == ATTACK_REQUEST_BACKSTEP and env(301, 0) == TRUE then return FALSE end SetEvasionStaminaCost() if request == ATTACK_REQUEST_ROLLING then if is_usechainrecover == TRUE then local damagecount = GetVariable("DamageCount") if 4 <= damagecount then if env(301, 5) == FALSE then return FALSE end elseif damagecount == 3 then if env(301, 4) == FALSE then return FALSE end elseif damagecount == 2 then if env(301, 3) == FALSE then return FALSE end elseif damagecount <= 1 and env(301, 2) == FALSE then return FALSE end end if env(1001) <= 0 then return FALSE end local rollingangle = GetVariable("RollingAngle") if 0 <= rollingangle then SetVariable("RollingDirection", 1) else SetVariable("RollingDirection", 0) end local event = "W_Rolling" local weight = GetWeightIndex(FALSE) local is_selftrans = FALSE if env(1116, 100370) == TRUE then if weight == EVASION_WEIGHT_INDEX_OVERWEIGHT then return FALSE end event = "W_EStepDown" elseif weight == EVASION_WEIGHT_INDEX_OVERWEIGHT then if 135 < math.abs(rollingangle) then event = "W_RollingOverweightBack" elseif 45 < rollingangle then event = "W_RollingOverweightRight" elseif rollingangle < -45 then event = "W_RollingOverweightLeft" else event = "W_RollingOverweightFront" end else if weight == EVASION_WEIGHT_INDEX_MEDIUM then event = event .. "Medium" elseif weight == EVASION_WEIGHT_INDEX_HEAVY then event = event .. "Heavy" else event = event .. "Light" end if IsNodeActive("Rolling_CMSG") == TRUE then is_selftrans = TRUE end end local turn_angle_real = 200 if GetVariable("IsLockon") == true then act("ロックオン対象へ即座に旋回") turn_angle_real = math.abs(GetVariable("TurnAngle") - rollingangle) if 180 < turn_angle_real then turn_angle_real = 360 - turn_angle_real end elseif 0.00100000004749745 < math.abs(rollingangle) then SetTurnSpeed(0) else local move_angle = GetVariable("MoveAngle") if move_angle ~= 0 then rollingangle = move_angle end end SetVariable("TurnAngleReal", turn_angle_real) if is_selftrans == TRUE then event = event .. "Selftrans" SetVariable("RollingAngleRealSelftrans", rollingangle) else SetVariable("RollingAngleReal", rollingangle) end local front, back, left, right = false if 135 < math.abs(rollingangle) then back = true elseif 45 < rollingangle then right = true elseif rollingangle < -45 then left = true else front = true end SetVariable("EnableTAE_RollingFront", front) SetVariable("EnableTAE_RollingBack", back) SetVariable("EnableTAE_RollingLeft", left) SetVariable("EnableTAE_RollingRight", right) AddStamina(c_StaminaCostRolling) ExecEventAllBody(event) elseif request == ATTACK_REQUEST_JUMP then AddStamina(c_StaminaCostJump) ExecEventAllBody("W_Jump") elseif request == ATTACK_REQUEST_BACKSTEP then ResetDamageCount() local index = GetWeightIndex(FALSE) local event = "W_BackStepLight" if index == EVASION_WEIGHT_INDEX_SUPERLIGHT then event = "W_BackStepSuperlight" elseif index == EVASION_WEIGHT_INDEX_MEDIUM then event = "W_BackStepNomal" elseif index == EVASION_WEIGHT_INDEX_HEAVY then event = "W_BackStepHeavy" elseif index == EVASION_WEIGHT_INDEX_OVERWEIGHT then event = "W_BackStepOverweight" end if GetVariable("IsLockon") == true and env(1116, 100360) == TRUE then act("ロックオン対象へ即座に旋回") end AddStamina(c_StaminaCostBackStep) ExecEventAllBody(event) else return FALSE end SetAIActionState() return TRUE end function ExecQuickTurn(blend_type) if blend_type == LOWER and IsLowerQuickTurn() == TRUE then return FALSE elseif GetVariable("IsLockon") == false then return FALSE end local turn_angle = GetVariable("TurnAngle") if math.abs(turn_angle) < 45 then return FALSE elseif 45 <= turn_angle then ExecEventHalfBlend(Event_QuickTurnRight180, blend_type) else ExecEventHalfBlend(Event_QuickTurnLeft180, blend_type) end return TRUE end function ExecDashTurn() if GetVariable("MoveSpeedLevel") <= 0 then return FALSE else local angle = math.abs(GetVariable("TurnAngle")) if 90 < angle then ExecEventHalfBlend(Event_Dash180, ALLBODY) return TRUE else return FALSE end end end function ExecQuickTurnOnCancelTiming() if env(2000) == FALSE then return FALSE elseif ExecQuickTurn(ALLBODY) == TRUE then return TRUE else return FALSE end end function ExecFallStart(fall_type) if env(200) == FALSE then return FALSE elseif env(1116, 4500) == TRUE or env(1116, 4502) == TRUE then ExecEventAllBody("W_FallStartFaceDown") return TRUE elseif env(1116, 4501) == TRUE then ExecEventAllBody("W_FallStartFaceUp") return TRUE elseif fall_type == FALL_TYPE_DEFAULT then if env(298) == TRUE then local style = c_Style local hand = HAND_RIGHT if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local check_weapon = GetEquipType(hand, WEAPON_CATEGORY_STAFF, WEAPON_CATEGORY_FIST_CUT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW, WEAPON_CATEGORY_SMALL_SHIELD, WEAPON_CATEGORY_LARGE_SHIELD, WEAPON_CATEGORY_TORCH) if check_weapon == FALSE then ExecEventAllBody("W_FallAttackLoop") else ExecEventAllBody("W_FallStart") end else ExecEventAllBody("W_FallStart") end elseif fall_type == FALL_TYPE_JUMP then if env(1116, 100310) == TRUE then ExecEventAllBody("W_FallJumpStart") else return FALSE end elseif fall_type == FALL_TYPE_FACEDOWN_LOOP then ExecEventAllBody("W_FallLoopFaceDown") elseif fall_type == FALL_TYPE_FACEDOWN then ExecEventAllBody("W_FallStartFaceDown") elseif fall_type == FALL_TYPE_FACEUP_LOOP then ExecEventAllBody("W_FallLoopFaceUp") elseif fall_type == FALL_TYPE_FACEUP then ExecEventAllBody("W_FallStartFaceUp") else local damage_angle = env(222) if damage_angle == DAMAGE_DIR_BACK then if fall_type == FALL_TYPE_FORCE_LOOP then ExecEventAllBody("W_FallLoopFaceDown") else ExecEventAllBody("W_FallStartFaceDown") end elseif fall_type == FALL_TYPE_FORCE_LOOP then ExecEventAllBody("W_FallLoopFaceUp") else ExecEventAllBody("W_FallStartFaceUp") end end return TRUE end function ExecAddDamage(damage_dir, attack_dir, damage_level, is_guard, is_damaged) if is_damaged == FALSE then return elseif env(334, 9) == TRUE then return elseif is_guard == TRUE then SetVariable("AddDamageGuardBlend", 1) elseif damage_level == DAMAGE_LEVEL_NONE or damage_level == DAMAGE_LEVEL_MINIMUM then SetVariable("AddDamageBlend", 1) else SetVariable("DamageDirBlendRate", 1) end if damage_dir == DAMAGE_DIR_LEFT then if attack_dir == ATTACK_DIR_FRONT then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallLeft_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumLeft_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartLeft") return else ExecEventNoReset("W_AddDamageStartLeft") return end elseif attack_dir == ATTACK_DIR_UP then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallLeft_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumLeft_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartLeft") return else ExecEventNoReset("W_AddDamageStartLeft") return end elseif attack_dir == ATTACK_DIR_DOWN then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallLeft_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumLeft_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartLeft") return else ExecEventNoReset("W_AddDamageStartLeft") return end elseif attack_dir == ATTACK_DIR_LEFT then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallFront_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumFront_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartFront") return else ExecEventNoReset("W_AddDamageStartFront") return end elseif attack_dir == ATTACK_DIR_RIGHT then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallBack_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumBack_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartBack") return else ExecEventNoReset("W_AddDamageStartBack") return end end elseif damage_dir == DAMAGE_DIR_RIGHT then if attack_dir == ATTACK_DIR_FRONT then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallRight_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumRight_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartRight") return else ExecEventNoReset("W_AddDamageStartRight") return end elseif attack_dir == ATTACK_DIR_UP then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallRight_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumRight_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartRight") return else ExecEventNoReset("W_AddDamageStartRight") return end elseif attack_dir == ATTACK_DIR_DOWN then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallRight_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumRight_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartRight") return else ExecEventNoReset("W_AddDamageStartRight") return end elseif attack_dir == ATTACK_DIR_LEFT then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallBack_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumBack_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartBack") return else ExecEventNoReset("W_AddDamageStartBack") return end elseif attack_dir == ATTACK_DIR_RIGHT then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallFront_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumFront_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartFront") return else ExecEventNoReset("W_AddDamageStartFront") return end end elseif damage_dir == DAMAGE_DIR_FRONT then if attack_dir == ATTACK_DIR_FRONT then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallFront_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumFront_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartFront") return else ExecEventNoReset("W_AddDamageStartFront") return end elseif attack_dir == ATTACK_DIR_UP then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallUp_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumUp_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartFront") return else ExecEventNoReset("W_AddDamageStartFront") return end elseif attack_dir == ATTACK_DIR_DOWN then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallDown_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumDown_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartFront") return else ExecEventNoReset("W_AddDamageStartFront") return end elseif attack_dir == ATTACK_DIR_LEFT then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallRight_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumRight_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartRight") return else ExecEventNoReset("W_AddDamageStartRight") return end elseif attack_dir == ATTACK_DIR_RIGHT then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallLeft_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumLeft_Add") return elseif is_guard == TRUE then ExecEventNoReset("W_AddDamageGuardStartLeft") return else ExecEventNoReset("W_AddDamageStartLeft") return end end elseif damage_dir == DAMAGE_DIR_BACK then if attack_dir == ATTACK_DIR_FRONT then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallBack_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumBack_Add") return else ExecEventNoReset("W_AddDamageStartBack") return end elseif attack_dir == ATTACK_DIR_UP then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallBack_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumBack_Add") return else ExecEventNoReset("W_AddDamageStartBack") return end elseif attack_dir == ATTACK_DIR_DOWN then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallBack_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumBack_Add") return else ExecEventNoReset("W_AddDamageStartBack") return end elseif attack_dir == ATTACK_DIR_LEFT then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallLeft_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumLeft_Add") return else ExecEventNoReset("W_AddDamageStartLeft") return end elseif attack_dir == ATTACK_DIR_RIGHT then if damage_level == DAMAGE_LEVEL_SMALL then ExecEventNoReset("W_DirDamageSmallRight_Add") return elseif damage_level == DAMAGE_LEVEL_MIDDLE or damage_level == DAMAGE_LEVEL_LARGE then ExecEventNoReset("W_DirDamageMediumRight_Add") return else ExecEventNoReset("W_AddDamageStartRight") return end end end return end function ExecPassiveAction(is_parry, fall_type, is_attackwhileguard) if env(1112) == TRUE then ResetDamageCount() return TRUE elseif ExecDeath() == TRUE then return TRUE elseif env("イベントアニメ再生要求があるか") == TRUE then ResetDamageCount() return TRUE elseif ExecDamage(is_parry, is_attackwhileguard) == TRUE then return TRUE elseif ExecSlide() == TRUE then return TRUE elseif ExecFallStart(fall_type) == TRUE then ResetDamageCount() return TRUE else return FALSE end end function IsDead() if env(202) == DAMAGE_TYPE_DEATH or env(1000) <= 0 then return TRUE else return FALSE end end function IsLandDead(height) if env(1000) <= 0 then return TRUE elseif 20 < height and env(1101) == FALSE and env(1116, 4050) == FALSE and env(1116, 4060) == FALSE and env(1116, 4070) == FALSE and env(1116, 4080) == FALSE then return TRUE else return FALSE end end function ExecDeath() if IsDead() == TRUE then if env(202) ~= DAMAGE_TYPE_DEATH_FALLING and env(1116, 103520000) == TRUE then return FALSE end local damage_angle = env(222) SetVariable("DamageDirection", damage_angle) if env(1121) < 0 then if damage_angle == DAMAGE_DIR_LEFT then damage_angle = DAMAGE_DIR_RIGHT elseif damage_angle == DAMAGE_DIR_RIGHT then damage_angle = DAMAGE_DIR_LEFT elseif damage_angle == DAMAGE_DIR_FRONT then damage_angle = DAMAGE_DIR_BACK elseif damage_angle == DAMAGE_DIR_BACK then damage_angle = DAMAGE_DIR_FRONT end end local damage_level = env(236) if env(305, CONDITION_TYPE_STONE) == TRUE then SetVariable("IndexDeath", DEATH_TYPE_STONE) elseif env(305, CONDITION_TYPE_CRYSTAL) == TRUE then SetVariable("IndexDeath", DEATH_TYPE_STONE) elseif env(283) == TRUE then SetVariable("IndexDeath", DEATH_TYPE_LADDER) elseif env(265) == TRUE then SetVariable("IndexDeath", DEATH_TYPE_WEAK) elseif damage_level == DAMAGE_LEVEL_EXLARGE or damage_level == DAMAGE_LEVEL_SMALL_BLOW then SetVariable("IndexDeath", DEATH_TYPE_BLAST) elseif damage_level == DAMAGE_LEVEL_UPPER then SetVariable("IndexDeath", DEATH_TYPE_UPPER) elseif damage_level == DAMAGE_LEVEL_FLING then SetVariable("IndexDeath", DEATH_TYPE_FLING) else SetVariable("DamageState", env(1003, 0, 3)) if damage_angle == DAMAGE_DIR_BACK then SetVariable("IndexDeath", DEATH_TYPE_COMMON_BACK) else SetVariable("IndexDeath", DEATH_TYPE_COMMON) end end ExecEventAllBody("W_DeathStart") return TRUE elseif env(1101) == FALSE then if env(305, CONDITION_TYPE_STONE) == TRUE or env(305, CONDITION_TYPE_CRYSTAL) == TRUE then SetVariable("IndexDeath", DEATH_TYPE_STONE) ExecEventAllBody("W_DeathStart") return TRUE elseif env(305, CONDITION_TYPE_TAINTDEATH) == TRUE then SetVariable("IndexDeath", DEATH_TYPE_TAINT) ExecEventAllBody("W_DeathStart") return TRUE end end return end function ExecDamage(is_parry, is_attackwhileguard) local damage_level = env(236) local damage_type = env(202) local is_damaged = env(256) if damage_level <= DAMAGE_LEVEL_NONE and is_damaged == FALSE and (damage_type == DAMAGE_TYPE_INVALID or damage_type == DAMAGE_TYPE_WEAK_POINT or damage_type == DAMAGE_LEVEL_MINIMUM) then return FALSE end local attack_dir = env(1119) local damage_angle = env(222) local style = c_Style if damage_type == DAMAGE_TYPE_PARRY then ExecEventAllBody("W_DamageParry") return TRUE elseif damage_type == DAMAGE_TYPE_GUARD and env(334, 4) == TRUE then damage_type = DAMAGE_TYPE_GUARDBREAK end if DAMAGE_TYPE_GUARDED <= damage_type and damage_type <= DAMAGE_TYPE_WALL_LEFT then Replanning() if (damage_type == DAMAGE_TYPE_GUARDBREAK_BLAST or damage_type == DAMAGE_TYPE_GUARDBREAK_FLING) and IsGuardbreakBlowDamage(damage_level) == FALSE then damage_type = DAMAGE_TYPE_GUARDBREAK end if damage_type == DAMAGE_TYPE_GUARDED then if style == HAND_RIGHT then SetVariable("GuardDamageIndex", 1) else SetVariable("GuardDamageIndex", 2) end act(141, DAMAGE_FLAG_GUARD_BREAK) ExecEventAllBody("W_GuardDamageBreak") return TRUE elseif damage_type == DAMAGE_TYPE_GUARDED_LEFT then SetVariable("GuardDamageIndex", 0) act(141, DAMAGE_FLAG_GUARD_BREAK) ExecEventAllBody("W_GuardDamageBreak") return TRUE elseif damage_type == DAMAGE_TYPE_GUARDBREAK then if is_parry == TRUE then return FALSE elseif env(1116, 100350) == TRUE then return FALSE end local guardindex = GUARD_STYLE_DEFAULT if style == HAND_RIGHT then guardindex = env(278, HAND_LEFT) if env(225, HAND_LEFT) == WEAPON_CATEGORY_TORCH or env("装備武器特殊カテゴリ番号取得", HAND_LEFT) == 240 then SetVariable("IsTorchGuard", TRUE) else SetVariable("IsTorchGuard", FALSE) end elseif style == HAND_LEFT_BOTH then SetVariable("IsTorchGuard", FALSE) if env("待機アニメカテゴリ取得") == 15 then guardindex = env(278, HAND_LEFT) end elseif style == HAND_RIGHT_BOTH then SetVariable("IsTorchGuard", FALSE) if env("待機アニメカテゴリ取得") == 15 then guardindex = env(278, HAND_RIGHT) end end SetVariable("IndexGuard", guardindex) act(141, DAMAGE_FLAG_GUARD_BREAK) local isguardgentrans = FALSE if env(1116, 100520) == TRUE then isguardgentrans = TRUE end if isguardgentrans == TRUE then ExecEventAllBody("W_GuardBreak_GenTrans") return TRUE else ExecEventAllBody("W_GuardBreak") return TRUE end elseif damage_type == DAMAGE_TYPE_WALL_RIGHT then if style == HAND_RIGHT then SetVariable("GuardDamageIndex", 1) else SetVariable("GuardDamageIndex", 2) end act(141, DAMAGE_FLAG_GUARD_BREAK) ExecEventAllBody("W_GuardBreakWall") return TRUE elseif damage_type == DAMAGE_TYPE_WALL_LEFT then SetVariable("GuardDamageIndex", 0) act(141, DAMAGE_FLAG_GUARD_BREAK) ExecEventAllBody("W_GuardBreakWall") return TRUE elseif damage_type == DAMAGE_TYPE_GUARDBREAK_BLAST then SetVariable("DamageDirection", damage_angle) act(141, DAMAGE_FLAG_SMALL_BLOW) ExecEventAllBody("W_DamageSmallBlow") return TRUE elseif damage_type == DAMAGE_TYPE_GUARDBREAK_FLING then act(141, DAMAGE_FLAG_FLING) ExecEventAllBody("W_DamageFling") return TRUE end elseif damage_type == DAMAGE_TYPE_GUARD then if is_parry == TRUE then return FALSE elseif env(1116, 100690) == TRUE and env(334, 11) == TRUE then ExecEventAllBody("W_DrawStanceRightHeavyLoopGuard") return TRUE elseif env(1116, 100350) == TRUE then return FALSE elseif env(1116, 100700) == TRUE then return FALSE elseif env(1116, 100510) == TRUE then return FALSE end local guardindex = GUARD_STYLE_DEFAULT if style == HAND_RIGHT then guardindex = env(278, HAND_LEFT) if env(225, HAND_LEFT) == WEAPON_CATEGORY_TORCH or env("装備武器特殊カテゴリ番号取得", HAND_LEFT) == 240 then SetVariable("IsTorchGuard", TRUE) else SetVariable("IsTorchGuard", FALSE) end elseif style == HAND_LEFT_BOTH then SetVariable("IsTorchGuard", FALSE) if env("待機アニメカテゴリ取得") == 15 then guardindex = env(278, HAND_LEFT) end elseif style == HAND_RIGHT_BOTH then SetVariable("IsTorchGuard", FALSE) if env("待機アニメカテゴリ取得") == 15 then guardindex = env(278, HAND_RIGHT) end end SetVariable("IndexGuard", guardindex) local guard_damage_level = env(237) if 0 < guard_damage_level then if env(1116, 100420) == TRUE then ExecAddDamage(damage_angle, attack_dir, nil, TRUE, TRUE) return FALSE end local isguardgentrans = FALSE if env(1116, 100520) == TRUE then isguardgentrans = TRUE end local guarddamagesmall = "W_GuardDamageSmall" local guarddamagemiddle = "W_GuardDamageMiddle" local guarddamagelarge = "W_GuardDamageLarge" if isguardgentrans == TRUE then guarddamagesmall = "W_GuardDamageSmall_GenTrans" guarddamagemiddle = "W_GuardDamageMiddle_GenTrans" guarddamagelarge = "W_GuardDamageLarge_GenTrans" end if guard_damage_level == 1 then act(141, DAMAGE_FLAG_GUARD_SMALL) ExecEventAllBody(guarddamagesmall) elseif guard_damage_level == 3 then act(141, DAMAGE_FLAG_GUARD_LARGE) ExecEventAllBody(guarddamagemiddle) elseif guard_damage_level == 4 then act(141, DAMAGE_FLAG_GUARD_EXLARGE) ExecEventAllBody(guarddamagelarge) else act(141, DAMAGE_FLAG_GUARD_LARGE) ExecEventAllBody(guarddamagemiddle) end return TRUE else ExecAddDamage(damage_angle, attack_dir, damage_level, TRUE, is_damaged) return FALSE end end if env(334, 5) == TRUE then Replanning() local blend_type, lower_state = GetHalfBlendInfo() act(141, DAMAGE_FLAG_SMALL) ExecEventHalfBlend(Event_Event61000, blend_type) return TRUE elseif env(334, 10) == TRUE then Replanning() ResetDamageCount() act(141, DAMAGE_FLAG_SMALL) ExecEvent("W_SpecialDamageUpper") return TRUE elseif env(1121) < 0 then if damage_angle == DAMAGE_DIR_LEFT then damage_angle = DAMAGE_DIR_RIGHT elseif damage_angle == DAMAGE_DIR_RIGHT then damage_angle = DAMAGE_DIR_LEFT elseif damage_angle == DAMAGE_DIR_FRONT then damage_angle = DAMAGE_DIR_BACK elseif damage_angle == DAMAGE_DIR_BACK then damage_angle = DAMAGE_DIR_FRONT end end if env(265) == TRUE then CalcDamageCount() SetVariable("DamageDirection", damage_angle) act(141, DAMAGE_FLAG_WEAK) ExecEventAllBody("W_DamageWeak") Replanning() return TRUE elseif damage_level == DAMAGE_LEVEL_NONE then ExecAddDamage(damage_angle, attack_dir, damage_level, FALSE, is_damaged) return FALSE elseif damage_level == DAMAGE_LEVEL_SMALL then CalcDamageCount() SetVariable("DamageDirection", damage_angle) ExecAddDamage(damage_angle, attack_dir, damage_level, FALSE, is_damaged) act(141, DAMAGE_FLAG_SMALL) ExecEventAllBody("W_DamageSmall") Replanning() SetVariable("DamageDefaultState", 0) return TRUE elseif damage_level == DAMAGE_LEVEL_MIDDLE then CalcDamageCount() SetVariable("DamageDirection", damage_angle) ExecAddDamage(damage_angle, attack_dir, damage_level, FALSE, is_damaged) act(141, DAMAGE_FLAG_MEDIUM) ExecEventAllBody("W_DamageMiddle") Replanning() SetVariable("DamageDefaultState", 1) return TRUE elseif damage_level == DAMAGE_LEVEL_LARGE then CalcDamageCount() SetVariable("DamageDirection", damage_angle) ExecAddDamage(damage_angle, attack_dir, damage_level, FALSE, is_damaged) act(141, DAMAGE_FLAG_LARGE) Replanning() if env(334, 2) == TRUE then SetVariable("DamageDefaultState", 3) ExecEventAllBody("W_DamageLarge2") return TRUE else SetVariable("DamageDefaultState", 2) ExecEventAllBody("W_DamageLarge") return TRUE end elseif damage_level == DAMAGE_LEVEL_EXLARGE then ResetDamageCount() SetVariable("DamageDirection", damage_angle) act(141, DAMAGE_FLAG_LARGE_BLOW) ExecEventAllBody("W_DamageExLarge") Replanning() return TRUE elseif damage_level == DAMAGE_LEVEL_EX_BLAST then SetVariable("DamageDirection", damage_angle) act(141, DAMAGE_FLAG_LARGE_BLOW) ExecEventAllBody("W_DamageExBlast") Replanning() return TRUE elseif damage_level == DAMAGE_LEVEL_PUSH then CalcDamageCount() SetVariable("DamageDirection", damage_angle) act(141, DAMAGE_FLAG_PUSH) ExecEventAllBody("W_DamagePush") Replanning() return TRUE elseif damage_level == DAMAGE_LEVEL_SMALL_BLOW then ResetDamageCount() SetVariable("DamageDirection", damage_angle) act(141, DAMAGE_FLAG_SMALL_BLOW) ExecEventAllBody("W_DamageSmallBlow") Replanning() return TRUE elseif damage_level == DAMAGE_LEVEL_UPPER then ResetDamageCount() SetVariable("DamageDirection", damage_angle) act(141, DAMAGE_FLAG_LARGE_BLOW) ExecEventAllBody("W_DamageUpper") Replanning() return TRUE elseif damage_level == DAMAGE_LEVEL_MINIMUM then ExecAddDamage(damage_angle, attack_dir, damage_level, FALSE, is_damaged) return FALSE elseif damage_level == DAMAGE_LEVEL_FLING then ResetDamageCount() SetVariable("DamageDirection", damage_angle) act(141, DAMAGE_FLAG_FLING) ExecEventAllBody("W_DamageFling") Replanning() return TRUE elseif damage_level == DAMAGE_LEVEL_BREATH then ResetDamageCount() SetVariable("DamageDirection", damage_angle) act(141, DAMAGE_FLAG_BREATH) ExecEventAllBody("W_DamageBreath") Replanning() return TRUE else return FALSE end end function ExecGuardOnCancelTiming(guardcondition, blend_type) if env(243) == FALSE then return FALSE elseif guardcondition == TO_GUARDON then if ExecGuard(Event_GuardOn, blend_type) == TRUE then return TRUE end elseif ExecGuard(Event_GuardStart, blend_type) == TRUE then return TRUE end return FALSE end function LadderIdleCommonFunction(hand) act(147) if ExecLadderDeath() == TRUE then return TRUE elseif ExecLadderDamageIdle(hand) == TRUE then return TRUE elseif ExecLadderAttack(hand) == TRUE then return TRUE elseif ExecLadderItem(hand) == TRUE then return TRUE elseif ExecLadderMove(hand) == TRUE then return TRUE else return FALSE end end function LadderMoveCommonFunction(hand, is_no_damage) act(147) if ExecLadderDeath() == TRUE then return TRUE elseif is_no_damage == FALSE and ExecLadderDamageMove() == TRUE then end if env("アニメ終了か", 1) == TRUE then if IsLadderDamage(hand) == TRUE then return TRUE elseif ExecLadderAttack(hand) == TRUE then return TRUE elseif ExecLadderItem(hand) == TRUE then return TRUE elseif ExecLadderMove(hand) == TRUE then return TRUE elseif hand == HAND_STATE_LEFT then ExecEvent("W_LadderIdleLeft") else ExecEvent("W_LadderIdleRight") end return TRUE else return FALSE end end function LadderAttackCommonFunction(hand) act(147) if ExecLadderDeath() == TRUE then return TRUE elseif ExecLadderDamageIdle(hand) == TRUE then return TRUE elseif env("アニメ終了か", 1) == TRUE then if ExecLadderAttack(hand) == TRUE then return TRUE elseif ExecLadderItem(hand) == TRUE then return TRUE elseif ExecLadderMove(hand) == TRUE then return TRUE elseif hand == HAND_STATE_LEFT then ExecEvent("W_LadderIdleLeft") else ExecEvent("W_LadderIdleRight") end return TRUE else return FALSE end end function LadderDamageCommonFunction(hand) act(147) if ExecLadderDeath() == TRUE then return TRUE elseif ExecLadderDamageIdle(hand) == TRUE then return TRUE elseif env("アニメ終了か", 1) == TRUE then if ExecLadderAttack(hand) == TRUE then return TRUE elseif ExecLadderItem(hand) == TRUE then return TRUE elseif ExecLadderMove(hand) == TRUE then return TRUE elseif hand == HAND_STATE_RIGHT then ExecEvent("W_LadderIdleRight") else ExecEvent("W_LadderIdleLeft") end return TRUE else return FALSE end end function LadderEndCommonFunction() act(147) if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then LadderSetActionState(LADDER_ACTION_INVALID) return TRUE elseif ExecGuardOnCancelTiming(FALSE, ALLBODY) == TRUE then LadderSetActionState(LADDER_ACTION_INVALID) return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then LadderSetActionState(LADDER_ACTION_INVALID) return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then LadderSetActionState(LADDER_ACTION_INVALID) return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then LadderSetActionState(LADDER_ACTION_INVALID) return TRUE elseif ExecItem(QUICKTYPE_NORMAL, ALLBODY) == TRUE then LadderSetActionState(LADDER_ACTION_INVALID) return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then LadderSetActionState(LADDER_ACTION_INVALID) return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, ALLBODY, FALSE, FALSE) == TRUE then LadderSetActionState(LADDER_ACTION_INVALID) return TRUE elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then LadderSetActionState(LADDER_ACTION_INVALID) return TRUE else return FALSE end end function LadderItemCommonFunction(hand, tonext) act("アイテムアニメ中か設定") if ExecLadderDeath() == TRUE then return TRUE elseif ExecLadderDamageIdle(hand) == TRUE then return TRUE elseif env("アニメ終了か", 1) == TRUE then if ExecLadderItem(hand) == TRUE then return TRUE elseif tonext == FALSE then if ExecLadderAttack(hand) == TRUE then return TRUE elseif ExecLadderMove(hand) == TRUE then return TRUE elseif hand == HAND_STATE_RIGHT then ExecEvent("W_LadderIdleRight") else ExecEvent("W_LadderIdleLeft") end return TRUE else return FALSE end else return FALSE end end function ExecLadderDeath() local hp = env(1000) if hp <= 0 then ExecEvent("W_LadderDeathStart") return TRUE else return FALSE end end function ExecLadderDamageIdle(hand) if env(256) == FALSE then return FALSE elseif env(1001) <= 80 then AddStamina(-40) if ExecLadderFall() == TRUE then return TRUE elseif hand == HAND_STATE_LEFT then ExecEvent("W_LadderDamageLargeLeft") else ExecEvent("W_LadderDamageLargeRight") end else AddStamina(-30) if ExecLadderFall() == TRUE then return TRUE elseif hand == HAND_STATE_LEFT then ExecEvent("W_LadderDamageSmallLeft") else ExecEvent("W_LadderDamageSmallRight") end end return TRUE end function ExecLadderDamageMove() if env(256) == FALSE then return FALSE elseif env(1001) <= 80 then Flag_LadderDamage = LADDER_DAMAGE_LARGE else Flag_LadderDamage = LADDER_DAMAGE_SMALL end return TRUE end function ExecLadderFall() if 0 < env(1001) then return FALSE else ExecEvent("W_LadderFallStart") return TRUE end end function ExecLadderMove(hand) local sp_action = env(1108, ACTION_ARM_SP_MOVE) if sp_action == 0 then if Flag_LadderJump == LADDER_JUMP_WHEN_RELEASE and env(1106, ACTION_ARM_BACKSTEP) == TRUE and env(306) == FALSE then LadderSendCommand(LADDER_EVENT_COMMAND_EXIT) LadderSetActionState(LADDER_ACTION_INVALID) ExecEvent("W_LadderDrop") return TRUE end Flag_LadderJump = LADDER_JUMP_SP_RELEASED elseif sp_action < 150 then if Flag_LadderJump == LADDER_JUMP_SP_RELEASED then Flag_LadderJump = LADDER_JUMP_WHEN_RELEASE end else Flag_LadderJump = LADDER_JUMP_INVALID end local event_command = GetLadderEventCommand(FALSE) if event_command <= 0 then return FALSE elseif event_command == LADDER_EVENT_COMMAND_UP then if env(1007) == TRUE and env(294, LADDER_UP_CHECK_DIST, 1, 1) == TRUE then if hand == HAND_STATE_RIGHT then ExecEvent("W_LadderAttackUpRight") else ExecEvent("W_LadderAttackUpLeft") end return TRUE elseif env(291, LADDER_UP_CHECK_DIST, 0) == TRUE then return FALSE elseif 0 < env(1108, ACTION_ARM_SP_MOVE) then SetVariable("IsFastUp", TRUE) else SetVariable("IsFastUp", FALSE) end if hand == HAND_STATE_LEFT then ExecEvent("W_LadderUpLeft") else ExecEvent("W_LadderUpRight") end return TRUE elseif event_command == LADDER_EVENT_COMMAND_DOWN then if env(1007) == TRUE and env(294, LADDER_DOWN_CHECK_DIST, 0, 1) == TRUE then if hand == HAND_STATE_RIGHT then ExecEvent("W_LadderAttackDownRight") else ExecEvent("W_LadderAttackDownLeft") end return TRUE elseif env(292, LADDER_DOWN_CHECK_DIST, 0) == TRUE then return FALSE elseif 0 < env(1108, ACTION_ARM_SP_MOVE) and env(1007) == FALSE then ExecEvent("W_LadderCoastStart") return TRUE elseif hand == HAND_STATE_LEFT then ExecEvent("W_LadderDownLeft") else ExecEvent("W_LadderDownRight") end return TRUE elseif event_command == LADDER_EVENT_COMMAND_END_TOP then if hand == HAND_STATE_LEFT then ExecEvent("W_LadderEndTopLeft") else ExecEvent("W_LadderEndTopRight") end return TRUE elseif event_command == LADDER_EVENT_COMMAND_END_BOTTOM then if hand == HAND_STATE_LEFT then ExecEvent("W_LadderEndBottomLeft") else ExecEvent("W_LadderEndBottomRight") end return TRUE else return FALSE end end function LadderStart() local event_command = GetLadderEventCommand(TRUE) if event_command == LADDER_ACTION_START_BOTTOM then ExecEvent("W_LadderAttachBottom") return TRUE elseif event_command == LADDER_ACTION_START_TOP then ExecEvent("W_LadderAttachTop") return TRUE else return FALSE end end function LadderSetActionState(state) act(133, state) return end function LadderSendCommand(event_call) act(108, event_call) return end function ExecLadderAttack(hand) if env(1001) <= 0 then return FALSE elseif env(1106, ACTION_ARM_R1) == TRUE then if hand == HAND_STATE_RIGHT then ExecEvent("W_LadderAttackUpRight") else ExecEvent("W_LadderAttackUpLeft") end return TRUE elseif env(1106, ACTION_ARM_R2) == TRUE then if hand == HAND_STATE_RIGHT then ExecEvent("W_LadderAttackDownRight") else ExecEvent("W_LadderAttackDownLeft") end return TRUE else return FALSE end end function LadderCoastCommonFunction(hand, is_start) act(147) if ExecLadderDeath() == TRUE then return TRUE elseif ExecLadderDamageMove() == TRUE then end if is_start == FALSE then if env(306) == TRUE then ExecEvent("W_LadderCoastLanding") return TRUE end local event_command = GetLadderEventCommand(FALSE) if not (env(1108, ACTION_ARM_SP_MOVE) > 0 and env(1111) > 0 and (0 >= event_command or event_command == LADDER_EVENT_COMMAND_DOWN)) or env(292, LADDER_DOWN_CHECK_DIST, 0) == TRUE then act("はしご滑り降り解除") if env("滑り降り停止先のはしご段数取得") % 2 == 0 then ExecEvent("W_LadderCoastStopRight") else ExecEvent("W_LadderCoastStopLeft") end return TRUE end elseif env("アニメ終了か", 1) == TRUE then if IsLadderDamage(hand) == TRUE then return TRUE else ExecEvent("W_LadderCoastLeft") return TRUE end end return FALSE end function ExecSlide() if env(1116, 100400) == TRUE then return elseif env(296) == TRUE then ExecEvent("W_SlideStart") return else return end end function IdleCommonFunction() act("ロックオン時システム旋回不可角度", 90, 90) act(9100) local style = c_Style if style == HAND_LEFT_BOTH then if GetEquipType(HAND_LEFT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end elseif style == HAND_RIGHT_BOTH and GetEquipType(HAND_RIGHT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif LadderStart() == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuard(Event_GuardStart, ALLBODY) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStance(ALLBODY) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, ALLBODY, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then return TRUE elseif MoveStart(ALLBODY, Event_Move, FALSE) == TRUE then return TRUE elseif ExecQuickTurn(ALLBODY) == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE elseif env(1007) == TRUE then local event_command = env(105, 1) if event_command == 1903 then ExecEvent("W_Event90801") return TRUE elseif event_command == 2100 then ExecEvent("W_Event90851") return TRUE elseif event_command == 7300 then ExecEvent("W_Event91190") return TRUE end end return FALSE end function AttackCommonFunction(r1, r2, l1, l2, b1, b2, guardcondition, use_atk_queue) if env(1116, 100380) == FALSE then SetThrowAtkInvalid() end SetAIActionState() UpdateAtkAutoAim() local bool = FALSE if guardcondition == TO_GUARDON then bool = TRUE end if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, bool) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(guardcondition, ALLBODY) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_ATTACK, ALLBODY) == TRUE then if use_atk_queue == TRUE then SetAttackQueue(r1, r2, l1, l2, b1, b2) end return TRUE elseif ExecMagic(QUICKTYPE_ATTACK, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then return TRUE elseif ExecAttack(r1, r2, l1, l2, b1, b2, guardcondition, ALLBODY, FALSE, FALSE) == TRUE then if use_atk_queue == TRUE then SetAttackQueue(r1, r2, l1, l2, b1, b2) end return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then return elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then return TRUE elseif ExecQuickTurnOnCancelTiming() == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function BackStabCommonFunction() SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, ALLBODY) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_ATTACK, ALLBODY) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_ATTACK, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight2", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight2", "W_AttackBothHeavy1Start", FALSE, ALLBODY, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then return elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then return TRUE elseif ExecQuickTurnOnCancelTiming() == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function FallCommonFunction(is_enable_falling_death, is_jump, fall_style) local height = env(224) / 100 local damage_type = env(202) if damage_type == DAMAGE_TYPE_DEATH_FALLING then if fall_style == FALL_FACEUP then ExecEventAllBody("W_FallDeathFaceUp") elseif fall_style == FALL_FACEDOWN then ExecEventAllBody("W_FallDeathFaceDown") else ExecEventAllBody("W_FallDeath") end return TRUE elseif 60 <= height and is_enable_falling_death == TRUE and env(305, 266) ~= TRUE then if fall_style == FALL_FACEUP then ExecEventAllBody("W_FallDeathFaceUp") elseif fall_style == FALL_FACEDOWN then ExecEventAllBody("W_FallDeathFaceDown") else ExecEventAllBody("W_FallDeath") end return TRUE else act(147) if env(1112) == TRUE then return TRUE elseif env(201) == TRUE then if env(305, 266) == TRUE and fall_style ~= FALL_ATTACK then if 1.29999995231628 < height then if 8 < height then SetVariable("LandIndex", LAND_HEAVY) elseif 4 < height then SetVariable("LandIndex", LAND_MIDDLE) elseif is_jump == TRUE and 0 < height then SetVariable("LandIndex", LAND_JUMP) else SetVariable("LandIndex", LAND_DEFAULT) end Replanning() ExecEventAllBody("W_Land") return TRUE elseif 0.300000011920929 < height then ExecEventAllBody("W_LandLow") else ExecEventAllBody("W_Idle") end return TRUE elseif fall_style == FALL_DEFAULT then if IsLandDead(height) == TRUE then if 8 < height then SetVariable("IndexDeath", DEATH_TYPE_LAND) else SetVariable("IndexDeath", DEATH_TYPE_LAND_LOW) end ExecEventAllBody("W_DeathStart") return TRUE elseif 1.29999995231628 < height then if 8 < height then SetVariable("LandIndex", LAND_HEAVY) elseif 4 < height then SetVariable("LandIndex", LAND_MIDDLE) elseif is_jump == TRUE and 0 < height then SetVariable("LandIndex", LAND_JUMP) else SetVariable("LandIndex", LAND_DEFAULT) end Replanning() ExecEventAllBody("W_Land") else act("AIへのリプランニング要求") if 0.300000011920929 < height then ExecEventAllBody("W_LandLow") else ExecEventAllBody("W_Idle") end end return TRUE elseif fall_style == FALL_FACEUP then if IsLandDead(height) == TRUE then SetVariable("IndexDeath", DEATH_TYPE_LAND_FACEUP) ExecEventAllBody("W_DeathStart") else Replanning() ExecEventAllBody("W_LandFaceUp") end return TRUE elseif fall_style == FALL_FACEDOWN then if IsLandDead(height) == TRUE then SetVariable("IndexDeath", DEATH_TYPE_LAND_FACEDOWN) ExecEventAllBody("W_DeathStart") else Replanning() ExecEventAllBody("W_LandFaceDown") end return TRUE elseif fall_style == FALL_LADDER then if IsLandDead(height) == TRUE then ExecEventAllBody("W_LadderDeathLand") else Replanning() ExecEventAllBody("W_LadderFallLanding") end return TRUE elseif IsLandDead(height) == TRUE then SetVariable("IndexDeath", DEATH_TYPE_LAND) ExecEventAllBody("W_DeathStart") else ExecEventAllBody("W_LandFallAttack") end return TRUE elseif fall_style == FALL_DEFAULT and 2 <= height and (env(1106, ACTION_ARM_R1) == TRUE or 0 < env(1108, ACTION_ARM_R1)) then local style = c_Style local hand = HAND_RIGHT if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local check_weapon = GetEquipType(hand, WEAPON_CATEGORY_STAFF, WEAPON_CATEGORY_FIST_CUT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW, WEAPON_CATEGORY_SMALL_SHIELD, WEAPON_CATEGORY_LARGE_SHIELD, WEAPON_CATEGORY_TORCH) if check_weapon == TRUE and env("装備武器特殊カテゴリ番号取得", hand) ~= 234 then return FALSE else SetAttackHand(hand) ExecEventAllBody("W_FallAttackStart") return TRUE end else return FALSE end end end function SlideCommonFunction(can_endslide) if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif can_endslide == TRUE and env(296) == FALSE then ExecEvent("W_SlideEnd") return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, ALLBODY) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_ROLLING, ALLBODY) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_ROLLING, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, ALLBODY, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then return TRUE elseif MoveStartonCancelTiming(Event_MoveLong, FALSE) == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function ThrowCommonFunction(estep) act(2005, CEREMONY_STATE_RELEASE) if env(206) == TRUE then if env(202) == DAMAGE_TYPE_DEATH_FALLING then if env(1116, 4502) == TRUE then ExecEventAllBody("W_FallDeathFaceDown") elseif env(1116, 4501) == TRUE then ExecEventAllBody("W_FallDeathFaceUp") else ExecEventAllBody("W_FallDeath") end return TRUE end elseif ExecDeath() == TRUE then return TRUE elseif env("イベントアニメ再生要求があるか") == TRUE then return TRUE elseif ExecDamage(FALSE, FALSE) == TRUE then return TRUE end if ExecFallStart(FALL_TYPE_DEFAULT) == TRUE then act(136, 0) return TRUE elseif ExecEvasion(FALSE, estep, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, ALLBODY) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, ALLBODY, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then return TRUE elseif MoveStartonCancelTiming(Event_MoveShort, FALSE) == TRUE then return TRUE elseif ExecQuickTurnOnCancelTiming() == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function GestureCommonFunction(blend_type) act(147) SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, ALLBODY) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, ALLBODY, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then return TRUE elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then return TRUE elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function GestureLoopCommonFunction(blend_type, lower_state, is_start) if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE end local canmove = FALSE if env(301, 0) == TRUE then if env(1109) == TRUE then SetVariable("IndexGestureLoopEnd", GetVariable("IndexGestureLoop")) ExecEventHalfBlend(Event_GestureEnd, lower_state) return TRUE elseif canmove == FALSE and 0 < GetVariable("MoveSpeedLevel") then SetVariable("IndexGestureLoopEnd", GetVariable("IndexGestureLoop")) ExecEventHalfBlend(Event_GestureEnd, lower_state) return TRUE end end return FALSE end function MagicCommonFunction(blend_type, quick_type) local magic_type = env(227) if magic_type ~= MAGIC_REQUEST_FLAME_GRAB then SetThrowAtkInvalid() end SetAIActionState() UpdateAtkAutoAim() act(118, TRUE) if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, blend_type) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE elseif ExecMagic(quick_type, blend_type) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, blend_type, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(blend_type) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function ArrowCommonFunction(blend_type, is_allbody_turn, is_enable_stance) SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE elseif is_enable_stance == TRUE and ExecSwordArtsStanceOnCancelTiming(blend_type) == TRUE then return TRUE elseif ExecWeaponChange(blend_type) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then return TRUE elseif is_allbody_turn == TRUE then if ExecQuickTurnOnCancelTiming() == TRUE then return TRUE end elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return FALSE end return FALSE end function CrossbowCommonFunction(blend_type) SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(blend_type) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, blend_type, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(blend_type) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then return TRUE elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE else return FALSE end end function EvasionCommonFunction(fall_type, r1, r2, l1, l2, b1, b2) SetAIActionState() local style = c_Style if style == HAND_LEFT_BOTH then if GetEquipType(HAND_LEFT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end elseif style == HAND_RIGHT_BOTH and GetEquipType(HAND_RIGHT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end if ExecPassiveAction(FALSE, fall_type, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, ALLBODY) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_ROLLING, ALLBODY) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_ROLLING, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then return TRUE elseif ExecAttack(r1, r2, l1, l2, b1, b2, FALSE, ALLBODY, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then return TRUE elseif MoveStartonCancelTiming(Event_MoveLong, FALSE) == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function DamageCommonFunction(guardcondition, estep, fall_type) act(147) local style = c_Style if style == HAND_LEFT_BOTH then if GetEquipType(HAND_LEFT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end elseif style == HAND_RIGHT_BOTH and GetEquipType(HAND_RIGHT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end if ExecPassiveAction(FALSE, fall_type, FALSE) == TRUE then return TRUE end local is_usechainrecover = GetVariable("UseChainRecover") if ExecEvasion(TRUE, estep, is_usechainrecover) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(guardcondition, ALLBODY) == TRUE then ResetDamageCount() return TRUE elseif ExecItem(QUICKTYPE_NORMAL, ALLBODY) == TRUE then ResetDamageCount() return TRUE elseif ExecMagic(QUICKTYPE_NORMAL, ALLBODY) == TRUE then ResetDamageCount() return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", guardcondition, ALLBODY, FALSE, FALSE) == TRUE then ResetDamageCount() return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then ResetDamageCount() return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then ResetDamageCount() return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then ResetDamageCount() return TRUE elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then ResetDamageCount() return TRUE elseif ExecQuickTurnOnCancelTiming() == TRUE then return TRUE elseif ExecGesture() == TRUE then ResetDamageCount() return TRUE elseif env(2000) == TRUE then ResetDamageCount() end return FALSE end function QuickTurnCommonFunction() local blend_type = UPPER if env(2000) == TRUE then blend_type = ALLBODY end if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, UPPER) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(UPPER) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, ALLBODY, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(UPPER) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then return TRUE elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then return TRUE else return FALSE end end function LandCommonFunction() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif env(317) == TRUE then return FALSE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, ALLBODY) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, ALLBODY, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then return TRUE elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then return TRUE elseif ExecQuickTurnOnCancelTiming() == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function ItemCommonFunction(blend_type) if g_ItemFirstFrame == 1 then g_ItemFirstFrame = 0 elseif env(1116, 100560) == TRUE then act("道具ID切り替え無効") end if env(305, 15) == FALSE then act("アイテムアニメ中か設定") end SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, blend_type) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_ATTACK, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(blend_type) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, blend_type, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(blend_type) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then return TRUE elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function QuickItemCommonFunction(g_r1, g_r2, g_l1, g_l2, g_b1, g_b2, blend_type, quick_type) if g_ItemFirstFrame == 1 then g_ItemFirstFrame = 0 elseif env(1116, 100560) == TRUE then act("道具ID切り替え無効") end act("アイテムアニメ中か設定") SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then ClearAttackQueue() return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then ClearAttackQueue() return TRUE elseif ExecGuardOnCancelTiming(FALSE, blend_type) == TRUE then ClearAttackQueue() return TRUE elseif ExecItem(quick_type, blend_type) == TRUE then ClearAttackQueue() return TRUE elseif ExecMagic(QUICKTYPE_ATTACK, ALLBODY) == TRUE then ClearAttackQueue() return TRUE elseif ExecSwordArtsStanceOnCancelTiming(blend_type) == TRUE then ClearAttackQueue() return TRUE elseif ExecAttack(g_r1, g_r2, g_l1, g_l2, g_b1, g_b2, FALSE, blend_type, FALSE, FALSE) == TRUE then ClearAttackQueue() return TRUE elseif ExecWeaponChange(blend_type) == TRUE then ClearAttackQueue() return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then ClearAttackQueue() return TRUE elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then ClearAttackQueue() return TRUE else return FALSE end end function StopCommonFunction(is_dash_stop) act(9100) if is_dash_stop == TRUE then act("ロックオン時システム旋回不可角度", 180, 180) else act("ロックオン時システム旋回不可角度", 90, 90) end local style = c_Style if style == HAND_LEFT_BOTH then if GetEquipType(HAND_LEFT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end elseif style == HAND_RIGHT_BOTH and GetEquipType(HAND_RIGHT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif LadderStart() == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuard(Event_GuardStart, ALLBODY) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStance(ALLBODY) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, ALLBODY, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then return TRUE elseif env(1116, 100170) == TRUE then act("ロックオン中角度固定解除") if ExecDashTurn() == TRUE then return TRUE end end if MoveStart(ALLBODY, Event_Move, FALSE) == TRUE then return TRUE elseif is_dash_stop == FALSE and ExecQuickTurn(ALLBODY) == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function MoveCommonFunction(blend_type) act(9100) local style = c_Style if style == HAND_LEFT_BOTH then if GetEquipType(HAND_LEFT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end elseif style == HAND_RIGHT_BOTH and GetEquipType(HAND_RIGHT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif LadderStart() == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuard(Event_GuardStart, blend_type) == TRUE then return TRUE end local speed = GetVariable("MoveSpeedLevelReal") local quick_type = QUICKTYPE_NORMAL if 1.60000002384186 < speed then quick_type = QUICKTYPE_DASH end if ExecItem(quick_type, blend_type) == TRUE then return TRUE elseif ExecMagic(quick_type, blend_type) == TRUE then return TRUE elseif ExecSwordArtsStance(blend_type) == TRUE then return TRUE end local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" if 1.60000002384186 < speed then r1 = "W_AttackRightLightDash" b1 = "W_AttackBothDash" if IsArtsSpAtk() == TRUE then r1 = "W_AttackRightLightDashSpecial" b1 = "W_AttackBothDashSpecial" if IsEnableJumpAtk() == TRUE then r2 = "W_AttackRightHeavyKickSpecial" b2 = "W_AttackBothHeavyKickSpecial" end elseif IsEnableJumpAtk() == TRUE then r2 = "W_AttackRightHeavyKick" b2 = "W_AttackBothHeavyKick" end end if ExecAttack(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, blend_type, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(blend_type) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then return TRUE elseif ExecStop() == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function GuardCommonFunction(is_guard_end, blend_type) act(9100) if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif LadderStart() == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif is_guard_end == TRUE and ExecGuard(Event_GuardStart, blend_type) == TRUE then return TRUE elseif GetVariable("MoveSpeedIndex") == 2 then if ExecItem(QUICKTYPE_DASH, blend_type) == TRUE then return TRUE end elseif ExecItem(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE end if GetVariable("MoveSpeedIndex") == 2 then if ExecMagic(QUICKTYPE_DASH, blend_type) == TRUE then return TRUE end elseif ExecMagic(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE end if is_guard_end == TRUE then if ExecSwordArtsStanceOnCancelTiming(blend_type) == TRUE then return TRUE end elseif env(1106, ACTION_ARM_L2) == TRUE and ExecSwordArtsStance(blend_type) == TRUE then return TRUE end local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local guard_attack = FALSE if 1.10000002384186 < GetVariable("MoveSpeedLevelReal") then r1 = "W_AttackRightLightDash" b1 = "W_AttackBothDash" if IsEnableJumpAtk() == TRUE then if IsArtsSpAtk() == TRUE then r2 = "W_AttackRightHeavyKickSpecial" b2 = "W_AttackBothHeavyKickSpecial" else r2 = "W_AttackRightHeavyKick" b2 = "W_AttackBothHeavyKick" end end elseif is_guard_end == FALSE then guard_attack = TRUE end if ExecAttack(r1, r2, nil, "W_AttackLeftHeavy1", b1, b2, guard_attack, blend_type, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(blend_type) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then return TRUE elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE elseif is_guard_end == FALSE and (env(1107, ACTION_ARM_L1) == TRUE or env(1108, ACTION_ARM_L1) <= 0 or env(1001) <= 0) then ExecEventHalfBlendNoReset(Event_GuardEnd, blend_type) return TRUE else return FALSE end end function SwordArtsCommonFunction(r1, r2, l1, l2, b1, b2, guardcondition, artsr1, artsr2, gen_trans) if env(1116, 37) == FALSE and env(1116, 100380) == FALSE then SetThrowAtkInvalid() end UpdateAtkAutoAim() SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then ClearAttackQueue() return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then ClearAttackQueue() return TRUE elseif ExecGuardOnCancelTiming(FALSE, ALLBODY) == TRUE then ClearAttackQueue() return TRUE elseif ExecItem(QUICKTYPE_ATTACK, ALLBODY) == TRUE then ClearAttackQueue() return TRUE elseif ExecMagic(QUICKTYPE_ATTACK, ALLBODY) == TRUE then ClearAttackQueue() return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then ClearAttackQueue() return TRUE elseif ExecAttack(r1, r2, l1, l2, b1, b2, guardcondition, ALLBODY, artsr1, artsr2) == TRUE then ClearAttackQueue() return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then ClearAttackQueue() return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then ClearAttackQueue() return elseif MoveStartonCancelTiming(Event_Move, gen_trans) == TRUE then ClearAttackQueue() return TRUE elseif ExecQuickTurnOnCancelTiming() == TRUE then ClearAttackQueue() return TRUE elseif ExecGesture() == TRUE then ClearAttackQueue() return TRUE else return FALSE end end function SwordArtsParryCommonFunction() SetAIActionState() if ExecPassiveAction(TRUE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, ALLBODY) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_ATTACK, ALLBODY) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_ATTACK, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, ALLBODY, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then return elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then return TRUE elseif ExecQuickTurnOnCancelTiming() == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function SwordArtsStanceCommonFunction(r1, r2, l1, l2, b1, b2, blend_type, artsr1, artsr2, is_stance_end) if is_stance_end == FALSE then SetThrowAtkInvalid() end SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif env(1108, ACTION_ARM_L1) < 440 and ExecGuardOnCancelTiming(FALSE, blend_type) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE elseif is_stance_end == TRUE and ExecSwordArtsStanceOnCancelTiming(blend_type) == TRUE then return TRUE elseif ExecAttack(r1, r2, l1, l2, b1, b2, FALSE, blend_type, artsr1, artsr2) == TRUE then return TRUE elseif ExecWeaponChange(blend_type) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then return TRUE elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then if is_stance_end == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) end ClearAttackQueue() return TRUE elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE else return FALSE end end function GatlingStanceCommonFunction(blend_type, can_fire) SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE elseif is_enable_stance == TRUE and ExecSwordArtsStanceOnCancelTiming(blend_type) == TRUE then return TRUE end local request = GetAttackRequest(FALSE) if can_fire == TRUE then if 17 < request and request < 26 then if IsExistArrow() == TRUE then ExecEventAllBody("W_NoArrow") return elseif 0 < env(1001) then SetSwordArtsPointInfo(ACTION_ARM_R1, TRUE) if c_Style == HAND_LEFT_BOTH then ExecEventHalfBlend(Event_GatlingStanceRightFireStartLeft, blend_type) else ExecEventHalfBlend(Event_GatlingStanceRightFireStart, blend_type) end end end elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, blend_type, FALSE, FALSE) == TRUE then return TRUE end if ExecWeaponChange(blend_type) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then return TRUE elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return FALSE else return FALSE end end function SwordArtsChargeShotCommonFunction(blend_type) SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE elseif ExecWeaponChange(blend_type) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then return TRUE elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE else return FALSE end end function SwordArtsCrossbowStepInFunction() SetThrowAtkInvalid() SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE elseif ExecWeaponChange(blend_type) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then return TRUE elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then return TRUE elseif ExecQuickTurnOnCancelTiming() == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function WeaponChangeCommonFunction(blend_type) SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, blend_type) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_NORMAL, blend_type) == TRUE then CultForceQuit() return TRUE elseif ExecSwordArtsStanceOnCancelTiming(blend_type) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, blend_type, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(blend_type) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then return TRUE elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function HandChangeCommonFunction(blend_type) SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, blend_type) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_NORMAL, blend_type) == TRUE then CultForceQuit() return TRUE elseif ExecSwordArtsStanceOnCancelTiming(blend_type) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, blend_type, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(blend_type) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then return TRUE elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function DamageHalfBlendCommonFunction(blend_type) SetAIActionState() if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, blend_type) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_NORMAL, blend_type) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(blend_type) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, blend_type, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(blend_type) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, blend_type) == TRUE then return TRUE elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function EventCommonFunction() act(9102) act(147) act(2005, CEREMONY_STATE_RELEASE) if env(1112) == TRUE then return TRUE elseif ExecDeath() == TRUE then return TRUE elseif ExecDamage(FALSE, FALSE) == TRUE then return TRUE elseif ExecFallStart(FALL_TYPE_DEFAULT) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, ALLBODY) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, ALLBODY, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then return TRUE elseif MoveStartonCancelTiming(Event_MoveShort, FALSE) == TRUE then return TRUE elseif ExecQuickTurnOnCancelTiming() == TRUE then return TRUE elseif ExecGesture() == TRUE then return TRUE else return FALSE end end function CultMoveStart(blend_type, event) act(138, FALSE) if GetVariable("MoveSpeedLevel") <= 0 then return FALSE else SetVariable("MoveSpeedLevelReal", 0) if blend_type == ALLBODY then ExecEventHalfBlend(event, ALLBODY) return TRUE elseif blend_type == UPPER then ExecEventHalfBlend(event, UPPER) return TRUE elseif blend_type == LOWER then ExecEventHalfBlend(event, LOWER) return TRUE else return FALSE end end end function CultHoldCommonFunction() act(138, FALSE) if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then CultForceQuit() return TRUE elseif ExecItem(QUICKTYPE_NORMAL, ALLBODY) == TRUE then CultForceQuit() return TRUE elseif ExecMagic(QUICKTYPE_NORMAL, ALLBODY) == TRUE then CultForceQuit() return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, ALLBODY, FALSE, FALSE) == TRUE then CultForceQuit() return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then CultForceQuit() return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then CultForceQuit() return TRUE else return FALSE end end function CultCommonFunction(id, is_end) act(138, FALSE) act(9102) act(2005, CEREMONY_STATE_RELEASE) if ExecPassiveAction(FALSE, FALL_TYPE_DEFAULT, FALSE) == TRUE then return TRUE elseif ExecEvasion(FALSE, ESTEP_NONE, FALSE) == TRUE then return TRUE elseif ExecGuardOnCancelTiming(FALSE, ALLBODY) == TRUE then return TRUE elseif ExecItem(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecMagic(QUICKTYPE_NORMAL, ALLBODY) == TRUE then return TRUE elseif ExecSwordArtsStanceOnCancelTiming(ALLBODY) == TRUE then return TRUE elseif ExecAttack("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, ALLBODY, FALSE, FALSE) == TRUE then return TRUE elseif ExecWeaponChange(ALLBODY) == TRUE then return TRUE elseif ExecHandChange(HAND_RIGHT, FALSE, ALLBODY) == TRUE then return TRUE elseif is_end == FALSE then local str_int = "W_CultInterrupt" local str_end = "W_CultEnd" if env("儀式中断か") == TRUE then ExecEventAllBody(str_int .. id) return TRUE elseif env("儀式完了か") == TRUE then ExecEventAllBody(str_end .. id) return TRUE end end return FALSE end function HalfBlendLowerCommonFunction(event, lower_state, to_idle_on_cancel, is_fire_upper_on_move) if lower_state == LOWER_MOVE then if ExecStopHalfBlend(event, to_idle_on_cancel) == TRUE then return TRUE end else local blend_type = LOWER if env(2000) == TRUE then blend_type = ALLBODY end if MoveStart(blend_type, Event_Move, FALSE) == TRUE then if is_fire_upper_on_move == TRUE and blend_type == LOWER then ExecEventHalfBlend(event, UPPER) end return TRUE elseif lower_state == LOWER_END_TURN then ExecEventHalfBlendNoReset(event, LOWER) return TRUE end end return FALSE end function HalfBlendLowerCommonFunctionNoSync(event, lower_state, to_idle_on_cancel, is_fire_upper_on_move) if lower_state == LOWER_MOVE then if ExecStopHalfBlend(event, to_idle_on_cancel) == TRUE then return TRUE end else local blend_type = LOWER if env(2000) == TRUE then blend_type = ALLBODY end if MoveStart(blend_type, Event_MoveNoSync, FALSE) == TRUE then if is_fire_upper_on_move == TRUE and blend_type == LOWER then ExecEventHalfBlend(event, UPPER) end return TRUE elseif lower_state == LOWER_END_TURN then ExecEventHalfBlendNoReset(event, LOWER) return TRUE end end return FALSE end function HalfBlendUpperCommonFunction(lower_state) if lower_state == LOWER_MOVE and env(2000) == TRUE then ExecEventHalfBlendNoReset(Event_Move, UPPER) return TRUE elseif env("アニメ終了か", 1) == TRUE or lower_state ~= LOWER_IDLE and env(301, 0) == TRUE then if lower_state == LOWER_TURN then local turn_state = GetVariable("UpperDefaultState01") local event = Event_QuickTurnRight180Mirror if turn_state == QUICKTURN_LEFT180_DEF1 then event = Event_QuickTurnLeft180Mirror end ExecEventHalfBlendNoReset(event) elseif lower_state == LOWER_MOVE then ExecEventHalfBlendNoReset(Event_Move, UPPER) else ExecEventNoReset("W_Idle") end return TRUE else return FALSE end end function ArrowLowerCommonFunction(event, lower_state, to_idle_on_cancel, is_fire_upper_on_move) if lower_state == LOWER_MOVE then if ExecStopHalfBlend(event, to_idle_on_cancel) == TRUE then return TRUE end else if lower_state ~= LOWER_TURN then local style = c_Style local hand = HAND_RIGHT if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if env(225, hand) ~= WEAPON_CATEGORY_LARGE_ARROW then if MoveStart(LOWER, Event_Move, FALSE) == TRUE then if is_fire_upper_on_move == TRUE then ExecEventHalfBlend(event, UPPER) end return TRUE end elseif env(234) == FALSE and MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then return TRUE end end if lower_state == LOWER_END_TURN then ExecEventHalfBlendNoReset(event, LOWER) return TRUE end end return FALSE end function CultExecStop() if GetVariable("MoveSpeedLevel") <= 0 then act(2005, CEREMONY_STATE_IDLE) ExecEventAllBody("W_CultIdle") return TRUE else return FALSE end end function CultForceQuit() act(2005, CEREMONY_STATE_FORCE_RELEASE) return end function Idle_onActivate() SetVariable("MoveSpeedLevelReal", 0) ClearAttackQueue() act(9100) act(139) act(129, TRUE) act("自動捕捉対象クリア") return end function Idle_onUpdate() if IdleCommonFunction() == TRUE then SetVariable("MenuOpenTime", 0) return elseif env("装備メニュー開いているか") == FALSE then SetVariable("MenuOpenTime", 0) return else local time = GetVariable("MenuOpenTime") if 0.800000011920929 < time then SetVariable("MenuOpenTime", 0) ExecEventNoReset("W_InGameMenuIdleStart") return else SetVariable("MenuOpenTime", time + GetDeltaTime()) return end end end function Idle_onDeactivate() act(129, FALSE) return end function InGameMenuIdleLoop_onUpdate() if IdleCommonFunction() == TRUE then SetVariable("MenuCloseTime", 0) return elseif env("装備メニュー開いているか") == TRUE then SetVariable("MenuCloseTime", 0) return else local time = GetVariable("MenuCloseTime") if 2 < time then SetVariable("MenuCloseTime", 0) ExecEventNoReset("W_InGameMenuIdleEnd") return else SetVariable("MenuCloseTime", time + GetDeltaTime()) return end end end function InGameMenuIdleStart_onUpdate() if IdleCommonFunction() == TRUE then SetVariable("MenuCloseTime", 0) return elseif env("装備メニュー開いているか") == TRUE then SetVariable("MenuCloseTime", 0) else local time = GetVariable("MenuCloseTime") if time < 2 then SetVariable("MenuCloseTime", time + GetDeltaTime()) end end if env("アニメ終了か", 3) == TRUE then local time = GetVariable("MenuCloseTime") if time < 2 then ExecEventNoReset("W_InGameMenuIdleLoop") else SetVariable("MenuCloseTime", 0) ExecEventNoReset("W_InGameMenuIdleEnd") end return else return end end function InGameMenuIdleEnd_onUpdate() if IdleCommonFunction() == TRUE then return elseif env("アニメ終了か", 3) == TRUE then if env("装備メニュー開いているか") == TRUE then ExecEventNoReset("W_InGameMenuIdleStart") else ExecEventNoReset("W_Idle") end return else return end end function DashStop_Upper_onActivate() act(9100) return end function DashStop_Upper_onUpdate() if StopCommonFunction(TRUE) == TRUE then return else return end end function RunStopFront_Upper_onActivate() act(9100) return end function RunStopFront_Upper_onUpdate() if StopCommonFunction(FALSE) == TRUE then return else return end end function RunStopBack_Upper_onActivate() act(9100) return end function RunStopBack_Upper_onUpdate() if StopCommonFunction(FALSE) == TRUE then return else return end end function RunStopLeft_Upper_onActivate() act(9100) return end function RunStopLeft_Upper_onUpdate() if StopCommonFunction(FALSE) == TRUE then return else return end end function RunStopRight_Upper_onActivate() act(9100) return end function RunStopRight_Upper_onUpdate() if StopCommonFunction(FALSE) == TRUE then return else return end end function WalkStopFront_onActivate() act(9100) return end function WalkStopFront_Upper_onUpdate() if StopCommonFunction(FALSE) == TRUE then return else return end end function WalkStopBack_Upper_onActivate() act(9100) return end function WalkStopBack_Upper_onUpdate() if StopCommonFunction(FALSE) == TRUE then return else return end end function WalkStopLeft_Upper_onActivate() act(9100) return end function WalkStopLeft_Upper_onUpdate() if StopCommonFunction(FALSE) == TRUE then return else return end end function WalkStopRight_Upper_onActivate() act(9100) return end function WalkStopRight_Upper_onUpdate() if StopCommonFunction(FALSE) == TRUE then return else return end end function Dash180_Upper_onActivate() act(9104) return end function Dash180_Upper_onUpdate() act(9104) if QuickTurnCommonFunction() == TRUE then return else return end end function Evasion_Activate() ActivateRightArmAdd(START_FRAME_NONE) return end function Evasion_Update() UpdateRightArmAdd() return end function Rolling_onUpdate() SetThrowAtkInvalid() if env(1116, 100390) == TRUE then ResetDamageCount() end local style = c_Style if style == HAND_LEFT_BOTH then if GetEquipType(HAND_LEFT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end elseif style == HAND_RIGHT_BOTH and GetEquipType(HAND_RIGHT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end local rolling_angle = GetVariable("RollingAngleReal") local addratio = 0.400000005960464 local endratio = 1 act(2001, math.abs(1 + addratio * math.abs(math.sin(math.rad(2 * rolling_angle))))) if EvasionCommonFunction(FALL_TYPE_DEFAULT, "W_AttackRightLightStep", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLightStep", "W_AttackBothHeavy2Start") == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventAllBody("W_Idle") return else SetRollingTurnCondition(FALSE) return end end function RollingSelftrans_onActivate() ResetDamageCount() return end function RollingSelftrans_onUpdate() SetThrowAtkInvalid() local style = c_Style if style == HAND_LEFT_BOTH then if GetEquipType(HAND_LEFT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end elseif style == HAND_RIGHT_BOTH and GetEquipType(HAND_RIGHT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end local rolling_angle = GetVariable("RollingAngleRealSelftrans") local addratio = 0.400000005960464 local endratio = 1 act(2001, math.abs(1 + addratio * math.abs(math.sin(math.rad(2 * rolling_angle))))) if EvasionCommonFunction(FALL_TYPE_DEFAULT, "W_AttackRightLightStep", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLightStep", "W_AttackBothHeavy2Start") == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventAllBody("W_Idle") return else SetRollingTurnCondition(TRUE) return end end function BackStep_onActivate() ResetDamageCount() return end function BackStep_onUpdate() if EvasionCommonFunction(FALL_TYPE_DEFAULT, "W_AttackRightLightDash", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothDash", "W_AttackBothHeavy1Start") == TRUE then return else return end end function Jump_onActivate() ResetDamageCount() return end function Jump_onUpdate() if EvasionCommonFunction(FALL_TYPE_JUMP, "W_AttackRightLightStep", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLightStep", "W_AttackBothHeavy2Start") == TRUE then return elseif env(1116, 100320) == TRUE and 0.5 < GetVariable("MoveSpeedLevel") then ExecEventNoReset("W_JumpLong") return else return end end function JumpLong_onUpdate() if EvasionCommonFunction(FALL_TYPE_JUMP, "W_AttackRightLightStep", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLightStep", "W_AttackBothHeavy2Start") == TRUE then return else return end end function EStepDown_onActivate() ResetDamageCount() return end function EStepDown_onUpdate() SetThrowAtkInvalid() local style = c_Style if style == HAND_LEFT_BOTH then if GetEquipType(HAND_LEFT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end elseif style == HAND_RIGHT_BOTH and GetEquipType(HAND_RIGHT, WEAPON_CATEGORY_SMALL_ARROW, WEAPON_CATEGORY_LARGE_ARROW, WEAPON_CATEGORY_CROSSBOW) == TRUE then act("精密射撃可能か") end local rolling_angle = GetVariable("RollingAngleReal") local addratio = 0.400000005960464 local endratio = 1 act(2001, math.abs(1 + addratio * math.abs(math.sin(math.rad(2 * rolling_angle))))) if EvasionCommonFunction(FALL_TYPE_DEFAULT, "W_AttackRightLightStep", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLightStep", "W_AttackBothHeavy2Start") == TRUE then return else SetRollingTurnCondition(FALSE) return end end function ChainRecover_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if DamageHalfBlendCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ChainRecoverMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function Move_Activate() SetMoveWeightIndex() SetVariable("ChangeStartWaistTwistAngle", 0) SetVariable("ChangeEndWaistTwistAngle", 0) return end function Move_Update() SetMoveWeightIndex() ChangeWaistTwist(-10, 0, -20, 0) return end function Move_onActivate() act(101, TRUE) return end function Move_onUpdate() act(101, TRUE) local move_speed = GetVariable("MoveSpeedIndex") if move_speed == 2 then SetThrowAtkInvalid() end if GetVariable("MoveType") == 3 then act("4方向移動閾値設定", 60, 45, 60, 60) elseif GetVariable("MoveType") == 0 then act("4方向移動閾値設定", 70, 40, 60, 20) else act("4方向移動閾値設定", 40, 70, 60, 20) end SpeedUpdate() if env(1007) == TRUE then local npc_turn_speed = 240 if move_speed == 2 then npc_turn_speed = 210 else local dir = GetVariable("MoveDirection") if dir == 0 then npc_turn_speed = 90 end end SetTurnSpeed(npc_turn_speed) end local addratio = 0 local endratio = 1 local ratio = 1 if GetVariable("MoveDirection") == 3 or GetVariable("MoveDirection") == 2 then act(2001, 0.959999978542328 * ratio) elseif GetVariable("MoveDirection") == 1 then act(2001, 0.959999978542328 * ratio) elseif GetVariable("MoveDirection") == 0 then act(2001, 0.980000019073486 * ratio) end return end function MoveNoSync_onActivate() act(101, TRUE) return end function MoveNoSync_onUpdate() Move_onUpdate() return end function Move_Upper_onActivate() act(9100) return end function Move_Upper_onUpdate() if MoveCommonFunction(UPPER) == TRUE then return else return end end function Guard_Activate() local style = c_Style if style == HAND_RIGHT_BOTH then SetAttackHand(HAND_RIGHT) else SetAttackHand(HAND_LEFT) end return end function GuardStart_Upper_onActivate() if IsNodeActive("GuardStart_Upper Selector") == FALSE then act(9100) end return end function GuardStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) act(129, TRUE) else act(129, FALSE) end if GuardCommonFunction(FALSE, blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE or env(301, 0) == TRUE then ExecEventHalfBlend(Event_GuardOn, blend_type) return elseif HalfBlendLowerCommonFunction(Event_GuardOn, lower_state, FALSE, FALSE) == TRUE then return else return end end function GuardOn_Upper_onActivate() if IsNodeActive("GuardOn_Upper Selector") == FALSE then act(9100) end return end function GuardOn_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) act(129, TRUE) else act(129, FALSE) end if GuardCommonFunction(FALSE, blend_type) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_GuardOn, lower_state, FALSE, TRUE) == TRUE then return else return end end function GuardEnd_Upper_onActivate() if IsNodeActive("GuardEnd_Upper Selector") == FALSE then act(9100) end return end function GuardEnd_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) act(129, TRUE) else act(129, FALSE) end if GuardCommonFunction(TRUE, blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_GuardEnd, lower_state, FALSE, FALSE) == TRUE then return else return end end function FallStart_onUpdate() if FallCommonFunction(TRUE, FALSE, FALL_DEFAULT) == TRUE then return else return end end function FallJumpStart_onUpdate() if FallCommonFunction(TRUE, TRUE, FALL_DEFAULT) == TRUE then return else return end end function FallLoop_onUpdate() if env(315, 12) == TRUE then ExecEvent("W_FallDeath") return elseif FallCommonFunction(TRUE, FALSE, FALL_DEFAULT) == TRUE then return else return end end function FallAttackStart_onUpdate() if FallCommonFunction(TRUE, FALSE, FALL_ATTACK) == TRUE then return else return end end function FallAttackLoop_onUpdate() if FallCommonFunction(TRUE, FALSE, FALL_ATTACK) == TRUE then return else return end end function FallAttackCancel_onUpdate() if FallCommonFunction(TRUE, FALSE, FALL_ATTACK) == TRUE then return else return end end function Land_onUpdate() if LandCommonFunction() == TRUE then return else return end end function LandLow_onActivate() act(9100) return end function LandLow_onUpdate() if IdleCommonFunction() == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventAllBody("W_Idle") return else return end end function LandFallAttack_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function FallStartFaceUp_onUpdate() if FallCommonFunction(TRUE, FALSE, FALL_FACEUP) == TRUE then return else return end end function FallStartFaceDown_onUpdate() if FallCommonFunction(TRUE, FALSE, FALL_FACEDOWN) == TRUE then return else return end end function FallLoopFaceUp_onUpdate() if env(315, 12) == TRUE then ExecEvent("W_FallDeathFaceUp") return elseif FallCommonFunction(TRUE, FALSE, FALL_FACEUP) == TRUE then return else return end end function FallLoopFaceDown_onUpdate() if env(315, 12) == TRUE then ExecEvent("W_FallDeathFaceDown") return elseif FallCommonFunction(TRUE, FALSE, FALL_FACEDOWN) == TRUE then return else return end end function LandFaceUp_onUpdate() if LandCommonFunction() == TRUE then return else return end end function LandFaceDown_onUpdate() if LandCommonFunction() == TRUE then return else return end end function Damage_Update() if env(1116, 30) == FALSE then SetThrowDefInvalid() end return end function DamageSmall_onUpdate() act(2001, 0) if DamageCommonFunction(FALSE, ESTEP_NONE, FALL_TYPE_FORCE) == TRUE then return else return end end function DamageMiddle_onUpdate() act(2001, 0) if DamageCommonFunction(FALSE, ESTEP_NONE, FALL_TYPE_FORCE) == TRUE then return else return end end function DamageLarge_onUpdate() act(2001, 0) if DamageCommonFunction(FALSE, ESTEP_NONE, FALL_TYPE_FORCE) == TRUE then return else return end end function DamageLarge2_onUpdate() act(2001, 0) if DamageCommonFunction(FALSE, ESTEP_NONE, FALL_TYPE_FORCE) == TRUE then return else return end end function DamageWeak_onUpdate() if DamageCommonFunction(FALSE, ESTEP_NONE, FALL_TYPE_FORCE) == TRUE then return else return end end function DamageMinimum_onUpdate() if DamageCommonFunction(FALSE, ESTEP_NONE, FALL_TYPE_FORCE) == TRUE then return else return end end function DamageFling_onUpdate() if DamageCommonFunction(FALSE, ESTEP_DOWN, FALL_TYPE_FACEDOWN_LOOP) == TRUE then return else return end end function DamageExLarge_onUpdate() if DamageCommonFunction(FALSE, ESTEP_DOWN, FALL_TYPE_FORCE_LOOP) == TRUE then return else return end end function DamagePush_onUpdate() act(2001, 0) if DamageCommonFunction(FALSE, ESTEP_NONE, FALL_TYPE_FORCE) == TRUE then return else return end end function DamageSmallBlow_onUpdate() if DamageCommonFunction(FALSE, ESTEP_DOWN, FALL_TYPE_FORCE_LOOP) == TRUE then return else return end end function DamageUpper_onUpdate() if DamageCommonFunction(FALSE, ESTEP_DOWN, FALL_TYPE_FACEDOWN_LOOP) == TRUE then return else return end end function DamageExBlast_onUpdate() if DamageCommonFunction(FALSE, ESTEP_DOWN, FALL_TYPE_FORCE_LOOP) == TRUE then return else return end end function DamageBreath_onUpdate() if DamageCommonFunction(FALSE, ESTEP_DOWN, FALL_TYPE_FORCE_LOOP) == TRUE then return else return end end function DamageParry_onUpdate() if DamageCommonFunction(FALSE, ESTEP_NONE, FALL_TYPE_DEFAULT) == TRUE then return else return end end function SpecialDamageUpper_onUpdate() if env(334, 10) == TRUE then Replanning() ResetDamageCount() act(141, DAMAGE_FLAG_SMALL) ExecEvent("W_SpecialDamageUpper") return TRUE elseif env(301, 0) == FALSE and env(248) == TRUE then ExecEvent("W_SpecialDamageUpperLand") return TRUE elseif env("アニメ終了か", 1) == TRUE then ExecEvent("W_SpecialDamageUpperLoop") end return end function SpecialDamageUpperLoop_onUpdate() if env(334, 10) == TRUE then Replanning() ResetDamageCount() act(141, DAMAGE_FLAG_SMALL) ExecEvent("W_SpecialDamageUpper") return TRUE elseif env(248) == TRUE then ExecEvent("W_SpecialDamageUpperLand") return TRUE else return end end function SpecialDamageUpperLand_onUpdate() if env(301, 0) == TRUE then if IsDead() == TRUE then SetVariable("IndexDeath", DEATH_TYPE_SPECIAL_UPPER) ExecEventAllBody("W_DeathStart") return elseif DamageCommonFunction(FALSE, ESTEP_NONE, FALL_TYPE_DEFAULT) == TRUE then return end end return end function GuardDamageSmall_onUpdate() act(110) if DamageCommonFunction(TO_GUARDON, ESTEP_NONE, FALL_TYPE_DEFAULT) == TRUE then return else return end end function GuardDamageMiddle_onUpdate() act(110) if DamageCommonFunction(TO_GUARDON, ESTEP_NONE, FALL_TYPE_DEFAULT) == TRUE then return else return end end function GuardDamageLarge_onUpdate() act(110) if DamageCommonFunction(TO_GUARDON, ESTEP_NONE, FALL_TYPE_DEFAULT) == TRUE then return else return end end function GuardBreak_onUpdate() if DamageCommonFunction(FALSE, ESTEP_NONE, FALL_TYPE_DEFAULT) == TRUE then return else return end end function GuardDamageSmall_GenTrans_onUpdate() act(110) if DamageCommonFunction(TO_GUARDON, ESTEP_NONE, FALL_TYPE_DEFAULT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function GuardDamageMiddle_GenTrans_onUpdate() act(110) if DamageCommonFunction(TO_GUARDON, ESTEP_NONE, FALL_TYPE_DEFAULT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function GuardDamageLarge_GenTrans_onUpdate() act(110) if DamageCommonFunction(TO_GUARDON, ESTEP_NONE, FALL_TYPE_DEFAULT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function GuardBreak_GenTrans_onUpdate() if DamageCommonFunction(FALSE, ESTEP_NONE, FALL_TYPE_DEFAULT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function GuardDamageBreak_onUpdate() if DamageCommonFunction(FALSE, ESTEP_NONE, FALL_TYPE_DEFAULT) == TRUE then return else return end end function GuardBreakWall_onUpdate() if DamageCommonFunction(FALSE, ESTEP_NONE, FALL_TYPE_DEFAULT) == TRUE then return else return end end function GuardDamageExLarge_onUpdate() if DamageCommonFunction(FALSE, ESTEP_DOWN, FALL_TYPE_DEFAULT) == TRUE then return else return end end function DeathIdle_onActivate() act(126, TRUE) return end function DeathIdle_onDeactivate() act(126, FALSE) return end function QuickTurn_Activate() return end function QuickTurn_Deactivate() return end function QuickTurnLeft180_Upper_onUpdate() if QuickTurnCommonFunction() == TRUE then return elseif GetVariable("IsLockon") == false then ExecEventNoReset("W_Idle") return elseif env("アニメ終了か", 1) == TRUE then ExecEventNoReset("W_Idle") return else return end end function QuickTurnRight180_Upper_onUpdate() if QuickTurnCommonFunction() == TRUE then return elseif GetVariable("IsLockon") == false then ExecEventNoReset("W_Idle") return elseif env("アニメ終了か", 1) == TRUE then ExecEventNoReset("W_Idle") return else return end end function AttackRight_Activate() SetInterruptType(INTERRUPT_FINDATTACK) SetAttackHand(HAND_RIGHT) return end function AttackRightLight1_onUpdate() if AttackCommonFunction("W_AttackRightLight2", "W_AttackRightHeavy1SubStart", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight2", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightLight2_onUpdate() if AttackCommonFunction("W_AttackRightLight3", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight3", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightLight3_onUpdate() if AttackCommonFunction("W_AttackRightLight2", "W_AttackRightHeavy1SubStart", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight2", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightLightKick_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightLightStep_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightLightStepSpecial_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightLightDash_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightLightDashSpecial_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightWhileGuard_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", TO_GUARDON, TRUE) == TRUE then return else return end end function AttackRightHeavy1SubStart_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return elseif env(301, 0) == TRUE or env("アニメ終了か", 1) == TRUE then act("特殊補間設定", 0, TRUE) ExecEventAllBody("W_AttackRightHeavy1Start") return else return end end function AttackRightHeavy1Start_onUpdate() act("特殊補間設定", 0, FALSE) if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return elseif env(1108, ACTION_ARM_R2) <= 0 and env(1116, 100280) == TRUE then ExecEventAllBody("W_AttackRightHeavy1End") return else return end end function AttackRightHeavy1End_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightHeavy2Start_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return elseif env(1108, ACTION_ARM_R2) <= 0 and env(1116, 100280) == TRUE then ExecEventAllBody("W_AttackRightHeavy2End") return else return end end function AttackRightHeavy2End_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightHeavySpecial1SubStart_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return elseif env(301, 0) == TRUE or env("アニメ終了か", 1) == TRUE then act("特殊補間設定", 0, TRUE) ExecEventAllBody("W_AttackRightHeavySpecial1Start") return else return end end function AttackRightHeavySpecial1Start_onUpdate() act("特殊補間設定", 0, FALSE) if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return elseif env(1108, ACTION_ARM_R2) <= 0 and env(1116, 100280) == TRUE then ExecEventAllBody("W_AttackRightHeavySpecial1End") return else return end end function AttackRightHeavySpecial1End_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightHeavySpecial2Start_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return elseif env(1108, ACTION_ARM_R2) <= 0 and env(1116, 100280) == TRUE then ExecEventAllBody("W_AttackRightHeavySpecial2End") return else return end end function AttackRightHeavySpecial2End_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightHeavyWepBroken1Start_onUpdate() AttackRightHeavy1Start_onUpdate() return end function AttackRightHeavyWepBroken2Start_onUpdate() AttackRightHeavy2Start_onUpdate() return end function AttackRightHeavyWepBroken1SubStart_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return elseif env(301, 0) == TRUE or env("アニメ終了か", 1) == TRUE then act("特殊補間設定", 0, TRUE) ExecEventAllBody("W_AttackRightHeavyWepBroken1Start") return else return end end function AttackRightHeavyKick_onUpdate() if AttackCommonFunction("W_AttackRightLightStep", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightHeavyKickSpecial_onUpdate() if AttackCommonFunction("W_AttackRightLightStep", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackRightBackstep_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackLeft_Activate() SetInterruptType(INTERRUPT_FINDATTACK) SetAttackHand(HAND_LEFT) ActivateRightArmAdd(START_FRAME_A02) return end function AttackLeft_Update() SetVariable("IndexDamageParryHand", 1) UpdateRightArmAdd() return end function AttackLeft_Deactivate() SetVariable("IndexDamageParryHand", 0) return end function AttackLeftLight1_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackLeftHeavy1_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", nil, "W_AttackLeftHeavy2", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackLeftHeavy2_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", nil, "W_AttackLeftHeavy3", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackLeftHeavy3_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", nil, "W_AttackLeftHeavy2", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackLeftHeavySp1_onUpdate() AttackLeftHeavy1_onUpdate() return end function AttackLeftHeavySp2_onUpdate() AttackLeftHeavy2_onUpdate() return end function AttackLeftHeavySp3_onUpdate() AttackLeftHeavy3_onUpdate() return end function AttackBoth_Activate() SetInterruptType(INTERRUPT_FINDATTACK) local style = c_Style if style == HAND_LEFT_BOTH then SetAttackHand(HAND_LEFT) else SetAttackHand(HAND_RIGHT) end return end function AttackBothLight1_onUpdate() local b2 = "W_AttackBothHeavy1SubStart" local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if env("装備武器特殊カテゴリ番号取得", hand) == 232 then b2 = "W_AttackBothHeavy2Start" end if AttackCommonFunction("W_AttackRightLight2", "W_AttackRightHeavy1Start", "W_AttackBothLeft2", "W_AttackLeftHeavy1", "W_AttackBothLight2", b2, FALSE, TRUE) == TRUE then return else return end end function AttackBothLight2_onUpdate() if AttackCommonFunction("W_AttackRightLight3", "W_AttackRightHeavy1Start", "W_AttackBothLeft3", "W_AttackLeftHeavy1", "W_AttackBothLight3", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothLight3_onUpdate() local b1 = "W_AttackBothLight2" local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if env("装備武器特殊カテゴリ番号取得", hand) == 232 then b1 = "W_AttackBothLight1" end if env(1116, 100440) == TRUE then act(2001, 0.699999988079071) end if AttackCommonFunction("W_AttackRightLight2", "W_AttackRightHeavy1Start", "W_AttackBothLeft2", "W_AttackLeftHeavy1", b1, "W_AttackBothHeavy1SubStart", FALSE, TRUE) == TRUE then return else return end end function AttackBothLeft1_onUpdate() if AttackCommonFunction("W_AttackRightLight2", "W_AttackRightHeavy1Start", "W_AttackBothLeft2", "W_AttackLeftHeavy1", "W_AttackBothLight2", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothLeft2_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft3", "W_AttackLeftHeavy1", "W_AttackBothLight3", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothLeft3_onUpdate() if AttackCommonFunction("W_AttackRightLight2", "W_AttackRightHeavy1Start", "W_AttackBothLeft2", "W_AttackLeftHeavy1", "W_AttackBothLight2", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothLeftDash_onUpdate() local r1 = "W_AttackRightLight1" local l1 = "W_AttackBothLeft1" local b1 = "W_AttackBothLight1" local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if env("装備武器特殊カテゴリ番号取得", hand) == 161 then r1 = "W_AttackRightLight2" l1 = "W_AttackBothLeft2" b1 = "W_AttackBothLight2" end if AttackCommonFunction(r1, "W_AttackRightHeavy1Start", l1, "W_AttackLeftHeavy1", b1, "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothLeftStep_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothHeavy1SubStart_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return elseif env(301, 0) == TRUE or env("アニメ終了か", 1) == TRUE then act("特殊補間設定", 0, TRUE) ExecEventAllBody("W_AttackBothHeavy1Start") return else return end end function AttackBothHeavy1Start_onUpdate() act("特殊補間設定", 0, FALSE) if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return elseif env(1108, ACTION_ARM_R2) <= 0 and env(1116, 100280) == TRUE then ExecEventAllBody("W_AttackBothHeavy1End") return else return end end function AttackBothHeavy1End_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothHeavy2Start_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return elseif env(1108, ACTION_ARM_R2) <= 0 and env(1116, 100280) == TRUE then ExecEventAllBody("W_AttackBothHeavy2End") return else return end end function AttackBothHeavy2End_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothHeavySpecial1SubStart_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return elseif env(301, 0) == TRUE or env("アニメ終了か", 1) == TRUE then act("特殊補間設定", 0, TRUE) ExecEventAllBody("W_AttackBothHeavySpecial1Start") return else return end end function AttackBothHeavySpecial1Start_onUpdate() act("特殊補間設定", 0, FALSE) if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return elseif env(1108, ACTION_ARM_R2) <= 0 and env(1116, 100280) == TRUE then ExecEventAllBody("W_AttackBothHeavySpecial1End") return else return end end function AttackBothHeavySpecial1End_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothHeavySpecial2Start_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return elseif env(1108, ACTION_ARM_R2) <= 0 and env(1116, 100280) == TRUE then ExecEventAllBody("W_AttackBothHeavySpecial2End") return else return end end function AttackBothHeavySpecial2End_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothHeavyWepBroken1Start_onUpdate() AttackBothHeavy1Start_onUpdate() return end function AttackBothHeavyWepBroken2Start_onUpdate() AttackBothHeavy2Start_onUpdate() return end function AttackBothHeavyWepBroken1SubStart_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy2Start", FALSE, TRUE) == TRUE then return elseif env(301, 0) == TRUE or env("アニメ終了か", 1) == TRUE then act("特殊補間設定", 0, TRUE) ExecEventAllBody("W_AttackBothHeavyWepBroken1Start") return else return end end function AttackBothDash_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothDashSpecial_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothLightStep_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothLightStepSpecial_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothLightKick_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothHeavyKick_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothHeavyKickSpecial_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackBothBackstep_onUpdate() if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackBothLeft1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return else return end end function AttackArrowRight_Activate() SetInterruptType(INTERRUPT_FINDATTACK) if c_Style == HAND_LEFT_BOTH then SetAttackHand(HAND_LEFT) else SetAttackHand(HAND_RIGHT) end return end function AttackArrowRightStart_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if ArrowCommonFunction(blend_type, FALSE, FALSE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then if env("弓矢スロット取得", 0) == 0 then if 0 < env(1108, ACTION_ARM_R1) then ExecEventHalfBlend(Event_AttackArrowRightLoop, blend_type) return else ExecEventAllBody("W_AttackArrowRightFire") return end elseif 0 < env(1108, ACTION_ARM_R2) then ExecEventHalfBlend(Event_AttackArrowRightLoop, blend_type) return else ExecEventAllBody("W_AttackArrowRightFire") return end elseif ArrowLowerCommonFunction(Event_AttackArrowRightStartMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackArrowRightLoop_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if ArrowCommonFunction(blend_type, FALSE, FALSE) == TRUE then return elseif env("弓矢スロット取得", 0) == 0 then if env(1108, ACTION_ARM_R1) <= 0 then ExecEventAllBody("W_AttackArrowRightFire") return end elseif env(1108, ACTION_ARM_R2) <= 0 then ExecEventAllBody("W_AttackArrowRightFire") return end if ArrowLowerCommonFunction(Event_AttackArrowRightLoop, lower_state, FALSE, TRUE) == TRUE then return else return end end function AttackArrowRightFire_onUpdate() act("精密射撃可能か") if ArrowCommonFunction(ALLBODY, TRUE, FALSE) == TRUE then return elseif env(1001) <= 0 then return else local request = GetAttackRequest(FALSE) if request == ATTACK_REQUEST_ARROW_FIRE_RIGHT or request == ATTACK_REQUEST_ARROW_FIRE_RIGHT2 then if env(225, HAND_RIGHT) ~= WEAPON_CATEGORY_LARGE_ARROW then if IsExistArrow() == TRUE then ExecEventAllBody("W_NoArrow") return else ExecEventHalfBlend(Event_AttackArrowRightStart, ALLBODY) return end elseif IsExistArrow() == TRUE then ExecEventAllBody("W_NoArrow") return else ExecEventHalfBlend(Event_AttackArrowRightStart, ALLBODY) return end elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then return else return end end end function AttackArrowRightFireDash_onUpdate() act("精密射撃可能か") if ArrowCommonFunction(ALLBODY, TRUE, TRUE) == TRUE then return elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then return else return end end function AttackArrowRightFireStep_onUpdate() act("精密射撃可能か") if ArrowCommonFunction(ALLBODY, TRUE, TRUE) == TRUE then return elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then return else return end end function NoArrow_onUpdate() if ArrowCommonFunction(ALLBODY, TRUE, TRUE) == TRUE then return elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then return else return end end function AttackCrossbowRight_Activate() SetAttackHand(HAND_RIGHT) return end function AttackCrossbowLeft_Activate() SetAttackHand(HAND_LEFT) ActivateRightArmAdd(START_FRAME_A02) return end function AttackCrossbowLeft_Update() UpdateRightArmAdd() return end function AttackCrossbowFire_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function AttackCrossbowRightStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if CrossbowCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then if env("弓矢スロット取得", 1) == 0 then if 0 < env(1108, ACTION_ARM_R1) then ExecEventHalfBlend(Event_AttackCrossbowRightLoop, blend_type) return else ExecEventHalfBlend(Event_AttackCrossbowRightFire, blend_type) return end elseif 0 < env(1108, ACTION_ARM_R2) then ExecEventHalfBlend(Event_AttackCrossbowRightLoop, blend_type) return else ExecEventHalfBlend(Event_AttackCrossbowRightFire, blend_type) return end elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowRightLoop, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowRightLoop_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if CrossbowCommonFunction(blend_type) == TRUE then return elseif env("弓矢スロット取得", 1) == 0 then if env(1108, ACTION_ARM_R1) <= 0 then ExecEventHalfBlend(Event_AttackCrossbowRightFire, blend_type) return end elseif env(1108, ACTION_ARM_R2) <= 0 then ExecEventHalfBlend(Event_AttackCrossbowRightFire, blend_type) return end if HalfBlendLowerCommonFunction(Event_AttackCrossbowRightLoop, lower_state, FALSE, TRUE) == TRUE then return else return end end function AttackCrossbowRightFire_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if CrossbowCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowRightFire, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowRightReload_Upper_onUpdate() act("4方向移動閾値設定", 60, 80, 60, 60) local blend_type, lower_state = GetHalfBlendInfo() if CrossbowCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowRightReload, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowRightEmpty_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if CrossbowCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowRightEmpty, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowLeftStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if CrossbowCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then if env("弓矢スロット取得", 1) == 0 then if 0 < env(1108, ACTION_ARM_L1) then ExecEventHalfBlend(Event_AttackCrossbowLeftLoop, blend_type) return else ExecEventHalfBlend(Event_AttackCrossbowLeftFire, blend_type) return end elseif 0 < env(1108, ACTION_ARM_L2) then ExecEventHalfBlend(Event_AttackCrossbowLeftLoop, blend_type) return else ExecEventHalfBlend(Event_AttackCrossbowLeftFire, blend_type) return end elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowLeftLoop, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowLeftLoop_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if CrossbowCommonFunction(blend_type) == TRUE then return elseif env("弓矢スロット取得", 1) == 0 then if env(1108, ACTION_ARM_L1) <= 0 then ExecEventHalfBlend(Event_AttackCrossbowLeftFire, blend_type) return end elseif env(1108, ACTION_ARM_L2) <= 0 then ExecEventHalfBlend(Event_AttackCrossbowLeftFire, blend_type) return end if HalfBlendLowerCommonFunction(Event_AttackCrossbowLeftLoop, lower_state, FALSE, TRUE) == TRUE then return else return end end function AttackCrossbowLeftFire_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if CrossbowCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowLeftFire, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowLeftReload_Upper_onUpdate() act("精密射撃可能か") act("4方向移動閾値設定", 60, 45, 60, 60) local blend_type, lower_state = GetHalfBlendInfo() if CrossbowCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowLeftReload, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowLeftEmpty_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if CrossbowCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowLeftEmpty, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowBothLeftStart_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if CrossbowCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then if env("弓矢スロット取得", 1) == 0 then if 0 < env(1108, ACTION_ARM_R1) then ExecEventHalfBlend(Event_AttackCrossbowBothLeftLoop, blend_type) return else ExecEventHalfBlend(Event_AttackCrossbowBothLeftFire, blend_type) return end elseif 0 < env(1108, ACTION_ARM_R2) then ExecEventHalfBlend(Event_AttackCrossbowBothLeftLoop, blend_type) return else ExecEventHalfBlend(Event_AttackCrossbowBothLeftFire, blend_type) return end elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowBothLeftLoop, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowBothLeftLoop_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if CrossbowCommonFunction(blend_type) == TRUE then return elseif env("弓矢スロット取得", 1) == 0 then if env(1108, ACTION_ARM_R1) <= 0 then ExecEventHalfBlend(Event_AttackCrossbowBothLeftFire, blend_type) return end elseif env(1108, ACTION_ARM_R2) <= 0 then ExecEventHalfBlend(Event_AttackCrossbowBothLeftFire, blend_type) return end if HalfBlendLowerCommonFunction(Event_AttackCrossbowBothLeftLoop, lower_state, FALSE, TRUE) == TRUE then return else return end end function AttackCrossbowBothLeftFire_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if CrossbowCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowBothLeftFire, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowBothLeftReload_Upper_onUpdate() act("精密射撃可能か") act("4方向移動閾値設定", 60, 80, 60, 60) local blend_type, lower_state = GetHalfBlendInfo() if CrossbowCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowBothLeftReload, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowBothLeftEmpty_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if CrossbowCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowBothLeftEmpty, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowBothRightStart_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if CrossbowCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then if env("弓矢スロット取得", 1) == 0 then if 0 < env(1108, ACTION_ARM_R1) then ExecEventHalfBlend(Event_AttackCrossbowBothRightLoop, blend_type) return else ExecEventHalfBlend(Event_AttackCrossbowBothRightFire, blend_type) return end elseif 0 < env(1108, ACTION_ARM_R2) then ExecEventHalfBlend(Event_AttackCrossbowBothRightLoop, blend_type) return else ExecEventHalfBlend(Event_AttackCrossbowBothRightFire, blend_type) return end elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowBothRightLoop, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowBothRightLoop_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if CrossbowCommonFunction(blend_type) == TRUE then return elseif env("弓矢スロット取得", 1) == 0 then if env(1108, ACTION_ARM_R1) <= 0 then ExecEventHalfBlend(Event_AttackCrossbowBothRightFire, blend_type) return end elseif env(1108, ACTION_ARM_R2) <= 0 then ExecEventHalfBlend(Event_AttackCrossbowBothRightFire, blend_type) return end if HalfBlendLowerCommonFunction(Event_AttackCrossbowBothRightLoop, lower_state, FALSE, TRUE) == TRUE then return else return end end function AttackCrossbowBothRightFire_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if CrossbowCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowBothRightFire, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowBothRightReload_Upper_onUpdate() act("精密射撃可能か") act("4方向移動閾値設定", 60, 80, 60, 60) local blend_type, lower_state = GetHalfBlendInfo() if CrossbowCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowBothRightReload, lower_state, FALSE, FALSE) == TRUE then return else return end end function AttackCrossbowBothRightEmpty_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if CrossbowCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_AttackCrossbowBothRightEmpty, lower_state, FALSE, FALSE) == TRUE then return else return end end function SwordArtsRight_Activate() local style = c_Style if style == HAND_LEFT_BOTH then SetAttackHand(HAND_LEFT) else SetAttackHand(HAND_RIGHT) end return end function StepInRight_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function StepInRightStart_Upper_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight2", "W_StepInRightUppercut", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight2", "W_StepInRightUppercut", FALSE, FALSE, TRUE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function StepInRightUppercut_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE, TRUE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function StepInRightSlash_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function SpinRightStart_onUpdate() if SwordArtsCommonFunction("W_AttackRightLightStep", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLightStep", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return else return end end function SpinRightSelftrans_onUpdate() if SwordArtsCommonFunction("W_AttackRightLightStep", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLightStep", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return else return end end function DrawStanceRight_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function DrawStanceRightNoSync_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function DrawStanceRightStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() local r1 = "W_DrawStanceRightAttackLight" local r2 = "W_DrawStanceRightAttackHeavy" local b1 = "W_DrawStanceRightAttackLight" local b2 = "W_DrawStanceRightAttackHeavy" if env(1116, 100530) == TRUE then r1 = "W_DrawStanceRightAttackLightR90" r2 = "W_DrawStanceRightAttackHeavyR90" b1 = "W_DrawStanceRightAttackLightR90" b2 = "W_DrawStanceRightAttackHeavyR90" elseif env(1116, 100540) == TRUE then r1 = "W_DrawStanceRightAttackLight180" r2 = "W_DrawStanceRightAttackHeavy180" b1 = "W_DrawStanceRightAttackLight180" b2 = "W_DrawStanceRightAttackHeavy180" elseif env(1116, 100550) == TRUE then r1 = "W_DrawStanceRightAttackLightL90" r2 = "W_DrawStanceRightAttackHeavyL90" b1 = "W_DrawStanceRightAttackLightL90" b2 = "W_DrawStanceRightAttackHeavyL90" end if SwordArtsStanceCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, blend_type, TRUE, TRUE, FALSE) == TRUE then return elseif env(1116, 100330) == TRUE and (env(1108, ACTION_ARM_L2) < 200 or env(1107, ACTION_ARM_L2) == TRUE) then ExecEventHalfBlend(Event_DrawStanceRightEnd, blend_type) return elseif env("アニメ終了か", 1) == TRUE then if env("装備武器特殊カテゴリ番号取得", c_SwordArtsHand) == 248 then g_LoopStanceCycles = 0 ExecEventHalfBlendNoReset(Event_DrawStanceRightLoopNoSync, blend_type) if GetVariable("LocomotionState") == 1 then ExecEvent("W_MoveNoSync") end else ExecEventHalfBlendNoReset(Event_DrawStanceRightLoop, blend_type) if GetVariable("LocomotionState") == 1 then ExecEvent("W_Move") end end return elseif HalfBlendLowerCommonFunction(Event_DrawStanceRightStart, lower_state, FALSE, FALSE) == TRUE then return else return end end function DrawStanceRightComboStartRight_onUpdate() if SwordArtsCommonFunction("W_DrawStanceRightAttackLight2", "W_DrawStanceRightAttackHeavy", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_DrawStanceRightAttackLight2", "W_DrawStanceRightAttackHeavy", FALSE, TRUE, TRUE, FALSE) == TRUE then return else return end end function DrawStanceRightComboStartLeft_onUpdate() if SwordArtsCommonFunction("W_DrawStanceRightAttackLight3", "W_DrawStanceRightAttackHeavy", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_DrawStanceRightAttackLight.", "W_DrawStanceRightAttackHeavy", FALSE, TRUE, TRUE, FALSE) == TRUE then return else return end end function DrawStanceStartDash_onUpdate() if SwordArtsCommonFunction("W_DrawStanceRightAttackLight2", "W_DrawStanceRightAttackHeavy", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_DrawStanceRightAttackLight2", "W_DrawStanceRightAttackHeavy", FALSE, TRUE, TRUE, FALSE) == TRUE then return else return end end function DrawStanceStartRolling_onUpdate() if SwordArtsCommonFunction("W_DrawStanceRightAttackLight3", "W_DrawStanceRightAttackHeavy", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_DrawStanceRightAttackLight3", "W_DrawStanceRightAttackHeavy", FALSE, TRUE, TRUE, FALSE) == TRUE then return else return end end function DrawStanceRightLoop_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end local r1 = "W_DrawStanceRightAttackLight" local r2 = "W_DrawStanceRightAttackHeavy" local b1 = "W_DrawStanceRightAttackLight" local b2 = "W_DrawStanceRightAttackHeavy" if env(1116, 100530) == TRUE then r1 = "W_DrawStanceRightAttackLightR90" r2 = "W_DrawStanceRightAttackHeavyR90" b1 = "W_DrawStanceRightAttackLightR90" b2 = "W_DrawStanceRightAttackHeavyR90" elseif env(1116, 100540) == TRUE then r1 = "W_DrawStanceRightAttackLight180" r2 = "W_DrawStanceRightAttackHeavy180" b1 = "W_DrawStanceRightAttackLight180" b2 = "W_DrawStanceRightAttackHeavy180" elseif env(1116, 100550) == TRUE then r1 = "W_DrawStanceRightAttackLightL90" r2 = "W_DrawStanceRightAttackHeavyL90" b1 = "W_DrawStanceRightAttackLightL90" b2 = "W_DrawStanceRightAttackHeavyL90" end if SwordArtsStanceCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, blend_type, TRUE, TRUE, FALSE) == TRUE then return elseif env(1108, ACTION_ARM_L2) <= 0 or env(1107, ACTION_ARM_L2) == TRUE then ExecEventHalfBlend(Event_DrawStanceRightEnd, blend_type) return else local sp_kind = env("装備武器特殊カテゴリ番号取得", c_SwordArtsHand) if sp_kind == 248 and env(1001) <= 0 then ExecEventHalfBlend(Event_DrawStanceRightEnd, blend_type) return elseif HalfBlendLowerCommonFunction(Event_DrawStanceRightLoop, lower_state, FALSE, TRUE) == TRUE then return else return end end end function DrawStanceRightLoopNoSync_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end local r1 = "W_DrawStanceRightAttackLight" local r2 = "W_DrawStanceRightAttackHeavy" local b1 = "W_DrawStanceRightAttackLight" local b2 = "W_DrawStanceRightAttackHeavy" if env(1116, 100530) == TRUE then r1 = "W_DrawStanceRightAttackLightR90" r2 = "W_DrawStanceRightAttackHeavyR90" b1 = "W_DrawStanceRightAttackLightR90" b2 = "W_DrawStanceRightAttackHeavyR90" elseif env(1116, 100540) == TRUE then r1 = "W_DrawStanceRightAttackLight180" r2 = "W_DrawStanceRightAttackHeavy180" b1 = "W_DrawStanceRightAttackLight180" b2 = "W_DrawStanceRightAttackHeavy180" elseif env(1116, 100550) == TRUE then r1 = "W_DrawStanceRightAttackLightL90" r2 = "W_DrawStanceRightAttackHeavyL90" b1 = "W_DrawStanceRightAttackLightL90" b2 = "W_DrawStanceRightAttackHeavyL90" end if SwordArtsStanceCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, blend_type, TRUE, TRUE, FALSE) == TRUE then return elseif env(1108, ACTION_ARM_L2) <= 0 or env(1107, ACTION_ARM_L2) == TRUE then ExecEventHalfBlend(Event_DrawStanceRightEnd, blend_type) return end local sp_kind = env("装備武器特殊カテゴリ番号取得", c_SwordArtsHand) if sp_kind == 248 then if env(1001) <= 0 then ExecEventHalfBlend(Event_DrawStanceRightEnd, blend_type) return elseif env(301, 0) == TRUE and 5 < g_FrameCount - g_LoopStanceLastCycle then if 1 <= g_LoopStanceCycles then g_LoopStanceCycles = 0 ExecEventHalfBlend(Event_DrawStanceRightLoopMaxNoSync, blend_type) return end g_LoopStanceCycles = g_LoopStanceCycles + 1 g_LoopStanceLastCycle = g_FrameCount end end if HalfBlendLowerCommonFunctionNoSync(Event_DrawStanceRightLoopNoSync, lower_state, FALSE, TRUE) == TRUE then return else return end end function DrawStanceRightLoopMaxNoSync_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end local r1 = "W_DrawStanceRightAttackMaxLight" local r2 = "W_DrawStanceRightAttackMaxHeavy" local b1 = "W_DrawStanceRightAttackMaxLight" local b2 = "W_DrawStanceRightAttackMaxHeavy" if env(1116, 100530) == TRUE then r1 = "W_DrawStanceRightAttackMaxLightR90" r2 = "W_DrawStanceRightAttackMaxHeavyR90" b1 = "W_DrawStanceRightAttackMaxLightR90" b2 = "W_DrawStanceRightAttackMaxHeavyR90" elseif env(1116, 100540) == TRUE then r1 = "W_DrawStanceRightAttackMaxLight180" r2 = "W_DrawStanceRightAttackMaxHeavy180" b1 = "W_DrawStanceRightAttackMaxLight180" b2 = "W_DrawStanceRightAttackMaxHeavy180" elseif env(1116, 100550) == TRUE then r1 = "W_DrawStanceRightAttackMaxLightL90" r2 = "W_DrawStanceRightAttackMaxHeavyL90" b1 = "W_DrawStanceRightAttackMaxLightL90" b2 = "W_DrawStanceRightAttackMaxHeavyL90" end if SwordArtsStanceCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, blend_type, TRUE, TRUE, FALSE) == TRUE then return elseif env(1108, ACTION_ARM_L2) <= 0 or env(1107, ACTION_ARM_L2) == TRUE then ExecEventHalfBlend(Event_DrawStanceRightEnd, blend_type) return else local sp_kind = env("装備武器特殊カテゴリ番号取得", c_SwordArtsHand) if sp_kind == 248 and env(1001) <= 0 then ExecEventHalfBlend(Event_DrawStanceRightEnd, blend_type) return elseif HalfBlendLowerCommonFunctionNoSync(Event_DrawStanceRightLoopMaxNoSync, lower_state, FALSE, TRUE) == TRUE then return else return end end end function DrawStanceRightEnd_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if SwordArtsStanceCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", blend_type, FALSE, FALSE, TRUE) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) return elseif HalfBlendLowerCommonFunction(Event_DrawStanceRightEnd, lower_state, FALSE, FALSE) == TRUE then return else return end end function DrawStanceRightAttackLight_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style local is_artsr1 = FALSE local is_artsr2 = FALSE if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if env(225, hand) == WEAPON_CATEGORY_STRAIGHT_SWORD then r1 = "W_AttackRightLight2" r2 = "W_AttackRightHeavy2Start" b1 = "W_AttackBothLight2" b2 = "W_AttackBothHeavy2Start" end if sp_kind == 232 then r1 = "W_DrawStanceRightAttackLight2" b1 = "W_DrawStanceRightAttackLight2" is_artsr1 = TRUE elseif sp_kind == 251 or sp_kind == 256 then r1 = "W_DrawStanceRightAttackLight2" b1 = "W_DrawStanceRightAttackLight2" r2 = "W_AttackRightHeavy2Start" b2 = "W_AttackBothHeavy2Start" is_artsr1 = TRUE end if sp_kind ~= 248 and 0 < env(1108, ACTION_ARM_L2) then r2 = "W_DrawStanceRightAttackHeavy" b2 = "W_DrawStanceRightAttackHeavy" is_artsr2 = TRUE end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackLightR90_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style local is_artsr1 = FALSE local is_artsr2 = FALSE if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackLight180_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style local is_artsr1 = FALSE local is_artsr2 = FALSE if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackLightL90_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style local is_artsr1 = FALSE local is_artsr2 = FALSE if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackMaxLight_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style local is_artsr1 = FALSE local is_artsr2 = FALSE if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if env(225, hand) == WEAPON_CATEGORY_STRAIGHT_SWORD then r1 = "W_AttackRightLight2" r2 = "W_AttackRightHeavy2Start" b1 = "W_AttackBothLight2" b2 = "W_AttackBothHeavy2Start" end if sp_kind == 232 then r1 = "W_DrawStanceRightAttackLight2" b1 = "W_DrawStanceRightAttackLight2" is_artsr1 = TRUE elseif sp_kind == 251 or sp_kind == 256 then r1 = "W_DrawStanceRightAttackLight2" b1 = "W_DrawStanceRightAttackLight2" r2 = "W_AttackRightHeavy2Start" b2 = "W_AttackBothHeavy2Start" is_artsr1 = TRUE end if sp_kind ~= 248 and 0 < env(1108, ACTION_ARM_L2) then r2 = "W_DrawStanceRightAttackHeavy" b2 = "W_DrawStanceRightAttackHeavy" is_artsr2 = TRUE end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackMaxLightR90_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style local is_artsr1 = FALSE local is_artsr2 = FALSE if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackMaxLight180_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style local is_artsr1 = FALSE local is_artsr2 = FALSE if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackLight2_onUpdate() local r1 = "W_DrawStanceRightAttackLight3" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_DrawStanceRightAttackLight3" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style local is_artsr1 = TRUE local is_artsr2 = FALSE if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if env(225, hand) == WEAPON_CATEGORY_STRAIGHT_SWORD then r2 = "W_AttackRightHeavy2Start" b2 = "W_AttackBothHeavy2Start" end if 0 < env(1108, ACTION_ARM_L2) then r2 = "W_DrawStanceRightAttackHeavy" b2 = "W_DrawStanceRightAttackHeavy" is_artsr2 = TRUE end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackLight3_onUpdate() local r1 = "W_DrawStanceRightAttackLight2" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_DrawStanceRightAttackLight2" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style local is_artsr1 = TRUE local is_artsr2 = FALSE local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if env(225, hand) == WEAPON_CATEGORY_STRAIGHT_SWORD then r2 = "W_AttackRightHeavy2Start" b2 = "W_AttackBothHeavy2Start" end if sp_kind == 251 then r1 = "W_DrawStanceRightAttackLight" b1 = "W_DrawStanceRightAttackLight" end if 0 < env(1108, ACTION_ARM_L2) then r2 = "W_DrawStanceRightAttackHeavy" b2 = "W_DrawStanceRightAttackHeavy" is_artsr2 = TRUE end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackHeavy_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local is_artsr1 = FALSE local is_artsr2 = FALSE local hand = HAND_RIGHT local style = c_Style if env(1116, 100250) == TRUE then r2 = "W_DrawStanceRightAttackHeavy2" b2 = "W_DrawStanceRightAttackHeavy2" is_artsr2 = TRUE elseif env(1116, 100680) == TRUE then r2 = "W_DrawStanceRightAttackHeavy" b2 = "W_DrawStanceRightAttackHeavy" is_artsr2 = TRUE elseif env(225, hand) == WEAPON_CATEGORY_STRAIGHT_SWORD then r2 = "W_AttackRightHeavy2Start" b2 = "W_AttackBothHeavy2Start" else r2 = "W_AttackRightHeavy1Start" b2 = "W_AttackBothHeavy1Start" end local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if 0 < env(1108, ACTION_ARM_L2) then if sp_kind == 232 or sp_kind == 256 then r1 = "W_DrawStanceRightAttackLight2" b1 = "W_DrawStanceRightAttackLight2" is_artsr1 = TRUE elseif sp_kind ~= 248 then r1 = "W_DrawStanceRightAttackLight" b1 = "W_DrawStanceRightAttackLight" is_artsr1 = TRUE end end if env(1116, 100700) == TRUE then r1 = "W_DrawStanceRightAttackLight" b1 = "W_DrawStanceRightAttackLight" r2 = nil b2 = nil is_artsr1 = TRUE end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env(1116, 100450) == TRUE then ExecEventAllBody("W_DrawStanceRightAttackHeavyLoop") SetSwordArtsPointInfo(ACTION_ARM_R2, TRUE) return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackHeavyR90_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local is_artsr1 = FALSE local is_artsr2 = FALSE if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackHeavy180_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local is_artsr1 = FALSE local is_artsr2 = FALSE if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackHeavyl90_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local is_artsr1 = FALSE local is_artsr2 = FALSE if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackMaxHeavy_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local is_artsr1 = FALSE local is_artsr2 = FALSE local hand = HAND_RIGHT local style = c_Style if env(1116, 100250) == TRUE then r2 = "W_DrawStanceRightAttackHeavy" b2 = "W_DrawStanceRightAttackHeavy" is_artsr2 = TRUE elseif env(225, hand) == WEAPON_CATEGORY_STRAIGHT_SWORD then r2 = "W_AttackRightHeavy2Start" b2 = "W_AttackBothHeavy2Start" else r2 = "W_AttackRightHeavy1Start" b2 = "W_AttackBothHeavy1Start" end local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if 0 < env(1108, ACTION_ARM_L2) then if sp_kind == 232 then r1 = "W_DrawStanceRightAttackLight2" b1 = "W_DrawStanceRightAttackLight2" is_artsr1 = TRUE elseif sp_kind ~= 248 then r1 = "W_DrawStanceRightAttackLight" b1 = "W_DrawStanceRightAttackLight" end end if env(1116, 100700) == TRUE then r1 = "W_DrawStanceRightAttackLight" b1 = "W_DrawStanceRightAttackLight" r2 = nil b2 = nil is_artsr1 = TRUE end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env(1116, 100450) == TRUE then ExecEventAllBody("W_DrawStanceRightAttackHeavyLoop") SetSwordArtsPointInfo(ACTION_ARM_R2, TRUE) return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackMaxHeavyR90_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local is_artsr1 = FALSE local is_artsr2 = FALSE if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackMaxHeavy180_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local is_artsr1 = FALSE local is_artsr2 = FALSE if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackHeavyLoop_onUpdate() local local0, local1, local2 = nil if SwordArtsCommonFunction("W_DrawStanceRightAttackLight", local0, local1, local2, "W_DrawStanceRightAttackLight", nil, FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env(1108, ACTION_ARM_R2) <= 0 then ExecEventAllBody("W_DrawStanceRightAttackHeavyLoopEnd") return else return end end function DrawStanceRightAttackHeavyLoopEnd_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" if env(1116, 100420) == TRUE then if 0 < env(1108, ACTION_ARM_L2) then r1 = "W_DrawStanceRightAttackLight" b1 = "W_DrawStanceRightAttackLight" is_artsr1 = TRUE else r1, r2, b1, b2 = nil end end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightAttackHeavy2_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_DrawStanceRightAttackHeavy" local b1 = "W_AttackBothLight1" local b2 = "W_DrawStanceRightAttackHeavy" local hand = HAND_RIGHT local style = c_Style local is_artsr1 = FALSE local is_artsr2 = TRUE if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if 0 < env(1108, ACTION_ARM_L2) then if sp_kind == 256 then r1 = "W_DrawStanceRightAttackLight3" b1 = "W_DrawStanceRightAttackLight3" is_artsr1 = TRUE else r1 = "W_DrawStanceRightAttackLight" b1 = "W_DrawStanceRightAttackLight" is_artsr1 = TRUE end end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, is_artsr2, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function DrawStanceRightHeavyLoopGuard_onUpdate() local local0, local1, local2 = nil if SwordArtsCommonFunction("W_DrawStanceRightAttackLight", local0, local1, local2, "W_DrawStanceRightAttackLight", nil, FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env(301, 0) == TRUE then if env(301, 1) == TRUE then if 0 <= env(1108, ACTION_ARM_R2) then ExecEventAllBody("W_DrawStanceRightAttackHeavyLoop") SetSwordArtsPointInfo(ACTION_ARM_R2, TRUE) return end elseif env(1108, ACTION_ARM_R2) <= 0 then ExecEventAllBody("W_DrawStanceRightAttackHeavyLoopEnd") return end end return end function FourWayDrawStanceRightStart_onUpdate() local rolling_angle = GetVariable("CircleStepAngle") local addratio = 0.300000011920929 local endratio = 1 act(2001, math.abs(1 + addratio * math.abs(math.sin(math.rad(2 * rolling_angle))))) if SwordArtsStanceCommonFunction("W_DrawStanceRightAttackLight", "W_DrawStanceRightAttackHeavy", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_DrawStanceRightAttackLight", "W_DrawStanceRightAttackHeavy", blend_type, TRUE, TRUE, FALSE) == TRUE then return elseif env(1116, 100330) == TRUE then if env(1108, ACTION_ARM_L2) < 200 or env(1107, ACTION_ARM_L2) == TRUE then ExecEventHalfBlend(Event_DrawStanceRightEnd, ALLBODY) return end ExecEventHalfBlend(Event_DrawStanceRightLoop, ALLBODY) end if env("アニメ終了か", 1) == TRUE then ExecEventHalfBlendNoReset(Event_DrawStanceRightLoop, ALLBODY) return else return end end function StrongBashRight_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function ParryRightStart_onUpdate() if SwordArtsParryCommonFunction() == TRUE then return else return end end function ParryRightStart_WepBreak_onUpdate() if SwordArtsParryCommonFunction() == TRUE then return else return end end function ChainShotRight_Upper_Activate() if c_Style == HAND_LEFT_BOTH then SetAttackHand(HAND_LEFT) else SetAttackHand(HAND_RIGHT) end return end function ChainShotRightStart_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if ArrowCommonFunction(blend_type, FALSE, FALSE) == TRUE then return end local request = GetAttackRequest(FALSE) if request == ATTACK_REQUEST_ARROW_FIRE_RIGHT or request == ATTACK_REQUEST_ARROW_FIRE_RIGHT2 then if IsExistArrow() == TRUE then ExecEventAllBody("W_NoArrow") return elseif 0 < env(1001) then if c_SwordArtsID == SWORDARTS_WIDESHOT then if 2 < env("矢の残弾数取得", c_SwordArtsHand) then SetSwordArtsPointInfo(ACTION_ARM_R1, TRUE) ExecEventAllBody("W_ChainShotRightFire") return else ExecEventAllBody("W_NoArrow") return end else SetSwordArtsPointInfo(ACTION_ARM_R1, TRUE) ExecEventAllBody("W_ChainShotRightFire") return end end end if env(301, 0) == TRUE and (env(1108, ACTION_ARM_L2) < 400 or env(1107, ACTION_ARM_L2) == TRUE) then ExecEventHalfBlend(Event_ChainShotRightEnd, blend_type) if lower_state == LOWER_MOVE then ExecEventHalfBlendNoReset(Event_Move, LOWER) end return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlend(Event_ChainShotRightLoop, blend_type) return elseif HalfBlendLowerCommonFunction(Event_ChainShotRightStartMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function ChainShotRightLoop_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if ArrowCommonFunction(blend_type, FALSE, FALSE) == TRUE then return end local request = GetAttackRequest(FALSE) if request == ATTACK_REQUEST_ARROW_FIRE_RIGHT or request == ATTACK_REQUEST_ARROW_FIRE_RIGHT2 then if IsExistArrow() == TRUE then ExecEventAllBody("W_NoArrow") return elseif 0 < env(1001) and 0 < env(1001) then if c_SwordArtsID == SWORDARTS_WIDESHOT then if 2 < env("矢の残弾数取得", c_SwordArtsHand) then SetSwordArtsPointInfo(ACTION_ARM_R1, TRUE) ExecEventAllBody("W_ChainShotRightFire") return else ExecEventAllBody("W_NoArrow") return end end SetSwordArtsPointInfo(ACTION_ARM_R1, TRUE) ExecEventAllBody("W_ChainShotRightFire") end end if env(1108, ACTION_ARM_L2) <= 0 or env(1107, ACTION_ARM_L2) == TRUE then ExecEventHalfBlend(Event_ChainShotRightEnd, blend_type) return elseif HalfBlendLowerCommonFunction(Event_ChainShotRightLoop, lower_state, FALSE, TRUE) == TRUE then return else return end end function ChainShot_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function ChainShotRightFire_onUpdate() act("精密射撃可能か") if ArrowCommonFunction(ALLBODY, TRUE, FALSE) == TRUE then return elseif c_SwordArtsID == SWORDARTS_CHAINSHOT then local request = GetAttackRequest(FALSE) if request == ATTACK_REQUEST_ARROW_FIRE_RIGHT or request == ATTACK_REQUEST_ARROW_FIRE_RIGHT2 then if IsExistArrow() == TRUE then ExecEventAllBody("W_NoArrow") return elseif 0 < env(1001) then SetSwordArtsPointInfo(ACTION_ARM_R1, TRUE) ExecEventAllBody("W_ChainShotRightFireCont") return end end end if env(301, 0) == TRUE and 0 < env(1108, ACTION_ARM_L2) then local blend_type = ALLBODY if MoveStart(LOWER, Event_Move, FALSE) == TRUE then blend_type = UPPER end ExecEventHalfBlendNoReset(Event_ChainShotRightLoop, blend_type) return elseif MoveStartonCancelTiming(Event_Move, FALSE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlend(Event_ChainShotRightEnd, ALLBODY) return else return end end function ChainShotRightFireCont_onUpdate() ChainShotRightFire_onUpdate() return end function ChainShotRightEnd_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if ArrowCommonFunction(blend_type, FALSE, TRUE) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ChainShotRightEnd, lower_state, TRUE, FALSE) == TRUE then return else return end end function StampedeRight_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function StampedeRightStart_onUpdate() if SwordArtsCommonFunction("W_StampedeRightAttackLight", "W_StampedeRightAttackHeavy", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_StampedeRightAttackLight", "W_StampedeRightAttackHeavy", FALSE, TRUE, TRUE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function StampedeRightAttackLight_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function StampedeRightAttackHeavy_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function SpecialAttackRight_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function SpecialAttackRightStart_onUpdate() if SwordArtsCommonFunction("W_SpecialAttackRighLight", "W_SpecialAttackRightHeavy", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_SpecialAttackRightLight", "W_SpecialAttackRightHeavy", FALSE, TRUE, TRUE, GEN_TRANS_LEFT) == TRUE then return else return end end function SpecialAttackRightLight_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return else return end end function SpecialAttackRightHeavy_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return else return end end function AttackSpinStart_Upper_onUpdate() local r1 = "W_AttackRightLight2" local r2 = "W_AttackSpinHeavy" local b1 = "W_AttackBothLight2" local b2 = "W_AttackSpinHeavy" local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local kind = env(225, hand) if kind == WEAPON_CATEGORY_CURVEDSWORD then local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if sp_kind ~= 51 and sp_kind ~= 101 and sp_kind ~= 137 and sp_kind ~= 139 and sp_kind ~= 195 then r1 = "W_AttackRightLight1" b1 = "W_AttackBothLight1" end end if env(301, 0) == FALSE then r2 = "W_AttackRightHeavy2Start" b2 = "W_AttackBothHeavy2Start" if kind == WEAPON_CATEGORY_CURVEDSWORD then local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if sp_kind ~= 51 and sp_kind ~= 101 and sp_kind ~= 137 and sp_kind ~= 139 and sp_kind ~= 195 then r2 = "W_AttackRightHeavy1Start" b2 = "W_AttackBothHeavy1Start" end end end if env(1116, 100570) == TRUE then r1 = "W_AttackSpinLight" b1 = "W_AttackSpinLight" end if env(1116, 100440) == TRUE then act(2001, 1.20000004768372) end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight2", "W_AttackLeftHeavy1", b1, b2, FALSE, TRUE, TRUE, GEN_TRANS_LEFT) == TRUE then act(2001, 1) return elseif env(1116, 100590) == TRUE and 0 < env(1108, ACTION_ARM_R2) and 0 < env(1001) then SetSwordArtsPointInfo(ACTION_ARM_R2, TRUE) ExecEventAllBody("W_AttackSpinLoop") return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") act(2001, 1) return else return end end function SpinAttack_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function AttackSpinLight_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function AttackSpinHeavy_onUpdate() local r1 = "W_AttackRightLight2" local r2 = "W_AttackRightHeavy2Start" local b1 = "W_AttackBothLight2" local b2 = "W_AttackBothHeavy2Start" local is_artsr1 = FALSE local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local kind = env(225, hand) if kind == WEAPON_CATEGORY_CURVEDSWORD then local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if sp_kind ~= 51 and sp_kind ~= 137 and sp_kind ~= 139 and sp_kind ~= 166 and sp_kind ~= 195 then r1 = "W_AttackRightLight1" r2 = "W_AttackRightHeavy1Start" if sp_kind ~= 0 and sp_kind ~= 212 then b1 = "W_AttackBothLight1" b2 = "W_AttackBothHeavy1Start" end end end if 0 < env(1001) and env(1116, 100570) == TRUE then r1 = "W_AttackSpinLight" b1 = "W_AttackSpinLight" is_artsr1 = TRUE end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env(1116, 100240) == TRUE and 0 < env(1108, ACTION_ARM_R2) and 0 < env(1001) then SetSwordArtsPointInfo(ACTION_ARM_R2, TRUE) ExecEventAllBody("W_AttackSpinLoop") return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function AttackSpinHeavyL_onUpdate() local r1 = "W_AttackRightLight2" local r2 = "W_AttackRightHeavy2Start" local b1 = "W_AttackBothLight2" local b2 = "W_AttackBothHeavy2Start" local is_artsr1 = FALSE local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local kind = env(225, hand) if kind == WEAPON_CATEGORY_CURVEDSWORD then local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if sp_kind ~= 51 and sp_kind ~= 137 and sp_kind ~= 139 and sp_kind ~= 166 and sp_kind ~= 195 then r1 = "W_AttackRightLight1" r2 = "W_AttackRightHeavy1Start" if sp_kind ~= 0 and sp_kind ~= 212 then b1 = "W_AttackBothLight1" b2 = "W_AttackBothHeavy1Start" end end end if 0 < env(1001) and env(1116, 100570) == TRUE then r1 = "W_AttackSpinLight" b1 = "W_AttackSpinLight" is_artsr1 = TRUE end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, is_artsr1, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env(1116, 100240) == TRUE and 0 < env(1108, ACTION_ARM_R2) and 0 < env(1001) then SetSwordArtsPointInfo(ACTION_ARM_R2, TRUE) ExecEventAllBody("W_AttackSpinLoop") return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function AttackSpinLoop_onUpdate() local r1 = "W_AttackRightLight2" local b1 = "W_AttackBothLight2" local is_artsr1 = FALSE if 0 < env(1001) and env(1116, 100570) == TRUE then r1 = "W_AttackSpinLight" b1 = "W_AttackSpinLight" is_artsr1 = TRUE end if SwordArtsCommonFunction(r1, "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, "W_AttackBothHeavy2Start", FALSE, is_artsr1, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env(1116, 100240) == TRUE and 0 < env(1108, ACTION_ARM_R2) and 0 < env(1001) then SetSwordArtsPointInfo(ACTION_ARM_R2, TRUE) ExecEventAllBody("W_AttackSpinLoop") return elseif env(1116, 100590) == TRUE and 0 < env(1108, ACTION_ARM_R2) then if 0 < env(1001) then SetSwordArtsPointInfo(ACTION_ARM_R2, TRUE) ExecEventAllBody("W_AttackSpinLoop") return else ExecEventAllBody("W_AttackSpinHeavy") return end elseif env(1116, 100600) == TRUE then local sp_kind = env("装備武器特殊カテゴリ番号取得", c_SwordArtsHand) if env(1108, ACTION_ARM_R2) <= 0 then if sp_kind == 264 and ForwardLeg() == 1 then ExecEventAllBody("W_AttackSpinHeavyL") return else ExecEventAllBody("W_AttackSpinHeavy") return end end end if env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function AttackSpinLoopEnd_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight2", "W_AttackRightHeavy2Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight2", "W_AttackBothHeavy2Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function Charge_Upper_onUpdate() local r2 = "W_AttackRightHeavy1Start" local l2 = "W_AttackLeftHeavy1" local b2 = "W_AttackBothHeavy1Start" local is_artsr1 = FALSE local is_artsr2 = FALSE if env(1116, 100260) == TRUE then r2 = "W_ChargeContinue" l2 = "W_ChargeContinue" b2 = "W_ChargeContinue" is_artsr2 = TRUE end if SwordArtsCommonFunction("W_AttackRightLight1", r2, "W_AttackLeftLight1", l2, "W_AttackBothLight1", b2, is_artsr1, is_artsr2, TRUE, GEN_TRANS_LFET) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function Charge_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function ChargeContinue_onUpdate() local r2 = "W_AttackRightHeavy1Start" local l2 = "W_AttackLeftHeavy1" local b2 = "W_AttackBothHeavy1Start" local is_artsr1 = FALSE local is_artsr2 = FALSE if env(1116, 100260) == TRUE then r2 = "W_ChargeContinue" l2 = "W_ChargeContinue" b2 = "W_ChargeContinue" is_artsr2 = TRUE end if env(1116, 100610) == TRUE then r2 = "W_ChargeContinue2" l2 = "W_ChargeContinue2" b2 = "W_ChargeContinue2" is_artsr2 = TRUE end if SwordArtsCommonFunction("W_AttackRightLight1", r2, "W_AttackLeftLight1", l2, "W_AttackBothLight1", b2, is_artsr1, is_artsr2, TRUE, GEN_TRANS_LFET) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function ChargeContinue2_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function Warcry_onUpdate() local r2 = "W_AttackRightHeavySpecial1Start" local b2 = "W_AttackBothHeavySpecial1Start" local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end if env("装備武器特殊カテゴリ番号取得", hand) == 242 then r2 = "W_AttackRightHeavy1Start" b2 = "W_AttackBothHeavy1Start" end if SwordArtsCommonFunction(g_r1, r2, g_l1, g_l2, g_b1, b2, FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env(1116, 100460) == TRUE and env(1108, ACTION_ARM_L2) <= 0 then ExecEventAllBody("W_WarcryCancel") return elseif env("アニメ終了か", 1) == TRUE then ExecEventAllBody("W_Idle") return else return end end function WarcryCancel_onUpdate() if SwordArtsCommonFunction(g_r1, "W_AttackRightHeavySpecial1Start", g_l1, g_l2, g_b1, "W_AttackBothHeavySpecial1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventAllBody("W_Idle") return else return end end function Endure_Upper_onUpdate() local r2 = "W_AttackRightHeavy1Start" local l2 = "W_AttackLeftHeavy1" local b2 = "W_AttackBothHeavy1Start" if env(1116, 100290) == TRUE then r2 = "W_EndureRightHeavy" l2 = "W_EndureRightHeavy" b2 = "W_EndureRightHeavy" SetSwordArtsPointInfo(ACTION_ARM_R2, TRUE) end if SwordArtsCommonFunction("W_AttackRightLight1", r2, "W_AttackLeftLight1", l2, "W_AttackBothLight1", b2, FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function EndureRightHeavy_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, FALSE) == TRUE then return else return end end function OneShotNoGenTrans_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function OneShotNoGenTransStart_onUpdate() local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" local hand = HAND_RIGHT local style = c_Style if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) if env(1116, 100250) == TRUE then SetSwordArtsPointInfo(ACTION_ARM_R2, TRUE) r2 = "W_OneShotNoGenTransContinue" b2 = "W_OneShotNoGenTransContinue" end if sp_kind == 247 then r1 = "W_AttackRightLight2" b1 = "W_AttackBothLight2" end if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, FALSE, FALSE, FALSE) == TRUE then return else return end end function OneShotNoGenTransContinue_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, FALSE) == TRUE then return else return end end function MagicBuffRight_Upper_Activate() local style = c_Style if style == HAND_LEFT_BOTH then SetAttackHand(HAND_LEFT) else SetAttackHand(HAND_RIGHT) end return end function MagicBuffRight_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, FALSE) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_MagicBuffRightMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicBuffRight2_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, FALSE) == TRUE then return else return end end function MagicBuffRight3_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, FALSE) == TRUE then return else return end end function CircleStepStart_onUpdate() local rolling_angle = GetVariable("CircleStepAngle") local addratio = 0.300000011920929 local endratio = 1 act(2001, math.abs(1 + addratio * math.abs(math.sin(math.rad(2 * rolling_angle))))) if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE) == TRUE then return else return end end function CircleStepStartSelftrans_onUpdate() local rolling_angle = GetVariable("CircleStepAngleSelftrans") local addratio = 0.300000011920929 local endratio = 1 act(2001, math.abs(1 + addratio * math.abs(math.sin(math.rad(2 * rolling_angle))))) if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE) == TRUE then return else return end end function ChargeShotRight_Upper_Activate() SetInterruptType(INTERRUPT_FINDATTACK) local style = c_Style if style == HAND_LEFT_BOTH then SetAttackHand(HAND_LEFT) else SetAttackHand(HAND_RIGHT) end return end function ChargeShotRightStart_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if SwordArtsChargeShotCommonFunction(blend_type) == TRUE then return else local request = GetAttackRequest(FALSE) if (request == ATTACK_REQUEST_ARROW_FIRE_RIGHT or request == ATTACK_REQUEST_ARROW_FIRE_RIGHT2) and 0 < env(1001) then if IsExistArrow() == TRUE then ExecEventAllBody("W_NoArrow") return else SetSwordArtsPointInfo(ACTION_ARM_R1, TRUE) ExecEventHalfBlend(Event_ChargeShotRightHoldStart, ALLBODY) return end elseif env(301, 0) == TRUE and env(1108, ACTION_ARM_L2) <= 0 then ExecEventHalfBlend(Event_ChargeShotRightEnd, ALLBODY) return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlend(Event_ChargeShotRightLoop, ALLBODY) return else return end end end function ChargeShotRightLoop_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if SwordArtsChargeShotCommonFunction(blend_type) == TRUE then return elseif env(1108, ACTION_ARM_L2) <= 0 then ExecEventHalfBlend(Event_ChargeShotRightEnd, ALLBODY) return else local request = GetAttackRequest(FALSE) if (request == ATTACK_REQUEST_ARROW_FIRE_RIGHT or request == ATTACK_REQUEST_ARROW_FIRE_RIGHT2) and 0 < env(1001) then if IsExistArrow() == TRUE then ExecEventAllBody("W_NoArrow") return else SetSwordArtsPointInfo(ACTION_ARM_R1, TRUE) ExecEventHalfBlend(Event_ChargeShotRightHoldStart, ALLBODY) return end elseif HalfBlendLowerCommonFunction(Event_ChargeShotRightLoop, lower_state, FALSE, FALSE) == TRUE then return else return end end end function ChargeShotRightHoldStart_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if SwordArtsChargeShotCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then if env("弓矢スロット取得", 0) == 0 then if env(1108, ACTION_ARM_R1) <= 0 then ExecEventAllBody("W_ChargeShotRightFire") return end elseif env(1108, ACTION_ARM_R2) <= 0 then ExecEventAllBody("W_ChargeShotRightFire") return end ExecEventHalfBlend(Event_ChargeShotRightHoldLoop, ALLBODY) return elseif HalfBlendLowerCommonFunction(Event_ChargeShotRightHoldStart, lower_state, FALSE, FALSE) == TRUE then return else return end end function ChargeShotRightHoldLoop_Upper_onUpdate() act("精密射撃可能か") local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if SwordArtsChargeShotCommonFunction(blend_type) == TRUE then return elseif env("弓矢スロット取得", 0) == 0 then if env(1108, ACTION_ARM_R1) <= 0 then ExecEventAllBody("W_ChargeShotRightFire") return end elseif env(1108, ACTION_ARM_R2) <= 0 then ExecEventAllBody("W_ChargeShotRightFire") return end if HalfBlendLowerCommonFunction(Event_ChargeShotRightHoldLoop, lower_state, FALSE, FALSE) == TRUE then return else return end end function ChargeShotRightEnd_Upper_onUpdate() act("精密射撃可能か") if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventAllBody("W_Idle") return else return end end function ChargeShotFire_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function ChargeShotRightFire_onUpdate() act("精密射撃可能か") if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventAllBody("W_Idle") return else return end end function CrossbowStepInRightStart_Upper_onUpdate() act("精密射撃可能か") if SwordArtsCrossbowStepInFunction() == TRUE then return end local request = GetAttackRequest(FALSE) if 0 < env(1001) then if request == ATTACK_REQUEST_RIGHT_CROSSBOW or request == ATTACK_REQUEST_RIGHT_CROSSBOW2 then if IsExistBolt(HAND_RIGHT) == TRUE then ExecEventHalfBlend(Event_AttackCrossbowRightEmpty, ALLBODY) return elseif env("ボルト装填状態取得", 1) == TRUE then ExecEventAllBody("W_CrossbowStepInFire") return else ExecEventAllBody("W_CrossbowStepInReload") return end elseif request == ATTACK_REQUEST_BOTHRIGHT_CROSSBOW or request == ATTACK_REQUEST_BOTHRIGHT_CROSSBOW2 then if IsExistBolt(HAND_RIGHT) == TRUE then ExecEventHalfBlend(Event_AttackCrossbowBothRightEmpty, ALLBODY) return elseif env("ボルト装填状態取得", 1) == TRUE then ExecEventAllBody("W_CrossbowStepInFire") return else ExecEventAllBody("W_CrossbowStepInReload") return end end end if env("アニメ終了か", 1) == TRUE then ExecEventAllBody("W_Idle") return else return end end function CrossbowStepInFire_onUpdate() act("精密射撃可能か") if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventAllBody("W_Idle") return else return end end function CrossbowStepInReload_onUpdate() act("精密射撃可能か") if AttackCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventAllBody("W_Idle") return else return end end function HeadHunt_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function HeadHunt_Upper_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE, TRUE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function OneShot_Upper_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function OneShot_Upper_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE, TRUE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function OneShotFull_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function OneShotFullRightStart_onUpdate() SetVariable("IndexThrowHand", HAND_RIGHT) if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE, TRUE, FALSE) == TRUE then return else return end end function OneShotFullBothStart_onUpdate() SetVariable("IndexThrowHand", HAND_RIGHT) if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE, TRUE, FALSE) == TRUE then return else return end end function RandomOneShot1_onUpdate() local r2 = "W_RandomOneShotNext1" local b2 = "W_RandomOneShotNext1" local rand = math.random(0, 100) local next3active = env(1116, 130092600) local next4active = env(1116, 130092632) local ignorenext4 = env(1116, 18000) if next3active == TRUE and next4active == TRUE then r2 = "W_RandomOneShotNext1" b2 = "W_RandomOneShotNext1" elseif next3active == TRUE then if ignorenext4 == TRUE then r2 = "W_RandomOneShotNext1" b2 = "W_RandomOneShotNext1" elseif 50 < rand then r2 = "W_RandomOneShotNext1" b2 = "W_RandomOneShotNext1" else r2 = "W_RandomOneShotNext4" b2 = "W_RandomOneShotNext4" end elseif next4active == TRUE then if 50 < rand then r2 = "W_RandomOneShotNext1" b2 = "W_RandomOneShotNext1" else r2 = "W_RandomOneShotNext3" b2 = "W_RandomOneShotNext3" end elseif ignorenext4 == TRUE then if 50 < rand then r2 = "W_RandomOneShotNext1" b2 = "W_RandomOneShotNext1" else r2 = "W_RandomOneShotNext3" b2 = "W_RandomOneShotNext3" end elseif 66 < rand then r2 = "W_RandomOneShotNext4" b2 = "W_RandomOneShotNext4" elseif 33 < rand then r2 = "W_RandomOneShotNext3" b2 = "W_RandomOneShotNext3" else r2 = "W_RandomOneShotNext1" b2 = "W_RandomOneShotNext1" end if SwordArtsCommonFunction("W_AttackRightLight1", r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", b2, FALSE, TRUE, TRUE, FALSE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function RandomOneShotNext1_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE, TRUE, FALSE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEvent("W_Idle") return else return end end function RandomOneShotNext2_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, TRUE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(FALSE, TRUE) ExecEvent("W_Idle") return else return end end function RandomOneShotNext3_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, TRUE, FALSE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEvent("W_Idle") return else return end end function RandomOneShotNext4_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, TRUE, FALSE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEvent("W_Idle") return else return end end function SwordArtsLeft_Activate() SetAttackHand(HAND_LEFT) return end function ParryLeftStart_onUpdate() if SwordArtsParryCommonFunction() == TRUE then return else return end end function ParryLeftStart_WepBreak_onUpdate() if SwordArtsParryCommonFunction() == TRUE then return else return end end function MagicBuffLeft_Upper_Activate() SetAttackHand(HAND_LEFT) return end function MagicBuffLeft_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, FALSE) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_MagicBuffLeftMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicBuffLeft2_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, FALSE) == TRUE then return else return end end function MagicBuffLeft3_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, FALSE) == TRUE then return else return end end function OneShotFullLeftStart_onUpdate() SetVariable("IndexThrowHand", HAND_LEFT) if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE, TRUE, FALSE) == TRUE then return else return end end function StormStanceRight_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function StormStanceStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if SwordArtsStanceCommonFunction("W_StormStanceLight", "W_StormStanceHeavy", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_StormStanceLight", "W_StormStanceHeavy", blend_type, TRUE, TRUE, FALSE) == TRUE then return elseif style == HAND_LEFT_BOTH then act(2002, 100901) else act(2002, 100900) end if env(1116, 100330) == TRUE and (env(1108, ACTION_ARM_L2) < 200 or env(1107, ACTION_ARM_L2) == TRUE) then ExecEventHalfBlend(Event_StormStanceEnd, blend_type) return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlendNoReset(Event_StormStanceLoop, blend_type) g_StormStanceHoldTime = env(1108, ACTION_ARM_L2) return elseif HalfBlendLowerCommonFunction(Event_StormStanceStart, lower_state, FALSE, FALSE) == TRUE then return else return end end function StormStanceLoop_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if SwordArtsStanceCommonFunction("W_StormStanceLight", "W_StormStanceHeavy", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_StormStanceLight", "W_StormStanceHeavy", blend_type, TRUE, TRUE, FALSE) == TRUE then return elseif style == HAND_LEFT_BOTH then act(2002, 100901) else act(2002, 100900) end if env(1108, ACTION_ARM_L2) <= 0 or env(1107, ACTION_ARM_L2) == TRUE then ExecEventHalfBlend(Event_StormStanceEnd, blend_type) return elseif 2500 <= env(1108, ACTION_ARM_L2) - g_StormStanceHoldTime then ExecEventHalfBlend(Event_StormStanceFullLoop, blend_type) local style = c_Style if style == HAND_LEFT_BOTH then act(2002, 100911) act(2002, 100921) else act(2002, 100910) act(2002, 100920) end end if HalfBlendLowerCommonFunction(Event_StormStanceLoop, lower_state, FALSE, TRUE) == TRUE then return else return end end function StormStanceChange_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if SwordArtsStanceCommonFunction("W_StormStanceFullLight", "W_StormStanceFullHeavy", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_StormStanceFullLight", "W_StormStanceFullHeavy", blend_type, TRUE, TRUE, FALSE) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE and env(2000) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) return elseif HalfBlendLowerCommonFunction(Event_StormStanceChange, lower_state, FALSE, FALSE) == TRUE then return else return end end function StormStanceEnd_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if SwordArtsStanceCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", blend_type, FALSE, FALSE, TRUE) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) return elseif HalfBlendLowerCommonFunction(Event_StormStanceEnd, lower_state, FALSE, FALSE) == TRUE then return else return end end function StormStanceLight_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function StormStanceHeavy_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function StormStanceFullStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() local r1 = "W_StormStanceFullLight_NonBoss" local r2 = "W_StormStanceFullHeavy_NonBoss" local b1 = "W_StormStanceFullLight_NonBoss" local b2 = "W_StormStanceFullHeavy_NonBoss" if env(1116, 4510) == TRUE then r1 = "W_StormStanceFullLight" r2 = "W_StormStanceFullHeavy" b1 = "W_StormStanceFullLight" b2 = "W_StormStanceFullHeavy" end if SwordArtsStanceCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, blend_type, TRUE, TRUE, FALSE) == TRUE then return elseif env(1116, 100330) == TRUE and (env(1108, ACTION_ARM_L2) < 200 or env(1107, ACTION_ARM_L2) == TRUE) then ExecEventHalfBlend(Event_StormStanceFullEnd, blend_type) return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlendNoReset(Event_StormStanceFullLoop, blend_type) return elseif HalfBlendLowerCommonFunction(Event_StormStanceFullStart, lower_state, FALSE, FALSE) == TRUE then return else return end end function StormStanceFullLoop_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() local r1 = "W_StormStanceFullLight_NonBoss" local r2 = "W_StormStanceFullHeavy_NonBoss" local b1 = "W_StormStanceFullLight_NonBoss" local b2 = "W_StormStanceFullHeavy_NonBoss" if env(1116, 4510) == TRUE then r1 = "W_StormStanceFullLight" r2 = "W_StormStanceFullHeavy" b1 = "W_StormStanceFullLight" b2 = "W_StormStanceFullHeavy" end if SwordArtsStanceCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, blend_type, TRUE, TRUE, FALSE) == TRUE then return elseif env(1108, ACTION_ARM_L2) <= 0 or env(1107, ACTION_ARM_L2) == TRUE then ExecEventHalfBlend(Event_StormStanceFullEnd, blend_type) return elseif HalfBlendLowerCommonFunction(Event_StormStanceFullLoop, lower_state, FALSE, TRUE) == TRUE then return else return end end function StormStanceFullEnd_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if SwordArtsStanceCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", blend_type, FALSE, FALSE, TRUE) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) return elseif HalfBlendLowerCommonFunction(Event_StormStanceFullEnd, lower_state, FALSE, FALSE) == TRUE then return else return end end function StormStanceFullLight_onUpdate() local style = c_Style if env(301, 0) == TRUE then if style == HAND_LEFT_BOTH then act(2002, 100931) else act(2002, 100930) end end if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function StormStanceFullHeavy_onUpdate() local style = c_Style if env(301, 0) == TRUE then if style == HAND_LEFT_BOTH then act(2002, 100931) else act(2002, 100930) end end if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function StormStanceFullLight_NonBoss_onUpdate() local style = c_Style if env(301, 0) == TRUE then if style == HAND_LEFT_BOTH then act(2002, 100931) else act(2002, 100930) end end if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function StormStanceFullHeavy_NonBoss_onUpdate() local style = c_Style if env(301, 0) == TRUE then if style == HAND_LEFT_BOTH then act(2002, 100931) else act(2002, 100930) end end if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, FALSE, FALSE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function FourWayAttackRight_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function FourWayAttackStart_onUpdate() local r1 = "W_AttackRightLight1" local b1 = "W_AttackBothLight1" local r2 = "W_FourWayAttackHeavy" local b2 = "W_FourWayAttackHeavy" local sp_kind = env("装備武器特殊カテゴリ番号取得", c_SwordArtsHand) if sp_kind == 263 then r1 = "W_FourWayAttackLight" b1 = "W_FourWayAttackLight" end if GetVariable("IsLockon") == true and IsNodeActive("Move_Upper Selector") == TRUE and env(301, 1) == TRUE then local angle = GetVariable("RollingAngle") local front, back, left, right = false if 135 < math.abs(angle) then back = true elseif 45 < angle then right = true elseif angle < -45 then left = true else front = true end SetVariable("EnableTAE_FourWayAttackStartFront", front) SetVariable("EnableTAE_FourWayAttackStartBack", back) SetVariable("EnableTAE_FourWayAttackStartLeft", left) SetVariable("EnableTAE_FourWayAttackStartRight", right) if 0 <= angle then SetVariable("FourWayAttackStartDirection", 1) else SetVariable("FourWayAttackStartDirection", 0) end SetVariable("FourWayAttackStartAngle", angle) end local rolling_angle = GetVariable("CircleStepAngle") local addratio = 0.300000011920929 local endratio = 1 act(2001, math.abs(1 + addratio * math.abs(math.sin(math.rad(2 * rolling_angle))))) if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, TRUE, TRUE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function FourWayAttackStart_SelfTrans_onUpdate() local r1 = "W_AttackRightLight1" local b1 = "W_AttackBothLight1" local r2 = "W_FourWayAttackHeavy" local b2 = "W_FourWayAttackHeavy" local sp_kind = env("装備武器特殊カテゴリ番号取得", c_SwordArtsHand) if sp_kind == 263 then r1 = "W_FourWayAttackLight" b1 = "W_FourWayAttackLight" end local rolling_angle = GetVariable("CircleStepAngle") local addratio = 0.300000011920929 local endratio = 1 act(2001, math.abs(1 + addratio * math.abs(math.sin(math.rad(2 * rolling_angle))))) if SwordArtsCommonFunction(r1, r2, "W_AttackLeftLight1", "W_AttackLeftHeavy1", b1, b2, FALSE, TRUE, TRUE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function FourWayAttackLight_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE, TRUE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function FourWayAttackHeavy_onUpdate() if SwordArtsCommonFunction("W_AttackRightLight1", "W_AttackRightHeavy1Start", "W_AttackLeftLight1", "W_AttackLeftHeavy1", "W_AttackBothLight1", "W_AttackBothHeavy1Start", FALSE, TRUE, TRUE, GEN_TRANS_LEFT) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) ExecEventAllBody("W_Idle") return else return end end function GatlingStanceRightNoSync_Activate() SetInterruptType(INTERRUPT_FINDATTACK) return end function GatlingStanceRightStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if GatlingStanceCommonFunction(blend_type, TRUE) == TRUE then return elseif env(1116, 100330) == TRUE and (env(1108, ACTION_ARM_L2) < 200 or env(1107, ACTION_ARM_L2) == TRUE) then ExecEventHalfBlend(Event_GatlingStanceRightEnd, blend_type) return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlendNoReset(Event_GatlingStanceRightLoop, blend_type) if GetVariable("LocomotionState") == 1 then ExecEvent("W_Move") end return elseif HalfBlendLowerCommonFunction(Event_GatlingStanceRightStart, lower_state, FALSE, FALSE) == TRUE then return else return end end function GatlingStanceRightLoop_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if GatlingStanceCommonFunction(blend_type, TRUE) == TRUE then return elseif env(1108, ACTION_ARM_L2) <= 0 or env(1107, ACTION_ARM_L2) == TRUE then ExecEventHalfBlend(Event_GatlingStanceRightEnd, blend_type) return elseif HalfBlendLowerCommonFunction(Event_GatlingStanceRightLoop, lower_state, FALSE, TRUE) == TRUE then return else return end end function GatlingStanceRightEnd_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if GatlingStanceCommonFunction(blend_type, FALSE) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) return elseif HalfBlendLowerCommonFunction(Event_GatlingStanceRightEnd, lower_state, FALSE, FALSE) == TRUE then return else return end end function GatlingStanceRightFireStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE and env(301, 1) == FALSE then act("ロックオン時システム旋回不可角度", 90, 90) end if GetVariable("IsLockon") == true then if IsLowerQuickTurn() == TRUE then SetVariable("LookAtTwist60_NewTargetGain", 1) SetVariable("LookAtTwist70_NewTargetGain", 1) SetVariable("LookAtTwist70_OnGain", 0.300000011920929) else SetVariable("LookAtTwist60_NewTargetGain", 0.200000002980232) SetVariable("LookAtTwist70_NewTargetGain", 0.200000002980232) SetVariable("LookAtTwist70_OnGain", 0.300000011920929) end else SetVariable("LookAtTwist60_NewTargetGain", 0.5) SetVariable("LookAtTwist70_NewTargetGain", 0.400000005960464) SetVariable("LookAtTwist70_OnGain", 0.300000011920929) end local can_fire = FALSE if 0 < env(1108, ACTION_ARM_L2) then can_fire = TRUE end if GatlingStanceCommonFunction(blend_type, can_fire) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_GatlingStanceRightFireStart, lower_state, FALSE, FALSE) == TRUE then return else return end end function GatlingStanceRightFireStartLeft_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 15, 15) end if GetVariable("IsLockon") == true then SetVariable("LookAtTwist60_NewTargetGain", 0.100000001490116) SetVariable("LookAtTwist70_NewTargetGain", 0.100000001490116) else SetVariable("LookAtTwist60_NewTargetGain", 0.899999976158142) SetVariable("LookAtTwist70_NewTargetGain", 0.200000002980232) end local can_fire = FALSE if 0 < env(1108, ACTION_ARM_L2) then can_fire = TRUE end if GatlingStanceCommonFunction(blend_type, can_fire) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then SetArtsGeneratorTransitionIndex(GEN_TRANS_LEFT, TRUE) return elseif HalfBlendLowerCommonFunction(Event_GatlingStanceRightFireStartLeft, lower_state, FALSE, FALSE) == TRUE then return else return end end function WeaponChangeStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if WeaponChangeCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlendNoReset(Event_WeaponChangeEnd, blend_type) return elseif HalfBlendLowerCommonFunction(Event_WeaponChangeStartMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function WeaponChangeEnd_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if WeaponChangeCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_WeaponChangeEndMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function HandChangeStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if HandChangeCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlendNoReset(Event_HandChangeEnd, blend_type) return elseif HalfBlendLowerCommonFunction(Event_HandChangeStartMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function HandChangeEnd_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if HandChangeCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_HandChangeEndMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickItemEnchantNormal_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if QuickItemCommonFunction(g_r1, g_r2, g_l1, g_l2, g_b1, g_b2, blend_type, QUICKTYPE_NORMAL) == TRUE then return elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then ClearAttackQueue() return elseif HalfBlendLowerCommonFunction(Event_QuickItemEnchantNormal, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickItemEnchantDash_Upper_onActivate() act("ロックオン中角度固定解除") return end function QuickItemEnchantDash_Upper_onUpdate() act("ロックオン中角度固定解除") local r1 = "W_AttackRightLight1" local r2 = "W_AttackRightHeavy1Start" local b1 = "W_AttackBothLight1" local b2 = "W_AttackBothHeavy1Start" if 1 <= GetVariable("MoveSpeedIndex") then r1 = "W_AttackRightLightDash" r2 = "W_AttackRightHeavyKick" b1 = "W_AttackBothDash" b2 = "W_AttackBothHeavyKick" end local blend_type, lower_state = GetHalfBlendInfo() if QuickItemCommonFunction(r1, r2, g_l1, g_l2, b1, b2, blend_type, QUICKTYPE_NORMAL) == TRUE then return elseif env(1116, 100220) == FALSE and HalfBlendLowerCommonFunction(Event_DashStop, lower_state, FALSE, FALSE) == TRUE then SetVariable("MoveSpeedLevelReal", 0) return elseif env(2000) == TRUE then ExecEvent("W_Idle") return else return end end function QuickItemEnchantStep_Upper_onUpdate() if QuickItemCommonFunction(g_r1, g_r2, g_l1, g_l2, g_b1, g_b2, ALLBODY, QUICKTYPE_NORMAL) == TRUE then return else return end end function QuickItemEnchantAttackRight_Upper_onUpdate() if QuickItemCommonFunction(g_r1, g_r2, g_l1, g_l2, g_b1, g_b2, ALLBODY, QUICKTYPE_NORMAL) == TRUE then return else return end end function QuickItemEnchantAttackLeft_Upper_onUpdate() if QuickItemCommonFunction(g_r1, g_r2, g_l1, g_l2, g_b1, g_b2, ALLBODY, QUICKTYPE_NORMAL) == TRUE then return else return end end function QuickItemThrowKnifeNormal_Upper_onUpdate() if QuickItemCommonFunction(g_r1, g_r2, g_l1, g_l2, g_b1, g_b2, ALLBODY, QUICKTYPE_COMBO) == TRUE then return else return end end function QuickItemThrowKnifeDash_Upper_onActivate() act("ロックオン中角度固定解除") return end function QuickItemThrowKnifeDash_Upper_onUpdate() act("ロックオン中角度固定解除") if QuickItemCommonFunction(g_r1, g_r2, g_l1, g_l2, g_b1, g_b2, ALLBODY, QUICKTYPE_COMBO) == TRUE then return else return end end function QuickItemThrowKnifeStep_Upper_onUpdate() if QuickItemCommonFunction(g_r1, g_r2, g_l1, g_l2, g_b1, g_b2, ALLBODY, QUICKTYPE_COMBO) == TRUE then return else return end end function QuickItemThrowKnifeAttackRight_Upper_onUpdate() if QuickItemCommonFunction(g_r1, g_r2, g_l1, g_l2, g_b1, g_b2, ALLBODY, QUICKTYPE_COMBO) == TRUE then return else return end end function QuickItemThrowKnifeAttackRight2_Upper_onUpdate() if QuickItemCommonFunction(g_r1, g_r2, g_l1, g_l2, g_b1, g_b2, ALLBODY, QUICKTYPE_ATTACK) == TRUE then return else return end end function QuickItemThrowKnifeAttackLeft_Upper_onUpdate() if QuickItemCommonFunction(g_r1, g_r2, g_l1, g_l2, g_b1, g_b2, ALLBODY, QUICKTYPE_COMBO) == TRUE then return else return end end function QuickItemThrowKnifeAttackLeft2_Upper_onUpdate() if QuickItemCommonFunction(g_r1, g_r2, g_l1, g_l2, g_b1, g_b2, ALLBODY, QUICKTYPE_ATTACK) == TRUE then return else return end end function Item_Activate() ActivateRightArmAdd(START_FRAME_NONE) return end function Item_Update() UpdateRightArmAdd() return end function NormalItem_Upper_Activate() local upper_state = GetVariable("UpperDefaultState02") if upper_state == ITEMDRINKSTART_DEF2 or upper_state == ITEMDRINKSTARTMP_DEF2 then SetInterruptType(INTERRUPT_USEITEM) end return end function ItemRecover_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemRecover, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemWeaponEnchant_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemWeaponEnchant, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemThrowKnife_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemThrowKnife, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemThrowBottle_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemThrowBottle, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemMeganeStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlend(Event_ItemMeganeLoop, blend_type) return elseif HalfBlendLowerCommonFunction(Event_ItemMeganeStart, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemMeganeLoop_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemMeganeLoop, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemMeganeEnd_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemMeganeEnd, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemWeaponRepair_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemWeaponRepair, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemSoul_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemSoul, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemMessage_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemMessage, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemPray_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemPray, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemTrap_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemTrap, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemDrinkStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif env(301, 0) == TRUE then ExecEventHalfBlendNoReset(Event_ItemDrinking, blend_type) return elseif HalfBlendLowerCommonFunction(Event_ItemDrinkStart, lower_state, FALSE, FALSE) == TRUE then return else return end end function DragonHeadStartBefore_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlendNoReset(Event_DragonHeadEndBefore, blend_type) return elseif HalfBlendLowerCommonFunction(Event_DragonHeadStartBefore, lower_state, FALSE, FALSE) == TRUE then return else return end end function DragonHeadEndBefore_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_DragonHeadEndBefore, lower_state, FALSE, FALSE) == TRUE then return else return end end function DragonHeadStartAfter_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlendNoReset(Event_DragonHeadLoopAfter, blend_type) return elseif HalfBlendLowerCommonFunction(Event_DragonHeadStartAfter, lower_state, FALSE, FALSE) == TRUE then return else return end end function DragonHeadLoopAfter_Upper_onUpdate() local dT = GetDeltaTime() dash_dt_sum = dash_dt_sum + dT if 0.100000001490116 < dash_dt_sum then dash_dt_sum = 0 act(1001, -1) end local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif env(1108, ACTION_ARM_USE_ITEM) <= 0 then ExecEventHalfBlend(Event_DragonHeadEndAfter, blend_type) elseif env(1001) <= 0 then ExecEventHalfBlend(Event_DragonHeadEndAfter, blend_type) end if HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_DragonHeadLoopAfter, lower_state, FALSE, FALSE) == TRUE then return else return end end function DragonHeadEndAfter_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_DragonHeadEndAfter, lower_state, FALSE, FALSE) == TRUE then return else return end end function DragonHeadStartAfterLVL2_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlendNoReset(Event_DragonHeadLoopAfterLVL2, blend_type) return elseif HalfBlendLowerCommonFunction(Event_DragonHeadStartAfterLVL2, lower_state, FALSE, FALSE) == TRUE then return else return end end function DragonHeadLoopAfterLVL2_Upper_onUpdate() local dT = GetDeltaTime() dash_dt_sum = dash_dt_sum + dT if 0.0649999976158142 < dash_dt_sum then dash_dt_sum = 0 act(1001, -1) end local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif env(1108, ACTION_ARM_USE_ITEM) <= 0 then ExecEventHalfBlend(Event_DragonHeadEndAfterLVL2, blend_type) elseif env(1001) <= 0 then ExecEventHalfBlend(Event_DragonHeadEndAfterLVL2, blend_type) end if HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_DragonHeadLoopAfterLVL2, lower_state, FALSE, FALSE) == TRUE then return else return end end function DragonHeadEndAfterLVL2_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_DragonHeadEndAfterLVL2, lower_state, FALSE, FALSE) == TRUE then return else return end end function DragonFullStartBefore_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlendNoReset(Event_DragonFullEndBefore, blend_type) return elseif HalfBlendLowerCommonFunction(Event_DragonFullStartBefore, lower_state, FALSE, FALSE) == TRUE then return else return end end function DragonFullEndBefore_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_DragonFullEndBefore, lower_state, FALSE, FALSE) == TRUE then return else return end end function DragonFullStartAfter_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_DragonFullStartAfter, lower_state, FALSE, FALSE) == TRUE then return else return end end function DragonFullStartAfterLVL2_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_DragonFullStartAfterLVL2, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemDrinkNothing_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemDrinkNothing, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemDrinking_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlendNoReset(Event_ItemDrinkEnd, blend_type) return elseif HalfBlendLowerCommonFunction(Event_ItemDrinkingMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemDrinkEnd_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemDrinkEnd, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemShockWeaveStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemShockWeaveStart, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemShockWeaveEnd_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemShockWeaveEnd, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemDrinkStartMP_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif env(301, 0) == TRUE then ExecEventHalfBlendNoReset(Event_ItemDrinkingMP, blend_type) return elseif HalfBlendLowerCommonFunction(Event_ItemDrinkStartMP, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemDrinkingMP_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlendNoReset(Event_ItemDrinkEndMP, blend_type) return elseif HalfBlendLowerCommonFunction(Event_ItemDrinkingMPMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemDrinkEndMP_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemDrinkEndMP, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemDrinkNothingMP_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemDrinkNothingMP, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemDrinkStartSake_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif env(301, 0) == TRUE then ExecEventHalfBlendNoReset(Event_ItemDrinkingSake, blend_type) return elseif HalfBlendLowerCommonFunction(Event_ItemDrinkStartSake, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemDrinkingSake_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlendNoReset(Event_ItemDrinkEndSake, blend_type) return elseif HalfBlendLowerCommonFunction(Event_ItemDrinkingSakeMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemDrinkEndSake_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemDrinkEndSake, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemDrinkEmpty_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemDrinkEmpty, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemBackBottle_Upper_onUpdate() act("ロックオン中角度固定解除") local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif lower_state == LOWER_IDLE and env(301, 0) == TRUE then ExecEventAllBody("W_Idle") return elseif HalfBlendLowerCommonFunction(Event_ItemBackBottle, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemChameleon_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemChameleon, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemOldMonk_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemOldMonk, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemInvalid_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if ItemCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_ItemInvalid, lower_state, FALSE, FALSE) == TRUE then return else return end end function ItemLadderRecoverRight_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_RIGHT) if LadderItemCommonFunction(HAND_STATE_RIGHT, FALSE) == TRUE then return else return end end function ItemLadderSoulRight_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_RIGHT) if LadderItemCommonFunction(HAND_STATE_RIGHT, FALSE) == TRUE then return else return end end function ItemLadderDrinkStartRight_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_RIGHT) if LadderItemCommonFunction(HAND_STATE_RIGHT, TRUE) == TRUE then return elseif env(301, 0) == TRUE then ExecEvent("W_ItemLadderDrinkingRight") return else return end end function ItemLadderDrinkingRight_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_RIGHT) if LadderItemCommonFunction(HAND_STATE_RIGHT, TRUE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEvent("W_ItemLadderDrinkEndRight") return else return end end function ItemLadderDrinkEndRight_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_RIGHT) if LadderItemCommonFunction(HAND_STATE_RIGHT, FALSE) == TRUE then return else return end end function ItemLadderDrinkStartMPRight_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_RIGHT) if LadderItemCommonFunction(HAND_STATE_RIGHT, TRUE) == TRUE then return elseif env(301, 0) == TRUE then ExecEvent("W_ItemLadderDrinkingMPRight") return else return end end function ItemLadderDrinkingMPRight_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_RIGHT) if LadderItemCommonFunction(HAND_STATE_RIGHT, TRUE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEvent("W_ItemLadderDrinkEndMPRight") return else return end end function ItemLadderDrinkEndMPRight_onUpdate() ItemLadderDrinkEndRight_onUpdate() return end function ItemLadderDrinkNothingMPRight_onUpdate() ItemLadderDrinkNothingRight_onUpdate() return end function ItemLadderDrinkStartSakeRight_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_RIGHT) if LadderItemCommonFunction(HAND_STATE_RIGHT, TRUE) == TRUE then return elseif env(301, 0) == TRUE then ExecEvent("W_ItemLadderDrinkingSakeRight") return else return end end function ItemLadderDrinkingSakeRight_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_RIGHT) if LadderItemCommonFunction(HAND_STATE_RIGHT, TRUE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEvent("W_ItemLadderDrinkEndSakeRight") return else return end end function ItemLadderDrinkEndSakeRight_onUpdate() ItemLadderDrinkEndRight_onUpdate() return end function ItemLadderDrinkEmptyRight_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_RIGHT) if LadderItemCommonFunction(HAND_STATE_RIGHT, FALSE) == TRUE then return else return end end function ItemLadderDrinkNothingRight_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_RIGHT) if LadderItemCommonFunction(HAND_STATE_RIGHT, FALSE) == TRUE then return else return end end function ItemLadderInvalidRight_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_RIGHT) if LadderItemCommonFunction(HAND_STATE_RIGHT, FALSE) == TRUE then return else return end end function ItemLadderRecoverLeft_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_LEFT) if LadderItemCommonFunction(HAND_STATE_LEFT, FALSE) == TRUE then return else return end end function ItemLadderSoulLeft_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_LEFT) if LadderItemCommonFunction(HAND_STATE_LEFT, FALSE) == TRUE then return else return end end function ItemLadderDrinkStartLeft_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_LEFT) if LadderItemCommonFunction(HAND_STATE_LEFT, TRUE) == TRUE then return elseif env(301, 0) == TRUE then ExecEvent("W_ItemLadderDrinkingLeft") return else return end end function ItemLadderDrinkingLeft_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_LEFT) if LadderItemCommonFunction(HAND_STATE_LEFT, TRUE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEvent("W_ItemLadderDrinkEndLeft") return else return end end function ItemLadderDrinkEndLeft_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_LEFT) if LadderItemCommonFunction(HAND_STATE_LEFT, FALSE) == TRUE then return else return end end function ItemLadderDrinkStartMPLeft_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_LEFT) if LadderItemCommonFunction(HAND_STATE_LEFT, TRUE) == TRUE then return elseif env(301, 0) == TRUE then ExecEvent("W_ItemLadderDrinkingMPLeft") return else return end end function ItemLadderDrinkingMPLeft_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_LEFT) if LadderItemCommonFunction(HAND_STATE_LEFT, TRUE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEvent("W_ItemLadderDrinkEndMPLeft") return else return end end function ItemLadderDrinkEndMPLeft_onUpdate() ItemLadderDrinkEndLeft_onUpdate() return end function ItemLadderDrinkNothingMPLeft_onUpdate() ItemLadderDrinkNothingLeft_onUpdate() return end function ItemLadderDrinkEmptyLeft_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_LEFT) if LadderItemCommonFunction(HAND_STATE_LEFT, FALSE) == TRUE then return else return end end function ItemLadderDrinkNothingLeft_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_LEFT) if LadderItemCommonFunction(HAND_STATE_LEFT, FALSE) == TRUE then return else return end end function ItemLadderDrinkStartSakeLeft_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_LEFT) if LadderItemCommonFunction(HAND_STATE_LEFT, TRUE) == TRUE then return elseif env(301, 0) == TRUE then ExecEvent("W_ItemLadderDrinkingSakeLeft") return else return end end function ItemLadderDrinkingSakeLeft_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_LEFT) if LadderItemCommonFunction(HAND_STATE_LEFT, TRUE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEvent("W_ItemLadderDrinkEndSakeLeft") return else return end end function ItemLadderDrinkEndSakeLeft_onUpdate() ItemLadderDrinkEndLeft_onUpdate() return end function ItemLadderInvalidLeft_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_LEFT) if LadderItemCommonFunction(HAND_STATE_LEFT, FALSE) == TRUE then return else return end end function Gesture_Activate() ActivateRightArmAdd(START_FRAME_NONE) return end function Gesture_Update() UpdateRightArmAdd() return end function GestureStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if GestureCommonFunction(blend_type) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_GestureStart, lower_state, FALSE, FALSE) == TRUE then return else return end end function GestureLoopStart_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if GestureLoopCommonFunction(blend_type, lower_state, TRUE) == TRUE then return elseif env("アニメ終了か", 1) == TRUE then ExecEventHalfBlend(Event_GestureLoop, blend_type) return elseif HalfBlendLowerCommonFunction(Event_GestureLoopStart, lower_state, FALSE, FALSE) == TRUE then return else return end end function GestureLoop_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if GestureLoopCommonFunction(blend_type, lower_state, FALSE) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_GestureLoop, lower_state, FALSE, FALSE) == TRUE then return else return end end function GestureEnd_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if GestureCommonFunction() == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_GestureEnd, lower_state, FALSE, FALSE) == TRUE then return else return end end function Magic_Upper_Activate() if IsAttackMagic(GetVariable("IndexMagicType")) then SetInterruptType(INTERRUPT_FINDATTACK) end return end function MagicRight_Upper_Activate() local style = c_Style if style == HAND_LEFT_BOTH then SetAttackHand(HAND_LEFT) else SetAttackHand(HAND_RIGHT) end return end function MagicLeft_Upper_Activate() SetAttackHand(HAND_LEFT) return end function MagicLaunchRight_Upper_onActivate() act("魔法ID切り替え無効") return end function MagicLaunchRight_Upper_onUpdate() act("魔法ID切り替え無効") local blend_type, lower_state = GetHalfBlendInfo() if MagicCommonFunction(blend_type, QUICKTYPE_NORMAL) == TRUE then return elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE elseif env(313) == TRUE or env("アニメ終了か", 1) == TRUE then local style = c_Style local hand = HAND_RIGHT if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) local button = ACTION_ARM_R1 if sp_kind == 178 or sp_kind == 207 or sp_kind == 217 or sp_kind == 220 or sp_kind == 234 or sp_kind == 257 then button = ACTION_ARM_R2 end if IsHoldMagic() == TRUE then if 0 < env(1108, button) then ExecEventHalfBlend(Event_MagicLoopRight, blend_type) return else ExecEventHalfBlend(Event_MagicFireRight, blend_type) return end elseif IsQuickMagic() == TRUE then ExecEventHalfBlend(Event_QuickMagicFireRightNormal, blend_type) return else ExecEventHalfBlend(Event_MagicFireRight, blend_type) return end elseif HalfBlendLowerCommonFunction(Event_MagicLaunchRight, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicLaunchRightSA_Upper_onActivate() act("魔法ID切り替え無効") return end function MagicLaunchRightSA_Upper_onUpdate() act("魔法ID切り替え無効") local blend_type, lower_state = GetHalfBlendInfo() if MagicCommonFunction(blend_type, QUICKTYPE_NORMAL) == TRUE then return elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE elseif env(313) == TRUE or env("アニメ終了か", 1) == TRUE then if IsHoldMagic() == TRUE then if 0 < env(1108, ACTION_ARM_L2) then ExecEventHalfBlend(Event_MagicLoopRightSA, blend_type) return else ExecEventHalfBlend(Event_MagicFireRight, blend_type) return end else ExecEventHalfBlend(Event_MagicFireRight, blend_type) return end elseif HalfBlendLowerCommonFunction(Event_MagicLaunchRightSA, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicLoopRight_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 45, 45) end if MagicCommonFunction(blend_type, QUICKTYPE_NORMAL) == TRUE then return end local magic_type = env(227) if 254 <= magic_type then ExecEventHalfBlend(Event_MagicFireRight, blend_type) return end local style = c_Style local hand = HAND_RIGHT if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) local button = ACTION_ARM_R1 if sp_kind == 178 or sp_kind == 207 or sp_kind == 217 or sp_kind == 220 or sp_kind == 234 or sp_kind == 257 then button = ACTION_ARM_R2 end if env(1108, button) <= 0 then ExecEventHalfBlend(Event_MagicFireRight, blend_type) return elseif HalfBlendLowerCommonFunction(Event_MagicLoopRight, lower_state, FALSE, FALSE) == TRUE then return elseif magic_type == MAGIC_REQUEST_SLASHHOLD and env(313) == TRUE then ExecEventHalfBlend(Event_MagicLoopRightLvl2, blend_type) end return end function MagicLoopRightSA_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 45, 45) end if MagicCommonFunction(blend_type, QUICKTYPE_NORMAL) == TRUE then return elseif 254 <= env(227) then ExecEventHalfBlend(Event_MagicFireRight, blend_type) return elseif env(1108, ACTION_ARM_L2) <= 0 then ExecEventHalfBlend(Event_MagicFireRight, blend_type) return elseif HalfBlendLowerCommonFunction(Event_MagicLoopRightSA, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicLoopRightLvl2_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 45, 45) end if MagicCommonFunction(blend_type, QUICKTYPE_NORMAL) == TRUE then return elseif 254 <= env(227) then ExecEventHalfBlend(Event_MagicFireRightLvl2, blend_type) return end local style = c_Style local hand = HAND_RIGHT if style == HAND_LEFT_BOTH then hand = HAND_LEFT end local sp_kind = env("装備武器特殊カテゴリ番号取得", hand) local button = ACTION_ARM_R1 if sp_kind == 178 or sp_kind == 207 or sp_kind == 217 or sp_kind == 220 or sp_kind == 234 or sp_kind == 257 then button = ACTION_ARM_R2 end if env(1108, button) <= 0 then ExecEventHalfBlend(Event_MagicFireRightLvl2, blend_type) return elseif HalfBlendLowerCommonFunction(Event_MagicLoopRightLvl2, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicFireRight_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end SetVariable("IndexThrowHand", HAND_RIGHT) if MagicCommonFunction(ALLBODY, QUICKTYPE_NORMAL) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_MagicFireRight, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicFireRight2_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end SetVariable("IndexThrowHand", HAND_RIGHT) if MagicCommonFunction(ALLBODY, QUICKTYPE_NORMAL) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_MagicFireRight2, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicFireRight3_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end SetVariable("IndexThrowHand", HAND_RIGHT) if MagicCommonFunction(ALLBODY, QUICKTYPE_NORMAL) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_MagicFireRight2, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicFireRightLvl2_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end SetVariable("IndexThrowHand", HAND_RIGHT) if MagicCommonFunction(ALLBODY, QUICKTYPE_NORMAL) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_MagicFireRightLvl2, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicLaunchLeft_Upper_onActivate() act("魔法ID切り替え無効") return end function MagicLaunchLeft_Upper_onUpdate() act("魔法ID切り替え無効") local blend_type, lower_state = GetHalfBlendInfo() if MagicCommonFunction(blend_type, QUICKTYPE_NORMAL) == TRUE then return elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE elseif env(313) == TRUE or env("アニメ終了か", 1) == TRUE then local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) local button = ACTION_ARM_L1 if sp_kind == 178 or sp_kind == 207 or sp_kind == 217 or sp_kind == 220 or sp_kind == 234 or sp_kind == 257 then button = ACTION_ARM_L2 end if IsHoldMagic() == TRUE then if 0 < env(1108, button) then ExecEventHalfBlend(Event_MagicLoopLeft, blend_type) return else ExecEventHalfBlend(Event_MagicFireLeft, blend_type) return end elseif IsQuickMagic() == TRUE then ExecEventHalfBlend(Event_QuickMagicFireLeftNormal, blend_type) return else ExecEventHalfBlend(Event_MagicFireLeft, blend_type) return end elseif HalfBlendLowerCommonFunction(Event_MagicLaunchLeft, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicLaunchLeftSA_Upper_onActivate() act("魔法ID切り替え無効") return end function MagicLaunchLeftSA_Upper_onUpdate() act("魔法ID切り替え無効") local blend_type, lower_state = GetHalfBlendInfo() if MagicCommonFunction(blend_type, QUICKTYPE_NORMAL) == TRUE then return elseif blend_type ~= UPPER and ExecQuickTurn(LOWER) == TRUE then return TRUE elseif env(313) == TRUE or env("アニメ終了か", 1) == TRUE then if IsHoldMagic() == TRUE then if 0 < env(1108, ACTION_ARM_L2) then ExecEventHalfBlend(Event_MagicLoopLeftSA, blend_type) return else ExecEventHalfBlend(Event_MagicFireLeft, blend_type) return end else ExecEventHalfBlend(Event_MagicFireLeft, blend_type) return end elseif HalfBlendLowerCommonFunction(Event_MagicLaunchLeftSA, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicLoopLeft_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 45, 45) end if MagicCommonFunction(blend_type, QUICKTYPE_NORMAL) == TRUE then return end local magic_type = env(227) if 254 <= magic_type then ExecEventHalfBlend(Event_MagicFireRight, blend_type) return end local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) local button = ACTION_ARM_L1 if sp_kind == 178 or sp_kind == 207 or sp_kind == 217 or sp_kind == 220 or sp_kind == 234 or sp_kind == 257 then button = ACTION_ARM_L2 end if env(1108, button) <= 0 then ExecEventHalfBlend(Event_MagicFireLeft, blend_type) return elseif HalfBlendLowerCommonFunction(Event_MagicLoopLeft, lower_state, FALSE, FALSE) == TRUE then return elseif magic_type == MAGIC_REQUEST_SLASHHOLD and env(313) == TRUE then ExecEventHalfBlend(Event_MagicLoopLeftLvl2, blend_type) end return end function MagicLoopLeftSA_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 45, 45) end if MagicCommonFunction(blend_type, QUICKTYPE_NORMAL) == TRUE then return elseif 254 <= env(227) then ExecEventHalfBlend(Event_MagicFireLeft, blend_type) return elseif env(1108, ACTION_ARM_L2) <= 0 then ExecEventHalfBlend(Event_MagicFireLeft, blend_type) return elseif HalfBlendLowerCommonFunction(Event_MagicLoopLeftSA, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicLoopLeftLvl2_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 45, 45) end if MagicCommonFunction(blend_type, QUICKTYPE_NORMAL) == TRUE then return elseif 254 <= env(227) then ExecEventHalfBlend(Event_MagicFireLeftLvl2, blend_type) return end local sp_kind = env("装備武器特殊カテゴリ番号取得", HAND_LEFT) local button = ACTION_ARM_L1 if sp_kind == 178 or sp_kind == 207 or sp_kind == 217 or sp_kind == 220 or sp_kind == 234 or sp_kind == 257 then button = ACTION_ARM_L2 end if env(1108, button) <= 0 then ExecEventHalfBlend(Event_MagicFireLeftLvl2, blend_type) return elseif HalfBlendLowerCommonFunction(Event_MagicLoopLeftLvl2, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicFireLeft_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end SetVariable("IndexThrowHand", HAND_LEFT) if MagicCommonFunction(ALLBODY, QUICKTYPE_NORMAL) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_MagicFireLeft, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicFireLeft2_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end SetVariable("IndexThrowHand", HAND_LEFT) if MagicCommonFunction(ALLBODY, QUICKTYPE_NORMAL) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_MagicFireLeft2, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicFireLeft3_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end SetVariable("IndexThrowHand", HAND_LEFT) if MagicCommonFunction(ALLBODY, QUICKTYPE_NORMAL) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_MagicFireLeft2, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicFireLeftLvl2_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end SetVariable("IndexThrowHand", HAND_LEFT) if MagicCommonFunction(ALLBODY, QUICKTYPE_NORMAL) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_MagicFireLeftLvl2, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireRightNormal_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_COMBO) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireRightNormal, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireRightDash_Upper_onActivate() act("ロックオン中角度固定解除") return end function QuickMagicFireRightDash_Upper_onUpdate() act("ロックオン中角度固定解除") local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_COMBO) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireRightDash, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireRightStep_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_COMBO) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireRightStep, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireRightAttackRight_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_COMBO) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireRightAttackRight, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireRightAttackRight2_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_ATTACK) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireRightAttackRight2, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireRightAttackLeft_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_COMBO) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireRightAttackLeft, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireRightAttackLeft2_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_ATTACK) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireRightAttackLeft2, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireLeftNormal_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_COMBO) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireLeftNormal, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireLeftDash_Upper_onActivate() act("ロックオン中角度固定解除") return end function QuickMagicFireLeftDash_Upper_onUpdate() act("ロックオン中角度固定解除") local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_COMBO) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireLeftDash, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireLeftStep_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_COMBO) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireLeftStep, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireLeftAttackRight_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_COMBO) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireLeftAttackRight, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireLeftAttackRight2_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_ATTACK) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireLeftAttackRight2, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireLeftAttackLeft_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_COMBO) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireLeftAttackLeft, lower_state, FALSE, FALSE) == TRUE then return else return end end function QuickMagicFireLeftAttackLeft2_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if lower_state == LOWER_TURN or lower_state == LOWER_END_TURN then act("魔法ID切り替え無効") end if MagicCommonFunction(blend_type, QUICKTYPE_ATTACK) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_QuickMagicFireLeftAttackLeft2, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicInvalidRight_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if MagicCommonFunction(ALLBODY, QUICKTYPE_NORMAL) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_MagicInvalidRightMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function MagicInvalidLeft_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if MagicCommonFunction(ALLBODY, QUICKTYPE_NORMAL) == TRUE then return elseif HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_MagicInvalidLeftMirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function ThrowBackStab_Activate() act("バックスタブ発動") local style = c_Style if style == HAND_LEFT_BOTH then SetAttackHand(HAND_LEFT) else SetAttackHand(HAND_RIGHT) end return end function ThrowBackStab_onUpdate() if env(1112) == FALSE then if BackStabCommonFunction() == TRUE then return else return end else ResetRequest() return end end function Throw_Activate() ResetRequest() SetVariable("MoveSpeedLevelReal", 0) SetThrowInvalid() local id = env(273) local style = c_Style if 0 <= id then SetVariable("ThrowID", id) end if IsNodeActive("MagicFireLeft_Upper_Selector", "OneShotFullLeftStart Selector") == TRUE then SetAttackHand(HAND_LEFT) elseif IsNodeActive("MagicFireRight_Upper_Selector", "OneShotFullRightStart Selector") == TRUE then if style == HAND_LEFT_BOTH then SetAttackHand(HAND_LEFT) else SetAttackHand(HAND_RIGHT) end else local style = c_Style if style == HAND_LEFT_BOTH then SetAttackHand(HAND_LEFT) else SetAttackHand(HAND_RIGHT) end end SetVariable("ThrowHoldBlendWeight", 0) SetVariable("ThrowHolding", false) SetVariable("ThrowNoRegistTime", 0) return end function Throw_Update() SetThrowInvalid() return end function Throw_Deactivate() act(139) return end function ThrowAtk_onActivate() Replanning() return end function ThrowAtk_onUpdate() if ThrowCommonFunction(FALSE) == TRUE then act(139) return else return end end function ThrowDef_onActivate() Replanning() return end function ThrowDef_onUpdate() SetThrowDefBlendWeight() if env(276) == TRUE then ExecEvent("ThrowDeath") return elseif env(277) == TRUE then ExecEvent("W_ThrowEscape") return elseif ThrowCommonFunction(ESTEP_DOWN) == TRUE then act(139) return else return end end function ThrowEscape_onUpdate() if ThrowCommonFunction() == TRUE then act(139) return else return end end function ThrowDeath_onActivate() act(136, THROW_TYPE_DEATH) return end function ThrowDeathIdle_onActivate() act(136, THROW_TYPE_INVALID) return end function Event_Activate() ResetEventState() ActivateRightArmAdd(START_FRAME_NONE) SetVariable("IsEventActivate", true) return end function Event_RightArmAddStartFrame_Activate() ResetEventState() ActivateRightArmAdd(START_FRAME_ALL) SetVariable("IsEventActivate", true) return end function Event_Update() if GetVariable("IsEventActivate") == false then UpdateRightArmAdd() end SetVariable("IsEventActivate", false) return end function Event26001_onActivate() act(9105, 90) return end function Event26001_onUpdate() act(9104) if env(301, 0) == FALSE then act(9102) end if QuickTurnCommonFunction() == TRUE then return else return end end function Event26011_onActivate() act(9105, 90) return end function Event26011_onUpdate() act(9104) if env(301, 0) == FALSE then act(9102) end if QuickTurnCommonFunction() == TRUE then return else return end end function Event26021_onActivate() act(9105, 180) return end function Event26021_onUpdate() act(9104) if env(301, 0) == FALSE then act(9102) end if QuickTurnCommonFunction() == TRUE then return else return end end function Event26031_onActivate() act(9105, 180) return end function Event26031_onUpdate() act(9104) if env(301, 0) == FALSE then act(9102) end if QuickTurnCommonFunction() == TRUE then return else return end end function Event60000_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event60000_onDeactivate() act(138, FALSE) return end function Event60001_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event60001_onDeactivate() act(138, FALSE) return end function Event60002_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event60002_onDeactivate() act(138, FALSE) return end function Event60003_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event60003_onDeactivate() act(138, FALSE) return end function Event60010_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60020_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60030_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event60030_onDeactivate() act(138, FALSE) return end function Event60040_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60060_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60070_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event60070_onDeactivate() act(138, FALSE) return end function Event60080_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60090_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event60090_onDeactivate() act(138, FALSE) return end function Event60100_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60160_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event60160_onDeactivate() act(138, FALSE) return end function Event60170_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event60170_onDeactivate() act(138, FALSE) return end function Event60180_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event60180_onDeactivate() act(138, FALSE) return end function Event60190_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event60190_onDeactivate() act(138, FALSE) return end function Event60200_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60202_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60210_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60220_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60230_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60231_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60240_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60241_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60250_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60260_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60270_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60370_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event60380_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60390_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60400_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60410_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60420_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60430_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60440_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60750_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60760_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60780_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60790_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60800_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event60810_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event61000_Upper_onUpdate() local blend_type, lower_state = GetHalfBlendInfo() if DamageHalfBlendCommonFunction(blend_type) == TRUE then return elseif lower_state == LOWER_IDLE then act("ロックオン時システム旋回不可角度", 90, 90) end if HalfBlendUpperCommonFunction(lower_state) == TRUE then return elseif HalfBlendLowerCommonFunction(Event_Event61000Mirror, lower_state, FALSE, FALSE) == TRUE then return else return end end function Event63000_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event63010_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event63020_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event63060_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event63070_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event65012_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event65013_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event69000_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event69001_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event69001_onDeactivate() act(138, FALSE) return end function Event69002_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event69003_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event69003_onDeactivate() act(138, FALSE) return end function Event69010_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event69030_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event69040_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event69050_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event69060_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event69070_onUpdate() act(9102) return end function Event90360_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90361_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90370_onUpdate() act(9102) return end function Event90970_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90430_onUpdate() if EventCommonFunction() == TRUE then return elseif env(1117) == TRUE then ExecEvent("W_Event90450") return else return end end function Event90460_onUpdate() act(9102) if IsDead() == TRUE then ExecEvent("W_Event90510") return elseif DAMAGE_LEVEL_NONE < env(236) then ExecEvent("W_Event90500") return else return end end function Event90470_onUpdate() Event90460_onUpdate() return end function Event90480_onUpdate() Event90460_onUpdate() return end function Event90490_onUpdate() act(9102) return end function Event90500_onUpdate() Event90460_onUpdate() return end function Event90510_onUpdate() act(9102) return end function Event90550_onUpdate() act(9102) if IsDead() == TRUE then ExecEvent("W_Event90600") return elseif DAMAGE_LEVEL_NONE < env(236) then ExecEvent("W_Event90590") return else return end end function Event90560_onUpdate() Event90550_onUpdate() return end function Event90570_onUpdate() act(9102) if IsDead() == TRUE then ExecEvent("W_Event90600") return elseif DAMAGE_LEVEL_NONE < env(236) then ExecEvent("W_Event90590") return elseif env(1117) == TRUE then ExecEvent("W_Event90560") return else return end end function Event90580_onUpdate() act(9102) return end function Event90590_onUpdate() Event90550_onUpdate() return end function Event90600_onUpdate() act(9102) return end function Event90610_onUpdate() act(9102) if IsDead() == TRUE then ExecEvent("W_Event90990") return elseif DAMAGE_LEVEL_NONE < env(236) then ExecEvent("W_Event90930") return else return end end function Event90620_onUpdate() Event90610_onUpdate() return end function Event90630_onUpdate() Event90610_onUpdate() return end function Event90640_onUpdate() act(9102) return end function Event90641_onUpdate() act(9102) return end function Event90680_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90690_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90960_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90691_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90710_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90720_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90721_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90390_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90400_onUpdate() if EventCommonFunction() == TRUE then return elseif env(1117) == TRUE then ExecEvent("W_Event90390") return else return end end function Event90410_onUpdate() act(9102) return end function Event90420_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90450_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90650_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90660_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90671_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90810_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90820_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90900_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90300_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90730_onUpdate() Event90610_onUpdate() return end function Event90930_onUpdate() Event90610_onUpdate() return end function Event90980_onUpdate() Event90550_onUpdate() return end function Event90990_onUpdate() act(9102) return end function Event90991_onDeactivate() function Event90830_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90831_onUpdate() if EventCommonFunction() == TRUE then return else return end end return end function Event90840_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90841_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90850_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90851_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90860_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90861_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90870_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90890_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90740_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90750_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90760_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90780_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90800_onUpdate() act(9102) if IsDead() == TRUE then ExecEvent("W_Event90950") return elseif DAMAGE_LEVEL_NONE < env(236) then ExecEvent("W_Event90940") return else return end end function Event90801_onUpdate() Event90800_onUpdate() return end function Event90940_onUpdate() Event90800_onUpdate() return end function Event90950_onUpdate() act(9102) return end function Event90340_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event99999_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90250_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90260_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90270_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event90280_onUpdate() act(9102) act(138, TRUE) return end function Event90290_onUpdate() act(9102) act(138, TRUE) return end function Event90291_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event90291_onDeactivate() act(138, FALSE) return end function Event91010_onUpdate() act(9102) act(138, TRUE) return end function Event91011_onUpdate() act(9102) act(138, TRUE) return end function Event91012_onUpdate() act(138, TRUE) if EventCommonFunction() == TRUE then act(138, FALSE) return else return end end function Event91012_onDeactivate() act(138, FALSE) return end function Event91013_onUpdate() act(9102) act(138, TRUE) return end function Event91020_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event91030_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event91040_onUpdate() act(9102) return end function Event91050_onUpdate() act(9102) return end function Event91051_onUpdate() act(9102) return end function Event91052_onUpdate() act(9102) return end function Event91060_onUpdate() act(9102) if IsDead() == TRUE then ExecEvent("W_Event91061") return elseif DAMAGE_LEVEL_NONE < env(236) and env(256) == TRUE then ExecEvent("W_Event91070") return else return end end function Event91061_onUpdate() act(9102) return end function Event91070_onUpdate() act(9102) if IsDead() == TRUE then ExecEvent("W_Event91061") return elseif DAMAGE_LEVEL_NONE < env(236) and env(256) == TRUE then ExecEvent("W_Event91070") return else return end end function Event91080_onUpdate() act(9102) SetThrowDefInvalid() if IsDead() == TRUE then ExecDeath() return elseif DAMAGE_LEVEL_NONE < env(236) and env(256) == TRUE then ExecEvent("W_Event91090") return else return end end function Event91090_onActivate() SetThrowDefInvalid() return end function Event91090_onUpdate() SetThrowDefInvalid() act(9102) return end function Event91100_onUpdate() act(9102) if DAMAGE_LEVEL_NONE < env(236) and env(256) == TRUE then ExecEvent("W_Event91110") return else return end end function Event91120_onUpdate() act(9102) if IsDead() == TRUE then ExecEvent("W_Event91061") return elseif DAMAGE_LEVEL_NONE < env(236) and env(256) == TRUE then ExecEvent("W_Event91070") return else return end end function Event91130_onUpdate() act(9102) if IsDead() == TRUE then ExecEvent("W_Event91061") return elseif DAMAGE_LEVEL_NONE < env(236) and env(256) == TRUE then ExecEvent("W_Event91070") return else return end end function Event91140_onUpdate() act(9102) if IsDead() == TRUE then ExecEvent("W_Event91061") return elseif DAMAGE_LEVEL_NONE < env(236) and env(256) == TRUE then ExecEvent("W_Event91070") return else return end end function Event91150_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event91160_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event91170_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event91180_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event91190_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event91200_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event91210_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event91220_onUpdate() if EventCommonFunction() == TRUE then return else return end end function Event91230_onUpdate() if EventCommonFunction() == TRUE then return else return end end function BonfireInitialize_onUpdate() if EventCommonFunction() == TRUE then return else return end end function BonfireStart_onActivate() act("貪欲者の印スリップダメージ無効") return end function BonfireStart_onUpdate() act("貪欲者の印スリップダメージ無効") if env("アニメ終了か", 1) == FALSE then act(9102) end return end function BonfireLoop_onActivate() act("貪欲者の印スリップダメージ無効") return end function BonfireLoop_onUpdate() act("貪欲者の印スリップダメージ無効") act(9102) act(138, TRUE) return end function BonfireLoop_onDeactivate() act(138, FALSE) return end function BonfireEnd_onActivate() act("貪欲者の印スリップダメージ無効") return end function BonfireEnd_onUpdate() act("貪欲者の印スリップダメージ無効") if EventCommonFunction() == TRUE then return else return end end function BonfireGiveHeroPoint_onActivate() act("貪欲者の印スリップダメージ無効") return end function BonfireGiveHeroPoint_onUpdate() act("貪欲者の印スリップダメージ無効") act(9102) return end function BonfireWarp_onActivate() act("貪欲者の印スリップダメージ無効") return end function BonfireWarp_onUpdate() act("貪欲者の印スリップダメージ無効") act(9102) return end function BonfireWarp2_onActivate() act("貪欲者の印スリップダメージ無効") return end function BonfireWarp2_onUpdate() act("貪欲者の印スリップダメージ無効") act(9102) return end function BonfireWarpEnd_onActivate() act("貪欲者の印スリップダメージ無効") return end function BonfireWarpEnd_onUpdate() act("貪欲者の印スリップダメージ無効") act(9102) return end function BonfireHumanRestore_onActivate() act("貪欲者の印スリップダメージ無効") return end function BonfireHumanRestore_onUpdate() act("貪欲者の印スリップダメージ無効") if env("アニメ終了か", 1) == FALSE then act(9102) end return end function Ladder_Activate() act(145) Flag_LadderDamage = LADDER_DAMAGE_NONE Flag_LadderJump = LADDER_JUMP_INVALID SetThrowInvalid() return end function Ladder_Update() SetThrowInvalid() LadderSetActionState(INVALID) return end function LadderAttachBottom_onUpdate() if env(322) == TRUE then return else ExecEvent("W_LadderStartBottom") return end end function LadderAttachTop_onUpdate() if env(322) == TRUE then return else ExecEvent("W_LadderStartTop") return end end function LadderStartTop_onActivate() act(145) return end function LadderStartTop_onUpdate() LadderSetActionState(LADDER_ACTION_START_TOP) if LadderMoveCommonFunction(HAND_STATE_LEFT, TRUE) == TRUE then return else return end end function LadderStartBottom_onActivate() act(145) return end function LadderStartBottom_onUpdate() LadderSetActionState(LADDER_ACTION_START_BOTTOM) if LadderMoveCommonFunction(HAND_STATE_LEFT, TRUE) == TRUE then return else return end end function LadderUpRight_onActivate() LadderSendCommand(LADDER_CALL_UP) return end function LadderUpRight_onUpdate() LadderSetActionState(LADDER_ACTION_UP_RIGHT) if LadderMoveCommonFunction(HAND_STATE_LEFT, FALSE) == TRUE then return else return end end function LadderUpLeft_onActivate() LadderSendCommand(LADDER_CALL_UP) return end function LadderUpLeft_onUpdate() LadderSetActionState(LADDER_ACTION_UP_LEFT) if LadderMoveCommonFunction(HAND_STATE_RIGHT, FALSE) == TRUE then return else return end end function LadderDownLeft_onActivate() LadderSendCommand(LADDER_CALL_DOWN) return end function LadderDownLeft_onUpdate() LadderSetActionState(LADDER_ACTION_DOWN_LEFT) if LadderMoveCommonFunction(HAND_STATE_RIGHT, FALSE) == TRUE then return else return end end function LadderDownRight_onActivate() LadderSendCommand(LADDER_CALL_DOWN) return end function LadderDownRight_onUpdate() LadderSetActionState(LADDER_ACTION_DOWN_RIGHT) if LadderMoveCommonFunction(HAND_STATE_LEFT, FALSE) == TRUE then return else return end end function LadderEndBottomLeft_onActivate() LadderSendCommand(LADDER_EVENT_COMMAND_EXIT) return end function LadderEndBottomLeft_onUpdate() if LadderEndCommonFunction() == TRUE then return else return end end function LadderEndBottomRight_onActivate() LadderSendCommand(LADDER_CALL_DOWN) return end function LadderEndBottomRight_onUpdate() if LadderEndCommonFunction() == TRUE then return else return end end function LadderEndTopLeft_onActivate() LadderSendCommand(LADDER_CALL_UP) return end function LadderEndTopLeft_onUpdate() if LadderEndCommonFunction() == TRUE then return else return end end function LadderEndTopRight_onActivate() LadderSendCommand(LADDER_CALL_UP) return end function LadderEndTopRight_onUpdate() if LadderEndCommonFunction() == TRUE then return else return end end function LadderIdleLeft_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_LEFT) if LadderIdleCommonFunction(HAND_STATE_LEFT) == TRUE then return else return end end function LadderIdleRight_onUpdate() LadderSetActionState(LADDER_ACTION_IDLE_RIGHT) if LadderIdleCommonFunction(HAND_STATE_RIGHT) == TRUE then return else return end end function LadderAttackUpRight_onUpdate() LadderSetActionState(LADDER_ACTION_ATTACK_UP_RIGHT) if LadderAttackCommonFunction(HAND_STATE_RIGHT) == TRUE then return else return end end function LadderAttackUpLeft_onUpdate() LadderSetActionState(LADDER_ACTION_ATTACK_UP_LEFT) if LadderAttackCommonFunction(HAND_STATE_LEFT) == TRUE then return else return end end function LadderAttackDownRight_onUpdate() LadderSetActionState(LADDER_ACTION_ATTACK_DOWN_RIGHT) if LadderAttackCommonFunction(HAND_STATE_RIGHT) == TRUE then return else return end end function LadderAttackDownLeft_onUpdate() LadderSetActionState(LADDER_ACTION_ATTACK_DOWN_RIGHT) if LadderAttackCommonFunction(HAND_STATE_LEFT) == TRUE then return else return end end function LadderCoastStart_onUpdate() LadderSetActionState(LADDER_ACTION_COAST_START) if LadderCoastCommonFunction(HAND_STATE_LEFT, TRUE) == TRUE then return else return end end function LadderCoastRight_onActivate() LadderSendCommand(LADDER_CALL_DOWN) return end function LadderCoastRight_onUpdate() LadderSetActionState(LADDER_ACTION_COAST_RIGHT) if LadderCoastCommonFunction(HAND_STATE_LEFT, FALSE) == TRUE then return else return end end function LadderCoastLeft_onActivate() LadderSendCommand(LADDER_CALL_DOWN) return end function LadderCoastLeft_onUpdate() LadderSetActionState(LADDER_ACTION_COAST_LEFT) if LadderCoastCommonFunction(HAND_STATE_RIGHT, FALSE) == TRUE then return else return end end function LadderCoastStopLeft_onUpdate() LadderSetActionState(LADDER_ACTION_COAST_STOP) if LadderMoveCommonFunction(HAND_STATE_LEFT, FALSE) == TRUE then return else return end end function LadderCoastStopRight_onUpdate() LadderSetActionState(LADDER_ACTION_COAST_STOP) if LadderMoveCommonFunction(HAND_STATE_RIGHT, FALSE) == TRUE then return else return end end function LadderCoastLanding_onActivate() LadderSendCommand(LADDER_CALL_DOWN) return end function LadderCoastLanding_onUpdate() if LadderEndCommonFunction() == TRUE then return else return end end function LadderDamageLargeRight_onUpdate() LadderSetActionState(LADDER_ACTION_DAMAGE_LARGE) if LadderDamageCommonFunction(HAND_STATE_RIGHT) == TRUE then return else return end end function LadderDamageSmallRight_onUpdate() LadderSetActionState(LADDER_ACTION_DAMAGE_SMALL) if LadderDamageCommonFunction(HAND_STATE_RIGHT) == TRUE then return else return end end function LadderDamageLargeLeft_onUpdate() LadderSetActionState(LADDER_ACTION_DAMAGE_LARGE) if LadderDamageCommonFunction(HAND_STATE_LEFT) == TRUE then return else return end end function LadderDamageSmallLeft_onUpdate() LadderSetActionState(LADDER_ACTION_DAMAGE_SMALL) if LadderDamageCommonFunction(HAND_STATE_LEFT) == TRUE then return else return end end function LadderDeathStart_onActivate() LadderSendCommand(LADDER_EVENT_COMMAND_EXIT) return end function LadderDeathLoop_onUpdate() if env(201) == TRUE then ExecEvent("LadderDeathLand") end local height = env(224) / 100 if 60 < height then ExecEvent("W_LadderDeathIdle") end return end function LadderDeathIdle_onActivate() act(126, TRUE) return end function LadderDeathIdle_onDeactivate() act(126, FALSE) return end function LadderFallStart_onActivate() LadderSendCommand(LADDER_EVENT_COMMAND_EXIT) return end function LadderFallLoop_onUpdate() if FallCommonFunction(TRUE, FALSE, FALL_LADDER) == TRUE then return else return end end function LadderFallLanding_onUpdate() if LandCommonFunction() == TRUE then return else return end end function LadderDrop_onUpdate() act(2001, math.random(160, 200) / 100) act(147) if env(200) == TRUE then ExecEventAllBody("W_FallLoop") return else return end end function SlideStart_onActivate() SetVariable("SlideAngle", 0) act(142, TRUE) return end function SlideStart_onUpdate() act(142, TRUE) if SlideCommonFunction(TRUE) == TRUE then act(142, FALSE) return TRUE elseif env("アニメ終了か", 0) == TRUE or env(301, 0) == TRUE then ExecEvent("W_SlideLoop") return else return end end function SlideLoop_onUpdate() if SlideCommonFunction(TRUE) == TRUE then act(142, FALSE) return TRUE end local turn_angle = hkbGetVariable("TurnAngle") local target_val = nil if 90 < turn_angle then target_val = 90 elseif turn_angle < -90 then target_val = -90 else target_val = turn_angle end SetVariable("SlideAngle", ConvergeValue(target_val, hkbGetVariable("SlideAngle"), 180, 180)) return end function SlideEnd_onActivate() act(142, FALSE) return TRUE end function SlideEnd_onUpdate() if SlideCommonFunction(FALSE) == TRUE then return TRUE else return end end function Init_onUpdate() ResetDamageCount() if env(1007) == TRUE then local event_id = env(105, 1) if event_id == 800 then ExecEvent("W_Event90700") return elseif event_id == 1200 then ExecEvent("W_Event90380") return elseif event_id == 1300 then ExecEvent("W_Event91000") return elseif event_id == 1700 then ExecEvent("W_Event90670") return elseif event_id == 1900 then ExecEvent("W_Event90770") return elseif event_id == 1901 then ExecEvent("W_Event90790") return end end ExecEvent("W_Idle") return end function SetThrowAtkInvalid() act(102, THROW_STATE_INVALID) return end function SetThrowDefInvalid() act(103, THROW_STATE_INVALID) return end function SetThrowInvalid() act(102, THROW_STATE_INVALID) act(103, THROW_STATE_INVALID) return end function CultStart1_onActivate() ResetEventState() act(138, FALSE) return end function CultStart1_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultCont1_onActivate() act(138, FALSE) return end function CultCont1_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultEnd1_onActivate() act(138, FALSE) return end function CultEnd1_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function CultInterrupt1_onActivate() act(138, FALSE) return end function CultInterrupt1_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function CultStart2_onActivate() ResetEventState() act(138, FALSE) return end function CultStart2_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultCont2_onActivate() act(138, FALSE) return end function CultCont2_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultEnd2_onActivate() act(138, FALSE) return end function CultEnd2_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function CultInterrupt2_onActivate() act(138, FALSE) return end function CultInterrupt2_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function CultStart3_onActivate() ResetEventState() act(138, FALSE) return end function CultStart3_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultCont3_onActivate() act(138, FALSE) return end function CultCont3_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultEnd3_onActivate() act(138, FALSE) return end function CultEnd3_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function CultInterrupt3_onActivate() act(138, FALSE) return end function CultInterrupt3_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function CultStart4_onActivate() ResetEventState() act(138, FALSE) return end function CultStart4_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultCont4_onActivate() act(138, FALSE) return end function CultCont4_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultEnd4_onActivate() act(138, FALSE) return end function CultEnd4_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function CultInterrupt4_onActivate() act(138, FALSE) return end function CultInterrupt4_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function CultStart5_onActivate() ResetEventState() act(138, FALSE) return end function CultStart5_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultCont5_onActivate() act(138, FALSE) return end function CultCont5_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultEnd5_onActivate() act(138, FALSE) return end function CultEnd5_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function CultInterrupt5_onActivate() act(138, FALSE) return end function CultInterrupt5_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function CultStart6_onActivate() ResetEventState() act(138, FALSE) return end function CultStart6_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultCont6_onActivate() act(138, FALSE) return end function CultCont6_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultEnd6_onActivate() act(138, FALSE) return end function CultEnd6_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function CultInterrupt6_onActivate() act(138, FALSE) return end function CultInterrupt6_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function CultStart7_onActivate() ResetEventState() act(138, FALSE) return end function CultStart7_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultCont7_onActivate() act(138, FALSE) return end function CultCont7_onUpdate() if CultCommonFunction(1, FALSE) == TRUE then act(138, TRUE) return else return end end function CultEnd7_onActivate() act(138, FALSE) return end function CultEnd7_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function CultInterrupt7_onActivate() act(138, FALSE) return end function CultInterrupt7_onUpdate() if CultCommonFunction(1, TRUE) == TRUE then act(138, TRUE) return elseif env("アニメ終了か", 1) == TRUE then act(138, TRUE) ExecEventAllBody("W_Idle") return else return end end function AddDamageDefault_onUpdate() SetVariable("AddDamageBlend", 0) return end function AddDamageDefaultGuard_onUpdate() SetVariable("AddDamageGuardBlend", 0) return end function SAMagic_Default_onUpdate() SetVariable("SAMagicBlendRate", 0) return end function DamageDirNoAdd_onUpdate() SetVariable("DamageDirBlendRate", 0) return end function SpeedUpdate() local stick_level = GetVariable("MoveSpeedLevel") local move_angle = GetVariable("MoveAngle") local is_aim = env(234) local move_id = env(257) if is_aim == TRUE then stick_level = 0 elseif move_id == WEIGHT_OVERWEIGHT or move_id == WEIGHT_OVERWEIGHT + 20 or move_id == WEIGHT_OVERWEIGHT + 40 or move_id == WEIGHT_OVERWEIGHT + 60 then stick_level = 0 elseif env(1116, 130110) == TRUE then if 1.10000002384186 < stick_level then stick_level = 1 end elseif env(305, CONDITION_TYPE_GRAVITY_MEDIUM) == TRUE then stick_level = 0 elseif env(305, CONDITION_TYPE_GRAVITY_WEAK) == TRUE then if 1.10000002384186 < stick_level then stick_level = 1 elseif 0 < stick_level then stick_level = 0 end elseif env(1116, 100220) == TRUE then stick_level = 2 elseif env(1116, 100020) == TRUE then if 1.10000002384186 < stick_level then stick_level = 1 end elseif GetVariable("MoveType") ~= 3 and 0.5 < stick_level then stick_level = 0.5 end if 1.10000002384186 < stick_level then if GetVariable("MoveType") == 3 then act("ロックオン中角度固定解除") end SetVariable("MoveSpeedIndex", 2) elseif 0.600000023841858 < stick_level then SetVariable("MoveSpeedIndex", 1) else SetVariable("MoveSpeedIndex", 0) end local speed = GetMoveSpeed(stick_level) SetVariable("MoveSpeedLevelReal", speed) if env(1001) <= 0 then act(2002, 100020) end if env(1116, 100002) == TRUE then act(110) local dT = GetDeltaTime() dash_dt_sum = dash_dt_sum + dT if 0.0649999976158142 < dash_dt_sum then dash_dt_sum = 0 act(1001, -1) end end return end function Update() GetConstVariable() SetStyleSpecialEffect() UpdateOldMonkState() act(101, FALSE) act("ロックオン時システム旋回不可角度", 0, 0) SetVariable("LocomotionState", GetLocomotionState()) SetVariable("ArtsTransition", 0) SetMoveType() if IsLowerQuickTurn() == TRUE then SetVariable("LookAtTwist30_OnGain", 1) SetVariable("LookAtTwist60_OnGain", 1) else SetVariable("LookAtTwist30_OnGain", 0.100000001490116) SetVariable("LookAtTwist60_OnGain", 0.200000002980232) end SetSwordArtsCancelType() SetGender() if IsNodeActive("QuickItem_Script", "SwordArtsRight_Script") == FALSE then ClearAttackQueue() end SetTimeActEditorVariable() UpdateFemaleBlend() UpdateShoulderTwist() UpdateWristTwist() g_FrameCount = g_FrameCount + 1 return end function ModifiersLayer_onGenerate() return end function Master_onGenerate() return end global = {} function dummy() return end global.__index = function (table, element) return dummy end setmetatable(_G, global) return