From 390a53a6c628d3bba6793542496dd7b3c6cc0c57 Mon Sep 17 00:00:00 2001 From: Lucy <44952533+Skyliegirl33@users.noreply.github.com> Date: Wed, 8 Mar 2023 18:10:51 +0100 Subject: [PATCH] Add statuseffect cost type --- src/common/Common.h | 1 + src/world/Action/Action.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/common/Common.h b/src/common/Common.h index 09b8a0fe..b8b8220c 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -938,6 +938,7 @@ namespace Sapphire::Common MagicPoints = 3, TacticsPoints = 5, TacticsPoints1 = 6, + StatusEffect = 10, Sprint = 18, // WARGauge = 22, // DRKGauge = 25, diff --git a/src/world/Action/Action.cpp b/src/world/Action/Action.cpp index e2ff4b27..02c8c8d4 100644 --- a/src/world/Action/Action.cpp +++ b/src/world/Action/Action.cpp @@ -783,6 +783,17 @@ bool Action::Action::primaryCostCheck( bool subtractCosts ) return true; } + case Common::ActionPrimaryCostType::StatusEffect: + { + if( !m_pSource->hasStatusEffect( m_primaryCost ) ) + return false; + + if( subtractCosts ) + m_pSource->removeSingleStatusEffectById( m_primaryCost ); + + return true; + } + // free casts, likely just pure ogcds case Common::ActionPrimaryCostType::None: {