mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-25 11:07:45 +00:00
sam actions
This commit is contained in:
parent
030f681dc8
commit
07ddfe88f4
13 changed files with 467 additions and 2 deletions
|
@ -22,14 +22,14 @@ public:
|
|||
|
||||
void onBeforeBuildEffect( Sapphire::World::Action::Action& action, uint8_t victimCounter, uint8_t validVictimCounter ) override
|
||||
{
|
||||
if( validVictimCounter > 0 )
|
||||
if( validVictimCounter > 0 && action.isCorrectCombo() )
|
||||
{
|
||||
auto chara = action.getSourceChara();
|
||||
auto heal = action.calcHealing( 150 );
|
||||
heal.first = Math::CalcStats::applyHealingReceiveMultiplier( *chara, heal.first );
|
||||
action.getEffectbuilder()->heal( chara, chara, heal.first, heal.second );
|
||||
|
||||
if( chara->getLevel() >= 52 )
|
||||
if( chara->getLevel() >= 52 && heal.first > 0 )
|
||||
{
|
||||
World::Action::StatusEffectEntry effectEntry;
|
||||
effectEntry.effectType = static_cast< uint32_t >( Common::StatusEffectType::Shield );
|
||||
|
|
59
src/scripts/action/sam/ActionEnpi7486.cpp
Normal file
59
src/scripts/action/sam/ActionEnpi7486.cpp
Normal file
|
@ -0,0 +1,59 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
#include <Action/Action.h>
|
||||
#include <Math/CalcStats.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
const uint16_t STATUS_ID_ENHANCED_ENPI = 1236;
|
||||
|
||||
class ActionEnpi7486 :
|
||||
public ScriptAPI::ActionScript
|
||||
{
|
||||
public:
|
||||
ActionEnpi7486() :
|
||||
ScriptAPI::ActionScript( 7486 )
|
||||
{
|
||||
}
|
||||
|
||||
void onBeforeBuildEffect( Sapphire::World::Action::Action& action, uint8_t victimCounter, uint8_t validVictimCounter ) override
|
||||
{
|
||||
if( validVictimCounter > 0 )
|
||||
{
|
||||
auto pPlayer = action.getSourceChara()->getAsPlayer();
|
||||
assert( pPlayer );
|
||||
int kenki = pPlayer->gaugeSamGetKenki();
|
||||
auto level = pPlayer->getLevel();
|
||||
if( level >= 52 )
|
||||
{
|
||||
kenki += 5;
|
||||
}
|
||||
if( pPlayer->getLevel() >= 62 )
|
||||
{
|
||||
kenki += 5;
|
||||
}
|
||||
pPlayer->gaugeSamSetKenki( std::min( 100, kenki ) );
|
||||
}
|
||||
}
|
||||
|
||||
void onExecute( Sapphire::World::Action::Action& action ) override
|
||||
{
|
||||
auto effectEntry = action.getSourceChara()->getStatusEffectById( STATUS_ID_ENHANCED_ENPI );
|
||||
if( effectEntry.second )
|
||||
{
|
||||
action.getSourceChara()->removeStatusEffect( effectEntry.first );
|
||||
}
|
||||
}
|
||||
|
||||
void onBeforePreCheck( Sapphire::World::Action::Action& action ) override
|
||||
{
|
||||
auto effectEntry = action.getSourceChara()->getStatusEffectById( STATUS_ID_ENHANCED_ENPI );
|
||||
if( effectEntry.second )
|
||||
{
|
||||
action.getActionEntry().damagePotency = 320;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( ActionEnpi7486 );
|
32
src/scripts/action/sam/ActionFuga7483.cpp
Normal file
32
src/scripts/action/sam/ActionFuga7483.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
#include <Action/Action.h>
|
||||
#include <Math/CalcStats.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class ActionFuga7483 :
|
||||
public ScriptAPI::ActionScript
|
||||
{
|
||||
public:
|
||||
ActionFuga7483() :
|
||||
ScriptAPI::ActionScript( 7483 )
|
||||
{
|
||||
}
|
||||
|
||||
void onBeforeBuildEffect( Sapphire::World::Action::Action& action, uint8_t victimCounter, uint8_t validVictimCounter ) override
|
||||
{
|
||||
if( validVictimCounter > 0 )
|
||||
{
|
||||
auto pPlayer = action.getSourceChara()->getAsPlayer();
|
||||
assert( pPlayer );
|
||||
if( pPlayer->getLevel() >= 62 )
|
||||
{
|
||||
pPlayer->gaugeSamSetKenki( std::min( 100, pPlayer->gaugeSamGetKenki() + 5 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( ActionFuga7483 );
|
43
src/scripts/action/sam/ActionGekko7481.cpp
Normal file
43
src/scripts/action/sam/ActionGekko7481.cpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
#include <Action/Action.h>
|
||||
#include <Math/CalcStats.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class ActionGekko7481 :
|
||||
public ScriptAPI::ActionScript
|
||||
{
|
||||
public:
|
||||
ActionGekko7481() :
|
||||
ScriptAPI::ActionScript( 7481 )
|
||||
{
|
||||
}
|
||||
|
||||
void onBeforeBuildEffect( Sapphire::World::Action::Action& action, uint8_t victimCounter, uint8_t validVictimCounter ) override
|
||||
{
|
||||
if( validVictimCounter > 0 && action.isCorrectCombo() )
|
||||
{
|
||||
auto pPlayer = action.getSourceChara()->getAsPlayer();
|
||||
assert( pPlayer );
|
||||
int kenki = pPlayer->gaugeSamGetKenki();
|
||||
auto level = pPlayer->getLevel();
|
||||
if( /*positional &&*/ level >= 52 )
|
||||
{
|
||||
kenki += 5;
|
||||
}
|
||||
if( pPlayer->getLevel() >= 62 )
|
||||
{
|
||||
kenki += 5;
|
||||
}
|
||||
pPlayer->gaugeSamSetKenki( std::min( 100, kenki ) );
|
||||
if( level >= 30 )
|
||||
{
|
||||
pPlayer->gaugeSamSetSen( Common::SamSen::Getsu, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( ActionGekko7481 );
|
37
src/scripts/action/sam/ActionHagakure7495.cpp
Normal file
37
src/scripts/action/sam/ActionHagakure7495.cpp
Normal file
|
@ -0,0 +1,37 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
#include <Action/Action.h>
|
||||
#include <Math/CalcStats.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class ActionHagakure7495 :
|
||||
public ScriptAPI::ActionScript
|
||||
{
|
||||
public:
|
||||
ActionHagakure7495() :
|
||||
ScriptAPI::ActionScript( 7495 )
|
||||
{
|
||||
}
|
||||
|
||||
void onExecute( Sapphire::World::Action::Action& action ) override
|
||||
{
|
||||
auto pPlayer = action.getSourceChara()->getAsPlayer();
|
||||
assert( pPlayer );
|
||||
if( pPlayer->gaugeSamHasAnySen() )
|
||||
{
|
||||
int kenki = pPlayer->gaugeSamGetKenki();
|
||||
if( pPlayer->gaugeSamGetSen( Common::SamSen::Getsu ) )
|
||||
kenki += 10;
|
||||
if( pPlayer->gaugeSamGetSen( Common::SamSen::Setsu ) )
|
||||
kenki += 10;
|
||||
if( pPlayer->gaugeSamGetSen( Common::SamSen::Ka ) )
|
||||
kenki += 10;
|
||||
pPlayer->gaugeSamSetKenki( std::min( 100, kenki ) );
|
||||
pPlayer->gaugeSamSetSen( Common::SamSen::None );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( ActionHagakure7495 );
|
32
src/scripts/action/sam/ActionHakaze7477.cpp
Normal file
32
src/scripts/action/sam/ActionHakaze7477.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
#include <Action/Action.h>
|
||||
#include <Math/CalcStats.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class ActionHakaze7477 :
|
||||
public ScriptAPI::ActionScript
|
||||
{
|
||||
public:
|
||||
ActionHakaze7477() :
|
||||
ScriptAPI::ActionScript( 7477 )
|
||||
{
|
||||
}
|
||||
|
||||
void onBeforeBuildEffect( Sapphire::World::Action::Action& action, uint8_t victimCounter, uint8_t validVictimCounter ) override
|
||||
{
|
||||
if( validVictimCounter > 0 )
|
||||
{
|
||||
auto pPlayer = action.getSourceChara()->getAsPlayer();
|
||||
assert( pPlayer );
|
||||
if( pPlayer->getLevel() >= 62 )
|
||||
{
|
||||
pPlayer->gaugeSamSetKenki( std::min( 100, pPlayer->gaugeSamGetKenki() + 5 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( ActionHakaze7477 );
|
26
src/scripts/action/sam/ActionIkishoten16482.cpp
Normal file
26
src/scripts/action/sam/ActionIkishoten16482.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
#include <Action/Action.h>
|
||||
#include <Math/CalcStats.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class ActionIkishoten16482 :
|
||||
public ScriptAPI::ActionScript
|
||||
{
|
||||
public:
|
||||
ActionIkishoten16482() :
|
||||
ScriptAPI::ActionScript( 16482 )
|
||||
{
|
||||
}
|
||||
|
||||
void onExecute( Sapphire::World::Action::Action& action ) override
|
||||
{
|
||||
auto pPlayer = action.getSourceChara()->getAsPlayer();
|
||||
assert( pPlayer );
|
||||
pPlayer->gaugeSamSetKenki( std::min( 100, pPlayer->gaugeSamGetKenki() + 50 ) );
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( ActionIkishoten16482 );
|
32
src/scripts/action/sam/ActionJinpu7478.cpp
Normal file
32
src/scripts/action/sam/ActionJinpu7478.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
#include <Action/Action.h>
|
||||
#include <Math/CalcStats.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class ActionJinpu7478 :
|
||||
public ScriptAPI::ActionScript
|
||||
{
|
||||
public:
|
||||
ActionJinpu7478() :
|
||||
ScriptAPI::ActionScript( 7478 )
|
||||
{
|
||||
}
|
||||
|
||||
void onBeforeBuildEffect( Sapphire::World::Action::Action& action, uint8_t victimCounter, uint8_t validVictimCounter ) override
|
||||
{
|
||||
if( validVictimCounter > 0 && action.isCorrectCombo() )
|
||||
{
|
||||
auto pPlayer = action.getSourceChara()->getAsPlayer();
|
||||
assert( pPlayer );
|
||||
if( pPlayer->getLevel() >= 62 )
|
||||
{
|
||||
pPlayer->gaugeSamSetKenki( std::min( 100, pPlayer->gaugeSamGetKenki() + 5 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( ActionJinpu7478 );
|
43
src/scripts/action/sam/ActionKasha7482.cpp
Normal file
43
src/scripts/action/sam/ActionKasha7482.cpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
#include <Action/Action.h>
|
||||
#include <Math/CalcStats.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class ActionKasha7482 :
|
||||
public ScriptAPI::ActionScript
|
||||
{
|
||||
public:
|
||||
ActionKasha7482() :
|
||||
ScriptAPI::ActionScript( 7482 )
|
||||
{
|
||||
}
|
||||
|
||||
void onBeforeBuildEffect( Sapphire::World::Action::Action& action, uint8_t victimCounter, uint8_t validVictimCounter ) override
|
||||
{
|
||||
if( validVictimCounter > 0 && action.isCorrectCombo() )
|
||||
{
|
||||
auto pPlayer = action.getSourceChara()->getAsPlayer();
|
||||
assert( pPlayer );
|
||||
int kenki = pPlayer->gaugeSamGetKenki();
|
||||
auto level = pPlayer->getLevel();
|
||||
if( /*positional &&*/ level >= 52 )
|
||||
{
|
||||
kenki += 5;
|
||||
}
|
||||
if( pPlayer->getLevel() >= 62 )
|
||||
{
|
||||
kenki += 5;
|
||||
}
|
||||
pPlayer->gaugeSamSetKenki( std::min( 100, kenki ) );
|
||||
if( level >= 40 )
|
||||
{
|
||||
pPlayer->gaugeSamSetSen( Common::SamSen::Ka, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( ActionKasha7482 );
|
43
src/scripts/action/sam/ActionMangetsu7484.cpp
Normal file
43
src/scripts/action/sam/ActionMangetsu7484.cpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
#include <Action/Action.h>
|
||||
#include <Math/CalcStats.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class ActionMangetsu7484 :
|
||||
public ScriptAPI::ActionScript
|
||||
{
|
||||
public:
|
||||
ActionMangetsu7484() :
|
||||
ScriptAPI::ActionScript( 7484 )
|
||||
{
|
||||
}
|
||||
|
||||
void onBeforeBuildEffect( Sapphire::World::Action::Action& action, uint8_t victimCounter, uint8_t validVictimCounter ) override
|
||||
{
|
||||
if( validVictimCounter > 0 && action.isCorrectCombo() )
|
||||
{
|
||||
auto pPlayer = action.getSourceChara()->getAsPlayer();
|
||||
assert( pPlayer );
|
||||
int kenki = pPlayer->gaugeSamGetKenki();
|
||||
auto level = pPlayer->getLevel();
|
||||
if( level >= 52 )
|
||||
{
|
||||
kenki += 5;
|
||||
}
|
||||
if( pPlayer->getLevel() >= 62 )
|
||||
{
|
||||
kenki += 5;
|
||||
}
|
||||
pPlayer->gaugeSamSetKenki( std::min( 100, kenki ) );
|
||||
if( level >= 35 )
|
||||
{
|
||||
pPlayer->gaugeSamSetSen( Common::SamSen::Getsu, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( ActionMangetsu7484 );
|
43
src/scripts/action/sam/ActionOka7485.cpp
Normal file
43
src/scripts/action/sam/ActionOka7485.cpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
#include <Action/Action.h>
|
||||
#include <Math/CalcStats.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class ActionOka7485 :
|
||||
public ScriptAPI::ActionScript
|
||||
{
|
||||
public:
|
||||
ActionOka7485() :
|
||||
ScriptAPI::ActionScript( 7485 )
|
||||
{
|
||||
}
|
||||
|
||||
void onBeforeBuildEffect( Sapphire::World::Action::Action& action, uint8_t victimCounter, uint8_t validVictimCounter ) override
|
||||
{
|
||||
if( validVictimCounter > 0 && action.isCorrectCombo() )
|
||||
{
|
||||
auto pPlayer = action.getSourceChara()->getAsPlayer();
|
||||
assert( pPlayer );
|
||||
int kenki = pPlayer->gaugeSamGetKenki();
|
||||
auto level = pPlayer->getLevel();
|
||||
if( level >= 52 )
|
||||
{
|
||||
kenki += 5;
|
||||
}
|
||||
if( pPlayer->getLevel() >= 62 )
|
||||
{
|
||||
kenki += 5;
|
||||
}
|
||||
pPlayer->gaugeSamSetKenki( std::min( 100, kenki ) );
|
||||
if( level >= 45 )
|
||||
{
|
||||
pPlayer->gaugeSamSetSen( Common::SamSen::Ka, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( ActionOka7485 );
|
32
src/scripts/action/sam/ActionShifu7479.cpp
Normal file
32
src/scripts/action/sam/ActionShifu7479.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
#include <Action/Action.h>
|
||||
#include <Math/CalcStats.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class ActionShifu7479 :
|
||||
public ScriptAPI::ActionScript
|
||||
{
|
||||
public:
|
||||
ActionShifu7479() :
|
||||
ScriptAPI::ActionScript( 7479 )
|
||||
{
|
||||
}
|
||||
|
||||
void onBeforeBuildEffect( Sapphire::World::Action::Action& action, uint8_t victimCounter, uint8_t validVictimCounter ) override
|
||||
{
|
||||
if( validVictimCounter > 0 && action.isCorrectCombo() )
|
||||
{
|
||||
auto pPlayer = action.getSourceChara()->getAsPlayer();
|
||||
assert( pPlayer );
|
||||
if( pPlayer->getLevel() >= 62 )
|
||||
{
|
||||
pPlayer->gaugeSamSetKenki( std::min( 100, pPlayer->gaugeSamGetKenki() + 5 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( ActionShifu7479 );
|
43
src/scripts/action/sam/ActionYukikaze7480.cpp
Normal file
43
src/scripts/action/sam/ActionYukikaze7480.cpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
#include <Action/Action.h>
|
||||
#include <Math/CalcStats.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class ActionYukikaze7480 :
|
||||
public ScriptAPI::ActionScript
|
||||
{
|
||||
public:
|
||||
ActionYukikaze7480() :
|
||||
ScriptAPI::ActionScript( 7480 )
|
||||
{
|
||||
}
|
||||
|
||||
void onBeforeBuildEffect( Sapphire::World::Action::Action& action, uint8_t victimCounter, uint8_t validVictimCounter ) override
|
||||
{
|
||||
if( validVictimCounter > 0 && action.isCorrectCombo() )
|
||||
{
|
||||
auto pPlayer = action.getSourceChara()->getAsPlayer();
|
||||
assert( pPlayer );
|
||||
int kenki = pPlayer->gaugeSamGetKenki();
|
||||
auto level = pPlayer->getLevel();
|
||||
if( level >= 52 )
|
||||
{
|
||||
kenki += 10;
|
||||
}
|
||||
if( pPlayer->getLevel() >= 62 )
|
||||
{
|
||||
kenki += 5;
|
||||
}
|
||||
pPlayer->gaugeSamSetKenki( std::min( 100, kenki ) );
|
||||
if( level >= 50 )
|
||||
{
|
||||
pPlayer->gaugeSamSetSen( Common::SamSen::Setsu, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( ActionYukikaze7480 );
|
Loading…
Add table
Reference in a new issue