From af6d582f88f1bdf5d3f03b043d8c846bd52bf3e5 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 24 Oct 2021 11:36:43 +0200 Subject: [PATCH] Optimalization for Assurance, use tester 0.0.7 --- Scripts/Interfaces/BattleHistory.astypedef | 4 ++-- Scripts/Moves/Assurance.as | 2 +- fetch_tester.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Scripts/Interfaces/BattleHistory.astypedef b/Scripts/Interfaces/BattleHistory.astypedef index 02bdf4c..f4ba8f9 100644 --- a/Scripts/Interfaces/BattleHistory.astypedef +++ b/Scripts/Interfaces/BattleHistory.astypedef @@ -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; } diff --git a/Scripts/Moves/Assurance.as b/Scripts/Moves/Assurance.as index da6426b..3560058 100644 --- a/Scripts/Moves/Assurance.as +++ b/Scripts/Moves/Assurance.as @@ -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; } diff --git a/fetch_tester.sh b/fetch_tester.sh index 778beef..72bcaa6 100755 --- a/fetch_tester.sh +++ b/fetch_tester.sh @@ -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" |