From e67afee8874a78301e907039cf8ce9fd5d1253de Mon Sep 17 00:00:00 2001 From: collett Date: Thu, 9 Apr 2020 08:13:20 +0900 Subject: [PATCH] gnb implementation, some old bug fixes as well. --- src/scripts/action/brd/ActionHeavyShot97.cpp | 4 +- .../action/gnb/ActionBloodfest16164.cpp | 32 +++++++++++++ .../action/gnb/ActionBrutalShell16139.cpp | 45 +++++++++++++++++++ .../action/gnb/ActionGnashingFang16146.cpp | 41 +++++++++++++++++ .../action/gnb/ActionSavageClaw16147.cpp | 41 +++++++++++++++++ .../action/gnb/ActionWickedTalon16150.cpp | 41 +++++++++++++++++ src/scripts/action/role/ActionProvoke7533.cpp | 29 ++++++++++++ src/world/Action/Action.cpp | 15 ++++--- src/world/Action/ActionLutData.cpp | 27 +++++------ src/world/Action/EffectResult.cpp | 1 - src/world/Actor/Chara.cpp | 2 +- src/world/Actor/Player.cpp | 14 ++++++ src/world/Actor/Player.h | 2 + src/world/Script/NativeScriptApi.cpp | 4 ++ src/world/Script/NativeScriptApi.h | 2 + src/world/Script/ScriptMgr.cpp | 12 +++++ src/world/Script/ScriptMgr.h | 2 + 17 files changed, 292 insertions(+), 22 deletions(-) create mode 100644 src/scripts/action/gnb/ActionBloodfest16164.cpp create mode 100644 src/scripts/action/gnb/ActionBrutalShell16139.cpp create mode 100644 src/scripts/action/gnb/ActionGnashingFang16146.cpp create mode 100644 src/scripts/action/gnb/ActionSavageClaw16147.cpp create mode 100644 src/scripts/action/gnb/ActionWickedTalon16150.cpp create mode 100644 src/scripts/action/role/ActionProvoke7533.cpp diff --git a/src/scripts/action/brd/ActionHeavyShot97.cpp b/src/scripts/action/brd/ActionHeavyShot97.cpp index ee8756b5..abc7129b 100644 --- a/src/scripts/action/brd/ActionHeavyShot97.cpp +++ b/src/scripts/action/brd/ActionHeavyShot97.cpp @@ -20,9 +20,9 @@ public: { } - void onExecute( Sapphire::World::Action::Action& action ) override + void onBeforeBuildEffect( Sapphire::World::Action::Action& action, uint8_t victimCounter, uint8_t validVictimCounter ) override { - if( action.getSourceChara()->getLevel() >= 2 && Math::CalcStats::getRandomNumber0To99() < 20 ) + if( validVictimCounter > 0 && action.getSourceChara()->getLevel() >= 2 && Math::CalcStats::getRandomNumber0To99() < 20 ) { auto pEffect = Sapphire::StatusEffect::make_StatusEffect( STATUS_ID_STRAIGHT_SHOT_READY, action.getSourceChara(), action.getSourceChara(), 10000, 3000 ); action.getEffectbuilder()->applyStatusEffect( action.getSourceChara(), action.getSourceChara(), pEffect ); diff --git a/src/scripts/action/gnb/ActionBloodfest16164.cpp b/src/scripts/action/gnb/ActionBloodfest16164.cpp new file mode 100644 index 00000000..ddde3223 --- /dev/null +++ b/src/scripts/action/gnb/ActionBloodfest16164.cpp @@ -0,0 +1,32 @@ +#include