Implements clearbody, update changestatboost interface
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-03-12 11:45:18 +01:00
parent 1fdca38b29
commit 262152b81d
15 changed files with 33 additions and 20 deletions

View File

@@ -7,7 +7,7 @@ namespace Gen7{
return;
}
auto randStat = Statistic(target.Battle.Random.Get(1, 6));
target.ChangeStatBoost(randStat, 2);
target.ChangeStatBoost(randStat, 2, false);
};
}
}

View File

@@ -3,7 +3,7 @@ namespace Gen7 {
void OnSecondaryEffect(ExecutingMove@ move, Pokemon@ target, uint8 hit) override {
auto originalSpeed = move.User.GetBoostedStat(Statistic::Speed);
auto originalWeight = move.User.Weight;
move.User.ChangeStatBoost(Statistic::Speed, 2);
move.User.ChangeStatBoost(Statistic::Speed, 2, true);
if (move.User.GetBoostedStat(Statistic::Speed) != originalSpeed){
// This setter function protects against going below 0.1
move.User.Weight -= 100;

View File

@@ -8,11 +8,11 @@ namespace Gen7 {
}
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override{
target.ChangeStatBoost(Statistic::Attack, _amount);
target.ChangeStatBoost(Statistic::Defense, _amount);
target.ChangeStatBoost(Statistic::SpecialAttack, _amount);
target.ChangeStatBoost(Statistic::SpecialDefense, _amount);
target.ChangeStatBoost(Statistic::Speed, _amount);
target.ChangeStatBoost(Statistic::Attack, _amount, attack.User is target);
target.ChangeStatBoost(Statistic::Defense, _amount, attack.User is target);
target.ChangeStatBoost(Statistic::SpecialAttack, _amount, attack.User is target);
target.ChangeStatBoost(Statistic::SpecialDefense, _amount, attack.User is target);
target.ChangeStatBoost(Statistic::Speed, _amount, attack.User is target);
}
}
}

View File

@@ -8,7 +8,7 @@ namespace Gen7 {
}
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override{
target.ChangeStatBoost(Statistic::Attack, _amount);
target.ChangeStatBoost(Statistic::Attack, _amount, attack.User is target);
}
}
}

View File

@@ -8,7 +8,7 @@ namespace Gen7 {
}
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override{
target.ChangeStatBoost(Statistic::Defense, _amount);
target.ChangeStatBoost(Statistic::Defense, _amount, attack.User is target);
}
}
}

View File

@@ -8,7 +8,7 @@ namespace Gen7 {
}
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override{
target.ChangeStatBoost(Statistic::SpecialDefense, _amount);
target.ChangeStatBoost(Statistic::SpecialDefense, _amount, attack.User is target);
}
}
}

View File

@@ -8,7 +8,7 @@ namespace Gen7 {
}
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override{
target.ChangeStatBoost(Statistic::Speed, _amount);
target.ChangeStatBoost(Statistic::Speed, _amount, attack.User is target);
}
}
}