mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-25 11:07:45 +00:00
more war stuff
This commit is contained in:
parent
e75db49d37
commit
e7c44ccff7
5 changed files with 61 additions and 6 deletions
|
@ -582,7 +582,7 @@ namespace Sapphire::Common
|
|||
MagicPoints = 3,
|
||||
TacticsPoints = 5,
|
||||
StatusEffect = 10,
|
||||
// WARGauge = 22,
|
||||
WARGauge = 22,
|
||||
// DRKGauge = 25,
|
||||
// AetherflowStack = 30,
|
||||
// Status = 32,
|
||||
|
@ -625,7 +625,7 @@ namespace Sapphire::Common
|
|||
TpGain = 13,
|
||||
GpGain = 14,
|
||||
ApplyStatusEffectTarget = 15,
|
||||
ApplyStatusEffectSource = 16,
|
||||
ApplyStatusEffectSource = 16, // effect entry on target but buff applies to source, like storm's eye
|
||||
StatusNoEffect = 21,
|
||||
/*!
|
||||
* @brief Tells the client that it should show combo indicators on actions.
|
||||
|
@ -633,11 +633,12 @@ namespace Sapphire::Common
|
|||
* @param flags Required to be 128, doesn't show combo rings on hotbars otherwise
|
||||
* @param value The actionid that starts/continues the combo. eg, 3617 will start a spinning slash and/or syphon strike combo
|
||||
*/
|
||||
StartActionCombo = 28, // actually this is more likely "ActionComplete" or something like that
|
||||
StartActionCombo = 28, // ActionComplete? see comment in Action::buildEffects()
|
||||
ComboSucceed = 29,
|
||||
Knockback = 33,
|
||||
Mount = 39,
|
||||
VFX = 59, // links to VFX sheet
|
||||
//Type60 = 60, // unknown, seen on some war ws
|
||||
};
|
||||
|
||||
enum class ActionHitSeverityType : uint8_t
|
||||
|
|
36
src/scripts/action/war/ActionInfuriate52.cpp
Normal file
36
src/scripts/action/war/ActionInfuriate52.cpp
Normal file
|
@ -0,0 +1,36 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
#include <Action/Action.h>
|
||||
#include <Math/CalcStats.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
using namespace Sapphire::StatusEffect;
|
||||
|
||||
const uint16_t STATUS_ID_NASCENT_CHAOS = 1897;
|
||||
|
||||
class ActionInfuriate52 :
|
||||
public ScriptAPI::ActionScript
|
||||
{
|
||||
public:
|
||||
ActionInfuriate52() :
|
||||
ScriptAPI::ActionScript( 52 )
|
||||
{
|
||||
}
|
||||
|
||||
void onExecute( Sapphire::World::Action::Action& action ) override
|
||||
{
|
||||
auto pPlayer = action.getSourceChara()->getAsPlayer();
|
||||
assert( pPlayer );
|
||||
uint8_t ib = pPlayer->gaugeWarGetIb();
|
||||
ib = std::min( 100, ib + 50 );
|
||||
pPlayer->gaugeWarSetIb( ib );
|
||||
if( pPlayer->getLevel() >= 72 )
|
||||
{
|
||||
auto pEffect = action.createStatusEffect( STATUS_ID_NASCENT_CHAOS, action.getSourceChara(), action.getSourceChara(), 30000, 3000 );
|
||||
action.getEffectbuilder()->applyStatusEffect( action.getSourceChara(), action.getSourceChara(), pEffect );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( ActionInfuriate52 );
|
|
@ -485,7 +485,7 @@ void Action::Action::buildEffects()
|
|||
|
||||
if( !isComboAction() || isCorrectCombo() )
|
||||
{
|
||||
if ( !m_actionData->preservesCombo ) // we need something like m_actionData->hasNextComboAction
|
||||
if ( !m_actionData->preservesCombo ) // this matches retail packet, on all standalone actions even casts.
|
||||
{
|
||||
m_effectBuilder->startCombo( actor, getId() ); // this is on all targets hit
|
||||
}
|
||||
|
@ -673,6 +673,23 @@ bool Action::Action::primaryCostCheck( bool subtractCosts )
|
|||
return true;
|
||||
}
|
||||
|
||||
case Common::ActionPrimaryCostType::WARGauge:
|
||||
{
|
||||
auto pPlayer = m_pSource->getAsPlayer();
|
||||
if( pPlayer )
|
||||
{
|
||||
auto ib = pPlayer->gaugeWarGetIb();
|
||||
if( ib >= m_primaryCost )
|
||||
{
|
||||
if( subtractCosts )
|
||||
pPlayer->gaugeWarSetIb( ib - m_primaryCost );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// free casts, likely just pure ogcds
|
||||
case Common::ActionPrimaryCostType::None:
|
||||
{
|
||||
|
|
|
@ -190,8 +190,8 @@ ActionLut::Lut ActionLut::m_actionLut =
|
|||
{ 51, { 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
|
||||
|
||||
//Infuriate, ウォークライ
|
||||
//applies to self: Nascent Chaos, 原初の混沌, duration 30000, param 0
|
||||
{ 52, { 0, 0, 0, 0, 0, 1897, 30000, 0, 0, 0, 0, 0 } },
|
||||
//comment: status removed need script
|
||||
{ 52, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
|
||||
|
||||
//Fell Cleave, フェルクリーヴ
|
||||
//has damage: potency 590, combo potency 0, directional potency 0
|
||||
|
|
|
@ -103,6 +103,7 @@ void World::Manager::ActionMgr::bootstrapAction( Entity::Player& player,
|
|||
{
|
||||
if( !currentAction->preCheck() )
|
||||
{
|
||||
player.sendDebug( "preCheck failed" );
|
||||
// forcefully interrupt the action and reset the cooldown
|
||||
currentAction->interrupt();
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue