diff --git a/Re-Abyss/app/components/Actor/Common/ColCtrl.cpp b/Re-Abyss/app/components/Actor/Common/ColCtrl.cpp index 30ef6acb..c01201b0 100644 --- a/Re-Abyss/app/components/Actor/Common/ColCtrl.cpp +++ b/Re-Abyss/app/components/Actor/Common/ColCtrl.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -54,6 +54,10 @@ namespace abyss::Actor } return m_branchs[index]; } + size_t ColCtrl::branchCount() const + { + return m_branchs.size(); + } bool ColCtrl::isHitAny() const { return m_branchs.any([](const Ref& b) { diff --git a/Re-Abyss/app/components/Actor/Common/ColCtrl.hpp b/Re-Abyss/app/components/Actor/Common/ColCtrl.hpp index 9f1f1d15..348fed23 100644 --- a/Re-Abyss/app/components/Actor/Common/ColCtrl.hpp +++ b/Re-Abyss/app/components/Actor/Common/ColCtrl.hpp @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include #include #include @@ -33,6 +33,12 @@ namespace abyss::Actor /// Ref branch(size_t index) const; + /// + /// ブランチ数 + /// + /// + size_t branchCount() const; + /// /// 何かにヒットしたか /// @@ -111,4 +117,4 @@ namespace abyss::Actor s3d::Array> m_branchs; bool m_isActive = true; }; -} \ No newline at end of file +} diff --git a/Re-Abyss/app/components/Actor/Common/DamageCtrl.cpp b/Re-Abyss/app/components/Actor/Common/DamageCtrl.cpp index ef4e2d81..3cd7addc 100644 --- a/Re-Abyss/app/components/Actor/Common/DamageCtrl.cpp +++ b/Re-Abyss/app/components/Actor/Common/DamageCtrl.cpp @@ -1,8 +1,9 @@ -#include +#include #include #include #include #include +#include #include namespace abyss::Actor @@ -51,7 +52,14 @@ namespace abyss::Actor // 無敵 return; } - +#if ABYSS_DEBUG + if (Debug::MenuUtil::IsDebug(Debug::DebugFlag::ActorInvincible) && + m_colCtrl->branchCount() >= 1 && + m_colCtrl->branch(0)->layer() == ColSys::LayerGroup::Player) { + // 無敵 + return; + } +#endif DamageData data; const bool isDamaged = m_colCtrl->anyThen([this, &data](s3d::uint64 id, const Col::Attacker::Data& attacker) { const auto& record = m_comboHistory.find(id);