From f8e3e0333b4f2e007aa4d58d2fc607b8d9290a8e Mon Sep 17 00:00:00 2001 From: collett Date: Sun, 8 Mar 2020 03:28:08 +0900 Subject: [PATCH] and blood lily --- src/common/Common.h | 2 ++ src/world/Action/Action.cpp | 29 +++++++++++++++++++++++++++++ src/world/Action/ActionLutData.cpp | 4 +++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/common/Common.h b/src/common/Common.h index 801fe967..ea73e2de 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -587,6 +587,7 @@ namespace Sapphire::Common // AetherflowStack = 30, // Status = 32, PLDGauge = 41, + WHMBloodLily = 56, WHMLily = 57, // RDMGaugeBoth = 74, //// RDMGaugeBlack = 75, // not right? @@ -1077,6 +1078,7 @@ namespace Sapphire::Common GainMPPercentage = 4, GainJobResource = 8, SelfHeal = 16, + DamageFallOff = 32, }; enum ActionBonusEffectRequirement : uint8_t diff --git a/src/world/Action/Action.cpp b/src/world/Action/Action.cpp index 5b94fa05..1f644b96 100644 --- a/src/world/Action/Action.cpp +++ b/src/world/Action/Action.cpp @@ -464,15 +464,27 @@ void Action::Action::buildEffects() } bool isFirstValidVictim = true; + int victimCounter = 0; for( auto& actor : m_hitActors ) { + victimCounter++; if( m_lutEntry.damagePotency > 0 ) { Common::AttackType attackType = static_cast< Common::AttackType >( m_actionData->attackType ); actor->onActionHostile( m_pSource ); auto dmg = calcDamage( isCorrectCombo() ? m_lutEntry.damageComboPotency : m_lutEntry.damagePotency ); + if( victimCounter > 1 ) + { + if( m_lutEntry.bonusEffect & Common::ActionBonusEffect::DamageFallOff ) + { + if( checkActionBonusRequirement() ) + { + dmg.first = static_cast< uint32_t >( 1.0 * dmg.first * ( m_lutEntry.bonusDataByte1 / 100.0 ) ); + } + } + } dmg.first = Math::CalcStats::applyDamageReceiveMultiplier( *actor, dmg.first, attackType ); float originalDamage = dmg.first; @@ -808,6 +820,23 @@ bool Action::Action::primaryCostCheck( bool subtractCosts ) return false; } + case Common::ActionPrimaryCostType::WHMBloodLily: + { + auto pPlayer = m_pSource->getAsPlayer(); + if( pPlayer ) + { + auto bloodLily = pPlayer->gaugeWhmGetBloodLily(); + if( bloodLily >= m_primaryCost ) + { + if( subtractCosts ) + pPlayer->gaugeWhmSetLilies( pPlayer->gaugeWhmGetLily(), bloodLily - m_primaryCost ); + + return true; + } + } + return false; + } + case Common::ActionPrimaryCostType::WHMLily: { auto pPlayer = m_pSource->getAsPlayer(); diff --git a/src/world/Action/ActionLutData.cpp b/src/world/Action/ActionLutData.cpp index eaa7be6d..02a6fc64 100644 --- a/src/world/Action/ActionLutData.cpp +++ b/src/world/Action/ActionLutData.cpp @@ -1849,7 +1849,9 @@ ActionLut::Lut ActionLut::m_actionLut = { 16533, { 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, //Afflatus Misery, ハート・オブ・ミゼリ - { 16535, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + //has damage: potency 900, combo potency 0, directional potency 0 + //has bonus effect: DamageFallOff, 75 + { 16535, { 900, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 75 } }, //Afflatus Rapture, ハート・オブ・ラプチャー //has heal: potency 300