1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-07-10 14:27:45 +00:00

and blood lily

This commit is contained in:
collett 2020-03-08 03:28:08 +09:00
parent d3c656e8b8
commit f8e3e0333b
3 changed files with 34 additions and 1 deletions

View file

@ -587,6 +587,7 @@ namespace Sapphire::Common
// AetherflowStack = 30, // AetherflowStack = 30,
// Status = 32, // Status = 32,
PLDGauge = 41, PLDGauge = 41,
WHMBloodLily = 56,
WHMLily = 57, WHMLily = 57,
// RDMGaugeBoth = 74, // RDMGaugeBoth = 74,
//// RDMGaugeBlack = 75, // not right? //// RDMGaugeBlack = 75, // not right?
@ -1077,6 +1078,7 @@ namespace Sapphire::Common
GainMPPercentage = 4, GainMPPercentage = 4,
GainJobResource = 8, GainJobResource = 8,
SelfHeal = 16, SelfHeal = 16,
DamageFallOff = 32,
}; };
enum ActionBonusEffectRequirement : uint8_t enum ActionBonusEffectRequirement : uint8_t

View file

@ -464,15 +464,27 @@ void Action::Action::buildEffects()
} }
bool isFirstValidVictim = true; bool isFirstValidVictim = true;
int victimCounter = 0;
for( auto& actor : m_hitActors ) for( auto& actor : m_hitActors )
{ {
victimCounter++;
if( m_lutEntry.damagePotency > 0 ) if( m_lutEntry.damagePotency > 0 )
{ {
Common::AttackType attackType = static_cast< Common::AttackType >( m_actionData->attackType ); Common::AttackType attackType = static_cast< Common::AttackType >( m_actionData->attackType );
actor->onActionHostile( m_pSource ); actor->onActionHostile( m_pSource );
auto dmg = calcDamage( isCorrectCombo() ? m_lutEntry.damageComboPotency : m_lutEntry.damagePotency ); 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 ); dmg.first = Math::CalcStats::applyDamageReceiveMultiplier( *actor, dmg.first, attackType );
float originalDamage = dmg.first; float originalDamage = dmg.first;
@ -808,6 +820,23 @@ bool Action::Action::primaryCostCheck( bool subtractCosts )
return false; 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: case Common::ActionPrimaryCostType::WHMLily:
{ {
auto pPlayer = m_pSource->getAsPlayer(); auto pPlayer = m_pSource->getAsPlayer();

View file

@ -1849,7 +1849,9 @@ ActionLut::Lut ActionLut::m_actionLut =
{ 16533, { 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, { 16533, { 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
//Afflatus Misery, ハート・オブ・ミゼリ //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, ハート・オブ・ラプチャー //Afflatus Rapture, ハート・オブ・ラプチャー
//has heal: potency 300 //has heal: potency 300