Optimalization for Assurance, use tester 0.0.7
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2021-10-24 11:36:43 +02:00
parent e9658cef1a
commit af6d582f88
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
3 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
type BattleHistory {
const HistoryElement@ TopElement { get const; };
const AttackUseHistory@ GetLastUsedAttack() const;
const DamageHistory@ GetLastDamageOnTarget(Pokemon@ target) const;
const AttackUseHistory@ GetLastUsedAttack(uint maxTurns = 0) const;
const DamageHistory@ GetLastDamageOnTarget(Pokemon@ target, uint maxTurns = 0) const;
}

View File

@ -2,7 +2,7 @@ namespace Gen7{
[Move effect=Assurance]
class Assurance : PkmnScript {
void OverrideDamage(ExecutingMove@ attack, Pokemon@ target, uint8 hit, uint &inout damage) override {
auto damageEvent = target.Battle.History.GetLastDamageOnTarget(target);
auto damageEvent = target.Battle.History.GetLastDamageOnTarget(target, 1);
if (damageEvent is null){
return;
}

View File

@ -1,6 +1,6 @@
#!/bin/sh
TESTERVERSION=0.0.5
TESTERVERSION=0.0.7
# Get the release information from the api for the specified version
curl -X GET "https://git.p-epsilon.com/api/v1/repos/Deukhoofd/PokemonScriptTester/releases/tags/$TESTERVERSION" -H "accept: application/json" |