Initial commit.
This commit is contained in:
11
Scripts/Moves/Acrobatics.as
Normal file
11
Scripts/Moves/Acrobatics.as
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Gen7 {
|
||||
[Move effect=Acrobatics]
|
||||
class Acrobatics : PkmnScript{
|
||||
void OverrideBasePower(ExecutingMove@ attack, Pokemon@ target, uint8 hit, uint8& basePower) override {
|
||||
if (attack.User.HeldItem is null){
|
||||
if (basePower >= 128) basePower = 255;
|
||||
else basePower *= 2;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
13
Scripts/Moves/Acupressure.as
Normal file
13
Scripts/Moves/Acupressure.as
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace Gen7{
|
||||
[Move effect=Acupressure]
|
||||
class Acupressure : PkmnScript {
|
||||
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override {
|
||||
if (attack.User is target){
|
||||
// TODO: Fail.
|
||||
return;
|
||||
}
|
||||
auto randStat = Statistic(target.Battle.Random.Get(0, 6));
|
||||
target.ChangeStatBoost(randStat, 2);
|
||||
};
|
||||
}
|
||||
}
|
||||
11
Scripts/Moves/AfterYou.as
Normal file
11
Scripts/Moves/AfterYou.as
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Gen7 {
|
||||
[Move effect=AfterYou]
|
||||
class AfterYou : PkmnScript{
|
||||
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override {
|
||||
bool result = target.Battle.TurnQueue.MovePokemonChoiceNext(target);
|
||||
if (!result){
|
||||
// TODO: Failed
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
14
Scripts/Moves/ChangeTargetDef.as
Normal file
14
Scripts/Moves/ChangeTargetDef.as
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Gen7 {
|
||||
[Move effect=ChangeTargetDef]
|
||||
shared class ChangeTargetDefense : PkmnScript{
|
||||
int8 _amount;
|
||||
|
||||
void OnInitialize(const array<EffectParameter@> &in parameters) override{
|
||||
_amount = int8(parameters[0].AsInt());
|
||||
}
|
||||
|
||||
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override{
|
||||
target.ChangeStatBoost(Statistic::Defense, _amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
14
Scripts/Moves/ChangeTargetSpDef.as
Normal file
14
Scripts/Moves/ChangeTargetSpDef.as
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Gen7 {
|
||||
[Move effect=ChangeTargetSpDef]
|
||||
shared class ChangeTargetSpecialDefense : PkmnScript{
|
||||
int8 _amount;
|
||||
|
||||
void OnInitialize(const array<EffectParameter@> &in parameters) override{
|
||||
_amount = int8(parameters[0].AsInt());
|
||||
}
|
||||
|
||||
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override{
|
||||
target.ChangeStatBoost(Statistic::SpecialDefense, _amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
14
Scripts/Moves/ChangeTargetSpeed.as
Normal file
14
Scripts/Moves/ChangeTargetSpeed.as
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Gen7 {
|
||||
[Move effect=ChangeTargetSpeed]
|
||||
shared class ChangeTargetSpeed : PkmnScript{
|
||||
int8 _amount;
|
||||
|
||||
void OnInitialize(const array<EffectParameter@> &in parameters) override{
|
||||
_amount = int8(parameters[0].AsInt());
|
||||
}
|
||||
|
||||
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override{
|
||||
target.ChangeStatBoost(Statistic::Speed, _amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
20
Scripts/Moves/Drain.as
Normal file
20
Scripts/Moves/Drain.as
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace Gen7{
|
||||
[Move effect=drain]
|
||||
shared class DrainMove : PkmnScript{
|
||||
private float _healModifier = 0;
|
||||
|
||||
void OnInitialize(const array<EffectParameter@> &in parameters) override{
|
||||
_healModifier = parameters[0].AsFloat();
|
||||
}
|
||||
|
||||
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override{
|
||||
auto hitData = attack.GetAttackDataForTarget(target).GetHit(hit);
|
||||
auto damage = hitData.Damage;
|
||||
float mod = _healModifier;
|
||||
if (attack.User.HasHeldItem("big_root")){
|
||||
mod *= 1.3;
|
||||
}
|
||||
attack.User.Heal(uint(damage * mod));
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Scripts/Moves/Flinch.as
Normal file
8
Scripts/Moves/Flinch.as
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Gen7{
|
||||
[Move effect=Flinch]
|
||||
class Flinch : PkmnScript {
|
||||
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override{
|
||||
target.AddVolatile("flinch");
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Scripts/Moves/IncreasedCriticalStage.as
Normal file
8
Scripts/Moves/IncreasedCriticalStage.as
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Gen7 {
|
||||
[Move effect=IncreasedCriticalStage]
|
||||
shared class IncreasedCriticalStage : PkmnScript {
|
||||
void ModifyCriticalStage(ExecutingMove@ attack, Pokemon@ target, uint8 hit, uint8& critStage) override{
|
||||
critStage++;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user